auth0 5.3.1 → 5.4.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 +21 -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 +4448 -4299
- package/dist/cjs/management/api/types/types.js +41 -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 +21 -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 +4448 -4299
- package/dist/esm/management/api/types/types.mjs +32 -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
package/dist/cjs/management/api/resources/connections/resources/scimConfiguration/client/Client.js
CHANGED
|
@@ -60,6 +60,83 @@ class ScimConfigurationClient {
|
|
|
60
60
|
var _a;
|
|
61
61
|
return ((_a = this._tokens) !== null && _a !== void 0 ? _a : (this._tokens = new Client_js_1.TokensClient(this._options)));
|
|
62
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Retrieve a list of SCIM configurations of a tenant.
|
|
65
|
+
*
|
|
66
|
+
* @param {Management.ListScimConfigurationsRequestParameters} request
|
|
67
|
+
* @param {ScimConfigurationClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
68
|
+
*
|
|
69
|
+
* @throws {@link Management.BadRequestError}
|
|
70
|
+
* @throws {@link Management.UnauthorizedError}
|
|
71
|
+
* @throws {@link Management.ForbiddenError}
|
|
72
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* await client.connections.scimConfiguration.list({
|
|
76
|
+
* from: "from",
|
|
77
|
+
* take: 1
|
|
78
|
+
* })
|
|
79
|
+
*/
|
|
80
|
+
list() {
|
|
81
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
82
|
+
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
84
|
+
const { from: from_, take = 50 } = request;
|
|
85
|
+
const _queryParams = {
|
|
86
|
+
from: from_,
|
|
87
|
+
take,
|
|
88
|
+
};
|
|
89
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
90
|
+
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
91
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
92
|
+
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"),
|
|
93
|
+
method: "GET",
|
|
94
|
+
headers: _headers,
|
|
95
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
96
|
+
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,
|
|
97
|
+
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,
|
|
98
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
99
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
100
|
+
logging: this._options.logging,
|
|
101
|
+
});
|
|
102
|
+
if (_response.ok) {
|
|
103
|
+
return {
|
|
104
|
+
data: _response.body,
|
|
105
|
+
rawResponse: _response.rawResponse,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
if (_response.error.reason === "status-code") {
|
|
109
|
+
switch (_response.error.statusCode) {
|
|
110
|
+
case 400:
|
|
111
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
112
|
+
case 401:
|
|
113
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
114
|
+
case 403:
|
|
115
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
116
|
+
case 429:
|
|
117
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
118
|
+
default:
|
|
119
|
+
throw new errors.ManagementError({
|
|
120
|
+
statusCode: _response.error.statusCode,
|
|
121
|
+
body: _response.error.body,
|
|
122
|
+
rawResponse: _response.rawResponse,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/connections-scim-configurations");
|
|
127
|
+
}));
|
|
128
|
+
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
129
|
+
return new core.Page({
|
|
130
|
+
response: dataWithRawResponse.data,
|
|
131
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
132
|
+
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) === ""),
|
|
133
|
+
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.scim_configurations) !== null && _a !== void 0 ? _a : []; },
|
|
134
|
+
loadPage: (response) => {
|
|
135
|
+
return list(core.setObjectProperty(request, "from", response === null || response === void 0 ? void 0 : response.next));
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
}
|
|
63
140
|
/**
|
|
64
141
|
* Retrieves a scim configuration by its <code>connectionId</code>.
|
|
65
142
|
*
|
|
@@ -142,7 +219,7 @@ class ScimConfigurationClient {
|
|
|
142
219
|
contentType: "application/json",
|
|
143
220
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
144
221
|
requestType: "json",
|
|
145
|
-
body: request
|
|
222
|
+
body: request,
|
|
146
223
|
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,
|
|
147
224
|
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,
|
|
148
225
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -79,8 +79,9 @@ class UsersClient {
|
|
|
79
79
|
return __awaiter(this, void 0, void 0, function* () {
|
|
80
80
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
81
81
|
const { email } = request;
|
|
82
|
-
const _queryParams = {
|
|
83
|
-
|
|
82
|
+
const _queryParams = {
|
|
83
|
+
email,
|
|
84
|
+
};
|
|
84
85
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
85
86
|
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
86
87
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
@@ -78,32 +78,25 @@ class CustomDomainsClient {
|
|
|
78
78
|
}
|
|
79
79
|
__list() {
|
|
80
80
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
81
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
81
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
82
82
|
const { q, fields, include_fields: includeFields, sort } = request;
|
|
83
|
-
const _queryParams = {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
if (includeFields !== undefined) {
|
|
91
|
-
_queryParams["include_fields"] = (_a = includeFields === null || includeFields === void 0 ? void 0 : includeFields.toString()) !== null && _a !== void 0 ? _a : null;
|
|
92
|
-
}
|
|
93
|
-
if (sort !== undefined) {
|
|
94
|
-
_queryParams["sort"] = sort;
|
|
95
|
-
}
|
|
83
|
+
const _queryParams = {
|
|
84
|
+
q,
|
|
85
|
+
fields,
|
|
86
|
+
include_fields: includeFields,
|
|
87
|
+
sort,
|
|
88
|
+
};
|
|
96
89
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
97
|
-
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (
|
|
98
|
-
const _response = yield ((
|
|
99
|
-
url: core.url.join((
|
|
90
|
+
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
91
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
92
|
+
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"),
|
|
100
93
|
method: "GET",
|
|
101
94
|
headers: _headers,
|
|
102
95
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
103
|
-
timeoutMs: ((
|
|
104
|
-
maxRetries: (
|
|
96
|
+
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,
|
|
97
|
+
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,
|
|
105
98
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
106
|
-
fetchFn: (
|
|
99
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
107
100
|
logging: this._options.logging,
|
|
108
101
|
});
|
|
109
102
|
if (_response.ok) {
|
|
@@ -81,44 +81,29 @@ class DeviceCredentialsClient {
|
|
|
81
81
|
list() {
|
|
82
82
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
83
83
|
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
84
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
84
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
85
85
|
const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true, fields, include_fields: includeFields, user_id: userId, client_id: clientId, type: type_, } = request;
|
|
86
|
-
const _queryParams = {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
if (fields !== undefined) {
|
|
97
|
-
_queryParams["fields"] = fields;
|
|
98
|
-
}
|
|
99
|
-
if (includeFields !== undefined) {
|
|
100
|
-
_queryParams["include_fields"] = (_d = includeFields === null || includeFields === void 0 ? void 0 : includeFields.toString()) !== null && _d !== void 0 ? _d : null;
|
|
101
|
-
}
|
|
102
|
-
if (userId !== undefined) {
|
|
103
|
-
_queryParams["user_id"] = userId;
|
|
104
|
-
}
|
|
105
|
-
if (clientId !== undefined) {
|
|
106
|
-
_queryParams["client_id"] = clientId;
|
|
107
|
-
}
|
|
108
|
-
if (type_ !== undefined) {
|
|
109
|
-
_queryParams["type"] = type_;
|
|
110
|
-
}
|
|
86
|
+
const _queryParams = {
|
|
87
|
+
page,
|
|
88
|
+
per_page: perPage,
|
|
89
|
+
include_totals: includeTotals,
|
|
90
|
+
fields,
|
|
91
|
+
include_fields: includeFields,
|
|
92
|
+
user_id: userId,
|
|
93
|
+
client_id: clientId,
|
|
94
|
+
type: type_ !== undefined ? type_ : undefined,
|
|
95
|
+
};
|
|
111
96
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
112
|
-
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (
|
|
113
|
-
const _response = yield ((
|
|
114
|
-
url: core.url.join((
|
|
97
|
+
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
98
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
99
|
+
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"),
|
|
115
100
|
method: "GET",
|
|
116
101
|
headers: _headers,
|
|
117
102
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
118
|
-
timeoutMs: ((
|
|
119
|
-
maxRetries: (
|
|
103
|
+
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,
|
|
104
|
+
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,
|
|
120
105
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
121
|
-
fetchFn: (
|
|
106
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
122
107
|
logging: this._options.logging,
|
|
123
108
|
});
|
|
124
109
|
if (_response.ok) {
|
|
@@ -78,26 +78,23 @@ class ProviderClient {
|
|
|
78
78
|
}
|
|
79
79
|
__get() {
|
|
80
80
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
81
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
81
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
82
82
|
const { fields, include_fields: includeFields } = request;
|
|
83
|
-
const _queryParams = {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
if (includeFields !== undefined) {
|
|
88
|
-
_queryParams["include_fields"] = (_a = includeFields === null || includeFields === void 0 ? void 0 : includeFields.toString()) !== null && _a !== void 0 ? _a : null;
|
|
89
|
-
}
|
|
83
|
+
const _queryParams = {
|
|
84
|
+
fields,
|
|
85
|
+
include_fields: includeFields,
|
|
86
|
+
};
|
|
90
87
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
91
|
-
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (
|
|
92
|
-
const _response = yield ((
|
|
93
|
-
url: core.url.join((
|
|
88
|
+
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
89
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
90
|
+
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"),
|
|
94
91
|
method: "GET",
|
|
95
92
|
headers: _headers,
|
|
96
93
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
97
|
-
timeoutMs: ((
|
|
98
|
-
maxRetries: (
|
|
94
|
+
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,
|
|
95
|
+
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,
|
|
99
96
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
100
|
-
fetchFn: (
|
|
97
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
101
98
|
logging: this._options.logging,
|
|
102
99
|
});
|
|
103
100
|
if (_response.ok) {
|
|
@@ -83,26 +83,23 @@ class EventStreamsClient {
|
|
|
83
83
|
list() {
|
|
84
84
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
85
85
|
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
86
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
86
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
87
87
|
const { from: from_, take = 50 } = request;
|
|
88
|
-
const _queryParams = {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
if (take !== undefined) {
|
|
93
|
-
_queryParams["take"] = (_a = take === null || take === void 0 ? void 0 : take.toString()) !== null && _a !== void 0 ? _a : null;
|
|
94
|
-
}
|
|
88
|
+
const _queryParams = {
|
|
89
|
+
from: from_,
|
|
90
|
+
take,
|
|
91
|
+
};
|
|
95
92
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
96
|
-
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (
|
|
97
|
-
const _response = yield ((
|
|
98
|
-
url: core.url.join((
|
|
93
|
+
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
94
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
95
|
+
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"),
|
|
99
96
|
method: "GET",
|
|
100
97
|
headers: _headers,
|
|
101
98
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
102
|
-
timeoutMs: ((
|
|
103
|
-
maxRetries: (
|
|
99
|
+
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,
|
|
100
|
+
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,
|
|
104
101
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
105
|
-
fetchFn: (
|
|
102
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
106
103
|
logging: this._options.logging,
|
|
107
104
|
});
|
|
108
105
|
if (_response.ok) {
|
package/dist/cjs/management/api/resources/eventStreams/resources/deliveries/client/Client.js
CHANGED
|
@@ -81,38 +81,27 @@ class DeliveriesClient {
|
|
|
81
81
|
}
|
|
82
82
|
__list(id_1) {
|
|
83
83
|
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
84
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
84
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
85
85
|
const { statuses, event_types: eventTypes, date_from: dateFrom, date_to: dateTo, from: from_, take = 50, } = request;
|
|
86
|
-
const _queryParams = {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
_queryParams["date_from"] = dateFrom;
|
|
95
|
-
}
|
|
96
|
-
if (dateTo !== undefined) {
|
|
97
|
-
_queryParams["date_to"] = dateTo;
|
|
98
|
-
}
|
|
99
|
-
if (from_ !== undefined) {
|
|
100
|
-
_queryParams["from"] = from_;
|
|
101
|
-
}
|
|
102
|
-
if (take !== undefined) {
|
|
103
|
-
_queryParams["take"] = (_a = take === null || take === void 0 ? void 0 : take.toString()) !== null && _a !== void 0 ? _a : null;
|
|
104
|
-
}
|
|
86
|
+
const _queryParams = {
|
|
87
|
+
statuses,
|
|
88
|
+
event_types: eventTypes,
|
|
89
|
+
date_from: dateFrom,
|
|
90
|
+
date_to: dateTo,
|
|
91
|
+
from: from_,
|
|
92
|
+
take,
|
|
93
|
+
};
|
|
105
94
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
106
|
-
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (
|
|
107
|
-
const _response = yield ((
|
|
108
|
-
url: core.url.join((
|
|
95
|
+
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
96
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
97
|
+
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`),
|
|
109
98
|
method: "GET",
|
|
110
99
|
headers: _headers,
|
|
111
100
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
112
|
-
timeoutMs: ((
|
|
113
|
-
maxRetries: (
|
|
101
|
+
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,
|
|
102
|
+
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,
|
|
114
103
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
115
|
-
fetchFn: (
|
|
104
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
116
105
|
logging: this._options.logging,
|
|
117
106
|
});
|
|
118
107
|
if (_response.ok) {
|
|
@@ -85,40 +85,30 @@ class FlowsClient {
|
|
|
85
85
|
list() {
|
|
86
86
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
87
87
|
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
88
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
88
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
89
89
|
const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true, hydrate, synchronous, } = request;
|
|
90
|
-
const _queryParams = {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if (Array.isArray(hydrate)) {
|
|
102
|
-
_queryParams["hydrate"] = hydrate.map((item) => item);
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
_queryParams["hydrate"] = hydrate;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
if (synchronous !== undefined) {
|
|
109
|
-
_queryParams["synchronous"] = (_d = synchronous === null || synchronous === void 0 ? void 0 : synchronous.toString()) !== null && _d !== void 0 ? _d : null;
|
|
110
|
-
}
|
|
90
|
+
const _queryParams = {
|
|
91
|
+
page,
|
|
92
|
+
per_page: perPage,
|
|
93
|
+
include_totals: includeTotals,
|
|
94
|
+
hydrate: Array.isArray(hydrate)
|
|
95
|
+
? hydrate.map((item) => item)
|
|
96
|
+
: hydrate !== undefined
|
|
97
|
+
? hydrate
|
|
98
|
+
: undefined,
|
|
99
|
+
synchronous,
|
|
100
|
+
};
|
|
111
101
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
112
|
-
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (
|
|
113
|
-
const _response = yield ((
|
|
114
|
-
url: core.url.join((
|
|
102
|
+
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
103
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
104
|
+
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"),
|
|
115
105
|
method: "GET",
|
|
116
106
|
headers: _headers,
|
|
117
107
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
118
|
-
timeoutMs: ((
|
|
119
|
-
maxRetries: (
|
|
108
|
+
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,
|
|
109
|
+
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,
|
|
120
110
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
121
|
-
fetchFn: (
|
|
111
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
122
112
|
logging: this._options.logging,
|
|
123
113
|
});
|
|
124
114
|
if (_response.ok) {
|
|
@@ -242,15 +232,9 @@ class FlowsClient {
|
|
|
242
232
|
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
243
233
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
244
234
|
const { hydrate } = request;
|
|
245
|
-
const _queryParams = {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
_queryParams["hydrate"] = hydrate.map((item) => item);
|
|
249
|
-
}
|
|
250
|
-
else {
|
|
251
|
-
_queryParams["hydrate"] = hydrate;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
235
|
+
const _queryParams = {
|
|
236
|
+
hydrate: Array.isArray(hydrate) ? hydrate.map((item) => item) : hydrate !== undefined ? hydrate : undefined,
|
|
237
|
+
};
|
|
254
238
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
255
239
|
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
256
240
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
@@ -74,26 +74,23 @@ class ExecutionsClient {
|
|
|
74
74
|
list(flow_id_1) {
|
|
75
75
|
return __awaiter(this, arguments, void 0, function* (flow_id, request = {}, requestOptions) {
|
|
76
76
|
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
77
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
77
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
78
78
|
const { from: from_, take = 50 } = request;
|
|
79
|
-
const _queryParams = {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
if (take !== undefined) {
|
|
84
|
-
_queryParams["take"] = (_a = take === null || take === void 0 ? void 0 : take.toString()) !== null && _a !== void 0 ? _a : null;
|
|
85
|
-
}
|
|
79
|
+
const _queryParams = {
|
|
80
|
+
from: from_,
|
|
81
|
+
take,
|
|
82
|
+
};
|
|
86
83
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
87
|
-
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (
|
|
88
|
-
const _response = yield ((
|
|
89
|
-
url: core.url.join((
|
|
84
|
+
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
85
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
86
|
+
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/${core.url.encodePathParam(flow_id)}/executions`),
|
|
90
87
|
method: "GET",
|
|
91
88
|
headers: _headers,
|
|
92
89
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
93
|
-
timeoutMs: ((
|
|
94
|
-
maxRetries: (
|
|
90
|
+
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,
|
|
91
|
+
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,
|
|
95
92
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
96
|
-
fetchFn: (
|
|
93
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
97
94
|
logging: this._options.logging,
|
|
98
95
|
});
|
|
99
96
|
if (_response.ok) {
|
|
@@ -155,15 +152,9 @@ class ExecutionsClient {
|
|
|
155
152
|
return __awaiter(this, arguments, void 0, function* (flow_id, execution_id, request = {}, requestOptions) {
|
|
156
153
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
157
154
|
const { hydrate } = request;
|
|
158
|
-
const _queryParams = {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
_queryParams["hydrate"] = hydrate.map((item) => item);
|
|
162
|
-
}
|
|
163
|
-
else {
|
|
164
|
-
_queryParams["hydrate"] = hydrate;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
155
|
+
const _queryParams = {
|
|
156
|
+
hydrate: Array.isArray(hydrate) ? hydrate.map((item) => item) : hydrate !== undefined ? hydrate : undefined,
|
|
157
|
+
};
|
|
167
158
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
168
159
|
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
169
160
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
@@ -74,29 +74,24 @@ class ConnectionsClient {
|
|
|
74
74
|
list() {
|
|
75
75
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
76
76
|
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
77
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
77
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
78
78
|
const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true } = request;
|
|
79
|
-
const _queryParams = {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
_queryParams["per_page"] = (_b = perPage === null || perPage === void 0 ? void 0 : perPage.toString()) !== null && _b !== void 0 ? _b : null;
|
|
85
|
-
}
|
|
86
|
-
if (includeTotals !== undefined) {
|
|
87
|
-
_queryParams["include_totals"] = (_c = includeTotals === null || includeTotals === void 0 ? void 0 : includeTotals.toString()) !== null && _c !== void 0 ? _c : null;
|
|
88
|
-
}
|
|
79
|
+
const _queryParams = {
|
|
80
|
+
page,
|
|
81
|
+
per_page: perPage,
|
|
82
|
+
include_totals: includeTotals,
|
|
83
|
+
};
|
|
89
84
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
90
|
-
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (
|
|
91
|
-
const _response = yield ((
|
|
92
|
-
url: core.url.join((
|
|
85
|
+
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
86
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
87
|
+
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/vault/connections"),
|
|
93
88
|
method: "GET",
|
|
94
89
|
headers: _headers,
|
|
95
90
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
96
|
-
timeoutMs: ((
|
|
97
|
-
maxRetries: (
|
|
91
|
+
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,
|
|
92
|
+
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,
|
|
98
93
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
99
|
-
fetchFn: (
|
|
94
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
100
95
|
logging: this._options.logging,
|
|
101
96
|
});
|
|
102
97
|
if (_response.ok) {
|