@wix/identity 1.0.25 → 1.0.26

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/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +2 -1
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/src/iam-recovery-v1-recovery.http.d.ts +5 -0
  5. package/build/cjs/src/iam-recovery-v1-recovery.http.js +90 -0
  6. package/build/cjs/src/iam-recovery-v1-recovery.http.js.map +1 -0
  7. package/build/cjs/src/iam-recovery-v1-recovery.public.d.ts +9 -0
  8. package/build/cjs/src/iam-recovery-v1-recovery.public.js +25 -0
  9. package/build/cjs/src/iam-recovery-v1-recovery.public.js.map +1 -0
  10. package/build/cjs/src/iam-recovery-v1-recovery.types.d.ts +188 -0
  11. package/build/cjs/src/iam-recovery-v1-recovery.types.js +48 -0
  12. package/build/cjs/src/iam-recovery-v1-recovery.types.js.map +1 -0
  13. package/build/cjs/src/iam-recovery-v1-recovery.universal.d.ts +212 -0
  14. package/build/cjs/src/iam-recovery-v1-recovery.universal.js +214 -0
  15. package/build/cjs/src/iam-recovery-v1-recovery.universal.js.map +1 -0
  16. package/build/es/index.d.ts +1 -0
  17. package/build/es/index.js +1 -0
  18. package/build/es/index.js.map +1 -1
  19. package/build/es/src/iam-recovery-v1-recovery.http.d.ts +5 -0
  20. package/build/es/src/iam-recovery-v1-recovery.http.js +85 -0
  21. package/build/es/src/iam-recovery-v1-recovery.http.js.map +1 -0
  22. package/build/es/src/iam-recovery-v1-recovery.public.d.ts +9 -0
  23. package/build/es/src/iam-recovery-v1-recovery.public.js +14 -0
  24. package/build/es/src/iam-recovery-v1-recovery.public.js.map +1 -0
  25. package/build/es/src/iam-recovery-v1-recovery.types.d.ts +188 -0
  26. package/build/es/src/iam-recovery-v1-recovery.types.js +45 -0
  27. package/build/es/src/iam-recovery-v1-recovery.types.js.map +1 -0
  28. package/build/es/src/iam-recovery-v1-recovery.universal.d.ts +212 -0
  29. package/build/es/src/iam-recovery-v1-recovery.universal.js +190 -0
  30. package/build/es/src/iam-recovery-v1-recovery.universal.js.map +1 -0
  31. package/package.json +2 -2
@@ -1,3 +1,4 @@
1
1
  export * as authentication from './src/iam-authentication-v1-authentication.public';
2
+ export * as recovery from './src/iam-recovery-v1-recovery.public';
2
3
  export * as verification from './src/iam-verification-v1-start-response.public';
3
4
  export * as oauth from './src/identity-oauth-v1-refresh-token.public';
@@ -19,8 +19,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
19
19
  return result;
20
20
  };
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.oauth = exports.verification = exports.authentication = void 0;
22
+ exports.oauth = exports.verification = exports.recovery = exports.authentication = void 0;
23
23
  exports.authentication = __importStar(require("./src/iam-authentication-v1-authentication.public"));
24
+ exports.recovery = __importStar(require("./src/iam-recovery-v1-recovery.public"));
24
25
  exports.verification = __importStar(require("./src/iam-verification-v1-start-response.public"));
25
26
  exports.oauth = __importStar(require("./src/identity-oauth-v1-refresh-token.public"));
26
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,oGAAoF;AACpF,gGAAgF;AAChF,sFAAsE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,oGAAoF;AACpF,kFAAkE;AAClE,gGAAgF;AAChF,sFAAsE"}
@@ -0,0 +1,5 @@
1
+ import { RequestOptionsFactory } from '@wix/sdk-types';
2
+ import { RecoverRequest, SendRecoveryEmailRequest, SendRecoveryEmailResponse, StateMachineResponse } from './iam-recovery-v1-recovery.types';
3
+ /** Sends an recovery email with recovery token */
4
+ export declare function sendRecoveryEmail(payload: SendRecoveryEmailRequest): RequestOptionsFactory<SendRecoveryEmailResponse>;
5
+ export declare function recover(payload: RecoverRequest): RequestOptionsFactory<StateMachineResponse>;
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.recover = exports.sendRecoveryEmail = void 0;
4
+ const ambassador_1 = require("@wix/metro-runtime/ambassador");
5
+ const metro_runtime_1 = require("@wix/metro-runtime");
6
+ const _customField = { value: '_customValue' };
7
+ const _customValue = {
8
+ numValue: 'DOUBLE',
9
+ dateValue: 'google.protobuf.Timestamp',
10
+ listValue: '_listValue',
11
+ mapValue: '_mapValue',
12
+ };
13
+ const _identity = {
14
+ createdDate: 'google.protobuf.Timestamp',
15
+ updatedDate: 'google.protobuf.Timestamp',
16
+ identityProfile: '_identityProfile',
17
+ };
18
+ const _identityProfile = { customFields: '_customField' };
19
+ const _listValue = { value: '_customValue' };
20
+ const _mapValue = { value: 'Map#_customValue' };
21
+ const _recoverRequest = {};
22
+ const _sendRecoveryEmailRequest = {};
23
+ const _sendRecoveryEmailResponse = {};
24
+ const _stateMachineResponse = { identity: '_identity' };
25
+ function resolveWixIamRecoveryV1RecoveryServiceUrl(opts) {
26
+ const domainToMappings = {
27
+ _: [
28
+ {
29
+ srcPath: '/_iam/recovery',
30
+ destPath: '',
31
+ },
32
+ ],
33
+ };
34
+ return (0, metro_runtime_1.resolveUrl)(Object.assign(opts, { domainToMappings }));
35
+ }
36
+ /** Sends an recovery email with recovery token */
37
+ function sendRecoveryEmail(payload) {
38
+ const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_sendRecoveryEmailRequest, {});
39
+ const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_sendRecoveryEmailResponse, {});
40
+ function __sendRecoveryEmail({ host }) {
41
+ const serializedData = toReq(payload);
42
+ const metadata = {
43
+ entityFqdn: 'wix.iam.recovery.v1.recovery',
44
+ method: 'POST',
45
+ methodFqn: 'wix.iam.recovery.v1.RecoveryService.SendRecoveryEmail',
46
+ url: resolveWixIamRecoveryV1RecoveryServiceUrl({
47
+ protoPath: '/v1/recovery/email',
48
+ data: serializedData,
49
+ host,
50
+ }),
51
+ data: serializedData,
52
+ transformResponse: fromRes,
53
+ };
54
+ return metadata;
55
+ }
56
+ __sendRecoveryEmail.fromReq = fromReq;
57
+ return __sendRecoveryEmail;
58
+ }
59
+ exports.sendRecoveryEmail = sendRecoveryEmail;
60
+ function recover(payload) {
61
+ const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_recoverRequest, {});
62
+ const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_stateMachineResponse, {
63
+ _customField,
64
+ _customValue,
65
+ _identity,
66
+ _identityProfile,
67
+ _listValue,
68
+ _mapValue,
69
+ });
70
+ function __recover({ host }) {
71
+ const serializedData = toReq(payload);
72
+ const metadata = {
73
+ entityFqdn: 'wix.iam.recovery.v1.recovery',
74
+ method: 'POST',
75
+ methodFqn: 'wix.iam.recovery.v1.RecoveryService.Recover',
76
+ url: resolveWixIamRecoveryV1RecoveryServiceUrl({
77
+ protoPath: '/v1/recovery/recover',
78
+ data: serializedData,
79
+ host,
80
+ }),
81
+ data: serializedData,
82
+ transformResponse: fromRes,
83
+ };
84
+ return metadata;
85
+ }
86
+ __recover.fromReq = fromReq;
87
+ return __recover;
88
+ }
89
+ exports.recover = recover;
90
+ //# sourceMappingURL=iam-recovery-v1-recovery.http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iam-recovery-v1-recovery.http.js","sourceRoot":"","sources":["../../../src/iam-recovery-v1-recovery.http.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,9 @@
1
+ import { HttpClient } from '@wix/sdk-types';
2
+ import { RecoverOptions } from './iam-recovery-v1-recovery.universal';
3
+ export declare const __metadata: {
4
+ PACKAGE_NAME: string;
5
+ };
6
+ export declare function sendRecoveryEmail(httpClient: HttpClient): (email: string) => Promise<void>;
7
+ export declare function recover(httpClient: HttpClient): (recoveryToken: string, options?: RecoverOptions | undefined) => Promise<import("./iam-recovery-v1-recovery.universal").StateMachineResponse>;
8
+ export { TenantType, StateType, Status, PrivacyStatus, StatusName, Reason, } from './iam-recovery-v1-recovery.universal';
9
+ export { RecoveryToken, SendRecoveryEmailRequest, SendRecoveryEmailResponse, RecoverRequest, StateMachineResponse, Identity, Identifier, IdentifierValueOneOf, Connection, ConnectionTypeOneOf, IdpConnection, AuthenticatorConnection, IdentityProfile, CustomField, CustomValue, CustomValueValueOneOf, ListValue, MapValue, Metadata, Email, StatusV2, RecoverOptions, } from './iam-recovery-v1-recovery.universal';
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Reason = exports.StatusName = exports.PrivacyStatus = exports.Status = exports.StateType = exports.TenantType = exports.recover = exports.sendRecoveryEmail = exports.__metadata = void 0;
4
+ const iam_recovery_v1_recovery_universal_1 = require("./iam-recovery-v1-recovery.universal");
5
+ exports.__metadata = { PACKAGE_NAME: '@wix/identity' };
6
+ function sendRecoveryEmail(httpClient) {
7
+ return (email) => (0, iam_recovery_v1_recovery_universal_1.sendRecoveryEmail)(email,
8
+ // @ts-ignore
9
+ { httpClient });
10
+ }
11
+ exports.sendRecoveryEmail = sendRecoveryEmail;
12
+ function recover(httpClient) {
13
+ return (recoveryToken, options) => (0, iam_recovery_v1_recovery_universal_1.recover)(recoveryToken, options,
14
+ // @ts-ignore
15
+ { httpClient });
16
+ }
17
+ exports.recover = recover;
18
+ var iam_recovery_v1_recovery_universal_2 = require("./iam-recovery-v1-recovery.universal");
19
+ Object.defineProperty(exports, "TenantType", { enumerable: true, get: function () { return iam_recovery_v1_recovery_universal_2.TenantType; } });
20
+ Object.defineProperty(exports, "StateType", { enumerable: true, get: function () { return iam_recovery_v1_recovery_universal_2.StateType; } });
21
+ Object.defineProperty(exports, "Status", { enumerable: true, get: function () { return iam_recovery_v1_recovery_universal_2.Status; } });
22
+ Object.defineProperty(exports, "PrivacyStatus", { enumerable: true, get: function () { return iam_recovery_v1_recovery_universal_2.PrivacyStatus; } });
23
+ Object.defineProperty(exports, "StatusName", { enumerable: true, get: function () { return iam_recovery_v1_recovery_universal_2.StatusName; } });
24
+ Object.defineProperty(exports, "Reason", { enumerable: true, get: function () { return iam_recovery_v1_recovery_universal_2.Reason; } });
25
+ //# sourceMappingURL=iam-recovery-v1-recovery.public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iam-recovery-v1-recovery.public.js","sourceRoot":"","sources":["../../../src/iam-recovery-v1-recovery.public.ts"],"names":[],"mappings":";;;AACA,6FAI8C;AAEjC,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;AAE5D,SAAgB,iBAAiB,CAAC,UAAsB;IACtD,OAAO,CAAC,KAAa,EAAE,EAAE,CACvB,IAAA,sDAA0B,EACxB,KAAK;IACL,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,8CAOC;AAED,SAAgB,OAAO,CAAC,UAAsB;IAC5C,OAAO,CAAC,aAAqB,EAAE,OAAwB,EAAE,EAAE,CACzD,IAAA,4CAAgB,EACd,aAAa,EACb,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,0BAQC;AAED,2FAO8C;AAN5C,gIAAA,UAAU,OAAA;AACV,+HAAA,SAAS,OAAA;AACT,4HAAA,MAAM,OAAA;AACN,mIAAA,aAAa,OAAA;AACb,gIAAA,UAAU,OAAA;AACV,4HAAA,MAAM,OAAA"}
@@ -0,0 +1,188 @@
1
+ /** Recovery token proto is the saved data on the recovery token. */
2
+ export interface RecoveryToken {
3
+ /**
4
+ * Recovery token ID
5
+ * @readonly
6
+ */
7
+ id?: string | null;
8
+ /**
9
+ * Represents the time this SessionToken was created
10
+ * @readonly
11
+ */
12
+ createdDate?: Date;
13
+ /**
14
+ * tenantId
15
+ * @readonly
16
+ */
17
+ tenantId?: string;
18
+ /**
19
+ * TenantType
20
+ * @readonly
21
+ */
22
+ tenantType?: TenantType;
23
+ /**
24
+ * identity id
25
+ * @readonly
26
+ */
27
+ identityId?: string;
28
+ }
29
+ export declare enum TenantType {
30
+ UNKNOWN_TENANT_TYPE = "UNKNOWN_TENANT_TYPE",
31
+ ACCOUNT = "ACCOUNT",
32
+ SITE = "SITE",
33
+ ROOT = "ROOT"
34
+ }
35
+ export interface SendRecoveryEmailRequest {
36
+ /** email of the identity */
37
+ email: string;
38
+ }
39
+ export interface SendRecoveryEmailResponse {
40
+ }
41
+ export interface RecoverRequest {
42
+ /** recovery token */
43
+ recoveryToken: string;
44
+ /** new password to set for the identity */
45
+ password?: string | null;
46
+ }
47
+ export interface StateMachineResponse {
48
+ state?: StateType;
49
+ sessionToken?: string | null;
50
+ stateToken?: string | null;
51
+ identity?: Identity;
52
+ }
53
+ export declare enum StateType {
54
+ UNKNOWN_STATE = "UNKNOWN_STATE",
55
+ SUCCESS = "SUCCESS",
56
+ REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
57
+ REQUIRE_EMAIL_VERIFICATION = "REQUIRE_EMAIL_VERIFICATION",
58
+ STATUS_CHECK = "STATUS_CHECK"
59
+ }
60
+ export interface Identity {
61
+ /** Identity ID */
62
+ id?: string | null;
63
+ identifiers?: Identifier[];
64
+ /** @readonly */
65
+ status?: Status;
66
+ /** Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision */
67
+ revision?: string | null;
68
+ /**
69
+ * Represents the time this Identity was created
70
+ * @readonly
71
+ */
72
+ createdDate?: Date;
73
+ /**
74
+ * Represents the time this Identity was last updated
75
+ * @readonly
76
+ */
77
+ updatedDate?: Date;
78
+ /** All the identity configured connections to authenticate with */
79
+ connections?: Connection[];
80
+ identityProfile?: IdentityProfile;
81
+ /** Stores additional information about the identity that can impact user access. This data can't be set by users. */
82
+ metadata?: Metadata;
83
+ email?: Email;
84
+ statusV2?: StatusV2;
85
+ }
86
+ export interface Identifier extends IdentifierValueOneOf {
87
+ email?: string;
88
+ userName?: string;
89
+ }
90
+ /** @oneof */
91
+ export interface IdentifierValueOneOf {
92
+ email?: string;
93
+ userName?: string;
94
+ }
95
+ export declare enum Status {
96
+ UNKNOWN_STATUS = "UNKNOWN_STATUS",
97
+ BLOCKED = "BLOCKED",
98
+ ACTIVE = "ACTIVE",
99
+ PROVISIONED = "PROVISIONED",
100
+ DELETED = "DELETED",
101
+ UNPROVISIONED = "UNPROVISIONED"
102
+ }
103
+ export interface Connection extends ConnectionTypeOneOf {
104
+ idpConnection?: IdpConnection;
105
+ authenticatorConnection?: AuthenticatorConnection;
106
+ }
107
+ /** @oneof */
108
+ export interface ConnectionTypeOneOf {
109
+ idpConnection?: IdpConnection;
110
+ authenticatorConnection?: AuthenticatorConnection;
111
+ }
112
+ export interface IdpConnection {
113
+ idpConnectionId?: string;
114
+ idpUserId?: string;
115
+ }
116
+ export interface AuthenticatorConnection {
117
+ authenticatorConnectionId?: string;
118
+ }
119
+ export interface IdentityProfile {
120
+ firstName?: string | null;
121
+ lastName?: string | null;
122
+ nickname?: string | null;
123
+ picture?: string | null;
124
+ emails?: string[];
125
+ phones?: string[];
126
+ labels?: string[];
127
+ language?: string | null;
128
+ privacyStatus?: PrivacyStatus;
129
+ /** custom profile fields */
130
+ customFields?: CustomField[];
131
+ }
132
+ export declare enum PrivacyStatus {
133
+ UNDEFINED = "UNDEFINED",
134
+ PUBLIC = "PUBLIC",
135
+ PRIVATE = "PRIVATE"
136
+ }
137
+ export interface CustomField {
138
+ name?: string;
139
+ value?: CustomValue;
140
+ }
141
+ export interface CustomValue extends CustomValueValueOneOf {
142
+ strValue?: string;
143
+ numValue?: number;
144
+ dateValue?: Date;
145
+ listValue?: ListValue;
146
+ mapValue?: MapValue;
147
+ }
148
+ /** @oneof */
149
+ export interface CustomValueValueOneOf {
150
+ strValue?: string;
151
+ numValue?: number;
152
+ dateValue?: Date;
153
+ listValue?: ListValue;
154
+ mapValue?: MapValue;
155
+ }
156
+ export interface ListValue {
157
+ value?: CustomValue[];
158
+ }
159
+ export interface MapValue {
160
+ value?: Record<string, CustomValue>;
161
+ }
162
+ export interface Metadata {
163
+ /**
164
+ * represents general tags such as "isOwner", "isContributor"
165
+ * @readonly
166
+ */
167
+ tags?: string[];
168
+ }
169
+ export interface Email {
170
+ address?: string;
171
+ isVerified?: boolean;
172
+ }
173
+ export interface StatusV2 {
174
+ name?: StatusName;
175
+ reasons?: Reason[];
176
+ }
177
+ export declare enum StatusName {
178
+ UNKNOWN_STATUS = "UNKNOWN_STATUS",
179
+ PENDING = "PENDING",
180
+ ACTIVE = "ACTIVE",
181
+ DELETED = "DELETED",
182
+ BLOCKED = "BLOCKED"
183
+ }
184
+ export declare enum Reason {
185
+ UNKNOWN_REASON = "UNKNOWN_REASON",
186
+ PENDING_ADMIN_APPROVAL_REQUIRED = "PENDING_ADMIN_APPROVAL_REQUIRED",
187
+ PENDING_EMAIL_VERIFICATION_REQUIRED = "PENDING_EMAIL_VERIFICATION_REQUIRED"
188
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Reason = exports.StatusName = exports.PrivacyStatus = exports.Status = exports.StateType = exports.TenantType = void 0;
4
+ var TenantType;
5
+ (function (TenantType) {
6
+ TenantType["UNKNOWN_TENANT_TYPE"] = "UNKNOWN_TENANT_TYPE";
7
+ TenantType["ACCOUNT"] = "ACCOUNT";
8
+ TenantType["SITE"] = "SITE";
9
+ TenantType["ROOT"] = "ROOT";
10
+ })(TenantType = exports.TenantType || (exports.TenantType = {}));
11
+ var StateType;
12
+ (function (StateType) {
13
+ StateType["UNKNOWN_STATE"] = "UNKNOWN_STATE";
14
+ StateType["SUCCESS"] = "SUCCESS";
15
+ StateType["REQUIRE_OWNER_APPROVAL"] = "REQUIRE_OWNER_APPROVAL";
16
+ StateType["REQUIRE_EMAIL_VERIFICATION"] = "REQUIRE_EMAIL_VERIFICATION";
17
+ StateType["STATUS_CHECK"] = "STATUS_CHECK";
18
+ })(StateType = exports.StateType || (exports.StateType = {}));
19
+ var Status;
20
+ (function (Status) {
21
+ Status["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
22
+ Status["BLOCKED"] = "BLOCKED";
23
+ Status["ACTIVE"] = "ACTIVE";
24
+ Status["PROVISIONED"] = "PROVISIONED";
25
+ Status["DELETED"] = "DELETED";
26
+ Status["UNPROVISIONED"] = "UNPROVISIONED";
27
+ })(Status = exports.Status || (exports.Status = {}));
28
+ var PrivacyStatus;
29
+ (function (PrivacyStatus) {
30
+ PrivacyStatus["UNDEFINED"] = "UNDEFINED";
31
+ PrivacyStatus["PUBLIC"] = "PUBLIC";
32
+ PrivacyStatus["PRIVATE"] = "PRIVATE";
33
+ })(PrivacyStatus = exports.PrivacyStatus || (exports.PrivacyStatus = {}));
34
+ var StatusName;
35
+ (function (StatusName) {
36
+ StatusName["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
37
+ StatusName["PENDING"] = "PENDING";
38
+ StatusName["ACTIVE"] = "ACTIVE";
39
+ StatusName["DELETED"] = "DELETED";
40
+ StatusName["BLOCKED"] = "BLOCKED";
41
+ })(StatusName = exports.StatusName || (exports.StatusName = {}));
42
+ var Reason;
43
+ (function (Reason) {
44
+ Reason["UNKNOWN_REASON"] = "UNKNOWN_REASON";
45
+ Reason["PENDING_ADMIN_APPROVAL_REQUIRED"] = "PENDING_ADMIN_APPROVAL_REQUIRED";
46
+ Reason["PENDING_EMAIL_VERIFICATION_REQUIRED"] = "PENDING_EMAIL_VERIFICATION_REQUIRED";
47
+ })(Reason = exports.Reason || (exports.Reason = {}));
48
+ //# sourceMappingURL=iam-recovery-v1-recovery.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iam-recovery-v1-recovery.types.js","sourceRoot":"","sources":["../../../src/iam-recovery-v1-recovery.types.ts"],"names":[],"mappings":";;;AA6BA,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,yDAA2C,CAAA;IAC3C,iCAAmB,CAAA;IACnB,2BAAa,CAAA;IACb,2BAAa,CAAA;AACf,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB;AAuBD,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,4CAA+B,CAAA;IAC/B,gCAAmB,CAAA;IACnB,8DAAiD,CAAA;IACjD,sEAAyD,CAAA;IACzD,0CAA6B,CAAA;AAC/B,CAAC,EANW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAMpB;AAwCD,IAAY,MAOX;AAPD,WAAY,MAAM;IAChB,2CAAiC,CAAA;IACjC,6BAAmB,CAAA;IACnB,2BAAiB,CAAA;IACjB,qCAA2B,CAAA;IAC3B,6BAAmB,CAAA;IACnB,yCAA+B,CAAA;AACjC,CAAC,EAPW,MAAM,GAAN,cAAM,KAAN,cAAM,QAOjB;AAoCD,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,wCAAuB,CAAA;IACvB,kCAAiB,CAAA;IACjB,oCAAmB,CAAA;AACrB,CAAC,EAJW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAIxB;AAkDD,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,+CAAiC,CAAA;IACjC,iCAAmB,CAAA;IACnB,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;AACrB,CAAC,EANW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAMrB;AAED,IAAY,MAIX;AAJD,WAAY,MAAM;IAChB,2CAAiC,CAAA;IACjC,6EAAmE,CAAA;IACnE,qFAA2E,CAAA;AAC7E,CAAC,EAJW,MAAM,GAAN,cAAM,KAAN,cAAM,QAIjB"}
@@ -0,0 +1,212 @@
1
+ export declare const __debug: {
2
+ verboseLogging: {
3
+ on: () => boolean;
4
+ off: () => boolean;
5
+ };
6
+ };
7
+ /** Recovery token proto is the saved data on the recovery token. */
8
+ export interface RecoveryToken {
9
+ /**
10
+ * Recovery token ID
11
+ * @readonly
12
+ */
13
+ _id?: string | null;
14
+ /**
15
+ * Represents the time this SessionToken was created
16
+ * @readonly
17
+ */
18
+ _createdDate?: Date;
19
+ /**
20
+ * tenantId
21
+ * @readonly
22
+ */
23
+ tenantId?: string;
24
+ /**
25
+ * TenantType
26
+ * @readonly
27
+ */
28
+ tenantType?: TenantType;
29
+ /**
30
+ * identity id
31
+ * @readonly
32
+ */
33
+ identityId?: string;
34
+ }
35
+ export declare enum TenantType {
36
+ UNKNOWN_TENANT_TYPE = "UNKNOWN_TENANT_TYPE",
37
+ ACCOUNT = "ACCOUNT",
38
+ SITE = "SITE",
39
+ ROOT = "ROOT"
40
+ }
41
+ export interface SendRecoveryEmailRequest {
42
+ /** email of the identity */
43
+ email: string;
44
+ }
45
+ export interface SendRecoveryEmailResponse {
46
+ }
47
+ export interface RecoverRequest {
48
+ /** recovery token */
49
+ recoveryToken: string;
50
+ /** new password to set for the identity */
51
+ password?: string | null;
52
+ }
53
+ export interface StateMachineResponse {
54
+ state?: StateType;
55
+ sessionToken?: string | null;
56
+ stateToken?: string | null;
57
+ identity?: Identity;
58
+ }
59
+ export declare enum StateType {
60
+ UNKNOWN_STATE = "UNKNOWN_STATE",
61
+ SUCCESS = "SUCCESS",
62
+ REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
63
+ REQUIRE_EMAIL_VERIFICATION = "REQUIRE_EMAIL_VERIFICATION",
64
+ STATUS_CHECK = "STATUS_CHECK"
65
+ }
66
+ export interface Identity {
67
+ /** Identity ID */
68
+ _id?: string | null;
69
+ identifiers?: Identifier[];
70
+ /** @readonly */
71
+ status?: Status;
72
+ /** Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision */
73
+ revision?: string | null;
74
+ /**
75
+ * Represents the time this Identity was created
76
+ * @readonly
77
+ */
78
+ _createdDate?: Date;
79
+ /**
80
+ * Represents the time this Identity was last updated
81
+ * @readonly
82
+ */
83
+ _updatedDate?: Date;
84
+ /** All the identity configured connections to authenticate with */
85
+ connections?: Connection[];
86
+ identityProfile?: IdentityProfile;
87
+ /** Stores additional information about the identity that can impact user access. This data can't be set by users. */
88
+ metadata?: Metadata;
89
+ email?: Email;
90
+ statusV2?: StatusV2;
91
+ }
92
+ export interface Identifier extends IdentifierValueOneOf {
93
+ email?: string;
94
+ userName?: string;
95
+ }
96
+ /** @oneof */
97
+ export interface IdentifierValueOneOf {
98
+ email?: string;
99
+ userName?: string;
100
+ }
101
+ export declare enum Status {
102
+ UNKNOWN_STATUS = "UNKNOWN_STATUS",
103
+ BLOCKED = "BLOCKED",
104
+ ACTIVE = "ACTIVE",
105
+ PROVISIONED = "PROVISIONED",
106
+ DELETED = "DELETED",
107
+ UNPROVISIONED = "UNPROVISIONED"
108
+ }
109
+ export interface Connection extends ConnectionTypeOneOf {
110
+ idpConnection?: IdpConnection;
111
+ authenticatorConnection?: AuthenticatorConnection;
112
+ }
113
+ /** @oneof */
114
+ export interface ConnectionTypeOneOf {
115
+ idpConnection?: IdpConnection;
116
+ authenticatorConnection?: AuthenticatorConnection;
117
+ }
118
+ export interface IdpConnection {
119
+ idpConnectionId?: string;
120
+ idpUserId?: string;
121
+ }
122
+ export interface AuthenticatorConnection {
123
+ authenticatorConnectionId?: string;
124
+ }
125
+ export interface IdentityProfile {
126
+ firstName?: string | null;
127
+ lastName?: string | null;
128
+ nickname?: string | null;
129
+ picture?: string | null;
130
+ emails?: string[];
131
+ phones?: string[];
132
+ labels?: string[];
133
+ language?: string | null;
134
+ privacyStatus?: PrivacyStatus;
135
+ /** custom profile fields */
136
+ customFields?: CustomField[];
137
+ }
138
+ export declare enum PrivacyStatus {
139
+ UNDEFINED = "UNDEFINED",
140
+ PUBLIC = "PUBLIC",
141
+ PRIVATE = "PRIVATE"
142
+ }
143
+ export interface CustomField {
144
+ name?: string;
145
+ value?: CustomValue;
146
+ }
147
+ export interface CustomValue extends CustomValueValueOneOf {
148
+ strValue?: string;
149
+ numValue?: number;
150
+ dateValue?: Date;
151
+ listValue?: ListValue;
152
+ mapValue?: MapValue;
153
+ }
154
+ /** @oneof */
155
+ export interface CustomValueValueOneOf {
156
+ strValue?: string;
157
+ numValue?: number;
158
+ dateValue?: Date;
159
+ listValue?: ListValue;
160
+ mapValue?: MapValue;
161
+ }
162
+ export interface ListValue {
163
+ value?: CustomValue[];
164
+ }
165
+ export interface MapValue {
166
+ value?: Record<string, CustomValue>;
167
+ }
168
+ export interface Metadata {
169
+ /**
170
+ * represents general tags such as "isOwner", "isContributor"
171
+ * @readonly
172
+ */
173
+ tags?: string[];
174
+ }
175
+ export interface Email {
176
+ address?: string;
177
+ isVerified?: boolean;
178
+ }
179
+ export interface StatusV2 {
180
+ name?: StatusName;
181
+ reasons?: Reason[];
182
+ }
183
+ export declare enum StatusName {
184
+ UNKNOWN_STATUS = "UNKNOWN_STATUS",
185
+ PENDING = "PENDING",
186
+ ACTIVE = "ACTIVE",
187
+ DELETED = "DELETED",
188
+ BLOCKED = "BLOCKED"
189
+ }
190
+ export declare enum Reason {
191
+ UNKNOWN_REASON = "UNKNOWN_REASON",
192
+ PENDING_ADMIN_APPROVAL_REQUIRED = "PENDING_ADMIN_APPROVAL_REQUIRED",
193
+ PENDING_EMAIL_VERIFICATION_REQUIRED = "PENDING_EMAIL_VERIFICATION_REQUIRED"
194
+ }
195
+ /**
196
+ * Sends an recovery email with recovery token
197
+ * @param email - email of the identity
198
+ * @public
199
+ * @documentationMaturity preview
200
+ * @requiredField email
201
+ */
202
+ export declare function sendRecoveryEmail(email: string): Promise<void>;
203
+ /** @param recoveryToken - recovery token
204
+ * @public
205
+ * @documentationMaturity preview
206
+ * @requiredField recoveryToken
207
+ */
208
+ export declare function recover(recoveryToken: string, options?: RecoverOptions): Promise<StateMachineResponse>;
209
+ export interface RecoverOptions {
210
+ /** new password to set for the identity */
211
+ password?: string | null;
212
+ }