auth0 5.5.0 → 5.6.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/Client.d.ts +12 -0
- package/dist/cjs/management/Client.js +67 -0
- package/dist/cjs/management/api/requests/requests.d.ts +140 -22
- package/dist/cjs/management/api/resources/actions/client/Client.d.ts +2 -2
- package/dist/cjs/management/api/resources/actions/client/Client.js +3 -3
- package/dist/cjs/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.d.ts +2 -2
- package/dist/cjs/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.js +2 -2
- package/dist/cjs/management/api/resources/clientGrants/client/Client.d.ts +0 -1
- package/dist/cjs/management/api/resources/clientGrants/client/Client.js +0 -1
- package/dist/cjs/management/api/resources/clients/client/Client.d.ts +46 -0
- package/dist/cjs/management/api/resources/clients/client/Client.js +146 -1
- package/dist/cjs/management/api/resources/customDomains/client/Client.d.ts +30 -0
- package/dist/cjs/management/api/resources/customDomains/client/Client.js +115 -0
- package/dist/cjs/management/api/resources/groups/client/Client.d.ts +16 -0
- package/dist/cjs/management/api/resources/groups/client/Client.js +57 -0
- package/dist/cjs/management/api/resources/networkAcls/client/Client.d.ts +0 -2
- package/dist/cjs/management/api/resources/networkAcls/client/Client.js +0 -2
- package/dist/cjs/management/api/resources/organizations/client/Client.d.ts +3 -0
- package/dist/cjs/management/api/resources/organizations/client/Client.js +13 -8
- package/dist/cjs/management/api/resources/organizations/resources/connections/client/Client.d.ts +95 -0
- package/dist/cjs/management/api/resources/organizations/resources/connections/client/Client.js +383 -0
- package/dist/cjs/management/api/resources/organizations/resources/connections/client/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/connections/client/index.js +2 -0
- package/dist/cjs/management/api/resources/organizations/resources/connections/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/connections/index.js +17 -0
- package/dist/cjs/management/api/resources/organizations/resources/discoveryDomains/client/Client.d.ts +3 -1
- package/dist/cjs/management/api/resources/organizations/resources/discoveryDomains/client/Client.js +3 -1
- package/dist/cjs/management/api/resources/organizations/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/index.js +2 -1
- package/dist/cjs/management/api/resources/refreshTokens/client/Client.d.ts +23 -0
- package/dist/cjs/management/api/resources/refreshTokens/client/Client.js +88 -0
- package/dist/cjs/management/api/types/types.d.ts +492 -292
- package/dist/cjs/management/api/types/types.js +96 -103
- package/dist/cjs/management/core/auth/BasicAuth.d.ts +2 -2
- package/dist/cjs/management/core/auth/BasicAuth.js +7 -1
- package/dist/cjs/management/core/fetcher/BinaryResponse.d.ts +1 -1
- package/dist/cjs/management/core/fetcher/Fetcher.d.ts +2 -0
- package/dist/cjs/management/core/fetcher/Fetcher.js +5 -1
- package/dist/cjs/management/core/fetcher/index.d.ts +2 -0
- package/dist/cjs/management/core/fetcher/index.js +3 -1
- package/dist/cjs/management/core/fetcher/makePassthroughRequest.d.ts +49 -0
- package/dist/cjs/management/core/fetcher/makePassthroughRequest.js +135 -0
- package/dist/cjs/management/core/fetcher/makeRequest.d.ts +6 -1
- package/dist/cjs/management/core/fetcher/makeRequest.js +30 -9
- package/dist/cjs/management/core/pagination/Page.d.ts +1 -1
- package/dist/cjs/management/core/pagination/index.d.ts +0 -1
- package/dist/cjs/management/core/pagination/index.js +1 -4
- package/dist/cjs/management/core/runtime/runtime.js +8 -7
- package/dist/cjs/management/errors/ManagementError.d.ts +3 -1
- package/dist/cjs/management/errors/ManagementError.js +4 -1
- package/dist/cjs/management/errors/ManagementTimeoutError.d.ts +4 -1
- package/dist/cjs/management/errors/ManagementTimeoutError.js +4 -1
- package/dist/cjs/management/errors/handleNonStatusCodeError.js +4 -1
- package/dist/cjs/management/version.d.ts +1 -1
- package/dist/cjs/management/version.js +1 -1
- package/dist/esm/management/Client.d.mts +12 -0
- package/dist/esm/management/Client.mjs +34 -0
- package/dist/esm/management/api/requests/requests.d.mts +140 -22
- package/dist/esm/management/api/resources/actions/client/Client.d.mts +2 -2
- package/dist/esm/management/api/resources/actions/client/Client.mjs +3 -3
- package/dist/esm/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.d.mts +2 -2
- package/dist/esm/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.mjs +2 -2
- package/dist/esm/management/api/resources/clientGrants/client/Client.d.mts +0 -1
- package/dist/esm/management/api/resources/clientGrants/client/Client.mjs +0 -1
- package/dist/esm/management/api/resources/clients/client/Client.d.mts +46 -0
- package/dist/esm/management/api/resources/clients/client/Client.mjs +146 -1
- package/dist/esm/management/api/resources/customDomains/client/Client.d.mts +30 -0
- package/dist/esm/management/api/resources/customDomains/client/Client.mjs +115 -0
- package/dist/esm/management/api/resources/groups/client/Client.d.mts +16 -0
- package/dist/esm/management/api/resources/groups/client/Client.mjs +57 -0
- package/dist/esm/management/api/resources/networkAcls/client/Client.d.mts +0 -2
- package/dist/esm/management/api/resources/networkAcls/client/Client.mjs +0 -2
- package/dist/esm/management/api/resources/organizations/client/Client.d.mts +3 -0
- package/dist/esm/management/api/resources/organizations/client/Client.mjs +5 -0
- package/dist/esm/management/api/resources/organizations/resources/connections/client/Client.d.mts +95 -0
- package/dist/esm/management/api/resources/organizations/resources/connections/client/Client.mjs +346 -0
- package/dist/esm/management/api/resources/organizations/resources/connections/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/connections/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizations/resources/connections/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/connections/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizations/resources/discoveryDomains/client/Client.d.mts +3 -1
- package/dist/esm/management/api/resources/organizations/resources/discoveryDomains/client/Client.mjs +3 -1
- package/dist/esm/management/api/resources/organizations/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/refreshTokens/client/Client.d.mts +23 -0
- package/dist/esm/management/api/resources/refreshTokens/client/Client.mjs +88 -0
- package/dist/esm/management/api/types/types.d.mts +492 -292
- package/dist/esm/management/api/types/types.mjs +86 -93
- package/dist/esm/management/core/auth/BasicAuth.d.mts +2 -2
- package/dist/esm/management/core/auth/BasicAuth.mjs +7 -1
- package/dist/esm/management/core/fetcher/BinaryResponse.d.mts +1 -1
- package/dist/esm/management/core/fetcher/Fetcher.d.mts +2 -0
- package/dist/esm/management/core/fetcher/Fetcher.mjs +5 -1
- package/dist/esm/management/core/fetcher/index.d.mts +2 -0
- package/dist/esm/management/core/fetcher/index.mjs +1 -0
- package/dist/esm/management/core/fetcher/makePassthroughRequest.d.mts +49 -0
- package/dist/esm/management/core/fetcher/makePassthroughRequest.mjs +132 -0
- package/dist/esm/management/core/fetcher/makeRequest.d.mts +6 -1
- package/dist/esm/management/core/fetcher/makeRequest.mjs +28 -9
- package/dist/esm/management/core/pagination/Page.d.mts +1 -1
- package/dist/esm/management/core/pagination/index.d.mts +0 -1
- package/dist/esm/management/core/pagination/index.mjs +0 -1
- package/dist/esm/management/core/runtime/runtime.mjs +8 -7
- package/dist/esm/management/errors/ManagementError.d.mts +3 -1
- package/dist/esm/management/errors/ManagementError.mjs +4 -1
- package/dist/esm/management/errors/ManagementTimeoutError.d.mts +4 -1
- package/dist/esm/management/errors/ManagementTimeoutError.mjs +4 -1
- package/dist/esm/management/errors/handleNonStatusCodeError.mjs +4 -1
- package/dist/esm/management/version.d.mts +1 -1
- package/dist/esm/management/version.mjs +1 -1
- package/package.json +5 -6
- package/reference.md +752 -30
- package/dist/cjs/management/core/pagination/CustomPager.d.ts +0 -67
- package/dist/cjs/management/core/pagination/CustomPager.js +0 -194
- package/dist/esm/management/core/pagination/CustomPager.d.mts +0 -67
- package/dist/esm/management/core/pagination/CustomPager.mjs +0 -189
package/dist/esm/management/api/resources/organizations/resources/connections/client/Client.mjs
ADDED
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
12
|
+
import * as core from "../../../../../../core/index.mjs";
|
|
13
|
+
import { mergeHeaders } from "../../../../../../core/headers.mjs";
|
|
14
|
+
import * as environments from "../../../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
|
+
import * as errors from "../../../../../../errors/index.mjs";
|
|
17
|
+
import * as Management from "../../../../../index.mjs";
|
|
18
|
+
export class ConnectionsClient {
|
|
19
|
+
constructor(options) {
|
|
20
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @param {string} id - Organization identifier.
|
|
24
|
+
* @param {Management.ListOrganizationAllConnectionsRequestParameters} request
|
|
25
|
+
* @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
|
+
*
|
|
27
|
+
* @throws {@link Management.BadRequestError}
|
|
28
|
+
* @throws {@link Management.UnauthorizedError}
|
|
29
|
+
* @throws {@link Management.ForbiddenError}
|
|
30
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* await client.organizations.connections.list("id", {
|
|
34
|
+
* page: 1,
|
|
35
|
+
* per_page: 1,
|
|
36
|
+
* include_totals: true,
|
|
37
|
+
* is_enabled: true
|
|
38
|
+
* })
|
|
39
|
+
*/
|
|
40
|
+
list(id_1) {
|
|
41
|
+
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
42
|
+
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
44
|
+
const { page = 0, per_page: perPage = 50, include_totals: includeTotals = true, is_enabled: isEnabled, } = request;
|
|
45
|
+
const _queryParams = {
|
|
46
|
+
page,
|
|
47
|
+
per_page: perPage,
|
|
48
|
+
include_totals: includeTotals,
|
|
49
|
+
is_enabled: isEnabled,
|
|
50
|
+
};
|
|
51
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
52
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
53
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
54
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, `organizations/${core.url.encodePathParam(id)}/connections`),
|
|
55
|
+
method: "GET",
|
|
56
|
+
headers: _headers,
|
|
57
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
58
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
59
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
60
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
61
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
62
|
+
logging: this._options.logging,
|
|
63
|
+
});
|
|
64
|
+
if (_response.ok) {
|
|
65
|
+
return {
|
|
66
|
+
data: _response.body,
|
|
67
|
+
rawResponse: _response.rawResponse,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
if (_response.error.reason === "status-code") {
|
|
71
|
+
switch (_response.error.statusCode) {
|
|
72
|
+
case 400:
|
|
73
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
74
|
+
case 401:
|
|
75
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
76
|
+
case 403:
|
|
77
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
78
|
+
case 429:
|
|
79
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
80
|
+
default:
|
|
81
|
+
throw new errors.ManagementError({
|
|
82
|
+
statusCode: _response.error.statusCode,
|
|
83
|
+
body: _response.error.body,
|
|
84
|
+
rawResponse: _response.rawResponse,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/organizations/{id}/connections");
|
|
89
|
+
}));
|
|
90
|
+
let _offset = (request === null || request === void 0 ? void 0 : request.page) != null ? request === null || request === void 0 ? void 0 : request.page : 0;
|
|
91
|
+
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
92
|
+
return new core.Page({
|
|
93
|
+
response: dataWithRawResponse.data,
|
|
94
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
95
|
+
hasNextPage: (response) => { var _a, _b; return ((_a = response === null || response === void 0 ? void 0 : response.connections) !== 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); },
|
|
96
|
+
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.connections) !== null && _a !== void 0 ? _a : []; },
|
|
97
|
+
loadPage: (_response) => {
|
|
98
|
+
_offset += 1;
|
|
99
|
+
return list(core.setObjectProperty(request, "page", _offset));
|
|
100
|
+
},
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* @param {string} id - Organization identifier.
|
|
106
|
+
* @param {Management.CreateOrganizationAllConnectionRequestParameters} request
|
|
107
|
+
* @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
108
|
+
*
|
|
109
|
+
* @throws {@link Management.BadRequestError}
|
|
110
|
+
* @throws {@link Management.UnauthorizedError}
|
|
111
|
+
* @throws {@link Management.ForbiddenError}
|
|
112
|
+
* @throws {@link Management.ConflictError}
|
|
113
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* await client.organizations.connections.create("id", {
|
|
117
|
+
* connection_id: "connection_id"
|
|
118
|
+
* })
|
|
119
|
+
*/
|
|
120
|
+
create(id, request, requestOptions) {
|
|
121
|
+
return core.HttpResponsePromise.fromPromise(this.__create(id, request, requestOptions));
|
|
122
|
+
}
|
|
123
|
+
__create(id, request, requestOptions) {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
126
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
127
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
128
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
129
|
+
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, `organizations/${core.url.encodePathParam(id)}/connections`),
|
|
130
|
+
method: "POST",
|
|
131
|
+
headers: _headers,
|
|
132
|
+
contentType: "application/json",
|
|
133
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
134
|
+
requestType: "json",
|
|
135
|
+
body: request,
|
|
136
|
+
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,
|
|
137
|
+
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,
|
|
138
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
139
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
140
|
+
logging: this._options.logging,
|
|
141
|
+
});
|
|
142
|
+
if (_response.ok) {
|
|
143
|
+
return {
|
|
144
|
+
data: _response.body,
|
|
145
|
+
rawResponse: _response.rawResponse,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
if (_response.error.reason === "status-code") {
|
|
149
|
+
switch (_response.error.statusCode) {
|
|
150
|
+
case 400:
|
|
151
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
152
|
+
case 401:
|
|
153
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
154
|
+
case 403:
|
|
155
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
156
|
+
case 409:
|
|
157
|
+
throw new Management.ConflictError(_response.error.body, _response.rawResponse);
|
|
158
|
+
case 429:
|
|
159
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
160
|
+
default:
|
|
161
|
+
throw new errors.ManagementError({
|
|
162
|
+
statusCode: _response.error.statusCode,
|
|
163
|
+
body: _response.error.body,
|
|
164
|
+
rawResponse: _response.rawResponse,
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/organizations/{id}/connections");
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* @param {string} id - Organization identifier.
|
|
173
|
+
* @param {string} connection_id - Connection identifier.
|
|
174
|
+
* @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
175
|
+
*
|
|
176
|
+
* @throws {@link Management.UnauthorizedError}
|
|
177
|
+
* @throws {@link Management.ForbiddenError}
|
|
178
|
+
* @throws {@link Management.NotFoundError}
|
|
179
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
180
|
+
*
|
|
181
|
+
* @example
|
|
182
|
+
* await client.organizations.connections.get("id", "connection_id")
|
|
183
|
+
*/
|
|
184
|
+
get(id, connection_id, requestOptions) {
|
|
185
|
+
return core.HttpResponsePromise.fromPromise(this.__get(id, connection_id, requestOptions));
|
|
186
|
+
}
|
|
187
|
+
__get(id, connection_id, requestOptions) {
|
|
188
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
189
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
190
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
191
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
192
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
193
|
+
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, `organizations/${core.url.encodePathParam(id)}/connections/${core.url.encodePathParam(connection_id)}`),
|
|
194
|
+
method: "GET",
|
|
195
|
+
headers: _headers,
|
|
196
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
197
|
+
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,
|
|
198
|
+
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,
|
|
199
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
200
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
201
|
+
logging: this._options.logging,
|
|
202
|
+
});
|
|
203
|
+
if (_response.ok) {
|
|
204
|
+
return {
|
|
205
|
+
data: _response.body,
|
|
206
|
+
rawResponse: _response.rawResponse,
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
if (_response.error.reason === "status-code") {
|
|
210
|
+
switch (_response.error.statusCode) {
|
|
211
|
+
case 401:
|
|
212
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
213
|
+
case 403:
|
|
214
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
215
|
+
case 404:
|
|
216
|
+
throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
|
|
217
|
+
case 429:
|
|
218
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
219
|
+
default:
|
|
220
|
+
throw new errors.ManagementError({
|
|
221
|
+
statusCode: _response.error.statusCode,
|
|
222
|
+
body: _response.error.body,
|
|
223
|
+
rawResponse: _response.rawResponse,
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/organizations/{id}/connections/{connection_id}");
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* @param {string} id - Organization identifier.
|
|
232
|
+
* @param {string} connection_id - Connection identifier.
|
|
233
|
+
* @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
234
|
+
*
|
|
235
|
+
* @throws {@link Management.UnauthorizedError}
|
|
236
|
+
* @throws {@link Management.ForbiddenError}
|
|
237
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* await client.organizations.connections.delete("id", "connection_id")
|
|
241
|
+
*/
|
|
242
|
+
delete(id, connection_id, requestOptions) {
|
|
243
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(id, connection_id, requestOptions));
|
|
244
|
+
}
|
|
245
|
+
__delete(id, connection_id, requestOptions) {
|
|
246
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
247
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
248
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
249
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
250
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
251
|
+
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, `organizations/${core.url.encodePathParam(id)}/connections/${core.url.encodePathParam(connection_id)}`),
|
|
252
|
+
method: "DELETE",
|
|
253
|
+
headers: _headers,
|
|
254
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
255
|
+
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,
|
|
256
|
+
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,
|
|
257
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
258
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
259
|
+
logging: this._options.logging,
|
|
260
|
+
});
|
|
261
|
+
if (_response.ok) {
|
|
262
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
263
|
+
}
|
|
264
|
+
if (_response.error.reason === "status-code") {
|
|
265
|
+
switch (_response.error.statusCode) {
|
|
266
|
+
case 401:
|
|
267
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
268
|
+
case 403:
|
|
269
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
270
|
+
case 429:
|
|
271
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
272
|
+
default:
|
|
273
|
+
throw new errors.ManagementError({
|
|
274
|
+
statusCode: _response.error.statusCode,
|
|
275
|
+
body: _response.error.body,
|
|
276
|
+
rawResponse: _response.rawResponse,
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/organizations/{id}/connections/{connection_id}");
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* @param {string} id - Organization identifier.
|
|
285
|
+
* @param {string} connection_id - Connection identifier.
|
|
286
|
+
* @param {Management.UpdateOrganizationConnectionRequestParameters} request
|
|
287
|
+
* @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
288
|
+
*
|
|
289
|
+
* @throws {@link Management.BadRequestError}
|
|
290
|
+
* @throws {@link Management.UnauthorizedError}
|
|
291
|
+
* @throws {@link Management.ForbiddenError}
|
|
292
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
293
|
+
*
|
|
294
|
+
* @example
|
|
295
|
+
* await client.organizations.connections.update("id", "connection_id")
|
|
296
|
+
*/
|
|
297
|
+
update(id, connection_id, request = {}, requestOptions) {
|
|
298
|
+
return core.HttpResponsePromise.fromPromise(this.__update(id, connection_id, request, requestOptions));
|
|
299
|
+
}
|
|
300
|
+
__update(id_1, connection_id_1) {
|
|
301
|
+
return __awaiter(this, arguments, void 0, function* (id, connection_id, request = {}, requestOptions) {
|
|
302
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
303
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
304
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
305
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
306
|
+
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, `organizations/${core.url.encodePathParam(id)}/connections/${core.url.encodePathParam(connection_id)}`),
|
|
307
|
+
method: "PATCH",
|
|
308
|
+
headers: _headers,
|
|
309
|
+
contentType: "application/json",
|
|
310
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
311
|
+
requestType: "json",
|
|
312
|
+
body: request,
|
|
313
|
+
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,
|
|
314
|
+
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,
|
|
315
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
316
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
317
|
+
logging: this._options.logging,
|
|
318
|
+
});
|
|
319
|
+
if (_response.ok) {
|
|
320
|
+
return {
|
|
321
|
+
data: _response.body,
|
|
322
|
+
rawResponse: _response.rawResponse,
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
if (_response.error.reason === "status-code") {
|
|
326
|
+
switch (_response.error.statusCode) {
|
|
327
|
+
case 400:
|
|
328
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
329
|
+
case 401:
|
|
330
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
331
|
+
case 403:
|
|
332
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
333
|
+
case 429:
|
|
334
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
335
|
+
default:
|
|
336
|
+
throw new errors.ManagementError({
|
|
337
|
+
statusCode: _response.error.statusCode,
|
|
338
|
+
body: _response.error.body,
|
|
339
|
+
rawResponse: _response.rawResponse,
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/organizations/{id}/connections/{connection_id}");
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
}
|
package/dist/esm/management/api/resources/organizations/resources/connections/client/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/management/api/resources/organizations/resources/connections/client/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -12,6 +12,7 @@ export declare class DiscoveryDomainsClient {
|
|
|
12
12
|
constructor(options: DiscoveryDomainsClient.Options);
|
|
13
13
|
/**
|
|
14
14
|
* Retrieve list of all organization discovery domains associated with the specified organization.
|
|
15
|
+
* This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response.
|
|
15
16
|
*
|
|
16
17
|
* @param {string} id - ID of the organization.
|
|
17
18
|
* @param {Management.ListOrganizationDiscoveryDomainsRequestParameters} request
|
|
@@ -53,7 +54,7 @@ export declare class DiscoveryDomainsClient {
|
|
|
53
54
|
private __create;
|
|
54
55
|
/**
|
|
55
56
|
* Retrieve details about a single organization discovery domain specified by domain name.
|
|
56
|
-
*
|
|
57
|
+
* This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response.
|
|
57
58
|
*
|
|
58
59
|
* @param {string} id - ID of the organization.
|
|
59
60
|
* @param {string} discovery_domain - Domain name of the discovery domain.
|
|
@@ -72,6 +73,7 @@ export declare class DiscoveryDomainsClient {
|
|
|
72
73
|
private __getByName;
|
|
73
74
|
/**
|
|
74
75
|
* Retrieve details about a single organization discovery domain specified by ID.
|
|
76
|
+
* This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response.
|
|
75
77
|
*
|
|
76
78
|
* @param {string} id - ID of the organization.
|
|
77
79
|
* @param {string} discovery_domain_id - ID of the discovery domain.
|
package/dist/esm/management/api/resources/organizations/resources/discoveryDomains/client/Client.mjs
CHANGED
|
@@ -21,6 +21,7 @@ export class DiscoveryDomainsClient {
|
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Retrieve list of all organization discovery domains associated with the specified organization.
|
|
24
|
+
* This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response.
|
|
24
25
|
*
|
|
25
26
|
* @param {string} id - ID of the organization.
|
|
26
27
|
* @param {Management.ListOrganizationDiscoveryDomainsRequestParameters} request
|
|
@@ -174,7 +175,7 @@ export class DiscoveryDomainsClient {
|
|
|
174
175
|
}
|
|
175
176
|
/**
|
|
176
177
|
* Retrieve details about a single organization discovery domain specified by domain name.
|
|
177
|
-
*
|
|
178
|
+
* This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response.
|
|
178
179
|
*
|
|
179
180
|
* @param {string} id - ID of the organization.
|
|
180
181
|
* @param {string} discovery_domain - Domain name of the discovery domain.
|
|
@@ -239,6 +240,7 @@ export class DiscoveryDomainsClient {
|
|
|
239
240
|
}
|
|
240
241
|
/**
|
|
241
242
|
* Retrieve details about a single organization discovery domain specified by ID.
|
|
243
|
+
* This endpoint is subject to eventual consistency; newly created, updated, or deleted discovery domains may not immediately appear in the response.
|
|
242
244
|
*
|
|
243
245
|
* @param {string} id - ID of the organization.
|
|
244
246
|
* @param {string} discovery_domain_id - ID of the discovery domain.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * as clientGrants from "./clientGrants/index.mjs";
|
|
2
|
+
export * as connections from "./connections/index.mjs";
|
|
2
3
|
export * as discoveryDomains from "./discoveryDomains/index.mjs";
|
|
3
4
|
export * as enabledConnections from "./enabledConnections/index.mjs";
|
|
4
5
|
export * as invitations from "./invitations/index.mjs";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * as clientGrants from "./clientGrants/index.mjs";
|
|
2
|
+
export * as connections from "./connections/index.mjs";
|
|
2
3
|
export * as discoveryDomains from "./discoveryDomains/index.mjs";
|
|
3
4
|
export * as enabledConnections from "./enabledConnections/index.mjs";
|
|
4
5
|
export * as invitations from "./invitations/index.mjs";
|
|
@@ -10,6 +10,29 @@ export declare namespace RefreshTokensClient {
|
|
|
10
10
|
export declare class RefreshTokensClient {
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<RefreshTokensClient.Options>;
|
|
12
12
|
constructor(options: RefreshTokensClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Retrieve a paginated list of refresh tokens for a specific user, with optional filtering by client ID. Results are sorted by credential_id ascending.
|
|
15
|
+
*
|
|
16
|
+
* @param {Management.GetRefreshTokensRequestParameters} request
|
|
17
|
+
* @param {RefreshTokensClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link Management.BadRequestError}
|
|
20
|
+
* @throws {@link Management.UnauthorizedError}
|
|
21
|
+
* @throws {@link Management.ForbiddenError}
|
|
22
|
+
* @throws {@link Management.NotFoundError}
|
|
23
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* await client.refreshTokens.list({
|
|
27
|
+
* user_id: "user_id",
|
|
28
|
+
* client_id: "client_id",
|
|
29
|
+
* from: "from",
|
|
30
|
+
* take: 1,
|
|
31
|
+
* fields: "fields",
|
|
32
|
+
* include_fields: true
|
|
33
|
+
* })
|
|
34
|
+
*/
|
|
35
|
+
list(request: Management.GetRefreshTokensRequestParameters, requestOptions?: RefreshTokensClient.RequestOptions): Promise<core.Page<Management.RefreshTokenResponseContent, Management.GetRefreshTokensPaginatedResponseContent>>;
|
|
13
36
|
/**
|
|
14
37
|
* Retrieve refresh token information.
|
|
15
38
|
*
|
|
@@ -19,6 +19,94 @@ export class RefreshTokensClient {
|
|
|
19
19
|
constructor(options) {
|
|
20
20
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Retrieve a paginated list of refresh tokens for a specific user, with optional filtering by client ID. Results are sorted by credential_id ascending.
|
|
24
|
+
*
|
|
25
|
+
* @param {Management.GetRefreshTokensRequestParameters} request
|
|
26
|
+
* @param {RefreshTokensClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
|
+
*
|
|
28
|
+
* @throws {@link Management.BadRequestError}
|
|
29
|
+
* @throws {@link Management.UnauthorizedError}
|
|
30
|
+
* @throws {@link Management.ForbiddenError}
|
|
31
|
+
* @throws {@link Management.NotFoundError}
|
|
32
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* await client.refreshTokens.list({
|
|
36
|
+
* user_id: "user_id",
|
|
37
|
+
* client_id: "client_id",
|
|
38
|
+
* from: "from",
|
|
39
|
+
* take: 1,
|
|
40
|
+
* fields: "fields",
|
|
41
|
+
* include_fields: true
|
|
42
|
+
* })
|
|
43
|
+
*/
|
|
44
|
+
list(request, requestOptions) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
48
|
+
const { user_id: userId, client_id: clientId, from: from_, take = 50, fields, include_fields: includeFields, } = request;
|
|
49
|
+
const _queryParams = {
|
|
50
|
+
user_id: userId,
|
|
51
|
+
client_id: clientId,
|
|
52
|
+
from: from_,
|
|
53
|
+
take,
|
|
54
|
+
fields,
|
|
55
|
+
include_fields: includeFields,
|
|
56
|
+
};
|
|
57
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
58
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
59
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
60
|
+
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, "refresh-tokens"),
|
|
61
|
+
method: "GET",
|
|
62
|
+
headers: _headers,
|
|
63
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
64
|
+
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,
|
|
65
|
+
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,
|
|
66
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
67
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
68
|
+
logging: this._options.logging,
|
|
69
|
+
});
|
|
70
|
+
if (_response.ok) {
|
|
71
|
+
return {
|
|
72
|
+
data: _response.body,
|
|
73
|
+
rawResponse: _response.rawResponse,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
if (_response.error.reason === "status-code") {
|
|
77
|
+
switch (_response.error.statusCode) {
|
|
78
|
+
case 400:
|
|
79
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
80
|
+
case 401:
|
|
81
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
82
|
+
case 403:
|
|
83
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
84
|
+
case 404:
|
|
85
|
+
throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
|
|
86
|
+
case 429:
|
|
87
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
88
|
+
default:
|
|
89
|
+
throw new errors.ManagementError({
|
|
90
|
+
statusCode: _response.error.statusCode,
|
|
91
|
+
body: _response.error.body,
|
|
92
|
+
rawResponse: _response.rawResponse,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/refresh-tokens");
|
|
97
|
+
}));
|
|
98
|
+
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
99
|
+
return new core.Page({
|
|
100
|
+
response: dataWithRawResponse.data,
|
|
101
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
102
|
+
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) === ""),
|
|
103
|
+
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.refresh_tokens) !== null && _a !== void 0 ? _a : []; },
|
|
104
|
+
loadPage: (response) => {
|
|
105
|
+
return list(core.setObjectProperty(request, "from", response === null || response === void 0 ? void 0 : response.next));
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
}
|
|
22
110
|
/**
|
|
23
111
|
* Retrieve refresh token information.
|
|
24
112
|
*
|