@thunderid/javascript 1.7.0 → 1.8.1

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 (59) hide show
  1. package/dist/ThunderIDJavaScriptClient.d.ts.map +1 -1
  2. package/dist/api/management/administration/runAccountLifecycleAction.d.ts +31 -0
  3. package/dist/api/management/administration/runAccountLifecycleAction.d.ts.map +1 -0
  4. package/dist/api/management/agents/createAgent.d.ts +1 -1
  5. package/dist/api/management/agents/updateAgent.d.ts +1 -1
  6. package/dist/cjs/index.cjs +496 -7
  7. package/dist/constants/AdministrationConstants.d.ts +20 -0
  8. package/dist/constants/AdministrationConstants.d.ts.map +1 -1
  9. package/dist/edge/index.js +487 -8
  10. package/dist/i18n/models/i18n.d.ts +26 -0
  11. package/dist/i18n/models/i18n.d.ts.map +1 -1
  12. package/dist/i18n/translations/en-US.d.ts.map +1 -1
  13. package/dist/i18n/translations/fr-FR.d.ts.map +1 -1
  14. package/dist/i18n/translations/hi-IN.d.ts.map +1 -1
  15. package/dist/i18n/translations/ja-JP.d.ts.map +1 -1
  16. package/dist/i18n/translations/pt-BR.d.ts.map +1 -1
  17. package/dist/i18n/translations/pt-PT.d.ts.map +1 -1
  18. package/dist/i18n/translations/si-LK.d.ts.map +1 -1
  19. package/dist/i18n/translations/ta-IN.d.ts.map +1 -1
  20. package/dist/i18n/translations/te-IN.d.ts.map +1 -1
  21. package/dist/index.d.ts +13 -4
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +487 -8
  24. package/dist/models/access-status.d.ts +52 -0
  25. package/dist/models/access-status.d.ts.map +1 -0
  26. package/dist/models/administration.d.ts +8 -0
  27. package/dist/models/administration.d.ts.map +1 -1
  28. package/dist/models/agent-resource.d.ts +28 -4
  29. package/dist/models/agent-resource.d.ts.map +1 -1
  30. package/dist/models/ciba.d.ts +6 -0
  31. package/dist/models/ciba.d.ts.map +1 -1
  32. package/dist/models/config.d.ts +17 -0
  33. package/dist/models/config.d.ts.map +1 -1
  34. package/dist/models/embedded-flow.d.ts +62 -3
  35. package/dist/models/embedded-flow.d.ts.map +1 -1
  36. package/dist/models/managed-user.d.ts +5 -0
  37. package/dist/models/managed-user.d.ts.map +1 -1
  38. package/dist/models/oauth-request.d.ts +52 -1
  39. package/dist/models/oauth-request.d.ts.map +1 -1
  40. package/dist/models/session.d.ts +3 -0
  41. package/dist/models/session.d.ts.map +1 -1
  42. package/dist/models/token.d.ts +11 -0
  43. package/dist/models/token.d.ts.map +1 -1
  44. package/dist/utils/AuthenticationHelper.d.ts.map +1 -1
  45. package/dist/utils/getAccountLifecycleActions.d.ts +22 -0
  46. package/dist/utils/getAccountLifecycleActions.d.ts.map +1 -0
  47. package/dist/utils/getAgentName.d.ts +19 -0
  48. package/dist/utils/getAgentName.d.ts.map +1 -0
  49. package/dist/utils/getAuthorizeRequestUrlParams.d.ts +4 -3
  50. package/dist/utils/getAuthorizeRequestUrlParams.d.ts.map +1 -1
  51. package/dist/utils/getConsentElementDecision.d.ts +20 -0
  52. package/dist/utils/getConsentElementDecision.d.ts.map +1 -0
  53. package/dist/utils/getConsentInvalidKey.d.ts +21 -0
  54. package/dist/utils/getConsentInvalidKey.d.ts.map +1 -0
  55. package/dist/utils/getConsentModifiedKey.d.ts +21 -0
  56. package/dist/utils/getConsentModifiedKey.d.ts.map +1 -0
  57. package/dist/utils/getConsentModifiedValues.d.ts +20 -0
  58. package/dist/utils/getConsentModifiedValues.d.ts.map +1 -0
  59. package/package.json +1 -1
@@ -1,13 +1,14 @@
1
- import { ExtendedAuthorizeRequestUrlParams } from '../models/oauth-request';
1
+ import { AuthorizeRequestParamValue, ExtendedAuthorizeRequestUrlParams } from '../models/oauth-request';
2
2
  /**
3
3
  * Generates a map of authorization request URL parameters for OIDC authorization requests.
4
4
  *
5
5
  * This utility ensures the `openid` scope is always included, handles both string and array forms of the `scope` parameter,
6
6
  * and supports PKCE and custom parameters. Throws if a code challenge is provided without a code challenge method.
7
7
  *
8
- * @param options - The main options for the authorization request, including redirectUri, clientId, scope, responseMode, codeChallenge, codeChallengeMethod, prompt, and randomState (a value generated from random bytes that makes the `state` unique to this request).
8
+ * @param options - The main options for the authorization request, including redirectUri, clientId, scope, responseMode, codeChallenge, codeChallengeMethod, prompt, authorizationDetails, and randomState (a value generated from random bytes that makes the `state` unique to this request).
9
9
  * @param pkceOptions - PKCE options, including the PKCE key for state correlation.
10
10
  * @param customParams - Optional custom parameters to include in the request (excluding the `state` param, which is handled separately).
11
+ * An object or array value, such as RFC 9396 `authorization_details`, is sent JSON-encoded.
11
12
  * @returns A Map of key-value pairs representing the authorization request URL parameters.
12
13
  *
13
14
  * @throws {ThunderIDRuntimeError} If a code challenge is provided without a code challenge method.
@@ -40,6 +41,6 @@ declare const getAuthorizeRequestUrlParams: (options: {
40
41
  scopes?: string;
41
42
  } & ExtendedAuthorizeRequestUrlParams, pkceOptions: {
42
43
  key: string;
43
- }, customParams: Record<string, string | number | boolean>) => Map<string, string>;
44
+ }, customParams: Record<string, AuthorizeRequestParamValue>) => Map<string, string>;
44
45
  export default getAuthorizeRequestUrlParams;
45
46
  //# sourceMappingURL=getAuthorizeRequestUrlParams.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getAuthorizeRequestUrlParams.d.ts","sourceRoot":"","sources":["../../src/utils/getAuthorizeRequestUrlParams.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,iCAAiC,EAAC,MAAM,yBAAyB,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,4BAA4B,GAChC,SAAS;IACP,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,iCAAiC,EACrC,aAAa;IAAC,GAAG,EAAE,MAAM,CAAA;CAAC,EAC1B,cAAc,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,KACtD,GAAG,CAAC,MAAM,EAAE,MAAM,CAoEpB,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
1
+ {"version":3,"file":"getAuthorizeRequestUrlParams.d.ts","sourceRoot":"","sources":["../../src/utils/getAuthorizeRequestUrlParams.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,0BAA0B,EAAE,iCAAiC,EAAC,MAAM,yBAAyB,CAAC;AAEtG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,QAAA,MAAM,4BAA4B,GAChC,SAAS;IACP,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,iCAAiC,EACrC,aAAa;IAAC,GAAG,EAAE,MAAM,CAAA;CAAC,EAC1B,cAAc,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,KACvD,GAAG,CAAC,MAAM,EAAE,MAAM,CAkFpB,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { ConsentAttributeElement, PromptElement } from '../models/embedded-flow';
2
+ /**
3
+ * Builds the decision on one optional consent element. An approved authorization detail element carries
4
+ * the values the user modified on it; any other element carries only its name and approval.
5
+ *
6
+ * @param purposeId - The identifier of the consent purpose the element belongs to.
7
+ * @param element - The consent element.
8
+ * @param approved - Whether the user approved the element.
9
+ * @param inputs - Form values, holding the JSON text of each modified field under its modified key.
10
+ * @returns The element decision.
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * getConsentElementDecision('p1', element, true, {'__consent_modified__p1__d-1__amount': '20'})
15
+ * // returns {approved: true, name: 'd-1', modified: {amount: 20}}
16
+ * ```
17
+ */
18
+ declare const getConsentElementDecision: (purposeId: string, element: PromptElement, approved: boolean, inputs: Record<string, unknown>) => ConsentAttributeElement;
19
+ export default getConsentElementDecision;
20
+ //# sourceMappingURL=getConsentElementDecision.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getConsentElementDecision.d.ts","sourceRoot":"","sources":["../../src/utils/getConsentElementDecision.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,uBAAuB,EAAE,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAE/E;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,yBAAyB,GAC7B,WAAW,MAAM,EACjB,SAAS,aAAa,EACtB,UAAU,OAAO,EACjB,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC9B,uBAMF,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Prefix of the form keys that mark an authorization detail field whose entered text cannot be submitted.
3
+ */
4
+ export declare const CONSENT_INVALID_KEY_PREFIX = "__consent_invalid__";
5
+ /**
6
+ * Generates the form key that marks one field of an authorization detail as holding text that cannot be
7
+ * submitted. The stored value is `true` while the field shows such text, and empty otherwise.
8
+ *
9
+ * @param purposeId - The identifier of the consent purpose the authorization detail belongs to.
10
+ * @param detailId - The identifier of the authorization detail, its consent element name.
11
+ * @param path - Dot-separated location of the field within the detail.
12
+ * @returns A stable form key string.
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * getConsentInvalidKey('p1', 'd-1', 'instructedAmount.amount') // returns '__consent_invalid__p1__d-1__instructedAmount.amount'
17
+ * ```
18
+ */
19
+ declare const getConsentInvalidKey: (purposeId: string, detailId: string, path: string) => string;
20
+ export default getConsentInvalidKey;
21
+ //# sourceMappingURL=getConsentInvalidKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getConsentInvalidKey.d.ts","sourceRoot":"","sources":["../../src/utils/getConsentInvalidKey.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,0BAA0B,wBAAwB,CAAC;AAEhE;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,oBAAoB,GAAI,WAAW,MAAM,EAAE,UAAU,MAAM,EAAE,MAAM,MAAM,KAAG,MACf,CAAC;AAEpE,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Prefix of the form keys that hold the values a user modified on an authorization detail.
3
+ */
4
+ export declare const CONSENT_MODIFIED_KEY_PREFIX = "__consent_modified__";
5
+ /**
6
+ * Generates the form key that holds the value a user chose for one field of an authorization
7
+ * detail. The stored value is the JSON text of the field's new value.
8
+ *
9
+ * @param purposeId - The identifier of the consent purpose the authorization detail belongs to.
10
+ * @param detailId - The identifier of the authorization detail, its consent element name.
11
+ * @param path - Dot-separated location of the field within the detail.
12
+ * @returns A stable form key string.
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * getConsentModifiedKey('p1', 'd-1', 'instructedAmount.amount') // returns '__consent_modified__p1__d-1__instructedAmount.amount'
17
+ * ```
18
+ */
19
+ declare const getConsentModifiedKey: (purposeId: string, detailId: string, path: string) => string;
20
+ export default getConsentModifiedKey;
21
+ //# sourceMappingURL=getConsentModifiedKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getConsentModifiedKey.d.ts","sourceRoot":"","sources":["../../src/utils/getConsentModifiedKey.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,2BAA2B,yBAAyB,CAAC;AAElE;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,qBAAqB,GAAI,WAAW,MAAM,EAAE,UAAU,MAAM,EAAE,MAAM,MAAM,KAAG,MACf,CAAC;AAErE,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { PromptElement } from '../models/embedded-flow';
2
+ /**
3
+ * Collects the values a user modified on an authorization detail element, for the `modified` member
4
+ * of its consent decision. Only fields the element lets the user modify are read, and a field left at
5
+ * the value that was shown, or marked as holding text that cannot be submitted, is left out.
6
+ *
7
+ * @param purposeId - The identifier of the consent purpose the element belongs to.
8
+ * @param element - The authorization detail element.
9
+ * @param inputs - Form values, holding the JSON text of each changed field under its modified key and its
10
+ * invalid marker under its invalid key.
11
+ * @returns The changed values keyed by field path, or `undefined` when nothing was changed.
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * getConsentModifiedValues('p1', element, {'__consent_modified__p1__d-1__amount': '20'}) // returns {amount: 20}
16
+ * ```
17
+ */
18
+ declare const getConsentModifiedValues: (purposeId: string, element: PromptElement, inputs: Record<string, unknown>) => Record<string, unknown> | undefined;
19
+ export default getConsentModifiedValues;
20
+ //# sourceMappingURL=getConsentModifiedValues.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getConsentModifiedValues.d.ts","sourceRoot":"","sources":["../../src/utils/getConsentModifiedValues.ts"],"names":[],"mappings":"AAKA,OAAO,EAAmB,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAExE;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,wBAAwB,GAC5B,WAAW,MAAM,EACjB,SAAS,aAAa,EACtB,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC9B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAoB5B,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thunderid/javascript",
3
- "version": "1.7.0",
3
+ "version": "1.8.1",
4
4
  "description": "JavaScript Ecosystem SDK for ThunderID",
5
5
  "keywords": [
6
6
  "thunderid",