@thunderid/javascript 1.9.1 → 1.10.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 (31) hide show
  1. package/dist/api/auth/executeEmbeddedDeviceGrantFlow.d.ts +32 -0
  2. package/dist/api/auth/executeEmbeddedDeviceGrantFlow.d.ts.map +1 -0
  3. package/dist/api/auth/executeEmbeddedSignInFlow.d.ts.map +1 -1
  4. package/dist/api/auth/executeEmbeddedSignUpFlow.d.ts.map +1 -1
  5. package/dist/api/auth/flowSessions.d.ts +18 -0
  6. package/dist/api/auth/flowSessions.d.ts.map +1 -0
  7. package/dist/cjs/index.cjs +371 -170
  8. package/dist/edge/index.js +371 -171
  9. package/dist/i18n/models/i18n.d.ts +10 -0
  10. package/dist/i18n/models/i18n.d.ts.map +1 -1
  11. package/dist/i18n/translations/en-US.d.ts.map +1 -1
  12. package/dist/i18n/translations/fr-FR.d.ts.map +1 -1
  13. package/dist/i18n/translations/hi-IN.d.ts.map +1 -1
  14. package/dist/i18n/translations/ja-JP.d.ts.map +1 -1
  15. package/dist/i18n/translations/pt-BR.d.ts.map +1 -1
  16. package/dist/i18n/translations/pt-PT.d.ts.map +1 -1
  17. package/dist/i18n/translations/si-LK.d.ts.map +1 -1
  18. package/dist/i18n/translations/ta-IN.d.ts.map +1 -1
  19. package/dist/i18n/translations/te-IN.d.ts.map +1 -1
  20. package/dist/index.d.ts +3 -1
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +371 -171
  23. package/dist/models/backend.d.ts +5 -0
  24. package/dist/models/backend.d.ts.map +1 -1
  25. package/dist/models/embedded-flow.d.ts +13 -0
  26. package/dist/models/embedded-flow.d.ts.map +1 -1
  27. package/dist/models/embedded-signin-flow.d.ts +10 -1
  28. package/dist/models/embedded-signin-flow.d.ts.map +1 -1
  29. package/dist/models/embedded-signup-flow.d.ts +10 -1
  30. package/dist/models/embedded-signup-flow.d.ts.map +1 -1
  31. package/package.json +1 -1
@@ -0,0 +1,32 @@
1
+ import { EmbeddedFlowExecuteRequestConfig, EmbeddedFlowType } from '../../models/embedded-flow';
2
+ import { EmbeddedSignInFlowResponse } from '../../models/embedded-signin-flow';
3
+ export interface EmbeddedDeviceGrantFlowStartPayload {
4
+ applicationId: string;
5
+ flowType: EmbeddedFlowType.DeviceGrant;
6
+ inputs: {
7
+ user_code?: string;
8
+ };
9
+ }
10
+ export interface EmbeddedDeviceGrantFlowContinuationPayload {
11
+ action?: string;
12
+ challengeToken?: string;
13
+ executionId: string;
14
+ inputs?: Record<string, unknown>;
15
+ }
16
+ export type EmbeddedDeviceGrantFlowPayload = EmbeddedDeviceGrantFlowStartPayload | EmbeddedDeviceGrantFlowContinuationPayload;
17
+ /** Device Grant flow response returned by the Flow Execution API. */
18
+ export type EmbeddedDeviceGrantFlowResponse = EmbeddedSignInFlowResponse;
19
+ export interface EmbeddedDeviceGrantFlowRequestConfig extends Omit<EmbeddedFlowExecuteRequestConfig<EmbeddedDeviceGrantFlowPayload>, 'authId' | 'flowSecret'> {
20
+ payload?: EmbeddedDeviceGrantFlowPayload;
21
+ }
22
+ /**
23
+ * Executes or continues the application's configured Device Grant flow.
24
+ *
25
+ * The request starts at the existing flow execution endpoint. When the terminal flow response
26
+ * carries the server-issued authorization request ID and assertion, this function relays them
27
+ * to the existing OAuth callback endpoint. A start request requires its application ID; an optional
28
+ * user code is submitted as flow input.
29
+ */
30
+ declare const executeEmbeddedDeviceGrantFlow: ({ baseUrl, payload, url, ...requestConfig }: EmbeddedDeviceGrantFlowRequestConfig) => Promise<EmbeddedDeviceGrantFlowResponse>;
31
+ export default executeEmbeddedDeviceGrantFlow;
32
+ //# sourceMappingURL=executeEmbeddedDeviceGrantFlow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executeEmbeddedDeviceGrantFlow.d.ts","sourceRoot":"","sources":["../../../src/api/auth/executeEmbeddedDeviceGrantFlow.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,gC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C"}
1
+ {"version":3,"file":"executeEmbeddedSignInFlow.d.ts","sourceRoot":"","sources":["../../../src/api/auth/executeEmbeddedSignInFlow.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,gCAAgC,EAA0B,MAAM,4BAA4B,CAAC;AACrG,OAAO,EAAC,0BAA0B,EAA2B,MAAM,mCAAmC,CAAC;AAuEvG,QAAA,MAAM,yBAAyB,GAAU,iEAOtC,gCAAgC,KAAG,OAAO,CAAC,0BAA0B,CA0HvE,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"executeEmbeddedSignUpFlow.d.ts","sourceRoot":"","sources":["../../../src/api/auth/executeEmbeddedSignUpFlow.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,gCAAgC,IAAI,gCAAgC,EAAC,MAAM,4BAA4B,CAAC;AAChH,OAAO,EAAC,0BAA0B,EAA2B,MAAM,mCAAmC,CAAC;AAGvG,QAAA,MAAM,yBAAyB,GAAU,qDAMtC,gCAAgC,KAAG,OAAO,CAAC,0BAA0B,CA6HvE,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"executeEmbeddedSignUpFlow.d.ts","sourceRoot":"","sources":["../../../src/api/auth/executeEmbeddedSignUpFlow.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,gCAAgC,IAAI,gCAAgC,EAErE,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAC,0BAA0B,EAA2B,MAAM,mCAAmC,CAAC;AAGvG,QAAA,MAAM,yBAAyB,GAAU,qDAMtC,gCAAgC,KAAG,OAAO,CAAC,0BAA0B,CAqIvE,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { EmbeddedFlowSessionData } from '../../models/embedded-flow';
2
+ /**
3
+ * The part of a flow step response that reports SSO sessions.
4
+ */
5
+ interface FlowSessionUpdate {
6
+ clearedSessions?: string[];
7
+ sessionData?: EmbeddedFlowSessionData[];
8
+ }
9
+ /**
10
+ * Holds the sessions a flow step started under its authorization request, and drops the ones it ended.
11
+ */
12
+ export declare const collectFlowSessions: (authId: string, step: FlowSessionUpdate) => void;
13
+ /**
14
+ * Returns the sessions held for an authorization request and forgets them.
15
+ */
16
+ export declare const takeFlowSessions: (authId: string) => EmbeddedFlowSessionData[];
17
+ export {};
18
+ //# sourceMappingURL=flowSessions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flowSessions.d.ts","sourceRoot":"","sources":["../../../src/api/auth/flowSessions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,uBAAuB,EAAC,MAAM,4BAA4B,CAAC;AAEnE;;GAEG;AACH,UAAU,iBAAiB;IACzB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,uBAAuB,EAAE,CAAC;CACzC;AAOD;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,EAAE,MAAM,iBAAiB,KAAG,IAW7E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,KAAG,uBAAuB,EAKxE,CAAC"}