Skip to content

Commit a87a33f

Browse files
committed
fix: optional config fields
1 parent b94443c commit a87a33f

File tree

3 files changed

+60
-24
lines changed

3 files changed

+60
-24
lines changed

dist/utils/types.d.ts

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,54 @@ export type ProducerEvent = {
8383
payload: any;
8484
};
8585
export type Configuration = {
86+
/**
87+
* Authentication type. One of `user-supplied`, `username-password`, `oauth-client-credentials` or `oauth-jwt-bearer`.
88+
*/
8689
authType: AuthType;
87-
pubSubEndpoint: string;
88-
loginUrl: string;
89-
username: string;
90-
password: string;
91-
userToken: string;
92-
clientId: string;
93-
clientSecret: string;
94-
privateKey: string;
95-
accessToken: string;
96-
instanceUrl: string;
97-
organizationId: string;
90+
/**
91+
* A custom Pub/Sub API endpoint. The default endpoint `api.pubsub.salesforce.com:7443` is used if none is supplied.
92+
*/
93+
pubSubEndpoint?: string;
94+
/**
95+
* Salesforce login host. One of `https://login.salesforce.com`, `https://test.salesforce.com` or your domain specific host.
96+
*/
97+
loginUrl?: string;
98+
/**
99+
* Salesforce username.
100+
*/
101+
username?: string;
102+
/**
103+
* Salesforce user password.
104+
*/
105+
password?: string;
106+
/**
107+
* Salesforce user security token.
108+
*/
109+
userToken?: string;
110+
/**
111+
* Connected app client ID.
112+
*/
113+
clientId?: string;
114+
/**
115+
* Connected app client secret.
116+
*/
117+
clientSecret?: string;
118+
/**
119+
* Private key content.
120+
*/
121+
privateKey?: string;
122+
/**
123+
* Salesforce access token.
124+
*/
125+
accessToken?: string;
126+
/**
127+
* Salesforce instance URL.
128+
*/
129+
instanceUrl?: string;
130+
/**
131+
* Optional organization ID. If you don't provide one, we'll attempt to parse it from the accessToken.
132+
*/
133+
organizationId?: string;
98134
};
99135
export type Logger = {
100136
debug: Function;

dist/utils/types.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/types.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,18 +110,18 @@ export const EventSubscriptionAdminState = {
110110

111111
/**
112112
* @typedef {Object} Configuration
113-
* @property {AuthType} authType
114-
* @property {string} pubSubEndpoint
115-
* @property {string} loginUrl
116-
* @property {string} username
117-
* @property {string} password
118-
* @property {string} userToken
119-
* @property {string} clientId
120-
* @property {string} clientSecret
121-
* @property {string} privateKey
122-
* @property {string} accessToken
123-
* @property {string} instanceUrl
124-
* @property {string} organizationId
113+
* @property {AuthType} authType Authentication type. One of `user-supplied`, `username-password`, `oauth-client-credentials` or `oauth-jwt-bearer`.
114+
* @property {string} [pubSubEndpoint] A custom Pub/Sub API endpoint. The default endpoint `api.pubsub.salesforce.com:7443` is used if none is supplied.
115+
* @property {string} [loginUrl] Salesforce login host. One of `https://login.salesforce.com`, `https://test.salesforce.com` or your domain specific host.
116+
* @property {string} [username] Salesforce username.
117+
* @property {string} [password] Salesforce user password.
118+
* @property {string} [userToken] Salesforce user security token.
119+
* @property {string} [clientId] Connected app client ID.
120+
* @property {string} [clientSecret] Connected app client secret.
121+
* @property {string} [privateKey] Private key content.
122+
* @property {string} [accessToken] Salesforce access token.
123+
* @property {string} [instanceUrl] Salesforce instance URL.
124+
* @property {string} [organizationId] Optional organization ID. If you don't provide one, we'll attempt to parse it from the accessToken.
125125
*/
126126

127127
/**

0 commit comments

Comments
 (0)