auth0 5.11.0 → 5.13.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 (186) hide show
  1. package/dist/cjs/lib/models.d.ts +7 -7
  2. package/dist/cjs/lib/retry.d.ts +7 -2
  3. package/dist/cjs/lib/retry.js +35 -5
  4. package/dist/cjs/management/api/requests/requests.d.ts +28 -4
  5. package/dist/cjs/management/api/resources/attackProtection/client/Client.d.ts +3 -0
  6. package/dist/cjs/management/api/resources/attackProtection/client/Client.js +7 -2
  7. package/dist/cjs/management/api/resources/attackProtection/resources/index.d.ts +1 -0
  8. package/dist/cjs/management/api/resources/attackProtection/resources/index.js +2 -1
  9. package/dist/cjs/management/api/resources/attackProtection/resources/phoneProviderProtection/client/Client.d.ts +45 -0
  10. package/dist/cjs/management/api/resources/attackProtection/resources/phoneProviderProtection/client/Client.js +180 -0
  11. package/dist/cjs/management/api/resources/attackProtection/resources/phoneProviderProtection/client/index.d.ts +1 -0
  12. package/dist/cjs/management/api/resources/attackProtection/resources/phoneProviderProtection/client/index.js +2 -0
  13. package/dist/cjs/management/api/resources/attackProtection/resources/phoneProviderProtection/index.d.ts +1 -0
  14. package/dist/cjs/management/api/resources/attackProtection/resources/phoneProviderProtection/index.js +17 -0
  15. package/dist/cjs/management/api/resources/branding/resources/phone/resources/providers/client/Client.d.ts +6 -6
  16. package/dist/cjs/management/api/resources/branding/resources/phone/resources/providers/client/Client.js +6 -6
  17. package/dist/cjs/management/api/resources/clientGrants/client/Client.d.ts +4 -4
  18. package/dist/cjs/management/api/resources/clientGrants/client/Client.js +4 -4
  19. package/dist/cjs/management/api/resources/clientGrants/resources/organizations/client/Client.d.ts +1 -0
  20. package/dist/cjs/management/api/resources/clientGrants/resources/organizations/client/Client.js +3 -0
  21. package/dist/cjs/management/api/resources/clients/client/Client.d.ts +69 -85
  22. package/dist/cjs/management/api/resources/clients/client/Client.js +71 -85
  23. package/dist/cjs/management/api/resources/clients/resources/connections/client/Client.d.ts +4 -9
  24. package/dist/cjs/management/api/resources/clients/resources/connections/client/Client.js +4 -9
  25. package/dist/cjs/management/api/resources/clients/resources/credentials/client/Client.d.ts +38 -14
  26. package/dist/cjs/management/api/resources/clients/resources/credentials/client/Client.js +38 -14
  27. package/dist/cjs/management/api/resources/connectionProfiles/client/Client.d.ts +1 -0
  28. package/dist/cjs/management/api/resources/connectionProfiles/client/Client.js +3 -0
  29. package/dist/cjs/management/api/resources/connections/resources/users/client/Client.d.ts +1 -0
  30. package/dist/cjs/management/api/resources/connections/resources/users/client/Client.js +3 -0
  31. package/dist/cjs/management/api/resources/customDomains/client/Client.d.ts +1 -0
  32. package/dist/cjs/management/api/resources/customDomains/client/Client.js +3 -0
  33. package/dist/cjs/management/api/resources/emailTemplates/client/Client.d.ts +4 -4
  34. package/dist/cjs/management/api/resources/emailTemplates/client/Client.js +4 -4
  35. package/dist/cjs/management/api/resources/emails/resources/provider/client/Client.d.ts +50 -81
  36. package/dist/cjs/management/api/resources/emails/resources/provider/client/Client.js +50 -81
  37. package/dist/cjs/management/api/resources/groups/resources/members/client/Client.d.ts +1 -0
  38. package/dist/cjs/management/api/resources/groups/resources/members/client/Client.js +3 -0
  39. package/dist/cjs/management/api/resources/groups/resources/roles/client/Client.d.ts +5 -3
  40. package/dist/cjs/management/api/resources/groups/resources/roles/client/Client.js +9 -3
  41. package/dist/cjs/management/api/resources/keys/resources/signing/client/Client.d.ts +1 -0
  42. package/dist/cjs/management/api/resources/keys/resources/signing/client/Client.js +3 -0
  43. package/dist/cjs/management/api/resources/organizations/client/Client.d.ts +2 -0
  44. package/dist/cjs/management/api/resources/organizations/client/Client.js +6 -0
  45. package/dist/cjs/management/api/resources/organizations/resources/connections/client/Client.d.ts +1 -0
  46. package/dist/cjs/management/api/resources/organizations/resources/connections/client/Client.js +3 -0
  47. package/dist/cjs/management/api/resources/organizations/resources/enabledConnections/client/Client.d.ts +5 -0
  48. package/dist/cjs/management/api/resources/organizations/resources/enabledConnections/client/Client.js +15 -0
  49. package/dist/cjs/management/api/resources/organizations/resources/groups/client/Client.d.ts +1 -0
  50. package/dist/cjs/management/api/resources/organizations/resources/groups/client/Client.js +3 -0
  51. package/dist/cjs/management/api/resources/organizations/resources/groups/resources/roles/client/Client.d.ts +3 -0
  52. package/dist/cjs/management/api/resources/organizations/resources/groups/resources/roles/client/Client.js +9 -0
  53. package/dist/cjs/management/api/resources/organizations/resources/members/client/Client.d.ts +1 -0
  54. package/dist/cjs/management/api/resources/organizations/resources/members/client/Client.js +3 -0
  55. package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/client/Client.d.ts +1 -0
  56. package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/client/Client.js +3 -0
  57. package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/resources/groups/client/Client.d.ts +1 -0
  58. package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/resources/groups/client/Client.js +3 -0
  59. package/dist/cjs/management/api/resources/organizations/resources/members/resources/roles/client/Client.d.ts +1 -0
  60. package/dist/cjs/management/api/resources/organizations/resources/members/resources/roles/client/Client.js +3 -0
  61. package/dist/cjs/management/api/resources/refreshTokens/client/Client.d.ts +1 -1
  62. package/dist/cjs/management/api/resources/refreshTokens/client/Client.js +1 -1
  63. package/dist/cjs/management/api/resources/roles/resources/groups/client/Client.d.ts +2 -0
  64. package/dist/cjs/management/api/resources/roles/resources/groups/client/Client.js +6 -0
  65. package/dist/cjs/management/api/resources/roles/resources/permissions/client/Client.d.ts +1 -0
  66. package/dist/cjs/management/api/resources/roles/resources/permissions/client/Client.js +3 -0
  67. package/dist/cjs/management/api/resources/selfServiceProfiles/resources/ssoTicket/client/Client.d.ts +1 -0
  68. package/dist/cjs/management/api/resources/selfServiceProfiles/resources/ssoTicket/client/Client.js +3 -0
  69. package/dist/cjs/management/api/resources/tokenExchangeProfiles/client/Client.d.ts +10 -12
  70. package/dist/cjs/management/api/resources/tokenExchangeProfiles/client/Client.js +12 -12
  71. package/dist/cjs/management/api/resources/userAttributeProfiles/client/Client.d.ts +1 -0
  72. package/dist/cjs/management/api/resources/userAttributeProfiles/client/Client.js +3 -0
  73. package/dist/cjs/management/api/resources/userGrants/client/Client.d.ts +1 -1
  74. package/dist/cjs/management/api/resources/userGrants/client/Client.js +1 -1
  75. package/dist/cjs/management/api/resources/users/resources/connectedAccounts/client/Client.d.ts +1 -0
  76. package/dist/cjs/management/api/resources/users/resources/connectedAccounts/client/Client.js +3 -0
  77. package/dist/cjs/management/api/resources/users/resources/effectiveRoles/client/Client.d.ts +1 -0
  78. package/dist/cjs/management/api/resources/users/resources/effectiveRoles/client/Client.js +3 -0
  79. package/dist/cjs/management/api/resources/users/resources/effectiveRoles/resources/sources/resources/groups/client/Client.d.ts +1 -0
  80. package/dist/cjs/management/api/resources/users/resources/effectiveRoles/resources/sources/resources/groups/client/Client.js +3 -0
  81. package/dist/cjs/management/api/resources/users/resources/groups/client/Client.d.ts +1 -0
  82. package/dist/cjs/management/api/resources/users/resources/groups/client/Client.js +3 -0
  83. package/dist/cjs/management/api/resources/users/resources/organizations/client/Client.d.ts +1 -0
  84. package/dist/cjs/management/api/resources/users/resources/organizations/client/Client.js +3 -0
  85. package/dist/cjs/management/api/resources/users/resources/permissions/client/Client.d.ts +2 -0
  86. package/dist/cjs/management/api/resources/users/resources/permissions/client/Client.js +6 -0
  87. package/dist/cjs/management/api/resources/users/resources/roles/client/Client.d.ts +2 -0
  88. package/dist/cjs/management/api/resources/users/resources/roles/client/Client.js +6 -0
  89. package/dist/cjs/management/api/types/types.d.ts +281 -109
  90. package/dist/cjs/management/api/types/types.js +36 -46
  91. package/dist/cjs/management/version.d.ts +1 -1
  92. package/dist/cjs/management/version.js +1 -1
  93. package/dist/esm/lib/models.d.mts +7 -7
  94. package/dist/esm/lib/retry.d.mts +7 -2
  95. package/dist/esm/lib/retry.mjs +35 -5
  96. package/dist/esm/management/api/requests/requests.d.mts +28 -4
  97. package/dist/esm/management/api/resources/attackProtection/client/Client.d.mts +3 -0
  98. package/dist/esm/management/api/resources/attackProtection/client/Client.mjs +5 -0
  99. package/dist/esm/management/api/resources/attackProtection/resources/index.d.mts +1 -0
  100. package/dist/esm/management/api/resources/attackProtection/resources/index.mjs +1 -0
  101. package/dist/esm/management/api/resources/attackProtection/resources/phoneProviderProtection/client/Client.d.mts +45 -0
  102. package/dist/esm/management/api/resources/attackProtection/resources/phoneProviderProtection/client/Client.mjs +143 -0
  103. package/dist/esm/management/api/resources/attackProtection/resources/phoneProviderProtection/client/index.d.mts +1 -0
  104. package/dist/esm/management/api/resources/attackProtection/resources/phoneProviderProtection/client/index.mjs +1 -0
  105. package/dist/esm/management/api/resources/attackProtection/resources/phoneProviderProtection/index.d.mts +1 -0
  106. package/dist/esm/management/api/resources/attackProtection/resources/phoneProviderProtection/index.mjs +1 -0
  107. package/dist/esm/management/api/resources/branding/resources/phone/resources/providers/client/Client.d.mts +6 -6
  108. package/dist/esm/management/api/resources/branding/resources/phone/resources/providers/client/Client.mjs +6 -6
  109. package/dist/esm/management/api/resources/clientGrants/client/Client.d.mts +4 -4
  110. package/dist/esm/management/api/resources/clientGrants/client/Client.mjs +4 -4
  111. package/dist/esm/management/api/resources/clientGrants/resources/organizations/client/Client.d.mts +1 -0
  112. package/dist/esm/management/api/resources/clientGrants/resources/organizations/client/Client.mjs +3 -0
  113. package/dist/esm/management/api/resources/clients/client/Client.d.mts +69 -85
  114. package/dist/esm/management/api/resources/clients/client/Client.mjs +71 -85
  115. package/dist/esm/management/api/resources/clients/resources/connections/client/Client.d.mts +4 -9
  116. package/dist/esm/management/api/resources/clients/resources/connections/client/Client.mjs +4 -9
  117. package/dist/esm/management/api/resources/clients/resources/credentials/client/Client.d.mts +38 -14
  118. package/dist/esm/management/api/resources/clients/resources/credentials/client/Client.mjs +38 -14
  119. package/dist/esm/management/api/resources/connectionProfiles/client/Client.d.mts +1 -0
  120. package/dist/esm/management/api/resources/connectionProfiles/client/Client.mjs +3 -0
  121. package/dist/esm/management/api/resources/connections/resources/users/client/Client.d.mts +1 -0
  122. package/dist/esm/management/api/resources/connections/resources/users/client/Client.mjs +3 -0
  123. package/dist/esm/management/api/resources/customDomains/client/Client.d.mts +1 -0
  124. package/dist/esm/management/api/resources/customDomains/client/Client.mjs +3 -0
  125. package/dist/esm/management/api/resources/emailTemplates/client/Client.d.mts +4 -4
  126. package/dist/esm/management/api/resources/emailTemplates/client/Client.mjs +4 -4
  127. package/dist/esm/management/api/resources/emails/resources/provider/client/Client.d.mts +50 -81
  128. package/dist/esm/management/api/resources/emails/resources/provider/client/Client.mjs +50 -81
  129. package/dist/esm/management/api/resources/groups/resources/members/client/Client.d.mts +1 -0
  130. package/dist/esm/management/api/resources/groups/resources/members/client/Client.mjs +3 -0
  131. package/dist/esm/management/api/resources/groups/resources/roles/client/Client.d.mts +5 -3
  132. package/dist/esm/management/api/resources/groups/resources/roles/client/Client.mjs +9 -3
  133. package/dist/esm/management/api/resources/keys/resources/signing/client/Client.d.mts +1 -0
  134. package/dist/esm/management/api/resources/keys/resources/signing/client/Client.mjs +3 -0
  135. package/dist/esm/management/api/resources/organizations/client/Client.d.mts +2 -0
  136. package/dist/esm/management/api/resources/organizations/client/Client.mjs +6 -0
  137. package/dist/esm/management/api/resources/organizations/resources/connections/client/Client.d.mts +1 -0
  138. package/dist/esm/management/api/resources/organizations/resources/connections/client/Client.mjs +3 -0
  139. package/dist/esm/management/api/resources/organizations/resources/enabledConnections/client/Client.d.mts +5 -0
  140. package/dist/esm/management/api/resources/organizations/resources/enabledConnections/client/Client.mjs +15 -0
  141. package/dist/esm/management/api/resources/organizations/resources/groups/client/Client.d.mts +1 -0
  142. package/dist/esm/management/api/resources/organizations/resources/groups/client/Client.mjs +3 -0
  143. package/dist/esm/management/api/resources/organizations/resources/groups/resources/roles/client/Client.d.mts +3 -0
  144. package/dist/esm/management/api/resources/organizations/resources/groups/resources/roles/client/Client.mjs +9 -0
  145. package/dist/esm/management/api/resources/organizations/resources/members/client/Client.d.mts +1 -0
  146. package/dist/esm/management/api/resources/organizations/resources/members/client/Client.mjs +3 -0
  147. package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/client/Client.d.mts +1 -0
  148. package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/client/Client.mjs +3 -0
  149. package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/resources/groups/client/Client.d.mts +1 -0
  150. package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/resources/groups/client/Client.mjs +3 -0
  151. package/dist/esm/management/api/resources/organizations/resources/members/resources/roles/client/Client.d.mts +1 -0
  152. package/dist/esm/management/api/resources/organizations/resources/members/resources/roles/client/Client.mjs +3 -0
  153. package/dist/esm/management/api/resources/refreshTokens/client/Client.d.mts +1 -1
  154. package/dist/esm/management/api/resources/refreshTokens/client/Client.mjs +1 -1
  155. package/dist/esm/management/api/resources/roles/resources/groups/client/Client.d.mts +2 -0
  156. package/dist/esm/management/api/resources/roles/resources/groups/client/Client.mjs +6 -0
  157. package/dist/esm/management/api/resources/roles/resources/permissions/client/Client.d.mts +1 -0
  158. package/dist/esm/management/api/resources/roles/resources/permissions/client/Client.mjs +3 -0
  159. package/dist/esm/management/api/resources/selfServiceProfiles/resources/ssoTicket/client/Client.d.mts +1 -0
  160. package/dist/esm/management/api/resources/selfServiceProfiles/resources/ssoTicket/client/Client.mjs +3 -0
  161. package/dist/esm/management/api/resources/tokenExchangeProfiles/client/Client.d.mts +10 -12
  162. package/dist/esm/management/api/resources/tokenExchangeProfiles/client/Client.mjs +12 -12
  163. package/dist/esm/management/api/resources/userAttributeProfiles/client/Client.d.mts +1 -0
  164. package/dist/esm/management/api/resources/userAttributeProfiles/client/Client.mjs +3 -0
  165. package/dist/esm/management/api/resources/userGrants/client/Client.d.mts +1 -1
  166. package/dist/esm/management/api/resources/userGrants/client/Client.mjs +1 -1
  167. package/dist/esm/management/api/resources/users/resources/connectedAccounts/client/Client.d.mts +1 -0
  168. package/dist/esm/management/api/resources/users/resources/connectedAccounts/client/Client.mjs +3 -0
  169. package/dist/esm/management/api/resources/users/resources/effectiveRoles/client/Client.d.mts +1 -0
  170. package/dist/esm/management/api/resources/users/resources/effectiveRoles/client/Client.mjs +3 -0
  171. package/dist/esm/management/api/resources/users/resources/effectiveRoles/resources/sources/resources/groups/client/Client.d.mts +1 -0
  172. package/dist/esm/management/api/resources/users/resources/effectiveRoles/resources/sources/resources/groups/client/Client.mjs +3 -0
  173. package/dist/esm/management/api/resources/users/resources/groups/client/Client.d.mts +1 -0
  174. package/dist/esm/management/api/resources/users/resources/groups/client/Client.mjs +3 -0
  175. package/dist/esm/management/api/resources/users/resources/organizations/client/Client.d.mts +1 -0
  176. package/dist/esm/management/api/resources/users/resources/organizations/client/Client.mjs +3 -0
  177. package/dist/esm/management/api/resources/users/resources/permissions/client/Client.d.mts +2 -0
  178. package/dist/esm/management/api/resources/users/resources/permissions/client/Client.mjs +6 -0
  179. package/dist/esm/management/api/resources/users/resources/roles/client/Client.d.mts +2 -0
  180. package/dist/esm/management/api/resources/users/resources/roles/client/Client.mjs +6 -0
  181. package/dist/esm/management/api/types/types.d.mts +281 -109
  182. package/dist/esm/management/api/types/types.mjs +23 -33
  183. package/dist/esm/management/version.d.mts +1 -1
  184. package/dist/esm/management/version.mjs +1 -1
  185. package/package.json +1 -1
  186. package/reference.md +349 -265
@@ -1,9 +1,9 @@
1
1
  import { RetryConfiguration } from "./retry.js";
2
- import { Dispatcher } from "undici-types";
2
+ import type { Dispatcher } from "undici-types";
3
3
  /**
4
4
  * @private
5
5
  */
6
- export type FetchAPI = (url: URL | RequestInfo, init?: RequestInit) => Promise<Response>;
6
+ export type FetchAPI = (url: string | URL | Request, init?: RequestInit) => Promise<Response>;
7
7
  export interface ClientOptions extends Omit<Configuration, "baseUrl" | "parseError" | "middleware"> {
8
8
  telemetry?: boolean;
9
9
  clientInfo?: {
@@ -57,7 +57,7 @@ export type HTTPBody = any | FormData | URLSearchParams;
57
57
  export type HTTPRequestInit = {
58
58
  headers?: HTTPHeaders;
59
59
  method: HTTPMethod;
60
- credentials?: RequestCredentials;
60
+ credentials?: "include" | "omit" | "same-origin";
61
61
  body?: HTTPBody;
62
62
  };
63
63
  export type InitOverrideFunction = (requestContext: {
@@ -96,23 +96,23 @@ export declare class TextApiResponse implements ApiResponse<string> {
96
96
  static fromResponse(raw: Response): Promise<TextApiResponse>;
97
97
  }
98
98
  export interface FetchParams {
99
- url: URL | RequestInfo;
99
+ url: string | URL | Request;
100
100
  init: RequestInit;
101
101
  }
102
102
  export interface RequestContext {
103
103
  fetch: FetchAPI;
104
- url: URL | RequestInfo;
104
+ url: string | URL | Request;
105
105
  init: RequestInit;
106
106
  }
107
107
  export interface ResponseContext {
108
108
  fetch: FetchAPI;
109
- url: URL | RequestInfo;
109
+ url: string | URL | Request;
110
110
  init: RequestInit;
111
111
  response: Response;
112
112
  }
113
113
  export interface ErrorContext {
114
114
  fetch: FetchAPI;
115
- url: URL | RequestInfo;
115
+ url: string | URL | Request;
116
116
  init: RequestInit;
117
117
  error: unknown;
118
118
  response?: Response;
@@ -10,11 +10,16 @@ export interface RetryConfiguration {
10
10
  enabled?: boolean;
11
11
  /**
12
12
  * Configure the max amount of retries the SDK should do.
13
- * Defaults to 5.
13
+ * Defaults to 3.
14
+ * Note: this budget is shared between HTTP status code retries (e.g. 429) and
15
+ * transient network error retries (e.g. ECONNRESET). For example, with maxRetries: 3,
16
+ * 2 network retries and 1 status code retry would exhaust the full budget.
14
17
  */
15
18
  maxRetries?: number;
16
19
  /**
17
- * Status Codes on which the SDK should trigger retries.
20
+ * HTTP Status Codes on which the SDK should trigger retries.
21
+ * Note: transient network errors (ECONNRESET, EPIPE, ECONNABORTED) are always retried
22
+ * up to maxRetries regardless of this setting. Use `enabled: false` to disable all retries.
18
23
  * Defaults to [429].
19
24
  */
20
25
  retryWhen?: number[];
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.retry = retry;
13
+ const errors_js_1 = require("./errors.js");
13
14
  const MAX_REQUEST_RETRY_JITTER = 250;
14
15
  const MAX_REQUEST_RETRY_DELAY = 10000;
15
16
  const DEFAULT_NUMBER_RETRIES = 3;
@@ -38,6 +39,25 @@ function pause(delay) {
38
39
  return new Promise((resolve) => setTimeout(resolve, delay));
39
40
  });
40
41
  }
42
+ // Transient network errors that are safe to retry — failures that can self-heal
43
+ // without any config change (socket reset, broken pipe, aborted connection).
44
+ // Deliberately excludes ENOTFOUND, ECONNREFUSED, cert errors — those won't self-heal.
45
+ const RETRYABLE_ERROR_CODES = new Set(["ECONNRESET", "EPIPE", "ECONNABORTED"]);
46
+ function isRetryableNetworkError(e) {
47
+ var _a, _b, _c;
48
+ if (typeof e !== "object" || e === null)
49
+ return false;
50
+ // Check both e.code (old request-lib / nock shape) and e.cause.code
51
+ // (native fetch / undici shape: TypeError: fetch failed { cause: { code } })
52
+ const err = e;
53
+ const code = (_c = (_a = err.code) !== null && _a !== void 0 ? _a : (_b = err.cause) === null || _b === void 0 ? void 0 : _b.code) !== null && _c !== void 0 ? _c : "";
54
+ return RETRYABLE_ERROR_CODES.has(code);
55
+ }
56
+ function calculateWait(nrOfTries) {
57
+ let wait = BASE_DELAY * Math.pow(2, nrOfTries - 1);
58
+ wait = getRandomInt(wait + 1, wait + MAX_REQUEST_RETRY_JITTER);
59
+ return Math.min(wait, MAX_REQUEST_RETRY_DELAY);
60
+ }
41
61
  /**
42
62
  * @private
43
63
  * Function that retries the provided action callback for a configurable amount of time, defaults to 3.
@@ -47,13 +67,23 @@ function retry(action, { maxRetries, retryWhen }) {
47
67
  let nrOfTries = 0;
48
68
  const retryAndWait = () => __awaiter(this, void 0, void 0, function* () {
49
69
  let result;
50
- result = yield action();
70
+ try {
71
+ result = yield action();
72
+ }
73
+ catch (e) {
74
+ if (e instanceof errors_js_1.TimeoutError) {
75
+ throw e;
76
+ }
77
+ if (isRetryableNetworkError(e) && nrOfTries < nrOfTriesToAttempt) {
78
+ nrOfTries++;
79
+ yield pause(calculateWait(nrOfTries));
80
+ return retryAndWait();
81
+ }
82
+ throw e;
83
+ }
51
84
  if ((retryWhen || [429]).includes(result.status) && nrOfTries < nrOfTriesToAttempt) {
52
85
  nrOfTries++;
53
- let wait = BASE_DELAY * Math.pow(2, nrOfTries - 1);
54
- wait = getRandomInt(wait + 1, wait + MAX_REQUEST_RETRY_JITTER);
55
- wait = Math.min(wait, MAX_REQUEST_RETRY_DELAY);
56
- yield pause(wait);
86
+ yield pause(calculateWait(nrOfTries));
57
87
  result = yield retryAndWait();
58
88
  }
59
89
  return result;
@@ -103,7 +103,6 @@ export interface UpdateBrandingRequestContent {
103
103
  favicon_url?: string | null;
104
104
  /** URL for the logo. Must use HTTPS. */
105
105
  logo_url?: string | null;
106
- identifiers?: Management.UpdateBrandingIdentifiers | null;
107
106
  font?: Management.UpdateBrandingFont | null;
108
107
  }
109
108
  /**
@@ -285,6 +284,7 @@ export interface CreateClientRequestContent {
285
284
  /** Makes the use of Proof-of-Possession mandatory for this client */
286
285
  require_proof_of_possession?: boolean;
287
286
  signed_request_object?: Management.ClientSignedRequestObjectWithPublicKey;
287
+ token_vault_privileged_access?: Management.ClientTokenVaultPrivilegedAccessWithPublicKey;
288
288
  compliance_level?: Management.ClientComplianceLevelEnum | null;
289
289
  /**
290
290
  * Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as `myapp://`, or `localhost`).
@@ -402,8 +402,8 @@ export interface UpdateClientRequestContent {
402
402
  mobile?: Management.ClientMobile;
403
403
  /** Initiate login uri, must be https */
404
404
  initiate_login_uri?: string;
405
- native_social_login?: Management.NativeSocialLogin;
406
- fedcm_login?: Management.FedCmLogin;
405
+ native_social_login?: Management.NativeSocialLoginPatch | null;
406
+ fedcm_login?: Management.FedCmLoginPatch | null;
407
407
  refresh_token?: Management.ClientRefreshTokenConfiguration | null;
408
408
  default_organization?: Management.ClientDefaultOrganization | null;
409
409
  organization_usage?: Management.ClientOrganizationUsagePatchEnum | null;
@@ -416,6 +416,7 @@ export interface UpdateClientRequestContent {
416
416
  /** Makes the use of Proof-of-Possession mandatory for this client */
417
417
  require_proof_of_possession?: boolean;
418
418
  signed_request_object?: Management.ClientSignedRequestObjectWithCredentialId;
419
+ token_vault_privileged_access?: Management.ClientTokenVaultPrivilegedAccessWithCredentialId;
419
420
  compliance_level?: Management.ClientComplianceLevelEnum | null;
420
421
  /**
421
422
  * Controls whether a confirmation prompt is shown during login flows when the redirect URI uses non-verifiable callback URIs (for example, a custom URI schema such as `myapp://`, or `localhost`).
@@ -521,6 +522,7 @@ export interface CreateConnectionRequestContent {
521
522
  metadata?: Management.ConnectionsMetadata;
522
523
  authentication?: Management.ConnectionAuthenticationPurpose;
523
524
  connected_accounts?: Management.ConnectionConnectedAccountsPurpose;
525
+ cross_app_access_requesting_app?: Management.CrossAppAccessRequestingApp;
524
526
  }
525
527
  /**
526
528
  * @example
@@ -554,6 +556,7 @@ export interface UpdateConnectionRequestContent {
554
556
  metadata?: Management.ConnectionsMetadata;
555
557
  authentication?: Management.ConnectionAuthenticationPurpose;
556
558
  connected_accounts?: Management.ConnectionConnectedAccountsPurpose;
559
+ cross_app_access_requesting_app?: Management.CrossAppAccessRequestingApp;
557
560
  }
558
561
  /**
559
562
  * @example
@@ -1286,7 +1289,7 @@ export interface RevokeRefreshTokensRequestContent {
1286
1289
  ids?: string[];
1287
1290
  /** Revoke all refresh tokens for this user. */
1288
1291
  user_id?: string;
1289
- /** Revoke all refresh tokens for this client. */
1292
+ /** Revoke refresh tokens for this client. Must be paired with `user_id`; optionally narrowed further with `audience`. */
1290
1293
  client_id?: string;
1291
1294
  /** Resource server identifier (audience) to scope the revocation. Must be used with both `user_id` and `client_id`. */
1292
1295
  audience?: string;
@@ -2107,6 +2110,15 @@ export interface UpdateAttackProtectionCaptchaRequestContent {
2107
2110
  recaptcha_v2?: Management.AttackProtectionUpdateCaptchaRecaptchaV2;
2108
2111
  simple_captcha?: Management.AttackProtectionCaptchaSimpleCaptchaResponseContent;
2109
2112
  }
2113
+ /**
2114
+ * @example
2115
+ * {
2116
+ * type: "exponential"
2117
+ * }
2118
+ */
2119
+ export interface PatchPhoneProviderProtectionRequestContent {
2120
+ type: Management.PhoneProviderProtectionBackoffStrategyEnum;
2121
+ }
2110
2122
  /**
2111
2123
  * @example
2112
2124
  * {}
@@ -3648,12 +3660,20 @@ export interface UpdateTenantSettingsRequestContent {
3648
3660
  allowed_logout_urls?: string[];
3649
3661
  /** Number of hours a session will stay valid. */
3650
3662
  session_lifetime?: number;
3663
+ /** Number of minutes a session will stay valid. Cannot be specified together with `session_lifetime`. */
3664
+ session_lifetime_in_minutes?: number;
3651
3665
  /** Number of hours for which a session can be inactive before the user must log in again. */
3652
3666
  idle_session_lifetime?: number;
3667
+ /** Number of minutes a session can be inactive before the user must log in again. Cannot be specified together with `idle_session_lifetime`. */
3668
+ idle_session_lifetime_in_minutes?: number;
3653
3669
  /** Number of hours an ephemeral (non-persistent) session will stay valid. */
3654
3670
  ephemeral_session_lifetime?: number;
3655
3671
  /** Number of hours for which an ephemeral (non-persistent) session can be inactive before the user must log in again. */
3656
3672
  idle_ephemeral_session_lifetime?: number;
3673
+ /** Number of minutes an ephemeral (non-persistent) session will stay valid. Cannot be specified together with `ephemeral_session_lifetime`. */
3674
+ ephemeral_session_lifetime_in_minutes?: number;
3675
+ /** Number of minutes an ephemeral (non-persistent) session can be inactive before the user must log in again. Cannot be specified together with `idle_ephemeral_session_lifetime`. */
3676
+ idle_ephemeral_session_lifetime_in_minutes?: number;
3657
3677
  /** Selected sandbox version for the extensibility environment */
3658
3678
  sandbox_version?: string;
3659
3679
  /** Selected legacy sandbox version for the extensibility environment */
@@ -3662,6 +3682,7 @@ export interface UpdateTenantSettingsRequestContent {
3662
3682
  default_redirection_uri?: string;
3663
3683
  /** Supported locales for the user interface */
3664
3684
  enabled_locales?: Management.TenantSettingsSupportedLocalesEnum[];
3685
+ security_headers?: Management.TenantSettingsNullableSecurityHeaders | null;
3665
3686
  session_cookie?: Management.SessionCookieSchema | null;
3666
3687
  sessions?: Management.TenantSettingsSessions | null;
3667
3688
  oidc_logout?: Management.TenantOidcLogoutSettings;
@@ -3689,6 +3710,8 @@ export interface UpdateTenantSettingsRequestContent {
3689
3710
  enable_ai_guide?: boolean;
3690
3711
  /** Whether Phone Consolidated Experience is enabled for this tenant. */
3691
3712
  phone_consolidated_experience?: boolean;
3713
+ /** Whether session metadata is included in specific tenant logs (slo, oidc_backchannel_logout_failed, oidc_backchannel_logout_succeeded). */
3714
+ include_session_metadata_in_tenant_logs?: boolean;
3692
3715
  dynamic_client_registration_security_mode?: Management.TenantSettingsDynamicClientRegistrationSecurityMode;
3693
3716
  country_codes?: Management.TenantSettingsCountryCodes | null;
3694
3717
  }
@@ -3825,6 +3848,7 @@ export interface LinkUserIdentityRequestContent {
3825
3848
  provider?: Management.UserIdentityProviderEnum;
3826
3849
  /** connection_id of the secondary user account being linked when more than one `auth0` database provider exists. */
3827
3850
  connection_id?: string;
3851
+ /** user_id of the secondary user account being linked. */
3828
3852
  user_id?: Management.UserId;
3829
3853
  /** JWT for the secondary account being linked. If sending this parameter, `provider`, `user_id`, and `connection_id` must not be sent. */
3830
3854
  link_with?: string;
@@ -4,6 +4,7 @@ import { BotDetectionClient } from "../resources/botDetection/client/Client.js";
4
4
  import { BreachedPasswordDetectionClient } from "../resources/breachedPasswordDetection/client/Client.js";
5
5
  import { BruteForceProtectionClient } from "../resources/bruteForceProtection/client/Client.js";
6
6
  import { CaptchaClient } from "../resources/captcha/client/Client.js";
7
+ import { PhoneProviderProtectionClient } from "../resources/phoneProviderProtection/client/Client.js";
7
8
  import { SuspiciousIpThrottlingClient } from "../resources/suspiciousIpThrottling/client/Client.js";
8
9
  export declare namespace AttackProtectionClient {
9
10
  type Options = BaseClientOptions;
@@ -14,11 +15,13 @@ export declare class AttackProtectionClient {
14
15
  protected _breachedPasswordDetection: BreachedPasswordDetectionClient | undefined;
15
16
  protected _bruteForceProtection: BruteForceProtectionClient | undefined;
16
17
  protected _captcha: CaptchaClient | undefined;
18
+ protected _phoneProviderProtection: PhoneProviderProtectionClient | undefined;
17
19
  protected _suspiciousIpThrottling: SuspiciousIpThrottlingClient | undefined;
18
20
  constructor(options: AttackProtectionClient.Options);
19
21
  get botDetection(): BotDetectionClient;
20
22
  get breachedPasswordDetection(): BreachedPasswordDetectionClient;
21
23
  get bruteForceProtection(): BruteForceProtectionClient;
22
24
  get captcha(): CaptchaClient;
25
+ get phoneProviderProtection(): PhoneProviderProtectionClient;
23
26
  get suspiciousIpThrottling(): SuspiciousIpThrottlingClient;
24
27
  }
@@ -7,7 +7,8 @@ const Client_js_1 = require("../resources/botDetection/client/Client.js");
7
7
  const Client_js_2 = require("../resources/breachedPasswordDetection/client/Client.js");
8
8
  const Client_js_3 = require("../resources/bruteForceProtection/client/Client.js");
9
9
  const Client_js_4 = require("../resources/captcha/client/Client.js");
10
- const Client_js_5 = require("../resources/suspiciousIpThrottling/client/Client.js");
10
+ const Client_js_5 = require("../resources/phoneProviderProtection/client/Client.js");
11
+ const Client_js_6 = require("../resources/suspiciousIpThrottling/client/Client.js");
11
12
  class AttackProtectionClient {
12
13
  constructor(options) {
13
14
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
@@ -28,9 +29,13 @@ class AttackProtectionClient {
28
29
  var _a;
29
30
  return ((_a = this._captcha) !== null && _a !== void 0 ? _a : (this._captcha = new Client_js_4.CaptchaClient(this._options)));
30
31
  }
32
+ get phoneProviderProtection() {
33
+ var _a;
34
+ return ((_a = this._phoneProviderProtection) !== null && _a !== void 0 ? _a : (this._phoneProviderProtection = new Client_js_5.PhoneProviderProtectionClient(this._options)));
35
+ }
31
36
  get suspiciousIpThrottling() {
32
37
  var _a;
33
- return ((_a = this._suspiciousIpThrottling) !== null && _a !== void 0 ? _a : (this._suspiciousIpThrottling = new Client_js_5.SuspiciousIpThrottlingClient(this._options)));
38
+ return ((_a = this._suspiciousIpThrottling) !== null && _a !== void 0 ? _a : (this._suspiciousIpThrottling = new Client_js_6.SuspiciousIpThrottlingClient(this._options)));
34
39
  }
35
40
  }
36
41
  exports.AttackProtectionClient = AttackProtectionClient;
@@ -2,4 +2,5 @@ export * as botDetection from "./botDetection/index.js";
2
2
  export * as breachedPasswordDetection from "./breachedPasswordDetection/index.js";
3
3
  export * as bruteForceProtection from "./bruteForceProtection/index.js";
4
4
  export * as captcha from "./captcha/index.js";
5
+ export * as phoneProviderProtection from "./phoneProviderProtection/index.js";
5
6
  export * as suspiciousIpThrottling from "./suspiciousIpThrottling/index.js";
@@ -33,9 +33,10 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.suspiciousIpThrottling = exports.captcha = exports.bruteForceProtection = exports.breachedPasswordDetection = exports.botDetection = void 0;
36
+ exports.suspiciousIpThrottling = exports.phoneProviderProtection = exports.captcha = exports.bruteForceProtection = exports.breachedPasswordDetection = exports.botDetection = void 0;
37
37
  exports.botDetection = __importStar(require("./botDetection/index.js"));
38
38
  exports.breachedPasswordDetection = __importStar(require("./breachedPasswordDetection/index.js"));
39
39
  exports.bruteForceProtection = __importStar(require("./bruteForceProtection/index.js"));
40
40
  exports.captcha = __importStar(require("./captcha/index.js"));
41
+ exports.phoneProviderProtection = __importStar(require("./phoneProviderProtection/index.js"));
41
42
  exports.suspiciousIpThrottling = __importStar(require("./suspiciousIpThrottling/index.js"));
@@ -0,0 +1,45 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
3
+ import * as core from "../../../../../../core/index.js";
4
+ import * as Management from "../../../../../index.js";
5
+ export declare namespace PhoneProviderProtectionClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class PhoneProviderProtectionClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<PhoneProviderProtectionClient.Options>;
12
+ constructor(options: PhoneProviderProtectionClient.Options);
13
+ /**
14
+ * Get the phone provider protection configuration for a tenant.
15
+ *
16
+ * @param {PhoneProviderProtectionClient.RequestOptions} requestOptions - Request-specific configuration.
17
+ *
18
+ * @throws {@link Management.UnauthorizedError}
19
+ * @throws {@link Management.ForbiddenError}
20
+ * @throws {@link Management.NotFoundError}
21
+ * @throws {@link Management.TooManyRequestsError}
22
+ *
23
+ * @example
24
+ * await client.attackProtection.phoneProviderProtection.get()
25
+ */
26
+ get(requestOptions?: PhoneProviderProtectionClient.RequestOptions): core.HttpResponsePromise<Management.GetPhoneProviderProtectionResponseContent>;
27
+ private __get;
28
+ /**
29
+ * Update the phone provider protection configuration for a tenant.
30
+ *
31
+ * @param {Management.PatchPhoneProviderProtectionRequestContent} request
32
+ * @param {PhoneProviderProtectionClient.RequestOptions} requestOptions - Request-specific configuration.
33
+ *
34
+ * @throws {@link Management.UnauthorizedError}
35
+ * @throws {@link Management.ForbiddenError}
36
+ * @throws {@link Management.TooManyRequestsError}
37
+ *
38
+ * @example
39
+ * await client.attackProtection.phoneProviderProtection.patch({
40
+ * type: "exponential"
41
+ * })
42
+ */
43
+ patch(request: Management.PatchPhoneProviderProtectionRequestContent, requestOptions?: PhoneProviderProtectionClient.RequestOptions): core.HttpResponsePromise<Management.PatchPhoneProviderProtectionResponseContent>;
44
+ private __patch;
45
+ }
@@ -0,0 +1,180 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.PhoneProviderProtectionClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../../../BaseClient.js");
48
+ const core = __importStar(require("../../../../../../core/index.js"));
49
+ const headers_js_1 = require("../../../../../../core/headers.js");
50
+ const environments = __importStar(require("../../../../../../environments.js"));
51
+ const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
52
+ const errors = __importStar(require("../../../../../../errors/index.js"));
53
+ const Management = __importStar(require("../../../../../index.js"));
54
+ class PhoneProviderProtectionClient {
55
+ constructor(options) {
56
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
+ }
58
+ /**
59
+ * Get the phone provider protection configuration for a tenant.
60
+ *
61
+ * @param {PhoneProviderProtectionClient.RequestOptions} requestOptions - Request-specific configuration.
62
+ *
63
+ * @throws {@link Management.UnauthorizedError}
64
+ * @throws {@link Management.ForbiddenError}
65
+ * @throws {@link Management.NotFoundError}
66
+ * @throws {@link Management.TooManyRequestsError}
67
+ *
68
+ * @example
69
+ * await client.attackProtection.phoneProviderProtection.get()
70
+ */
71
+ get(requestOptions) {
72
+ return core.HttpResponsePromise.fromPromise(this.__get(requestOptions));
73
+ }
74
+ __get(requestOptions) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
77
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
78
+ let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
79
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
80
+ 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, "attack-protection/phone-provider-protection"),
81
+ method: "GET",
82
+ headers: _headers,
83
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
84
+ 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,
85
+ 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,
86
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
87
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
88
+ logging: this._options.logging,
89
+ });
90
+ if (_response.ok) {
91
+ return {
92
+ data: _response.body,
93
+ rawResponse: _response.rawResponse,
94
+ };
95
+ }
96
+ if (_response.error.reason === "status-code") {
97
+ switch (_response.error.statusCode) {
98
+ case 401:
99
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
100
+ case 403:
101
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
102
+ case 404:
103
+ throw new Management.NotFoundError(_response.error.body, _response.rawResponse);
104
+ case 429:
105
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
106
+ default:
107
+ throw new errors.ManagementError({
108
+ statusCode: _response.error.statusCode,
109
+ body: _response.error.body,
110
+ rawResponse: _response.rawResponse,
111
+ });
112
+ }
113
+ }
114
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/attack-protection/phone-provider-protection");
115
+ });
116
+ }
117
+ /**
118
+ * Update the phone provider protection configuration for a tenant.
119
+ *
120
+ * @param {Management.PatchPhoneProviderProtectionRequestContent} request
121
+ * @param {PhoneProviderProtectionClient.RequestOptions} requestOptions - Request-specific configuration.
122
+ *
123
+ * @throws {@link Management.UnauthorizedError}
124
+ * @throws {@link Management.ForbiddenError}
125
+ * @throws {@link Management.TooManyRequestsError}
126
+ *
127
+ * @example
128
+ * await client.attackProtection.phoneProviderProtection.patch({
129
+ * type: "exponential"
130
+ * })
131
+ */
132
+ patch(request, requestOptions) {
133
+ return core.HttpResponsePromise.fromPromise(this.__patch(request, requestOptions));
134
+ }
135
+ __patch(request, requestOptions) {
136
+ return __awaiter(this, void 0, void 0, function* () {
137
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
138
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
139
+ let _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
140
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
141
+ 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, "attack-protection/phone-provider-protection"),
142
+ method: "PATCH",
143
+ headers: _headers,
144
+ contentType: "application/json",
145
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
146
+ requestType: "json",
147
+ body: request,
148
+ 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,
149
+ 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,
150
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
151
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
152
+ logging: this._options.logging,
153
+ });
154
+ if (_response.ok) {
155
+ return {
156
+ data: _response.body,
157
+ rawResponse: _response.rawResponse,
158
+ };
159
+ }
160
+ if (_response.error.reason === "status-code") {
161
+ switch (_response.error.statusCode) {
162
+ case 401:
163
+ throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
164
+ case 403:
165
+ throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
166
+ case 429:
167
+ throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
168
+ default:
169
+ throw new errors.ManagementError({
170
+ statusCode: _response.error.statusCode,
171
+ body: _response.error.body,
172
+ rawResponse: _response.rawResponse,
173
+ });
174
+ }
175
+ }
176
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/attack-protection/phone-provider-protection");
177
+ });
178
+ }
179
+ }
180
+ exports.PhoneProviderProtectionClient = PhoneProviderProtectionClient;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
@@ -11,7 +11,7 @@ export declare class ProvidersClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<ProvidersClient.Options>;
12
12
  constructor(options: ProvidersClient.Options);
13
13
  /**
14
- * Retrieve a list of <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone providers</a> details set for a Tenant. A list of fields to include or exclude may also be specified.
14
+ * Retrieve a list of [phone providers](https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers) details set for a Tenant. A list of fields to include or exclude may also be specified.
15
15
  *
16
16
  * @param {Management.ListBrandingPhoneProvidersRequestParameters} request
17
17
  * @param {ProvidersClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -29,8 +29,8 @@ export declare class ProvidersClient {
29
29
  list(request?: Management.ListBrandingPhoneProvidersRequestParameters, requestOptions?: ProvidersClient.RequestOptions): core.HttpResponsePromise<Management.ListBrandingPhoneProvidersResponseContent>;
30
30
  private __list;
31
31
  /**
32
- * Create a <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>.
33
- * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property).
32
+ * Create a [phone provider](https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers).
33
+ * The `credentials` object requires different properties depending on the phone provider (which is specified using the `name` property).
34
34
  *
35
35
  * @param {Management.CreateBrandingPhoneProviderRequestContent} request
36
36
  * @param {ProvidersClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -52,7 +52,7 @@ export declare class ProvidersClient {
52
52
  create(request: Management.CreateBrandingPhoneProviderRequestContent, requestOptions?: ProvidersClient.RequestOptions): core.HttpResponsePromise<Management.CreateBrandingPhoneProviderResponseContent>;
53
53
  private __create;
54
54
  /**
55
- * Retrieve <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a> details. A list of fields to include or exclude may also be specified.
55
+ * Retrieve [phone provider](https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers) details. A list of fields to include or exclude may also be specified.
56
56
  *
57
57
  * @param {string} id
58
58
  * @param {ProvidersClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -85,8 +85,8 @@ export declare class ProvidersClient {
85
85
  delete(id: string, requestOptions?: ProvidersClient.RequestOptions): core.HttpResponsePromise<void>;
86
86
  private __delete;
87
87
  /**
88
- * Update a <a href="https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers">phone provider</a>.
89
- * The <code>credentials</code> object requires different properties depending on the phone provider (which is specified using the <code>name</code> property).
88
+ * Update a [phone provider](https://auth0.com/docs/customize/phone-messages/configure-phone-messaging-providers).
89
+ * The `credentials` object requires different properties depending on the phone provider (which is specified using the `name` property).
90
90
  *
91
91
  * @param {string} id
92
92
  * @param {Management.UpdateBrandingPhoneProviderRequestContent} request