auth0 6.3.0 → 7.0.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 (160) hide show
  1. package/README.md +20 -15
  2. package/dist/cjs/index.d.ts +0 -2
  3. package/dist/cjs/index.js +0 -2
  4. package/dist/cjs/lib/errors.d.ts +0 -18
  5. package/dist/cjs/lib/errors.js +1 -25
  6. package/dist/cjs/lib/middleware/auth0-client-telemetry.d.ts +3 -7
  7. package/dist/cjs/lib/middleware/auth0-client-telemetry.js +1 -25
  8. package/dist/cjs/lib/models.d.ts +0 -24
  9. package/dist/cjs/lib/models.js +0 -53
  10. package/dist/cjs/management/Client.d.ts +3 -0
  11. package/dist/cjs/management/Client.js +45 -40
  12. package/dist/cjs/management/api/errors/UnprocessableEntityError.d.ts +5 -0
  13. package/dist/cjs/management/api/errors/UnprocessableEntityError.js +54 -0
  14. package/dist/cjs/management/api/errors/index.d.ts +1 -0
  15. package/dist/cjs/management/api/errors/index.js +1 -0
  16. package/dist/cjs/management/api/requests/requests.d.ts +91 -0
  17. package/dist/cjs/management/api/resources/connections/client/Client.d.ts +2 -0
  18. package/dist/cjs/management/api/resources/connections/client/Client.js +6 -0
  19. package/dist/cjs/management/api/resources/connections/resources/scimConfiguration/client/Client.d.ts +1 -0
  20. package/dist/cjs/management/api/resources/connections/resources/scimConfiguration/client/Client.js +3 -0
  21. package/dist/cjs/management/api/resources/index.d.ts +1 -0
  22. package/dist/cjs/management/api/resources/index.js +2 -1
  23. package/dist/cjs/management/api/resources/keys/resources/networkAcls/client/Client.d.ts +17 -0
  24. package/dist/cjs/management/api/resources/keys/resources/networkAcls/client/Client.js +60 -0
  25. package/dist/cjs/management/api/resources/organizationTemplates/client/Client.d.ts +106 -0
  26. package/dist/cjs/management/api/resources/organizationTemplates/client/Client.js +411 -0
  27. package/dist/cjs/management/api/resources/organizationTemplates/client/index.d.ts +1 -0
  28. package/dist/cjs/management/api/resources/organizationTemplates/client/index.js +2 -0
  29. package/dist/cjs/management/api/resources/organizationTemplates/exports.d.ts +2 -0
  30. package/dist/cjs/management/api/resources/organizationTemplates/exports.js +21 -0
  31. package/dist/cjs/management/api/resources/organizationTemplates/index.d.ts +1 -0
  32. package/dist/cjs/{lib → management/api/resources/organizationTemplates}/index.js +1 -2
  33. package/dist/cjs/management/api/resources/organizations/client/Client.d.ts +3 -0
  34. package/dist/cjs/management/api/resources/organizations/client/Client.js +7 -2
  35. package/dist/cjs/management/api/resources/organizations/resources/index.d.ts +1 -0
  36. package/dist/cjs/management/api/resources/organizations/resources/index.js +2 -1
  37. package/dist/cjs/management/api/resources/organizations/resources/organizationTemplate/client/Client.d.ts +63 -0
  38. package/dist/cjs/management/api/resources/organizations/resources/organizationTemplate/client/Client.js +232 -0
  39. package/dist/cjs/management/api/resources/organizations/resources/organizationTemplate/client/index.d.ts +1 -0
  40. package/dist/cjs/management/api/resources/organizations/resources/organizationTemplate/client/index.js +2 -0
  41. package/dist/cjs/management/api/resources/organizations/resources/organizationTemplate/exports.d.ts +2 -0
  42. package/dist/cjs/management/api/resources/organizations/resources/organizationTemplate/exports.js +21 -0
  43. package/dist/cjs/management/api/resources/organizations/resources/organizationTemplate/index.d.ts +1 -0
  44. package/dist/cjs/management/api/resources/organizations/resources/organizationTemplate/index.js +17 -0
  45. package/dist/cjs/management/api/resources/users/resources/organizations/client/Client.d.ts +17 -0
  46. package/dist/cjs/management/api/resources/users/resources/organizations/client/Client.js +19 -0
  47. package/dist/cjs/management/api/types/types.d.ts +8896 -2027
  48. package/dist/cjs/management/api/types/types.js +1455 -166
  49. package/dist/cjs/management/version.d.ts +1 -1
  50. package/dist/cjs/management/version.js +1 -1
  51. package/dist/cjs/management/wrapper/ManagementClient.d.ts +9 -2
  52. package/dist/cjs/management/wrapper/ManagementClient.js +0 -1
  53. package/dist/cjs/management/wrapper/token-provider.d.ts +4 -2
  54. package/dist/cjs/management/wrapper/token-provider.js +142 -11
  55. package/dist/cjs/utils.d.ts +0 -18
  56. package/dist/cjs/utils.js +1 -32
  57. package/dist/esm/index.d.mts +0 -2
  58. package/dist/esm/index.mjs +0 -2
  59. package/dist/esm/lib/errors.d.mts +0 -18
  60. package/dist/esm/lib/errors.mjs +0 -22
  61. package/dist/esm/lib/middleware/auth0-client-telemetry.d.mts +3 -7
  62. package/dist/esm/lib/middleware/auth0-client-telemetry.mjs +1 -25
  63. package/dist/esm/lib/models.d.mts +0 -24
  64. package/dist/esm/lib/models.mjs +1 -49
  65. package/dist/esm/management/Client.d.mts +3 -0
  66. package/dist/esm/management/Client.mjs +5 -0
  67. package/dist/esm/management/api/errors/UnprocessableEntityError.d.mts +5 -0
  68. package/dist/esm/management/api/errors/UnprocessableEntityError.mjs +17 -0
  69. package/dist/esm/management/api/errors/index.d.mts +1 -0
  70. package/dist/esm/management/api/errors/index.mjs +1 -0
  71. package/dist/esm/management/api/requests/requests.d.mts +91 -0
  72. package/dist/esm/management/api/resources/connections/client/Client.d.mts +2 -0
  73. package/dist/esm/management/api/resources/connections/client/Client.mjs +6 -0
  74. package/dist/esm/management/api/resources/connections/resources/scimConfiguration/client/Client.d.mts +1 -0
  75. package/dist/esm/management/api/resources/connections/resources/scimConfiguration/client/Client.mjs +3 -0
  76. package/dist/esm/management/api/resources/index.d.mts +1 -0
  77. package/dist/esm/management/api/resources/index.mjs +1 -0
  78. package/dist/esm/management/api/resources/keys/resources/networkAcls/client/Client.d.mts +17 -0
  79. package/dist/esm/management/api/resources/keys/resources/networkAcls/client/Client.mjs +60 -0
  80. package/dist/esm/management/api/resources/organizationTemplates/client/Client.d.mts +106 -0
  81. package/dist/esm/management/api/resources/organizationTemplates/client/Client.mjs +374 -0
  82. package/dist/esm/management/api/resources/organizationTemplates/client/index.d.mts +1 -0
  83. package/dist/esm/management/api/resources/organizationTemplates/client/index.mjs +1 -0
  84. package/dist/esm/management/api/resources/organizationTemplates/exports.d.mts +2 -0
  85. package/dist/esm/management/api/resources/organizationTemplates/exports.mjs +3 -0
  86. package/dist/esm/management/api/resources/organizationTemplates/index.d.mts +1 -0
  87. package/dist/esm/management/api/resources/organizationTemplates/index.mjs +1 -0
  88. package/dist/esm/management/api/resources/organizations/client/Client.d.mts +3 -0
  89. package/dist/esm/management/api/resources/organizations/client/Client.mjs +5 -0
  90. package/dist/esm/management/api/resources/organizations/resources/index.d.mts +1 -0
  91. package/dist/esm/management/api/resources/organizations/resources/index.mjs +1 -0
  92. package/dist/esm/management/api/resources/organizations/resources/organizationTemplate/client/Client.d.mts +63 -0
  93. package/dist/esm/management/api/resources/organizations/resources/organizationTemplate/client/Client.mjs +195 -0
  94. package/dist/esm/management/api/resources/organizations/resources/organizationTemplate/client/index.d.mts +1 -0
  95. package/dist/esm/management/api/resources/organizations/resources/organizationTemplate/client/index.mjs +1 -0
  96. package/dist/esm/management/api/resources/organizations/resources/organizationTemplate/exports.d.mts +2 -0
  97. package/dist/esm/management/api/resources/organizations/resources/organizationTemplate/exports.mjs +3 -0
  98. package/dist/esm/management/api/resources/organizations/resources/organizationTemplate/index.d.mts +1 -0
  99. package/dist/esm/management/api/resources/organizations/resources/organizationTemplate/index.mjs +1 -0
  100. package/dist/esm/management/api/resources/users/resources/organizations/client/Client.d.mts +17 -0
  101. package/dist/esm/management/api/resources/users/resources/organizations/client/Client.mjs +19 -0
  102. package/dist/esm/management/api/types/types.d.mts +8896 -2027
  103. package/dist/esm/management/api/types/types.mjs +1434 -150
  104. package/dist/esm/management/version.d.mts +1 -1
  105. package/dist/esm/management/version.mjs +1 -1
  106. package/dist/esm/management/wrapper/ManagementClient.d.mts +9 -2
  107. package/dist/esm/management/wrapper/ManagementClient.mjs +0 -1
  108. package/dist/esm/management/wrapper/token-provider.d.mts +4 -2
  109. package/dist/esm/management/wrapper/token-provider.mjs +142 -11
  110. package/dist/esm/utils.d.mts +0 -18
  111. package/dist/esm/utils.mjs +0 -30
  112. package/package.json +23 -2
  113. package/reference.md +688 -28
  114. package/dist/cjs/auth/backchannel.d.ts +0 -158
  115. package/dist/cjs/auth/backchannel.js +0 -135
  116. package/dist/cjs/auth/base-auth-api.d.ts +0 -41
  117. package/dist/cjs/auth/base-auth-api.js +0 -109
  118. package/dist/cjs/auth/client-authentication.d.ts +0 -27
  119. package/dist/cjs/auth/client-authentication.js +0 -82
  120. package/dist/cjs/auth/database.d.ts +0 -157
  121. package/dist/cjs/auth/database.js +0 -94
  122. package/dist/cjs/auth/id-token-validator.d.ts +0 -18
  123. package/dist/cjs/auth/id-token-validator.js +0 -158
  124. package/dist/cjs/auth/index.d.ts +0 -65
  125. package/dist/cjs/auth/index.js +0 -80
  126. package/dist/cjs/auth/oauth.d.ts +0 -462
  127. package/dist/cjs/auth/oauth.js +0 -280
  128. package/dist/cjs/auth/passwordless.d.ts +0 -165
  129. package/dist/cjs/auth/passwordless.js +0 -173
  130. package/dist/cjs/auth/tokenExchange.d.ts +0 -166
  131. package/dist/cjs/auth/tokenExchange.js +0 -74
  132. package/dist/cjs/lib/index.d.ts +0 -3
  133. package/dist/cjs/lib/runtime.d.ts +0 -61
  134. package/dist/cjs/lib/runtime.js +0 -222
  135. package/dist/cjs/userinfo/index.d.ts +0 -87
  136. package/dist/cjs/userinfo/index.js +0 -104
  137. package/dist/esm/auth/backchannel.d.mts +0 -158
  138. package/dist/esm/auth/backchannel.mjs +0 -131
  139. package/dist/esm/auth/base-auth-api.d.mts +0 -41
  140. package/dist/esm/auth/base-auth-api.mjs +0 -103
  141. package/dist/esm/auth/client-authentication.d.mts +0 -27
  142. package/dist/esm/auth/client-authentication.mjs +0 -45
  143. package/dist/esm/auth/database.d.mts +0 -157
  144. package/dist/esm/auth/database.mjs +0 -90
  145. package/dist/esm/auth/id-token-validator.d.mts +0 -18
  146. package/dist/esm/auth/id-token-validator.mjs +0 -120
  147. package/dist/esm/auth/index.d.mts +0 -65
  148. package/dist/esm/auth/index.mjs +0 -60
  149. package/dist/esm/auth/oauth.d.mts +0 -462
  150. package/dist/esm/auth/oauth.mjs +0 -276
  151. package/dist/esm/auth/passwordless.d.mts +0 -165
  152. package/dist/esm/auth/passwordless.mjs +0 -169
  153. package/dist/esm/auth/tokenExchange.d.mts +0 -166
  154. package/dist/esm/auth/tokenExchange.mjs +0 -70
  155. package/dist/esm/lib/index.d.mts +0 -3
  156. package/dist/esm/lib/index.mjs +0 -2
  157. package/dist/esm/lib/runtime.d.mts +0 -61
  158. package/dist/esm/lib/runtime.mjs +0 -201
  159. package/dist/esm/userinfo/index.d.mts +0 -87
  160. package/dist/esm/userinfo/index.mjs +0 -98
@@ -0,0 +1,195 @@
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 OrganizationTemplateClient {
19
+ constructor(options) {
20
+ this._options = normalizeClientOptionsWithAuth(options);
21
+ }
22
+ /**
23
+ * Retrieve the organization template assigned to a specific organization. Returns the template object if one is explicitly assigned, or a 404 if no template is assigned.
24
+ *
25
+ * @param {string} id - ID of the organization.
26
+ * @param {OrganizationTemplateClient.RequestOptions} requestOptions - Request-specific configuration.
27
+ *
28
+ * @throws {@link Management.UnauthorizedError}
29
+ * @throws {@link Management.ForbiddenError}
30
+ * @throws {@link Management.NotFoundError}
31
+ * @throws {@link Management.TooManyRequestsError}
32
+ *
33
+ * @example
34
+ * await client.organizations.organizationTemplate.get("id")
35
+ */
36
+ get(id, requestOptions) {
37
+ return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));
38
+ }
39
+ __get(id, requestOptions) {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
42
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
43
+ 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);
44
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
45
+ 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)}/organization-templates`),
46
+ method: "GET",
47
+ headers: _headers,
48
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
49
+ 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,
50
+ 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,
51
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
52
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
53
+ logging: this._options.logging,
54
+ });
55
+ if (_response.ok) {
56
+ return { data: _response.body, rawResponse: _response.rawResponse };
57
+ }
58
+ if (_response.error.reason === "status-code") {
59
+ switch (_response.error.statusCode) {
60
+ case 401:
61
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
62
+ case 403:
63
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
64
+ case 404:
65
+ throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
66
+ case 429:
67
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
68
+ default:
69
+ throw new errors.ManagementError({
70
+ statusCode: _response.error.statusCode,
71
+ body: _response.error.body,
72
+ rawResponse: _response.rawResponse,
73
+ });
74
+ }
75
+ }
76
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/organizations/{id}/organization-templates");
77
+ });
78
+ }
79
+ /**
80
+ * Assign an Organization Template to an organization.
81
+ *
82
+ * @param {string} id - The ID of the organization.
83
+ * @param {string} template_id - The ID of the organization template to assign.
84
+ * @param {OrganizationTemplateClient.RequestOptions} requestOptions - Request-specific configuration.
85
+ *
86
+ * @throws {@link Management.BadRequestError}
87
+ * @throws {@link Management.UnauthorizedError}
88
+ * @throws {@link Management.ForbiddenError}
89
+ * @throws {@link Management.TooManyRequestsError}
90
+ *
91
+ * @example
92
+ * await client.organizations.organizationTemplate.assignOrganizationTemplate("id", "template_id")
93
+ */
94
+ assignOrganizationTemplate(id, template_id, requestOptions) {
95
+ return core.HttpResponsePromise.fromPromise(this.__assignOrganizationTemplate(id, template_id, requestOptions));
96
+ }
97
+ __assignOrganizationTemplate(id, template_id, requestOptions) {
98
+ return __awaiter(this, void 0, void 0, function* () {
99
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
100
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
101
+ 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);
102
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
103
+ 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)}/organization-templates/${core.url.encodePathParam(template_id)}`),
104
+ method: "PUT",
105
+ headers: _headers,
106
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
107
+ 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,
108
+ 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,
109
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
110
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
111
+ logging: this._options.logging,
112
+ });
113
+ if (_response.ok) {
114
+ return { data: undefined, rawResponse: _response.rawResponse };
115
+ }
116
+ if (_response.error.reason === "status-code") {
117
+ switch (_response.error.statusCode) {
118
+ case 400:
119
+ throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
120
+ case 401:
121
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
122
+ case 403:
123
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
124
+ case 429:
125
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
126
+ default:
127
+ throw new errors.ManagementError({
128
+ statusCode: _response.error.statusCode,
129
+ body: _response.error.body,
130
+ rawResponse: _response.rawResponse,
131
+ });
132
+ }
133
+ }
134
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/organizations/{id}/organization-templates/{template_id}");
135
+ });
136
+ }
137
+ /**
138
+ * Remove an Organization Template assignment from an organization.
139
+ *
140
+ * @param {string} id - The ID of the organization.
141
+ * @param {string} template_id - The ID of the organization template to unassign.
142
+ * @param {OrganizationTemplateClient.RequestOptions} requestOptions - Request-specific configuration.
143
+ *
144
+ * @throws {@link Management.BadRequestError}
145
+ * @throws {@link Management.UnauthorizedError}
146
+ * @throws {@link Management.ForbiddenError}
147
+ * @throws {@link Management.TooManyRequestsError}
148
+ *
149
+ * @example
150
+ * await client.organizations.organizationTemplate.unassignOrganizationTemplate("id", "template_id")
151
+ */
152
+ unassignOrganizationTemplate(id, template_id, requestOptions) {
153
+ return core.HttpResponsePromise.fromPromise(this.__unassignOrganizationTemplate(id, template_id, requestOptions));
154
+ }
155
+ __unassignOrganizationTemplate(id, template_id, requestOptions) {
156
+ return __awaiter(this, void 0, void 0, function* () {
157
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
158
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
159
+ 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);
160
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
161
+ 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)}/organization-templates/${core.url.encodePathParam(template_id)}`),
162
+ method: "DELETE",
163
+ headers: _headers,
164
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
165
+ 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,
166
+ 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,
167
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
168
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
169
+ logging: this._options.logging,
170
+ });
171
+ if (_response.ok) {
172
+ return { data: undefined, rawResponse: _response.rawResponse };
173
+ }
174
+ if (_response.error.reason === "status-code") {
175
+ switch (_response.error.statusCode) {
176
+ case 400:
177
+ throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
178
+ case 401:
179
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
180
+ case 403:
181
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
182
+ case 429:
183
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
184
+ default:
185
+ throw new errors.ManagementError({
186
+ statusCode: _response.error.statusCode,
187
+ body: _response.error.body,
188
+ rawResponse: _response.rawResponse,
189
+ });
190
+ }
191
+ }
192
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/organizations/{id}/organization-templates/{template_id}");
193
+ });
194
+ }
195
+ }
@@ -0,0 +1,2 @@
1
+ export { OrganizationTemplateClient } from "./client/Client.mjs";
2
+ export * from "./client/index.mjs";
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export { OrganizationTemplateClient } from "./client/Client.mjs";
3
+ export * from "./client/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -13,10 +13,27 @@ export declare class OrganizationsClient {
13
13
  /**
14
14
  * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review [Auth0 Organizations](https://auth0.com/docs/manage-users/organizations).
15
15
  *
16
+ * This endpoint supports two types of pagination:
17
+ *
18
+ * - Offset pagination
19
+ * - Checkpoint pagination
20
+ *
21
+ * Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.
22
+ *
23
+ * **Checkpoint Pagination**
24
+ *
25
+ * To search by checkpoint, use the following parameters:
26
+ *
27
+ * - `from`: Optional id from which to start selection.
28
+ * - `take`: The total number of entries to retrieve when using the `from` parameter. Defaults to 50.
29
+ *
30
+ * **Note**: The first time you call this endpoint using checkpoint pagination, omit the `from` parameter. If there are more results, a `next` value is included in the response. You can use this for subsequent API calls. When `next` is no longer included in the response, no pages are remaining.
31
+ *
16
32
  * @param {string} id - ID of the user to retrieve the organizations for.
17
33
  * @param {Management.ListUserOrganizationsRequestParameters} request
18
34
  * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
19
35
  *
36
+ * @throws {@link Management.BadRequestError}
20
37
  * @throws {@link Management.UnauthorizedError}
21
38
  * @throws {@link Management.ForbiddenError}
22
39
  * @throws {@link Management.NotFoundError}
@@ -22,10 +22,27 @@ export class OrganizationsClient {
22
22
  /**
23
23
  * Retrieve list of the specified user's current Organization memberships. User must be specified by user ID. For more information, review [Auth0 Organizations](https://auth0.com/docs/manage-users/organizations).
24
24
  *
25
+ * This endpoint supports two types of pagination:
26
+ *
27
+ * - Offset pagination
28
+ * - Checkpoint pagination
29
+ *
30
+ * Checkpoint pagination must be used if you need to retrieve more than 1000 organizations.
31
+ *
32
+ * **Checkpoint Pagination**
33
+ *
34
+ * To search by checkpoint, use the following parameters:
35
+ *
36
+ * - `from`: Optional id from which to start selection.
37
+ * - `take`: The total number of entries to retrieve when using the `from` parameter. Defaults to 50.
38
+ *
39
+ * **Note**: The first time you call this endpoint using checkpoint pagination, omit the `from` parameter. If there are more results, a `next` value is included in the response. You can use this for subsequent API calls. When `next` is no longer included in the response, no pages are remaining.
40
+ *
25
41
  * @param {string} id - ID of the user to retrieve the organizations for.
26
42
  * @param {Management.ListUserOrganizationsRequestParameters} request
27
43
  * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
28
44
  *
45
+ * @throws {@link Management.BadRequestError}
29
46
  * @throws {@link Management.UnauthorizedError}
30
47
  * @throws {@link Management.ForbiddenError}
31
48
  * @throws {@link Management.NotFoundError}
@@ -73,6 +90,8 @@ export class OrganizationsClient {
73
90
  }
74
91
  if (_response.error.reason === "status-code") {
75
92
  switch (_response.error.statusCode) {
93
+ case 400:
94
+ throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
76
95
  case 401:
77
96
  throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
78
97
  case 403: