@wix/identity 1.0.3 → 1.0.5

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 (43) 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-authentication-v1-authentication.http.d.ts +5 -0
  5. package/build/cjs/src/iam-authentication-v1-authentication.http.js +152 -0
  6. package/build/cjs/src/iam-authentication-v1-authentication.http.js.map +1 -0
  7. package/build/cjs/src/iam-authentication-v1-authentication.public.d.ts +7 -0
  8. package/build/cjs/src/iam-authentication-v1-authentication.public.js +28 -0
  9. package/build/cjs/src/iam-authentication-v1-authentication.public.js.map +1 -0
  10. package/build/cjs/src/iam-authentication-v1-authentication.types.d.ts +191 -0
  11. package/build/cjs/src/iam-authentication-v1-authentication.types.js +32 -0
  12. package/build/cjs/src/iam-authentication-v1-authentication.types.js.map +1 -0
  13. package/build/cjs/src/iam-authentication-v1-authentication.universal.d.ts +226 -0
  14. package/build/cjs/src/iam-authentication-v1-authentication.universal.js +273 -0
  15. package/build/cjs/src/iam-authentication-v1-authentication.universal.js.map +1 -0
  16. package/build/cjs/src/identity-oauth-v1-refresh-token.http.js +2 -2
  17. package/build/cjs/src/identity-oauth-v1-refresh-token.http.js.map +1 -1
  18. package/build/cjs/src/identity-oauth-v1-refresh-token.public.d.ts +1 -1
  19. package/build/cjs/src/identity-oauth-v1-refresh-token.types.d.ts +12 -0
  20. package/build/cjs/src/identity-oauth-v1-refresh-token.universal.d.ts +12 -0
  21. package/build/cjs/src/identity-oauth-v1-refresh-token.universal.js.map +1 -1
  22. package/build/es/index.d.ts +1 -0
  23. package/build/es/index.js +1 -0
  24. package/build/es/index.js.map +1 -1
  25. package/build/es/src/iam-authentication-v1-authentication.http.d.ts +5 -0
  26. package/build/es/src/iam-authentication-v1-authentication.http.js +146 -0
  27. package/build/es/src/iam-authentication-v1-authentication.http.js.map +1 -0
  28. package/build/es/src/iam-authentication-v1-authentication.public.d.ts +7 -0
  29. package/build/es/src/iam-authentication-v1-authentication.public.js +18 -0
  30. package/build/es/src/iam-authentication-v1-authentication.public.js.map +1 -0
  31. package/build/es/src/iam-authentication-v1-authentication.types.d.ts +191 -0
  32. package/build/es/src/iam-authentication-v1-authentication.types.js +29 -0
  33. package/build/es/src/iam-authentication-v1-authentication.types.js.map +1 -0
  34. package/build/es/src/iam-authentication-v1-authentication.universal.d.ts +226 -0
  35. package/build/es/src/iam-authentication-v1-authentication.universal.js +248 -0
  36. package/build/es/src/iam-authentication-v1-authentication.universal.js.map +1 -0
  37. package/build/es/src/identity-oauth-v1-refresh-token.http.js +2 -2
  38. package/build/es/src/identity-oauth-v1-refresh-token.http.js.map +1 -1
  39. package/build/es/src/identity-oauth-v1-refresh-token.public.d.ts +1 -1
  40. package/build/es/src/identity-oauth-v1-refresh-token.types.d.ts +12 -0
  41. package/build/es/src/identity-oauth-v1-refresh-token.universal.d.ts +12 -0
  42. package/build/es/src/identity-oauth-v1-refresh-token.universal.js.map +1 -1
  43. package/package.json +2 -2
@@ -1 +1,2 @@
1
+ export * as authentication from './src/iam-authentication-v1-authentication.public';
1
2
  export * as oauth from './src/identity-oauth-v1-refresh-token.public';
@@ -19,6 +19,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
19
19
  return result;
20
20
  };
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.oauth = void 0;
22
+ exports.oauth = exports.authentication = void 0;
23
+ exports.authentication = __importStar(require("./src/iam-authentication-v1-authentication.public"));
23
24
  exports.oauth = __importStar(require("./src/identity-oauth-v1-refresh-token.public"));
24
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,sFAAsE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,oGAAoF;AACpF,sFAAsE"}
@@ -0,0 +1,5 @@
1
+ import { RequestOptionsFactory } from '@wix/sdk-types';
2
+ import { LoginRequest, LoginResponse, ProceedToNextStateRequest, RegisterRequest } from './iam-authentication-v1-authentication.types';
3
+ export declare function register(payload: RegisterRequest): RequestOptionsFactory<LoginResponse>;
4
+ export declare function login(payload: LoginRequest): RequestOptionsFactory<LoginResponse>;
5
+ export declare function proceedToNextState(payload: ProceedToNextStateRequest): RequestOptionsFactory<LoginResponse>;
@@ -0,0 +1,152 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.proceedToNextState = exports.login = exports.register = 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 _loginRequest = {};
21
+ const _loginResponse = {
22
+ identity: '_identity',
23
+ additionalData: 'Map#_customValue',
24
+ };
25
+ const _mapValue = { value: 'Map#_customValue' };
26
+ const _proceedToNextStateRequest = {};
27
+ const _registerRequest = { identity: '_identity' };
28
+ function resolveWixIamAuthenticationV1AuthenticationServiceUrl(opts) {
29
+ const domainToMappings = {
30
+ _: [
31
+ {
32
+ srcPath: '/_api/iam/authentication',
33
+ destPath: '',
34
+ },
35
+ ],
36
+ 'manage._base_domain_': [
37
+ {
38
+ srcPath: '/_api/authentication',
39
+ destPath: '',
40
+ },
41
+ ],
42
+ 'users._base_domain_': [
43
+ {
44
+ srcPath: '/authentication',
45
+ destPath: '',
46
+ },
47
+ {
48
+ srcPath: '/iam/wix/google',
49
+ destPath: '/v1/sso/callback/root/0e6a50f5-b523-4e29-990d-f37fa2ffdd69',
50
+ },
51
+ ],
52
+ 'dev._base_domain_': [
53
+ {
54
+ srcPath: '/_api/iam/authentication',
55
+ destPath: '',
56
+ },
57
+ ],
58
+ };
59
+ return metro_runtime_1.resolveUrl(Object.assign(opts, { domainToMappings }));
60
+ }
61
+ function register(payload) {
62
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_registerRequest, {
63
+ _customField,
64
+ _customValue,
65
+ _identity,
66
+ _identityProfile,
67
+ _listValue,
68
+ _mapValue,
69
+ });
70
+ const { fromJSON: fromRes } = ambassador_1.serializer(_loginResponse, {
71
+ _customField,
72
+ _customValue,
73
+ _identity,
74
+ _identityProfile,
75
+ _listValue,
76
+ _mapValue,
77
+ });
78
+ function __register({ host }) {
79
+ const serializedData = toReq(payload);
80
+ const metadata = {
81
+ method: 'POST',
82
+ url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({
83
+ protoPath: '/v1/register',
84
+ data: serializedData,
85
+ host,
86
+ }),
87
+ data: serializedData,
88
+ transformResponse: fromRes,
89
+ };
90
+ return metadata;
91
+ }
92
+ __register.fromReq = fromReq;
93
+ return __register;
94
+ }
95
+ exports.register = register;
96
+ function login(payload) {
97
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_loginRequest, {});
98
+ const { fromJSON: fromRes } = ambassador_1.serializer(_loginResponse, {
99
+ _customField,
100
+ _customValue,
101
+ _identity,
102
+ _identityProfile,
103
+ _listValue,
104
+ _mapValue,
105
+ });
106
+ function __login({ host }) {
107
+ const serializedData = toReq(payload);
108
+ const metadata = {
109
+ method: 'POST',
110
+ url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({
111
+ protoPath: '/v1/login',
112
+ data: serializedData,
113
+ host,
114
+ }),
115
+ data: serializedData,
116
+ transformResponse: fromRes,
117
+ };
118
+ return metadata;
119
+ }
120
+ __login.fromReq = fromReq;
121
+ return __login;
122
+ }
123
+ exports.login = login;
124
+ function proceedToNextState(payload) {
125
+ const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_proceedToNextStateRequest, {});
126
+ const { fromJSON: fromRes } = ambassador_1.serializer(_loginResponse, {
127
+ _customField,
128
+ _customValue,
129
+ _identity,
130
+ _identityProfile,
131
+ _listValue,
132
+ _mapValue,
133
+ });
134
+ function __proceedToNextState({ host }) {
135
+ const serializedData = toReq(payload);
136
+ const metadata = {
137
+ method: 'POST',
138
+ url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({
139
+ protoPath: '/v1/state/proceed',
140
+ data: serializedData,
141
+ host,
142
+ }),
143
+ data: serializedData,
144
+ transformResponse: fromRes,
145
+ };
146
+ return metadata;
147
+ }
148
+ __proceedToNextState.fromReq = fromReq;
149
+ return __proceedToNextState;
150
+ }
151
+ exports.proceedToNextState = proceedToNextState;
152
+ //# sourceMappingURL=iam-authentication-v1-authentication.http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iam-authentication-v1-authentication.http.js","sourceRoot":"","sources":["../../../src/iam-authentication-v1-authentication.http.ts"],"names":[],"mappings":";;;AAAA,8DAA2D;AAC3D,sDAAgD;AAUhD,MAAM,YAAY,GAAG,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;AAC/C,MAAM,YAAY,GAAG;IACnB,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,2BAA2B;IACtC,SAAS,EAAE,YAAY;IACvB,QAAQ,EAAE,WAAW;CACtB,CAAC;AACF,MAAM,SAAS,GAAG;IAChB,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,2BAA2B;IACxC,eAAe,EAAE,kBAAkB;CACpC,CAAC;AACF,MAAM,gBAAgB,GAAG,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAC1D,MAAM,UAAU,GAAG,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;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CAAC;AAhCD,sBAgCC;AAED,SAAgB,kBAAkB,CAChC,OAAkC;IAElC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,uBAAU,CACrD,0BAA0B,EAC1B,EAAE,CACH,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,uBAAU,CAAC,cAAc,EAAE;QACvD,YAAY;QACZ,YAAY;QACZ,SAAS;QACT,gBAAgB;QAChB,UAAU;QACV,SAAS;KACV,CAAC,CAAC;IAEH,SAAS,oBAAoB,CAAC,EAAE,IAAI,EAAO;QACzC,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,MAAM,EAAE,MAAa;YACrB,GAAG,EAAE,qDAAqD,CAAC;gBACzD,SAAS,EAAE,mBAAmB;gBAC9B,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,oBAAoB,CAAC,OAAO,GAAG,OAAO,CAAC;IAEvC,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAnCD,gDAmCC"}
@@ -0,0 +1,7 @@
1
+ import { HttpClient } from '@wix/sdk-types';
2
+ import { Identity, Identifier, LoginOptions, ProceedToNextStateOptions, RegisterOptions } from './iam-authentication-v1-authentication.universal';
3
+ export declare function register(httpClient: HttpClient): (identity: Identity, options?: RegisterOptions | undefined) => Promise<import("./iam-authentication-v1-authentication.universal").LoginResponse>;
4
+ export declare function login(httpClient: HttpClient): (identifier: Identifier, options?: LoginOptions | undefined) => Promise<import("./iam-authentication-v1-authentication.universal").LoginResponse>;
5
+ export declare function proceedToNextState(httpClient: HttpClient): (options?: ProceedToNextStateOptions | undefined) => Promise<import("./iam-authentication-v1-authentication.universal").LoginResponse>;
6
+ export { Status, PrivacyStatus, StateStatus, TenantType, } from './iam-authentication-v1-authentication.universal';
7
+ export { Authentication, RegisterRequest, Identity, Identifier, IdentifierValueOneOf, Connection, ConnectionTypeOneOf, IdpConnection, AuthenticatorConnection, IdentityProfile, CustomField, CustomValue, CustomValueValueOneOf, ListValue, MapValue, Metadata, CaptchaToken, CaptchaTokenTokenOneOf, LoginResponse, State, LoginRequest, SuccessfulLoginEvent, LoginWithIdpConnectionRequest, RawHttpResponse, HeadersEntry, RawHttpRequest, PathParametersEntry, QueryParametersEntry, ProceedToNextStateRequest, RegisterOptions, LoginOptions, ProceedToNextStateOptions, } from './iam-authentication-v1-authentication.universal';
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TenantType = exports.StateStatus = exports.PrivacyStatus = exports.Status = exports.proceedToNextState = exports.login = exports.register = void 0;
4
+ const iam_authentication_v1_authentication_universal_1 = require("./iam-authentication-v1-authentication.universal");
5
+ function register(httpClient) {
6
+ return (identity, options) => iam_authentication_v1_authentication_universal_1.register(identity, options,
7
+ // @ts-ignore
8
+ { httpClient });
9
+ }
10
+ exports.register = register;
11
+ function login(httpClient) {
12
+ return (identifier, options) => iam_authentication_v1_authentication_universal_1.login(identifier, options,
13
+ // @ts-ignore
14
+ { httpClient });
15
+ }
16
+ exports.login = login;
17
+ function proceedToNextState(httpClient) {
18
+ return (options) => iam_authentication_v1_authentication_universal_1.proceedToNextState(options,
19
+ // @ts-ignore
20
+ { httpClient });
21
+ }
22
+ exports.proceedToNextState = proceedToNextState;
23
+ var iam_authentication_v1_authentication_universal_2 = require("./iam-authentication-v1-authentication.universal");
24
+ Object.defineProperty(exports, "Status", { enumerable: true, get: function () { return iam_authentication_v1_authentication_universal_2.Status; } });
25
+ Object.defineProperty(exports, "PrivacyStatus", { enumerable: true, get: function () { return iam_authentication_v1_authentication_universal_2.PrivacyStatus; } });
26
+ Object.defineProperty(exports, "StateStatus", { enumerable: true, get: function () { return iam_authentication_v1_authentication_universal_2.StateStatus; } });
27
+ Object.defineProperty(exports, "TenantType", { enumerable: true, get: function () { return iam_authentication_v1_authentication_universal_2.TenantType; } });
28
+ //# sourceMappingURL=iam-authentication-v1-authentication.public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iam-authentication-v1-authentication.public.js","sourceRoot":"","sources":["../../../src/iam-authentication-v1-authentication.public.ts"],"names":[],"mappings":";;;AACA,qHAS0D;AAE1D,SAAgB,QAAQ,CAAC,UAAsB;IAC7C,OAAO,CAAC,QAAkB,EAAE,OAAyB,EAAE,EAAE,CACvD,yDAAiB,CACf,QAAQ,EACR,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,4BAQC;AAED,SAAgB,KAAK,CAAC,UAAsB;IAC1C,OAAO,CAAC,UAAsB,EAAE,OAAsB,EAAE,EAAE,CACxD,sDAAc,CACZ,UAAU,EACV,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,sBAQC;AAED,SAAgB,kBAAkB,CAAC,UAAsB;IACvD,OAAO,CAAC,OAAmC,EAAE,EAAE,CAC7C,mEAA2B,CACzB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,gDAOC;AAED,mHAK0D;AAJxD,wIAAA,MAAM,OAAA;AACN,+IAAA,aAAa,OAAA;AACb,6IAAA,WAAW,OAAA;AACX,4IAAA,UAAU,OAAA"}
@@ -0,0 +1,191 @@
1
+ export interface Authentication {
2
+ }
3
+ export interface RegisterRequest {
4
+ identity: Identity;
5
+ /** TODO: when this becomes required, it will make more sense for it to be a `string` */
6
+ authenticatorId?: string | null;
7
+ inputs?: Record<string, string>;
8
+ captchaTokens?: CaptchaToken[];
9
+ }
10
+ export interface Identity {
11
+ /** Identity ID */
12
+ id?: string | null;
13
+ identifiers?: Identifier[];
14
+ /** @readonly */
15
+ status?: Status;
16
+ /** 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 */
17
+ revision?: string | null;
18
+ /**
19
+ * Represents the time this Identity was created
20
+ * @readonly
21
+ */
22
+ createdDate?: Date;
23
+ /**
24
+ * Represents the time this Identity was last updated
25
+ * @readonly
26
+ */
27
+ updatedDate?: Date;
28
+ /** All the identity configured connections to authenticate with */
29
+ connections?: Connection[];
30
+ identityProfile?: IdentityProfile;
31
+ /** Stores additional information about the identity that can impact user access. This data can't be set by users. */
32
+ metadata?: Metadata;
33
+ }
34
+ export interface Identifier extends IdentifierValueOneOf {
35
+ email?: string;
36
+ userName?: string;
37
+ }
38
+ /** @oneof */
39
+ export interface IdentifierValueOneOf {
40
+ email?: string;
41
+ userName?: string;
42
+ }
43
+ export declare enum Status {
44
+ UNKNOWN_STATUS = "UNKNOWN_STATUS",
45
+ BLOCKED = "BLOCKED",
46
+ ACTIVE = "ACTIVE",
47
+ PROVISIONED = "PROVISIONED",
48
+ DELETED = "DELETED",
49
+ UNPROVISIONED = "UNPROVISIONED"
50
+ }
51
+ export interface Connection extends ConnectionTypeOneOf {
52
+ idpConnection?: IdpConnection;
53
+ authenticatorConnection?: AuthenticatorConnection;
54
+ }
55
+ /** @oneof */
56
+ export interface ConnectionTypeOneOf {
57
+ idpConnection?: IdpConnection;
58
+ authenticatorConnection?: AuthenticatorConnection;
59
+ }
60
+ export interface IdpConnection {
61
+ idpConnectionId?: string;
62
+ idpUserId?: string;
63
+ }
64
+ export interface AuthenticatorConnection {
65
+ authenticatorConnectionId?: string;
66
+ }
67
+ export interface IdentityProfile {
68
+ firstName?: string | null;
69
+ lastName?: string | null;
70
+ nickname?: string | null;
71
+ picture?: string | null;
72
+ emails?: string[];
73
+ phones?: string[];
74
+ labels?: string[];
75
+ language?: string | null;
76
+ privacyStatus?: PrivacyStatus;
77
+ /** custom profile fields */
78
+ customFields?: CustomField[];
79
+ }
80
+ export declare enum PrivacyStatus {
81
+ UNDEFINED = "UNDEFINED",
82
+ PUBLIC = "PUBLIC",
83
+ PRIVATE = "PRIVATE"
84
+ }
85
+ export interface CustomField {
86
+ name?: string;
87
+ value?: CustomValue;
88
+ }
89
+ export interface CustomValue extends CustomValueValueOneOf {
90
+ strValue?: string;
91
+ numValue?: number;
92
+ dateValue?: Date;
93
+ listValue?: ListValue;
94
+ mapValue?: MapValue;
95
+ }
96
+ /** @oneof */
97
+ export interface CustomValueValueOneOf {
98
+ strValue?: string;
99
+ numValue?: number;
100
+ dateValue?: Date;
101
+ listValue?: ListValue;
102
+ mapValue?: MapValue;
103
+ }
104
+ export interface ListValue {
105
+ value?: CustomValue[];
106
+ }
107
+ export interface MapValue {
108
+ value?: Record<string, CustomValue>;
109
+ }
110
+ export interface Metadata {
111
+ /**
112
+ * represents general tags such as "isOwner", "isContributor"
113
+ * @readonly
114
+ */
115
+ tags?: string[];
116
+ }
117
+ export interface CaptchaToken extends CaptchaTokenTokenOneOf {
118
+ recaptcha?: string;
119
+ invisibleRecaptcha?: string;
120
+ }
121
+ /** @oneof */
122
+ export interface CaptchaTokenTokenOneOf {
123
+ recaptcha?: string;
124
+ invisibleRecaptcha?: string;
125
+ }
126
+ export interface LoginResponse {
127
+ state?: State;
128
+ sessionToken?: string | null;
129
+ identity?: Identity;
130
+ additionalData?: Record<string, CustomValue>;
131
+ }
132
+ export interface State {
133
+ status?: StateStatus;
134
+ stateToken?: string | null;
135
+ }
136
+ export declare enum StateStatus {
137
+ DONE = "DONE",
138
+ REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
139
+ STATUS_CHECK = "STATUS_CHECK"
140
+ }
141
+ export interface LoginRequest {
142
+ identifier: Identifier;
143
+ /** TODO: when this becomes required, it will make more sense for it to be a `string` */
144
+ authenticatorId?: string | null;
145
+ inputs?: Record<string, string>;
146
+ captchaTokens?: CaptchaToken[];
147
+ }
148
+ export interface SuccessfulLoginEvent {
149
+ identity?: Identity;
150
+ }
151
+ export interface LoginWithIdpConnectionRequest {
152
+ idpConnectionId?: string;
153
+ tenantId?: string;
154
+ tenantType?: TenantType;
155
+ customPayload?: Record<string, string>;
156
+ }
157
+ export declare enum TenantType {
158
+ UNKNOWN_TENANT_TYPE = "UNKNOWN_TENANT_TYPE",
159
+ ACCOUNT = "ACCOUNT",
160
+ SITE = "SITE",
161
+ ROOT = "ROOT"
162
+ }
163
+ export interface RawHttpResponse {
164
+ body?: Uint8Array;
165
+ statusCode?: number | null;
166
+ headers?: HeadersEntry[];
167
+ }
168
+ export interface HeadersEntry {
169
+ key?: string;
170
+ value?: string;
171
+ }
172
+ export interface RawHttpRequest {
173
+ body?: Uint8Array;
174
+ pathParams?: PathParametersEntry[];
175
+ queryParams?: QueryParametersEntry[];
176
+ headers?: HeadersEntry[];
177
+ method?: string;
178
+ rawPath?: string;
179
+ rawQuery?: string;
180
+ }
181
+ export interface PathParametersEntry {
182
+ key?: string;
183
+ value?: string;
184
+ }
185
+ export interface QueryParametersEntry {
186
+ key?: string;
187
+ value?: string;
188
+ }
189
+ export interface ProceedToNextStateRequest {
190
+ stateToken?: string;
191
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TenantType = exports.StateStatus = exports.PrivacyStatus = exports.Status = void 0;
4
+ var Status;
5
+ (function (Status) {
6
+ Status["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
7
+ Status["BLOCKED"] = "BLOCKED";
8
+ Status["ACTIVE"] = "ACTIVE";
9
+ Status["PROVISIONED"] = "PROVISIONED";
10
+ Status["DELETED"] = "DELETED";
11
+ Status["UNPROVISIONED"] = "UNPROVISIONED";
12
+ })(Status = exports.Status || (exports.Status = {}));
13
+ var PrivacyStatus;
14
+ (function (PrivacyStatus) {
15
+ PrivacyStatus["UNDEFINED"] = "UNDEFINED";
16
+ PrivacyStatus["PUBLIC"] = "PUBLIC";
17
+ PrivacyStatus["PRIVATE"] = "PRIVATE";
18
+ })(PrivacyStatus = exports.PrivacyStatus || (exports.PrivacyStatus = {}));
19
+ var StateStatus;
20
+ (function (StateStatus) {
21
+ StateStatus["DONE"] = "DONE";
22
+ StateStatus["REQUIRE_OWNER_APPROVAL"] = "REQUIRE_OWNER_APPROVAL";
23
+ StateStatus["STATUS_CHECK"] = "STATUS_CHECK";
24
+ })(StateStatus = exports.StateStatus || (exports.StateStatus = {}));
25
+ var TenantType;
26
+ (function (TenantType) {
27
+ TenantType["UNKNOWN_TENANT_TYPE"] = "UNKNOWN_TENANT_TYPE";
28
+ TenantType["ACCOUNT"] = "ACCOUNT";
29
+ TenantType["SITE"] = "SITE";
30
+ TenantType["ROOT"] = "ROOT";
31
+ })(TenantType = exports.TenantType || (exports.TenantType = {}));
32
+ //# sourceMappingURL=iam-authentication-v1-authentication.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iam-authentication-v1-authentication.types.js","sourceRoot":"","sources":["../../../src/iam-authentication-v1-authentication.types.ts"],"names":[],"mappings":";;;AA8CA,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;AA+DD,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,gEAAiD,CAAA;IACjD,4CAA6B,CAAA;AAC/B,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB;AAqBD,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"}
@@ -0,0 +1,226 @@
1
+ export declare const __debug: {
2
+ verboseLogging: {
3
+ on: () => boolean;
4
+ off: () => boolean;
5
+ };
6
+ };
7
+ export interface Authentication {
8
+ }
9
+ export interface RegisterRequest {
10
+ identity: Identity;
11
+ /** TODO: when this becomes required, it will make more sense for it to be a `string` */
12
+ authenticatorId?: string | null;
13
+ inputs?: Record<string, string>;
14
+ captchaTokens?: CaptchaToken[];
15
+ }
16
+ export interface Identity {
17
+ /** Identity ID */
18
+ _id?: string | null;
19
+ identifiers?: Identifier[];
20
+ /** @readonly */
21
+ status?: Status;
22
+ /** 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 */
23
+ revision?: string | null;
24
+ /**
25
+ * Represents the time this Identity was created
26
+ * @readonly
27
+ */
28
+ _createdDate?: Date;
29
+ /**
30
+ * Represents the time this Identity was last updated
31
+ * @readonly
32
+ */
33
+ _updatedDate?: Date;
34
+ /** All the identity configured connections to authenticate with */
35
+ connections?: Connection[];
36
+ identityProfile?: IdentityProfile;
37
+ /** Stores additional information about the identity that can impact user access. This data can't be set by users. */
38
+ metadata?: Metadata;
39
+ }
40
+ export interface Identifier extends IdentifierValueOneOf {
41
+ email?: string;
42
+ userName?: string;
43
+ }
44
+ /** @oneof */
45
+ export interface IdentifierValueOneOf {
46
+ email?: string;
47
+ userName?: string;
48
+ }
49
+ export declare enum Status {
50
+ UNKNOWN_STATUS = "UNKNOWN_STATUS",
51
+ BLOCKED = "BLOCKED",
52
+ ACTIVE = "ACTIVE",
53
+ PROVISIONED = "PROVISIONED",
54
+ DELETED = "DELETED",
55
+ UNPROVISIONED = "UNPROVISIONED"
56
+ }
57
+ export interface Connection extends ConnectionTypeOneOf {
58
+ idpConnection?: IdpConnection;
59
+ authenticatorConnection?: AuthenticatorConnection;
60
+ }
61
+ /** @oneof */
62
+ export interface ConnectionTypeOneOf {
63
+ idpConnection?: IdpConnection;
64
+ authenticatorConnection?: AuthenticatorConnection;
65
+ }
66
+ export interface IdpConnection {
67
+ idpConnectionId?: string;
68
+ idpUserId?: string;
69
+ }
70
+ export interface AuthenticatorConnection {
71
+ authenticatorConnectionId?: string;
72
+ }
73
+ export interface IdentityProfile {
74
+ firstName?: string | null;
75
+ lastName?: string | null;
76
+ nickname?: string | null;
77
+ picture?: string | null;
78
+ emails?: string[];
79
+ phones?: string[];
80
+ labels?: string[];
81
+ language?: string | null;
82
+ privacyStatus?: PrivacyStatus;
83
+ /** custom profile fields */
84
+ customFields?: CustomField[];
85
+ }
86
+ export declare enum PrivacyStatus {
87
+ UNDEFINED = "UNDEFINED",
88
+ PUBLIC = "PUBLIC",
89
+ PRIVATE = "PRIVATE"
90
+ }
91
+ export interface CustomField {
92
+ name?: string;
93
+ value?: CustomValue;
94
+ }
95
+ export interface CustomValue extends CustomValueValueOneOf {
96
+ strValue?: string;
97
+ numValue?: number;
98
+ dateValue?: Date;
99
+ listValue?: ListValue;
100
+ mapValue?: MapValue;
101
+ }
102
+ /** @oneof */
103
+ export interface CustomValueValueOneOf {
104
+ strValue?: string;
105
+ numValue?: number;
106
+ dateValue?: Date;
107
+ listValue?: ListValue;
108
+ mapValue?: MapValue;
109
+ }
110
+ export interface ListValue {
111
+ value?: CustomValue[];
112
+ }
113
+ export interface MapValue {
114
+ value?: Record<string, CustomValue>;
115
+ }
116
+ export interface Metadata {
117
+ /**
118
+ * represents general tags such as "isOwner", "isContributor"
119
+ * @readonly
120
+ */
121
+ tags?: string[];
122
+ }
123
+ export interface CaptchaToken extends CaptchaTokenTokenOneOf {
124
+ recaptcha?: string;
125
+ invisibleRecaptcha?: string;
126
+ }
127
+ /** @oneof */
128
+ export interface CaptchaTokenTokenOneOf {
129
+ recaptcha?: string;
130
+ invisibleRecaptcha?: string;
131
+ }
132
+ export interface LoginResponse {
133
+ state?: State;
134
+ sessionToken?: string | null;
135
+ identity?: Identity;
136
+ additionalData?: Record<string, CustomValue>;
137
+ }
138
+ export interface State {
139
+ status?: StateStatus;
140
+ stateToken?: string | null;
141
+ }
142
+ export declare enum StateStatus {
143
+ DONE = "DONE",
144
+ REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
145
+ STATUS_CHECK = "STATUS_CHECK"
146
+ }
147
+ export interface LoginRequest {
148
+ identifier: Identifier;
149
+ /** TODO: when this becomes required, it will make more sense for it to be a `string` */
150
+ authenticatorId?: string | null;
151
+ inputs?: Record<string, string>;
152
+ captchaTokens?: CaptchaToken[];
153
+ }
154
+ export interface SuccessfulLoginEvent {
155
+ identity?: Identity;
156
+ }
157
+ export interface LoginWithIdpConnectionRequest {
158
+ idpConnectionId?: string;
159
+ tenantId?: string;
160
+ tenantType?: TenantType;
161
+ customPayload?: Record<string, string>;
162
+ }
163
+ export declare enum TenantType {
164
+ UNKNOWN_TENANT_TYPE = "UNKNOWN_TENANT_TYPE",
165
+ ACCOUNT = "ACCOUNT",
166
+ SITE = "SITE",
167
+ ROOT = "ROOT"
168
+ }
169
+ export interface RawHttpResponse {
170
+ body?: Uint8Array;
171
+ statusCode?: number | null;
172
+ headers?: HeadersEntry[];
173
+ }
174
+ export interface HeadersEntry {
175
+ key?: string;
176
+ value?: string;
177
+ }
178
+ export interface RawHttpRequest {
179
+ body?: Uint8Array;
180
+ pathParams?: PathParametersEntry[];
181
+ queryParams?: QueryParametersEntry[];
182
+ headers?: HeadersEntry[];
183
+ method?: string;
184
+ rawPath?: string;
185
+ rawQuery?: string;
186
+ }
187
+ export interface PathParametersEntry {
188
+ key?: string;
189
+ value?: string;
190
+ }
191
+ export interface QueryParametersEntry {
192
+ key?: string;
193
+ value?: string;
194
+ }
195
+ export interface ProceedToNextStateRequest {
196
+ stateToken?: string;
197
+ }
198
+ /** @public
199
+ * @documentationMaturity preview
200
+ * @requiredField identity
201
+ */
202
+ export declare function register(identity: Identity, options?: RegisterOptions): Promise<LoginResponse>;
203
+ export interface RegisterOptions {
204
+ /** TODO: when this becomes required, it will make more sense for it to be a `string` */
205
+ authenticatorId?: string | null;
206
+ inputs?: Record<string, string>;
207
+ captchaTokens?: CaptchaToken[];
208
+ }
209
+ /** @public
210
+ * @documentationMaturity preview
211
+ * @requiredField identifier
212
+ */
213
+ export declare function login(identifier: Identifier, options?: LoginOptions): Promise<LoginResponse>;
214
+ export interface LoginOptions {
215
+ /** TODO: when this becomes required, it will make more sense for it to be a `string` */
216
+ authenticatorId?: string | null;
217
+ inputs?: Record<string, string>;
218
+ captchaTokens?: CaptchaToken[];
219
+ }
220
+ /** @public
221
+ * @documentationMaturity preview
222
+ */
223
+ export declare function proceedToNextState(options?: ProceedToNextStateOptions): Promise<LoginResponse>;
224
+ export interface ProceedToNextStateOptions {
225
+ stateToken?: string;
226
+ }