auth0 5.5.0 → 5.7.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.
Files changed (124) hide show
  1. package/dist/cjs/management/Client.d.ts +12 -0
  2. package/dist/cjs/management/Client.js +67 -0
  3. package/dist/cjs/management/api/requests/requests.d.ts +181 -24
  4. package/dist/cjs/management/api/resources/actions/client/Client.d.ts +2 -2
  5. package/dist/cjs/management/api/resources/actions/client/Client.js +3 -3
  6. package/dist/cjs/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.d.ts +2 -2
  7. package/dist/cjs/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.js +2 -2
  8. package/dist/cjs/management/api/resources/clientGrants/client/Client.d.ts +2 -2
  9. package/dist/cjs/management/api/resources/clientGrants/client/Client.js +4 -3
  10. package/dist/cjs/management/api/resources/clients/client/Client.d.ts +46 -0
  11. package/dist/cjs/management/api/resources/clients/client/Client.js +146 -1
  12. package/dist/cjs/management/api/resources/connections/resources/directoryProvisioning/client/Client.d.ts +43 -0
  13. package/dist/cjs/management/api/resources/connections/resources/directoryProvisioning/client/Client.js +152 -0
  14. package/dist/cjs/management/api/resources/customDomains/client/Client.d.ts +30 -0
  15. package/dist/cjs/management/api/resources/customDomains/client/Client.js +115 -0
  16. package/dist/cjs/management/api/resources/eventStreams/client/Client.d.ts +1 -1
  17. package/dist/cjs/management/api/resources/eventStreams/client/Client.js +1 -1
  18. package/dist/cjs/management/api/resources/groups/client/Client.d.ts +16 -0
  19. package/dist/cjs/management/api/resources/groups/client/Client.js +57 -0
  20. package/dist/cjs/management/api/resources/networkAcls/client/Client.d.ts +0 -2
  21. package/dist/cjs/management/api/resources/networkAcls/client/Client.js +0 -2
  22. package/dist/cjs/management/api/resources/organizations/client/Client.d.ts +3 -0
  23. package/dist/cjs/management/api/resources/organizations/client/Client.js +13 -8
  24. package/dist/cjs/management/api/resources/organizations/resources/connections/client/Client.d.ts +95 -0
  25. package/dist/cjs/management/api/resources/organizations/resources/connections/client/Client.js +383 -0
  26. package/dist/cjs/management/api/resources/organizations/resources/connections/client/index.d.ts +1 -0
  27. package/dist/cjs/management/api/resources/organizations/resources/connections/client/index.js +2 -0
  28. package/dist/cjs/management/api/resources/organizations/resources/connections/index.d.ts +1 -0
  29. package/dist/cjs/management/api/resources/organizations/resources/connections/index.js +17 -0
  30. package/dist/cjs/management/api/resources/organizations/resources/discoveryDomains/client/Client.d.ts +3 -1
  31. package/dist/cjs/management/api/resources/organizations/resources/discoveryDomains/client/Client.js +3 -1
  32. package/dist/cjs/management/api/resources/organizations/resources/index.d.ts +1 -0
  33. package/dist/cjs/management/api/resources/organizations/resources/index.js +2 -1
  34. package/dist/cjs/management/api/resources/refreshTokens/client/Client.d.ts +23 -0
  35. package/dist/cjs/management/api/resources/refreshTokens/client/Client.js +88 -0
  36. package/dist/cjs/management/api/types/types.d.ts +673 -322
  37. package/dist/cjs/management/api/types/types.js +180 -134
  38. package/dist/cjs/management/core/auth/BasicAuth.d.ts +2 -2
  39. package/dist/cjs/management/core/auth/BasicAuth.js +7 -1
  40. package/dist/cjs/management/core/fetcher/BinaryResponse.d.ts +1 -1
  41. package/dist/cjs/management/core/fetcher/Fetcher.d.ts +2 -0
  42. package/dist/cjs/management/core/fetcher/Fetcher.js +5 -1
  43. package/dist/cjs/management/core/fetcher/index.d.ts +2 -0
  44. package/dist/cjs/management/core/fetcher/index.js +3 -1
  45. package/dist/cjs/management/core/fetcher/makePassthroughRequest.d.ts +49 -0
  46. package/dist/cjs/management/core/fetcher/makePassthroughRequest.js +135 -0
  47. package/dist/cjs/management/core/fetcher/makeRequest.d.ts +6 -1
  48. package/dist/cjs/management/core/fetcher/makeRequest.js +30 -9
  49. package/dist/cjs/management/core/pagination/Page.d.ts +1 -1
  50. package/dist/cjs/management/core/pagination/index.d.ts +0 -1
  51. package/dist/cjs/management/core/pagination/index.js +1 -4
  52. package/dist/cjs/management/core/runtime/runtime.js +8 -7
  53. package/dist/cjs/management/errors/ManagementError.d.ts +3 -1
  54. package/dist/cjs/management/errors/ManagementError.js +4 -1
  55. package/dist/cjs/management/errors/ManagementTimeoutError.d.ts +4 -1
  56. package/dist/cjs/management/errors/ManagementTimeoutError.js +4 -1
  57. package/dist/cjs/management/errors/handleNonStatusCodeError.js +4 -1
  58. package/dist/cjs/management/version.d.ts +1 -1
  59. package/dist/cjs/management/version.js +1 -1
  60. package/dist/esm/management/Client.d.mts +12 -0
  61. package/dist/esm/management/Client.mjs +34 -0
  62. package/dist/esm/management/api/requests/requests.d.mts +181 -24
  63. package/dist/esm/management/api/resources/actions/client/Client.d.mts +2 -2
  64. package/dist/esm/management/api/resources/actions/client/Client.mjs +3 -3
  65. package/dist/esm/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.d.mts +2 -2
  66. package/dist/esm/management/api/resources/actions/resources/triggers/resources/bindings/client/Client.mjs +2 -2
  67. package/dist/esm/management/api/resources/clientGrants/client/Client.d.mts +2 -2
  68. package/dist/esm/management/api/resources/clientGrants/client/Client.mjs +4 -3
  69. package/dist/esm/management/api/resources/clients/client/Client.d.mts +46 -0
  70. package/dist/esm/management/api/resources/clients/client/Client.mjs +146 -1
  71. package/dist/esm/management/api/resources/connections/resources/directoryProvisioning/client/Client.d.mts +43 -0
  72. package/dist/esm/management/api/resources/connections/resources/directoryProvisioning/client/Client.mjs +152 -0
  73. package/dist/esm/management/api/resources/customDomains/client/Client.d.mts +30 -0
  74. package/dist/esm/management/api/resources/customDomains/client/Client.mjs +115 -0
  75. package/dist/esm/management/api/resources/eventStreams/client/Client.d.mts +1 -1
  76. package/dist/esm/management/api/resources/eventStreams/client/Client.mjs +1 -1
  77. package/dist/esm/management/api/resources/groups/client/Client.d.mts +16 -0
  78. package/dist/esm/management/api/resources/groups/client/Client.mjs +57 -0
  79. package/dist/esm/management/api/resources/networkAcls/client/Client.d.mts +0 -2
  80. package/dist/esm/management/api/resources/networkAcls/client/Client.mjs +0 -2
  81. package/dist/esm/management/api/resources/organizations/client/Client.d.mts +3 -0
  82. package/dist/esm/management/api/resources/organizations/client/Client.mjs +5 -0
  83. package/dist/esm/management/api/resources/organizations/resources/connections/client/Client.d.mts +95 -0
  84. package/dist/esm/management/api/resources/organizations/resources/connections/client/Client.mjs +346 -0
  85. package/dist/esm/management/api/resources/organizations/resources/connections/client/index.d.mts +1 -0
  86. package/dist/esm/management/api/resources/organizations/resources/connections/client/index.mjs +1 -0
  87. package/dist/esm/management/api/resources/organizations/resources/connections/index.d.mts +1 -0
  88. package/dist/esm/management/api/resources/organizations/resources/connections/index.mjs +1 -0
  89. package/dist/esm/management/api/resources/organizations/resources/discoveryDomains/client/Client.d.mts +3 -1
  90. package/dist/esm/management/api/resources/organizations/resources/discoveryDomains/client/Client.mjs +3 -1
  91. package/dist/esm/management/api/resources/organizations/resources/index.d.mts +1 -0
  92. package/dist/esm/management/api/resources/organizations/resources/index.mjs +1 -0
  93. package/dist/esm/management/api/resources/refreshTokens/client/Client.d.mts +23 -0
  94. package/dist/esm/management/api/resources/refreshTokens/client/Client.mjs +88 -0
  95. package/dist/esm/management/api/types/types.d.mts +673 -322
  96. package/dist/esm/management/api/types/types.mjs +170 -124
  97. package/dist/esm/management/core/auth/BasicAuth.d.mts +2 -2
  98. package/dist/esm/management/core/auth/BasicAuth.mjs +7 -1
  99. package/dist/esm/management/core/fetcher/BinaryResponse.d.mts +1 -1
  100. package/dist/esm/management/core/fetcher/Fetcher.d.mts +2 -0
  101. package/dist/esm/management/core/fetcher/Fetcher.mjs +5 -1
  102. package/dist/esm/management/core/fetcher/index.d.mts +2 -0
  103. package/dist/esm/management/core/fetcher/index.mjs +1 -0
  104. package/dist/esm/management/core/fetcher/makePassthroughRequest.d.mts +49 -0
  105. package/dist/esm/management/core/fetcher/makePassthroughRequest.mjs +132 -0
  106. package/dist/esm/management/core/fetcher/makeRequest.d.mts +6 -1
  107. package/dist/esm/management/core/fetcher/makeRequest.mjs +28 -9
  108. package/dist/esm/management/core/pagination/Page.d.mts +1 -1
  109. package/dist/esm/management/core/pagination/index.d.mts +0 -1
  110. package/dist/esm/management/core/pagination/index.mjs +0 -1
  111. package/dist/esm/management/core/runtime/runtime.mjs +8 -7
  112. package/dist/esm/management/errors/ManagementError.d.mts +3 -1
  113. package/dist/esm/management/errors/ManagementError.mjs +4 -1
  114. package/dist/esm/management/errors/ManagementTimeoutError.d.mts +4 -1
  115. package/dist/esm/management/errors/ManagementTimeoutError.mjs +4 -1
  116. package/dist/esm/management/errors/handleNonStatusCodeError.mjs +4 -1
  117. package/dist/esm/management/version.d.mts +1 -1
  118. package/dist/esm/management/version.mjs +1 -1
  119. package/package.json +5 -6
  120. package/reference.md +958 -68
  121. package/dist/cjs/management/core/pagination/CustomPager.d.ts +0 -67
  122. package/dist/cjs/management/core/pagination/CustomPager.js +0 -194
  123. package/dist/esm/management/core/pagination/CustomPager.d.mts +0 -67
  124. package/dist/esm/management/core/pagination/CustomPager.mjs +0 -189
@@ -46,7 +46,6 @@ export declare class NetworkAclsClient {
46
46
  * await client.networkAcls.create({
47
47
  * description: "description",
48
48
  * active: true,
49
- * priority: 1.1,
50
49
  * rule: {
51
50
  * action: {},
52
51
  * scope: "management"
@@ -88,7 +87,6 @@ export declare class NetworkAclsClient {
88
87
  * await client.networkAcls.set("id", {
89
88
  * description: "description",
90
89
  * active: true,
91
- * priority: 1.1,
92
90
  * rule: {
93
91
  * action: {},
94
92
  * scope: "management"
@@ -117,7 +117,6 @@ export class NetworkAclsClient {
117
117
  * await client.networkAcls.create({
118
118
  * description: "description",
119
119
  * active: true,
120
- * priority: 1.1,
121
120
  * rule: {
122
121
  * action: {},
123
122
  * scope: "management"
@@ -251,7 +250,6 @@ export class NetworkAclsClient {
251
250
  * await client.networkAcls.set("id", {
252
251
  * description: "description",
253
252
  * active: true,
254
- * priority: 1.1,
255
253
  * rule: {
256
254
  * action: {},
257
255
  * scope: "management"
@@ -3,6 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import * as Management from "../../../index.mjs";
5
5
  import { ClientGrantsClient } from "../resources/clientGrants/client/Client.mjs";
6
+ import { ConnectionsClient } from "../resources/connections/client/Client.mjs";
6
7
  import { DiscoveryDomainsClient } from "../resources/discoveryDomains/client/Client.mjs";
7
8
  import { EnabledConnectionsClient } from "../resources/enabledConnections/client/Client.mjs";
8
9
  import { InvitationsClient } from "../resources/invitations/client/Client.mjs";
@@ -15,12 +16,14 @@ export declare namespace OrganizationsClient {
15
16
  export declare class OrganizationsClient {
16
17
  protected readonly _options: NormalizedClientOptionsWithAuth<OrganizationsClient.Options>;
17
18
  protected _clientGrants: ClientGrantsClient | undefined;
19
+ protected _connections: ConnectionsClient | undefined;
18
20
  protected _discoveryDomains: DiscoveryDomainsClient | undefined;
19
21
  protected _enabledConnections: EnabledConnectionsClient | undefined;
20
22
  protected _invitations: InvitationsClient | undefined;
21
23
  protected _members: MembersClient | undefined;
22
24
  constructor(options: OrganizationsClient.Options);
23
25
  get clientGrants(): ClientGrantsClient;
26
+ get connections(): ConnectionsClient;
24
27
  get discoveryDomains(): DiscoveryDomainsClient;
25
28
  get enabledConnections(): EnabledConnectionsClient;
26
29
  get invitations(): InvitationsClient;
@@ -16,6 +16,7 @@ import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCode
16
16
  import * as errors from "../../../../errors/index.mjs";
17
17
  import * as Management from "../../../index.mjs";
18
18
  import { ClientGrantsClient } from "../resources/clientGrants/client/Client.mjs";
19
+ import { ConnectionsClient } from "../resources/connections/client/Client.mjs";
19
20
  import { DiscoveryDomainsClient } from "../resources/discoveryDomains/client/Client.mjs";
20
21
  import { EnabledConnectionsClient } from "../resources/enabledConnections/client/Client.mjs";
21
22
  import { InvitationsClient } from "../resources/invitations/client/Client.mjs";
@@ -28,6 +29,10 @@ export class OrganizationsClient {
28
29
  var _a;
29
30
  return ((_a = this._clientGrants) !== null && _a !== void 0 ? _a : (this._clientGrants = new ClientGrantsClient(this._options)));
30
31
  }
32
+ get connections() {
33
+ var _a;
34
+ return ((_a = this._connections) !== null && _a !== void 0 ? _a : (this._connections = new ConnectionsClient(this._options)));
35
+ }
31
36
  get discoveryDomains() {
32
37
  var _a;
33
38
  return ((_a = this._discoveryDomains) !== null && _a !== void 0 ? _a : (this._discoveryDomains = new DiscoveryDomainsClient(this._options)));
@@ -0,0 +1,95 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
3
+ import * as core from "../../../../../../core/index.mjs";
4
+ import * as Management from "../../../../../index.mjs";
5
+ export declare namespace ConnectionsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class ConnectionsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<ConnectionsClient.Options>;
12
+ constructor(options: ConnectionsClient.Options);
13
+ /**
14
+ * @param {string} id - Organization identifier.
15
+ * @param {Management.ListOrganizationAllConnectionsRequestParameters} request
16
+ * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
17
+ *
18
+ * @throws {@link Management.BadRequestError}
19
+ * @throws {@link Management.UnauthorizedError}
20
+ * @throws {@link Management.ForbiddenError}
21
+ * @throws {@link Management.TooManyRequestsError}
22
+ *
23
+ * @example
24
+ * await client.organizations.connections.list("id", {
25
+ * page: 1,
26
+ * per_page: 1,
27
+ * include_totals: true,
28
+ * is_enabled: true
29
+ * })
30
+ */
31
+ list(id: string, request?: Management.ListOrganizationAllConnectionsRequestParameters, requestOptions?: ConnectionsClient.RequestOptions): Promise<core.Page<Management.OrganizationAllConnectionPost, Management.ListOrganizationAllConnectionsOffsetPaginatedResponseContent>>;
32
+ /**
33
+ * @param {string} id - Organization identifier.
34
+ * @param {Management.CreateOrganizationAllConnectionRequestParameters} request
35
+ * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
36
+ *
37
+ * @throws {@link Management.BadRequestError}
38
+ * @throws {@link Management.UnauthorizedError}
39
+ * @throws {@link Management.ForbiddenError}
40
+ * @throws {@link Management.ConflictError}
41
+ * @throws {@link Management.TooManyRequestsError}
42
+ *
43
+ * @example
44
+ * await client.organizations.connections.create("id", {
45
+ * connection_id: "connection_id"
46
+ * })
47
+ */
48
+ create(id: string, request: Management.CreateOrganizationAllConnectionRequestParameters, requestOptions?: ConnectionsClient.RequestOptions): core.HttpResponsePromise<Management.CreateOrganizationAllConnectionResponseContent>;
49
+ private __create;
50
+ /**
51
+ * @param {string} id - Organization identifier.
52
+ * @param {string} connection_id - Connection identifier.
53
+ * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
54
+ *
55
+ * @throws {@link Management.UnauthorizedError}
56
+ * @throws {@link Management.ForbiddenError}
57
+ * @throws {@link Management.NotFoundError}
58
+ * @throws {@link Management.TooManyRequestsError}
59
+ *
60
+ * @example
61
+ * await client.organizations.connections.get("id", "connection_id")
62
+ */
63
+ get(id: string, connection_id: string, requestOptions?: ConnectionsClient.RequestOptions): core.HttpResponsePromise<Management.GetOrganizationAllConnectionResponseContent>;
64
+ private __get;
65
+ /**
66
+ * @param {string} id - Organization identifier.
67
+ * @param {string} connection_id - Connection identifier.
68
+ * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
69
+ *
70
+ * @throws {@link Management.UnauthorizedError}
71
+ * @throws {@link Management.ForbiddenError}
72
+ * @throws {@link Management.TooManyRequestsError}
73
+ *
74
+ * @example
75
+ * await client.organizations.connections.delete("id", "connection_id")
76
+ */
77
+ delete(id: string, connection_id: string, requestOptions?: ConnectionsClient.RequestOptions): core.HttpResponsePromise<void>;
78
+ private __delete;
79
+ /**
80
+ * @param {string} id - Organization identifier.
81
+ * @param {string} connection_id - Connection identifier.
82
+ * @param {Management.UpdateOrganizationConnectionRequestParameters} request
83
+ * @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
84
+ *
85
+ * @throws {@link Management.BadRequestError}
86
+ * @throws {@link Management.UnauthorizedError}
87
+ * @throws {@link Management.ForbiddenError}
88
+ * @throws {@link Management.TooManyRequestsError}
89
+ *
90
+ * @example
91
+ * await client.organizations.connections.update("id", "connection_id")
92
+ */
93
+ update(id: string, connection_id: string, request?: Management.UpdateOrganizationConnectionRequestParameters, requestOptions?: ConnectionsClient.RequestOptions): core.HttpResponsePromise<Management.UpdateOrganizationAllConnectionResponseContent>;
94
+ private __update;
95
+ }
@@ -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
+ }
@@ -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.
@@ -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
  *