@dfns/sdk 0.7.0 → 0.7.1-alpha.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.
@@ -59,9 +59,6 @@ export declare class AuthClient {
59
59
  recover(request: T.RecoverRequest): Promise<T.RecoverResponse>;
60
60
  /** @deprecated, use recover instead */
61
61
  createUserRecovery(request: T.RecoverRequest): Promise<T.RecoverResponse>;
62
- recreateDelegatedRegistrationChallenge(request: T.RecreateDelegatedRegistrationChallengeRequest): Promise<T.RecreateDelegatedRegistrationChallengeResponse>;
63
- /** @deprecated, use recreateDelegatedRegistrationChallenge instead */
64
- restartDelegatedUserRegistration(request: T.RecreateDelegatedRegistrationChallengeRequest): Promise<T.RecreateDelegatedRegistrationChallengeResponse>;
65
62
  register(request: T.RegisterRequest): Promise<T.RegisterResponse>;
66
63
  /** @deprecated, use register instead */
67
64
  createUserRegistration(request: T.RegisterRequest): Promise<T.RegisterResponse>;
@@ -512,22 +512,6 @@ class AuthClient {
512
512
  async createUserRecovery(request) {
513
513
  return this.recover(request);
514
514
  }
515
- async recreateDelegatedRegistrationChallenge(request) {
516
- const path = (0, url_1.buildPathAndQuery)('/auth/registration/delegated/restart', {
517
- path: request ?? {},
518
- query: {},
519
- });
520
- const response = await (0, userActionFetch_1.userActionFetch)(path, {
521
- method: 'POST',
522
- body: request.body,
523
- apiOptions: this.apiOptions,
524
- });
525
- return response.json();
526
- }
527
- /** @deprecated, use recreateDelegatedRegistrationChallenge instead */
528
- async restartDelegatedUserRegistration(request) {
529
- return this.recreateDelegatedRegistrationChallenge(request);
530
- }
531
515
  async register(request) {
532
516
  const path = (0, url_1.buildPathAndQuery)('/auth/registration', {
533
517
  path: request ?? {},
@@ -71,8 +71,6 @@ export declare class DelegatedAuthClient {
71
71
  recover(request: T.RecoverRequest): Promise<T.RecoverResponse>;
72
72
  /** @deprecated, use recover instead */
73
73
  createUserRecovery(request: T.RecoverRequest): Promise<T.RecoverResponse>;
74
- recreateDelegatedRegistrationChallengeInit(request: T.RecreateDelegatedRegistrationChallengeRequest): Promise<UserActionChallengeResponse>;
75
- recreateDelegatedRegistrationChallengeComplete(request: T.RecreateDelegatedRegistrationChallengeRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.RecreateDelegatedRegistrationChallengeResponse>;
76
74
  register(request: T.RegisterRequest): Promise<T.RegisterResponse>;
77
75
  /** @deprecated, use register instead */
78
76
  createUserRegistration(request: T.RegisterRequest): Promise<T.RegisterResponse>;
@@ -780,33 +780,6 @@ class DelegatedAuthClient {
780
780
  async createUserRecovery(request) {
781
781
  return this.recover(request);
782
782
  }
783
- async recreateDelegatedRegistrationChallengeInit(request) {
784
- const path = (0, url_1.buildPathAndQuery)('/auth/registration/delegated/restart', {
785
- path: request ?? {},
786
- query: {},
787
- });
788
- const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
789
- userActionHttpMethod: 'POST',
790
- userActionHttpPath: path,
791
- userActionPayload: JSON.stringify(request.body),
792
- userActionServerKind: 'Api',
793
- }, this.apiOptions);
794
- return challenge;
795
- }
796
- async recreateDelegatedRegistrationChallengeComplete(request, signedChallenge) {
797
- const path = (0, url_1.buildPathAndQuery)('/auth/registration/delegated/restart', {
798
- path: request ?? {},
799
- query: {},
800
- });
801
- const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
802
- const response = await (0, fetch_1.simpleFetch)(path, {
803
- method: 'POST',
804
- body: request.body,
805
- headers: { 'x-dfns-useraction': userAction },
806
- apiOptions: this.apiOptions,
807
- });
808
- return response.json();
809
- }
810
783
  async register(request) {
811
784
  const path = (0, url_1.buildPathAndQuery)('/auth/registration', {
812
785
  path: request ?? {},
@@ -627,7 +627,7 @@ export type CreateDelegatedRecoveryChallengeRequest = {
627
627
  };
628
628
  export type CreateDelegatedRegistrationChallengeBody = {
629
629
  email: string;
630
- kind: "CustomerEmployee" | "DfnsStaff" | "EndUser";
630
+ kind: "EndUser";
631
631
  externalId?: string | undefined;
632
632
  };
633
633
  export type CreateDelegatedRegistrationChallengeResponse = {
@@ -1600,47 +1600,6 @@ export type RecoverResponse = {
1600
1600
  export type RecoverRequest = {
1601
1601
  body: RecoverBody;
1602
1602
  };
1603
- export type RecreateDelegatedRegistrationChallengeBody = {
1604
- email: string;
1605
- kind: "CustomerEmployee" | "DfnsStaff" | "EndUser";
1606
- externalId?: string | undefined;
1607
- };
1608
- export type RecreateDelegatedRegistrationChallengeResponse = {
1609
- user: {
1610
- id: string;
1611
- displayName: string;
1612
- name: string;
1613
- };
1614
- temporaryAuthenticationToken: string;
1615
- challenge: string;
1616
- rp?: {
1617
- id: string;
1618
- name: string;
1619
- } | undefined;
1620
- supportedCredentialKinds: {
1621
- firstFactor: ("Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey" | "PasswordProtectedKey")[];
1622
- secondFactor: ("Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey" | "PasswordProtectedKey")[];
1623
- };
1624
- authenticatorSelection: {
1625
- authenticatorAttachment?: ("platform" | "cross-platform") | undefined;
1626
- residentKey: "required" | "preferred" | "discouraged";
1627
- requireResidentKey: boolean;
1628
- userVerification: "required" | "preferred" | "discouraged";
1629
- };
1630
- attestation: "none" | "indirect" | "direct" | "enterprise";
1631
- pubKeyCredParams: {
1632
- type: "public-key";
1633
- alg: number;
1634
- }[];
1635
- excludeCredentials: {
1636
- type: "public-key";
1637
- id: string;
1638
- }[];
1639
- otpUrl: string;
1640
- };
1641
- export type RecreateDelegatedRegistrationChallengeRequest = {
1642
- body: RecreateDelegatedRegistrationChallengeBody;
1643
- };
1644
1603
  export type RegisterBody = {
1645
1604
  firstFactorCredential: {
1646
1605
  credentialKind: "Fido2";