@wix/identity 1.0.84 → 1.0.86
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.
- package/build/cjs/context.d.ts +3 -0
- package/build/cjs/context.js +5 -1
- package/build/cjs/context.js.map +1 -0
- package/build/cjs/index.d.ts +8 -4
- package/build/cjs/index.js +16 -5
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/meta.d.ts +3 -0
- package/build/cjs/meta.js +5 -1
- package/build/cjs/meta.js.map +1 -0
- package/build/es/context.d.ts +3 -0
- package/build/es/context.js +3 -0
- package/build/es/context.js.map +1 -1
- package/build/es/index.d.ts +8 -4
- package/build/es/index.js +8 -4
- package/build/es/index.js.map +1 -1
- package/build/es/meta.d.ts +3 -0
- package/build/es/meta.js +3 -0
- package/build/es/meta.js.map +1 -1
- package/context/package.json +2 -1
- package/meta/package.json +2 -1
- package/package.json +18 -9
- package/type-bundles/context.bundle.d.ts +4115 -0
- package/type-bundles/index.bundle.d.ts +4115 -0
- package/type-bundles/meta.bundle.d.ts +4102 -0
|
@@ -0,0 +1,4115 @@
|
|
|
1
|
+
type HostModule<T, H extends Host> = {
|
|
2
|
+
__type: 'host';
|
|
3
|
+
create(host: H): T;
|
|
4
|
+
};
|
|
5
|
+
type HostModuleAPI<T extends HostModule<any, any>> = T extends HostModule<infer U, any> ? U : never;
|
|
6
|
+
type Host<Environment = unknown> = {
|
|
7
|
+
channel: {
|
|
8
|
+
observeState(callback: (props: unknown, environment: Environment) => unknown): {
|
|
9
|
+
disconnect: () => void;
|
|
10
|
+
} | Promise<{
|
|
11
|
+
disconnect: () => void;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
environment?: Environment;
|
|
15
|
+
/**
|
|
16
|
+
* Optional name of the environment, use for logging
|
|
17
|
+
*/
|
|
18
|
+
name?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Optional bast url to use for API requests, for example `www.wixapis.com`
|
|
21
|
+
*/
|
|
22
|
+
apiBaseUrl?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Possible data to be provided by every host, for cross cutting concerns
|
|
25
|
+
* like internationalization, billing, etc.
|
|
26
|
+
*/
|
|
27
|
+
essentials?: {
|
|
28
|
+
/**
|
|
29
|
+
* The language of the currently viewed session
|
|
30
|
+
*/
|
|
31
|
+
language?: string;
|
|
32
|
+
/**
|
|
33
|
+
* The locale of the currently viewed session
|
|
34
|
+
*/
|
|
35
|
+
locale?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Any headers that should be passed through to the API requests
|
|
38
|
+
*/
|
|
39
|
+
passThroughHeaders?: Record<string, string>;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
44
|
+
interface HttpClient {
|
|
45
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
46
|
+
fetchWithAuth: typeof fetch;
|
|
47
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
48
|
+
getActiveToken?: () => string | undefined;
|
|
49
|
+
}
|
|
50
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
51
|
+
type HttpResponse<T = any> = {
|
|
52
|
+
data: T;
|
|
53
|
+
status: number;
|
|
54
|
+
statusText: string;
|
|
55
|
+
headers: any;
|
|
56
|
+
request?: any;
|
|
57
|
+
};
|
|
58
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
59
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
60
|
+
url: string;
|
|
61
|
+
data?: Data;
|
|
62
|
+
params?: URLSearchParams;
|
|
63
|
+
} & APIMetadata;
|
|
64
|
+
type APIMetadata = {
|
|
65
|
+
methodFqn?: string;
|
|
66
|
+
entityFqdn?: string;
|
|
67
|
+
packageName?: string;
|
|
68
|
+
};
|
|
69
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
70
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
71
|
+
__type: 'event-definition';
|
|
72
|
+
type: Type;
|
|
73
|
+
isDomainEvent?: boolean;
|
|
74
|
+
transformations?: (envelope: unknown) => Payload;
|
|
75
|
+
__payload: Payload;
|
|
76
|
+
};
|
|
77
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
78
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
79
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
80
|
+
|
|
81
|
+
type ServicePluginMethodInput = {
|
|
82
|
+
request: any;
|
|
83
|
+
metadata: any;
|
|
84
|
+
};
|
|
85
|
+
type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
|
|
86
|
+
type ServicePluginMethodMetadata = {
|
|
87
|
+
name: string;
|
|
88
|
+
primaryHttpMappingPath: string;
|
|
89
|
+
transformations: {
|
|
90
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput;
|
|
91
|
+
toREST: (...args: unknown[]) => unknown;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
95
|
+
__type: 'service-plugin-definition';
|
|
96
|
+
componentType: string;
|
|
97
|
+
methods: ServicePluginMethodMetadata[];
|
|
98
|
+
__contract: Contract;
|
|
99
|
+
};
|
|
100
|
+
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
101
|
+
type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
|
|
102
|
+
declare const SERVICE_PLUGIN_ERROR_TYPE = "wix_spi_error";
|
|
103
|
+
|
|
104
|
+
type RequestContext = {
|
|
105
|
+
isSSR: boolean;
|
|
106
|
+
host: string;
|
|
107
|
+
protocol?: string;
|
|
108
|
+
};
|
|
109
|
+
type ResponseTransformer = (data: any, headers?: any) => any;
|
|
110
|
+
/**
|
|
111
|
+
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
112
|
+
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
113
|
+
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
114
|
+
*/
|
|
115
|
+
type Method = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
116
|
+
type AmbassadorRequestOptions<T = any> = {
|
|
117
|
+
_?: T;
|
|
118
|
+
url?: string;
|
|
119
|
+
method?: Method;
|
|
120
|
+
params?: any;
|
|
121
|
+
data?: any;
|
|
122
|
+
transformResponse?: ResponseTransformer | ResponseTransformer[];
|
|
123
|
+
};
|
|
124
|
+
type AmbassadorFactory<Request, Response> = (payload: Request) => ((context: RequestContext) => AmbassadorRequestOptions<Response>) & {
|
|
125
|
+
__isAmbassador: boolean;
|
|
126
|
+
};
|
|
127
|
+
type AmbassadorFunctionDescriptor<Request = any, Response = any> = AmbassadorFactory<Request, Response>;
|
|
128
|
+
type BuildAmbassadorFunction<T extends AmbassadorFunctionDescriptor> = T extends AmbassadorFunctionDescriptor<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
129
|
+
|
|
130
|
+
declare global {
|
|
131
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
132
|
+
interface SymbolConstructor {
|
|
133
|
+
readonly observable: symbol;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
declare const emptyObjectSymbol: unique symbol;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
Represents a strictly empty plain object, the `{}` value.
|
|
141
|
+
|
|
142
|
+
When you annotate something as the type `{}`, it can be anything except `null` and `undefined`. This means that you cannot use `{}` to represent an empty plain object ([read more](https://stackoverflow.com/questions/47339869/typescript-empty-object-and-any-difference/52193484#52193484)).
|
|
143
|
+
|
|
144
|
+
@example
|
|
145
|
+
```
|
|
146
|
+
import type {EmptyObject} from 'type-fest';
|
|
147
|
+
|
|
148
|
+
// The following illustrates the problem with `{}`.
|
|
149
|
+
const foo1: {} = {}; // Pass
|
|
150
|
+
const foo2: {} = []; // Pass
|
|
151
|
+
const foo3: {} = 42; // Pass
|
|
152
|
+
const foo4: {} = {a: 1}; // Pass
|
|
153
|
+
|
|
154
|
+
// With `EmptyObject` only the first case is valid.
|
|
155
|
+
const bar1: EmptyObject = {}; // Pass
|
|
156
|
+
const bar2: EmptyObject = 42; // Fail
|
|
157
|
+
const bar3: EmptyObject = []; // Fail
|
|
158
|
+
const bar4: EmptyObject = {a: 1}; // Fail
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Unfortunately, `Record<string, never>`, `Record<keyof any, never>` and `Record<never, never>` do not work. See {@link https://github.com/sindresorhus/type-fest/issues/395 #395}.
|
|
162
|
+
|
|
163
|
+
@category Object
|
|
164
|
+
*/
|
|
165
|
+
type EmptyObject = {[emptyObjectSymbol]?: never};
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
Returns a boolean for whether the two given types are equal.
|
|
169
|
+
|
|
170
|
+
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
171
|
+
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
172
|
+
|
|
173
|
+
Use-cases:
|
|
174
|
+
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
175
|
+
|
|
176
|
+
@example
|
|
177
|
+
```
|
|
178
|
+
import type {IsEqual} from 'type-fest';
|
|
179
|
+
|
|
180
|
+
// This type returns a boolean for whether the given array includes the given item.
|
|
181
|
+
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
182
|
+
type Includes<Value extends readonly any[], Item> =
|
|
183
|
+
Value extends readonly [Value[0], ...infer rest]
|
|
184
|
+
? IsEqual<Value[0], Item> extends true
|
|
185
|
+
? true
|
|
186
|
+
: Includes<rest, Item>
|
|
187
|
+
: false;
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
@category Type Guard
|
|
191
|
+
@category Utilities
|
|
192
|
+
*/
|
|
193
|
+
type IsEqual<A, B> =
|
|
194
|
+
(<G>() => G extends A ? 1 : 2) extends
|
|
195
|
+
(<G>() => G extends B ? 1 : 2)
|
|
196
|
+
? true
|
|
197
|
+
: false;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
Filter out keys from an object.
|
|
201
|
+
|
|
202
|
+
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
203
|
+
Returns `never` if `Key` extends `Exclude`.
|
|
204
|
+
Returns `Key` otherwise.
|
|
205
|
+
|
|
206
|
+
@example
|
|
207
|
+
```
|
|
208
|
+
type Filtered = Filter<'foo', 'foo'>;
|
|
209
|
+
//=> never
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
@example
|
|
213
|
+
```
|
|
214
|
+
type Filtered = Filter<'bar', string>;
|
|
215
|
+
//=> never
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
@example
|
|
219
|
+
```
|
|
220
|
+
type Filtered = Filter<'bar', 'foo'>;
|
|
221
|
+
//=> 'bar'
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
@see {Except}
|
|
225
|
+
*/
|
|
226
|
+
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
227
|
+
|
|
228
|
+
type ExceptOptions = {
|
|
229
|
+
/**
|
|
230
|
+
Disallow assigning non-specified properties.
|
|
231
|
+
|
|
232
|
+
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
233
|
+
|
|
234
|
+
@default false
|
|
235
|
+
*/
|
|
236
|
+
requireExactProps?: boolean;
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
Create a type from an object type without certain keys.
|
|
241
|
+
|
|
242
|
+
We recommend setting the `requireExactProps` option to `true`.
|
|
243
|
+
|
|
244
|
+
This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically.
|
|
245
|
+
|
|
246
|
+
This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)).
|
|
247
|
+
|
|
248
|
+
@example
|
|
249
|
+
```
|
|
250
|
+
import type {Except} from 'type-fest';
|
|
251
|
+
|
|
252
|
+
type Foo = {
|
|
253
|
+
a: number;
|
|
254
|
+
b: string;
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
type FooWithoutA = Except<Foo, 'a'>;
|
|
258
|
+
//=> {b: string}
|
|
259
|
+
|
|
260
|
+
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
261
|
+
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
262
|
+
|
|
263
|
+
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
264
|
+
//=> {a: number} & Partial<Record<"b", never>>
|
|
265
|
+
|
|
266
|
+
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
267
|
+
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
@category Object
|
|
271
|
+
*/
|
|
272
|
+
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
|
|
273
|
+
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
|
|
274
|
+
} & (Options['requireExactProps'] extends true
|
|
275
|
+
? Partial<Record<KeysType, never>>
|
|
276
|
+
: {});
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
Returns a boolean for whether the given type is `never`.
|
|
280
|
+
|
|
281
|
+
@link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
|
|
282
|
+
@link https://stackoverflow.com/a/53984913/10292952
|
|
283
|
+
@link https://www.zhenghao.io/posts/ts-never
|
|
284
|
+
|
|
285
|
+
Useful in type utilities, such as checking if something does not occur.
|
|
286
|
+
|
|
287
|
+
@example
|
|
288
|
+
```
|
|
289
|
+
import type {IsNever, And} from 'type-fest';
|
|
290
|
+
|
|
291
|
+
// https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
|
|
292
|
+
type AreStringsEqual<A extends string, B extends string> =
|
|
293
|
+
And<
|
|
294
|
+
IsNever<Exclude<A, B>> extends true ? true : false,
|
|
295
|
+
IsNever<Exclude<B, A>> extends true ? true : false
|
|
296
|
+
>;
|
|
297
|
+
|
|
298
|
+
type EndIfEqual<I extends string, O extends string> =
|
|
299
|
+
AreStringsEqual<I, O> extends true
|
|
300
|
+
? never
|
|
301
|
+
: void;
|
|
302
|
+
|
|
303
|
+
function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
|
|
304
|
+
if (input === output) {
|
|
305
|
+
process.exit(0);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
endIfEqual('abc', 'abc');
|
|
310
|
+
//=> never
|
|
311
|
+
|
|
312
|
+
endIfEqual('abc', '123');
|
|
313
|
+
//=> void
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
@category Type Guard
|
|
317
|
+
@category Utilities
|
|
318
|
+
*/
|
|
319
|
+
type IsNever<T> = [T] extends [never] ? true : false;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
An if-else-like type that resolves depending on whether the given type is `never`.
|
|
323
|
+
|
|
324
|
+
@see {@link IsNever}
|
|
325
|
+
|
|
326
|
+
@example
|
|
327
|
+
```
|
|
328
|
+
import type {IfNever} from 'type-fest';
|
|
329
|
+
|
|
330
|
+
type ShouldBeTrue = IfNever<never>;
|
|
331
|
+
//=> true
|
|
332
|
+
|
|
333
|
+
type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
|
|
334
|
+
//=> 'bar'
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
@category Type Guard
|
|
338
|
+
@category Utilities
|
|
339
|
+
*/
|
|
340
|
+
type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (
|
|
341
|
+
IsNever<T> extends true ? TypeIfNever : TypeIfNotNever
|
|
342
|
+
);
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
346
|
+
|
|
347
|
+
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
348
|
+
|
|
349
|
+
@example
|
|
350
|
+
```
|
|
351
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
352
|
+
|
|
353
|
+
interface Example {
|
|
354
|
+
a: string;
|
|
355
|
+
b: string | number;
|
|
356
|
+
c?: string;
|
|
357
|
+
d: {};
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
type StringKeysOnly = ConditionalKeys<Example, string>;
|
|
361
|
+
//=> 'a'
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
|
|
365
|
+
|
|
366
|
+
@example
|
|
367
|
+
```
|
|
368
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
369
|
+
|
|
370
|
+
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
371
|
+
//=> 'a' | 'c'
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
@category Object
|
|
375
|
+
*/
|
|
376
|
+
type ConditionalKeys<Base, Condition> =
|
|
377
|
+
{
|
|
378
|
+
// Map through all the keys of the given base type.
|
|
379
|
+
[Key in keyof Base]-?:
|
|
380
|
+
// Pick only keys with types extending the given `Condition` type.
|
|
381
|
+
Base[Key] extends Condition
|
|
382
|
+
// Retain this key
|
|
383
|
+
// If the value for the key extends never, only include it if `Condition` also extends never
|
|
384
|
+
? IfNever<Base[Key], IfNever<Condition, Key, never>, Key>
|
|
385
|
+
// Discard this key since the condition fails.
|
|
386
|
+
: never;
|
|
387
|
+
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
388
|
+
}[keyof Base];
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
Exclude keys from a shape that matches the given `Condition`.
|
|
392
|
+
|
|
393
|
+
This is useful when you want to create a new type with a specific set of keys from a shape. For example, you might want to exclude all the primitive properties from a class and form a new shape containing everything but the primitive properties.
|
|
394
|
+
|
|
395
|
+
@example
|
|
396
|
+
```
|
|
397
|
+
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
398
|
+
|
|
399
|
+
class Awesome {
|
|
400
|
+
name: string;
|
|
401
|
+
successes: number;
|
|
402
|
+
failures: bigint;
|
|
403
|
+
|
|
404
|
+
run() {}
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
|
|
408
|
+
//=> {run: () => void}
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
@example
|
|
412
|
+
```
|
|
413
|
+
import type {ConditionalExcept} from 'type-fest';
|
|
414
|
+
|
|
415
|
+
interface Example {
|
|
416
|
+
a: string;
|
|
417
|
+
b: string | number;
|
|
418
|
+
c: () => void;
|
|
419
|
+
d: {};
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
423
|
+
//=> {b: string | number; c: () => void; d: {}}
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
@category Object
|
|
427
|
+
*/
|
|
428
|
+
type ConditionalExcept<Base, Condition> = Except<
|
|
429
|
+
Base,
|
|
430
|
+
ConditionalKeys<Base, Condition>
|
|
431
|
+
>;
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Descriptors are objects that describe the API of a module, and the module
|
|
435
|
+
* can either be a REST module or a host module.
|
|
436
|
+
* This type is recursive, so it can describe nested modules.
|
|
437
|
+
*/
|
|
438
|
+
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition<any> | ServicePluginDefinition<any> | {
|
|
439
|
+
[key: string]: Descriptors | PublicMetadata | any;
|
|
440
|
+
};
|
|
441
|
+
/**
|
|
442
|
+
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
443
|
+
* and returns an object with the same structure, but with all descriptors replaced with their API.
|
|
444
|
+
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
445
|
+
* do not match the given host (as they will not work with the given host).
|
|
446
|
+
*/
|
|
447
|
+
type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, Depth extends number = 5> = {
|
|
448
|
+
done: T;
|
|
449
|
+
recurse: T extends {
|
|
450
|
+
__type: typeof SERVICE_PLUGIN_ERROR_TYPE;
|
|
451
|
+
} ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition<any> ? BuildEventDefinition<T> : T extends ServicePluginDefinition<any> ? BuildServicePluginDefinition<T> : T extends HostModule<any, any> ? HostModuleAPI<T> : ConditionalExcept<{
|
|
452
|
+
[Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
|
|
453
|
+
-1,
|
|
454
|
+
0,
|
|
455
|
+
1,
|
|
456
|
+
2,
|
|
457
|
+
3,
|
|
458
|
+
4,
|
|
459
|
+
5
|
|
460
|
+
][Depth]> : never;
|
|
461
|
+
}, EmptyObject>;
|
|
462
|
+
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
463
|
+
type PublicMetadata = {
|
|
464
|
+
PACKAGE_NAME?: string;
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
declare global {
|
|
468
|
+
interface ContextualClient {
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* A type used to create concerete types from SDK descriptors in
|
|
473
|
+
* case a contextual client is available.
|
|
474
|
+
*/
|
|
475
|
+
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
476
|
+
host: Host;
|
|
477
|
+
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
478
|
+
|
|
479
|
+
interface Authentication {
|
|
480
|
+
}
|
|
481
|
+
interface RegisterV2Request {
|
|
482
|
+
/** Identifier of registering member. */
|
|
483
|
+
loginId: LoginId;
|
|
484
|
+
/** Password of registering member. */
|
|
485
|
+
password?: string;
|
|
486
|
+
/** Profile information of registering member. */
|
|
487
|
+
profile?: IdentityProfile$2;
|
|
488
|
+
/** CAPTCHA tokens, when CAPTCHA setting is on. */
|
|
489
|
+
captchaTokens?: CaptchaToken[];
|
|
490
|
+
/** Additional data, relevant for the flow. */
|
|
491
|
+
clientMetaData?: Record<string, any> | null;
|
|
492
|
+
}
|
|
493
|
+
interface LoginId extends LoginIdTypeOneOf {
|
|
494
|
+
/** Login email address. */
|
|
495
|
+
email?: string;
|
|
496
|
+
}
|
|
497
|
+
/** @oneof */
|
|
498
|
+
interface LoginIdTypeOneOf {
|
|
499
|
+
/** Login email address. */
|
|
500
|
+
email?: string;
|
|
501
|
+
}
|
|
502
|
+
interface IdentityProfile$2 {
|
|
503
|
+
/** Profile first name. */
|
|
504
|
+
firstName?: string | null;
|
|
505
|
+
/** Profile last name. */
|
|
506
|
+
lastName?: string | null;
|
|
507
|
+
/** Profile nickname. */
|
|
508
|
+
nickname?: string | null;
|
|
509
|
+
/** Profile picture URL. */
|
|
510
|
+
picture?: string | null;
|
|
511
|
+
/**
|
|
512
|
+
* Deprecated. Use `secondaryEmails` instead.
|
|
513
|
+
* @deprecated Deprecated. Use `secondaryEmails` instead.
|
|
514
|
+
* @replacedBy secondary_emails
|
|
515
|
+
* @targetRemovalDate 2023-11-01
|
|
516
|
+
*/
|
|
517
|
+
emails?: string[];
|
|
518
|
+
/**
|
|
519
|
+
* Deprecated. Use `phonesV2` instead.
|
|
520
|
+
* @deprecated Deprecated. Use `phonesV2` instead.
|
|
521
|
+
* @replacedBy phones_v2
|
|
522
|
+
* @targetRemovalDate 2023-11-01
|
|
523
|
+
*/
|
|
524
|
+
phones?: string[];
|
|
525
|
+
/** List of profile labels. */
|
|
526
|
+
labels?: string[];
|
|
527
|
+
/** Profile language. */
|
|
528
|
+
language?: string | null;
|
|
529
|
+
/** Profile privacy status. */
|
|
530
|
+
privacyStatus?: PrivacyStatus$2;
|
|
531
|
+
/**
|
|
532
|
+
* Any number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts)
|
|
533
|
+
* are used to store additional information about your site or app's contacts.
|
|
534
|
+
*/
|
|
535
|
+
customFields?: CustomField$2[];
|
|
536
|
+
/** List of profile email addresses. */
|
|
537
|
+
secondaryEmails?: SecondaryEmail$2[];
|
|
538
|
+
/** List of profile phone numbers. */
|
|
539
|
+
phonesV2?: Phone$2[];
|
|
540
|
+
/** List of profile physical addresses. */
|
|
541
|
+
addresses?: AddressWrapper$2[];
|
|
542
|
+
/** Company name. */
|
|
543
|
+
company?: string | null;
|
|
544
|
+
/** Position within company. */
|
|
545
|
+
position?: string | null;
|
|
546
|
+
/** Profile birthdate - ISO-8601 extended local date format (YYYY-MM-DD). */
|
|
547
|
+
birthdate?: string | null;
|
|
548
|
+
}
|
|
549
|
+
declare enum PrivacyStatus$2 {
|
|
550
|
+
UNDEFINED = "UNDEFINED",
|
|
551
|
+
PUBLIC = "PUBLIC",
|
|
552
|
+
PRIVATE = "PRIVATE"
|
|
553
|
+
}
|
|
554
|
+
interface CustomField$2 {
|
|
555
|
+
/**
|
|
556
|
+
* Custom field name. The name must match one of the key properties of the objects returned by
|
|
557
|
+
* [`List Extended Fields`](https://dev.wix.com/docs/rest/api-reference/contacts/extended-fields/list-extended-fields)
|
|
558
|
+
* with the `custom.` prefix removed.
|
|
559
|
+
*/
|
|
560
|
+
name?: string;
|
|
561
|
+
/** Custom field value. */
|
|
562
|
+
value?: V1CustomValue$2;
|
|
563
|
+
}
|
|
564
|
+
interface V1CustomValue$2 extends V1CustomValueValueOneOf$2 {
|
|
565
|
+
/** String value. */
|
|
566
|
+
strValue?: string;
|
|
567
|
+
/** Number value. */
|
|
568
|
+
numValue?: number;
|
|
569
|
+
/** Date value. */
|
|
570
|
+
dateValue?: Date | null;
|
|
571
|
+
/** List value. */
|
|
572
|
+
listValue?: V1ListValue$2;
|
|
573
|
+
/** Map value. */
|
|
574
|
+
mapValue?: V1MapValue$2;
|
|
575
|
+
}
|
|
576
|
+
/** @oneof */
|
|
577
|
+
interface V1CustomValueValueOneOf$2 {
|
|
578
|
+
/** String value. */
|
|
579
|
+
strValue?: string;
|
|
580
|
+
/** Number value. */
|
|
581
|
+
numValue?: number;
|
|
582
|
+
/** Date value. */
|
|
583
|
+
dateValue?: Date | null;
|
|
584
|
+
/** List value. */
|
|
585
|
+
listValue?: V1ListValue$2;
|
|
586
|
+
/** Map value. */
|
|
587
|
+
mapValue?: V1MapValue$2;
|
|
588
|
+
}
|
|
589
|
+
interface V1ListValue$2 {
|
|
590
|
+
/** Custom value. */
|
|
591
|
+
value?: V1CustomValue$2[];
|
|
592
|
+
}
|
|
593
|
+
interface V1MapValue$2 {
|
|
594
|
+
/** Mapped custom value. */
|
|
595
|
+
value?: Record<string, V1CustomValue$2>;
|
|
596
|
+
}
|
|
597
|
+
interface SecondaryEmail$2 {
|
|
598
|
+
/** Email address. */
|
|
599
|
+
email?: string;
|
|
600
|
+
/** Email tag. */
|
|
601
|
+
tag?: EmailTag$2;
|
|
602
|
+
}
|
|
603
|
+
declare enum EmailTag$2 {
|
|
604
|
+
UNTAGGED = "UNTAGGED",
|
|
605
|
+
MAIN = "MAIN",
|
|
606
|
+
HOME = "HOME",
|
|
607
|
+
WORK = "WORK"
|
|
608
|
+
}
|
|
609
|
+
interface Phone$2 {
|
|
610
|
+
/** Phone country code. */
|
|
611
|
+
countryCode?: string | null;
|
|
612
|
+
/** Phone number. */
|
|
613
|
+
phone?: string;
|
|
614
|
+
/** Phone tag. */
|
|
615
|
+
tag?: PhoneTag$2;
|
|
616
|
+
}
|
|
617
|
+
declare enum PhoneTag$2 {
|
|
618
|
+
UNTAGGED = "UNTAGGED",
|
|
619
|
+
MAIN = "MAIN",
|
|
620
|
+
HOME = "HOME",
|
|
621
|
+
MOBILE = "MOBILE",
|
|
622
|
+
WORK = "WORK",
|
|
623
|
+
FAX = "FAX"
|
|
624
|
+
}
|
|
625
|
+
interface AddressWrapper$2 {
|
|
626
|
+
/** Address. */
|
|
627
|
+
address?: Address$2;
|
|
628
|
+
/** Address tag. */
|
|
629
|
+
tag?: AddressTag$2;
|
|
630
|
+
}
|
|
631
|
+
/** Physical address */
|
|
632
|
+
interface Address$2 {
|
|
633
|
+
/** Country code. */
|
|
634
|
+
country?: string | null;
|
|
635
|
+
/** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
|
|
636
|
+
subdivision?: string | null;
|
|
637
|
+
/** City name. */
|
|
638
|
+
city?: string | null;
|
|
639
|
+
/** Zip/postal code. */
|
|
640
|
+
postalCode?: string | null;
|
|
641
|
+
/** Main address line, usually street and number as free text. */
|
|
642
|
+
addressLine1?: string | null;
|
|
643
|
+
/** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
|
|
644
|
+
addressLine2?: string | null;
|
|
645
|
+
}
|
|
646
|
+
declare enum AddressTag$2 {
|
|
647
|
+
UNTAGGED = "UNTAGGED",
|
|
648
|
+
HOME = "HOME",
|
|
649
|
+
WORK = "WORK",
|
|
650
|
+
BILLING = "BILLING",
|
|
651
|
+
SHIPPING = "SHIPPING"
|
|
652
|
+
}
|
|
653
|
+
interface CaptchaToken extends CaptchaTokenTokenOneOf {
|
|
654
|
+
Recaptcha?: string;
|
|
655
|
+
InvisibleRecaptcha?: string;
|
|
656
|
+
NoCaptcha?: string;
|
|
657
|
+
}
|
|
658
|
+
/** @oneof */
|
|
659
|
+
interface CaptchaTokenTokenOneOf {
|
|
660
|
+
Recaptcha?: string;
|
|
661
|
+
InvisibleRecaptcha?: string;
|
|
662
|
+
NoCaptcha?: string;
|
|
663
|
+
}
|
|
664
|
+
interface StateMachineResponse$2 {
|
|
665
|
+
/** The current state of the login or registration process. */
|
|
666
|
+
state?: StateType$2;
|
|
667
|
+
/** If state is `SUCCESS`, a session token. */
|
|
668
|
+
sessionToken?: string | null;
|
|
669
|
+
/** A token representing the current state of the login or registration process. */
|
|
670
|
+
stateToken?: string | null;
|
|
671
|
+
/** Identing of the current member. */
|
|
672
|
+
identity?: Identity$2;
|
|
673
|
+
/** additional_data = 5; //TBD */
|
|
674
|
+
additionalData?: Record<string, CustomValue$2>;
|
|
675
|
+
}
|
|
676
|
+
declare enum StateType$2 {
|
|
677
|
+
/** Initial unknown state. */
|
|
678
|
+
UNKNOWN_STATE = "UNKNOWN_STATE",
|
|
679
|
+
/** The operation completed successfully. */
|
|
680
|
+
SUCCESS = "SUCCESS",
|
|
681
|
+
/** State that indicates that the member needs owner approval to proceed, available action in: OwnerApprovalStateHandler */
|
|
682
|
+
REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
|
|
683
|
+
/**
|
|
684
|
+
* State that indicates a member waiting for verification, available action are: verifyDuringAuthentication or resendDuringAuthentication
|
|
685
|
+
* https://dev.wix.com/docs/rest/api-reference/auth-management/verification-v1/verify-during-authentication
|
|
686
|
+
*/
|
|
687
|
+
REQUIRE_EMAIL_VERIFICATION = "REQUIRE_EMAIL_VERIFICATION",
|
|
688
|
+
/** State that indicates checking that the status is not one of the `invalidStates` before proceeding. */
|
|
689
|
+
STATUS_CHECK = "STATUS_CHECK",
|
|
690
|
+
REQUIRE_MFA = "REQUIRE_MFA"
|
|
691
|
+
}
|
|
692
|
+
interface Identity$2 {
|
|
693
|
+
/** Identity ID */
|
|
694
|
+
_id?: string | null;
|
|
695
|
+
/**
|
|
696
|
+
* Identifiers
|
|
697
|
+
* @deprecated Identifiers
|
|
698
|
+
* @replacedBy email
|
|
699
|
+
* @targetRemovalDate 2023-05-01
|
|
700
|
+
*/
|
|
701
|
+
identifiers?: Identifier$2[];
|
|
702
|
+
/**
|
|
703
|
+
* Represents the current state of an item. Each time the item is modified, its `revision` changes.
|
|
704
|
+
* For an update operation to succeed, you MUST pass the latest revision.
|
|
705
|
+
*/
|
|
706
|
+
revision?: string | null;
|
|
707
|
+
/**
|
|
708
|
+
* The time this identity was created.
|
|
709
|
+
* @readonly
|
|
710
|
+
*/
|
|
711
|
+
_createdDate?: Date | null;
|
|
712
|
+
/**
|
|
713
|
+
* The time this identity was last updated.
|
|
714
|
+
* @readonly
|
|
715
|
+
*/
|
|
716
|
+
_updatedDate?: Date | null;
|
|
717
|
+
/** The identity configured connections to authenticate with. */
|
|
718
|
+
connections?: Connection$2[];
|
|
719
|
+
/** Identity profile. */
|
|
720
|
+
identityProfile?: IdentityProfile$2;
|
|
721
|
+
/**
|
|
722
|
+
* Additional information about the identity that can impact user access.
|
|
723
|
+
* This data cannot be set.
|
|
724
|
+
*/
|
|
725
|
+
metadata?: Metadata$2;
|
|
726
|
+
/** Identity email address. */
|
|
727
|
+
email?: Email$2;
|
|
728
|
+
/** Identity's current status. */
|
|
729
|
+
status?: StatusV2$2;
|
|
730
|
+
/** filled by pre registered spi */
|
|
731
|
+
customAttributes?: Record<string, any> | null;
|
|
732
|
+
/**
|
|
733
|
+
* Identity factors.
|
|
734
|
+
* @readonly
|
|
735
|
+
*/
|
|
736
|
+
factors?: Factor$2[];
|
|
737
|
+
}
|
|
738
|
+
interface Identifier$2 extends IdentifierValueOneOf$2 {
|
|
739
|
+
email?: string;
|
|
740
|
+
userName?: string;
|
|
741
|
+
}
|
|
742
|
+
/** @oneof */
|
|
743
|
+
interface IdentifierValueOneOf$2 {
|
|
744
|
+
email?: string;
|
|
745
|
+
userName?: string;
|
|
746
|
+
}
|
|
747
|
+
interface Connection$2 extends ConnectionTypeOneOf$2 {
|
|
748
|
+
/** IDP connection. */
|
|
749
|
+
idpConnection?: IdpConnection$2;
|
|
750
|
+
/** Authenticator connection. */
|
|
751
|
+
authenticatorConnection?: AuthenticatorConnection$2;
|
|
752
|
+
}
|
|
753
|
+
/** @oneof */
|
|
754
|
+
interface ConnectionTypeOneOf$2 {
|
|
755
|
+
/** IDP connection. */
|
|
756
|
+
idpConnection?: IdpConnection$2;
|
|
757
|
+
/** Authenticator connection. */
|
|
758
|
+
authenticatorConnection?: AuthenticatorConnection$2;
|
|
759
|
+
}
|
|
760
|
+
interface IdpConnection$2 {
|
|
761
|
+
/** IDP connection ID. */
|
|
762
|
+
idpConnectionId?: string;
|
|
763
|
+
/** IDP user ID. */
|
|
764
|
+
idpUserId?: string;
|
|
765
|
+
}
|
|
766
|
+
interface AuthenticatorConnection$2 {
|
|
767
|
+
/** Authenticator connection ID. */
|
|
768
|
+
authenticatorConnectionId?: string;
|
|
769
|
+
/** Whether re-enrollment is required. */
|
|
770
|
+
reEnrollmentRequired?: boolean;
|
|
771
|
+
}
|
|
772
|
+
interface Metadata$2 {
|
|
773
|
+
/**
|
|
774
|
+
* represents general tags such as "isOwner", "isContributor"
|
|
775
|
+
* @readonly
|
|
776
|
+
*/
|
|
777
|
+
tags?: string[];
|
|
778
|
+
}
|
|
779
|
+
interface Email$2 {
|
|
780
|
+
address?: string;
|
|
781
|
+
isVerified?: boolean;
|
|
782
|
+
}
|
|
783
|
+
interface StatusV2$2 {
|
|
784
|
+
name?: StatusName$2;
|
|
785
|
+
reasons?: Reason$2[];
|
|
786
|
+
}
|
|
787
|
+
declare enum StatusName$2 {
|
|
788
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
789
|
+
PENDING = "PENDING",
|
|
790
|
+
ACTIVE = "ACTIVE",
|
|
791
|
+
DELETED = "DELETED",
|
|
792
|
+
BLOCKED = "BLOCKED",
|
|
793
|
+
OFFLINE = "OFFLINE"
|
|
794
|
+
}
|
|
795
|
+
declare enum Reason$2 {
|
|
796
|
+
UNKNOWN_REASON = "UNKNOWN_REASON",
|
|
797
|
+
PENDING_ADMIN_APPROVAL_REQUIRED = "PENDING_ADMIN_APPROVAL_REQUIRED",
|
|
798
|
+
PENDING_EMAIL_VERIFICATION_REQUIRED = "PENDING_EMAIL_VERIFICATION_REQUIRED"
|
|
799
|
+
}
|
|
800
|
+
interface Factor$2 {
|
|
801
|
+
/** Factor ID. */
|
|
802
|
+
factorId?: string;
|
|
803
|
+
/** Factor type. */
|
|
804
|
+
type?: FactorType$2;
|
|
805
|
+
/** Factor status. */
|
|
806
|
+
status?: Status$2;
|
|
807
|
+
}
|
|
808
|
+
declare enum FactorType$2 {
|
|
809
|
+
UNKNOWN_FACTOR_TYPE = "UNKNOWN_FACTOR_TYPE",
|
|
810
|
+
PASSWORD = "PASSWORD",
|
|
811
|
+
SMS = "SMS",
|
|
812
|
+
CALL = "CALL",
|
|
813
|
+
EMAIL = "EMAIL",
|
|
814
|
+
TOTP = "TOTP",
|
|
815
|
+
PUSH = "PUSH"
|
|
816
|
+
}
|
|
817
|
+
declare enum Status$2 {
|
|
818
|
+
/** Factor requires activation. */
|
|
819
|
+
INACTIVE = "INACTIVE",
|
|
820
|
+
/** Factor is active and can be used for authentication. */
|
|
821
|
+
ACTIVE = "ACTIVE",
|
|
822
|
+
/** Factor is blocked and cannot be used for authentication. The user should reenroll the factor. */
|
|
823
|
+
REQUIRE_REENROLL = "REQUIRE_REENROLL"
|
|
824
|
+
}
|
|
825
|
+
interface CustomValue$2 extends CustomValueValueOneOf$2 {
|
|
826
|
+
/** String value. */
|
|
827
|
+
strValue?: string;
|
|
828
|
+
/** Number value. */
|
|
829
|
+
numValue?: number;
|
|
830
|
+
/** Date value. */
|
|
831
|
+
dateValue?: Date | null;
|
|
832
|
+
/** List value. */
|
|
833
|
+
listValue?: ListValue$2;
|
|
834
|
+
/** Map value. */
|
|
835
|
+
mapValue?: MapValue$2;
|
|
836
|
+
}
|
|
837
|
+
/** @oneof */
|
|
838
|
+
interface CustomValueValueOneOf$2 {
|
|
839
|
+
/** String value. */
|
|
840
|
+
strValue?: string;
|
|
841
|
+
/** Number value. */
|
|
842
|
+
numValue?: number;
|
|
843
|
+
/** Date value. */
|
|
844
|
+
dateValue?: Date | null;
|
|
845
|
+
/** List value. */
|
|
846
|
+
listValue?: ListValue$2;
|
|
847
|
+
/** Map value. */
|
|
848
|
+
mapValue?: MapValue$2;
|
|
849
|
+
}
|
|
850
|
+
interface ListValue$2 {
|
|
851
|
+
/** Custom value. */
|
|
852
|
+
value?: CustomValue$2[];
|
|
853
|
+
}
|
|
854
|
+
interface MapValue$2 {
|
|
855
|
+
/** Mapped custom value. */
|
|
856
|
+
value?: Record<string, CustomValue$2>;
|
|
857
|
+
}
|
|
858
|
+
interface LoginV2Request {
|
|
859
|
+
/** Identifier of identity logging in. */
|
|
860
|
+
loginId: LoginId;
|
|
861
|
+
/** Password of the identity logging in. */
|
|
862
|
+
password?: string;
|
|
863
|
+
/** CAPTCHA tokens, when CAPTCHA setting is on. */
|
|
864
|
+
captchaTokens?: CaptchaToken[];
|
|
865
|
+
/** Additional data, relevant for the flow. */
|
|
866
|
+
clientMetaData?: Record<string, any> | null;
|
|
867
|
+
}
|
|
868
|
+
interface ChangePasswordRequest {
|
|
869
|
+
/** The new password to set for the logged in user */
|
|
870
|
+
newPassword: string;
|
|
871
|
+
}
|
|
872
|
+
interface ChangePasswordResponse {
|
|
873
|
+
}
|
|
874
|
+
interface LoginWithIdpConnectionRequest {
|
|
875
|
+
/** The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData */
|
|
876
|
+
idpConnectionId: string;
|
|
877
|
+
/** The id of the tenant the caller wants to login into */
|
|
878
|
+
tenantId: string;
|
|
879
|
+
/** The type of the tenant the caller wants to login into */
|
|
880
|
+
tenantType: TenantType$1;
|
|
881
|
+
customPayload?: Record<string, string>;
|
|
882
|
+
/**
|
|
883
|
+
* This flow ultimately returns an HTML page that asynchronously posts the LoginResponse via the BroadcastChannel API.
|
|
884
|
+
* The message will be posted to a channel named `wix-idp-$session_id`, and encrypted with the `encryption_key`.
|
|
885
|
+
* Encryption key should be base64 encoded. Encryption is done using AES-GCM with a random IV that's sent alongside the payload
|
|
886
|
+
*/
|
|
887
|
+
sessionId: string;
|
|
888
|
+
encryptionKey: string;
|
|
889
|
+
visitorId?: string | null;
|
|
890
|
+
bsi?: string | null;
|
|
891
|
+
}
|
|
892
|
+
declare enum TenantType$1 {
|
|
893
|
+
UNKNOWN_TENANT_TYPE = "UNKNOWN_TENANT_TYPE",
|
|
894
|
+
ACCOUNT = "ACCOUNT",
|
|
895
|
+
SITE = "SITE",
|
|
896
|
+
ROOT = "ROOT"
|
|
897
|
+
}
|
|
898
|
+
interface RawHttpResponse$1 {
|
|
899
|
+
body?: Uint8Array;
|
|
900
|
+
statusCode?: number | null;
|
|
901
|
+
headers?: HeadersEntry$1[];
|
|
902
|
+
}
|
|
903
|
+
interface HeadersEntry$1 {
|
|
904
|
+
key?: string;
|
|
905
|
+
value?: string;
|
|
906
|
+
}
|
|
907
|
+
interface RawHttpRequest$1 {
|
|
908
|
+
body?: Uint8Array;
|
|
909
|
+
pathParams?: PathParametersEntry$1[];
|
|
910
|
+
queryParams?: QueryParametersEntry$1[];
|
|
911
|
+
headers?: HeadersEntry$1[];
|
|
912
|
+
method?: string;
|
|
913
|
+
rawPath?: string;
|
|
914
|
+
rawQuery?: string;
|
|
915
|
+
}
|
|
916
|
+
interface PathParametersEntry$1 {
|
|
917
|
+
key?: string;
|
|
918
|
+
value?: string;
|
|
919
|
+
}
|
|
920
|
+
interface QueryParametersEntry$1 {
|
|
921
|
+
key?: string;
|
|
922
|
+
value?: string;
|
|
923
|
+
}
|
|
924
|
+
interface LoginCallbackRequest {
|
|
925
|
+
/** state that that received on the redirect */
|
|
926
|
+
state?: string;
|
|
927
|
+
/** session token */
|
|
928
|
+
sessionToken?: string;
|
|
929
|
+
}
|
|
930
|
+
interface LoginWithIdpConnectionTokenParamsRequest {
|
|
931
|
+
/** The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData */
|
|
932
|
+
idpConnectionId?: string;
|
|
933
|
+
/** A set of fields that are required for the connection to be able to identify and authenticate the user */
|
|
934
|
+
tokenParams?: Record<string, string>;
|
|
935
|
+
}
|
|
936
|
+
interface SignOnRequest {
|
|
937
|
+
/** the identifier of the identity */
|
|
938
|
+
loginId: LoginId;
|
|
939
|
+
/** profile of the identity */
|
|
940
|
+
profile?: IdentityProfile$2;
|
|
941
|
+
/** when true will mark the email of the identity as verified */
|
|
942
|
+
verifyEmail?: boolean;
|
|
943
|
+
/** when false will create a new contact instead of merging the existing contact into the identity */
|
|
944
|
+
mergeExistingContact?: boolean;
|
|
945
|
+
}
|
|
946
|
+
interface SignOnResponse {
|
|
947
|
+
/** session token for the requested identity */
|
|
948
|
+
sessionToken?: string;
|
|
949
|
+
/** The Identity of the provided login_id */
|
|
950
|
+
identity?: Identity$2;
|
|
951
|
+
}
|
|
952
|
+
/** logout request payload */
|
|
953
|
+
interface LogoutRequest {
|
|
954
|
+
/** redirect after logout */
|
|
955
|
+
postLogoutRedirectUri?: string | null;
|
|
956
|
+
/** caller identifier */
|
|
957
|
+
clientId?: string | null;
|
|
958
|
+
}
|
|
959
|
+
interface IdentifierNonNullableFields$2 {
|
|
960
|
+
email: string;
|
|
961
|
+
userName: string;
|
|
962
|
+
}
|
|
963
|
+
interface IdpConnectionNonNullableFields$2 {
|
|
964
|
+
idpConnectionId: string;
|
|
965
|
+
idpUserId: string;
|
|
966
|
+
}
|
|
967
|
+
interface AuthenticatorConnectionNonNullableFields$2 {
|
|
968
|
+
authenticatorConnectionId: string;
|
|
969
|
+
reEnrollmentRequired: boolean;
|
|
970
|
+
}
|
|
971
|
+
interface ConnectionNonNullableFields$2 {
|
|
972
|
+
idpConnection?: IdpConnectionNonNullableFields$2;
|
|
973
|
+
authenticatorConnection?: AuthenticatorConnectionNonNullableFields$2;
|
|
974
|
+
}
|
|
975
|
+
interface V1ListValueNonNullableFields$2 {
|
|
976
|
+
value: V1CustomValueNonNullableFields$2[];
|
|
977
|
+
}
|
|
978
|
+
interface V1CustomValueNonNullableFields$2 {
|
|
979
|
+
strValue: string;
|
|
980
|
+
numValue: number;
|
|
981
|
+
listValue?: V1ListValueNonNullableFields$2;
|
|
982
|
+
}
|
|
983
|
+
interface CustomFieldNonNullableFields$2 {
|
|
984
|
+
name: string;
|
|
985
|
+
value?: V1CustomValueNonNullableFields$2;
|
|
986
|
+
}
|
|
987
|
+
interface SecondaryEmailNonNullableFields$2 {
|
|
988
|
+
email: string;
|
|
989
|
+
tag: EmailTag$2;
|
|
990
|
+
}
|
|
991
|
+
interface PhoneNonNullableFields$2 {
|
|
992
|
+
phone: string;
|
|
993
|
+
tag: PhoneTag$2;
|
|
994
|
+
}
|
|
995
|
+
interface AddressWrapperNonNullableFields$2 {
|
|
996
|
+
tag: AddressTag$2;
|
|
997
|
+
}
|
|
998
|
+
interface IdentityProfileNonNullableFields$2 {
|
|
999
|
+
emails: string[];
|
|
1000
|
+
phones: string[];
|
|
1001
|
+
labels: string[];
|
|
1002
|
+
privacyStatus: PrivacyStatus$2;
|
|
1003
|
+
customFields: CustomFieldNonNullableFields$2[];
|
|
1004
|
+
secondaryEmails: SecondaryEmailNonNullableFields$2[];
|
|
1005
|
+
phonesV2: PhoneNonNullableFields$2[];
|
|
1006
|
+
addresses: AddressWrapperNonNullableFields$2[];
|
|
1007
|
+
}
|
|
1008
|
+
interface MetadataNonNullableFields$2 {
|
|
1009
|
+
tags: string[];
|
|
1010
|
+
}
|
|
1011
|
+
interface EmailNonNullableFields$2 {
|
|
1012
|
+
address: string;
|
|
1013
|
+
isVerified: boolean;
|
|
1014
|
+
}
|
|
1015
|
+
interface StatusV2NonNullableFields$2 {
|
|
1016
|
+
name: StatusName$2;
|
|
1017
|
+
reasons: Reason$2[];
|
|
1018
|
+
}
|
|
1019
|
+
interface FactorNonNullableFields$2 {
|
|
1020
|
+
factorId: string;
|
|
1021
|
+
type: FactorType$2;
|
|
1022
|
+
status: Status$2;
|
|
1023
|
+
}
|
|
1024
|
+
interface IdentityNonNullableFields$2 {
|
|
1025
|
+
identifiers: IdentifierNonNullableFields$2[];
|
|
1026
|
+
connections: ConnectionNonNullableFields$2[];
|
|
1027
|
+
identityProfile?: IdentityProfileNonNullableFields$2;
|
|
1028
|
+
metadata?: MetadataNonNullableFields$2;
|
|
1029
|
+
email?: EmailNonNullableFields$2;
|
|
1030
|
+
status?: StatusV2NonNullableFields$2;
|
|
1031
|
+
factors: FactorNonNullableFields$2[];
|
|
1032
|
+
}
|
|
1033
|
+
interface StateMachineResponseNonNullableFields$2 {
|
|
1034
|
+
state: StateType$2;
|
|
1035
|
+
identity?: IdentityNonNullableFields$2;
|
|
1036
|
+
}
|
|
1037
|
+
interface HeadersEntryNonNullableFields$1 {
|
|
1038
|
+
key: string;
|
|
1039
|
+
value: string;
|
|
1040
|
+
}
|
|
1041
|
+
interface RawHttpResponseNonNullableFields$1 {
|
|
1042
|
+
body: Uint8Array;
|
|
1043
|
+
headers: HeadersEntryNonNullableFields$1[];
|
|
1044
|
+
}
|
|
1045
|
+
interface SignOnResponseNonNullableFields {
|
|
1046
|
+
sessionToken: string;
|
|
1047
|
+
identity?: IdentityNonNullableFields$2;
|
|
1048
|
+
}
|
|
1049
|
+
interface RegisterV2Options {
|
|
1050
|
+
/** Password of registering member. */
|
|
1051
|
+
password?: string;
|
|
1052
|
+
/** Profile information of registering member. */
|
|
1053
|
+
profile?: IdentityProfile$2;
|
|
1054
|
+
/** CAPTCHA tokens, when CAPTCHA setting is on. */
|
|
1055
|
+
captchaTokens?: CaptchaToken[];
|
|
1056
|
+
/** Additional data, relevant for the flow. */
|
|
1057
|
+
clientMetaData?: Record<string, any> | null;
|
|
1058
|
+
}
|
|
1059
|
+
interface LoginV2Options {
|
|
1060
|
+
/** Password of the identity logging in. */
|
|
1061
|
+
password?: string;
|
|
1062
|
+
/** CAPTCHA tokens, when CAPTCHA setting is on. */
|
|
1063
|
+
captchaTokens?: CaptchaToken[];
|
|
1064
|
+
/** Additional data, relevant for the flow. */
|
|
1065
|
+
clientMetaData?: Record<string, any> | null;
|
|
1066
|
+
}
|
|
1067
|
+
interface LoginWithIdpConnectionIdentifiers {
|
|
1068
|
+
/** The id of the tenant the caller wants to login into */
|
|
1069
|
+
tenantId: string;
|
|
1070
|
+
/** The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData */
|
|
1071
|
+
idpConnectionId: string;
|
|
1072
|
+
}
|
|
1073
|
+
interface LoginWithIdpConnectionOptions {
|
|
1074
|
+
customPayload?: Record<string, string>;
|
|
1075
|
+
/**
|
|
1076
|
+
* This flow ultimately returns an HTML page that asynchronously posts the LoginResponse via the BroadcastChannel API.
|
|
1077
|
+
* The message will be posted to a channel named `wix-idp-$session_id`, and encrypted with the `encryption_key`.
|
|
1078
|
+
* Encryption key should be base64 encoded. Encryption is done using AES-GCM with a random IV that's sent alongside the payload
|
|
1079
|
+
*/
|
|
1080
|
+
sessionId: string;
|
|
1081
|
+
encryptionKey: string;
|
|
1082
|
+
visitorId?: string | null;
|
|
1083
|
+
bsi?: string | null;
|
|
1084
|
+
}
|
|
1085
|
+
interface LoginWithIdpConnectionCallbackOptions {
|
|
1086
|
+
body?: Uint8Array;
|
|
1087
|
+
pathParams?: PathParametersEntry$1[];
|
|
1088
|
+
queryParams?: QueryParametersEntry$1[];
|
|
1089
|
+
headers?: HeadersEntry$1[];
|
|
1090
|
+
method?: string;
|
|
1091
|
+
rawPath?: string;
|
|
1092
|
+
rawQuery?: string;
|
|
1093
|
+
}
|
|
1094
|
+
interface LoginCallbackOptions {
|
|
1095
|
+
/** state that that received on the redirect */
|
|
1096
|
+
state?: string;
|
|
1097
|
+
/** session token */
|
|
1098
|
+
sessionToken?: string;
|
|
1099
|
+
}
|
|
1100
|
+
interface LoginWithIdpConnectionTokenParamsOptions {
|
|
1101
|
+
/** The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData */
|
|
1102
|
+
idpConnectionId?: string;
|
|
1103
|
+
/** A set of fields that are required for the connection to be able to identify and authenticate the user */
|
|
1104
|
+
tokenParams?: Record<string, string>;
|
|
1105
|
+
}
|
|
1106
|
+
interface SignOnOptions {
|
|
1107
|
+
/** profile of the identity */
|
|
1108
|
+
profile?: IdentityProfile$2;
|
|
1109
|
+
/** when true will mark the email of the identity as verified */
|
|
1110
|
+
verifyEmail?: boolean;
|
|
1111
|
+
/** when false will create a new contact instead of merging the existing contact into the identity */
|
|
1112
|
+
mergeExistingContact?: boolean;
|
|
1113
|
+
}
|
|
1114
|
+
interface LogoutOptions {
|
|
1115
|
+
/** redirect after logout */
|
|
1116
|
+
postLogoutRedirectUri?: string | null;
|
|
1117
|
+
/** caller identifier */
|
|
1118
|
+
clientId?: string | null;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
declare function registerV2$1(httpClient: HttpClient): RegisterV2Signature;
|
|
1122
|
+
interface RegisterV2Signature {
|
|
1123
|
+
/**
|
|
1124
|
+
* Registers a new member.
|
|
1125
|
+
*
|
|
1126
|
+
* Typically, after a sucessful registration, you generate and use member tokens for the
|
|
1127
|
+
* registered member so that subsequent API calls are called as part of a member session.
|
|
1128
|
+
*
|
|
1129
|
+
* If the email used to register the member already exists as a contact email, the registering
|
|
1130
|
+
* member need to verify the email address using a code that is sent to the address.
|
|
1131
|
+
* @param - Identifier of registering member.
|
|
1132
|
+
*/
|
|
1133
|
+
(loginId: LoginId, options?: RegisterV2Options | undefined): Promise<StateMachineResponse$2 & StateMachineResponseNonNullableFields$2>;
|
|
1134
|
+
}
|
|
1135
|
+
declare function loginV2$1(httpClient: HttpClient): LoginV2Signature;
|
|
1136
|
+
interface LoginV2Signature {
|
|
1137
|
+
/**
|
|
1138
|
+
* Logs in an existing user.
|
|
1139
|
+
*
|
|
1140
|
+
* Typically, after a sucessful login, you generate and use member tokens for the
|
|
1141
|
+
* logged-in member so that subsequent API calls are called as part of a member session.
|
|
1142
|
+
* @param - Identifier of identity logging in.
|
|
1143
|
+
*/
|
|
1144
|
+
(loginId: LoginId, options?: LoginV2Options | undefined): Promise<StateMachineResponse$2 & StateMachineResponseNonNullableFields$2>;
|
|
1145
|
+
}
|
|
1146
|
+
declare function changePassword$1(httpClient: HttpClient): ChangePasswordSignature;
|
|
1147
|
+
interface ChangePasswordSignature {
|
|
1148
|
+
/**
|
|
1149
|
+
* Changes the password of a logged in user.
|
|
1150
|
+
* @param - The new password to set for the logged in user
|
|
1151
|
+
*/
|
|
1152
|
+
(newPassword: string): Promise<void>;
|
|
1153
|
+
}
|
|
1154
|
+
declare function loginWithIdpConnection$1(httpClient: HttpClient): LoginWithIdpConnectionSignature;
|
|
1155
|
+
interface LoginWithIdpConnectionSignature {
|
|
1156
|
+
/** @param - The type of the tenant the caller wants to login into */
|
|
1157
|
+
(identifiers: LoginWithIdpConnectionIdentifiers, tenantType: TenantType$1, options?: LoginWithIdpConnectionOptions | undefined): Promise<RawHttpResponse$1 & RawHttpResponseNonNullableFields$1>;
|
|
1158
|
+
}
|
|
1159
|
+
declare function loginWithIdpConnectionCallback$1(httpClient: HttpClient): LoginWithIdpConnectionCallbackSignature;
|
|
1160
|
+
interface LoginWithIdpConnectionCallbackSignature {
|
|
1161
|
+
/**
|
|
1162
|
+
* REQUIRES path params `tenant_type`, `tenant_id` and `idp_connection_id`
|
|
1163
|
+
*/
|
|
1164
|
+
(options?: LoginWithIdpConnectionCallbackOptions | undefined): Promise<RawHttpResponse$1 & RawHttpResponseNonNullableFields$1>;
|
|
1165
|
+
}
|
|
1166
|
+
declare function loginCallback$1(httpClient: HttpClient): LoginCallbackSignature;
|
|
1167
|
+
interface LoginCallbackSignature {
|
|
1168
|
+
/** */
|
|
1169
|
+
(options?: LoginCallbackOptions | undefined): Promise<RawHttpResponse$1 & RawHttpResponseNonNullableFields$1>;
|
|
1170
|
+
}
|
|
1171
|
+
declare function loginWithIdpConnectionTokenParams$1(httpClient: HttpClient): LoginWithIdpConnectionTokenParamsSignature;
|
|
1172
|
+
interface LoginWithIdpConnectionTokenParamsSignature {
|
|
1173
|
+
/** */
|
|
1174
|
+
(options?: LoginWithIdpConnectionTokenParamsOptions | undefined): Promise<StateMachineResponse$2 & StateMachineResponseNonNullableFields$2>;
|
|
1175
|
+
}
|
|
1176
|
+
declare function signOn$1(httpClient: HttpClient): SignOnSignature;
|
|
1177
|
+
interface SignOnSignature {
|
|
1178
|
+
/** @param - the identifier of the identity */
|
|
1179
|
+
(loginId: LoginId, options?: SignOnOptions | undefined): Promise<SignOnResponse & SignOnResponseNonNullableFields>;
|
|
1180
|
+
}
|
|
1181
|
+
declare function logout$1(httpClient: HttpClient): LogoutSignature;
|
|
1182
|
+
interface LogoutSignature {
|
|
1183
|
+
/**
|
|
1184
|
+
* Logs out a member.
|
|
1185
|
+
*/
|
|
1186
|
+
(options?: LogoutOptions | undefined): Promise<RawHttpResponse$1 & RawHttpResponseNonNullableFields$1>;
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
declare const registerV2: MaybeContext<BuildRESTFunction<typeof registerV2$1> & typeof registerV2$1>;
|
|
1190
|
+
declare const loginV2: MaybeContext<BuildRESTFunction<typeof loginV2$1> & typeof loginV2$1>;
|
|
1191
|
+
declare const changePassword: MaybeContext<BuildRESTFunction<typeof changePassword$1> & typeof changePassword$1>;
|
|
1192
|
+
declare const loginWithIdpConnection: MaybeContext<BuildRESTFunction<typeof loginWithIdpConnection$1> & typeof loginWithIdpConnection$1>;
|
|
1193
|
+
declare const loginWithIdpConnectionCallback: MaybeContext<BuildRESTFunction<typeof loginWithIdpConnectionCallback$1> & typeof loginWithIdpConnectionCallback$1>;
|
|
1194
|
+
declare const loginCallback: MaybeContext<BuildRESTFunction<typeof loginCallback$1> & typeof loginCallback$1>;
|
|
1195
|
+
declare const loginWithIdpConnectionTokenParams: MaybeContext<BuildRESTFunction<typeof loginWithIdpConnectionTokenParams$1> & typeof loginWithIdpConnectionTokenParams$1>;
|
|
1196
|
+
declare const signOn: MaybeContext<BuildRESTFunction<typeof signOn$1> & typeof signOn$1>;
|
|
1197
|
+
declare const logout: MaybeContext<BuildRESTFunction<typeof logout$1> & typeof logout$1>;
|
|
1198
|
+
|
|
1199
|
+
type index_d$6_Authentication = Authentication;
|
|
1200
|
+
type index_d$6_CaptchaToken = CaptchaToken;
|
|
1201
|
+
type index_d$6_CaptchaTokenTokenOneOf = CaptchaTokenTokenOneOf;
|
|
1202
|
+
type index_d$6_ChangePasswordRequest = ChangePasswordRequest;
|
|
1203
|
+
type index_d$6_ChangePasswordResponse = ChangePasswordResponse;
|
|
1204
|
+
type index_d$6_LoginCallbackOptions = LoginCallbackOptions;
|
|
1205
|
+
type index_d$6_LoginCallbackRequest = LoginCallbackRequest;
|
|
1206
|
+
type index_d$6_LoginId = LoginId;
|
|
1207
|
+
type index_d$6_LoginIdTypeOneOf = LoginIdTypeOneOf;
|
|
1208
|
+
type index_d$6_LoginV2Options = LoginV2Options;
|
|
1209
|
+
type index_d$6_LoginV2Request = LoginV2Request;
|
|
1210
|
+
type index_d$6_LoginWithIdpConnectionCallbackOptions = LoginWithIdpConnectionCallbackOptions;
|
|
1211
|
+
type index_d$6_LoginWithIdpConnectionIdentifiers = LoginWithIdpConnectionIdentifiers;
|
|
1212
|
+
type index_d$6_LoginWithIdpConnectionOptions = LoginWithIdpConnectionOptions;
|
|
1213
|
+
type index_d$6_LoginWithIdpConnectionRequest = LoginWithIdpConnectionRequest;
|
|
1214
|
+
type index_d$6_LoginWithIdpConnectionTokenParamsOptions = LoginWithIdpConnectionTokenParamsOptions;
|
|
1215
|
+
type index_d$6_LoginWithIdpConnectionTokenParamsRequest = LoginWithIdpConnectionTokenParamsRequest;
|
|
1216
|
+
type index_d$6_LogoutOptions = LogoutOptions;
|
|
1217
|
+
type index_d$6_LogoutRequest = LogoutRequest;
|
|
1218
|
+
type index_d$6_RegisterV2Options = RegisterV2Options;
|
|
1219
|
+
type index_d$6_RegisterV2Request = RegisterV2Request;
|
|
1220
|
+
type index_d$6_SignOnOptions = SignOnOptions;
|
|
1221
|
+
type index_d$6_SignOnRequest = SignOnRequest;
|
|
1222
|
+
type index_d$6_SignOnResponse = SignOnResponse;
|
|
1223
|
+
type index_d$6_SignOnResponseNonNullableFields = SignOnResponseNonNullableFields;
|
|
1224
|
+
declare const index_d$6_changePassword: typeof changePassword;
|
|
1225
|
+
declare const index_d$6_loginCallback: typeof loginCallback;
|
|
1226
|
+
declare const index_d$6_loginV2: typeof loginV2;
|
|
1227
|
+
declare const index_d$6_loginWithIdpConnection: typeof loginWithIdpConnection;
|
|
1228
|
+
declare const index_d$6_loginWithIdpConnectionCallback: typeof loginWithIdpConnectionCallback;
|
|
1229
|
+
declare const index_d$6_loginWithIdpConnectionTokenParams: typeof loginWithIdpConnectionTokenParams;
|
|
1230
|
+
declare const index_d$6_logout: typeof logout;
|
|
1231
|
+
declare const index_d$6_registerV2: typeof registerV2;
|
|
1232
|
+
declare const index_d$6_signOn: typeof signOn;
|
|
1233
|
+
declare namespace index_d$6 {
|
|
1234
|
+
export { type Address$2 as Address, AddressTag$2 as AddressTag, type AddressWrapper$2 as AddressWrapper, type index_d$6_Authentication as Authentication, type AuthenticatorConnection$2 as AuthenticatorConnection, type index_d$6_CaptchaToken as CaptchaToken, type index_d$6_CaptchaTokenTokenOneOf as CaptchaTokenTokenOneOf, type index_d$6_ChangePasswordRequest as ChangePasswordRequest, type index_d$6_ChangePasswordResponse as ChangePasswordResponse, type Connection$2 as Connection, type ConnectionTypeOneOf$2 as ConnectionTypeOneOf, type CustomField$2 as CustomField, type CustomValue$2 as CustomValue, type CustomValueValueOneOf$2 as CustomValueValueOneOf, type Email$2 as Email, EmailTag$2 as EmailTag, type Factor$2 as Factor, FactorType$2 as FactorType, type HeadersEntry$1 as HeadersEntry, type Identifier$2 as Identifier, type IdentifierValueOneOf$2 as IdentifierValueOneOf, type Identity$2 as Identity, type IdentityProfile$2 as IdentityProfile, type IdpConnection$2 as IdpConnection, type ListValue$2 as ListValue, type index_d$6_LoginCallbackOptions as LoginCallbackOptions, type index_d$6_LoginCallbackRequest as LoginCallbackRequest, type index_d$6_LoginId as LoginId, type index_d$6_LoginIdTypeOneOf as LoginIdTypeOneOf, type index_d$6_LoginV2Options as LoginV2Options, type index_d$6_LoginV2Request as LoginV2Request, type index_d$6_LoginWithIdpConnectionCallbackOptions as LoginWithIdpConnectionCallbackOptions, type index_d$6_LoginWithIdpConnectionIdentifiers as LoginWithIdpConnectionIdentifiers, type index_d$6_LoginWithIdpConnectionOptions as LoginWithIdpConnectionOptions, type index_d$6_LoginWithIdpConnectionRequest as LoginWithIdpConnectionRequest, type index_d$6_LoginWithIdpConnectionTokenParamsOptions as LoginWithIdpConnectionTokenParamsOptions, type index_d$6_LoginWithIdpConnectionTokenParamsRequest as LoginWithIdpConnectionTokenParamsRequest, type index_d$6_LogoutOptions as LogoutOptions, type index_d$6_LogoutRequest as LogoutRequest, type MapValue$2 as MapValue, type Metadata$2 as Metadata, type PathParametersEntry$1 as PathParametersEntry, type Phone$2 as Phone, PhoneTag$2 as PhoneTag, PrivacyStatus$2 as PrivacyStatus, type QueryParametersEntry$1 as QueryParametersEntry, type RawHttpRequest$1 as RawHttpRequest, type RawHttpResponse$1 as RawHttpResponse, type RawHttpResponseNonNullableFields$1 as RawHttpResponseNonNullableFields, Reason$2 as Reason, type index_d$6_RegisterV2Options as RegisterV2Options, type index_d$6_RegisterV2Request as RegisterV2Request, type SecondaryEmail$2 as SecondaryEmail, type index_d$6_SignOnOptions as SignOnOptions, type index_d$6_SignOnRequest as SignOnRequest, type index_d$6_SignOnResponse as SignOnResponse, type index_d$6_SignOnResponseNonNullableFields as SignOnResponseNonNullableFields, type StateMachineResponse$2 as StateMachineResponse, type StateMachineResponseNonNullableFields$2 as StateMachineResponseNonNullableFields, StateType$2 as StateType, Status$2 as Status, StatusName$2 as StatusName, type StatusV2$2 as StatusV2, TenantType$1 as TenantType, type V1CustomValue$2 as V1CustomValue, type V1CustomValueValueOneOf$2 as V1CustomValueValueOneOf, type V1ListValue$2 as V1ListValue, type V1MapValue$2 as V1MapValue, index_d$6_changePassword as changePassword, index_d$6_loginCallback as loginCallback, index_d$6_loginV2 as loginV2, index_d$6_loginWithIdpConnection as loginWithIdpConnection, index_d$6_loginWithIdpConnectionCallback as loginWithIdpConnectionCallback, index_d$6_loginWithIdpConnectionTokenParams as loginWithIdpConnectionTokenParams, index_d$6_logout as logout, index_d$6_registerV2 as registerV2, index_d$6_signOn as signOn };
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
/** Recovery token proto is the saved data on the recovery token. */
|
|
1238
|
+
interface RecoveryToken {
|
|
1239
|
+
/**
|
|
1240
|
+
* Recovery token ID
|
|
1241
|
+
* @readonly
|
|
1242
|
+
*/
|
|
1243
|
+
_id?: string | null;
|
|
1244
|
+
/**
|
|
1245
|
+
* Represents the time this SessionToken was created
|
|
1246
|
+
* @readonly
|
|
1247
|
+
*/
|
|
1248
|
+
_createdDate?: Date | null;
|
|
1249
|
+
/**
|
|
1250
|
+
* tenantId
|
|
1251
|
+
* @readonly
|
|
1252
|
+
*/
|
|
1253
|
+
tenantId?: string;
|
|
1254
|
+
/**
|
|
1255
|
+
* TenantType
|
|
1256
|
+
* @readonly
|
|
1257
|
+
*/
|
|
1258
|
+
tenantType?: TenantType;
|
|
1259
|
+
/**
|
|
1260
|
+
* identity id
|
|
1261
|
+
* @readonly
|
|
1262
|
+
*/
|
|
1263
|
+
identityId?: string;
|
|
1264
|
+
}
|
|
1265
|
+
declare enum TenantType {
|
|
1266
|
+
UNKNOWN_TENANT_TYPE = "UNKNOWN_TENANT_TYPE",
|
|
1267
|
+
ACCOUNT = "ACCOUNT",
|
|
1268
|
+
SITE = "SITE",
|
|
1269
|
+
ROOT = "ROOT"
|
|
1270
|
+
}
|
|
1271
|
+
interface SendRecoveryEmailRequest {
|
|
1272
|
+
/** Email address associated with the account to recover. */
|
|
1273
|
+
email: string;
|
|
1274
|
+
/** Language of the email to be sent. Defaults to the language specified in the member's profile. */
|
|
1275
|
+
language?: string | null;
|
|
1276
|
+
/** Where to redirect to after a successful recovery. */
|
|
1277
|
+
redirect?: Redirect;
|
|
1278
|
+
}
|
|
1279
|
+
interface Redirect {
|
|
1280
|
+
/** The URL to redirect to after a successful recovery. */
|
|
1281
|
+
url?: string;
|
|
1282
|
+
/** Caller identifier. */
|
|
1283
|
+
clientId?: string | null;
|
|
1284
|
+
}
|
|
1285
|
+
interface SendRecoveryEmailResponse {
|
|
1286
|
+
}
|
|
1287
|
+
interface SendActivationEmailRequest {
|
|
1288
|
+
/** Id of the activating user */
|
|
1289
|
+
identityId: string;
|
|
1290
|
+
/** Options for the activation email */
|
|
1291
|
+
emailOptions?: EmailOptions;
|
|
1292
|
+
}
|
|
1293
|
+
interface EmailOptions {
|
|
1294
|
+
/** language of the email - if not received will fallback to the identity language */
|
|
1295
|
+
language?: string | null;
|
|
1296
|
+
/** Where to redirect after a successful activation process */
|
|
1297
|
+
redirect?: Redirect;
|
|
1298
|
+
}
|
|
1299
|
+
interface SendActivationEmailResponse {
|
|
1300
|
+
}
|
|
1301
|
+
interface RecoverRequest {
|
|
1302
|
+
/** recovery token */
|
|
1303
|
+
recoveryToken: string;
|
|
1304
|
+
/** new password to set for the identity */
|
|
1305
|
+
password?: string | null;
|
|
1306
|
+
}
|
|
1307
|
+
interface StateMachineResponse$1 {
|
|
1308
|
+
/** The current state of the login or registration process. */
|
|
1309
|
+
state?: StateType$1;
|
|
1310
|
+
/** If state is `SUCCESS`, a session token. */
|
|
1311
|
+
sessionToken?: string | null;
|
|
1312
|
+
/** A token representing the current state of the login or registration process. */
|
|
1313
|
+
stateToken?: string | null;
|
|
1314
|
+
/** Identing of the current member. */
|
|
1315
|
+
identity?: Identity$1;
|
|
1316
|
+
/** additional_data = 5; //TBD */
|
|
1317
|
+
additionalData?: Record<string, CustomValue$1>;
|
|
1318
|
+
}
|
|
1319
|
+
declare enum StateType$1 {
|
|
1320
|
+
/** Initial unknown state. */
|
|
1321
|
+
UNKNOWN_STATE = "UNKNOWN_STATE",
|
|
1322
|
+
/** The operation completed successfully. */
|
|
1323
|
+
SUCCESS = "SUCCESS",
|
|
1324
|
+
/** State that indicates that the member needs owner approval to proceed, available action in: OwnerApprovalStateHandler */
|
|
1325
|
+
REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
|
|
1326
|
+
/**
|
|
1327
|
+
* State that indicates a member waiting for verification, available action are: verifyDuringAuthentication or resendDuringAuthentication
|
|
1328
|
+
* https://dev.wix.com/docs/rest/api-reference/auth-management/verification-v1/verify-during-authentication
|
|
1329
|
+
*/
|
|
1330
|
+
REQUIRE_EMAIL_VERIFICATION = "REQUIRE_EMAIL_VERIFICATION",
|
|
1331
|
+
/** State that indicates checking that the status is not one of the `invalidStates` before proceeding. */
|
|
1332
|
+
STATUS_CHECK = "STATUS_CHECK",
|
|
1333
|
+
REQUIRE_MFA = "REQUIRE_MFA"
|
|
1334
|
+
}
|
|
1335
|
+
interface Identity$1 {
|
|
1336
|
+
/** Identity ID */
|
|
1337
|
+
_id?: string | null;
|
|
1338
|
+
/**
|
|
1339
|
+
* Identifiers
|
|
1340
|
+
* @deprecated Identifiers
|
|
1341
|
+
* @replacedBy email
|
|
1342
|
+
* @targetRemovalDate 2023-05-01
|
|
1343
|
+
*/
|
|
1344
|
+
identifiers?: Identifier$1[];
|
|
1345
|
+
/**
|
|
1346
|
+
* Represents the current state of an item. Each time the item is modified, its `revision` changes.
|
|
1347
|
+
* For an update operation to succeed, you MUST pass the latest revision.
|
|
1348
|
+
*/
|
|
1349
|
+
revision?: string | null;
|
|
1350
|
+
/**
|
|
1351
|
+
* The time this identity was created.
|
|
1352
|
+
* @readonly
|
|
1353
|
+
*/
|
|
1354
|
+
_createdDate?: Date | null;
|
|
1355
|
+
/**
|
|
1356
|
+
* The time this identity was last updated.
|
|
1357
|
+
* @readonly
|
|
1358
|
+
*/
|
|
1359
|
+
_updatedDate?: Date | null;
|
|
1360
|
+
/** The identity configured connections to authenticate with. */
|
|
1361
|
+
connections?: Connection$1[];
|
|
1362
|
+
/** Identity profile. */
|
|
1363
|
+
identityProfile?: IdentityProfile$1;
|
|
1364
|
+
/**
|
|
1365
|
+
* Additional information about the identity that can impact user access.
|
|
1366
|
+
* This data cannot be set.
|
|
1367
|
+
*/
|
|
1368
|
+
metadata?: Metadata$1;
|
|
1369
|
+
/** Identity email address. */
|
|
1370
|
+
email?: Email$1;
|
|
1371
|
+
/** Identity's current status. */
|
|
1372
|
+
status?: StatusV2$1;
|
|
1373
|
+
/** filled by pre registered spi */
|
|
1374
|
+
customAttributes?: Record<string, any> | null;
|
|
1375
|
+
/**
|
|
1376
|
+
* Identity factors.
|
|
1377
|
+
* @readonly
|
|
1378
|
+
*/
|
|
1379
|
+
factors?: Factor$1[];
|
|
1380
|
+
}
|
|
1381
|
+
interface Identifier$1 extends IdentifierValueOneOf$1 {
|
|
1382
|
+
email?: string;
|
|
1383
|
+
userName?: string;
|
|
1384
|
+
}
|
|
1385
|
+
/** @oneof */
|
|
1386
|
+
interface IdentifierValueOneOf$1 {
|
|
1387
|
+
email?: string;
|
|
1388
|
+
userName?: string;
|
|
1389
|
+
}
|
|
1390
|
+
interface Connection$1 extends ConnectionTypeOneOf$1 {
|
|
1391
|
+
/** IDP connection. */
|
|
1392
|
+
idpConnection?: IdpConnection$1;
|
|
1393
|
+
/** Authenticator connection. */
|
|
1394
|
+
authenticatorConnection?: AuthenticatorConnection$1;
|
|
1395
|
+
}
|
|
1396
|
+
/** @oneof */
|
|
1397
|
+
interface ConnectionTypeOneOf$1 {
|
|
1398
|
+
/** IDP connection. */
|
|
1399
|
+
idpConnection?: IdpConnection$1;
|
|
1400
|
+
/** Authenticator connection. */
|
|
1401
|
+
authenticatorConnection?: AuthenticatorConnection$1;
|
|
1402
|
+
}
|
|
1403
|
+
interface IdpConnection$1 {
|
|
1404
|
+
/** IDP connection ID. */
|
|
1405
|
+
idpConnectionId?: string;
|
|
1406
|
+
/** IDP user ID. */
|
|
1407
|
+
idpUserId?: string;
|
|
1408
|
+
}
|
|
1409
|
+
interface AuthenticatorConnection$1 {
|
|
1410
|
+
/** Authenticator connection ID. */
|
|
1411
|
+
authenticatorConnectionId?: string;
|
|
1412
|
+
/** Whether re-enrollment is required. */
|
|
1413
|
+
reEnrollmentRequired?: boolean;
|
|
1414
|
+
}
|
|
1415
|
+
interface IdentityProfile$1 {
|
|
1416
|
+
/** Profile first name. */
|
|
1417
|
+
firstName?: string | null;
|
|
1418
|
+
/** Profile last name. */
|
|
1419
|
+
lastName?: string | null;
|
|
1420
|
+
/** Profile nickname. */
|
|
1421
|
+
nickname?: string | null;
|
|
1422
|
+
/** Profile picture URL. */
|
|
1423
|
+
picture?: string | null;
|
|
1424
|
+
/**
|
|
1425
|
+
* Deprecated. Use `secondaryEmails` instead.
|
|
1426
|
+
* @deprecated Deprecated. Use `secondaryEmails` instead.
|
|
1427
|
+
* @replacedBy secondary_emails
|
|
1428
|
+
* @targetRemovalDate 2023-11-01
|
|
1429
|
+
*/
|
|
1430
|
+
emails?: string[];
|
|
1431
|
+
/**
|
|
1432
|
+
* Deprecated. Use `phonesV2` instead.
|
|
1433
|
+
* @deprecated Deprecated. Use `phonesV2` instead.
|
|
1434
|
+
* @replacedBy phones_v2
|
|
1435
|
+
* @targetRemovalDate 2023-11-01
|
|
1436
|
+
*/
|
|
1437
|
+
phones?: string[];
|
|
1438
|
+
/** List of profile labels. */
|
|
1439
|
+
labels?: string[];
|
|
1440
|
+
/** Profile language. */
|
|
1441
|
+
language?: string | null;
|
|
1442
|
+
/** Profile privacy status. */
|
|
1443
|
+
privacyStatus?: PrivacyStatus$1;
|
|
1444
|
+
/**
|
|
1445
|
+
* Any number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts)
|
|
1446
|
+
* are used to store additional information about your site or app's contacts.
|
|
1447
|
+
*/
|
|
1448
|
+
customFields?: CustomField$1[];
|
|
1449
|
+
/** List of profile email addresses. */
|
|
1450
|
+
secondaryEmails?: SecondaryEmail$1[];
|
|
1451
|
+
/** List of profile phone numbers. */
|
|
1452
|
+
phonesV2?: Phone$1[];
|
|
1453
|
+
/** List of profile physical addresses. */
|
|
1454
|
+
addresses?: AddressWrapper$1[];
|
|
1455
|
+
/** Company name. */
|
|
1456
|
+
company?: string | null;
|
|
1457
|
+
/** Position within company. */
|
|
1458
|
+
position?: string | null;
|
|
1459
|
+
/** Profile birthdate - ISO-8601 extended local date format (YYYY-MM-DD). */
|
|
1460
|
+
birthdate?: string | null;
|
|
1461
|
+
}
|
|
1462
|
+
declare enum PrivacyStatus$1 {
|
|
1463
|
+
UNDEFINED = "UNDEFINED",
|
|
1464
|
+
PUBLIC = "PUBLIC",
|
|
1465
|
+
PRIVATE = "PRIVATE"
|
|
1466
|
+
}
|
|
1467
|
+
interface CustomField$1 {
|
|
1468
|
+
/**
|
|
1469
|
+
* Custom field name. The name must match one of the key properties of the objects returned by
|
|
1470
|
+
* [`List Extended Fields`](https://dev.wix.com/docs/rest/api-reference/contacts/extended-fields/list-extended-fields)
|
|
1471
|
+
* with the `custom.` prefix removed.
|
|
1472
|
+
*/
|
|
1473
|
+
name?: string;
|
|
1474
|
+
/** Custom field value. */
|
|
1475
|
+
value?: V1CustomValue$1;
|
|
1476
|
+
}
|
|
1477
|
+
interface V1CustomValue$1 extends V1CustomValueValueOneOf$1 {
|
|
1478
|
+
/** String value. */
|
|
1479
|
+
strValue?: string;
|
|
1480
|
+
/** Number value. */
|
|
1481
|
+
numValue?: number;
|
|
1482
|
+
/** Date value. */
|
|
1483
|
+
dateValue?: Date | null;
|
|
1484
|
+
/** List value. */
|
|
1485
|
+
listValue?: V1ListValue$1;
|
|
1486
|
+
/** Map value. */
|
|
1487
|
+
mapValue?: V1MapValue$1;
|
|
1488
|
+
}
|
|
1489
|
+
/** @oneof */
|
|
1490
|
+
interface V1CustomValueValueOneOf$1 {
|
|
1491
|
+
/** String value. */
|
|
1492
|
+
strValue?: string;
|
|
1493
|
+
/** Number value. */
|
|
1494
|
+
numValue?: number;
|
|
1495
|
+
/** Date value. */
|
|
1496
|
+
dateValue?: Date | null;
|
|
1497
|
+
/** List value. */
|
|
1498
|
+
listValue?: V1ListValue$1;
|
|
1499
|
+
/** Map value. */
|
|
1500
|
+
mapValue?: V1MapValue$1;
|
|
1501
|
+
}
|
|
1502
|
+
interface V1ListValue$1 {
|
|
1503
|
+
/** Custom value. */
|
|
1504
|
+
value?: V1CustomValue$1[];
|
|
1505
|
+
}
|
|
1506
|
+
interface V1MapValue$1 {
|
|
1507
|
+
/** Mapped custom value. */
|
|
1508
|
+
value?: Record<string, V1CustomValue$1>;
|
|
1509
|
+
}
|
|
1510
|
+
interface SecondaryEmail$1 {
|
|
1511
|
+
/** Email address. */
|
|
1512
|
+
email?: string;
|
|
1513
|
+
/** Email tag. */
|
|
1514
|
+
tag?: EmailTag$1;
|
|
1515
|
+
}
|
|
1516
|
+
declare enum EmailTag$1 {
|
|
1517
|
+
UNTAGGED = "UNTAGGED",
|
|
1518
|
+
MAIN = "MAIN",
|
|
1519
|
+
HOME = "HOME",
|
|
1520
|
+
WORK = "WORK"
|
|
1521
|
+
}
|
|
1522
|
+
interface Phone$1 {
|
|
1523
|
+
/** Phone country code. */
|
|
1524
|
+
countryCode?: string | null;
|
|
1525
|
+
/** Phone number. */
|
|
1526
|
+
phone?: string;
|
|
1527
|
+
/** Phone tag. */
|
|
1528
|
+
tag?: PhoneTag$1;
|
|
1529
|
+
}
|
|
1530
|
+
declare enum PhoneTag$1 {
|
|
1531
|
+
UNTAGGED = "UNTAGGED",
|
|
1532
|
+
MAIN = "MAIN",
|
|
1533
|
+
HOME = "HOME",
|
|
1534
|
+
MOBILE = "MOBILE",
|
|
1535
|
+
WORK = "WORK",
|
|
1536
|
+
FAX = "FAX"
|
|
1537
|
+
}
|
|
1538
|
+
interface AddressWrapper$1 {
|
|
1539
|
+
/** Address. */
|
|
1540
|
+
address?: Address$1;
|
|
1541
|
+
/** Address tag. */
|
|
1542
|
+
tag?: AddressTag$1;
|
|
1543
|
+
}
|
|
1544
|
+
/** Physical address */
|
|
1545
|
+
interface Address$1 {
|
|
1546
|
+
/** Country code. */
|
|
1547
|
+
country?: string | null;
|
|
1548
|
+
/** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
|
|
1549
|
+
subdivision?: string | null;
|
|
1550
|
+
/** City name. */
|
|
1551
|
+
city?: string | null;
|
|
1552
|
+
/** Zip/postal code. */
|
|
1553
|
+
postalCode?: string | null;
|
|
1554
|
+
/** Main address line, usually street and number as free text. */
|
|
1555
|
+
addressLine1?: string | null;
|
|
1556
|
+
/** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
|
|
1557
|
+
addressLine2?: string | null;
|
|
1558
|
+
}
|
|
1559
|
+
declare enum AddressTag$1 {
|
|
1560
|
+
UNTAGGED = "UNTAGGED",
|
|
1561
|
+
HOME = "HOME",
|
|
1562
|
+
WORK = "WORK",
|
|
1563
|
+
BILLING = "BILLING",
|
|
1564
|
+
SHIPPING = "SHIPPING"
|
|
1565
|
+
}
|
|
1566
|
+
interface Metadata$1 {
|
|
1567
|
+
/**
|
|
1568
|
+
* represents general tags such as "isOwner", "isContributor"
|
|
1569
|
+
* @readonly
|
|
1570
|
+
*/
|
|
1571
|
+
tags?: string[];
|
|
1572
|
+
}
|
|
1573
|
+
interface Email$1 {
|
|
1574
|
+
address?: string;
|
|
1575
|
+
isVerified?: boolean;
|
|
1576
|
+
}
|
|
1577
|
+
interface StatusV2$1 {
|
|
1578
|
+
name?: StatusName$1;
|
|
1579
|
+
reasons?: Reason$1[];
|
|
1580
|
+
}
|
|
1581
|
+
declare enum StatusName$1 {
|
|
1582
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
1583
|
+
PENDING = "PENDING",
|
|
1584
|
+
ACTIVE = "ACTIVE",
|
|
1585
|
+
DELETED = "DELETED",
|
|
1586
|
+
BLOCKED = "BLOCKED",
|
|
1587
|
+
OFFLINE = "OFFLINE"
|
|
1588
|
+
}
|
|
1589
|
+
declare enum Reason$1 {
|
|
1590
|
+
UNKNOWN_REASON = "UNKNOWN_REASON",
|
|
1591
|
+
PENDING_ADMIN_APPROVAL_REQUIRED = "PENDING_ADMIN_APPROVAL_REQUIRED",
|
|
1592
|
+
PENDING_EMAIL_VERIFICATION_REQUIRED = "PENDING_EMAIL_VERIFICATION_REQUIRED"
|
|
1593
|
+
}
|
|
1594
|
+
interface Factor$1 {
|
|
1595
|
+
/** Factor ID. */
|
|
1596
|
+
factorId?: string;
|
|
1597
|
+
/** Factor type. */
|
|
1598
|
+
type?: FactorType$1;
|
|
1599
|
+
/** Factor status. */
|
|
1600
|
+
status?: Status$1;
|
|
1601
|
+
}
|
|
1602
|
+
declare enum FactorType$1 {
|
|
1603
|
+
UNKNOWN_FACTOR_TYPE = "UNKNOWN_FACTOR_TYPE",
|
|
1604
|
+
PASSWORD = "PASSWORD",
|
|
1605
|
+
SMS = "SMS",
|
|
1606
|
+
CALL = "CALL",
|
|
1607
|
+
EMAIL = "EMAIL",
|
|
1608
|
+
TOTP = "TOTP",
|
|
1609
|
+
PUSH = "PUSH"
|
|
1610
|
+
}
|
|
1611
|
+
declare enum Status$1 {
|
|
1612
|
+
/** Factor requires activation. */
|
|
1613
|
+
INACTIVE = "INACTIVE",
|
|
1614
|
+
/** Factor is active and can be used for authentication. */
|
|
1615
|
+
ACTIVE = "ACTIVE",
|
|
1616
|
+
/** Factor is blocked and cannot be used for authentication. The user should reenroll the factor. */
|
|
1617
|
+
REQUIRE_REENROLL = "REQUIRE_REENROLL"
|
|
1618
|
+
}
|
|
1619
|
+
interface CustomValue$1 extends CustomValueValueOneOf$1 {
|
|
1620
|
+
/** String value. */
|
|
1621
|
+
strValue?: string;
|
|
1622
|
+
/** Number value. */
|
|
1623
|
+
numValue?: number;
|
|
1624
|
+
/** Date value. */
|
|
1625
|
+
dateValue?: Date | null;
|
|
1626
|
+
/** List value. */
|
|
1627
|
+
listValue?: ListValue$1;
|
|
1628
|
+
/** Map value. */
|
|
1629
|
+
mapValue?: MapValue$1;
|
|
1630
|
+
}
|
|
1631
|
+
/** @oneof */
|
|
1632
|
+
interface CustomValueValueOneOf$1 {
|
|
1633
|
+
/** String value. */
|
|
1634
|
+
strValue?: string;
|
|
1635
|
+
/** Number value. */
|
|
1636
|
+
numValue?: number;
|
|
1637
|
+
/** Date value. */
|
|
1638
|
+
dateValue?: Date | null;
|
|
1639
|
+
/** List value. */
|
|
1640
|
+
listValue?: ListValue$1;
|
|
1641
|
+
/** Map value. */
|
|
1642
|
+
mapValue?: MapValue$1;
|
|
1643
|
+
}
|
|
1644
|
+
interface ListValue$1 {
|
|
1645
|
+
/** Custom value. */
|
|
1646
|
+
value?: CustomValue$1[];
|
|
1647
|
+
}
|
|
1648
|
+
interface MapValue$1 {
|
|
1649
|
+
/** Mapped custom value. */
|
|
1650
|
+
value?: Record<string, CustomValue$1>;
|
|
1651
|
+
}
|
|
1652
|
+
interface IdentifierNonNullableFields$1 {
|
|
1653
|
+
email: string;
|
|
1654
|
+
userName: string;
|
|
1655
|
+
}
|
|
1656
|
+
interface IdpConnectionNonNullableFields$1 {
|
|
1657
|
+
idpConnectionId: string;
|
|
1658
|
+
idpUserId: string;
|
|
1659
|
+
}
|
|
1660
|
+
interface AuthenticatorConnectionNonNullableFields$1 {
|
|
1661
|
+
authenticatorConnectionId: string;
|
|
1662
|
+
reEnrollmentRequired: boolean;
|
|
1663
|
+
}
|
|
1664
|
+
interface ConnectionNonNullableFields$1 {
|
|
1665
|
+
idpConnection?: IdpConnectionNonNullableFields$1;
|
|
1666
|
+
authenticatorConnection?: AuthenticatorConnectionNonNullableFields$1;
|
|
1667
|
+
}
|
|
1668
|
+
interface V1ListValueNonNullableFields$1 {
|
|
1669
|
+
value: V1CustomValueNonNullableFields$1[];
|
|
1670
|
+
}
|
|
1671
|
+
interface V1CustomValueNonNullableFields$1 {
|
|
1672
|
+
strValue: string;
|
|
1673
|
+
numValue: number;
|
|
1674
|
+
listValue?: V1ListValueNonNullableFields$1;
|
|
1675
|
+
}
|
|
1676
|
+
interface CustomFieldNonNullableFields$1 {
|
|
1677
|
+
name: string;
|
|
1678
|
+
value?: V1CustomValueNonNullableFields$1;
|
|
1679
|
+
}
|
|
1680
|
+
interface SecondaryEmailNonNullableFields$1 {
|
|
1681
|
+
email: string;
|
|
1682
|
+
tag: EmailTag$1;
|
|
1683
|
+
}
|
|
1684
|
+
interface PhoneNonNullableFields$1 {
|
|
1685
|
+
phone: string;
|
|
1686
|
+
tag: PhoneTag$1;
|
|
1687
|
+
}
|
|
1688
|
+
interface AddressWrapperNonNullableFields$1 {
|
|
1689
|
+
tag: AddressTag$1;
|
|
1690
|
+
}
|
|
1691
|
+
interface IdentityProfileNonNullableFields$1 {
|
|
1692
|
+
emails: string[];
|
|
1693
|
+
phones: string[];
|
|
1694
|
+
labels: string[];
|
|
1695
|
+
privacyStatus: PrivacyStatus$1;
|
|
1696
|
+
customFields: CustomFieldNonNullableFields$1[];
|
|
1697
|
+
secondaryEmails: SecondaryEmailNonNullableFields$1[];
|
|
1698
|
+
phonesV2: PhoneNonNullableFields$1[];
|
|
1699
|
+
addresses: AddressWrapperNonNullableFields$1[];
|
|
1700
|
+
}
|
|
1701
|
+
interface MetadataNonNullableFields$1 {
|
|
1702
|
+
tags: string[];
|
|
1703
|
+
}
|
|
1704
|
+
interface EmailNonNullableFields$1 {
|
|
1705
|
+
address: string;
|
|
1706
|
+
isVerified: boolean;
|
|
1707
|
+
}
|
|
1708
|
+
interface StatusV2NonNullableFields$1 {
|
|
1709
|
+
name: StatusName$1;
|
|
1710
|
+
reasons: Reason$1[];
|
|
1711
|
+
}
|
|
1712
|
+
interface FactorNonNullableFields$1 {
|
|
1713
|
+
factorId: string;
|
|
1714
|
+
type: FactorType$1;
|
|
1715
|
+
status: Status$1;
|
|
1716
|
+
}
|
|
1717
|
+
interface IdentityNonNullableFields$1 {
|
|
1718
|
+
identifiers: IdentifierNonNullableFields$1[];
|
|
1719
|
+
connections: ConnectionNonNullableFields$1[];
|
|
1720
|
+
identityProfile?: IdentityProfileNonNullableFields$1;
|
|
1721
|
+
metadata?: MetadataNonNullableFields$1;
|
|
1722
|
+
email?: EmailNonNullableFields$1;
|
|
1723
|
+
status?: StatusV2NonNullableFields$1;
|
|
1724
|
+
factors: FactorNonNullableFields$1[];
|
|
1725
|
+
}
|
|
1726
|
+
interface StateMachineResponseNonNullableFields$1 {
|
|
1727
|
+
state: StateType$1;
|
|
1728
|
+
identity?: IdentityNonNullableFields$1;
|
|
1729
|
+
}
|
|
1730
|
+
interface SendRecoveryEmailOptions {
|
|
1731
|
+
/** Language of the email to be sent. Defaults to the language specified in the member's profile. */
|
|
1732
|
+
language?: string | null;
|
|
1733
|
+
/** Where to redirect to after a successful recovery. */
|
|
1734
|
+
redirect?: Redirect;
|
|
1735
|
+
}
|
|
1736
|
+
interface SendActivationEmailOptions {
|
|
1737
|
+
/** Options for the activation email */
|
|
1738
|
+
emailOptions?: EmailOptions;
|
|
1739
|
+
}
|
|
1740
|
+
interface RecoverOptions {
|
|
1741
|
+
/** new password to set for the identity */
|
|
1742
|
+
password?: string | null;
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
declare function sendRecoveryEmail$1(httpClient: HttpClient): SendRecoveryEmailSignature;
|
|
1746
|
+
interface SendRecoveryEmailSignature {
|
|
1747
|
+
/**
|
|
1748
|
+
* Sends a member an email containing a customized link to a Wix-managed page
|
|
1749
|
+
* where the member can set a new password for their account.
|
|
1750
|
+
* @param - Email address associated with the account to recover.
|
|
1751
|
+
*/
|
|
1752
|
+
(email: string, options?: SendRecoveryEmailOptions | undefined): Promise<void>;
|
|
1753
|
+
}
|
|
1754
|
+
declare function sendActivationEmail$1(httpClient: HttpClient): SendActivationEmailSignature;
|
|
1755
|
+
interface SendActivationEmailSignature {
|
|
1756
|
+
/**
|
|
1757
|
+
* Sends an activation email with an activation token
|
|
1758
|
+
* making the transition from initial contact to a site member
|
|
1759
|
+
* @param - Id of the activating user
|
|
1760
|
+
*/
|
|
1761
|
+
(identityId: string, options?: SendActivationEmailOptions | undefined): Promise<void>;
|
|
1762
|
+
}
|
|
1763
|
+
declare function recover$1(httpClient: HttpClient): RecoverSignature;
|
|
1764
|
+
interface RecoverSignature {
|
|
1765
|
+
/** @param - recovery token */
|
|
1766
|
+
(recoveryToken: string, options?: RecoverOptions | undefined): Promise<StateMachineResponse$1 & StateMachineResponseNonNullableFields$1>;
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
declare const sendRecoveryEmail: MaybeContext<BuildRESTFunction<typeof sendRecoveryEmail$1> & typeof sendRecoveryEmail$1>;
|
|
1770
|
+
declare const sendActivationEmail: MaybeContext<BuildRESTFunction<typeof sendActivationEmail$1> & typeof sendActivationEmail$1>;
|
|
1771
|
+
declare const recover: MaybeContext<BuildRESTFunction<typeof recover$1> & typeof recover$1>;
|
|
1772
|
+
|
|
1773
|
+
type index_d$5_EmailOptions = EmailOptions;
|
|
1774
|
+
type index_d$5_RecoverOptions = RecoverOptions;
|
|
1775
|
+
type index_d$5_RecoverRequest = RecoverRequest;
|
|
1776
|
+
type index_d$5_RecoveryToken = RecoveryToken;
|
|
1777
|
+
type index_d$5_Redirect = Redirect;
|
|
1778
|
+
type index_d$5_SendActivationEmailOptions = SendActivationEmailOptions;
|
|
1779
|
+
type index_d$5_SendActivationEmailRequest = SendActivationEmailRequest;
|
|
1780
|
+
type index_d$5_SendActivationEmailResponse = SendActivationEmailResponse;
|
|
1781
|
+
type index_d$5_SendRecoveryEmailOptions = SendRecoveryEmailOptions;
|
|
1782
|
+
type index_d$5_SendRecoveryEmailRequest = SendRecoveryEmailRequest;
|
|
1783
|
+
type index_d$5_SendRecoveryEmailResponse = SendRecoveryEmailResponse;
|
|
1784
|
+
type index_d$5_TenantType = TenantType;
|
|
1785
|
+
declare const index_d$5_TenantType: typeof TenantType;
|
|
1786
|
+
declare const index_d$5_recover: typeof recover;
|
|
1787
|
+
declare const index_d$5_sendActivationEmail: typeof sendActivationEmail;
|
|
1788
|
+
declare const index_d$5_sendRecoveryEmail: typeof sendRecoveryEmail;
|
|
1789
|
+
declare namespace index_d$5 {
|
|
1790
|
+
export { type Address$1 as Address, AddressTag$1 as AddressTag, type AddressWrapper$1 as AddressWrapper, type AuthenticatorConnection$1 as AuthenticatorConnection, type Connection$1 as Connection, type ConnectionTypeOneOf$1 as ConnectionTypeOneOf, type CustomField$1 as CustomField, type CustomValue$1 as CustomValue, type CustomValueValueOneOf$1 as CustomValueValueOneOf, type Email$1 as Email, type index_d$5_EmailOptions as EmailOptions, EmailTag$1 as EmailTag, type Factor$1 as Factor, FactorType$1 as FactorType, type Identifier$1 as Identifier, type IdentifierValueOneOf$1 as IdentifierValueOneOf, type Identity$1 as Identity, type IdentityProfile$1 as IdentityProfile, type IdpConnection$1 as IdpConnection, type ListValue$1 as ListValue, type MapValue$1 as MapValue, type Metadata$1 as Metadata, type Phone$1 as Phone, PhoneTag$1 as PhoneTag, PrivacyStatus$1 as PrivacyStatus, Reason$1 as Reason, type index_d$5_RecoverOptions as RecoverOptions, type index_d$5_RecoverRequest as RecoverRequest, type index_d$5_RecoveryToken as RecoveryToken, type index_d$5_Redirect as Redirect, type SecondaryEmail$1 as SecondaryEmail, type index_d$5_SendActivationEmailOptions as SendActivationEmailOptions, type index_d$5_SendActivationEmailRequest as SendActivationEmailRequest, type index_d$5_SendActivationEmailResponse as SendActivationEmailResponse, type index_d$5_SendRecoveryEmailOptions as SendRecoveryEmailOptions, type index_d$5_SendRecoveryEmailRequest as SendRecoveryEmailRequest, type index_d$5_SendRecoveryEmailResponse as SendRecoveryEmailResponse, type StateMachineResponse$1 as StateMachineResponse, type StateMachineResponseNonNullableFields$1 as StateMachineResponseNonNullableFields, StateType$1 as StateType, Status$1 as Status, StatusName$1 as StatusName, type StatusV2$1 as StatusV2, index_d$5_TenantType as TenantType, type V1CustomValue$1 as V1CustomValue, type V1CustomValueValueOneOf$1 as V1CustomValueValueOneOf, type V1ListValue$1 as V1ListValue, type V1MapValue$1 as V1MapValue, index_d$5_recover as recover, index_d$5_sendActivationEmail as sendActivationEmail, index_d$5_sendRecoveryEmail as sendRecoveryEmail };
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
interface StartResponse {
|
|
1794
|
+
/** the identifier of the verification process */
|
|
1795
|
+
verificationId?: string;
|
|
1796
|
+
}
|
|
1797
|
+
interface StartRequest {
|
|
1798
|
+
/**
|
|
1799
|
+
* an identity_Id.
|
|
1800
|
+
* If not provided - currently, an exception is thrown. In the future the identity from identity response will be taken.
|
|
1801
|
+
*/
|
|
1802
|
+
identityId?: string | null;
|
|
1803
|
+
/** the delivery target */
|
|
1804
|
+
target?: Target;
|
|
1805
|
+
}
|
|
1806
|
+
declare enum Target {
|
|
1807
|
+
UNKNOWN_TARGET = "UNKNOWN_TARGET",
|
|
1808
|
+
EMAIL = "EMAIL"
|
|
1809
|
+
}
|
|
1810
|
+
interface VerifyRequest {
|
|
1811
|
+
/** the code to verify */
|
|
1812
|
+
code?: string;
|
|
1813
|
+
/** the identifier of the verification process */
|
|
1814
|
+
verificationId?: string;
|
|
1815
|
+
}
|
|
1816
|
+
interface VerifyResponse {
|
|
1817
|
+
}
|
|
1818
|
+
interface VerifyDuringAuthenticationRequest {
|
|
1819
|
+
/** The code to verify. */
|
|
1820
|
+
code: string;
|
|
1821
|
+
/** A state token representing the `REQUIRE_EMAIL_VERIFICATION` state. */
|
|
1822
|
+
stateToken: string;
|
|
1823
|
+
}
|
|
1824
|
+
interface StateMachineResponse {
|
|
1825
|
+
/** The current state of the login or registration process. */
|
|
1826
|
+
state?: StateType;
|
|
1827
|
+
/** If state is `SUCCESS`, a session token. */
|
|
1828
|
+
sessionToken?: string | null;
|
|
1829
|
+
/** A token representing the current state of the login or registration process. */
|
|
1830
|
+
stateToken?: string | null;
|
|
1831
|
+
/** Identing of the current member. */
|
|
1832
|
+
identity?: Identity;
|
|
1833
|
+
/** additional_data = 5; //TBD */
|
|
1834
|
+
additionalData?: Record<string, CustomValue>;
|
|
1835
|
+
}
|
|
1836
|
+
declare enum StateType {
|
|
1837
|
+
/** Initial unknown state. */
|
|
1838
|
+
UNKNOWN_STATE = "UNKNOWN_STATE",
|
|
1839
|
+
/** The operation completed successfully. */
|
|
1840
|
+
SUCCESS = "SUCCESS",
|
|
1841
|
+
/** State that indicates that the member needs owner approval to proceed, available action in: OwnerApprovalStateHandler */
|
|
1842
|
+
REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
|
|
1843
|
+
/**
|
|
1844
|
+
* State that indicates a member waiting for verification, available action are: verifyDuringAuthentication or resendDuringAuthentication
|
|
1845
|
+
* https://dev.wix.com/docs/rest/api-reference/auth-management/verification-v1/verify-during-authentication
|
|
1846
|
+
*/
|
|
1847
|
+
REQUIRE_EMAIL_VERIFICATION = "REQUIRE_EMAIL_VERIFICATION",
|
|
1848
|
+
/** State that indicates checking that the status is not one of the `invalidStates` before proceeding. */
|
|
1849
|
+
STATUS_CHECK = "STATUS_CHECK",
|
|
1850
|
+
REQUIRE_MFA = "REQUIRE_MFA"
|
|
1851
|
+
}
|
|
1852
|
+
interface Identity {
|
|
1853
|
+
/** Identity ID */
|
|
1854
|
+
_id?: string | null;
|
|
1855
|
+
/**
|
|
1856
|
+
* Identifiers
|
|
1857
|
+
* @deprecated Identifiers
|
|
1858
|
+
* @replacedBy email
|
|
1859
|
+
* @targetRemovalDate 2023-05-01
|
|
1860
|
+
*/
|
|
1861
|
+
identifiers?: Identifier[];
|
|
1862
|
+
/**
|
|
1863
|
+
* Represents the current state of an item. Each time the item is modified, its `revision` changes.
|
|
1864
|
+
* For an update operation to succeed, you MUST pass the latest revision.
|
|
1865
|
+
*/
|
|
1866
|
+
revision?: string | null;
|
|
1867
|
+
/**
|
|
1868
|
+
* The time this identity was created.
|
|
1869
|
+
* @readonly
|
|
1870
|
+
*/
|
|
1871
|
+
_createdDate?: Date | null;
|
|
1872
|
+
/**
|
|
1873
|
+
* The time this identity was last updated.
|
|
1874
|
+
* @readonly
|
|
1875
|
+
*/
|
|
1876
|
+
_updatedDate?: Date | null;
|
|
1877
|
+
/** The identity configured connections to authenticate with. */
|
|
1878
|
+
connections?: Connection[];
|
|
1879
|
+
/** Identity profile. */
|
|
1880
|
+
identityProfile?: IdentityProfile;
|
|
1881
|
+
/**
|
|
1882
|
+
* Additional information about the identity that can impact user access.
|
|
1883
|
+
* This data cannot be set.
|
|
1884
|
+
*/
|
|
1885
|
+
metadata?: Metadata;
|
|
1886
|
+
/** Identity email address. */
|
|
1887
|
+
email?: Email;
|
|
1888
|
+
/** Identity's current status. */
|
|
1889
|
+
status?: StatusV2;
|
|
1890
|
+
/** filled by pre registered spi */
|
|
1891
|
+
customAttributes?: Record<string, any> | null;
|
|
1892
|
+
/**
|
|
1893
|
+
* Identity factors.
|
|
1894
|
+
* @readonly
|
|
1895
|
+
*/
|
|
1896
|
+
factors?: Factor[];
|
|
1897
|
+
}
|
|
1898
|
+
interface Identifier extends IdentifierValueOneOf {
|
|
1899
|
+
email?: string;
|
|
1900
|
+
userName?: string;
|
|
1901
|
+
}
|
|
1902
|
+
/** @oneof */
|
|
1903
|
+
interface IdentifierValueOneOf {
|
|
1904
|
+
email?: string;
|
|
1905
|
+
userName?: string;
|
|
1906
|
+
}
|
|
1907
|
+
interface Connection extends ConnectionTypeOneOf {
|
|
1908
|
+
/** IDP connection. */
|
|
1909
|
+
idpConnection?: IdpConnection;
|
|
1910
|
+
/** Authenticator connection. */
|
|
1911
|
+
authenticatorConnection?: AuthenticatorConnection;
|
|
1912
|
+
}
|
|
1913
|
+
/** @oneof */
|
|
1914
|
+
interface ConnectionTypeOneOf {
|
|
1915
|
+
/** IDP connection. */
|
|
1916
|
+
idpConnection?: IdpConnection;
|
|
1917
|
+
/** Authenticator connection. */
|
|
1918
|
+
authenticatorConnection?: AuthenticatorConnection;
|
|
1919
|
+
}
|
|
1920
|
+
interface IdpConnection {
|
|
1921
|
+
/** IDP connection ID. */
|
|
1922
|
+
idpConnectionId?: string;
|
|
1923
|
+
/** IDP user ID. */
|
|
1924
|
+
idpUserId?: string;
|
|
1925
|
+
}
|
|
1926
|
+
interface AuthenticatorConnection {
|
|
1927
|
+
/** Authenticator connection ID. */
|
|
1928
|
+
authenticatorConnectionId?: string;
|
|
1929
|
+
/** Whether re-enrollment is required. */
|
|
1930
|
+
reEnrollmentRequired?: boolean;
|
|
1931
|
+
}
|
|
1932
|
+
interface IdentityProfile {
|
|
1933
|
+
/** Profile first name. */
|
|
1934
|
+
firstName?: string | null;
|
|
1935
|
+
/** Profile last name. */
|
|
1936
|
+
lastName?: string | null;
|
|
1937
|
+
/** Profile nickname. */
|
|
1938
|
+
nickname?: string | null;
|
|
1939
|
+
/** Profile picture URL. */
|
|
1940
|
+
picture?: string | null;
|
|
1941
|
+
/**
|
|
1942
|
+
* Deprecated. Use `secondaryEmails` instead.
|
|
1943
|
+
* @deprecated Deprecated. Use `secondaryEmails` instead.
|
|
1944
|
+
* @replacedBy secondary_emails
|
|
1945
|
+
* @targetRemovalDate 2023-11-01
|
|
1946
|
+
*/
|
|
1947
|
+
emails?: string[];
|
|
1948
|
+
/**
|
|
1949
|
+
* Deprecated. Use `phonesV2` instead.
|
|
1950
|
+
* @deprecated Deprecated. Use `phonesV2` instead.
|
|
1951
|
+
* @replacedBy phones_v2
|
|
1952
|
+
* @targetRemovalDate 2023-11-01
|
|
1953
|
+
*/
|
|
1954
|
+
phones?: string[];
|
|
1955
|
+
/** List of profile labels. */
|
|
1956
|
+
labels?: string[];
|
|
1957
|
+
/** Profile language. */
|
|
1958
|
+
language?: string | null;
|
|
1959
|
+
/** Profile privacy status. */
|
|
1960
|
+
privacyStatus?: PrivacyStatus;
|
|
1961
|
+
/**
|
|
1962
|
+
* Any number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts)
|
|
1963
|
+
* are used to store additional information about your site or app's contacts.
|
|
1964
|
+
*/
|
|
1965
|
+
customFields?: CustomField[];
|
|
1966
|
+
/** List of profile email addresses. */
|
|
1967
|
+
secondaryEmails?: SecondaryEmail[];
|
|
1968
|
+
/** List of profile phone numbers. */
|
|
1969
|
+
phonesV2?: Phone[];
|
|
1970
|
+
/** List of profile physical addresses. */
|
|
1971
|
+
addresses?: AddressWrapper[];
|
|
1972
|
+
/** Company name. */
|
|
1973
|
+
company?: string | null;
|
|
1974
|
+
/** Position within company. */
|
|
1975
|
+
position?: string | null;
|
|
1976
|
+
/** Profile birthdate - ISO-8601 extended local date format (YYYY-MM-DD). */
|
|
1977
|
+
birthdate?: string | null;
|
|
1978
|
+
}
|
|
1979
|
+
declare enum PrivacyStatus {
|
|
1980
|
+
UNDEFINED = "UNDEFINED",
|
|
1981
|
+
PUBLIC = "PUBLIC",
|
|
1982
|
+
PRIVATE = "PRIVATE"
|
|
1983
|
+
}
|
|
1984
|
+
interface CustomField {
|
|
1985
|
+
/**
|
|
1986
|
+
* Custom field name. The name must match one of the key properties of the objects returned by
|
|
1987
|
+
* [`List Extended Fields`](https://dev.wix.com/docs/rest/api-reference/contacts/extended-fields/list-extended-fields)
|
|
1988
|
+
* with the `custom.` prefix removed.
|
|
1989
|
+
*/
|
|
1990
|
+
name?: string;
|
|
1991
|
+
/** Custom field value. */
|
|
1992
|
+
value?: V1CustomValue;
|
|
1993
|
+
}
|
|
1994
|
+
interface V1CustomValue extends V1CustomValueValueOneOf {
|
|
1995
|
+
/** String value. */
|
|
1996
|
+
strValue?: string;
|
|
1997
|
+
/** Number value. */
|
|
1998
|
+
numValue?: number;
|
|
1999
|
+
/** Date value. */
|
|
2000
|
+
dateValue?: Date | null;
|
|
2001
|
+
/** List value. */
|
|
2002
|
+
listValue?: V1ListValue;
|
|
2003
|
+
/** Map value. */
|
|
2004
|
+
mapValue?: V1MapValue;
|
|
2005
|
+
}
|
|
2006
|
+
/** @oneof */
|
|
2007
|
+
interface V1CustomValueValueOneOf {
|
|
2008
|
+
/** String value. */
|
|
2009
|
+
strValue?: string;
|
|
2010
|
+
/** Number value. */
|
|
2011
|
+
numValue?: number;
|
|
2012
|
+
/** Date value. */
|
|
2013
|
+
dateValue?: Date | null;
|
|
2014
|
+
/** List value. */
|
|
2015
|
+
listValue?: V1ListValue;
|
|
2016
|
+
/** Map value. */
|
|
2017
|
+
mapValue?: V1MapValue;
|
|
2018
|
+
}
|
|
2019
|
+
interface V1ListValue {
|
|
2020
|
+
/** Custom value. */
|
|
2021
|
+
value?: V1CustomValue[];
|
|
2022
|
+
}
|
|
2023
|
+
interface V1MapValue {
|
|
2024
|
+
/** Mapped custom value. */
|
|
2025
|
+
value?: Record<string, V1CustomValue>;
|
|
2026
|
+
}
|
|
2027
|
+
interface SecondaryEmail {
|
|
2028
|
+
/** Email address. */
|
|
2029
|
+
email?: string;
|
|
2030
|
+
/** Email tag. */
|
|
2031
|
+
tag?: EmailTag;
|
|
2032
|
+
}
|
|
2033
|
+
declare enum EmailTag {
|
|
2034
|
+
UNTAGGED = "UNTAGGED",
|
|
2035
|
+
MAIN = "MAIN",
|
|
2036
|
+
HOME = "HOME",
|
|
2037
|
+
WORK = "WORK"
|
|
2038
|
+
}
|
|
2039
|
+
interface Phone {
|
|
2040
|
+
/** Phone country code. */
|
|
2041
|
+
countryCode?: string | null;
|
|
2042
|
+
/** Phone number. */
|
|
2043
|
+
phone?: string;
|
|
2044
|
+
/** Phone tag. */
|
|
2045
|
+
tag?: PhoneTag;
|
|
2046
|
+
}
|
|
2047
|
+
declare enum PhoneTag {
|
|
2048
|
+
UNTAGGED = "UNTAGGED",
|
|
2049
|
+
MAIN = "MAIN",
|
|
2050
|
+
HOME = "HOME",
|
|
2051
|
+
MOBILE = "MOBILE",
|
|
2052
|
+
WORK = "WORK",
|
|
2053
|
+
FAX = "FAX"
|
|
2054
|
+
}
|
|
2055
|
+
interface AddressWrapper {
|
|
2056
|
+
/** Address. */
|
|
2057
|
+
address?: Address;
|
|
2058
|
+
/** Address tag. */
|
|
2059
|
+
tag?: AddressTag;
|
|
2060
|
+
}
|
|
2061
|
+
/** Physical address */
|
|
2062
|
+
interface Address {
|
|
2063
|
+
/** Country code. */
|
|
2064
|
+
country?: string | null;
|
|
2065
|
+
/** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
|
|
2066
|
+
subdivision?: string | null;
|
|
2067
|
+
/** City name. */
|
|
2068
|
+
city?: string | null;
|
|
2069
|
+
/** Zip/postal code. */
|
|
2070
|
+
postalCode?: string | null;
|
|
2071
|
+
/** Main address line, usually street and number as free text. */
|
|
2072
|
+
addressLine1?: string | null;
|
|
2073
|
+
/** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
|
|
2074
|
+
addressLine2?: string | null;
|
|
2075
|
+
}
|
|
2076
|
+
declare enum AddressTag {
|
|
2077
|
+
UNTAGGED = "UNTAGGED",
|
|
2078
|
+
HOME = "HOME",
|
|
2079
|
+
WORK = "WORK",
|
|
2080
|
+
BILLING = "BILLING",
|
|
2081
|
+
SHIPPING = "SHIPPING"
|
|
2082
|
+
}
|
|
2083
|
+
interface Metadata {
|
|
2084
|
+
/**
|
|
2085
|
+
* represents general tags such as "isOwner", "isContributor"
|
|
2086
|
+
* @readonly
|
|
2087
|
+
*/
|
|
2088
|
+
tags?: string[];
|
|
2089
|
+
}
|
|
2090
|
+
interface Email {
|
|
2091
|
+
address?: string;
|
|
2092
|
+
isVerified?: boolean;
|
|
2093
|
+
}
|
|
2094
|
+
interface StatusV2 {
|
|
2095
|
+
name?: StatusName;
|
|
2096
|
+
reasons?: Reason[];
|
|
2097
|
+
}
|
|
2098
|
+
declare enum StatusName {
|
|
2099
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
2100
|
+
PENDING = "PENDING",
|
|
2101
|
+
ACTIVE = "ACTIVE",
|
|
2102
|
+
DELETED = "DELETED",
|
|
2103
|
+
BLOCKED = "BLOCKED",
|
|
2104
|
+
OFFLINE = "OFFLINE"
|
|
2105
|
+
}
|
|
2106
|
+
declare enum Reason {
|
|
2107
|
+
UNKNOWN_REASON = "UNKNOWN_REASON",
|
|
2108
|
+
PENDING_ADMIN_APPROVAL_REQUIRED = "PENDING_ADMIN_APPROVAL_REQUIRED",
|
|
2109
|
+
PENDING_EMAIL_VERIFICATION_REQUIRED = "PENDING_EMAIL_VERIFICATION_REQUIRED"
|
|
2110
|
+
}
|
|
2111
|
+
interface Factor {
|
|
2112
|
+
/** Factor ID. */
|
|
2113
|
+
factorId?: string;
|
|
2114
|
+
/** Factor type. */
|
|
2115
|
+
type?: FactorType;
|
|
2116
|
+
/** Factor status. */
|
|
2117
|
+
status?: Status;
|
|
2118
|
+
}
|
|
2119
|
+
declare enum FactorType {
|
|
2120
|
+
UNKNOWN_FACTOR_TYPE = "UNKNOWN_FACTOR_TYPE",
|
|
2121
|
+
PASSWORD = "PASSWORD",
|
|
2122
|
+
SMS = "SMS",
|
|
2123
|
+
CALL = "CALL",
|
|
2124
|
+
EMAIL = "EMAIL",
|
|
2125
|
+
TOTP = "TOTP",
|
|
2126
|
+
PUSH = "PUSH"
|
|
2127
|
+
}
|
|
2128
|
+
declare enum Status {
|
|
2129
|
+
/** Factor requires activation. */
|
|
2130
|
+
INACTIVE = "INACTIVE",
|
|
2131
|
+
/** Factor is active and can be used for authentication. */
|
|
2132
|
+
ACTIVE = "ACTIVE",
|
|
2133
|
+
/** Factor is blocked and cannot be used for authentication. The user should reenroll the factor. */
|
|
2134
|
+
REQUIRE_REENROLL = "REQUIRE_REENROLL"
|
|
2135
|
+
}
|
|
2136
|
+
interface CustomValue extends CustomValueValueOneOf {
|
|
2137
|
+
/** String value. */
|
|
2138
|
+
strValue?: string;
|
|
2139
|
+
/** Number value. */
|
|
2140
|
+
numValue?: number;
|
|
2141
|
+
/** Date value. */
|
|
2142
|
+
dateValue?: Date | null;
|
|
2143
|
+
/** List value. */
|
|
2144
|
+
listValue?: ListValue;
|
|
2145
|
+
/** Map value. */
|
|
2146
|
+
mapValue?: MapValue;
|
|
2147
|
+
}
|
|
2148
|
+
/** @oneof */
|
|
2149
|
+
interface CustomValueValueOneOf {
|
|
2150
|
+
/** String value. */
|
|
2151
|
+
strValue?: string;
|
|
2152
|
+
/** Number value. */
|
|
2153
|
+
numValue?: number;
|
|
2154
|
+
/** Date value. */
|
|
2155
|
+
dateValue?: Date | null;
|
|
2156
|
+
/** List value. */
|
|
2157
|
+
listValue?: ListValue;
|
|
2158
|
+
/** Map value. */
|
|
2159
|
+
mapValue?: MapValue;
|
|
2160
|
+
}
|
|
2161
|
+
interface ListValue {
|
|
2162
|
+
/** Custom value. */
|
|
2163
|
+
value?: CustomValue[];
|
|
2164
|
+
}
|
|
2165
|
+
interface MapValue {
|
|
2166
|
+
/** Mapped custom value. */
|
|
2167
|
+
value?: Record<string, CustomValue>;
|
|
2168
|
+
}
|
|
2169
|
+
interface ResendDuringAuthenticationRequest {
|
|
2170
|
+
/** A state token representing the `REQUIRE_EMAIL_VERIFICATION` state. */
|
|
2171
|
+
stateToken: string;
|
|
2172
|
+
}
|
|
2173
|
+
interface StartResponseNonNullableFields {
|
|
2174
|
+
verificationId: string;
|
|
2175
|
+
}
|
|
2176
|
+
interface IdentifierNonNullableFields {
|
|
2177
|
+
email: string;
|
|
2178
|
+
userName: string;
|
|
2179
|
+
}
|
|
2180
|
+
interface IdpConnectionNonNullableFields {
|
|
2181
|
+
idpConnectionId: string;
|
|
2182
|
+
idpUserId: string;
|
|
2183
|
+
}
|
|
2184
|
+
interface AuthenticatorConnectionNonNullableFields {
|
|
2185
|
+
authenticatorConnectionId: string;
|
|
2186
|
+
reEnrollmentRequired: boolean;
|
|
2187
|
+
}
|
|
2188
|
+
interface ConnectionNonNullableFields {
|
|
2189
|
+
idpConnection?: IdpConnectionNonNullableFields;
|
|
2190
|
+
authenticatorConnection?: AuthenticatorConnectionNonNullableFields;
|
|
2191
|
+
}
|
|
2192
|
+
interface V1ListValueNonNullableFields {
|
|
2193
|
+
value: V1CustomValueNonNullableFields[];
|
|
2194
|
+
}
|
|
2195
|
+
interface V1CustomValueNonNullableFields {
|
|
2196
|
+
strValue: string;
|
|
2197
|
+
numValue: number;
|
|
2198
|
+
listValue?: V1ListValueNonNullableFields;
|
|
2199
|
+
}
|
|
2200
|
+
interface CustomFieldNonNullableFields {
|
|
2201
|
+
name: string;
|
|
2202
|
+
value?: V1CustomValueNonNullableFields;
|
|
2203
|
+
}
|
|
2204
|
+
interface SecondaryEmailNonNullableFields {
|
|
2205
|
+
email: string;
|
|
2206
|
+
tag: EmailTag;
|
|
2207
|
+
}
|
|
2208
|
+
interface PhoneNonNullableFields {
|
|
2209
|
+
phone: string;
|
|
2210
|
+
tag: PhoneTag;
|
|
2211
|
+
}
|
|
2212
|
+
interface AddressWrapperNonNullableFields {
|
|
2213
|
+
tag: AddressTag;
|
|
2214
|
+
}
|
|
2215
|
+
interface IdentityProfileNonNullableFields {
|
|
2216
|
+
emails: string[];
|
|
2217
|
+
phones: string[];
|
|
2218
|
+
labels: string[];
|
|
2219
|
+
privacyStatus: PrivacyStatus;
|
|
2220
|
+
customFields: CustomFieldNonNullableFields[];
|
|
2221
|
+
secondaryEmails: SecondaryEmailNonNullableFields[];
|
|
2222
|
+
phonesV2: PhoneNonNullableFields[];
|
|
2223
|
+
addresses: AddressWrapperNonNullableFields[];
|
|
2224
|
+
}
|
|
2225
|
+
interface MetadataNonNullableFields {
|
|
2226
|
+
tags: string[];
|
|
2227
|
+
}
|
|
2228
|
+
interface EmailNonNullableFields {
|
|
2229
|
+
address: string;
|
|
2230
|
+
isVerified: boolean;
|
|
2231
|
+
}
|
|
2232
|
+
interface StatusV2NonNullableFields {
|
|
2233
|
+
name: StatusName;
|
|
2234
|
+
reasons: Reason[];
|
|
2235
|
+
}
|
|
2236
|
+
interface FactorNonNullableFields {
|
|
2237
|
+
factorId: string;
|
|
2238
|
+
type: FactorType;
|
|
2239
|
+
status: Status;
|
|
2240
|
+
}
|
|
2241
|
+
interface IdentityNonNullableFields {
|
|
2242
|
+
identifiers: IdentifierNonNullableFields[];
|
|
2243
|
+
connections: ConnectionNonNullableFields[];
|
|
2244
|
+
identityProfile?: IdentityProfileNonNullableFields;
|
|
2245
|
+
metadata?: MetadataNonNullableFields;
|
|
2246
|
+
email?: EmailNonNullableFields;
|
|
2247
|
+
status?: StatusV2NonNullableFields;
|
|
2248
|
+
factors: FactorNonNullableFields[];
|
|
2249
|
+
}
|
|
2250
|
+
interface StateMachineResponseNonNullableFields {
|
|
2251
|
+
state: StateType;
|
|
2252
|
+
identity?: IdentityNonNullableFields;
|
|
2253
|
+
}
|
|
2254
|
+
interface StartOptions {
|
|
2255
|
+
/**
|
|
2256
|
+
* an identity_Id.
|
|
2257
|
+
* If not provided - currently, an exception is thrown. In the future the identity from identity response will be taken.
|
|
2258
|
+
*/
|
|
2259
|
+
identityId?: string | null;
|
|
2260
|
+
/** the delivery target */
|
|
2261
|
+
target?: Target;
|
|
2262
|
+
}
|
|
2263
|
+
interface VerifyDuringAuthenticationOptions {
|
|
2264
|
+
/** A state token representing the `REQUIRE_EMAIL_VERIFICATION` state. */
|
|
2265
|
+
stateToken: string;
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
declare function start$1(httpClient: HttpClient): StartSignature;
|
|
2269
|
+
interface StartSignature {
|
|
2270
|
+
/**
|
|
2271
|
+
* starts a verification process
|
|
2272
|
+
* example: sends a code to the identity's email
|
|
2273
|
+
*/
|
|
2274
|
+
(options?: StartOptions | undefined): Promise<StartResponse & StartResponseNonNullableFields>;
|
|
2275
|
+
}
|
|
2276
|
+
declare function verifyDuringAuthentication$1(httpClient: HttpClient): VerifyDuringAuthenticationSignature;
|
|
2277
|
+
interface VerifyDuringAuthenticationSignature {
|
|
2278
|
+
/**
|
|
2279
|
+
* Continues the registration process when a member is required to verify an email address
|
|
2280
|
+
* using a verification code received by email.
|
|
2281
|
+
*
|
|
2282
|
+
* Email verification is required when the registering member is already listed as a contact.
|
|
2283
|
+
*
|
|
2284
|
+
* Typically, after a successful verification, you generate and use member tokens for the
|
|
2285
|
+
* registered member so that subsequent API calls are called as part of a member session.
|
|
2286
|
+
* @param - The code to verify.
|
|
2287
|
+
*/
|
|
2288
|
+
(code: string, options: VerifyDuringAuthenticationOptions): Promise<StateMachineResponse & StateMachineResponseNonNullableFields>;
|
|
2289
|
+
}
|
|
2290
|
+
declare function resendDuringAuthentication$1(httpClient: HttpClient): ResendDuringAuthenticationSignature;
|
|
2291
|
+
interface ResendDuringAuthenticationSignature {
|
|
2292
|
+
/**
|
|
2293
|
+
* Resend the verification email and continue the registration process when a member is required to verify an email address
|
|
2294
|
+
* using a verification code received by email.
|
|
2295
|
+
* @param - A state token representing the `REQUIRE_EMAIL_VERIFICATION` state.
|
|
2296
|
+
*/
|
|
2297
|
+
(stateToken: string): Promise<StateMachineResponse & StateMachineResponseNonNullableFields>;
|
|
2298
|
+
}
|
|
2299
|
+
|
|
2300
|
+
declare const start: MaybeContext<BuildRESTFunction<typeof start$1> & typeof start$1>;
|
|
2301
|
+
declare const verifyDuringAuthentication: MaybeContext<BuildRESTFunction<typeof verifyDuringAuthentication$1> & typeof verifyDuringAuthentication$1>;
|
|
2302
|
+
declare const resendDuringAuthentication: MaybeContext<BuildRESTFunction<typeof resendDuringAuthentication$1> & typeof resendDuringAuthentication$1>;
|
|
2303
|
+
|
|
2304
|
+
type index_d$4_Address = Address;
|
|
2305
|
+
type index_d$4_AddressTag = AddressTag;
|
|
2306
|
+
declare const index_d$4_AddressTag: typeof AddressTag;
|
|
2307
|
+
type index_d$4_AddressWrapper = AddressWrapper;
|
|
2308
|
+
type index_d$4_AuthenticatorConnection = AuthenticatorConnection;
|
|
2309
|
+
type index_d$4_Connection = Connection;
|
|
2310
|
+
type index_d$4_ConnectionTypeOneOf = ConnectionTypeOneOf;
|
|
2311
|
+
type index_d$4_CustomField = CustomField;
|
|
2312
|
+
type index_d$4_CustomValue = CustomValue;
|
|
2313
|
+
type index_d$4_CustomValueValueOneOf = CustomValueValueOneOf;
|
|
2314
|
+
type index_d$4_Email = Email;
|
|
2315
|
+
type index_d$4_EmailTag = EmailTag;
|
|
2316
|
+
declare const index_d$4_EmailTag: typeof EmailTag;
|
|
2317
|
+
type index_d$4_Factor = Factor;
|
|
2318
|
+
type index_d$4_FactorType = FactorType;
|
|
2319
|
+
declare const index_d$4_FactorType: typeof FactorType;
|
|
2320
|
+
type index_d$4_Identifier = Identifier;
|
|
2321
|
+
type index_d$4_IdentifierValueOneOf = IdentifierValueOneOf;
|
|
2322
|
+
type index_d$4_Identity = Identity;
|
|
2323
|
+
type index_d$4_IdentityProfile = IdentityProfile;
|
|
2324
|
+
type index_d$4_IdpConnection = IdpConnection;
|
|
2325
|
+
type index_d$4_ListValue = ListValue;
|
|
2326
|
+
type index_d$4_MapValue = MapValue;
|
|
2327
|
+
type index_d$4_Metadata = Metadata;
|
|
2328
|
+
type index_d$4_Phone = Phone;
|
|
2329
|
+
type index_d$4_PhoneTag = PhoneTag;
|
|
2330
|
+
declare const index_d$4_PhoneTag: typeof PhoneTag;
|
|
2331
|
+
type index_d$4_PrivacyStatus = PrivacyStatus;
|
|
2332
|
+
declare const index_d$4_PrivacyStatus: typeof PrivacyStatus;
|
|
2333
|
+
type index_d$4_Reason = Reason;
|
|
2334
|
+
declare const index_d$4_Reason: typeof Reason;
|
|
2335
|
+
type index_d$4_ResendDuringAuthenticationRequest = ResendDuringAuthenticationRequest;
|
|
2336
|
+
type index_d$4_SecondaryEmail = SecondaryEmail;
|
|
2337
|
+
type index_d$4_StartOptions = StartOptions;
|
|
2338
|
+
type index_d$4_StartRequest = StartRequest;
|
|
2339
|
+
type index_d$4_StartResponse = StartResponse;
|
|
2340
|
+
type index_d$4_StartResponseNonNullableFields = StartResponseNonNullableFields;
|
|
2341
|
+
type index_d$4_StateMachineResponse = StateMachineResponse;
|
|
2342
|
+
type index_d$4_StateMachineResponseNonNullableFields = StateMachineResponseNonNullableFields;
|
|
2343
|
+
type index_d$4_StateType = StateType;
|
|
2344
|
+
declare const index_d$4_StateType: typeof StateType;
|
|
2345
|
+
type index_d$4_Status = Status;
|
|
2346
|
+
declare const index_d$4_Status: typeof Status;
|
|
2347
|
+
type index_d$4_StatusName = StatusName;
|
|
2348
|
+
declare const index_d$4_StatusName: typeof StatusName;
|
|
2349
|
+
type index_d$4_StatusV2 = StatusV2;
|
|
2350
|
+
type index_d$4_Target = Target;
|
|
2351
|
+
declare const index_d$4_Target: typeof Target;
|
|
2352
|
+
type index_d$4_V1CustomValue = V1CustomValue;
|
|
2353
|
+
type index_d$4_V1CustomValueValueOneOf = V1CustomValueValueOneOf;
|
|
2354
|
+
type index_d$4_V1ListValue = V1ListValue;
|
|
2355
|
+
type index_d$4_V1MapValue = V1MapValue;
|
|
2356
|
+
type index_d$4_VerifyDuringAuthenticationOptions = VerifyDuringAuthenticationOptions;
|
|
2357
|
+
type index_d$4_VerifyDuringAuthenticationRequest = VerifyDuringAuthenticationRequest;
|
|
2358
|
+
type index_d$4_VerifyRequest = VerifyRequest;
|
|
2359
|
+
type index_d$4_VerifyResponse = VerifyResponse;
|
|
2360
|
+
declare const index_d$4_resendDuringAuthentication: typeof resendDuringAuthentication;
|
|
2361
|
+
declare const index_d$4_start: typeof start;
|
|
2362
|
+
declare const index_d$4_verifyDuringAuthentication: typeof verifyDuringAuthentication;
|
|
2363
|
+
declare namespace index_d$4 {
|
|
2364
|
+
export { type index_d$4_Address as Address, index_d$4_AddressTag as AddressTag, type index_d$4_AddressWrapper as AddressWrapper, type index_d$4_AuthenticatorConnection as AuthenticatorConnection, type index_d$4_Connection as Connection, type index_d$4_ConnectionTypeOneOf as ConnectionTypeOneOf, type index_d$4_CustomField as CustomField, type index_d$4_CustomValue as CustomValue, type index_d$4_CustomValueValueOneOf as CustomValueValueOneOf, type index_d$4_Email as Email, index_d$4_EmailTag as EmailTag, type index_d$4_Factor as Factor, index_d$4_FactorType as FactorType, type index_d$4_Identifier as Identifier, type index_d$4_IdentifierValueOneOf as IdentifierValueOneOf, type index_d$4_Identity as Identity, type index_d$4_IdentityProfile as IdentityProfile, type index_d$4_IdpConnection as IdpConnection, type index_d$4_ListValue as ListValue, type index_d$4_MapValue as MapValue, type index_d$4_Metadata as Metadata, type index_d$4_Phone as Phone, index_d$4_PhoneTag as PhoneTag, index_d$4_PrivacyStatus as PrivacyStatus, index_d$4_Reason as Reason, type index_d$4_ResendDuringAuthenticationRequest as ResendDuringAuthenticationRequest, type index_d$4_SecondaryEmail as SecondaryEmail, type index_d$4_StartOptions as StartOptions, type index_d$4_StartRequest as StartRequest, type index_d$4_StartResponse as StartResponse, type index_d$4_StartResponseNonNullableFields as StartResponseNonNullableFields, type index_d$4_StateMachineResponse as StateMachineResponse, type index_d$4_StateMachineResponseNonNullableFields as StateMachineResponseNonNullableFields, index_d$4_StateType as StateType, index_d$4_Status as Status, index_d$4_StatusName as StatusName, type index_d$4_StatusV2 as StatusV2, index_d$4_Target as Target, type index_d$4_V1CustomValue as V1CustomValue, type index_d$4_V1CustomValueValueOneOf as V1CustomValueValueOneOf, type index_d$4_V1ListValue as V1ListValue, type index_d$4_V1MapValue as V1MapValue, type index_d$4_VerifyDuringAuthenticationOptions as VerifyDuringAuthenticationOptions, type index_d$4_VerifyDuringAuthenticationRequest as VerifyDuringAuthenticationRequest, type index_d$4_VerifyRequest as VerifyRequest, type index_d$4_VerifyResponse as VerifyResponse, index_d$4_resendDuringAuthentication as resendDuringAuthentication, index_d$4_start as start, index_d$4_verifyDuringAuthentication as verifyDuringAuthentication };
|
|
2365
|
+
}
|
|
2366
|
+
|
|
2367
|
+
interface AccountInvite {
|
|
2368
|
+
/**
|
|
2369
|
+
* Invite ID.
|
|
2370
|
+
* @readonly
|
|
2371
|
+
*/
|
|
2372
|
+
_id?: string;
|
|
2373
|
+
/**
|
|
2374
|
+
* Account ID.
|
|
2375
|
+
* @readonly
|
|
2376
|
+
*/
|
|
2377
|
+
accountId?: string;
|
|
2378
|
+
/** Email address where the invite was sent. */
|
|
2379
|
+
email?: string;
|
|
2380
|
+
/**
|
|
2381
|
+
* Deprecated. Use `policyIds`.
|
|
2382
|
+
* @deprecated
|
|
2383
|
+
*/
|
|
2384
|
+
role?: string;
|
|
2385
|
+
/**
|
|
2386
|
+
* Deprecated. Use `inviterAccountId`.
|
|
2387
|
+
* @readonly
|
|
2388
|
+
* @deprecated
|
|
2389
|
+
*/
|
|
2390
|
+
inviterId?: string;
|
|
2391
|
+
/**
|
|
2392
|
+
* Invite status.
|
|
2393
|
+
*
|
|
2394
|
+
* Supported values:
|
|
2395
|
+
* - **Pending:** The invite has been sent and is valid, waiting for the user's response.
|
|
2396
|
+
* - **Used:** The invite has been accepted.
|
|
2397
|
+
* - **Deleted:** The invite has been deleted or revoked.
|
|
2398
|
+
* - **Declined:** The user has declined the invite.
|
|
2399
|
+
* - **Expired:** The invite has expired without being accepted.
|
|
2400
|
+
*/
|
|
2401
|
+
status?: InviteStatus$2;
|
|
2402
|
+
/** Link to accept the invite. */
|
|
2403
|
+
acceptLink?: string;
|
|
2404
|
+
/**
|
|
2405
|
+
* Inviting account ID.
|
|
2406
|
+
* @readonly
|
|
2407
|
+
*/
|
|
2408
|
+
inviterAccountId?: string;
|
|
2409
|
+
/**
|
|
2410
|
+
* Account ID that accepted the invite. Populated only once the invite is accepted.
|
|
2411
|
+
* @readonly
|
|
2412
|
+
*/
|
|
2413
|
+
acceptedByAccountId?: string | null;
|
|
2414
|
+
/** Date the invite was created. */
|
|
2415
|
+
dateCreated?: Date | null;
|
|
2416
|
+
/** Role IDs included in the invite. */
|
|
2417
|
+
policyIds?: string[];
|
|
2418
|
+
/** Date the invite was last updated. */
|
|
2419
|
+
dateUpdated?: Date | null;
|
|
2420
|
+
/** Assets the users are invited to join. */
|
|
2421
|
+
assignments?: InviteResourceAssignment[];
|
|
2422
|
+
/** Invite expiration date. */
|
|
2423
|
+
expirationDate?: Date | null;
|
|
2424
|
+
}
|
|
2425
|
+
/** Invite status stating whether the invite was accepted, waiting to be accepted, deleted etc.. */
|
|
2426
|
+
declare enum InviteStatus$2 {
|
|
2427
|
+
Pending = "Pending",
|
|
2428
|
+
Used = "Used",
|
|
2429
|
+
Deleted = "Deleted",
|
|
2430
|
+
Declined = "Declined",
|
|
2431
|
+
Expired = "Expired"
|
|
2432
|
+
}
|
|
2433
|
+
interface InviteResourceAssignment {
|
|
2434
|
+
/** Role ID. */
|
|
2435
|
+
policyId?: string;
|
|
2436
|
+
/** Resources the user will be able to access. */
|
|
2437
|
+
assignments?: InviteAssignment[];
|
|
2438
|
+
}
|
|
2439
|
+
interface InviteAssignment {
|
|
2440
|
+
/** Full name of resource to be assigned. */
|
|
2441
|
+
fullNameResource?: FullNameResource;
|
|
2442
|
+
}
|
|
2443
|
+
interface FullNameResource extends FullNameResourceResourceContextOneOf {
|
|
2444
|
+
/** Specific site details. */
|
|
2445
|
+
siteContext?: SiteResourceContext;
|
|
2446
|
+
/** Specific account details. */
|
|
2447
|
+
accountContext?: AccountResourceContext;
|
|
2448
|
+
}
|
|
2449
|
+
/** @oneof */
|
|
2450
|
+
interface FullNameResourceResourceContextOneOf {
|
|
2451
|
+
/** Specific site details. */
|
|
2452
|
+
siteContext?: SiteResourceContext;
|
|
2453
|
+
/** Specific account details. */
|
|
2454
|
+
accountContext?: AccountResourceContext;
|
|
2455
|
+
}
|
|
2456
|
+
/** Site resource context. It indicates that the resource is under a site (can be the site itself or some asset of a site, like a blog post) */
|
|
2457
|
+
interface SiteResourceContext {
|
|
2458
|
+
/** Site ID. */
|
|
2459
|
+
metasiteId?: string;
|
|
2460
|
+
}
|
|
2461
|
+
/** Account resource contexts. It indicates that the resource is under the account (can be the account itself or some asset of an account, like a logo or a domain) */
|
|
2462
|
+
interface AccountResourceContext {
|
|
2463
|
+
/** Account ID. */
|
|
2464
|
+
accountId?: string;
|
|
2465
|
+
}
|
|
2466
|
+
interface OrganizationResourceContext {
|
|
2467
|
+
}
|
|
2468
|
+
/**
|
|
2469
|
+
* A custom resource. Is used to represent some asset that is not a direct resource context (site or account), but something custom.
|
|
2470
|
+
* For example: payment method, blog post, domain, logo.
|
|
2471
|
+
*/
|
|
2472
|
+
interface Resource$1 {
|
|
2473
|
+
/** The resource id. */
|
|
2474
|
+
_id?: string | null;
|
|
2475
|
+
/** The resource type */
|
|
2476
|
+
type?: string | null;
|
|
2477
|
+
}
|
|
2478
|
+
interface PolicyCondition {
|
|
2479
|
+
/** The type of the condition */
|
|
2480
|
+
condition?: ConditionType;
|
|
2481
|
+
}
|
|
2482
|
+
interface ConditionType extends ConditionTypeOfOneOf {
|
|
2483
|
+
/** @deprecated */
|
|
2484
|
+
simpleCondition?: SimpleCondition;
|
|
2485
|
+
/** A logic combination between several conditions, with an operator between them */
|
|
2486
|
+
joinedConditions?: JoinedCondition;
|
|
2487
|
+
/** @deprecated */
|
|
2488
|
+
environmentCondition?: EnvironmentCondition;
|
|
2489
|
+
/** A single condition */
|
|
2490
|
+
condition?: Condition$1;
|
|
2491
|
+
}
|
|
2492
|
+
/** @oneof */
|
|
2493
|
+
interface ConditionTypeOfOneOf {
|
|
2494
|
+
/** @deprecated */
|
|
2495
|
+
simpleCondition?: SimpleCondition;
|
|
2496
|
+
/** A logic combination between several conditions, with an operator between them */
|
|
2497
|
+
joinedConditions?: JoinedCondition;
|
|
2498
|
+
/** @deprecated */
|
|
2499
|
+
environmentCondition?: EnvironmentCondition;
|
|
2500
|
+
/** A single condition */
|
|
2501
|
+
condition?: Condition$1;
|
|
2502
|
+
}
|
|
2503
|
+
interface SimpleCondition {
|
|
2504
|
+
attrName?: string;
|
|
2505
|
+
value?: SimpleConditionValue;
|
|
2506
|
+
op?: SimpleConditionOperator;
|
|
2507
|
+
conditionModelId?: string;
|
|
2508
|
+
}
|
|
2509
|
+
interface SimpleConditionValue extends SimpleConditionValueValueOneOf {
|
|
2510
|
+
attrName?: string;
|
|
2511
|
+
stringValue?: string;
|
|
2512
|
+
boolValue?: boolean;
|
|
2513
|
+
}
|
|
2514
|
+
/** @oneof */
|
|
2515
|
+
interface SimpleConditionValueValueOneOf {
|
|
2516
|
+
attrName?: string;
|
|
2517
|
+
stringValue?: string;
|
|
2518
|
+
boolValue?: boolean;
|
|
2519
|
+
}
|
|
2520
|
+
declare enum SimpleConditionOperator {
|
|
2521
|
+
UNKNOWN_SIMPLE_OP = "UNKNOWN_SIMPLE_OP",
|
|
2522
|
+
EQUAL = "EQUAL"
|
|
2523
|
+
}
|
|
2524
|
+
interface JoinedCondition {
|
|
2525
|
+
/** The operator that should be used when evaluating the condition */
|
|
2526
|
+
op?: JoinedConditionOperator;
|
|
2527
|
+
/** The conditions that should be evaluated, and then joined using the operator provided */
|
|
2528
|
+
conditions?: ConditionType[];
|
|
2529
|
+
}
|
|
2530
|
+
declare enum JoinedConditionOperator {
|
|
2531
|
+
UNKNOWN_JOIN_OP = "UNKNOWN_JOIN_OP",
|
|
2532
|
+
OR = "OR",
|
|
2533
|
+
AND = "AND"
|
|
2534
|
+
}
|
|
2535
|
+
interface EnvironmentCondition extends EnvironmentConditionConditionOneOf {
|
|
2536
|
+
experimentCondition?: ExperimentCondition;
|
|
2537
|
+
}
|
|
2538
|
+
/** @oneof */
|
|
2539
|
+
interface EnvironmentConditionConditionOneOf {
|
|
2540
|
+
experimentCondition?: ExperimentCondition;
|
|
2541
|
+
}
|
|
2542
|
+
interface ExperimentCondition {
|
|
2543
|
+
spec?: string;
|
|
2544
|
+
fallbackValue?: string;
|
|
2545
|
+
expectedValue?: string;
|
|
2546
|
+
}
|
|
2547
|
+
interface Condition$1 {
|
|
2548
|
+
/** The unique identifier of the condition model. Indicates which actions the condition is working on */
|
|
2549
|
+
conditionModelId?: string;
|
|
2550
|
+
/** The operator that should be evaluated */
|
|
2551
|
+
operator?: ConditionOperator;
|
|
2552
|
+
}
|
|
2553
|
+
interface ConditionOperator extends ConditionOperatorOperatorsOneOf {
|
|
2554
|
+
/** Comparison of equality - will be evaluated to true if the given parties are equal */
|
|
2555
|
+
equals?: EqualOperator;
|
|
2556
|
+
/** Regex operator - will be evaluated to true if the given value matches the provided regex */
|
|
2557
|
+
like?: LikeOperator;
|
|
2558
|
+
/** Petri experiment - will be evaluated using petri. */
|
|
2559
|
+
experiment?: ExperimentOperator;
|
|
2560
|
+
/** Operator that indicates a dependency on another subject being allowed to perform something. */
|
|
2561
|
+
dependOn?: DependOnOperator;
|
|
2562
|
+
}
|
|
2563
|
+
/** @oneof */
|
|
2564
|
+
interface ConditionOperatorOperatorsOneOf {
|
|
2565
|
+
/** Comparison of equality - will be evaluated to true if the given parties are equal */
|
|
2566
|
+
equals?: EqualOperator;
|
|
2567
|
+
/** Regex operator - will be evaluated to true if the given value matches the provided regex */
|
|
2568
|
+
like?: LikeOperator;
|
|
2569
|
+
/** Petri experiment - will be evaluated using petri. */
|
|
2570
|
+
experiment?: ExperimentOperator;
|
|
2571
|
+
/** Operator that indicates a dependency on another subject being allowed to perform something. */
|
|
2572
|
+
dependOn?: DependOnOperator;
|
|
2573
|
+
}
|
|
2574
|
+
interface EqualOperator {
|
|
2575
|
+
/** The attribute which should be compared. The attribute will be first evaluated to a value, and then compared the other side (attribute/value) */
|
|
2576
|
+
attrName?: string;
|
|
2577
|
+
/** The value to compare to. If the two parties are equal - we will return true. */
|
|
2578
|
+
value?: ConditionValue;
|
|
2579
|
+
}
|
|
2580
|
+
interface ConditionValue extends ConditionValueValueOneOf {
|
|
2581
|
+
/** an attribute. We'll first retrieve the value of the attribute (from the request or from pre-indexed values), and then compare to what it needs to be compared with. */
|
|
2582
|
+
attrName?: string;
|
|
2583
|
+
/** a value with a string type. Will be compared to the attribute provided, and be true only if they match the operator. */
|
|
2584
|
+
stringValue?: string;
|
|
2585
|
+
/** a value with a boolean type. Will be compared to the attribute provided, and be true only if they match the operator. */
|
|
2586
|
+
boolValue?: boolean;
|
|
2587
|
+
}
|
|
2588
|
+
/** @oneof */
|
|
2589
|
+
interface ConditionValueValueOneOf {
|
|
2590
|
+
/** an attribute. We'll first retrieve the value of the attribute (from the request or from pre-indexed values), and then compare to what it needs to be compared with. */
|
|
2591
|
+
attrName?: string;
|
|
2592
|
+
/** a value with a string type. Will be compared to the attribute provided, and be true only if they match the operator. */
|
|
2593
|
+
stringValue?: string;
|
|
2594
|
+
/** a value with a boolean type. Will be compared to the attribute provided, and be true only if they match the operator. */
|
|
2595
|
+
boolValue?: boolean;
|
|
2596
|
+
}
|
|
2597
|
+
interface LikeOperator {
|
|
2598
|
+
/** The attribute which should be compared. The attribute will be first evaluated to a value, and then compared the regex values provided. */
|
|
2599
|
+
attrName?: string;
|
|
2600
|
+
/** The regex values which the attribute value should be evaluated on. If the attribute value matches at least one of the regular expressions provided - we will return true */
|
|
2601
|
+
values?: string[];
|
|
2602
|
+
}
|
|
2603
|
+
interface ExperimentOperator {
|
|
2604
|
+
/** The spec to conduct the experiment on. */
|
|
2605
|
+
spec?: string;
|
|
2606
|
+
/** The value to use if the experiment could not be conducted */
|
|
2607
|
+
fallbackValue?: string;
|
|
2608
|
+
/** The expected value of the experiment conduction. If it matches the actual value - true will be returned. Otherwise - false. */
|
|
2609
|
+
expectedValue?: string;
|
|
2610
|
+
}
|
|
2611
|
+
/** Implies that the policy takes affect only if the depend on subject is permitted as well. */
|
|
2612
|
+
interface DependOnOperator {
|
|
2613
|
+
/** The subject on which the current entry depends on. If the subject is allowed to perform what the query was about - the condition will be evaluated to true. Otherwise - false */
|
|
2614
|
+
dependOnSubject?: Subject$1;
|
|
2615
|
+
}
|
|
2616
|
+
interface Subject$1 {
|
|
2617
|
+
/** ID of identity assigned to the asset. */
|
|
2618
|
+
_id?: string;
|
|
2619
|
+
/** Type of identity assigned to the asset. Supported subject types include user IDs, account IDs, and app IDs. */
|
|
2620
|
+
subjectType?: SubjectType$2;
|
|
2621
|
+
/** Context of identity assigned to the asset. For example, a `subjectType` = `USER` will have `context` = `ACCOUNT`. */
|
|
2622
|
+
context?: SubjectContext$1;
|
|
2623
|
+
}
|
|
2624
|
+
declare enum SubjectType$2 {
|
|
2625
|
+
UNKNOWN = "UNKNOWN",
|
|
2626
|
+
ACCOUNT = "ACCOUNT",
|
|
2627
|
+
USER = "USER",
|
|
2628
|
+
USER_GROUP = "USER_GROUP",
|
|
2629
|
+
MEMBER_GROUP = "MEMBER_GROUP",
|
|
2630
|
+
VISITOR_GROUP = "VISITOR_GROUP",
|
|
2631
|
+
EXTERNAL_APP = "EXTERNAL_APP",
|
|
2632
|
+
ACCOUNT_GROUP = "ACCOUNT_GROUP",
|
|
2633
|
+
WIX_APP = "WIX_APP"
|
|
2634
|
+
}
|
|
2635
|
+
interface SubjectContext$1 {
|
|
2636
|
+
_id?: string;
|
|
2637
|
+
contextType?: SubjectContextType$1;
|
|
2638
|
+
}
|
|
2639
|
+
declare enum SubjectContextType$1 {
|
|
2640
|
+
UNKNOWN_CTX = "UNKNOWN_CTX",
|
|
2641
|
+
ORG_CTX = "ORG_CTX",
|
|
2642
|
+
ACCOUNT_CTX = "ACCOUNT_CTX"
|
|
2643
|
+
}
|
|
2644
|
+
interface GetAccountInvitesRequest {
|
|
2645
|
+
}
|
|
2646
|
+
interface GetAccountInvitesResponse {
|
|
2647
|
+
invites?: AccountInvite[];
|
|
2648
|
+
}
|
|
2649
|
+
interface GetAccountInviteRequest {
|
|
2650
|
+
_id?: string;
|
|
2651
|
+
}
|
|
2652
|
+
interface GetAccountInviteResponse {
|
|
2653
|
+
invite?: AccountInvite;
|
|
2654
|
+
}
|
|
2655
|
+
interface AccountInviteRequest {
|
|
2656
|
+
role?: string;
|
|
2657
|
+
email?: string;
|
|
2658
|
+
policyIds?: string[];
|
|
2659
|
+
}
|
|
2660
|
+
interface AccountInviteResponse {
|
|
2661
|
+
invite?: AccountInvite;
|
|
2662
|
+
}
|
|
2663
|
+
interface CreateInviteRequest {
|
|
2664
|
+
/** Array of potential team members' email addresses and their corresponding assignments (how they will be assigned when they accept the invite). */
|
|
2665
|
+
subjectsAssignments: SubjectInviteAssignments[];
|
|
2666
|
+
/** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
|
|
2667
|
+
defaultEmailLanguage?: string | null;
|
|
2668
|
+
}
|
|
2669
|
+
interface SubjectInviteAssignments {
|
|
2670
|
+
/** Invitee's email address. */
|
|
2671
|
+
subjectEmail?: string;
|
|
2672
|
+
/** Mapping of roles (referred to here as policies) and assets (referred to here as resources) that will be assigned to the invitee when they accept the invite. When no resources are specified, the invitee will be given access to everything within the account. */
|
|
2673
|
+
assignments?: InviteResourceAssignment[];
|
|
2674
|
+
}
|
|
2675
|
+
interface CreateInviteResponse {
|
|
2676
|
+
/** Invites that were sent successfully. */
|
|
2677
|
+
successfulInvites?: AccountInvite[];
|
|
2678
|
+
/** Invites that failed. */
|
|
2679
|
+
failedInvites?: InviteFailure[];
|
|
2680
|
+
}
|
|
2681
|
+
interface InviteFailure {
|
|
2682
|
+
/** Email address of the failed invite. */
|
|
2683
|
+
subjectEmail?: string;
|
|
2684
|
+
/** Error description. */
|
|
2685
|
+
errorMessage?: string;
|
|
2686
|
+
}
|
|
2687
|
+
interface BulkAccountInviteRequest {
|
|
2688
|
+
role?: string;
|
|
2689
|
+
emails?: string[];
|
|
2690
|
+
policyIds?: string[];
|
|
2691
|
+
}
|
|
2692
|
+
interface BulkAccountInviteResponse {
|
|
2693
|
+
invites?: AccountInvite[];
|
|
2694
|
+
failedEmails?: string[];
|
|
2695
|
+
}
|
|
2696
|
+
interface ResendAccountInviteRequest {
|
|
2697
|
+
inviteId?: string;
|
|
2698
|
+
/** The language of emails that will be used only for recipients that don't have a user, in case this parameter is unspecified, the sender's language will be used instead */
|
|
2699
|
+
defaultEmailLanguage?: string | null;
|
|
2700
|
+
}
|
|
2701
|
+
interface AcceptAccountInviteRequest {
|
|
2702
|
+
inviteToken?: string;
|
|
2703
|
+
}
|
|
2704
|
+
interface AcceptAccountInviteResponse {
|
|
2705
|
+
}
|
|
2706
|
+
interface RevokeAccountInviteRequest {
|
|
2707
|
+
inviteId?: string;
|
|
2708
|
+
}
|
|
2709
|
+
interface RevokeAccountInviteResponse {
|
|
2710
|
+
}
|
|
2711
|
+
interface UpdateAccountInviteRequest {
|
|
2712
|
+
inviteId?: string;
|
|
2713
|
+
role?: string;
|
|
2714
|
+
policyIds?: string[];
|
|
2715
|
+
}
|
|
2716
|
+
interface UpdateAccountInviteResponse {
|
|
2717
|
+
}
|
|
2718
|
+
interface UpdateAccountInviteAssignmentsRequest {
|
|
2719
|
+
inviteId?: string;
|
|
2720
|
+
assignments?: InviteResourceAssignment[];
|
|
2721
|
+
}
|
|
2722
|
+
interface UpdateAccountInviteAssignmentsResponse {
|
|
2723
|
+
}
|
|
2724
|
+
interface ParseAccountInviteTokenRequest {
|
|
2725
|
+
inviteToken?: string;
|
|
2726
|
+
}
|
|
2727
|
+
interface ParseAccountInviteTokenResponse {
|
|
2728
|
+
inviteId?: string;
|
|
2729
|
+
accountId?: string;
|
|
2730
|
+
status?: InviteStatus$2;
|
|
2731
|
+
}
|
|
2732
|
+
interface SiteResourceContextNonNullableFields {
|
|
2733
|
+
metasiteId: string;
|
|
2734
|
+
}
|
|
2735
|
+
interface AccountResourceContextNonNullableFields {
|
|
2736
|
+
accountId: string;
|
|
2737
|
+
}
|
|
2738
|
+
interface FullNameResourceNonNullableFields {
|
|
2739
|
+
siteContext?: SiteResourceContextNonNullableFields;
|
|
2740
|
+
accountContext?: AccountResourceContextNonNullableFields;
|
|
2741
|
+
}
|
|
2742
|
+
interface SimpleConditionValueNonNullableFields {
|
|
2743
|
+
attrName: string;
|
|
2744
|
+
stringValue: string;
|
|
2745
|
+
boolValue: boolean;
|
|
2746
|
+
}
|
|
2747
|
+
interface SimpleConditionNonNullableFields {
|
|
2748
|
+
attrName: string;
|
|
2749
|
+
value?: SimpleConditionValueNonNullableFields;
|
|
2750
|
+
op: SimpleConditionOperator;
|
|
2751
|
+
conditionModelId: string;
|
|
2752
|
+
}
|
|
2753
|
+
interface JoinedConditionNonNullableFields {
|
|
2754
|
+
op: JoinedConditionOperator;
|
|
2755
|
+
conditions: ConditionTypeNonNullableFields[];
|
|
2756
|
+
}
|
|
2757
|
+
interface ExperimentConditionNonNullableFields {
|
|
2758
|
+
spec: string;
|
|
2759
|
+
fallbackValue: string;
|
|
2760
|
+
expectedValue: string;
|
|
2761
|
+
}
|
|
2762
|
+
interface EnvironmentConditionNonNullableFields {
|
|
2763
|
+
experimentCondition?: ExperimentConditionNonNullableFields;
|
|
2764
|
+
}
|
|
2765
|
+
interface ConditionValueNonNullableFields {
|
|
2766
|
+
attrName: string;
|
|
2767
|
+
stringValue: string;
|
|
2768
|
+
boolValue: boolean;
|
|
2769
|
+
}
|
|
2770
|
+
interface EqualOperatorNonNullableFields {
|
|
2771
|
+
attrName: string;
|
|
2772
|
+
value?: ConditionValueNonNullableFields;
|
|
2773
|
+
}
|
|
2774
|
+
interface LikeOperatorNonNullableFields {
|
|
2775
|
+
attrName: string;
|
|
2776
|
+
values: string[];
|
|
2777
|
+
}
|
|
2778
|
+
interface ExperimentOperatorNonNullableFields {
|
|
2779
|
+
spec: string;
|
|
2780
|
+
fallbackValue: string;
|
|
2781
|
+
expectedValue: string;
|
|
2782
|
+
}
|
|
2783
|
+
interface SubjectContextNonNullableFields {
|
|
2784
|
+
_id: string;
|
|
2785
|
+
contextType: SubjectContextType$1;
|
|
2786
|
+
}
|
|
2787
|
+
interface SubjectNonNullableFields {
|
|
2788
|
+
_id: string;
|
|
2789
|
+
subjectType: SubjectType$2;
|
|
2790
|
+
context?: SubjectContextNonNullableFields;
|
|
2791
|
+
}
|
|
2792
|
+
interface DependOnOperatorNonNullableFields {
|
|
2793
|
+
dependOnSubject?: SubjectNonNullableFields;
|
|
2794
|
+
}
|
|
2795
|
+
interface ConditionOperatorNonNullableFields {
|
|
2796
|
+
equals?: EqualOperatorNonNullableFields;
|
|
2797
|
+
like?: LikeOperatorNonNullableFields;
|
|
2798
|
+
experiment?: ExperimentOperatorNonNullableFields;
|
|
2799
|
+
dependOn?: DependOnOperatorNonNullableFields;
|
|
2800
|
+
}
|
|
2801
|
+
interface ConditionNonNullableFields {
|
|
2802
|
+
conditionModelId: string;
|
|
2803
|
+
operator?: ConditionOperatorNonNullableFields;
|
|
2804
|
+
}
|
|
2805
|
+
interface ConditionTypeNonNullableFields {
|
|
2806
|
+
simpleCondition?: SimpleConditionNonNullableFields;
|
|
2807
|
+
joinedConditions?: JoinedConditionNonNullableFields;
|
|
2808
|
+
environmentCondition?: EnvironmentConditionNonNullableFields;
|
|
2809
|
+
condition?: ConditionNonNullableFields;
|
|
2810
|
+
}
|
|
2811
|
+
interface PolicyConditionNonNullableFields {
|
|
2812
|
+
condition?: ConditionTypeNonNullableFields;
|
|
2813
|
+
}
|
|
2814
|
+
interface InviteAssignmentNonNullableFields {
|
|
2815
|
+
fullNameResource?: FullNameResourceNonNullableFields;
|
|
2816
|
+
condition?: PolicyConditionNonNullableFields;
|
|
2817
|
+
}
|
|
2818
|
+
interface InviteResourceAssignmentNonNullableFields {
|
|
2819
|
+
policyId: string;
|
|
2820
|
+
assignments: InviteAssignmentNonNullableFields[];
|
|
2821
|
+
}
|
|
2822
|
+
interface AccountInviteNonNullableFields {
|
|
2823
|
+
_id: string;
|
|
2824
|
+
accountId: string;
|
|
2825
|
+
email: string;
|
|
2826
|
+
role: string;
|
|
2827
|
+
inviterId: string;
|
|
2828
|
+
status: InviteStatus$2;
|
|
2829
|
+
acceptLink: string;
|
|
2830
|
+
inviterAccountId: string;
|
|
2831
|
+
policyIds: string[];
|
|
2832
|
+
assignments: InviteResourceAssignmentNonNullableFields[];
|
|
2833
|
+
}
|
|
2834
|
+
interface InviteFailureNonNullableFields {
|
|
2835
|
+
subjectEmail: string;
|
|
2836
|
+
errorMessage: string;
|
|
2837
|
+
}
|
|
2838
|
+
interface CreateInviteResponseNonNullableFields {
|
|
2839
|
+
successfulInvites: AccountInviteNonNullableFields[];
|
|
2840
|
+
failedInvites: InviteFailureNonNullableFields[];
|
|
2841
|
+
}
|
|
2842
|
+
interface CreateInviteOptions {
|
|
2843
|
+
/** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
|
|
2844
|
+
defaultEmailLanguage?: string | null;
|
|
2845
|
+
}
|
|
2846
|
+
|
|
2847
|
+
declare function createInvite$1(httpClient: HttpClient): CreateInviteSignature;
|
|
2848
|
+
interface CreateInviteSignature {
|
|
2849
|
+
/**
|
|
2850
|
+
* Creates and sends invite emails to a list of potential team members, inviting them to become team members of the requesting account.
|
|
2851
|
+
* The invites may be limited to a specific resource (site or other asset).
|
|
2852
|
+
* Maximum 50 invitees can be specified per call.
|
|
2853
|
+
*
|
|
2854
|
+
* > **Important**: This call requires an account level API key and cannot be authenticated with the standard authorization header. API keys are currently available to selected beta users only.
|
|
2855
|
+
* @param - Array of potential team members' email addresses and their corresponding assignments (how they will be assigned when they accept the invite).
|
|
2856
|
+
*/
|
|
2857
|
+
(subjectsAssignments: SubjectInviteAssignments[], options?: CreateInviteOptions | undefined): Promise<CreateInviteResponse & CreateInviteResponseNonNullableFields>;
|
|
2858
|
+
}
|
|
2859
|
+
|
|
2860
|
+
declare const createInvite: MaybeContext<BuildRESTFunction<typeof createInvite$1> & typeof createInvite$1>;
|
|
2861
|
+
|
|
2862
|
+
type index_d$3_AcceptAccountInviteRequest = AcceptAccountInviteRequest;
|
|
2863
|
+
type index_d$3_AcceptAccountInviteResponse = AcceptAccountInviteResponse;
|
|
2864
|
+
type index_d$3_AccountInvite = AccountInvite;
|
|
2865
|
+
type index_d$3_AccountInviteRequest = AccountInviteRequest;
|
|
2866
|
+
type index_d$3_AccountInviteResponse = AccountInviteResponse;
|
|
2867
|
+
type index_d$3_AccountResourceContext = AccountResourceContext;
|
|
2868
|
+
type index_d$3_BulkAccountInviteRequest = BulkAccountInviteRequest;
|
|
2869
|
+
type index_d$3_BulkAccountInviteResponse = BulkAccountInviteResponse;
|
|
2870
|
+
type index_d$3_ConditionOperator = ConditionOperator;
|
|
2871
|
+
type index_d$3_ConditionOperatorOperatorsOneOf = ConditionOperatorOperatorsOneOf;
|
|
2872
|
+
type index_d$3_ConditionType = ConditionType;
|
|
2873
|
+
type index_d$3_ConditionTypeOfOneOf = ConditionTypeOfOneOf;
|
|
2874
|
+
type index_d$3_ConditionValue = ConditionValue;
|
|
2875
|
+
type index_d$3_ConditionValueValueOneOf = ConditionValueValueOneOf;
|
|
2876
|
+
type index_d$3_CreateInviteOptions = CreateInviteOptions;
|
|
2877
|
+
type index_d$3_CreateInviteRequest = CreateInviteRequest;
|
|
2878
|
+
type index_d$3_CreateInviteResponse = CreateInviteResponse;
|
|
2879
|
+
type index_d$3_CreateInviteResponseNonNullableFields = CreateInviteResponseNonNullableFields;
|
|
2880
|
+
type index_d$3_DependOnOperator = DependOnOperator;
|
|
2881
|
+
type index_d$3_EnvironmentCondition = EnvironmentCondition;
|
|
2882
|
+
type index_d$3_EnvironmentConditionConditionOneOf = EnvironmentConditionConditionOneOf;
|
|
2883
|
+
type index_d$3_EqualOperator = EqualOperator;
|
|
2884
|
+
type index_d$3_ExperimentCondition = ExperimentCondition;
|
|
2885
|
+
type index_d$3_ExperimentOperator = ExperimentOperator;
|
|
2886
|
+
type index_d$3_FullNameResource = FullNameResource;
|
|
2887
|
+
type index_d$3_FullNameResourceResourceContextOneOf = FullNameResourceResourceContextOneOf;
|
|
2888
|
+
type index_d$3_GetAccountInviteRequest = GetAccountInviteRequest;
|
|
2889
|
+
type index_d$3_GetAccountInviteResponse = GetAccountInviteResponse;
|
|
2890
|
+
type index_d$3_GetAccountInvitesRequest = GetAccountInvitesRequest;
|
|
2891
|
+
type index_d$3_GetAccountInvitesResponse = GetAccountInvitesResponse;
|
|
2892
|
+
type index_d$3_InviteAssignment = InviteAssignment;
|
|
2893
|
+
type index_d$3_InviteFailure = InviteFailure;
|
|
2894
|
+
type index_d$3_InviteResourceAssignment = InviteResourceAssignment;
|
|
2895
|
+
type index_d$3_JoinedCondition = JoinedCondition;
|
|
2896
|
+
type index_d$3_JoinedConditionOperator = JoinedConditionOperator;
|
|
2897
|
+
declare const index_d$3_JoinedConditionOperator: typeof JoinedConditionOperator;
|
|
2898
|
+
type index_d$3_LikeOperator = LikeOperator;
|
|
2899
|
+
type index_d$3_OrganizationResourceContext = OrganizationResourceContext;
|
|
2900
|
+
type index_d$3_ParseAccountInviteTokenRequest = ParseAccountInviteTokenRequest;
|
|
2901
|
+
type index_d$3_ParseAccountInviteTokenResponse = ParseAccountInviteTokenResponse;
|
|
2902
|
+
type index_d$3_PolicyCondition = PolicyCondition;
|
|
2903
|
+
type index_d$3_ResendAccountInviteRequest = ResendAccountInviteRequest;
|
|
2904
|
+
type index_d$3_RevokeAccountInviteRequest = RevokeAccountInviteRequest;
|
|
2905
|
+
type index_d$3_RevokeAccountInviteResponse = RevokeAccountInviteResponse;
|
|
2906
|
+
type index_d$3_SimpleCondition = SimpleCondition;
|
|
2907
|
+
type index_d$3_SimpleConditionOperator = SimpleConditionOperator;
|
|
2908
|
+
declare const index_d$3_SimpleConditionOperator: typeof SimpleConditionOperator;
|
|
2909
|
+
type index_d$3_SimpleConditionValue = SimpleConditionValue;
|
|
2910
|
+
type index_d$3_SimpleConditionValueValueOneOf = SimpleConditionValueValueOneOf;
|
|
2911
|
+
type index_d$3_SiteResourceContext = SiteResourceContext;
|
|
2912
|
+
type index_d$3_SubjectInviteAssignments = SubjectInviteAssignments;
|
|
2913
|
+
type index_d$3_UpdateAccountInviteAssignmentsRequest = UpdateAccountInviteAssignmentsRequest;
|
|
2914
|
+
type index_d$3_UpdateAccountInviteAssignmentsResponse = UpdateAccountInviteAssignmentsResponse;
|
|
2915
|
+
type index_d$3_UpdateAccountInviteRequest = UpdateAccountInviteRequest;
|
|
2916
|
+
type index_d$3_UpdateAccountInviteResponse = UpdateAccountInviteResponse;
|
|
2917
|
+
declare const index_d$3_createInvite: typeof createInvite;
|
|
2918
|
+
declare namespace index_d$3 {
|
|
2919
|
+
export { type index_d$3_AcceptAccountInviteRequest as AcceptAccountInviteRequest, type index_d$3_AcceptAccountInviteResponse as AcceptAccountInviteResponse, type index_d$3_AccountInvite as AccountInvite, type index_d$3_AccountInviteRequest as AccountInviteRequest, type index_d$3_AccountInviteResponse as AccountInviteResponse, type index_d$3_AccountResourceContext as AccountResourceContext, type index_d$3_BulkAccountInviteRequest as BulkAccountInviteRequest, type index_d$3_BulkAccountInviteResponse as BulkAccountInviteResponse, type Condition$1 as Condition, type index_d$3_ConditionOperator as ConditionOperator, type index_d$3_ConditionOperatorOperatorsOneOf as ConditionOperatorOperatorsOneOf, type index_d$3_ConditionType as ConditionType, type index_d$3_ConditionTypeOfOneOf as ConditionTypeOfOneOf, type index_d$3_ConditionValue as ConditionValue, type index_d$3_ConditionValueValueOneOf as ConditionValueValueOneOf, type index_d$3_CreateInviteOptions as CreateInviteOptions, type index_d$3_CreateInviteRequest as CreateInviteRequest, type index_d$3_CreateInviteResponse as CreateInviteResponse, type index_d$3_CreateInviteResponseNonNullableFields as CreateInviteResponseNonNullableFields, type index_d$3_DependOnOperator as DependOnOperator, type index_d$3_EnvironmentCondition as EnvironmentCondition, type index_d$3_EnvironmentConditionConditionOneOf as EnvironmentConditionConditionOneOf, type index_d$3_EqualOperator as EqualOperator, type index_d$3_ExperimentCondition as ExperimentCondition, type index_d$3_ExperimentOperator as ExperimentOperator, type index_d$3_FullNameResource as FullNameResource, type index_d$3_FullNameResourceResourceContextOneOf as FullNameResourceResourceContextOneOf, type index_d$3_GetAccountInviteRequest as GetAccountInviteRequest, type index_d$3_GetAccountInviteResponse as GetAccountInviteResponse, type index_d$3_GetAccountInvitesRequest as GetAccountInvitesRequest, type index_d$3_GetAccountInvitesResponse as GetAccountInvitesResponse, type index_d$3_InviteAssignment as InviteAssignment, type index_d$3_InviteFailure as InviteFailure, type index_d$3_InviteResourceAssignment as InviteResourceAssignment, InviteStatus$2 as InviteStatus, type index_d$3_JoinedCondition as JoinedCondition, index_d$3_JoinedConditionOperator as JoinedConditionOperator, type index_d$3_LikeOperator as LikeOperator, type index_d$3_OrganizationResourceContext as OrganizationResourceContext, type index_d$3_ParseAccountInviteTokenRequest as ParseAccountInviteTokenRequest, type index_d$3_ParseAccountInviteTokenResponse as ParseAccountInviteTokenResponse, type index_d$3_PolicyCondition as PolicyCondition, type index_d$3_ResendAccountInviteRequest as ResendAccountInviteRequest, type Resource$1 as Resource, type index_d$3_RevokeAccountInviteRequest as RevokeAccountInviteRequest, type index_d$3_RevokeAccountInviteResponse as RevokeAccountInviteResponse, type index_d$3_SimpleCondition as SimpleCondition, index_d$3_SimpleConditionOperator as SimpleConditionOperator, type index_d$3_SimpleConditionValue as SimpleConditionValue, type index_d$3_SimpleConditionValueValueOneOf as SimpleConditionValueValueOneOf, type index_d$3_SiteResourceContext as SiteResourceContext, type Subject$1 as Subject, type SubjectContext$1 as SubjectContext, SubjectContextType$1 as SubjectContextType, type index_d$3_SubjectInviteAssignments as SubjectInviteAssignments, SubjectType$2 as SubjectType, type index_d$3_UpdateAccountInviteAssignmentsRequest as UpdateAccountInviteAssignmentsRequest, type index_d$3_UpdateAccountInviteAssignmentsResponse as UpdateAccountInviteAssignmentsResponse, type index_d$3_UpdateAccountInviteRequest as UpdateAccountInviteRequest, type index_d$3_UpdateAccountInviteResponse as UpdateAccountInviteResponse, index_d$3_createInvite as createInvite };
|
|
2920
|
+
}
|
|
2921
|
+
|
|
2922
|
+
interface SiteInvite$1 {
|
|
2923
|
+
/**
|
|
2924
|
+
* Invite ID.
|
|
2925
|
+
* @readonly
|
|
2926
|
+
*/
|
|
2927
|
+
_id?: string;
|
|
2928
|
+
/**
|
|
2929
|
+
* Site ID the user is invited to as a collaborator.
|
|
2930
|
+
* @readonly
|
|
2931
|
+
*/
|
|
2932
|
+
siteId?: string;
|
|
2933
|
+
/** Email address where the invite was sent. */
|
|
2934
|
+
email?: string;
|
|
2935
|
+
/** Role IDs included in the invite. */
|
|
2936
|
+
policyIds?: string[];
|
|
2937
|
+
/**
|
|
2938
|
+
* Deprecated. Use `inviterAccountId`.
|
|
2939
|
+
* @readonly
|
|
2940
|
+
* @deprecated
|
|
2941
|
+
*/
|
|
2942
|
+
inviterId?: string;
|
|
2943
|
+
/**
|
|
2944
|
+
* Invite Status.
|
|
2945
|
+
*
|
|
2946
|
+
* Supported values:
|
|
2947
|
+
* - **Pending:** The invite has been sent and is valid, waiting for the user's response.
|
|
2948
|
+
* - **Used:** The invite has been accepted.
|
|
2949
|
+
* - **Deleted:** The invite has been deleted or revoked.
|
|
2950
|
+
* - **Declined:** The user declined the invite.
|
|
2951
|
+
* - **Expired:** The invite has expired without being accepted.
|
|
2952
|
+
*/
|
|
2953
|
+
status?: InviteStatus$1;
|
|
2954
|
+
/** Link to accept the invite. */
|
|
2955
|
+
acceptLink?: string;
|
|
2956
|
+
/**
|
|
2957
|
+
* Inviting account ID.
|
|
2958
|
+
* @readonly
|
|
2959
|
+
*/
|
|
2960
|
+
inviterAccountId?: string;
|
|
2961
|
+
/**
|
|
2962
|
+
* Account ID that accepted the invite. Populated only once the invite is accepted.
|
|
2963
|
+
* @readonly
|
|
2964
|
+
*/
|
|
2965
|
+
acceptedByAccountId?: string | null;
|
|
2966
|
+
/** Date the invite was created. */
|
|
2967
|
+
dateCreated?: Date | null;
|
|
2968
|
+
/** User's Wix Bookings staff ID, if relevant. */
|
|
2969
|
+
staffId?: string | null;
|
|
2970
|
+
/** Invite expiration date */
|
|
2971
|
+
expirationDate?: Date | null;
|
|
2972
|
+
}
|
|
2973
|
+
/** Invite status stating whether the invite was accepted, waiting to be accepted, deleted etc.. */
|
|
2974
|
+
declare enum InviteStatus$1 {
|
|
2975
|
+
Pending = "Pending",
|
|
2976
|
+
Used = "Used",
|
|
2977
|
+
Deleted = "Deleted",
|
|
2978
|
+
Declined = "Declined",
|
|
2979
|
+
Expired = "Expired"
|
|
2980
|
+
}
|
|
2981
|
+
interface GetSiteInvitesRequest {
|
|
2982
|
+
}
|
|
2983
|
+
interface GetSiteInvitesResponse {
|
|
2984
|
+
invites?: SiteInvite$1[];
|
|
2985
|
+
}
|
|
2986
|
+
interface QuerySiteInvitesRequest {
|
|
2987
|
+
/**
|
|
2988
|
+
* Supports only `filter` field with
|
|
2989
|
+
* `"filter" : {
|
|
2990
|
+
* "acceptedByAccountId":{"$in": [<id1>, <id2>, ...]}
|
|
2991
|
+
* }`
|
|
2992
|
+
*/
|
|
2993
|
+
query?: QueryV2;
|
|
2994
|
+
}
|
|
2995
|
+
interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
2996
|
+
/** Paging options to limit and skip the number of items. */
|
|
2997
|
+
paging?: Paging;
|
|
2998
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
2999
|
+
cursorPaging?: CursorPaging;
|
|
3000
|
+
/**
|
|
3001
|
+
* Filter object.
|
|
3002
|
+
*
|
|
3003
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
3004
|
+
*/
|
|
3005
|
+
filter?: Record<string, any> | null;
|
|
3006
|
+
/**
|
|
3007
|
+
* Sort object.
|
|
3008
|
+
*
|
|
3009
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
3010
|
+
*/
|
|
3011
|
+
sort?: Sorting[];
|
|
3012
|
+
/** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
3013
|
+
fields?: string[];
|
|
3014
|
+
/** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
3015
|
+
fieldsets?: string[];
|
|
3016
|
+
}
|
|
3017
|
+
/** @oneof */
|
|
3018
|
+
interface QueryV2PagingMethodOneOf {
|
|
3019
|
+
/** Paging options to limit and skip the number of items. */
|
|
3020
|
+
paging?: Paging;
|
|
3021
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
3022
|
+
cursorPaging?: CursorPaging;
|
|
3023
|
+
}
|
|
3024
|
+
interface Sorting {
|
|
3025
|
+
/** Name of the field to sort by. */
|
|
3026
|
+
fieldName?: string;
|
|
3027
|
+
/** Sort order. */
|
|
3028
|
+
order?: SortOrder;
|
|
3029
|
+
}
|
|
3030
|
+
declare enum SortOrder {
|
|
3031
|
+
ASC = "ASC",
|
|
3032
|
+
DESC = "DESC"
|
|
3033
|
+
}
|
|
3034
|
+
interface Paging {
|
|
3035
|
+
/** Number of items to load. */
|
|
3036
|
+
limit?: number | null;
|
|
3037
|
+
/** Number of items to skip in the current sort order. */
|
|
3038
|
+
offset?: number | null;
|
|
3039
|
+
}
|
|
3040
|
+
interface CursorPaging {
|
|
3041
|
+
/** Maximum number of items to return in the results. */
|
|
3042
|
+
limit?: number | null;
|
|
3043
|
+
/**
|
|
3044
|
+
* Pointer to the next or previous page in the list of results.
|
|
3045
|
+
*
|
|
3046
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
3047
|
+
* Not relevant for the first request.
|
|
3048
|
+
*/
|
|
3049
|
+
cursor?: string | null;
|
|
3050
|
+
}
|
|
3051
|
+
interface QuerySiteInvitesResponse {
|
|
3052
|
+
invites?: SiteInvite$1[];
|
|
3053
|
+
}
|
|
3054
|
+
interface GetSiteInviteRequest {
|
|
3055
|
+
_id?: string;
|
|
3056
|
+
}
|
|
3057
|
+
interface GetSiteInviteResponse {
|
|
3058
|
+
invite?: SiteInvite$1;
|
|
3059
|
+
}
|
|
3060
|
+
interface SiteInviteRequest {
|
|
3061
|
+
/** The role ids to be assigned */
|
|
3062
|
+
policyIds?: string[];
|
|
3063
|
+
/** Invitee email */
|
|
3064
|
+
email?: string;
|
|
3065
|
+
/** The language of emails that will be used only for recipients that don't have a user, in case this parameter is unspecified, the sender's language will be used instead */
|
|
3066
|
+
defaultEmailLanguage?: string | null;
|
|
3067
|
+
}
|
|
3068
|
+
interface SiteInviteResponse {
|
|
3069
|
+
/** Invites that were sent. */
|
|
3070
|
+
invite?: SiteInvite$1;
|
|
3071
|
+
}
|
|
3072
|
+
interface BulkSiteInviteRequest {
|
|
3073
|
+
/** Role IDs, referred to as policy IDs, to assign to the contributors. */
|
|
3074
|
+
policyIds: string[];
|
|
3075
|
+
/** Email addresses to which the invites should be sent. */
|
|
3076
|
+
emails: string[];
|
|
3077
|
+
/** Details explaining the purpose of the invite. */
|
|
3078
|
+
invitePurpose?: string | null;
|
|
3079
|
+
/** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
|
|
3080
|
+
defaultEmailLanguage?: string | null;
|
|
3081
|
+
}
|
|
3082
|
+
interface BulkSiteInviteResponse {
|
|
3083
|
+
/** Invites that were sent successfully. */
|
|
3084
|
+
invites?: SiteInvite$1[];
|
|
3085
|
+
/** Invites that failed. */
|
|
3086
|
+
failedEmails?: string[];
|
|
3087
|
+
}
|
|
3088
|
+
interface ResendSiteInviteRequest {
|
|
3089
|
+
/** Invite ID. */
|
|
3090
|
+
inviteId: string;
|
|
3091
|
+
/** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
|
|
3092
|
+
defaultEmailLanguage?: string | null;
|
|
3093
|
+
}
|
|
3094
|
+
interface AcceptSiteInviteRequest {
|
|
3095
|
+
inviteToken?: string;
|
|
3096
|
+
}
|
|
3097
|
+
interface AcceptSiteInviteResponse {
|
|
3098
|
+
}
|
|
3099
|
+
interface RevokeSiteInviteRequest {
|
|
3100
|
+
/** Invite ID. */
|
|
3101
|
+
inviteId: string;
|
|
3102
|
+
}
|
|
3103
|
+
interface RevokeSiteInviteResponse {
|
|
3104
|
+
}
|
|
3105
|
+
interface UpdateSiteInviteRequest {
|
|
3106
|
+
inviteId?: string;
|
|
3107
|
+
policyIds?: string[];
|
|
3108
|
+
staffId?: string | null;
|
|
3109
|
+
}
|
|
3110
|
+
interface UpdateSiteInviteResponse {
|
|
3111
|
+
}
|
|
3112
|
+
interface GetContributorLimitRequest {
|
|
3113
|
+
}
|
|
3114
|
+
interface GetContributorLimitResponse {
|
|
3115
|
+
contributorLimitation?: ContributorLimitation;
|
|
3116
|
+
}
|
|
3117
|
+
interface ContributorLimitation {
|
|
3118
|
+
contributorLimit?: number;
|
|
3119
|
+
leftInvites?: number;
|
|
3120
|
+
}
|
|
3121
|
+
interface ParseSiteInviteTokenRequest {
|
|
3122
|
+
inviteToken?: string;
|
|
3123
|
+
}
|
|
3124
|
+
interface ParseSiteInviteTokenResponse {
|
|
3125
|
+
inviteId?: string;
|
|
3126
|
+
siteId?: string;
|
|
3127
|
+
status?: InviteStatus$1;
|
|
3128
|
+
}
|
|
3129
|
+
interface SiteInviteNonNullableFields {
|
|
3130
|
+
_id: string;
|
|
3131
|
+
siteId: string;
|
|
3132
|
+
email: string;
|
|
3133
|
+
policyIds: string[];
|
|
3134
|
+
inviterId: string;
|
|
3135
|
+
status: InviteStatus$1;
|
|
3136
|
+
acceptLink: string;
|
|
3137
|
+
inviterAccountId: string;
|
|
3138
|
+
}
|
|
3139
|
+
interface BulkSiteInviteResponseNonNullableFields {
|
|
3140
|
+
invites: SiteInviteNonNullableFields[];
|
|
3141
|
+
failedEmails: string[];
|
|
3142
|
+
}
|
|
3143
|
+
interface SiteInviteResponseNonNullableFields {
|
|
3144
|
+
invite?: SiteInviteNonNullableFields;
|
|
3145
|
+
}
|
|
3146
|
+
interface BulkInviteOptions {
|
|
3147
|
+
/** Email addresses to which the invites should be sent. */
|
|
3148
|
+
emails: string[];
|
|
3149
|
+
/** Details explaining the purpose of the invite. */
|
|
3150
|
+
invitePurpose?: string | null;
|
|
3151
|
+
/** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
|
|
3152
|
+
defaultEmailLanguage?: string | null;
|
|
3153
|
+
}
|
|
3154
|
+
interface ResendInviteOptions {
|
|
3155
|
+
/** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
|
|
3156
|
+
defaultEmailLanguage?: string | null;
|
|
3157
|
+
}
|
|
3158
|
+
|
|
3159
|
+
declare function bulkInvite$1(httpClient: HttpClient): BulkInviteSignature;
|
|
3160
|
+
interface BulkInviteSignature {
|
|
3161
|
+
/**
|
|
3162
|
+
* Creates and sends emails inviting potential site contributors to become contributors in the requesting site.
|
|
3163
|
+
* > **Important**: This call requires an account level API key and cannot be authenticated with the standard authorization header. API keys are currently available to selected beta users only.
|
|
3164
|
+
* @param - Role IDs, referred to as policy IDs, to assign to the contributors.
|
|
3165
|
+
*/
|
|
3166
|
+
(policyIds: string[], options?: BulkInviteOptions | undefined): Promise<BulkSiteInviteResponse & BulkSiteInviteResponseNonNullableFields>;
|
|
3167
|
+
}
|
|
3168
|
+
declare function resendInvite$1(httpClient: HttpClient): ResendInviteSignature;
|
|
3169
|
+
interface ResendInviteSignature {
|
|
3170
|
+
/**
|
|
3171
|
+
* Resends the email invitation to a potential site contributor.
|
|
3172
|
+
* > **Important**: This call requires an account level API key and cannot be authenticated with the standard authorization header. API keys are currently available to selected beta users only.
|
|
3173
|
+
* @param - Invite ID.
|
|
3174
|
+
*/
|
|
3175
|
+
(inviteId: string, options?: ResendInviteOptions | undefined): Promise<SiteInviteResponse & SiteInviteResponseNonNullableFields>;
|
|
3176
|
+
}
|
|
3177
|
+
declare function revokeInvite$1(httpClient: HttpClient): RevokeInviteSignature;
|
|
3178
|
+
interface RevokeInviteSignature {
|
|
3179
|
+
/**
|
|
3180
|
+
* Revokes a pending site contributor invite.
|
|
3181
|
+
* > **Important**: This call requires an account level API key and cannot be authenticated with the standard authorization header. API keys are currently available to selected beta users only.
|
|
3182
|
+
* @param - Invite ID.
|
|
3183
|
+
*/
|
|
3184
|
+
(inviteId: string): Promise<void>;
|
|
3185
|
+
}
|
|
3186
|
+
|
|
3187
|
+
declare const bulkInvite: MaybeContext<BuildRESTFunction<typeof bulkInvite$1> & typeof bulkInvite$1>;
|
|
3188
|
+
declare const resendInvite: MaybeContext<BuildRESTFunction<typeof resendInvite$1> & typeof resendInvite$1>;
|
|
3189
|
+
declare const revokeInvite: MaybeContext<BuildRESTFunction<typeof revokeInvite$1> & typeof revokeInvite$1>;
|
|
3190
|
+
|
|
3191
|
+
type index_d$2_AcceptSiteInviteRequest = AcceptSiteInviteRequest;
|
|
3192
|
+
type index_d$2_AcceptSiteInviteResponse = AcceptSiteInviteResponse;
|
|
3193
|
+
type index_d$2_BulkInviteOptions = BulkInviteOptions;
|
|
3194
|
+
type index_d$2_BulkSiteInviteRequest = BulkSiteInviteRequest;
|
|
3195
|
+
type index_d$2_BulkSiteInviteResponse = BulkSiteInviteResponse;
|
|
3196
|
+
type index_d$2_BulkSiteInviteResponseNonNullableFields = BulkSiteInviteResponseNonNullableFields;
|
|
3197
|
+
type index_d$2_ContributorLimitation = ContributorLimitation;
|
|
3198
|
+
type index_d$2_CursorPaging = CursorPaging;
|
|
3199
|
+
type index_d$2_GetContributorLimitRequest = GetContributorLimitRequest;
|
|
3200
|
+
type index_d$2_GetContributorLimitResponse = GetContributorLimitResponse;
|
|
3201
|
+
type index_d$2_GetSiteInviteRequest = GetSiteInviteRequest;
|
|
3202
|
+
type index_d$2_GetSiteInviteResponse = GetSiteInviteResponse;
|
|
3203
|
+
type index_d$2_GetSiteInvitesRequest = GetSiteInvitesRequest;
|
|
3204
|
+
type index_d$2_GetSiteInvitesResponse = GetSiteInvitesResponse;
|
|
3205
|
+
type index_d$2_Paging = Paging;
|
|
3206
|
+
type index_d$2_ParseSiteInviteTokenRequest = ParseSiteInviteTokenRequest;
|
|
3207
|
+
type index_d$2_ParseSiteInviteTokenResponse = ParseSiteInviteTokenResponse;
|
|
3208
|
+
type index_d$2_QuerySiteInvitesRequest = QuerySiteInvitesRequest;
|
|
3209
|
+
type index_d$2_QuerySiteInvitesResponse = QuerySiteInvitesResponse;
|
|
3210
|
+
type index_d$2_QueryV2 = QueryV2;
|
|
3211
|
+
type index_d$2_QueryV2PagingMethodOneOf = QueryV2PagingMethodOneOf;
|
|
3212
|
+
type index_d$2_ResendInviteOptions = ResendInviteOptions;
|
|
3213
|
+
type index_d$2_ResendSiteInviteRequest = ResendSiteInviteRequest;
|
|
3214
|
+
type index_d$2_RevokeSiteInviteRequest = RevokeSiteInviteRequest;
|
|
3215
|
+
type index_d$2_RevokeSiteInviteResponse = RevokeSiteInviteResponse;
|
|
3216
|
+
type index_d$2_SiteInviteRequest = SiteInviteRequest;
|
|
3217
|
+
type index_d$2_SiteInviteResponse = SiteInviteResponse;
|
|
3218
|
+
type index_d$2_SiteInviteResponseNonNullableFields = SiteInviteResponseNonNullableFields;
|
|
3219
|
+
type index_d$2_SortOrder = SortOrder;
|
|
3220
|
+
declare const index_d$2_SortOrder: typeof SortOrder;
|
|
3221
|
+
type index_d$2_Sorting = Sorting;
|
|
3222
|
+
type index_d$2_UpdateSiteInviteRequest = UpdateSiteInviteRequest;
|
|
3223
|
+
type index_d$2_UpdateSiteInviteResponse = UpdateSiteInviteResponse;
|
|
3224
|
+
declare const index_d$2_bulkInvite: typeof bulkInvite;
|
|
3225
|
+
declare const index_d$2_resendInvite: typeof resendInvite;
|
|
3226
|
+
declare const index_d$2_revokeInvite: typeof revokeInvite;
|
|
3227
|
+
declare namespace index_d$2 {
|
|
3228
|
+
export { type index_d$2_AcceptSiteInviteRequest as AcceptSiteInviteRequest, type index_d$2_AcceptSiteInviteResponse as AcceptSiteInviteResponse, type index_d$2_BulkInviteOptions as BulkInviteOptions, type index_d$2_BulkSiteInviteRequest as BulkSiteInviteRequest, type index_d$2_BulkSiteInviteResponse as BulkSiteInviteResponse, type index_d$2_BulkSiteInviteResponseNonNullableFields as BulkSiteInviteResponseNonNullableFields, type index_d$2_ContributorLimitation as ContributorLimitation, type index_d$2_CursorPaging as CursorPaging, type index_d$2_GetContributorLimitRequest as GetContributorLimitRequest, type index_d$2_GetContributorLimitResponse as GetContributorLimitResponse, type index_d$2_GetSiteInviteRequest as GetSiteInviteRequest, type index_d$2_GetSiteInviteResponse as GetSiteInviteResponse, type index_d$2_GetSiteInvitesRequest as GetSiteInvitesRequest, type index_d$2_GetSiteInvitesResponse as GetSiteInvitesResponse, InviteStatus$1 as InviteStatus, type index_d$2_Paging as Paging, type index_d$2_ParseSiteInviteTokenRequest as ParseSiteInviteTokenRequest, type index_d$2_ParseSiteInviteTokenResponse as ParseSiteInviteTokenResponse, type index_d$2_QuerySiteInvitesRequest as QuerySiteInvitesRequest, type index_d$2_QuerySiteInvitesResponse as QuerySiteInvitesResponse, type index_d$2_QueryV2 as QueryV2, type index_d$2_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type index_d$2_ResendInviteOptions as ResendInviteOptions, type index_d$2_ResendSiteInviteRequest as ResendSiteInviteRequest, type index_d$2_RevokeSiteInviteRequest as RevokeSiteInviteRequest, type index_d$2_RevokeSiteInviteResponse as RevokeSiteInviteResponse, type SiteInvite$1 as SiteInvite, type index_d$2_SiteInviteRequest as SiteInviteRequest, type index_d$2_SiteInviteResponse as SiteInviteResponse, type index_d$2_SiteInviteResponseNonNullableFields as SiteInviteResponseNonNullableFields, index_d$2_SortOrder as SortOrder, type index_d$2_Sorting as Sorting, type index_d$2_UpdateSiteInviteRequest as UpdateSiteInviteRequest, type index_d$2_UpdateSiteInviteResponse as UpdateSiteInviteResponse, index_d$2_bulkInvite as bulkInvite, index_d$2_resendInvite as resendInvite, index_d$2_revokeInvite as revokeInvite };
|
|
3229
|
+
}
|
|
3230
|
+
|
|
3231
|
+
interface RefreshToken {
|
|
3232
|
+
token?: string;
|
|
3233
|
+
}
|
|
3234
|
+
/**
|
|
3235
|
+
* AuthorizeRequest is sent by the client to the authorization server to initiate
|
|
3236
|
+
* the authorization process.
|
|
3237
|
+
*/
|
|
3238
|
+
interface AuthorizeRequest {
|
|
3239
|
+
/** ID of the Wix OAuth app requesting authorization. */
|
|
3240
|
+
clientId?: string;
|
|
3241
|
+
/**
|
|
3242
|
+
* Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types).
|
|
3243
|
+
*
|
|
3244
|
+
* Supported values:
|
|
3245
|
+
* + `code`: The endpoint returns an authorization code that can be used to obtain an access token.
|
|
3246
|
+
*/
|
|
3247
|
+
responseType?: string;
|
|
3248
|
+
/** URI to redirect the browser to after authentication and authorization. The browser is redirected to this URI whether the authentication and authorization process is successful or not. */
|
|
3249
|
+
redirectUri?: string | null;
|
|
3250
|
+
/**
|
|
3251
|
+
* Desired scope of access. If this field is left empty, only an access token is granted.
|
|
3252
|
+
* To received a refresh token, pass `offline_access` as the value of this field.
|
|
3253
|
+
*/
|
|
3254
|
+
scope?: string | null;
|
|
3255
|
+
/**
|
|
3256
|
+
* A value used to confirm the state of an application before and after it makes an authorization
|
|
3257
|
+
* request. If a value for this field is set in the request, it's added to the `redirectUri` when the browser
|
|
3258
|
+
* is redirected there.
|
|
3259
|
+
* Learn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters).
|
|
3260
|
+
*/
|
|
3261
|
+
state?: string;
|
|
3262
|
+
/**
|
|
3263
|
+
* esired response format.
|
|
3264
|
+
*
|
|
3265
|
+
* Supported values:
|
|
3266
|
+
* + `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting.
|
|
3267
|
+
* + `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting.
|
|
3268
|
+
* + `web_message`: The response parameters are encoded as a JSON object and added to the body of a [web message response](https://datatracker.ietf.org/doc/html/draft-sakimura-oauth-wmrm-00).
|
|
3269
|
+
*
|
|
3270
|
+
* Default value: `query`
|
|
3271
|
+
*/
|
|
3272
|
+
responseMode?: string | null;
|
|
3273
|
+
/**
|
|
3274
|
+
* Code challenge to use for PKCE verification.
|
|
3275
|
+
* This field is only used if `responseType` is set to `code`.
|
|
3276
|
+
*/
|
|
3277
|
+
codeChallenge?: string | null;
|
|
3278
|
+
/**
|
|
3279
|
+
* Code challenge method to use for PKCE verification.
|
|
3280
|
+
* This field is only used if `responseType` is set to `code`.
|
|
3281
|
+
*
|
|
3282
|
+
* Supported values:
|
|
3283
|
+
* + `S256`: The code challenge is transformed using SHA-256 encyption.
|
|
3284
|
+
* + `S512`: The code challenge is transformed using SHA-512 encyption.
|
|
3285
|
+
*/
|
|
3286
|
+
codeChallengeMethod?: string | null;
|
|
3287
|
+
/** Session token of the site visitor to authorize. */
|
|
3288
|
+
sessionToken?: string | null;
|
|
3289
|
+
}
|
|
3290
|
+
interface RawHttpResponse {
|
|
3291
|
+
body?: Uint8Array;
|
|
3292
|
+
statusCode?: number | null;
|
|
3293
|
+
headers?: HeadersEntry[];
|
|
3294
|
+
}
|
|
3295
|
+
interface HeadersEntry {
|
|
3296
|
+
key?: string;
|
|
3297
|
+
value?: string;
|
|
3298
|
+
}
|
|
3299
|
+
interface RawHttpRequest {
|
|
3300
|
+
body?: Uint8Array;
|
|
3301
|
+
pathParams?: PathParametersEntry[];
|
|
3302
|
+
queryParams?: QueryParametersEntry[];
|
|
3303
|
+
headers?: HeadersEntry[];
|
|
3304
|
+
method?: string;
|
|
3305
|
+
rawPath?: string;
|
|
3306
|
+
rawQuery?: string;
|
|
3307
|
+
}
|
|
3308
|
+
interface PathParametersEntry {
|
|
3309
|
+
key?: string;
|
|
3310
|
+
value?: string;
|
|
3311
|
+
}
|
|
3312
|
+
interface QueryParametersEntry {
|
|
3313
|
+
key?: string;
|
|
3314
|
+
value?: string;
|
|
3315
|
+
}
|
|
3316
|
+
interface DeviceCodeRequest {
|
|
3317
|
+
/** The ID of the application that asks for authorization. */
|
|
3318
|
+
clientId?: string;
|
|
3319
|
+
/**
|
|
3320
|
+
* scope is a space-delimited string that specifies the requested scope of the
|
|
3321
|
+
* access request.
|
|
3322
|
+
*/
|
|
3323
|
+
scope?: string | null;
|
|
3324
|
+
}
|
|
3325
|
+
interface DeviceCodeResponse {
|
|
3326
|
+
/** is the unique code for the device. When the user goes to the verification_uri in their browser-based device, this code will be bound to their session. */
|
|
3327
|
+
deviceCode?: string;
|
|
3328
|
+
/** contains the code that should be input at the verification_uri to authorize the device. */
|
|
3329
|
+
userCode?: string;
|
|
3330
|
+
/** contains the URL the user should visit to authorize the device. */
|
|
3331
|
+
verificationUri?: string;
|
|
3332
|
+
/** indicates the lifetime (in seconds) of the device_code and user_code. */
|
|
3333
|
+
expiresIn?: number;
|
|
3334
|
+
/** indicates the interval (in seconds) at which the app should poll the token URL to request a token. clients MUST use 5 as the default */
|
|
3335
|
+
interval?: number | null;
|
|
3336
|
+
}
|
|
3337
|
+
interface DeviceVerifyRequest {
|
|
3338
|
+
/** User code representing a currently authorizing device. */
|
|
3339
|
+
userCode?: string;
|
|
3340
|
+
}
|
|
3341
|
+
interface DeviceVerifyResponse {
|
|
3342
|
+
}
|
|
3343
|
+
interface DeviceVerifyV2Request {
|
|
3344
|
+
/** User code representing a currently authorizing device. */
|
|
3345
|
+
userCode?: string;
|
|
3346
|
+
}
|
|
3347
|
+
interface DeviceVerifyV2Response {
|
|
3348
|
+
}
|
|
3349
|
+
interface InvalidateUserCodeRequest {
|
|
3350
|
+
/** user code to invalidate. Only the authorizing identity is able to invalidate it. */
|
|
3351
|
+
userCode?: string;
|
|
3352
|
+
}
|
|
3353
|
+
interface InvalidateUserCodeResponse {
|
|
3354
|
+
}
|
|
3355
|
+
interface RevokeRefreshTokenRequest {
|
|
3356
|
+
/** The refresh token itself. Anyone with the token itself is able to revoke it. */
|
|
3357
|
+
token?: string;
|
|
3358
|
+
}
|
|
3359
|
+
interface RevokeRefreshTokenResponse {
|
|
3360
|
+
}
|
|
3361
|
+
interface TokenInfoResponse {
|
|
3362
|
+
active?: boolean;
|
|
3363
|
+
/** subject type. */
|
|
3364
|
+
subjectType?: SubjectType$1;
|
|
3365
|
+
/** subject id */
|
|
3366
|
+
subjectId?: string;
|
|
3367
|
+
/** Expiration time of the token */
|
|
3368
|
+
exp?: string | null;
|
|
3369
|
+
/** Issued time of the token */
|
|
3370
|
+
iat?: string | null;
|
|
3371
|
+
/** Client id */
|
|
3372
|
+
clientId?: string;
|
|
3373
|
+
/** Account id */
|
|
3374
|
+
accountId?: string | null;
|
|
3375
|
+
/** Site id */
|
|
3376
|
+
siteId?: string | null;
|
|
3377
|
+
/** Instance Id */
|
|
3378
|
+
instanceId?: string | null;
|
|
3379
|
+
/** Vendor Product Id */
|
|
3380
|
+
vendorProductId?: string | null;
|
|
3381
|
+
}
|
|
3382
|
+
declare enum SubjectType$1 {
|
|
3383
|
+
/** unknown subject type */
|
|
3384
|
+
UNKNOWN = "UNKNOWN",
|
|
3385
|
+
/** user subject type */
|
|
3386
|
+
USER = "USER",
|
|
3387
|
+
/** visitor subject type */
|
|
3388
|
+
VISITOR = "VISITOR",
|
|
3389
|
+
/** member subject type */
|
|
3390
|
+
MEMBER = "MEMBER",
|
|
3391
|
+
/** app subject type */
|
|
3392
|
+
APP = "APP"
|
|
3393
|
+
}
|
|
3394
|
+
interface Empty {
|
|
3395
|
+
}
|
|
3396
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
3397
|
+
createdEvent?: EntityCreatedEvent;
|
|
3398
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
3399
|
+
deletedEvent?: EntityDeletedEvent;
|
|
3400
|
+
actionEvent?: ActionEvent;
|
|
3401
|
+
/**
|
|
3402
|
+
* Unique event ID.
|
|
3403
|
+
* Allows clients to ignore duplicate webhooks.
|
|
3404
|
+
*/
|
|
3405
|
+
_id?: string;
|
|
3406
|
+
/**
|
|
3407
|
+
* Assumes actions are also always typed to an entity_type
|
|
3408
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
3409
|
+
*/
|
|
3410
|
+
entityFqdn?: string;
|
|
3411
|
+
/**
|
|
3412
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
3413
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
3414
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
3415
|
+
*/
|
|
3416
|
+
slug?: string;
|
|
3417
|
+
/** ID of the entity associated with the event. */
|
|
3418
|
+
entityId?: string;
|
|
3419
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
3420
|
+
eventTime?: Date | null;
|
|
3421
|
+
/**
|
|
3422
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
3423
|
+
* (for example, GDPR).
|
|
3424
|
+
*/
|
|
3425
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
3426
|
+
/** If present, indicates the action that triggered the event. */
|
|
3427
|
+
originatedFrom?: string | null;
|
|
3428
|
+
/**
|
|
3429
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
3430
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
3431
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
3432
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
3433
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
3434
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
3435
|
+
*/
|
|
3436
|
+
entityEventSequence?: string | null;
|
|
3437
|
+
}
|
|
3438
|
+
/** @oneof */
|
|
3439
|
+
interface DomainEventBodyOneOf {
|
|
3440
|
+
createdEvent?: EntityCreatedEvent;
|
|
3441
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
3442
|
+
deletedEvent?: EntityDeletedEvent;
|
|
3443
|
+
actionEvent?: ActionEvent;
|
|
3444
|
+
}
|
|
3445
|
+
interface EntityCreatedEvent {
|
|
3446
|
+
entity?: string;
|
|
3447
|
+
}
|
|
3448
|
+
interface RestoreInfo {
|
|
3449
|
+
deletedDate?: Date | null;
|
|
3450
|
+
}
|
|
3451
|
+
interface EntityUpdatedEvent {
|
|
3452
|
+
/**
|
|
3453
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
3454
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
3455
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
3456
|
+
*/
|
|
3457
|
+
currentEntity?: string;
|
|
3458
|
+
}
|
|
3459
|
+
interface EntityDeletedEvent {
|
|
3460
|
+
/** Entity that was deleted */
|
|
3461
|
+
deletedEntity?: string | null;
|
|
3462
|
+
}
|
|
3463
|
+
interface ActionEvent {
|
|
3464
|
+
body?: string;
|
|
3465
|
+
}
|
|
3466
|
+
interface HeadersEntryNonNullableFields {
|
|
3467
|
+
key: string;
|
|
3468
|
+
value: string;
|
|
3469
|
+
}
|
|
3470
|
+
interface RawHttpResponseNonNullableFields {
|
|
3471
|
+
body: Uint8Array;
|
|
3472
|
+
headers: HeadersEntryNonNullableFields[];
|
|
3473
|
+
}
|
|
3474
|
+
interface TokenInfoResponseNonNullableFields {
|
|
3475
|
+
active: boolean;
|
|
3476
|
+
subjectType: SubjectType$1;
|
|
3477
|
+
subjectId: string;
|
|
3478
|
+
clientId: string;
|
|
3479
|
+
}
|
|
3480
|
+
interface TokenOptions {
|
|
3481
|
+
body?: Uint8Array;
|
|
3482
|
+
pathParams?: PathParametersEntry[];
|
|
3483
|
+
queryParams?: QueryParametersEntry[];
|
|
3484
|
+
headers?: HeadersEntry[];
|
|
3485
|
+
method?: string;
|
|
3486
|
+
rawPath?: string;
|
|
3487
|
+
rawQuery?: string;
|
|
3488
|
+
}
|
|
3489
|
+
interface TokenInfoOptions {
|
|
3490
|
+
body?: Uint8Array;
|
|
3491
|
+
pathParams?: PathParametersEntry[];
|
|
3492
|
+
queryParams?: QueryParametersEntry[];
|
|
3493
|
+
headers?: HeadersEntry[];
|
|
3494
|
+
method?: string;
|
|
3495
|
+
rawPath?: string;
|
|
3496
|
+
rawQuery?: string;
|
|
3497
|
+
}
|
|
3498
|
+
|
|
3499
|
+
declare function token$1(httpClient: HttpClient): TokenSignature;
|
|
3500
|
+
interface TokenSignature {
|
|
3501
|
+
/**
|
|
3502
|
+
* Creates an access token.
|
|
3503
|
+
*
|
|
3504
|
+
*
|
|
3505
|
+
* The endpoint accepts raw HTTP requests. You must pass the request's body
|
|
3506
|
+
* parameters formatted as bytes in the raw HTTP request's `body` field,
|
|
3507
|
+
* following this template:
|
|
3508
|
+
* `{"grantType": "client_credentials", "client_id": "<APP_ID>", "client_secret": "<APP_SECRET_KEY>", "instance_id": "<INSTANCE_ID>"}`.
|
|
3509
|
+
*
|
|
3510
|
+
* When the call succeeds, Wix returns `{"statusCode": 200}` and the created access
|
|
3511
|
+
* token in the `body` field of the raw HTTP response.
|
|
3512
|
+
*
|
|
3513
|
+
* In case the call fails, Wix returns the relevant `4XX` error code in the raw
|
|
3514
|
+
* HTTP response's `statusCode` field and details
|
|
3515
|
+
* about the error in `body`. Error details follow the
|
|
3516
|
+
* [conventions of the Internet Engineering Task Force (IETF)](https://datatracker.ietf.org/doc/html/rfc6749#appendix-A.7).
|
|
3517
|
+
*/
|
|
3518
|
+
(options?: TokenOptions | undefined): Promise<RawHttpResponse & RawHttpResponseNonNullableFields>;
|
|
3519
|
+
}
|
|
3520
|
+
declare function tokenInfo$1(httpClient: HttpClient): TokenInfoSignature;
|
|
3521
|
+
interface TokenInfoSignature {
|
|
3522
|
+
/**
|
|
3523
|
+
* Token Introspection Endpoint.
|
|
3524
|
+
*/
|
|
3525
|
+
(options?: TokenInfoOptions | undefined): Promise<TokenInfoResponse & TokenInfoResponseNonNullableFields>;
|
|
3526
|
+
}
|
|
3527
|
+
|
|
3528
|
+
declare const token: MaybeContext<BuildRESTFunction<typeof token$1> & typeof token$1>;
|
|
3529
|
+
declare const tokenInfo: MaybeContext<BuildRESTFunction<typeof tokenInfo$1> & typeof tokenInfo$1>;
|
|
3530
|
+
|
|
3531
|
+
type index_d$1_ActionEvent = ActionEvent;
|
|
3532
|
+
type index_d$1_AuthorizeRequest = AuthorizeRequest;
|
|
3533
|
+
type index_d$1_DeviceCodeRequest = DeviceCodeRequest;
|
|
3534
|
+
type index_d$1_DeviceCodeResponse = DeviceCodeResponse;
|
|
3535
|
+
type index_d$1_DeviceVerifyRequest = DeviceVerifyRequest;
|
|
3536
|
+
type index_d$1_DeviceVerifyResponse = DeviceVerifyResponse;
|
|
3537
|
+
type index_d$1_DeviceVerifyV2Request = DeviceVerifyV2Request;
|
|
3538
|
+
type index_d$1_DeviceVerifyV2Response = DeviceVerifyV2Response;
|
|
3539
|
+
type index_d$1_DomainEvent = DomainEvent;
|
|
3540
|
+
type index_d$1_DomainEventBodyOneOf = DomainEventBodyOneOf;
|
|
3541
|
+
type index_d$1_Empty = Empty;
|
|
3542
|
+
type index_d$1_EntityCreatedEvent = EntityCreatedEvent;
|
|
3543
|
+
type index_d$1_EntityDeletedEvent = EntityDeletedEvent;
|
|
3544
|
+
type index_d$1_EntityUpdatedEvent = EntityUpdatedEvent;
|
|
3545
|
+
type index_d$1_HeadersEntry = HeadersEntry;
|
|
3546
|
+
type index_d$1_InvalidateUserCodeRequest = InvalidateUserCodeRequest;
|
|
3547
|
+
type index_d$1_InvalidateUserCodeResponse = InvalidateUserCodeResponse;
|
|
3548
|
+
type index_d$1_PathParametersEntry = PathParametersEntry;
|
|
3549
|
+
type index_d$1_QueryParametersEntry = QueryParametersEntry;
|
|
3550
|
+
type index_d$1_RawHttpRequest = RawHttpRequest;
|
|
3551
|
+
type index_d$1_RawHttpResponse = RawHttpResponse;
|
|
3552
|
+
type index_d$1_RawHttpResponseNonNullableFields = RawHttpResponseNonNullableFields;
|
|
3553
|
+
type index_d$1_RefreshToken = RefreshToken;
|
|
3554
|
+
type index_d$1_RestoreInfo = RestoreInfo;
|
|
3555
|
+
type index_d$1_RevokeRefreshTokenRequest = RevokeRefreshTokenRequest;
|
|
3556
|
+
type index_d$1_RevokeRefreshTokenResponse = RevokeRefreshTokenResponse;
|
|
3557
|
+
type index_d$1_TokenInfoOptions = TokenInfoOptions;
|
|
3558
|
+
type index_d$1_TokenInfoResponse = TokenInfoResponse;
|
|
3559
|
+
type index_d$1_TokenInfoResponseNonNullableFields = TokenInfoResponseNonNullableFields;
|
|
3560
|
+
type index_d$1_TokenOptions = TokenOptions;
|
|
3561
|
+
declare const index_d$1_token: typeof token;
|
|
3562
|
+
declare const index_d$1_tokenInfo: typeof tokenInfo;
|
|
3563
|
+
declare namespace index_d$1 {
|
|
3564
|
+
export { type index_d$1_ActionEvent as ActionEvent, type index_d$1_AuthorizeRequest as AuthorizeRequest, type index_d$1_DeviceCodeRequest as DeviceCodeRequest, type index_d$1_DeviceCodeResponse as DeviceCodeResponse, type index_d$1_DeviceVerifyRequest as DeviceVerifyRequest, type index_d$1_DeviceVerifyResponse as DeviceVerifyResponse, type index_d$1_DeviceVerifyV2Request as DeviceVerifyV2Request, type index_d$1_DeviceVerifyV2Response as DeviceVerifyV2Response, type index_d$1_DomainEvent as DomainEvent, type index_d$1_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d$1_Empty as Empty, type index_d$1_EntityCreatedEvent as EntityCreatedEvent, type index_d$1_EntityDeletedEvent as EntityDeletedEvent, type index_d$1_EntityUpdatedEvent as EntityUpdatedEvent, type index_d$1_HeadersEntry as HeadersEntry, type index_d$1_InvalidateUserCodeRequest as InvalidateUserCodeRequest, type index_d$1_InvalidateUserCodeResponse as InvalidateUserCodeResponse, type index_d$1_PathParametersEntry as PathParametersEntry, type index_d$1_QueryParametersEntry as QueryParametersEntry, type index_d$1_RawHttpRequest as RawHttpRequest, type index_d$1_RawHttpResponse as RawHttpResponse, type index_d$1_RawHttpResponseNonNullableFields as RawHttpResponseNonNullableFields, type index_d$1_RefreshToken as RefreshToken, type index_d$1_RestoreInfo as RestoreInfo, type index_d$1_RevokeRefreshTokenRequest as RevokeRefreshTokenRequest, type index_d$1_RevokeRefreshTokenResponse as RevokeRefreshTokenResponse, SubjectType$1 as SubjectType, type index_d$1_TokenInfoOptions as TokenInfoOptions, type index_d$1_TokenInfoResponse as TokenInfoResponse, type index_d$1_TokenInfoResponseNonNullableFields as TokenInfoResponseNonNullableFields, type index_d$1_TokenOptions as TokenOptions, index_d$1_token as token, index_d$1_tokenInfo as tokenInfo };
|
|
3565
|
+
}
|
|
3566
|
+
|
|
3567
|
+
interface Contributor {
|
|
3568
|
+
/** Contributor's metadata. */
|
|
3569
|
+
metaData?: PersonMetaData;
|
|
3570
|
+
/** Whether the contributor account is a team account. */
|
|
3571
|
+
isTeam?: boolean | null;
|
|
3572
|
+
/** Date that the contributor joined the site. */
|
|
3573
|
+
joinedAt?: Date | null;
|
|
3574
|
+
/** Email address that received the invite. */
|
|
3575
|
+
invitedEmail?: string | null;
|
|
3576
|
+
/** Whether the contributor account is a client account. */
|
|
3577
|
+
isClient?: boolean | null;
|
|
3578
|
+
/**
|
|
3579
|
+
* Contributor's user ID.
|
|
3580
|
+
* @readonly
|
|
3581
|
+
*/
|
|
3582
|
+
_id?: string;
|
|
3583
|
+
}
|
|
3584
|
+
interface PersonMetaData {
|
|
3585
|
+
/** Contributor's account ID. */
|
|
3586
|
+
_id?: string;
|
|
3587
|
+
/** Contributor's full name. */
|
|
3588
|
+
fullName?: string | null;
|
|
3589
|
+
/** URL for contributor's profile image. */
|
|
3590
|
+
imageUrl?: string | null;
|
|
3591
|
+
/** Contributor's email address. */
|
|
3592
|
+
email?: string | null;
|
|
3593
|
+
/** Contributor's access to assets and their assigned role (`policy`) for that asset. */
|
|
3594
|
+
assignments?: Assignment[];
|
|
3595
|
+
}
|
|
3596
|
+
interface Assignment {
|
|
3597
|
+
/** Role assigned to the user. */
|
|
3598
|
+
policy?: AssignedPolicy;
|
|
3599
|
+
/** Unique ID for this specific assignment. */
|
|
3600
|
+
assignmentId?: string;
|
|
3601
|
+
/** Identity assigned to the asset in an assignment, referred to as subject. Supported subjects include user IDs, account IDs, and app IDs. */
|
|
3602
|
+
subject?: Subject;
|
|
3603
|
+
}
|
|
3604
|
+
interface AssignedPolicy {
|
|
3605
|
+
/** Role ID. */
|
|
3606
|
+
policyId?: string;
|
|
3607
|
+
/** Role title. */
|
|
3608
|
+
title?: string | null;
|
|
3609
|
+
/** Role description. */
|
|
3610
|
+
description?: string | null;
|
|
3611
|
+
}
|
|
3612
|
+
interface Restriction extends RestrictionRestrictionsOneOf {
|
|
3613
|
+
/**
|
|
3614
|
+
* Deprecated.
|
|
3615
|
+
* @deprecated
|
|
3616
|
+
*/
|
|
3617
|
+
resource?: Resource;
|
|
3618
|
+
/** List of conditions restricting the user's access. Currently only folder conditions are supported. */
|
|
3619
|
+
conditions?: Conditions;
|
|
3620
|
+
/** Site where the assignment restrictions apply. */
|
|
3621
|
+
site?: SiteRestriction;
|
|
3622
|
+
}
|
|
3623
|
+
/** @oneof */
|
|
3624
|
+
interface RestrictionRestrictionsOneOf {
|
|
3625
|
+
/**
|
|
3626
|
+
* Deprecated.
|
|
3627
|
+
* @deprecated
|
|
3628
|
+
*/
|
|
3629
|
+
resource?: Resource;
|
|
3630
|
+
/** List of conditions restricting the user's access. Currently only folder conditions are supported. */
|
|
3631
|
+
conditions?: Conditions;
|
|
3632
|
+
/** Site where the assignment restrictions apply. */
|
|
3633
|
+
site?: SiteRestriction;
|
|
3634
|
+
}
|
|
3635
|
+
interface Resource {
|
|
3636
|
+
/** Resource type. */
|
|
3637
|
+
resourceType?: ResourceType;
|
|
3638
|
+
/** Resource ID. */
|
|
3639
|
+
_id?: string;
|
|
3640
|
+
value?: string | null;
|
|
3641
|
+
}
|
|
3642
|
+
declare enum ResourceType {
|
|
3643
|
+
UNKNOWN_RESOURCE_TYPE = "UNKNOWN_RESOURCE_TYPE",
|
|
3644
|
+
SITE = "SITE"
|
|
3645
|
+
}
|
|
3646
|
+
interface Conditions {
|
|
3647
|
+
/** List of conditions. */
|
|
3648
|
+
conditions?: Condition[];
|
|
3649
|
+
}
|
|
3650
|
+
interface Condition {
|
|
3651
|
+
/** Condition type. */
|
|
3652
|
+
conditionType?: ConditionAttributeType;
|
|
3653
|
+
/** Condition ID. */
|
|
3654
|
+
_id?: string;
|
|
3655
|
+
/** Expected value of the condition. When `conditionType` = "FOLDER", this is the folder path. */
|
|
3656
|
+
value?: string | null;
|
|
3657
|
+
}
|
|
3658
|
+
declare enum ConditionAttributeType {
|
|
3659
|
+
UNKNOWN_CONDITION_TYPE = "UNKNOWN_CONDITION_TYPE",
|
|
3660
|
+
FOLDER = "FOLDER"
|
|
3661
|
+
}
|
|
3662
|
+
interface SiteRestriction {
|
|
3663
|
+
/** Site ID. */
|
|
3664
|
+
_id?: string;
|
|
3665
|
+
/** Site name. */
|
|
3666
|
+
value?: string | null;
|
|
3667
|
+
}
|
|
3668
|
+
interface CompanionResource {
|
|
3669
|
+
/** Asset ID (referred to here as resource ID). */
|
|
3670
|
+
_id?: string;
|
|
3671
|
+
/** Asset type (referred to here as resource type). as predefined in the authorization system */
|
|
3672
|
+
resourceType?: string;
|
|
3673
|
+
}
|
|
3674
|
+
interface Subject {
|
|
3675
|
+
/** ID of identity assigned to the asset. */
|
|
3676
|
+
_id?: string;
|
|
3677
|
+
/** Type of identity assigned to the asset. Supported subject types include user IDs, account IDs, and app IDs. */
|
|
3678
|
+
subjectType?: SubjectType;
|
|
3679
|
+
/** Context of identity assigned to the asset. For example, a `subjectType` = `USER` will have `context` = `ACCOUNT`. */
|
|
3680
|
+
context?: SubjectContext;
|
|
3681
|
+
}
|
|
3682
|
+
declare enum SubjectType {
|
|
3683
|
+
UNKNOWN = "UNKNOWN",
|
|
3684
|
+
ACCOUNT = "ACCOUNT",
|
|
3685
|
+
USER = "USER",
|
|
3686
|
+
USER_GROUP = "USER_GROUP",
|
|
3687
|
+
MEMBER_GROUP = "MEMBER_GROUP",
|
|
3688
|
+
VISITOR_GROUP = "VISITOR_GROUP",
|
|
3689
|
+
EXTERNAL_APP = "EXTERNAL_APP",
|
|
3690
|
+
ACCOUNT_GROUP = "ACCOUNT_GROUP",
|
|
3691
|
+
WIX_APP = "WIX_APP"
|
|
3692
|
+
}
|
|
3693
|
+
interface SubjectContext {
|
|
3694
|
+
_id?: string;
|
|
3695
|
+
contextType?: SubjectContextType;
|
|
3696
|
+
}
|
|
3697
|
+
declare enum SubjectContextType {
|
|
3698
|
+
UNKNOWN_CTX = "UNKNOWN_CTX",
|
|
3699
|
+
ORG_CTX = "ORG_CTX",
|
|
3700
|
+
ACCOUNT_CTX = "ACCOUNT_CTX"
|
|
3701
|
+
}
|
|
3702
|
+
interface GetAppContributorsRequest {
|
|
3703
|
+
appId?: string;
|
|
3704
|
+
/** The locale of the request. Defaults to en-us. */
|
|
3705
|
+
locale?: string | null;
|
|
3706
|
+
}
|
|
3707
|
+
interface GetAppContributorsResponse {
|
|
3708
|
+
contributors?: Contributor[];
|
|
3709
|
+
invites?: AppInvite[];
|
|
3710
|
+
}
|
|
3711
|
+
interface AppInvite {
|
|
3712
|
+
/** @readonly */
|
|
3713
|
+
_id?: string;
|
|
3714
|
+
/** TODO: amitis - remove this comment after the next merge */
|
|
3715
|
+
destEmail?: string;
|
|
3716
|
+
/** @readonly */
|
|
3717
|
+
status?: string;
|
|
3718
|
+
/** @readonly */
|
|
3719
|
+
acceptLink?: string;
|
|
3720
|
+
invitePurpose?: string | null;
|
|
3721
|
+
policies?: AssignedPolicy[];
|
|
3722
|
+
/** @readonly */
|
|
3723
|
+
expirationDate?: Date | null;
|
|
3724
|
+
/** @readonly */
|
|
3725
|
+
dateCreated?: Date | null;
|
|
3726
|
+
/** @readonly */
|
|
3727
|
+
dateUpdated?: Date | null;
|
|
3728
|
+
}
|
|
3729
|
+
interface GetSiteContributorsRequest {
|
|
3730
|
+
/** The locale of the request. Defaults to en-us */
|
|
3731
|
+
locale?: string | null;
|
|
3732
|
+
}
|
|
3733
|
+
interface GetSiteContributorsResponse {
|
|
3734
|
+
users?: User[];
|
|
3735
|
+
teams?: Team[];
|
|
3736
|
+
invites?: SiteInvite[];
|
|
3737
|
+
policies?: Policy[];
|
|
3738
|
+
permissions?: string[];
|
|
3739
|
+
userId?: string;
|
|
3740
|
+
loggedInAccountId?: string;
|
|
3741
|
+
pendingOwner?: PendingOwner;
|
|
3742
|
+
contributorLimit?: ContributorLimit;
|
|
3743
|
+
predefinedRoles?: PredefinedRoles;
|
|
3744
|
+
}
|
|
3745
|
+
interface User {
|
|
3746
|
+
/** User ID. */
|
|
3747
|
+
_id?: string;
|
|
3748
|
+
/**
|
|
3749
|
+
* Deprecated.
|
|
3750
|
+
* @deprecated
|
|
3751
|
+
*/
|
|
3752
|
+
roles?: string[];
|
|
3753
|
+
/** User's email address. */
|
|
3754
|
+
email?: string;
|
|
3755
|
+
/** User's name. */
|
|
3756
|
+
name?: Name;
|
|
3757
|
+
/** URL to user's profile image, when provided. */
|
|
3758
|
+
profileImage?: string | null;
|
|
3759
|
+
/** Date the user joined the team. */
|
|
3760
|
+
joinedTeamAt?: Date | null;
|
|
3761
|
+
/**
|
|
3762
|
+
* Deprecated.
|
|
3763
|
+
* @deprecated
|
|
3764
|
+
*/
|
|
3765
|
+
policyIds?: string[];
|
|
3766
|
+
/** Resources the user can access. */
|
|
3767
|
+
assignments?: Assignment[];
|
|
3768
|
+
}
|
|
3769
|
+
interface Name {
|
|
3770
|
+
/** User's first name. */
|
|
3771
|
+
firstName?: string;
|
|
3772
|
+
/** User's last name. */
|
|
3773
|
+
lastName?: string;
|
|
3774
|
+
}
|
|
3775
|
+
interface Team {
|
|
3776
|
+
accountId?: string;
|
|
3777
|
+
accountInfo?: AccountInfo;
|
|
3778
|
+
policyIds?: string[];
|
|
3779
|
+
joinedAt?: Date | null;
|
|
3780
|
+
}
|
|
3781
|
+
interface AccountInfo {
|
|
3782
|
+
accountName?: string;
|
|
3783
|
+
accountImage?: string;
|
|
3784
|
+
isTeam?: boolean;
|
|
3785
|
+
}
|
|
3786
|
+
interface SiteInvite {
|
|
3787
|
+
/**
|
|
3788
|
+
* Invite ID.
|
|
3789
|
+
* @readonly
|
|
3790
|
+
*/
|
|
3791
|
+
_id?: string;
|
|
3792
|
+
/**
|
|
3793
|
+
* Site ID the user is invited to as a collaborator.
|
|
3794
|
+
* @readonly
|
|
3795
|
+
*/
|
|
3796
|
+
siteId?: string;
|
|
3797
|
+
/** Email address where the invite was sent. */
|
|
3798
|
+
email?: string;
|
|
3799
|
+
/** Role IDs included in the invite. */
|
|
3800
|
+
policyIds?: string[];
|
|
3801
|
+
/**
|
|
3802
|
+
* Deprecated. Use `inviterAccountId`.
|
|
3803
|
+
* @readonly
|
|
3804
|
+
* @deprecated
|
|
3805
|
+
*/
|
|
3806
|
+
inviterId?: string;
|
|
3807
|
+
/**
|
|
3808
|
+
* Invite Status.
|
|
3809
|
+
*
|
|
3810
|
+
* Supported values:
|
|
3811
|
+
* - **Pending:** The invite has been sent and is valid, waiting for the user's response.
|
|
3812
|
+
* - **Used:** The invite has been accepted.
|
|
3813
|
+
* - **Deleted:** The invite has been deleted or revoked.
|
|
3814
|
+
* - **Declined:** The user declined the invite.
|
|
3815
|
+
* - **Expired:** The invite has expired without being accepted.
|
|
3816
|
+
*/
|
|
3817
|
+
status?: InviteStatus;
|
|
3818
|
+
/** Link to accept the invite. */
|
|
3819
|
+
acceptLink?: string;
|
|
3820
|
+
/**
|
|
3821
|
+
* Inviting account ID.
|
|
3822
|
+
* @readonly
|
|
3823
|
+
*/
|
|
3824
|
+
inviterAccountId?: string;
|
|
3825
|
+
/**
|
|
3826
|
+
* Account ID that accepted the invite. Populated only once the invite is accepted.
|
|
3827
|
+
* @readonly
|
|
3828
|
+
*/
|
|
3829
|
+
acceptedByAccountId?: string | null;
|
|
3830
|
+
/** Date the invite was created. */
|
|
3831
|
+
dateCreated?: Date | null;
|
|
3832
|
+
/** User's Wix Bookings staff ID, if relevant. */
|
|
3833
|
+
staffId?: string | null;
|
|
3834
|
+
/** Invite expiration date */
|
|
3835
|
+
expirationDate?: Date | null;
|
|
3836
|
+
}
|
|
3837
|
+
/** Invite status stating whether the invite was accepted, waiting to be accepted, deleted etc.. */
|
|
3838
|
+
declare enum InviteStatus {
|
|
3839
|
+
Pending = "Pending",
|
|
3840
|
+
Used = "Used",
|
|
3841
|
+
Deleted = "Deleted",
|
|
3842
|
+
Declined = "Declined",
|
|
3843
|
+
Expired = "Expired"
|
|
3844
|
+
}
|
|
3845
|
+
interface Policy {
|
|
3846
|
+
_id?: string;
|
|
3847
|
+
description?: string | null;
|
|
3848
|
+
name?: string | null;
|
|
3849
|
+
isCustom?: boolean;
|
|
3850
|
+
scopes?: string[];
|
|
3851
|
+
}
|
|
3852
|
+
interface PendingOwner {
|
|
3853
|
+
email?: string;
|
|
3854
|
+
expirationDate?: Date | null;
|
|
3855
|
+
acceptLink?: string;
|
|
3856
|
+
}
|
|
3857
|
+
interface ContributorLimit {
|
|
3858
|
+
contributorLimit?: number;
|
|
3859
|
+
}
|
|
3860
|
+
interface PredefinedRoles {
|
|
3861
|
+
roles?: PredefinedRole[];
|
|
3862
|
+
}
|
|
3863
|
+
interface PredefinedRole {
|
|
3864
|
+
titleKey?: string;
|
|
3865
|
+
roles?: Role[];
|
|
3866
|
+
title?: string | null;
|
|
3867
|
+
areaId?: string;
|
|
3868
|
+
}
|
|
3869
|
+
interface Role {
|
|
3870
|
+
_id?: string;
|
|
3871
|
+
deprecatedKey?: string;
|
|
3872
|
+
/** @deprecated */
|
|
3873
|
+
titleKey?: string;
|
|
3874
|
+
/** @deprecated */
|
|
3875
|
+
descriptionKey?: string;
|
|
3876
|
+
deprecated?: boolean;
|
|
3877
|
+
restrictFromLevel?: string;
|
|
3878
|
+
experiments?: string[];
|
|
3879
|
+
appDefIds?: string[];
|
|
3880
|
+
title?: string | null;
|
|
3881
|
+
description?: string | null;
|
|
3882
|
+
isCustom?: boolean;
|
|
3883
|
+
scopes?: string[];
|
|
3884
|
+
availableResourceTypes?: ResourceType[];
|
|
3885
|
+
availableConditions?: ConditionAttributeType[];
|
|
3886
|
+
limitToEditorTypes?: string[];
|
|
3887
|
+
}
|
|
3888
|
+
interface GetSiteContributorsV2Request {
|
|
3889
|
+
/** The locale of the request. Defaults to en-us. */
|
|
3890
|
+
locale?: string | null;
|
|
3891
|
+
}
|
|
3892
|
+
interface GetSiteContributorsV2Response {
|
|
3893
|
+
/** List of contributors of the given site. */
|
|
3894
|
+
contributors?: Contributor[];
|
|
3895
|
+
/** List of invites to contribute to the given site. */
|
|
3896
|
+
invites?: SiteInvite[];
|
|
3897
|
+
/** Quota information for contributors on the given site. */
|
|
3898
|
+
contributorsQuota?: ContributorsQuota;
|
|
3899
|
+
}
|
|
3900
|
+
interface ContributorsQuota extends ContributorsQuotaOptionsOneOf {
|
|
3901
|
+
/** Limited contributors quota details. */
|
|
3902
|
+
limitedOptions?: LimitedOptions;
|
|
3903
|
+
/** Type of contributors quota */
|
|
3904
|
+
type?: Type;
|
|
3905
|
+
}
|
|
3906
|
+
/** @oneof */
|
|
3907
|
+
interface ContributorsQuotaOptionsOneOf {
|
|
3908
|
+
/** Limited contributors quota details. */
|
|
3909
|
+
limitedOptions?: LimitedOptions;
|
|
3910
|
+
}
|
|
3911
|
+
/** Enum to represent different types of contributors quota. */
|
|
3912
|
+
declare enum Type {
|
|
3913
|
+
UNKNOWN = "UNKNOWN",
|
|
3914
|
+
LIMITED = "LIMITED",
|
|
3915
|
+
UNLIMITED = "UNLIMITED"
|
|
3916
|
+
}
|
|
3917
|
+
/** Details for a limited contributors quota. */
|
|
3918
|
+
interface LimitedOptions {
|
|
3919
|
+
/** Maximum number of contributors allowed. */
|
|
3920
|
+
limit?: number;
|
|
3921
|
+
/** Number of accepted or pending invitations. */
|
|
3922
|
+
used?: number;
|
|
3923
|
+
}
|
|
3924
|
+
interface HandleSiteTransferRequest {
|
|
3925
|
+
originalOwnerAccountId?: string;
|
|
3926
|
+
newOwnerAccountId?: string;
|
|
3927
|
+
metaSiteId?: string;
|
|
3928
|
+
keepOriginalOwnerAsContributor?: boolean;
|
|
3929
|
+
}
|
|
3930
|
+
interface HandleSiteTransferResponse {
|
|
3931
|
+
}
|
|
3932
|
+
interface GetCurrentUserRolesRequest {
|
|
3933
|
+
/** The locale of the request. Defaults to en-us */
|
|
3934
|
+
locale?: string | null;
|
|
3935
|
+
}
|
|
3936
|
+
interface GetCurrentUserRolesResponse {
|
|
3937
|
+
roles?: LocalizedRole[];
|
|
3938
|
+
}
|
|
3939
|
+
interface LocalizedRole {
|
|
3940
|
+
name?: string;
|
|
3941
|
+
description?: string | null;
|
|
3942
|
+
}
|
|
3943
|
+
interface BulkGetUserRolesOnSiteRequest {
|
|
3944
|
+
users?: UserSubject[];
|
|
3945
|
+
/** The locale of the request. Defaults to en-us */
|
|
3946
|
+
locale?: string | null;
|
|
3947
|
+
}
|
|
3948
|
+
interface UserSubject {
|
|
3949
|
+
userId?: string;
|
|
3950
|
+
accountId?: string;
|
|
3951
|
+
}
|
|
3952
|
+
interface BulkGetUserRolesOnSiteResponse {
|
|
3953
|
+
userRoles?: UserLocalizedRoles[];
|
|
3954
|
+
}
|
|
3955
|
+
interface UserLocalizedRoles {
|
|
3956
|
+
user?: UserSubject;
|
|
3957
|
+
roles?: LocalizedRole[];
|
|
3958
|
+
}
|
|
3959
|
+
interface ChangeContributorRoleRequest {
|
|
3960
|
+
/** Contributor's account ID. */
|
|
3961
|
+
accountId: string;
|
|
3962
|
+
/** New roles to assign to the contributor on the site. */
|
|
3963
|
+
newRoles: SiteRoleAssignment[];
|
|
3964
|
+
}
|
|
3965
|
+
interface SiteRoleAssignment {
|
|
3966
|
+
/** Role ID. Sometimes referred to as policy ID. See [Roles and Permissions](https://support.wix.com/en/article/roles-permissions-overview) for a list of available roles. */
|
|
3967
|
+
roleId?: string;
|
|
3968
|
+
/**
|
|
3969
|
+
* Assignment ID mapping the role to the contributor on the site.
|
|
3970
|
+
* @readonly
|
|
3971
|
+
*/
|
|
3972
|
+
assignmentId?: string;
|
|
3973
|
+
}
|
|
3974
|
+
interface ChangeContributorRoleResponse {
|
|
3975
|
+
/** New roles assigned to the contributor on the site. */
|
|
3976
|
+
newAssignedRoles?: SiteRoleAssignment[];
|
|
3977
|
+
}
|
|
3978
|
+
interface QuerySiteContributorsRequest {
|
|
3979
|
+
filter?: QuerySiteContributorsFilter;
|
|
3980
|
+
}
|
|
3981
|
+
interface QuerySiteContributorsFilter {
|
|
3982
|
+
/** Role IDs (referred to here as policy IDs) to return. See [Roles and Permissions](https://support.wix.com/en/article/roles-permissions-overview) for available roles. */
|
|
3983
|
+
policyIds?: string[];
|
|
3984
|
+
}
|
|
3985
|
+
declare enum FieldSet {
|
|
3986
|
+
UNKNOWN = "UNKNOWN",
|
|
3987
|
+
/** Include only `account_id` and `account_owner_id` fields. */
|
|
3988
|
+
META_DATA = "META_DATA"
|
|
3989
|
+
}
|
|
3990
|
+
interface QuerySiteContributorsResponse {
|
|
3991
|
+
/** List of site contributors. */
|
|
3992
|
+
contributors?: ContributorV2[];
|
|
3993
|
+
}
|
|
3994
|
+
interface ContributorV2 {
|
|
3995
|
+
/** Contributor's account ID. */
|
|
3996
|
+
accountId?: string | null;
|
|
3997
|
+
/** User ID of the owner of the account that the contributor has joined. */
|
|
3998
|
+
accountOwnerId?: string | null;
|
|
3999
|
+
}
|
|
4000
|
+
interface GetContributorsQuotaRequest {
|
|
4001
|
+
}
|
|
4002
|
+
interface GetContributorsQuotaResponse {
|
|
4003
|
+
/** Quota information for contributors on the given site. */
|
|
4004
|
+
contributorsQuota?: ContributorsQuota;
|
|
4005
|
+
}
|
|
4006
|
+
interface SiteRoleAssignmentNonNullableFields {
|
|
4007
|
+
roleId: string;
|
|
4008
|
+
assignmentId: string;
|
|
4009
|
+
}
|
|
4010
|
+
interface ChangeContributorRoleResponseNonNullableFields {
|
|
4011
|
+
newAssignedRoles: SiteRoleAssignmentNonNullableFields[];
|
|
4012
|
+
}
|
|
4013
|
+
interface ChangeRoleOptions {
|
|
4014
|
+
/** New roles to assign to the contributor on the site. */
|
|
4015
|
+
newRoles: SiteRoleAssignment[];
|
|
4016
|
+
}
|
|
4017
|
+
interface QuerySiteContributorsOptions {
|
|
4018
|
+
filter?: QuerySiteContributorsFilter;
|
|
4019
|
+
}
|
|
4020
|
+
|
|
4021
|
+
declare function changeRole$1(httpClient: HttpClient): ChangeRoleSignature;
|
|
4022
|
+
interface ChangeRoleSignature {
|
|
4023
|
+
/**
|
|
4024
|
+
* Overrides all the roles of a contributor for the specified site.
|
|
4025
|
+
* @param - Contributor's account ID.
|
|
4026
|
+
*/
|
|
4027
|
+
(accountId: string, options: ChangeRoleOptions): Promise<ChangeContributorRoleResponse & ChangeContributorRoleResponseNonNullableFields>;
|
|
4028
|
+
}
|
|
4029
|
+
declare function querySiteContributors$1(httpClient: HttpClient): QuerySiteContributorsSignature;
|
|
4030
|
+
interface QuerySiteContributorsSignature {
|
|
4031
|
+
/**
|
|
4032
|
+
* Retrieves a list of contributors for the specified site, given the provided filters.
|
|
4033
|
+
*/
|
|
4034
|
+
(options?: QuerySiteContributorsOptions | undefined): Promise<QuerySiteContributorsResponse>;
|
|
4035
|
+
}
|
|
4036
|
+
|
|
4037
|
+
declare const changeRole: MaybeContext<BuildRESTFunction<typeof changeRole$1> & typeof changeRole$1>;
|
|
4038
|
+
declare const querySiteContributors: MaybeContext<BuildRESTFunction<typeof querySiteContributors$1> & typeof querySiteContributors$1>;
|
|
4039
|
+
|
|
4040
|
+
type index_d_AccountInfo = AccountInfo;
|
|
4041
|
+
type index_d_AppInvite = AppInvite;
|
|
4042
|
+
type index_d_AssignedPolicy = AssignedPolicy;
|
|
4043
|
+
type index_d_Assignment = Assignment;
|
|
4044
|
+
type index_d_BulkGetUserRolesOnSiteRequest = BulkGetUserRolesOnSiteRequest;
|
|
4045
|
+
type index_d_BulkGetUserRolesOnSiteResponse = BulkGetUserRolesOnSiteResponse;
|
|
4046
|
+
type index_d_ChangeContributorRoleRequest = ChangeContributorRoleRequest;
|
|
4047
|
+
type index_d_ChangeContributorRoleResponse = ChangeContributorRoleResponse;
|
|
4048
|
+
type index_d_ChangeContributorRoleResponseNonNullableFields = ChangeContributorRoleResponseNonNullableFields;
|
|
4049
|
+
type index_d_ChangeRoleOptions = ChangeRoleOptions;
|
|
4050
|
+
type index_d_CompanionResource = CompanionResource;
|
|
4051
|
+
type index_d_Condition = Condition;
|
|
4052
|
+
type index_d_ConditionAttributeType = ConditionAttributeType;
|
|
4053
|
+
declare const index_d_ConditionAttributeType: typeof ConditionAttributeType;
|
|
4054
|
+
type index_d_Conditions = Conditions;
|
|
4055
|
+
type index_d_Contributor = Contributor;
|
|
4056
|
+
type index_d_ContributorLimit = ContributorLimit;
|
|
4057
|
+
type index_d_ContributorV2 = ContributorV2;
|
|
4058
|
+
type index_d_ContributorsQuota = ContributorsQuota;
|
|
4059
|
+
type index_d_ContributorsQuotaOptionsOneOf = ContributorsQuotaOptionsOneOf;
|
|
4060
|
+
type index_d_FieldSet = FieldSet;
|
|
4061
|
+
declare const index_d_FieldSet: typeof FieldSet;
|
|
4062
|
+
type index_d_GetAppContributorsRequest = GetAppContributorsRequest;
|
|
4063
|
+
type index_d_GetAppContributorsResponse = GetAppContributorsResponse;
|
|
4064
|
+
type index_d_GetContributorsQuotaRequest = GetContributorsQuotaRequest;
|
|
4065
|
+
type index_d_GetContributorsQuotaResponse = GetContributorsQuotaResponse;
|
|
4066
|
+
type index_d_GetCurrentUserRolesRequest = GetCurrentUserRolesRequest;
|
|
4067
|
+
type index_d_GetCurrentUserRolesResponse = GetCurrentUserRolesResponse;
|
|
4068
|
+
type index_d_GetSiteContributorsRequest = GetSiteContributorsRequest;
|
|
4069
|
+
type index_d_GetSiteContributorsResponse = GetSiteContributorsResponse;
|
|
4070
|
+
type index_d_GetSiteContributorsV2Request = GetSiteContributorsV2Request;
|
|
4071
|
+
type index_d_GetSiteContributorsV2Response = GetSiteContributorsV2Response;
|
|
4072
|
+
type index_d_HandleSiteTransferRequest = HandleSiteTransferRequest;
|
|
4073
|
+
type index_d_HandleSiteTransferResponse = HandleSiteTransferResponse;
|
|
4074
|
+
type index_d_InviteStatus = InviteStatus;
|
|
4075
|
+
declare const index_d_InviteStatus: typeof InviteStatus;
|
|
4076
|
+
type index_d_LimitedOptions = LimitedOptions;
|
|
4077
|
+
type index_d_LocalizedRole = LocalizedRole;
|
|
4078
|
+
type index_d_Name = Name;
|
|
4079
|
+
type index_d_PendingOwner = PendingOwner;
|
|
4080
|
+
type index_d_PersonMetaData = PersonMetaData;
|
|
4081
|
+
type index_d_Policy = Policy;
|
|
4082
|
+
type index_d_PredefinedRole = PredefinedRole;
|
|
4083
|
+
type index_d_PredefinedRoles = PredefinedRoles;
|
|
4084
|
+
type index_d_QuerySiteContributorsFilter = QuerySiteContributorsFilter;
|
|
4085
|
+
type index_d_QuerySiteContributorsOptions = QuerySiteContributorsOptions;
|
|
4086
|
+
type index_d_QuerySiteContributorsRequest = QuerySiteContributorsRequest;
|
|
4087
|
+
type index_d_QuerySiteContributorsResponse = QuerySiteContributorsResponse;
|
|
4088
|
+
type index_d_Resource = Resource;
|
|
4089
|
+
type index_d_ResourceType = ResourceType;
|
|
4090
|
+
declare const index_d_ResourceType: typeof ResourceType;
|
|
4091
|
+
type index_d_Restriction = Restriction;
|
|
4092
|
+
type index_d_RestrictionRestrictionsOneOf = RestrictionRestrictionsOneOf;
|
|
4093
|
+
type index_d_Role = Role;
|
|
4094
|
+
type index_d_SiteInvite = SiteInvite;
|
|
4095
|
+
type index_d_SiteRestriction = SiteRestriction;
|
|
4096
|
+
type index_d_SiteRoleAssignment = SiteRoleAssignment;
|
|
4097
|
+
type index_d_Subject = Subject;
|
|
4098
|
+
type index_d_SubjectContext = SubjectContext;
|
|
4099
|
+
type index_d_SubjectContextType = SubjectContextType;
|
|
4100
|
+
declare const index_d_SubjectContextType: typeof SubjectContextType;
|
|
4101
|
+
type index_d_SubjectType = SubjectType;
|
|
4102
|
+
declare const index_d_SubjectType: typeof SubjectType;
|
|
4103
|
+
type index_d_Team = Team;
|
|
4104
|
+
type index_d_Type = Type;
|
|
4105
|
+
declare const index_d_Type: typeof Type;
|
|
4106
|
+
type index_d_User = User;
|
|
4107
|
+
type index_d_UserLocalizedRoles = UserLocalizedRoles;
|
|
4108
|
+
type index_d_UserSubject = UserSubject;
|
|
4109
|
+
declare const index_d_changeRole: typeof changeRole;
|
|
4110
|
+
declare const index_d_querySiteContributors: typeof querySiteContributors;
|
|
4111
|
+
declare namespace index_d {
|
|
4112
|
+
export { type index_d_AccountInfo as AccountInfo, type index_d_AppInvite as AppInvite, type index_d_AssignedPolicy as AssignedPolicy, type index_d_Assignment as Assignment, type index_d_BulkGetUserRolesOnSiteRequest as BulkGetUserRolesOnSiteRequest, type index_d_BulkGetUserRolesOnSiteResponse as BulkGetUserRolesOnSiteResponse, type index_d_ChangeContributorRoleRequest as ChangeContributorRoleRequest, type index_d_ChangeContributorRoleResponse as ChangeContributorRoleResponse, type index_d_ChangeContributorRoleResponseNonNullableFields as ChangeContributorRoleResponseNonNullableFields, type index_d_ChangeRoleOptions as ChangeRoleOptions, type index_d_CompanionResource as CompanionResource, type index_d_Condition as Condition, index_d_ConditionAttributeType as ConditionAttributeType, type index_d_Conditions as Conditions, type index_d_Contributor as Contributor, type index_d_ContributorLimit as ContributorLimit, type index_d_ContributorV2 as ContributorV2, type index_d_ContributorsQuota as ContributorsQuota, type index_d_ContributorsQuotaOptionsOneOf as ContributorsQuotaOptionsOneOf, index_d_FieldSet as FieldSet, type index_d_GetAppContributorsRequest as GetAppContributorsRequest, type index_d_GetAppContributorsResponse as GetAppContributorsResponse, type index_d_GetContributorsQuotaRequest as GetContributorsQuotaRequest, type index_d_GetContributorsQuotaResponse as GetContributorsQuotaResponse, type index_d_GetCurrentUserRolesRequest as GetCurrentUserRolesRequest, type index_d_GetCurrentUserRolesResponse as GetCurrentUserRolesResponse, type index_d_GetSiteContributorsRequest as GetSiteContributorsRequest, type index_d_GetSiteContributorsResponse as GetSiteContributorsResponse, type index_d_GetSiteContributorsV2Request as GetSiteContributorsV2Request, type index_d_GetSiteContributorsV2Response as GetSiteContributorsV2Response, type index_d_HandleSiteTransferRequest as HandleSiteTransferRequest, type index_d_HandleSiteTransferResponse as HandleSiteTransferResponse, index_d_InviteStatus as InviteStatus, type index_d_LimitedOptions as LimitedOptions, type index_d_LocalizedRole as LocalizedRole, type index_d_Name as Name, type index_d_PendingOwner as PendingOwner, type index_d_PersonMetaData as PersonMetaData, type index_d_Policy as Policy, type index_d_PredefinedRole as PredefinedRole, type index_d_PredefinedRoles as PredefinedRoles, type index_d_QuerySiteContributorsFilter as QuerySiteContributorsFilter, type index_d_QuerySiteContributorsOptions as QuerySiteContributorsOptions, type index_d_QuerySiteContributorsRequest as QuerySiteContributorsRequest, type index_d_QuerySiteContributorsResponse as QuerySiteContributorsResponse, type index_d_Resource as Resource, index_d_ResourceType as ResourceType, type index_d_Restriction as Restriction, type index_d_RestrictionRestrictionsOneOf as RestrictionRestrictionsOneOf, type index_d_Role as Role, type index_d_SiteInvite as SiteInvite, type index_d_SiteRestriction as SiteRestriction, type index_d_SiteRoleAssignment as SiteRoleAssignment, type index_d_Subject as Subject, type index_d_SubjectContext as SubjectContext, index_d_SubjectContextType as SubjectContextType, index_d_SubjectType as SubjectType, type index_d_Team as Team, index_d_Type as Type, type index_d_User as User, type index_d_UserLocalizedRoles as UserLocalizedRoles, type index_d_UserSubject as UserSubject, index_d_changeRole as changeRole, index_d_querySiteContributors as querySiteContributors };
|
|
4113
|
+
}
|
|
4114
|
+
|
|
4115
|
+
export { index_d$3 as accountInvite, index_d$6 as authentication, index_d$1 as oauth, index_d$5 as recovery, index_d as rolesManagement, index_d$2 as siteInvite, index_d$4 as verification };
|