auth0 5.3.0 → 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 +50 -134
- package/dist/cjs/management/api/requests/requests.js +0 -108
- 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.d.ts +6 -3
- package/dist/cjs/management/api/resources/actions/resources/modules/resources/versions/client/Client.js +65 -45
- 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.d.ts +2 -2
- package/dist/cjs/management/api/resources/actions/resources/versions/client/Client.js +13 -16
- 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.d.ts +2 -2
- package/dist/cjs/management/api/resources/flows/client/Client.js +22 -38
- package/dist/cjs/management/api/resources/flows/index.d.ts +0 -1
- package/dist/cjs/management/api/resources/flows/index.js +0 -1
- package/dist/cjs/management/api/resources/flows/resources/executions/client/Client.d.ts +4 -4
- package/dist/cjs/management/api/resources/flows/resources/executions/client/Client.js +16 -25
- package/dist/cjs/management/api/resources/flows/resources/executions/index.d.ts +0 -1
- package/dist/cjs/management/api/resources/flows/resources/executions/index.js +0 -1
- package/dist/cjs/management/api/resources/flows/resources/index.d.ts +0 -1
- package/dist/cjs/management/api/resources/flows/resources/index.js +0 -4
- 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/index.d.ts +0 -1
- package/dist/cjs/management/api/resources/index.js +0 -1
- 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 +5257 -4642
- package/dist/cjs/management/api/types/types.js +457 -431
- 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 +50 -134
- package/dist/esm/management/api/requests/requests.mjs +1 -107
- 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.d.mts +6 -3
- package/dist/esm/management/api/resources/actions/resources/modules/resources/versions/client/Client.mjs +65 -45
- 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.d.mts +2 -2
- package/dist/esm/management/api/resources/actions/resources/versions/client/Client.mjs +13 -16
- 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.d.mts +2 -2
- package/dist/esm/management/api/resources/flows/client/Client.mjs +22 -38
- package/dist/esm/management/api/resources/flows/index.d.mts +0 -1
- package/dist/esm/management/api/resources/flows/index.mjs +0 -1
- package/dist/esm/management/api/resources/flows/resources/executions/client/Client.d.mts +4 -4
- package/dist/esm/management/api/resources/flows/resources/executions/client/Client.mjs +16 -25
- package/dist/esm/management/api/resources/flows/resources/executions/index.d.mts +0 -1
- package/dist/esm/management/api/resources/flows/resources/executions/index.mjs +0 -1
- package/dist/esm/management/api/resources/flows/resources/index.d.mts +0 -1
- package/dist/esm/management/api/resources/flows/resources/index.mjs +0 -1
- 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/index.d.mts +0 -1
- package/dist/esm/management/api/resources/index.mjs +0 -1
- 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 +5257 -4642
- package/dist/esm/management/api/types/types.mjs +447 -421
- 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 +302 -124
- package/dist/cjs/management/api/resources/flows/resources/executions/types/index.d.ts +0 -1
- package/dist/cjs/management/api/resources/flows/resources/executions/types/index.js +0 -17
- package/dist/cjs/management/api/resources/flows/resources/executions/types/types.d.ts +0 -4
- package/dist/cjs/management/api/resources/flows/resources/executions/types/types.js +0 -7
- package/dist/cjs/management/api/resources/flows/types/index.d.ts +0 -1
- package/dist/cjs/management/api/resources/flows/types/index.js +0 -17
- package/dist/cjs/management/api/resources/flows/types/types.d.ts +0 -4
- package/dist/cjs/management/api/resources/flows/types/types.js +0 -7
- package/dist/esm/management/api/resources/flows/resources/executions/types/index.d.mts +0 -1
- package/dist/esm/management/api/resources/flows/resources/executions/types/index.mjs +0 -1
- package/dist/esm/management/api/resources/flows/resources/executions/types/types.d.mts +0 -4
- package/dist/esm/management/api/resources/flows/resources/executions/types/types.mjs +0 -4
- package/dist/esm/management/api/resources/flows/types/index.d.mts +0 -1
- package/dist/esm/management/api/resources/flows/types/index.mjs +0 -1
- package/dist/esm/management/api/resources/flows/types/types.d.mts +0 -4
- package/dist/esm/management/api/resources/flows/types/types.mjs +0 -4
|
@@ -59,6 +59,7 @@ class VersionsClient {
|
|
|
59
59
|
* List all published versions of a specific Actions Module.
|
|
60
60
|
*
|
|
61
61
|
* @param {string} id - The unique ID of the module.
|
|
62
|
+
* @param {Management.GetActionModuleVersionsRequestParameters} request
|
|
62
63
|
* @param {VersionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
64
|
*
|
|
64
65
|
* @throws {@link Management.BadRequestError}
|
|
@@ -68,54 +69,73 @@ class VersionsClient {
|
|
|
68
69
|
* @throws {@link Management.TooManyRequestsError}
|
|
69
70
|
*
|
|
70
71
|
* @example
|
|
71
|
-
* await client.actions.modules.versions.list("id"
|
|
72
|
+
* await client.actions.modules.versions.list("id", {
|
|
73
|
+
* page: 1,
|
|
74
|
+
* per_page: 1
|
|
75
|
+
* })
|
|
72
76
|
*/
|
|
73
|
-
list(
|
|
74
|
-
return
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
82
|
-
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, `actions/modules/${core.url.encodePathParam(id)}/versions`),
|
|
83
|
-
method: "GET",
|
|
84
|
-
headers: _headers,
|
|
85
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
86
|
-
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,
|
|
87
|
-
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,
|
|
88
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
89
|
-
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
90
|
-
logging: this._options.logging,
|
|
91
|
-
});
|
|
92
|
-
if (_response.ok) {
|
|
93
|
-
return {
|
|
94
|
-
data: _response.body,
|
|
95
|
-
rawResponse: _response.rawResponse,
|
|
77
|
+
list(id_1) {
|
|
78
|
+
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
79
|
+
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
81
|
+
const { page = 0, per_page: perPage = 50 } = request;
|
|
82
|
+
const _queryParams = {
|
|
83
|
+
page,
|
|
84
|
+
per_page: perPage,
|
|
96
85
|
};
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
});
|
|
86
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
87
|
+
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);
|
|
88
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
89
|
+
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, `actions/modules/${core.url.encodePathParam(id)}/versions`),
|
|
90
|
+
method: "GET",
|
|
91
|
+
headers: _headers,
|
|
92
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
93
|
+
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,
|
|
94
|
+
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
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
96
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
97
|
+
logging: this._options.logging,
|
|
98
|
+
});
|
|
99
|
+
if (_response.ok) {
|
|
100
|
+
return {
|
|
101
|
+
data: _response.body,
|
|
102
|
+
rawResponse: _response.rawResponse,
|
|
103
|
+
};
|
|
116
104
|
}
|
|
117
|
-
|
|
118
|
-
|
|
105
|
+
if (_response.error.reason === "status-code") {
|
|
106
|
+
switch (_response.error.statusCode) {
|
|
107
|
+
case 400:
|
|
108
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
109
|
+
case 401:
|
|
110
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
111
|
+
case 403:
|
|
112
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
113
|
+
case 404:
|
|
114
|
+
throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
|
|
115
|
+
case 429:
|
|
116
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
117
|
+
default:
|
|
118
|
+
throw new errors.ManagementError({
|
|
119
|
+
statusCode: _response.error.statusCode,
|
|
120
|
+
body: _response.error.body,
|
|
121
|
+
rawResponse: _response.rawResponse,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/actions/modules/{id}/versions");
|
|
126
|
+
}));
|
|
127
|
+
let _offset = (request === null || request === void 0 ? void 0 : request.page) != null ? request === null || request === void 0 ? void 0 : request.page : 0;
|
|
128
|
+
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
129
|
+
return new core.Page({
|
|
130
|
+
response: dataWithRawResponse.data,
|
|
131
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
132
|
+
hasNextPage: (response) => { var _a, _b; return ((_a = response === null || response === void 0 ? void 0 : response.versions) !== null && _a !== void 0 ? _a : []).length >= Math.floor((_b = request === null || request === void 0 ? void 0 : request.per_page) !== null && _b !== void 0 ? _b : 50); },
|
|
133
|
+
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.versions) !== null && _a !== void 0 ? _a : []; },
|
|
134
|
+
loadPage: (_response) => {
|
|
135
|
+
_offset += 1;
|
|
136
|
+
return list(core.setObjectProperty(request, "page", _offset));
|
|
137
|
+
},
|
|
138
|
+
});
|
|
119
139
|
});
|
|
120
140
|
}
|
|
121
141
|
/**
|
|
@@ -76,26 +76,23 @@ class BindingsClient {
|
|
|
76
76
|
list(triggerId_1) {
|
|
77
77
|
return __awaiter(this, arguments, void 0, function* (triggerId, request = {}, requestOptions) {
|
|
78
78
|
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
79
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
79
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
80
80
|
const { page = 0, per_page: perPage = 50 } = request;
|
|
81
|
-
const _queryParams = {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
if (perPage !== undefined) {
|
|
86
|
-
_queryParams["per_page"] = (_b = perPage === null || perPage === void 0 ? void 0 : perPage.toString()) !== null && _b !== void 0 ? _b : null;
|
|
87
|
-
}
|
|
81
|
+
const _queryParams = {
|
|
82
|
+
page,
|
|
83
|
+
per_page: perPage,
|
|
84
|
+
};
|
|
88
85
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
89
|
-
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (
|
|
90
|
-
const _response = yield ((
|
|
91
|
-
url: core.url.join((
|
|
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);
|
|
87
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
88
|
+
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, `actions/triggers/${core.url.encodePathParam(triggerId)}/bindings`),
|
|
92
89
|
method: "GET",
|
|
93
90
|
headers: _headers,
|
|
94
91
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
95
|
-
timeoutMs: ((
|
|
96
|
-
maxRetries: (
|
|
92
|
+
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,
|
|
93
|
+
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,
|
|
97
94
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
98
|
-
fetchFn: (
|
|
95
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
99
96
|
logging: this._options.logging,
|
|
100
97
|
});
|
|
101
98
|
if (_response.ok) {
|
|
@@ -52,7 +52,7 @@ export declare class VersionsClient {
|
|
|
52
52
|
*
|
|
53
53
|
* @param {string} actionId - The ID of an action.
|
|
54
54
|
* @param {string} id - The ID of an action version.
|
|
55
|
-
* @param {Management.DeployActionVersionRequestContent |
|
|
55
|
+
* @param {Management.DeployActionVersionRequestContent | null} request
|
|
56
56
|
* @param {VersionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
57
|
*
|
|
58
58
|
* @throws {@link Management.BadRequestError}
|
|
@@ -63,6 +63,6 @@ export declare class VersionsClient {
|
|
|
63
63
|
* @example
|
|
64
64
|
* await client.actions.versions.deploy("actionId", "id")
|
|
65
65
|
*/
|
|
66
|
-
deploy(actionId: string, id: string, request?: Management.DeployActionVersionRequestContent |
|
|
66
|
+
deploy(actionId: string, id: string, request?: Management.DeployActionVersionRequestContent | null, requestOptions?: VersionsClient.RequestOptions): core.HttpResponsePromise<Management.DeployActionVersionResponseContent>;
|
|
67
67
|
private __deploy;
|
|
68
68
|
}
|
|
@@ -76,26 +76,23 @@ class VersionsClient {
|
|
|
76
76
|
list(actionId_1) {
|
|
77
77
|
return __awaiter(this, arguments, void 0, function* (actionId, request = {}, requestOptions) {
|
|
78
78
|
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
79
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
79
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
80
80
|
const { page = 0, per_page: perPage = 50 } = request;
|
|
81
|
-
const _queryParams = {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
if (perPage !== undefined) {
|
|
86
|
-
_queryParams["per_page"] = (_b = perPage === null || perPage === void 0 ? void 0 : perPage.toString()) !== null && _b !== void 0 ? _b : null;
|
|
87
|
-
}
|
|
81
|
+
const _queryParams = {
|
|
82
|
+
page,
|
|
83
|
+
per_page: perPage,
|
|
84
|
+
};
|
|
88
85
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
89
|
-
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (
|
|
90
|
-
const _response = yield ((
|
|
91
|
-
url: core.url.join((
|
|
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);
|
|
87
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
88
|
+
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, `actions/actions/${core.url.encodePathParam(actionId)}/versions`),
|
|
92
89
|
method: "GET",
|
|
93
90
|
headers: _headers,
|
|
94
91
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
95
|
-
timeoutMs: ((
|
|
96
|
-
maxRetries: (
|
|
92
|
+
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,
|
|
93
|
+
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,
|
|
97
94
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
98
|
-
fetchFn: (
|
|
95
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
99
96
|
logging: this._options.logging,
|
|
100
97
|
});
|
|
101
98
|
if (_response.ok) {
|
|
@@ -207,7 +204,7 @@ class VersionsClient {
|
|
|
207
204
|
*
|
|
208
205
|
* @param {string} actionId - The ID of an action.
|
|
209
206
|
* @param {string} id - The ID of an action version.
|
|
210
|
-
* @param {Management.DeployActionVersionRequestContent |
|
|
207
|
+
* @param {Management.DeployActionVersionRequestContent | null} request
|
|
211
208
|
* @param {VersionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
212
209
|
*
|
|
213
210
|
* @throws {@link Management.BadRequestError}
|
|
@@ -233,7 +230,7 @@ class VersionsClient {
|
|
|
233
230
|
contentType: "application/json",
|
|
234
231
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
235
232
|
requestType: "json",
|
|
236
|
-
body: request
|
|
233
|
+
body: request,
|
|
237
234
|
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,
|
|
238
235
|
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,
|
|
239
236
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -76,23 +76,22 @@ class ProvidersClient {
|
|
|
76
76
|
}
|
|
77
77
|
__list() {
|
|
78
78
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
79
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
79
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
80
80
|
const { disabled } = request;
|
|
81
|
-
const _queryParams = {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
81
|
+
const _queryParams = {
|
|
82
|
+
disabled,
|
|
83
|
+
};
|
|
85
84
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
86
|
-
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (
|
|
87
|
-
const _response = yield ((
|
|
88
|
-
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, "branding/phone/providers"),
|
|
89
88
|
method: "GET",
|
|
90
89
|
headers: _headers,
|
|
91
90
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
92
|
-
timeoutMs: ((
|
|
93
|
-
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,
|
|
94
93
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
95
|
-
fetchFn: (
|
|
94
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
96
95
|
logging: this._options.logging,
|
|
97
96
|
});
|
|
98
97
|
if (_response.ok) {
|
|
@@ -74,23 +74,22 @@ class TemplatesClient {
|
|
|
74
74
|
}
|
|
75
75
|
__list() {
|
|
76
76
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
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 { disabled } = request;
|
|
79
|
-
const _queryParams = {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
79
|
+
const _queryParams = {
|
|
80
|
+
disabled,
|
|
81
|
+
};
|
|
83
82
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
84
|
-
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (
|
|
85
|
-
const _response = yield ((
|
|
86
|
-
url: core.url.join((
|
|
83
|
+
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);
|
|
84
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
85
|
+
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, "branding/phone/templates"),
|
|
87
86
|
method: "GET",
|
|
88
87
|
headers: _headers,
|
|
89
88
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
90
|
-
timeoutMs: ((
|
|
91
|
-
maxRetries: (
|
|
89
|
+
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,
|
|
90
|
+
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,
|
|
92
91
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
93
|
-
fetchFn: (
|
|
92
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
94
93
|
logging: this._options.logging,
|
|
95
94
|
});
|
|
96
95
|
if (_response.ok) {
|
|
@@ -83,38 +83,27 @@ class ClientGrantsClient {
|
|
|
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, audience, client_id: clientId, allow_any_organization: allowAnyOrganization, subject_type: subjectType, } = request;
|
|
88
|
-
const _queryParams = {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
_queryParams["audience"] = audience;
|
|
97
|
-
}
|
|
98
|
-
if (clientId !== undefined) {
|
|
99
|
-
_queryParams["client_id"] = clientId;
|
|
100
|
-
}
|
|
101
|
-
if (allowAnyOrganization !== undefined) {
|
|
102
|
-
_queryParams["allow_any_organization"] = (_b = allowAnyOrganization === null || allowAnyOrganization === void 0 ? void 0 : allowAnyOrganization.toString()) !== null && _b !== void 0 ? _b : null;
|
|
103
|
-
}
|
|
104
|
-
if (subjectType !== undefined) {
|
|
105
|
-
_queryParams["subject_type"] = subjectType;
|
|
106
|
-
}
|
|
88
|
+
const _queryParams = {
|
|
89
|
+
from: from_,
|
|
90
|
+
take,
|
|
91
|
+
audience,
|
|
92
|
+
client_id: clientId,
|
|
93
|
+
allow_any_organization: allowAnyOrganization,
|
|
94
|
+
subject_type: subjectType !== undefined ? subjectType : undefined,
|
|
95
|
+
};
|
|
107
96
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
108
|
-
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (
|
|
109
|
-
const _response = yield ((
|
|
110
|
-
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, "client-grants"),
|
|
111
100
|
method: "GET",
|
|
112
101
|
headers: _headers,
|
|
113
102
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
114
|
-
timeoutMs: ((
|
|
115
|
-
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,
|
|
116
105
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
117
|
-
fetchFn: (
|
|
106
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
118
107
|
logging: this._options.logging,
|
|
119
108
|
});
|
|
120
109
|
if (_response.ok) {
|
package/dist/cjs/management/api/resources/clientGrants/resources/organizations/client/Client.js
CHANGED
|
@@ -74,26 +74,23 @@ class OrganizationsClient {
|
|
|
74
74
|
list(id_1) {
|
|
75
75
|
return __awaiter(this, arguments, void 0, function* (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, `client-grants/${core.url.encodePathParam(id)}/organizations`),
|
|
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) {
|
|
@@ -124,47 +124,30 @@ class ClientsClient {
|
|
|
124
124
|
list() {
|
|
125
125
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
126
126
|
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
127
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
127
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
128
128
|
const { fields, include_fields: includeFields, page = 0, per_page: perPage = 50, include_totals: includeTotals = true, is_global: isGlobal, is_first_party: isFirstParty, app_type: appType, q, } = request;
|
|
129
|
-
const _queryParams = {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
_queryParams["per_page"] = (_c = perPage === null || perPage === void 0 ? void 0 : perPage.toString()) !== null && _c !== void 0 ? _c : null;
|
|
141
|
-
}
|
|
142
|
-
if (includeTotals !== undefined) {
|
|
143
|
-
_queryParams["include_totals"] = (_d = includeTotals === null || includeTotals === void 0 ? void 0 : includeTotals.toString()) !== null && _d !== void 0 ? _d : null;
|
|
144
|
-
}
|
|
145
|
-
if (isGlobal !== undefined) {
|
|
146
|
-
_queryParams["is_global"] = (_e = isGlobal === null || isGlobal === void 0 ? void 0 : isGlobal.toString()) !== null && _e !== void 0 ? _e : null;
|
|
147
|
-
}
|
|
148
|
-
if (isFirstParty !== undefined) {
|
|
149
|
-
_queryParams["is_first_party"] = (_f = isFirstParty === null || isFirstParty === void 0 ? void 0 : isFirstParty.toString()) !== null && _f !== void 0 ? _f : null;
|
|
150
|
-
}
|
|
151
|
-
if (appType !== undefined) {
|
|
152
|
-
_queryParams["app_type"] = appType;
|
|
153
|
-
}
|
|
154
|
-
if (q !== undefined) {
|
|
155
|
-
_queryParams["q"] = q;
|
|
156
|
-
}
|
|
129
|
+
const _queryParams = {
|
|
130
|
+
fields,
|
|
131
|
+
include_fields: includeFields,
|
|
132
|
+
page,
|
|
133
|
+
per_page: perPage,
|
|
134
|
+
include_totals: includeTotals,
|
|
135
|
+
is_global: isGlobal,
|
|
136
|
+
is_first_party: isFirstParty,
|
|
137
|
+
app_type: appType,
|
|
138
|
+
q,
|
|
139
|
+
};
|
|
157
140
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
158
|
-
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (
|
|
159
|
-
const _response = yield ((
|
|
160
|
-
url: core.url.join((
|
|
141
|
+
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);
|
|
142
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
143
|
+
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, "clients"),
|
|
161
144
|
method: "GET",
|
|
162
145
|
headers: _headers,
|
|
163
146
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
164
|
-
timeoutMs: ((
|
|
165
|
-
maxRetries: (
|
|
147
|
+
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,
|
|
148
|
+
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,
|
|
166
149
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
167
|
-
fetchFn: (
|
|
150
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
168
151
|
logging: this._options.logging,
|
|
169
152
|
});
|
|
170
153
|
if (_response.ok) {
|
|
@@ -342,26 +325,23 @@ class ClientsClient {
|
|
|
342
325
|
}
|
|
343
326
|
__get(id_1) {
|
|
344
327
|
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
345
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
328
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
346
329
|
const { fields, include_fields: includeFields } = request;
|
|
347
|
-
const _queryParams = {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
}
|
|
351
|
-
if (includeFields !== undefined) {
|
|
352
|
-
_queryParams["include_fields"] = (_a = includeFields === null || includeFields === void 0 ? void 0 : includeFields.toString()) !== null && _a !== void 0 ? _a : null;
|
|
353
|
-
}
|
|
330
|
+
const _queryParams = {
|
|
331
|
+
fields,
|
|
332
|
+
include_fields: includeFields,
|
|
333
|
+
};
|
|
354
334
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
355
|
-
let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (
|
|
356
|
-
const _response = yield ((
|
|
357
|
-
url: core.url.join((
|
|
335
|
+
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);
|
|
336
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
337
|
+
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, `clients/${core.url.encodePathParam(id)}`),
|
|
358
338
|
method: "GET",
|
|
359
339
|
headers: _headers,
|
|
360
340
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
361
|
-
timeoutMs: ((
|
|
362
|
-
maxRetries: (
|
|
341
|
+
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,
|
|
342
|
+
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,
|
|
363
343
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
364
|
-
fetchFn: (
|
|
344
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
365
345
|
logging: this._options.logging,
|
|
366
346
|
});
|
|
367
347
|
if (_response.ok) {
|