auth0 5.3.1 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/management/BaseClient.d.ts +4 -4
- package/dist/cjs/management/api/requests/requests.d.ts +37 -8
- package/dist/cjs/management/api/resources/actions/client/Client.js +25 -37
- package/dist/cjs/management/api/resources/actions/resources/modules/client/Client.js +22 -28
- package/dist/cjs/management/api/resources/actions/resources/modules/resources/versions/client/Client.js +11 -14
- package/dist/cjs/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.js +11 -14
- package/dist/cjs/management/api/resources/actions/resources/versions/client/Client.js +12 -15
- package/dist/cjs/management/api/resources/branding/resources/phone/resources/providers/client/Client.js +10 -11
- package/dist/cjs/management/api/resources/branding/resources/phone/resources/templates/client/Client.js +10 -11
- package/dist/cjs/management/api/resources/clientGrants/client/Client.js +15 -26
- package/dist/cjs/management/api/resources/clientGrants/resources/organizations/client/Client.js +11 -14
- package/dist/cjs/management/api/resources/clients/client/Client.js +29 -49
- package/dist/cjs/management/api/resources/clients/resources/connections/client/Client.js +18 -28
- package/dist/cjs/management/api/resources/connectionProfiles/client/Client.js +11 -14
- package/dist/cjs/management/api/resources/connections/client/Client.d.ts +2 -2
- package/dist/cjs/management/api/resources/connections/client/Client.js +34 -49
- package/dist/cjs/management/api/resources/connections/resources/clients/client/Client.js +11 -14
- package/dist/cjs/management/api/resources/connections/resources/directoryProvisioning/client/Client.js +13 -16
- package/dist/cjs/management/api/resources/connections/resources/keys/client/Client.d.ts +19 -0
- package/dist/cjs/management/api/resources/connections/resources/keys/client/Client.js +71 -1
- package/dist/cjs/management/api/resources/connections/resources/scimConfiguration/client/Client.d.ts +18 -0
- package/dist/cjs/management/api/resources/connections/resources/scimConfiguration/client/Client.js +78 -1
- package/dist/cjs/management/api/resources/connections/resources/users/client/Client.js +3 -2
- package/dist/cjs/management/api/resources/customDomains/client/Client.js +13 -20
- package/dist/cjs/management/api/resources/deviceCredentials/client/Client.js +17 -32
- package/dist/cjs/management/api/resources/emails/resources/provider/client/Client.js +11 -14
- package/dist/cjs/management/api/resources/eventStreams/client/Client.js +11 -14
- package/dist/cjs/management/api/resources/eventStreams/resources/deliveries/client/Client.js +15 -26
- package/dist/cjs/management/api/resources/flows/client/Client.js +21 -37
- package/dist/cjs/management/api/resources/flows/resources/executions/client/Client.js +14 -23
- package/dist/cjs/management/api/resources/flows/resources/vault/resources/connections/client/Client.js +12 -17
- package/dist/cjs/management/api/resources/forms/client/Client.js +20 -34
- package/dist/cjs/management/api/resources/groups/client/Client.js +16 -29
- package/dist/cjs/management/api/resources/groups/resources/members/client/Client.js +13 -20
- package/dist/cjs/management/api/resources/hooks/client/Client.js +18 -30
- package/dist/cjs/management/api/resources/jobs/resources/usersImports/client/Client.js +14 -14
- package/dist/cjs/management/api/resources/keys/resources/encryption/client/Client.js +12 -17
- package/dist/cjs/management/api/resources/logs/client/Client.js +16 -29
- package/dist/cjs/management/api/resources/networkAcls/client/Client.js +12 -17
- package/dist/cjs/management/api/resources/organizations/client/Client.js +12 -17
- package/dist/cjs/management/api/resources/organizations/resources/clientGrants/client/Client.js +15 -31
- package/dist/cjs/management/api/resources/organizations/resources/discoveryDomains/client/Client.js +11 -14
- package/dist/cjs/management/api/resources/organizations/resources/enabledConnections/client/Client.js +12 -17
- package/dist/cjs/management/api/resources/organizations/resources/invitations/client/Client.js +26 -40
- package/dist/cjs/management/api/resources/organizations/resources/members/client/Client.js +13 -20
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/roles/client/Client.js +12 -17
- package/dist/cjs/management/api/resources/prompts/resources/rendering/client/Client.js +17 -32
- package/dist/cjs/management/api/resources/resourceServers/client/Client.js +24 -39
- package/dist/cjs/management/api/resources/roles/client/Client.js +13 -20
- package/dist/cjs/management/api/resources/roles/resources/permissions/client/Client.js +12 -17
- package/dist/cjs/management/api/resources/roles/resources/users/client/Client.js +11 -14
- package/dist/cjs/management/api/resources/rules/client/Client.js +26 -40
- package/dist/cjs/management/api/resources/selfServiceProfiles/client/Client.js +12 -17
- package/dist/cjs/management/api/resources/stats/client/Client.js +4 -7
- package/dist/cjs/management/api/resources/tenants/resources/settings/client/Client.js +11 -14
- package/dist/cjs/management/api/resources/tokenExchangeProfiles/client/Client.js +11 -14
- package/dist/cjs/management/api/resources/userAttributeProfiles/client/Client.js +11 -14
- package/dist/cjs/management/api/resources/userBlocks/client/Client.js +24 -25
- package/dist/cjs/management/api/resources/userGrants/client/Client.js +18 -28
- package/dist/cjs/management/api/resources/users/client/Client.js +42 -67
- package/dist/cjs/management/api/resources/users/resources/authenticationMethods/client/Client.js +12 -17
- package/dist/cjs/management/api/resources/users/resources/connectedAccounts/client/Client.js +11 -14
- package/dist/cjs/management/api/resources/users/resources/groups/client/Client.js +13 -20
- package/dist/cjs/management/api/resources/users/resources/logs/client/Client.js +13 -20
- package/dist/cjs/management/api/resources/users/resources/organizations/client/Client.js +12 -17
- package/dist/cjs/management/api/resources/users/resources/permissions/client/Client.js +12 -17
- package/dist/cjs/management/api/resources/users/resources/refreshToken/client/Client.js +11 -14
- package/dist/cjs/management/api/resources/users/resources/roles/client/Client.js +12 -17
- package/dist/cjs/management/api/resources/users/resources/sessions/client/Client.js +11 -14
- package/dist/cjs/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/Client.js +11 -14
- package/dist/cjs/management/api/types/types.d.ts +4464 -4299
- package/dist/cjs/management/api/types/types.js +46 -12
- package/dist/cjs/management/auth/BearerAuthProvider.d.ts +14 -10
- package/dist/cjs/management/auth/BearerAuthProvider.js +15 -6
- package/dist/cjs/management/core/fetcher/EndpointSupplier.d.ts +2 -2
- package/dist/cjs/management/core/fetcher/Fetcher.d.ts +1 -2
- package/dist/cjs/management/core/fetcher/Fetcher.js +7 -1
- package/dist/cjs/management/core/form-data-utils/FormDataWrapper.js +1 -1
- package/dist/cjs/management/core/headers.d.ts +2 -2
- package/dist/cjs/management/core/pagination/CustomPager.d.ts +29 -44
- package/dist/cjs/management/core/pagination/CustomPager.js +60 -42
- package/dist/cjs/management/core/pagination/exports.d.ts +0 -1
- package/dist/cjs/management/core/pagination/exports.js +0 -3
- package/dist/cjs/management/core/pagination/index.d.ts +1 -1
- package/dist/cjs/management/core/pagination/index.js +2 -1
- package/dist/cjs/management/version.d.ts +1 -1
- package/dist/cjs/management/version.js +1 -1
- package/dist/esm/management/BaseClient.d.mts +4 -4
- package/dist/esm/management/api/requests/requests.d.mts +37 -8
- package/dist/esm/management/api/resources/actions/client/Client.mjs +25 -37
- package/dist/esm/management/api/resources/actions/resources/modules/client/Client.mjs +22 -28
- package/dist/esm/management/api/resources/actions/resources/modules/resources/versions/client/Client.mjs +11 -14
- package/dist/esm/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.mjs +11 -14
- package/dist/esm/management/api/resources/actions/resources/versions/client/Client.mjs +12 -15
- package/dist/esm/management/api/resources/branding/resources/phone/resources/providers/client/Client.mjs +10 -11
- package/dist/esm/management/api/resources/branding/resources/phone/resources/templates/client/Client.mjs +10 -11
- package/dist/esm/management/api/resources/clientGrants/client/Client.mjs +15 -26
- package/dist/esm/management/api/resources/clientGrants/resources/organizations/client/Client.mjs +11 -14
- package/dist/esm/management/api/resources/clients/client/Client.mjs +29 -49
- package/dist/esm/management/api/resources/clients/resources/connections/client/Client.mjs +18 -28
- package/dist/esm/management/api/resources/connectionProfiles/client/Client.mjs +11 -14
- package/dist/esm/management/api/resources/connections/client/Client.d.mts +2 -2
- package/dist/esm/management/api/resources/connections/client/Client.mjs +34 -49
- package/dist/esm/management/api/resources/connections/resources/clients/client/Client.mjs +11 -14
- package/dist/esm/management/api/resources/connections/resources/directoryProvisioning/client/Client.mjs +13 -16
- package/dist/esm/management/api/resources/connections/resources/keys/client/Client.d.mts +19 -0
- package/dist/esm/management/api/resources/connections/resources/keys/client/Client.mjs +71 -1
- package/dist/esm/management/api/resources/connections/resources/scimConfiguration/client/Client.d.mts +18 -0
- package/dist/esm/management/api/resources/connections/resources/scimConfiguration/client/Client.mjs +78 -1
- package/dist/esm/management/api/resources/connections/resources/users/client/Client.mjs +3 -2
- package/dist/esm/management/api/resources/customDomains/client/Client.mjs +13 -20
- package/dist/esm/management/api/resources/deviceCredentials/client/Client.mjs +17 -32
- package/dist/esm/management/api/resources/emails/resources/provider/client/Client.mjs +11 -14
- package/dist/esm/management/api/resources/eventStreams/client/Client.mjs +11 -14
- package/dist/esm/management/api/resources/eventStreams/resources/deliveries/client/Client.mjs +15 -26
- package/dist/esm/management/api/resources/flows/client/Client.mjs +21 -37
- package/dist/esm/management/api/resources/flows/resources/executions/client/Client.mjs +14 -23
- package/dist/esm/management/api/resources/flows/resources/vault/resources/connections/client/Client.mjs +12 -17
- package/dist/esm/management/api/resources/forms/client/Client.mjs +20 -34
- package/dist/esm/management/api/resources/groups/client/Client.mjs +16 -29
- package/dist/esm/management/api/resources/groups/resources/members/client/Client.mjs +13 -20
- package/dist/esm/management/api/resources/hooks/client/Client.mjs +18 -30
- package/dist/esm/management/api/resources/jobs/resources/usersImports/client/Client.mjs +14 -14
- package/dist/esm/management/api/resources/keys/resources/encryption/client/Client.mjs +12 -17
- package/dist/esm/management/api/resources/logs/client/Client.mjs +16 -29
- package/dist/esm/management/api/resources/networkAcls/client/Client.mjs +12 -17
- package/dist/esm/management/api/resources/organizations/client/Client.mjs +12 -17
- package/dist/esm/management/api/resources/organizations/resources/clientGrants/client/Client.mjs +15 -31
- package/dist/esm/management/api/resources/organizations/resources/discoveryDomains/client/Client.mjs +11 -14
- package/dist/esm/management/api/resources/organizations/resources/enabledConnections/client/Client.mjs +12 -17
- package/dist/esm/management/api/resources/organizations/resources/invitations/client/Client.mjs +26 -40
- package/dist/esm/management/api/resources/organizations/resources/members/client/Client.mjs +13 -20
- package/dist/esm/management/api/resources/organizations/resources/members/resources/roles/client/Client.mjs +12 -17
- package/dist/esm/management/api/resources/prompts/resources/rendering/client/Client.mjs +17 -32
- package/dist/esm/management/api/resources/resourceServers/client/Client.mjs +24 -39
- package/dist/esm/management/api/resources/roles/client/Client.mjs +13 -20
- package/dist/esm/management/api/resources/roles/resources/permissions/client/Client.mjs +12 -17
- package/dist/esm/management/api/resources/roles/resources/users/client/Client.mjs +11 -14
- package/dist/esm/management/api/resources/rules/client/Client.mjs +26 -40
- package/dist/esm/management/api/resources/selfServiceProfiles/client/Client.mjs +12 -17
- package/dist/esm/management/api/resources/stats/client/Client.mjs +4 -7
- package/dist/esm/management/api/resources/tenants/resources/settings/client/Client.mjs +11 -14
- package/dist/esm/management/api/resources/tokenExchangeProfiles/client/Client.mjs +11 -14
- package/dist/esm/management/api/resources/userAttributeProfiles/client/Client.mjs +11 -14
- package/dist/esm/management/api/resources/userBlocks/client/Client.mjs +24 -25
- package/dist/esm/management/api/resources/userGrants/client/Client.mjs +18 -28
- package/dist/esm/management/api/resources/users/client/Client.mjs +42 -67
- package/dist/esm/management/api/resources/users/resources/authenticationMethods/client/Client.mjs +12 -17
- package/dist/esm/management/api/resources/users/resources/connectedAccounts/client/Client.mjs +11 -14
- package/dist/esm/management/api/resources/users/resources/groups/client/Client.mjs +13 -20
- package/dist/esm/management/api/resources/users/resources/logs/client/Client.mjs +13 -20
- package/dist/esm/management/api/resources/users/resources/organizations/client/Client.mjs +12 -17
- package/dist/esm/management/api/resources/users/resources/permissions/client/Client.mjs +12 -17
- package/dist/esm/management/api/resources/users/resources/refreshToken/client/Client.mjs +11 -14
- package/dist/esm/management/api/resources/users/resources/roles/client/Client.mjs +12 -17
- package/dist/esm/management/api/resources/users/resources/sessions/client/Client.mjs +11 -14
- package/dist/esm/management/api/resources/verifiableCredentials/resources/verification/resources/templates/client/Client.mjs +11 -14
- package/dist/esm/management/api/types/types.d.mts +4464 -4299
- package/dist/esm/management/api/types/types.mjs +37 -3
- package/dist/esm/management/auth/BearerAuthProvider.d.mts +14 -10
- package/dist/esm/management/auth/BearerAuthProvider.mjs +15 -6
- package/dist/esm/management/core/fetcher/EndpointSupplier.d.mts +2 -2
- package/dist/esm/management/core/fetcher/Fetcher.d.mts +1 -2
- package/dist/esm/management/core/fetcher/Fetcher.mjs +7 -1
- package/dist/esm/management/core/form-data-utils/FormDataWrapper.mjs +1 -1
- package/dist/esm/management/core/headers.d.mts +2 -2
- package/dist/esm/management/core/pagination/CustomPager.d.mts +29 -44
- package/dist/esm/management/core/pagination/CustomPager.mjs +58 -41
- package/dist/esm/management/core/pagination/exports.d.mts +0 -1
- package/dist/esm/management/core/pagination/exports.mjs +1 -1
- package/dist/esm/management/core/pagination/index.d.mts +1 -1
- package/dist/esm/management/core/pagination/index.mjs +1 -1
- package/dist/esm/management/version.d.mts +1 -1
- package/dist/esm/management/version.mjs +1 -1
- package/package.json +4 -3
- package/reference.md +271 -119
|
@@ -79,6 +79,76 @@ export class KeysClient {
|
|
|
79
79
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/connections/{id}/keys");
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Provision initial connection keys for Okta or OIDC connection strategies. This endpoint allows you to create keys before configuring the connection to use Private Key JWT authentication, enabling zero-downtime transitions.
|
|
84
|
+
*
|
|
85
|
+
* @param {string} id - ID of the connection
|
|
86
|
+
* @param {Management.PostConnectionKeysRequestContent | null} request
|
|
87
|
+
* @param {KeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
88
|
+
*
|
|
89
|
+
* @throws {@link Management.BadRequestError}
|
|
90
|
+
* @throws {@link Management.UnauthorizedError}
|
|
91
|
+
* @throws {@link Management.ForbiddenError}
|
|
92
|
+
* @throws {@link Management.NotFoundError}
|
|
93
|
+
* @throws {@link Management.ConflictError}
|
|
94
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* await client.connections.keys.create("id")
|
|
98
|
+
*/
|
|
99
|
+
create(id, request, requestOptions) {
|
|
100
|
+
return core.HttpResponsePromise.fromPromise(this.__create(id, request, requestOptions));
|
|
101
|
+
}
|
|
102
|
+
__create(id, request, requestOptions) {
|
|
103
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
105
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
106
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
107
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
108
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, `connections/${core.url.encodePathParam(id)}/keys`),
|
|
109
|
+
method: "POST",
|
|
110
|
+
headers: _headers,
|
|
111
|
+
contentType: "application/json",
|
|
112
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
113
|
+
requestType: "json",
|
|
114
|
+
body: request,
|
|
115
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
116
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
117
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
118
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
119
|
+
logging: this._options.logging,
|
|
120
|
+
});
|
|
121
|
+
if (_response.ok) {
|
|
122
|
+
return {
|
|
123
|
+
data: _response.body,
|
|
124
|
+
rawResponse: _response.rawResponse,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
if (_response.error.reason === "status-code") {
|
|
128
|
+
switch (_response.error.statusCode) {
|
|
129
|
+
case 400:
|
|
130
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
131
|
+
case 401:
|
|
132
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
133
|
+
case 403:
|
|
134
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
135
|
+
case 404:
|
|
136
|
+
throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
|
|
137
|
+
case 409:
|
|
138
|
+
throw new Management.ConflictError(_response.error.body, _response.rawResponse);
|
|
139
|
+
case 429:
|
|
140
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
141
|
+
default:
|
|
142
|
+
throw new errors.ManagementError({
|
|
143
|
+
statusCode: _response.error.statusCode,
|
|
144
|
+
body: _response.error.body,
|
|
145
|
+
rawResponse: _response.rawResponse,
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/connections/{id}/keys");
|
|
150
|
+
});
|
|
151
|
+
}
|
|
82
152
|
/**
|
|
83
153
|
* Rotates the connection keys for the Okta or OIDC connection strategies.
|
|
84
154
|
*
|
|
@@ -110,7 +180,7 @@ export class KeysClient {
|
|
|
110
180
|
contentType: "application/json",
|
|
111
181
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
112
182
|
requestType: "json",
|
|
113
|
-
body: request
|
|
183
|
+
body: request,
|
|
114
184
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
115
185
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
116
186
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -13,6 +13,24 @@ export declare class ScimConfigurationClient {
|
|
|
13
13
|
protected _tokens: TokensClient | undefined;
|
|
14
14
|
constructor(options: ScimConfigurationClient.Options);
|
|
15
15
|
get tokens(): TokensClient;
|
|
16
|
+
/**
|
|
17
|
+
* Retrieve a list of SCIM configurations of a tenant.
|
|
18
|
+
*
|
|
19
|
+
* @param {Management.ListScimConfigurationsRequestParameters} request
|
|
20
|
+
* @param {ScimConfigurationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
21
|
+
*
|
|
22
|
+
* @throws {@link Management.BadRequestError}
|
|
23
|
+
* @throws {@link Management.UnauthorizedError}
|
|
24
|
+
* @throws {@link Management.ForbiddenError}
|
|
25
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* await client.connections.scimConfiguration.list({
|
|
29
|
+
* from: "from",
|
|
30
|
+
* take: 1
|
|
31
|
+
* })
|
|
32
|
+
*/
|
|
33
|
+
list(request?: Management.ListScimConfigurationsRequestParameters, requestOptions?: ScimConfigurationClient.RequestOptions): Promise<core.Page<Management.ScimConfiguration, Management.ListScimConfigurationsResponseContent>>;
|
|
16
34
|
/**
|
|
17
35
|
* Retrieves a scim configuration by its <code>connectionId</code>.
|
|
18
36
|
*
|
package/dist/esm/management/api/resources/connections/resources/scimConfiguration/client/Client.mjs
CHANGED
|
@@ -24,6 +24,83 @@ export class ScimConfigurationClient {
|
|
|
24
24
|
var _a;
|
|
25
25
|
return ((_a = this._tokens) !== null && _a !== void 0 ? _a : (this._tokens = new TokensClient(this._options)));
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Retrieve a list of SCIM configurations of a tenant.
|
|
29
|
+
*
|
|
30
|
+
* @param {Management.ListScimConfigurationsRequestParameters} request
|
|
31
|
+
* @param {ScimConfigurationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
|
+
*
|
|
33
|
+
* @throws {@link Management.BadRequestError}
|
|
34
|
+
* @throws {@link Management.UnauthorizedError}
|
|
35
|
+
* @throws {@link Management.ForbiddenError}
|
|
36
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* await client.connections.scimConfiguration.list({
|
|
40
|
+
* from: "from",
|
|
41
|
+
* take: 1
|
|
42
|
+
* })
|
|
43
|
+
*/
|
|
44
|
+
list() {
|
|
45
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
46
|
+
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
48
|
+
const { from: from_, take = 50 } = request;
|
|
49
|
+
const _queryParams = {
|
|
50
|
+
from: from_,
|
|
51
|
+
take,
|
|
52
|
+
};
|
|
53
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
54
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
55
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
56
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, "connections-scim-configurations"),
|
|
57
|
+
method: "GET",
|
|
58
|
+
headers: _headers,
|
|
59
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
60
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
61
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
62
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
63
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
64
|
+
logging: this._options.logging,
|
|
65
|
+
});
|
|
66
|
+
if (_response.ok) {
|
|
67
|
+
return {
|
|
68
|
+
data: _response.body,
|
|
69
|
+
rawResponse: _response.rawResponse,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
if (_response.error.reason === "status-code") {
|
|
73
|
+
switch (_response.error.statusCode) {
|
|
74
|
+
case 400:
|
|
75
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
76
|
+
case 401:
|
|
77
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
78
|
+
case 403:
|
|
79
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
80
|
+
case 429:
|
|
81
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
82
|
+
default:
|
|
83
|
+
throw new errors.ManagementError({
|
|
84
|
+
statusCode: _response.error.statusCode,
|
|
85
|
+
body: _response.error.body,
|
|
86
|
+
rawResponse: _response.rawResponse,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/connections-scim-configurations");
|
|
91
|
+
}));
|
|
92
|
+
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
93
|
+
return new core.Page({
|
|
94
|
+
response: dataWithRawResponse.data,
|
|
95
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
96
|
+
hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.next) != null && !(typeof (response === null || response === void 0 ? void 0 : response.next) === "string" && (response === null || response === void 0 ? void 0 : response.next) === ""),
|
|
97
|
+
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.scim_configurations) !== null && _a !== void 0 ? _a : []; },
|
|
98
|
+
loadPage: (response) => {
|
|
99
|
+
return list(core.setObjectProperty(request, "from", response === null || response === void 0 ? void 0 : response.next));
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
27
104
|
/**
|
|
28
105
|
* Retrieves a scim configuration by its <code>connectionId</code>.
|
|
29
106
|
*
|
|
@@ -106,7 +183,7 @@ export class ScimConfigurationClient {
|
|
|
106
183
|
contentType: "application/json",
|
|
107
184
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
108
185
|
requestType: "json",
|
|
109
|
-
body: request
|
|
186
|
+
body: request,
|
|
110
187
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
111
188
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
112
189
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -43,8 +43,9 @@ export class UsersClient {
|
|
|
43
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
44
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
45
45
|
const { email } = request;
|
|
46
|
-
const _queryParams = {
|
|
47
|
-
|
|
46
|
+
const _queryParams = {
|
|
47
|
+
email,
|
|
48
|
+
};
|
|
48
49
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
49
50
|
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
50
51
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
@@ -42,32 +42,25 @@ export class CustomDomainsClient {
|
|
|
42
42
|
}
|
|
43
43
|
__list() {
|
|
44
44
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
45
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
45
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46
46
|
const { q, fields, include_fields: includeFields, sort } = request;
|
|
47
|
-
const _queryParams = {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
if (includeFields !== undefined) {
|
|
55
|
-
_queryParams["include_fields"] = (_a = includeFields === null || includeFields === void 0 ? void 0 : includeFields.toString()) !== null && _a !== void 0 ? _a : null;
|
|
56
|
-
}
|
|
57
|
-
if (sort !== undefined) {
|
|
58
|
-
_queryParams["sort"] = sort;
|
|
59
|
-
}
|
|
47
|
+
const _queryParams = {
|
|
48
|
+
q,
|
|
49
|
+
fields,
|
|
50
|
+
include_fields: includeFields,
|
|
51
|
+
sort,
|
|
52
|
+
};
|
|
60
53
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
61
|
-
let _headers = mergeHeaders(_authRequest.headers, (
|
|
62
|
-
const _response = yield ((
|
|
63
|
-
url: core.url.join((
|
|
54
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
55
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
56
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, "custom-domains"),
|
|
64
57
|
method: "GET",
|
|
65
58
|
headers: _headers,
|
|
66
59
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
67
|
-
timeoutMs: ((
|
|
68
|
-
maxRetries: (
|
|
60
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
61
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
69
62
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
70
|
-
fetchFn: (
|
|
63
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
71
64
|
logging: this._options.logging,
|
|
72
65
|
});
|
|
73
66
|
if (_response.ok) {
|
|
@@ -45,44 +45,29 @@ export class DeviceCredentialsClient {
|
|
|
45
45
|
list() {
|
|
46
46
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
47
47
|
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
48
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
49
49
|
const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true, fields, include_fields: includeFields, user_id: userId, client_id: clientId, type: type_, } = request;
|
|
50
|
-
const _queryParams = {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
if (fields !== undefined) {
|
|
61
|
-
_queryParams["fields"] = fields;
|
|
62
|
-
}
|
|
63
|
-
if (includeFields !== undefined) {
|
|
64
|
-
_queryParams["include_fields"] = (_d = includeFields === null || includeFields === void 0 ? void 0 : includeFields.toString()) !== null && _d !== void 0 ? _d : null;
|
|
65
|
-
}
|
|
66
|
-
if (userId !== undefined) {
|
|
67
|
-
_queryParams["user_id"] = userId;
|
|
68
|
-
}
|
|
69
|
-
if (clientId !== undefined) {
|
|
70
|
-
_queryParams["client_id"] = clientId;
|
|
71
|
-
}
|
|
72
|
-
if (type_ !== undefined) {
|
|
73
|
-
_queryParams["type"] = type_;
|
|
74
|
-
}
|
|
50
|
+
const _queryParams = {
|
|
51
|
+
page,
|
|
52
|
+
per_page: perPage,
|
|
53
|
+
include_totals: includeTotals,
|
|
54
|
+
fields,
|
|
55
|
+
include_fields: includeFields,
|
|
56
|
+
user_id: userId,
|
|
57
|
+
client_id: clientId,
|
|
58
|
+
type: type_ !== undefined ? type_ : undefined,
|
|
59
|
+
};
|
|
75
60
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
76
|
-
let _headers = mergeHeaders(_authRequest.headers, (
|
|
77
|
-
const _response = yield ((
|
|
78
|
-
url: core.url.join((
|
|
61
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
62
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
63
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, "device-credentials"),
|
|
79
64
|
method: "GET",
|
|
80
65
|
headers: _headers,
|
|
81
66
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
82
|
-
timeoutMs: ((
|
|
83
|
-
maxRetries: (
|
|
67
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
68
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
84
69
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
85
|
-
fetchFn: (
|
|
70
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
86
71
|
logging: this._options.logging,
|
|
87
72
|
});
|
|
88
73
|
if (_response.ok) {
|
|
@@ -42,26 +42,23 @@ export class ProviderClient {
|
|
|
42
42
|
}
|
|
43
43
|
__get() {
|
|
44
44
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
45
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
45
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46
46
|
const { fields, include_fields: includeFields } = request;
|
|
47
|
-
const _queryParams = {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
if (includeFields !== undefined) {
|
|
52
|
-
_queryParams["include_fields"] = (_a = includeFields === null || includeFields === void 0 ? void 0 : includeFields.toString()) !== null && _a !== void 0 ? _a : null;
|
|
53
|
-
}
|
|
47
|
+
const _queryParams = {
|
|
48
|
+
fields,
|
|
49
|
+
include_fields: includeFields,
|
|
50
|
+
};
|
|
54
51
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
55
|
-
let _headers = mergeHeaders(_authRequest.headers, (
|
|
56
|
-
const _response = yield ((
|
|
57
|
-
url: core.url.join((
|
|
52
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
53
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
54
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, "emails/provider"),
|
|
58
55
|
method: "GET",
|
|
59
56
|
headers: _headers,
|
|
60
57
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
61
|
-
timeoutMs: ((
|
|
62
|
-
maxRetries: (
|
|
58
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
59
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
63
60
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
64
|
-
fetchFn: (
|
|
61
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
65
62
|
logging: this._options.logging,
|
|
66
63
|
});
|
|
67
64
|
if (_response.ok) {
|
|
@@ -47,26 +47,23 @@ export class EventStreamsClient {
|
|
|
47
47
|
list() {
|
|
48
48
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
49
49
|
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
50
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
51
51
|
const { from: from_, take = 50 } = request;
|
|
52
|
-
const _queryParams = {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
if (take !== undefined) {
|
|
57
|
-
_queryParams["take"] = (_a = take === null || take === void 0 ? void 0 : take.toString()) !== null && _a !== void 0 ? _a : null;
|
|
58
|
-
}
|
|
52
|
+
const _queryParams = {
|
|
53
|
+
from: from_,
|
|
54
|
+
take,
|
|
55
|
+
};
|
|
59
56
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
60
|
-
let _headers = mergeHeaders(_authRequest.headers, (
|
|
61
|
-
const _response = yield ((
|
|
62
|
-
url: core.url.join((
|
|
57
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
58
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
59
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, "event-streams"),
|
|
63
60
|
method: "GET",
|
|
64
61
|
headers: _headers,
|
|
65
62
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
66
|
-
timeoutMs: ((
|
|
67
|
-
maxRetries: (
|
|
63
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
64
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
68
65
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
69
|
-
fetchFn: (
|
|
66
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
70
67
|
logging: this._options.logging,
|
|
71
68
|
});
|
|
72
69
|
if (_response.ok) {
|
package/dist/esm/management/api/resources/eventStreams/resources/deliveries/client/Client.mjs
CHANGED
|
@@ -45,38 +45,27 @@ export class DeliveriesClient {
|
|
|
45
45
|
}
|
|
46
46
|
__list(id_1) {
|
|
47
47
|
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
48
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
48
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
49
49
|
const { statuses, event_types: eventTypes, date_from: dateFrom, date_to: dateTo, from: from_, take = 50, } = request;
|
|
50
|
-
const _queryParams = {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
_queryParams["date_from"] = dateFrom;
|
|
59
|
-
}
|
|
60
|
-
if (dateTo !== undefined) {
|
|
61
|
-
_queryParams["date_to"] = dateTo;
|
|
62
|
-
}
|
|
63
|
-
if (from_ !== undefined) {
|
|
64
|
-
_queryParams["from"] = from_;
|
|
65
|
-
}
|
|
66
|
-
if (take !== undefined) {
|
|
67
|
-
_queryParams["take"] = (_a = take === null || take === void 0 ? void 0 : take.toString()) !== null && _a !== void 0 ? _a : null;
|
|
68
|
-
}
|
|
50
|
+
const _queryParams = {
|
|
51
|
+
statuses,
|
|
52
|
+
event_types: eventTypes,
|
|
53
|
+
date_from: dateFrom,
|
|
54
|
+
date_to: dateTo,
|
|
55
|
+
from: from_,
|
|
56
|
+
take,
|
|
57
|
+
};
|
|
69
58
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
70
|
-
let _headers = mergeHeaders(_authRequest.headers, (
|
|
71
|
-
const _response = yield ((
|
|
72
|
-
url: core.url.join((
|
|
59
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
60
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
61
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, `event-streams/${core.url.encodePathParam(id)}/deliveries`),
|
|
73
62
|
method: "GET",
|
|
74
63
|
headers: _headers,
|
|
75
64
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
76
|
-
timeoutMs: ((
|
|
77
|
-
maxRetries: (
|
|
65
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
66
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
78
67
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
79
|
-
fetchFn: (
|
|
68
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
80
69
|
logging: this._options.logging,
|
|
81
70
|
});
|
|
82
71
|
if (_response.ok) {
|
|
@@ -49,40 +49,30 @@ export class FlowsClient {
|
|
|
49
49
|
list() {
|
|
50
50
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
51
51
|
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
52
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
53
53
|
const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true, hydrate, synchronous, } = request;
|
|
54
|
-
const _queryParams = {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if (Array.isArray(hydrate)) {
|
|
66
|
-
_queryParams["hydrate"] = hydrate.map((item) => item);
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
_queryParams["hydrate"] = hydrate;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
if (synchronous !== undefined) {
|
|
73
|
-
_queryParams["synchronous"] = (_d = synchronous === null || synchronous === void 0 ? void 0 : synchronous.toString()) !== null && _d !== void 0 ? _d : null;
|
|
74
|
-
}
|
|
54
|
+
const _queryParams = {
|
|
55
|
+
page,
|
|
56
|
+
per_page: perPage,
|
|
57
|
+
include_totals: includeTotals,
|
|
58
|
+
hydrate: Array.isArray(hydrate)
|
|
59
|
+
? hydrate.map((item) => item)
|
|
60
|
+
: hydrate !== undefined
|
|
61
|
+
? hydrate
|
|
62
|
+
: undefined,
|
|
63
|
+
synchronous,
|
|
64
|
+
};
|
|
75
65
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
76
|
-
let _headers = mergeHeaders(_authRequest.headers, (
|
|
77
|
-
const _response = yield ((
|
|
78
|
-
url: core.url.join((
|
|
66
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
67
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
68
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, "flows"),
|
|
79
69
|
method: "GET",
|
|
80
70
|
headers: _headers,
|
|
81
71
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
82
|
-
timeoutMs: ((
|
|
83
|
-
maxRetries: (
|
|
72
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
73
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
84
74
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
85
|
-
fetchFn: (
|
|
75
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
86
76
|
logging: this._options.logging,
|
|
87
77
|
});
|
|
88
78
|
if (_response.ok) {
|
|
@@ -206,15 +196,9 @@ export class FlowsClient {
|
|
|
206
196
|
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
207
197
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
208
198
|
const { hydrate } = request;
|
|
209
|
-
const _queryParams = {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
_queryParams["hydrate"] = hydrate.map((item) => item);
|
|
213
|
-
}
|
|
214
|
-
else {
|
|
215
|
-
_queryParams["hydrate"] = hydrate;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
199
|
+
const _queryParams = {
|
|
200
|
+
hydrate: Array.isArray(hydrate) ? hydrate.map((item) => item) : hydrate !== undefined ? hydrate : undefined,
|
|
201
|
+
};
|
|
218
202
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
219
203
|
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
220
204
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|