@wix/identity 1.0.85 → 1.0.87
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 +4 -0
- package/build/cjs/context.js +6 -1
- package/build/cjs/context.js.map +1 -0
- package/build/cjs/index.d.ts +9 -4
- package/build/cjs/index.js +18 -5
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/meta.d.ts +4 -0
- package/build/cjs/meta.js +6 -1
- package/build/cjs/meta.js.map +1 -0
- package/build/es/context.d.ts +4 -0
- package/build/es/context.js +5 -0
- package/build/es/context.js.map +1 -0
- package/build/es/index.d.ts +9 -4
- package/build/es/index.js +10 -4
- package/build/es/index.js.map +1 -0
- package/build/es/meta.d.ts +4 -0
- package/build/es/meta.js +5 -0
- package/build/es/meta.js.map +1 -0
- package/context/package.json +2 -1
- package/meta/package.json +2 -1
- package/package.json +19 -9
- package/type-bundles/context.bundle.d.ts +4610 -0
- package/type-bundles/index.bundle.d.ts +4610 -0
- package/type-bundles/meta.bundle.d.ts +4413 -0
|
@@ -0,0 +1,4610 @@
|
|
|
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
|
+
/** slug */
|
|
549
|
+
slug?: string | null;
|
|
550
|
+
}
|
|
551
|
+
declare enum PrivacyStatus$2 {
|
|
552
|
+
UNDEFINED = "UNDEFINED",
|
|
553
|
+
PUBLIC = "PUBLIC",
|
|
554
|
+
PRIVATE = "PRIVATE"
|
|
555
|
+
}
|
|
556
|
+
interface CustomField$2 {
|
|
557
|
+
/**
|
|
558
|
+
* Custom field name. The name must match one of the key properties of the objects returned by
|
|
559
|
+
* [`List Extended Fields`](https://dev.wix.com/docs/rest/api-reference/contacts/extended-fields/list-extended-fields)
|
|
560
|
+
* with the `custom.` prefix removed.
|
|
561
|
+
*/
|
|
562
|
+
name?: string;
|
|
563
|
+
/** Custom field value. */
|
|
564
|
+
value?: V1CustomValue$2;
|
|
565
|
+
}
|
|
566
|
+
interface V1CustomValue$2 extends V1CustomValueValueOneOf$2 {
|
|
567
|
+
/** String value. */
|
|
568
|
+
strValue?: string;
|
|
569
|
+
/** Number value. */
|
|
570
|
+
numValue?: number;
|
|
571
|
+
/** Date value. */
|
|
572
|
+
dateValue?: Date | null;
|
|
573
|
+
/** List value. */
|
|
574
|
+
listValue?: V1ListValue$2;
|
|
575
|
+
/** Map value. */
|
|
576
|
+
mapValue?: V1MapValue$2;
|
|
577
|
+
}
|
|
578
|
+
/** @oneof */
|
|
579
|
+
interface V1CustomValueValueOneOf$2 {
|
|
580
|
+
/** String value. */
|
|
581
|
+
strValue?: string;
|
|
582
|
+
/** Number value. */
|
|
583
|
+
numValue?: number;
|
|
584
|
+
/** Date value. */
|
|
585
|
+
dateValue?: Date | null;
|
|
586
|
+
/** List value. */
|
|
587
|
+
listValue?: V1ListValue$2;
|
|
588
|
+
/** Map value. */
|
|
589
|
+
mapValue?: V1MapValue$2;
|
|
590
|
+
}
|
|
591
|
+
interface V1ListValue$2 {
|
|
592
|
+
/** Custom value. */
|
|
593
|
+
value?: V1CustomValue$2[];
|
|
594
|
+
}
|
|
595
|
+
interface V1MapValue$2 {
|
|
596
|
+
/** Mapped custom value. */
|
|
597
|
+
value?: Record<string, V1CustomValue$2>;
|
|
598
|
+
}
|
|
599
|
+
interface SecondaryEmail$2 {
|
|
600
|
+
/** Email address. */
|
|
601
|
+
email?: string;
|
|
602
|
+
/** Email tag. */
|
|
603
|
+
tag?: EmailTag$2;
|
|
604
|
+
}
|
|
605
|
+
declare enum EmailTag$2 {
|
|
606
|
+
UNTAGGED = "UNTAGGED",
|
|
607
|
+
MAIN = "MAIN",
|
|
608
|
+
HOME = "HOME",
|
|
609
|
+
WORK = "WORK"
|
|
610
|
+
}
|
|
611
|
+
interface Phone$2 {
|
|
612
|
+
/** Phone country code. */
|
|
613
|
+
countryCode?: string | null;
|
|
614
|
+
/** Phone number. */
|
|
615
|
+
phone?: string;
|
|
616
|
+
/** Phone tag. */
|
|
617
|
+
tag?: PhoneTag$2;
|
|
618
|
+
}
|
|
619
|
+
declare enum PhoneTag$2 {
|
|
620
|
+
UNTAGGED = "UNTAGGED",
|
|
621
|
+
MAIN = "MAIN",
|
|
622
|
+
HOME = "HOME",
|
|
623
|
+
MOBILE = "MOBILE",
|
|
624
|
+
WORK = "WORK",
|
|
625
|
+
FAX = "FAX"
|
|
626
|
+
}
|
|
627
|
+
interface AddressWrapper$2 {
|
|
628
|
+
/** Address. */
|
|
629
|
+
address?: Address$2;
|
|
630
|
+
/** Address tag. */
|
|
631
|
+
tag?: AddressTag$2;
|
|
632
|
+
}
|
|
633
|
+
/** Physical address */
|
|
634
|
+
interface Address$2 {
|
|
635
|
+
/** Country code. */
|
|
636
|
+
country?: string | null;
|
|
637
|
+
/** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
|
|
638
|
+
subdivision?: string | null;
|
|
639
|
+
/** City name. */
|
|
640
|
+
city?: string | null;
|
|
641
|
+
/** Zip/postal code. */
|
|
642
|
+
postalCode?: string | null;
|
|
643
|
+
/** Main address line, usually street and number as free text. */
|
|
644
|
+
addressLine1?: string | null;
|
|
645
|
+
/** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
|
|
646
|
+
addressLine2?: string | null;
|
|
647
|
+
}
|
|
648
|
+
declare enum AddressTag$2 {
|
|
649
|
+
UNTAGGED = "UNTAGGED",
|
|
650
|
+
HOME = "HOME",
|
|
651
|
+
WORK = "WORK",
|
|
652
|
+
BILLING = "BILLING",
|
|
653
|
+
SHIPPING = "SHIPPING"
|
|
654
|
+
}
|
|
655
|
+
interface CaptchaToken extends CaptchaTokenTokenOneOf {
|
|
656
|
+
Recaptcha?: string;
|
|
657
|
+
InvisibleRecaptcha?: string;
|
|
658
|
+
NoCaptcha?: string;
|
|
659
|
+
}
|
|
660
|
+
/** @oneof */
|
|
661
|
+
interface CaptchaTokenTokenOneOf {
|
|
662
|
+
Recaptcha?: string;
|
|
663
|
+
InvisibleRecaptcha?: string;
|
|
664
|
+
NoCaptcha?: string;
|
|
665
|
+
}
|
|
666
|
+
interface StateMachineResponse$2 extends StateMachineResponseStateDataOneOf$2 {
|
|
667
|
+
requireMfaData?: RequireMfaData$2;
|
|
668
|
+
mfaChallengeData?: MfaChallengeData$2;
|
|
669
|
+
/** The current state of the login or registration process. */
|
|
670
|
+
state?: StateType$2;
|
|
671
|
+
/** If state is `SUCCESS`, a session token. */
|
|
672
|
+
sessionToken?: string | null;
|
|
673
|
+
/** A token representing the current state of the login or registration process. */
|
|
674
|
+
stateToken?: string | null;
|
|
675
|
+
/** Identing of the current member. */
|
|
676
|
+
identity?: Identity$2;
|
|
677
|
+
/** additional_data = 5; //TBD */
|
|
678
|
+
additionalData?: Record<string, CustomValue$2>;
|
|
679
|
+
}
|
|
680
|
+
/** @oneof */
|
|
681
|
+
interface StateMachineResponseStateDataOneOf$2 {
|
|
682
|
+
requireMfaData?: RequireMfaData$2;
|
|
683
|
+
mfaChallengeData?: MfaChallengeData$2;
|
|
684
|
+
}
|
|
685
|
+
declare enum StateType$2 {
|
|
686
|
+
/** Initial unknown state. */
|
|
687
|
+
UNKNOWN_STATE = "UNKNOWN_STATE",
|
|
688
|
+
/** The operation completed successfully. */
|
|
689
|
+
SUCCESS = "SUCCESS",
|
|
690
|
+
/** State that indicates that the member needs owner approval to proceed, available action in: OwnerApprovalStateHandler */
|
|
691
|
+
REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
|
|
692
|
+
/**
|
|
693
|
+
* State that indicates a member waiting for verification, available action are: verifyDuringAuthentication or resendDuringAuthentication
|
|
694
|
+
* https://dev.wix.com/docs/rest/api-reference/auth-management/verification-v1/verify-during-authentication
|
|
695
|
+
*/
|
|
696
|
+
REQUIRE_EMAIL_VERIFICATION = "REQUIRE_EMAIL_VERIFICATION",
|
|
697
|
+
/** State that indicates checking that the status is not one of the `invalidStates` before proceeding. */
|
|
698
|
+
STATUS_CHECK = "STATUS_CHECK",
|
|
699
|
+
REQUIRE_MFA = "REQUIRE_MFA",
|
|
700
|
+
MFA_CHALLENGE = "MFA_CHALLENGE"
|
|
701
|
+
}
|
|
702
|
+
interface Identity$2 {
|
|
703
|
+
/** Identity ID */
|
|
704
|
+
_id?: string | null;
|
|
705
|
+
/**
|
|
706
|
+
* Represents the current state of an item. Each time the item is modified, its `revision` changes.
|
|
707
|
+
* For an update operation to succeed, you MUST pass the latest revision.
|
|
708
|
+
*/
|
|
709
|
+
revision?: string | null;
|
|
710
|
+
/**
|
|
711
|
+
* The time this identity was created.
|
|
712
|
+
* @readonly
|
|
713
|
+
*/
|
|
714
|
+
_createdDate?: Date | null;
|
|
715
|
+
/**
|
|
716
|
+
* The time this identity was last updated.
|
|
717
|
+
* @readonly
|
|
718
|
+
*/
|
|
719
|
+
_updatedDate?: Date | null;
|
|
720
|
+
/** The identity configured connections to authenticate with. */
|
|
721
|
+
connections?: Connection$2[];
|
|
722
|
+
/** Identity profile. */
|
|
723
|
+
identityProfile?: IdentityProfile$2;
|
|
724
|
+
/**
|
|
725
|
+
* Additional information about the identity that can impact user access.
|
|
726
|
+
* This data cannot be set.
|
|
727
|
+
*/
|
|
728
|
+
metadata?: Metadata$2;
|
|
729
|
+
/** Identity email address. */
|
|
730
|
+
email?: Email$3;
|
|
731
|
+
/** Identity's current status. */
|
|
732
|
+
status?: StatusV2$2;
|
|
733
|
+
/** filled by pre registered spi */
|
|
734
|
+
customAttributes?: Record<string, any> | null;
|
|
735
|
+
/**
|
|
736
|
+
* Identity factors.
|
|
737
|
+
* @readonly
|
|
738
|
+
*/
|
|
739
|
+
factors?: Factor$2[];
|
|
740
|
+
}
|
|
741
|
+
interface Connection$2 extends ConnectionTypeOneOf$2 {
|
|
742
|
+
/** IDP connection. */
|
|
743
|
+
idpConnection?: IdpConnection$2;
|
|
744
|
+
/** Authenticator connection. */
|
|
745
|
+
authenticatorConnection?: AuthenticatorConnection$2;
|
|
746
|
+
}
|
|
747
|
+
/** @oneof */
|
|
748
|
+
interface ConnectionTypeOneOf$2 {
|
|
749
|
+
/** IDP connection. */
|
|
750
|
+
idpConnection?: IdpConnection$2;
|
|
751
|
+
/** Authenticator connection. */
|
|
752
|
+
authenticatorConnection?: AuthenticatorConnection$2;
|
|
753
|
+
}
|
|
754
|
+
interface IdpConnection$2 {
|
|
755
|
+
/** IDP connection ID. */
|
|
756
|
+
idpConnectionId?: string;
|
|
757
|
+
/** IDP user ID. */
|
|
758
|
+
idpUserId?: string;
|
|
759
|
+
}
|
|
760
|
+
interface AuthenticatorConnection$2 {
|
|
761
|
+
/** Authenticator connection ID. */
|
|
762
|
+
authenticatorConnectionId?: string;
|
|
763
|
+
/** Whether re-enrollment is required. */
|
|
764
|
+
reEnrollmentRequired?: boolean;
|
|
765
|
+
}
|
|
766
|
+
interface Metadata$2 {
|
|
767
|
+
/**
|
|
768
|
+
* represents general tags such as "isOwner", "isContributor"
|
|
769
|
+
* @readonly
|
|
770
|
+
*/
|
|
771
|
+
tags?: string[];
|
|
772
|
+
}
|
|
773
|
+
interface Email$3 {
|
|
774
|
+
address?: string;
|
|
775
|
+
isVerified?: boolean;
|
|
776
|
+
}
|
|
777
|
+
interface StatusV2$2 {
|
|
778
|
+
name?: StatusName$2;
|
|
779
|
+
reasons?: Reason$2[];
|
|
780
|
+
}
|
|
781
|
+
declare enum StatusName$2 {
|
|
782
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
783
|
+
PENDING = "PENDING",
|
|
784
|
+
ACTIVE = "ACTIVE",
|
|
785
|
+
DELETED = "DELETED",
|
|
786
|
+
BLOCKED = "BLOCKED",
|
|
787
|
+
OFFLINE = "OFFLINE"
|
|
788
|
+
}
|
|
789
|
+
declare enum Reason$2 {
|
|
790
|
+
UNKNOWN_REASON = "UNKNOWN_REASON",
|
|
791
|
+
PENDING_ADMIN_APPROVAL_REQUIRED = "PENDING_ADMIN_APPROVAL_REQUIRED",
|
|
792
|
+
PENDING_EMAIL_VERIFICATION_REQUIRED = "PENDING_EMAIL_VERIFICATION_REQUIRED"
|
|
793
|
+
}
|
|
794
|
+
interface Factor$2 {
|
|
795
|
+
/** Factor ID. */
|
|
796
|
+
factorId?: string;
|
|
797
|
+
/** Factor type. */
|
|
798
|
+
type?: FactorType$2;
|
|
799
|
+
/** Factor status. */
|
|
800
|
+
status?: Status$2;
|
|
801
|
+
}
|
|
802
|
+
declare enum FactorType$2 {
|
|
803
|
+
UNKNOWN_FACTOR_TYPE = "UNKNOWN_FACTOR_TYPE",
|
|
804
|
+
PASSWORD = "PASSWORD",
|
|
805
|
+
SMS = "SMS",
|
|
806
|
+
CALL = "CALL",
|
|
807
|
+
EMAIL = "EMAIL",
|
|
808
|
+
TOTP = "TOTP",
|
|
809
|
+
PUSH = "PUSH"
|
|
810
|
+
}
|
|
811
|
+
declare enum Status$2 {
|
|
812
|
+
/** Factor requires activation. */
|
|
813
|
+
INACTIVE = "INACTIVE",
|
|
814
|
+
/** Factor is active and can be used for authentication. */
|
|
815
|
+
ACTIVE = "ACTIVE",
|
|
816
|
+
/** Factor is blocked and cannot be used for authentication. The user should reenroll the factor. */
|
|
817
|
+
REQUIRE_REENROLL = "REQUIRE_REENROLL"
|
|
818
|
+
}
|
|
819
|
+
interface CustomValue$2 extends CustomValueValueOneOf$2 {
|
|
820
|
+
/** String value. */
|
|
821
|
+
strValue?: string;
|
|
822
|
+
/** Number value. */
|
|
823
|
+
numValue?: number;
|
|
824
|
+
/** Date value. */
|
|
825
|
+
dateValue?: Date | null;
|
|
826
|
+
/** List value. */
|
|
827
|
+
listValue?: ListValue$2;
|
|
828
|
+
/** Map value. */
|
|
829
|
+
mapValue?: MapValue$2;
|
|
830
|
+
}
|
|
831
|
+
/** @oneof */
|
|
832
|
+
interface CustomValueValueOneOf$2 {
|
|
833
|
+
/** String value. */
|
|
834
|
+
strValue?: string;
|
|
835
|
+
/** Number value. */
|
|
836
|
+
numValue?: number;
|
|
837
|
+
/** Date value. */
|
|
838
|
+
dateValue?: Date | null;
|
|
839
|
+
/** List value. */
|
|
840
|
+
listValue?: ListValue$2;
|
|
841
|
+
/** Map value. */
|
|
842
|
+
mapValue?: MapValue$2;
|
|
843
|
+
}
|
|
844
|
+
interface ListValue$2 {
|
|
845
|
+
/** Custom value. */
|
|
846
|
+
value?: CustomValue$2[];
|
|
847
|
+
}
|
|
848
|
+
interface MapValue$2 {
|
|
849
|
+
/** Mapped custom value. */
|
|
850
|
+
value?: Record<string, CustomValue$2>;
|
|
851
|
+
}
|
|
852
|
+
interface RequireMfaData$2 {
|
|
853
|
+
availableFactors?: V1Factor$2[];
|
|
854
|
+
}
|
|
855
|
+
interface V1Factor$2 {
|
|
856
|
+
factorType?: FactorType$2;
|
|
857
|
+
}
|
|
858
|
+
interface MfaChallengeData$2 {
|
|
859
|
+
factorType?: FactorType$2;
|
|
860
|
+
verificationChallengeData?: VerificationChallenge$2;
|
|
861
|
+
availableFactors?: V1Factor$2[];
|
|
862
|
+
}
|
|
863
|
+
interface VerificationChallenge$2 {
|
|
864
|
+
hint?: string | null;
|
|
865
|
+
}
|
|
866
|
+
interface LoginV2Request {
|
|
867
|
+
/** Identifier of identity logging in. */
|
|
868
|
+
loginId: LoginId;
|
|
869
|
+
/** Password of the identity logging in. */
|
|
870
|
+
password?: string;
|
|
871
|
+
/** CAPTCHA tokens, when CAPTCHA setting is on. */
|
|
872
|
+
captchaTokens?: CaptchaToken[];
|
|
873
|
+
/** Additional data, relevant for the flow. */
|
|
874
|
+
clientMetaData?: Record<string, any> | null;
|
|
875
|
+
}
|
|
876
|
+
interface ChangePasswordRequest {
|
|
877
|
+
/** The new password to set for the logged in user */
|
|
878
|
+
newPassword: string;
|
|
879
|
+
}
|
|
880
|
+
interface ChangePasswordResponse {
|
|
881
|
+
}
|
|
882
|
+
interface LoginWithIdpConnectionRequest {
|
|
883
|
+
/** The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData */
|
|
884
|
+
idpConnectionId: string;
|
|
885
|
+
/** The id of the tenant the caller wants to login into */
|
|
886
|
+
tenantId: string;
|
|
887
|
+
/** The type of the tenant the caller wants to login into */
|
|
888
|
+
tenantType: TenantType$1;
|
|
889
|
+
customPayload?: Record<string, string>;
|
|
890
|
+
/**
|
|
891
|
+
* This flow ultimately returns an HTML page that asynchronously posts the LoginResponse via the BroadcastChannel API.
|
|
892
|
+
* The message will be posted to a channel named `wix-idp-$session_id`, and encrypted with the `encryption_key`.
|
|
893
|
+
* Encryption key should be base64 encoded. Encryption is done using AES-GCM with a random IV that's sent alongside the payload
|
|
894
|
+
*/
|
|
895
|
+
sessionId: string;
|
|
896
|
+
encryptionKey: string;
|
|
897
|
+
visitorId?: string | null;
|
|
898
|
+
bsi?: string | null;
|
|
899
|
+
}
|
|
900
|
+
declare enum TenantType$1 {
|
|
901
|
+
UNKNOWN_TENANT_TYPE = "UNKNOWN_TENANT_TYPE",
|
|
902
|
+
ACCOUNT = "ACCOUNT",
|
|
903
|
+
SITE = "SITE",
|
|
904
|
+
ROOT = "ROOT"
|
|
905
|
+
}
|
|
906
|
+
interface RawHttpResponse$1 {
|
|
907
|
+
body?: Uint8Array;
|
|
908
|
+
statusCode?: number | null;
|
|
909
|
+
headers?: HeadersEntry$1[];
|
|
910
|
+
}
|
|
911
|
+
interface HeadersEntry$1 {
|
|
912
|
+
key?: string;
|
|
913
|
+
value?: string;
|
|
914
|
+
}
|
|
915
|
+
interface RawHttpRequest$1 {
|
|
916
|
+
body?: Uint8Array;
|
|
917
|
+
pathParams?: PathParametersEntry$1[];
|
|
918
|
+
queryParams?: QueryParametersEntry$1[];
|
|
919
|
+
headers?: HeadersEntry$1[];
|
|
920
|
+
method?: string;
|
|
921
|
+
rawPath?: string;
|
|
922
|
+
rawQuery?: string;
|
|
923
|
+
}
|
|
924
|
+
interface PathParametersEntry$1 {
|
|
925
|
+
key?: string;
|
|
926
|
+
value?: string;
|
|
927
|
+
}
|
|
928
|
+
interface QueryParametersEntry$1 {
|
|
929
|
+
key?: string;
|
|
930
|
+
value?: string;
|
|
931
|
+
}
|
|
932
|
+
interface LoginCallbackRequest {
|
|
933
|
+
/** state that that received on the redirect */
|
|
934
|
+
state?: string;
|
|
935
|
+
/** session token */
|
|
936
|
+
sessionToken?: string;
|
|
937
|
+
}
|
|
938
|
+
interface LoginWithIdpConnectionTokenParamsRequest {
|
|
939
|
+
/** The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData */
|
|
940
|
+
idpConnectionId?: string;
|
|
941
|
+
/** A set of fields that are required for the connection to be able to identify and authenticate the user */
|
|
942
|
+
tokenParams?: Record<string, string>;
|
|
943
|
+
}
|
|
944
|
+
interface SignOnRequest {
|
|
945
|
+
/** the identifier of the identity */
|
|
946
|
+
loginId: LoginId;
|
|
947
|
+
/** profile of the identity */
|
|
948
|
+
profile?: IdentityProfile$2;
|
|
949
|
+
/** when true will mark the email of the identity as verified */
|
|
950
|
+
verifyEmail?: boolean;
|
|
951
|
+
/** when false will create a new contact instead of merging the existing contact into the identity */
|
|
952
|
+
mergeExistingContact?: boolean;
|
|
953
|
+
}
|
|
954
|
+
interface SignOnResponse {
|
|
955
|
+
/** session token for the requested identity */
|
|
956
|
+
sessionToken?: string;
|
|
957
|
+
/** The Identity of the provided login_id */
|
|
958
|
+
identity?: Identity$2;
|
|
959
|
+
}
|
|
960
|
+
/** logout request payload */
|
|
961
|
+
interface LogoutRequest {
|
|
962
|
+
/** redirect after logout */
|
|
963
|
+
postLogoutRedirectUri?: string | null;
|
|
964
|
+
/** caller identifier */
|
|
965
|
+
clientId?: string | null;
|
|
966
|
+
}
|
|
967
|
+
interface VerifyRequest$1 extends VerifyRequestFactorDataOneOf {
|
|
968
|
+
smsData?: OtpVerificationData;
|
|
969
|
+
callData?: OtpVerificationData;
|
|
970
|
+
emailData?: OtpVerificationData;
|
|
971
|
+
totpData?: OtpVerificationData;
|
|
972
|
+
/** TODO: is this a reasonable maxLength? */
|
|
973
|
+
stateToken?: string;
|
|
974
|
+
factorType: FactorType$2;
|
|
975
|
+
rememberThisDevice?: boolean;
|
|
976
|
+
}
|
|
977
|
+
/** @oneof */
|
|
978
|
+
interface VerifyRequestFactorDataOneOf {
|
|
979
|
+
smsData?: OtpVerificationData;
|
|
980
|
+
callData?: OtpVerificationData;
|
|
981
|
+
emailData?: OtpVerificationData;
|
|
982
|
+
totpData?: OtpVerificationData;
|
|
983
|
+
}
|
|
984
|
+
interface OtpVerificationData {
|
|
985
|
+
code?: string | null;
|
|
986
|
+
}
|
|
987
|
+
interface V1FactorNonNullableFields$2 {
|
|
988
|
+
factorType: FactorType$2;
|
|
989
|
+
}
|
|
990
|
+
interface RequireMfaDataNonNullableFields$2 {
|
|
991
|
+
availableFactors: V1FactorNonNullableFields$2[];
|
|
992
|
+
}
|
|
993
|
+
interface MfaChallengeDataNonNullableFields$2 {
|
|
994
|
+
factorType: FactorType$2;
|
|
995
|
+
availableFactors: V1FactorNonNullableFields$2[];
|
|
996
|
+
}
|
|
997
|
+
interface IdpConnectionNonNullableFields$2 {
|
|
998
|
+
idpConnectionId: string;
|
|
999
|
+
idpUserId: string;
|
|
1000
|
+
}
|
|
1001
|
+
interface AuthenticatorConnectionNonNullableFields$2 {
|
|
1002
|
+
authenticatorConnectionId: string;
|
|
1003
|
+
reEnrollmentRequired: boolean;
|
|
1004
|
+
}
|
|
1005
|
+
interface ConnectionNonNullableFields$2 {
|
|
1006
|
+
idpConnection?: IdpConnectionNonNullableFields$2;
|
|
1007
|
+
authenticatorConnection?: AuthenticatorConnectionNonNullableFields$2;
|
|
1008
|
+
}
|
|
1009
|
+
interface V1ListValueNonNullableFields$2 {
|
|
1010
|
+
value: V1CustomValueNonNullableFields$2[];
|
|
1011
|
+
}
|
|
1012
|
+
interface V1CustomValueNonNullableFields$2 {
|
|
1013
|
+
strValue: string;
|
|
1014
|
+
numValue: number;
|
|
1015
|
+
listValue?: V1ListValueNonNullableFields$2;
|
|
1016
|
+
}
|
|
1017
|
+
interface CustomFieldNonNullableFields$2 {
|
|
1018
|
+
name: string;
|
|
1019
|
+
value?: V1CustomValueNonNullableFields$2;
|
|
1020
|
+
}
|
|
1021
|
+
interface SecondaryEmailNonNullableFields$2 {
|
|
1022
|
+
email: string;
|
|
1023
|
+
tag: EmailTag$2;
|
|
1024
|
+
}
|
|
1025
|
+
interface PhoneNonNullableFields$2 {
|
|
1026
|
+
phone: string;
|
|
1027
|
+
tag: PhoneTag$2;
|
|
1028
|
+
}
|
|
1029
|
+
interface AddressWrapperNonNullableFields$2 {
|
|
1030
|
+
tag: AddressTag$2;
|
|
1031
|
+
}
|
|
1032
|
+
interface IdentityProfileNonNullableFields$2 {
|
|
1033
|
+
emails: string[];
|
|
1034
|
+
phones: string[];
|
|
1035
|
+
labels: string[];
|
|
1036
|
+
privacyStatus: PrivacyStatus$2;
|
|
1037
|
+
customFields: CustomFieldNonNullableFields$2[];
|
|
1038
|
+
secondaryEmails: SecondaryEmailNonNullableFields$2[];
|
|
1039
|
+
phonesV2: PhoneNonNullableFields$2[];
|
|
1040
|
+
addresses: AddressWrapperNonNullableFields$2[];
|
|
1041
|
+
}
|
|
1042
|
+
interface MetadataNonNullableFields$2 {
|
|
1043
|
+
tags: string[];
|
|
1044
|
+
}
|
|
1045
|
+
interface EmailNonNullableFields$2 {
|
|
1046
|
+
address: string;
|
|
1047
|
+
isVerified: boolean;
|
|
1048
|
+
}
|
|
1049
|
+
interface StatusV2NonNullableFields$2 {
|
|
1050
|
+
name: StatusName$2;
|
|
1051
|
+
reasons: Reason$2[];
|
|
1052
|
+
}
|
|
1053
|
+
interface FactorNonNullableFields$2 {
|
|
1054
|
+
factorId: string;
|
|
1055
|
+
type: FactorType$2;
|
|
1056
|
+
status: Status$2;
|
|
1057
|
+
}
|
|
1058
|
+
interface IdentityNonNullableFields$2 {
|
|
1059
|
+
connections: ConnectionNonNullableFields$2[];
|
|
1060
|
+
identityProfile?: IdentityProfileNonNullableFields$2;
|
|
1061
|
+
metadata?: MetadataNonNullableFields$2;
|
|
1062
|
+
email?: EmailNonNullableFields$2;
|
|
1063
|
+
status?: StatusV2NonNullableFields$2;
|
|
1064
|
+
factors: FactorNonNullableFields$2[];
|
|
1065
|
+
}
|
|
1066
|
+
interface StateMachineResponseNonNullableFields$2 {
|
|
1067
|
+
requireMfaData?: RequireMfaDataNonNullableFields$2;
|
|
1068
|
+
mfaChallengeData?: MfaChallengeDataNonNullableFields$2;
|
|
1069
|
+
state: StateType$2;
|
|
1070
|
+
identity?: IdentityNonNullableFields$2;
|
|
1071
|
+
}
|
|
1072
|
+
interface HeadersEntryNonNullableFields$1 {
|
|
1073
|
+
key: string;
|
|
1074
|
+
value: string;
|
|
1075
|
+
}
|
|
1076
|
+
interface RawHttpResponseNonNullableFields$1 {
|
|
1077
|
+
body: Uint8Array;
|
|
1078
|
+
headers: HeadersEntryNonNullableFields$1[];
|
|
1079
|
+
}
|
|
1080
|
+
interface SignOnResponseNonNullableFields {
|
|
1081
|
+
sessionToken: string;
|
|
1082
|
+
identity?: IdentityNonNullableFields$2;
|
|
1083
|
+
}
|
|
1084
|
+
interface RegisterV2Options {
|
|
1085
|
+
/** Password of registering member. */
|
|
1086
|
+
password?: string;
|
|
1087
|
+
/** Profile information of registering member. */
|
|
1088
|
+
profile?: IdentityProfile$2;
|
|
1089
|
+
/** CAPTCHA tokens, when CAPTCHA setting is on. */
|
|
1090
|
+
captchaTokens?: CaptchaToken[];
|
|
1091
|
+
/** Additional data, relevant for the flow. */
|
|
1092
|
+
clientMetaData?: Record<string, any> | null;
|
|
1093
|
+
}
|
|
1094
|
+
interface LoginV2Options {
|
|
1095
|
+
/** Password of the identity logging in. */
|
|
1096
|
+
password?: string;
|
|
1097
|
+
/** CAPTCHA tokens, when CAPTCHA setting is on. */
|
|
1098
|
+
captchaTokens?: CaptchaToken[];
|
|
1099
|
+
/** Additional data, relevant for the flow. */
|
|
1100
|
+
clientMetaData?: Record<string, any> | null;
|
|
1101
|
+
}
|
|
1102
|
+
interface LoginWithIdpConnectionIdentifiers {
|
|
1103
|
+
/** The id of the tenant the caller wants to login into */
|
|
1104
|
+
tenantId: string;
|
|
1105
|
+
/** The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData */
|
|
1106
|
+
idpConnectionId: string;
|
|
1107
|
+
}
|
|
1108
|
+
interface LoginWithIdpConnectionOptions {
|
|
1109
|
+
customPayload?: Record<string, string>;
|
|
1110
|
+
/**
|
|
1111
|
+
* This flow ultimately returns an HTML page that asynchronously posts the LoginResponse via the BroadcastChannel API.
|
|
1112
|
+
* The message will be posted to a channel named `wix-idp-$session_id`, and encrypted with the `encryption_key`.
|
|
1113
|
+
* Encryption key should be base64 encoded. Encryption is done using AES-GCM with a random IV that's sent alongside the payload
|
|
1114
|
+
*/
|
|
1115
|
+
sessionId: string;
|
|
1116
|
+
encryptionKey: string;
|
|
1117
|
+
visitorId?: string | null;
|
|
1118
|
+
bsi?: string | null;
|
|
1119
|
+
}
|
|
1120
|
+
interface LoginCallbackOptions {
|
|
1121
|
+
/** state that that received on the redirect */
|
|
1122
|
+
state?: string;
|
|
1123
|
+
/** session token */
|
|
1124
|
+
sessionToken?: string;
|
|
1125
|
+
}
|
|
1126
|
+
interface LoginWithIdpConnectionTokenParamsOptions {
|
|
1127
|
+
/** The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData */
|
|
1128
|
+
idpConnectionId?: string;
|
|
1129
|
+
/** A set of fields that are required for the connection to be able to identify and authenticate the user */
|
|
1130
|
+
tokenParams?: Record<string, string>;
|
|
1131
|
+
}
|
|
1132
|
+
interface SignOnOptions {
|
|
1133
|
+
/** profile of the identity */
|
|
1134
|
+
profile?: IdentityProfile$2;
|
|
1135
|
+
/** when true will mark the email of the identity as verified */
|
|
1136
|
+
verifyEmail?: boolean;
|
|
1137
|
+
/** when false will create a new contact instead of merging the existing contact into the identity */
|
|
1138
|
+
mergeExistingContact?: boolean;
|
|
1139
|
+
}
|
|
1140
|
+
interface LogoutOptions {
|
|
1141
|
+
/** redirect after logout */
|
|
1142
|
+
postLogoutRedirectUri?: string | null;
|
|
1143
|
+
/** caller identifier */
|
|
1144
|
+
clientId?: string | null;
|
|
1145
|
+
}
|
|
1146
|
+
interface VerifyOptions extends VerifyRequestFactorDataOneOf {
|
|
1147
|
+
/** TODO: is this a reasonable maxLength? */
|
|
1148
|
+
stateToken?: string;
|
|
1149
|
+
rememberThisDevice?: boolean;
|
|
1150
|
+
smsData?: OtpVerificationData;
|
|
1151
|
+
callData?: OtpVerificationData;
|
|
1152
|
+
emailData?: OtpVerificationData;
|
|
1153
|
+
totpData?: OtpVerificationData;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
declare function registerV2$1(httpClient: HttpClient): RegisterV2Signature;
|
|
1157
|
+
interface RegisterV2Signature {
|
|
1158
|
+
/**
|
|
1159
|
+
* Registers a new member.
|
|
1160
|
+
*
|
|
1161
|
+
* Typically, after a sucessful registration, you generate and use member tokens for the
|
|
1162
|
+
* registered member so that subsequent API calls are called as part of a member session.
|
|
1163
|
+
*
|
|
1164
|
+
* If the email used to register the member already exists as a contact email, the registering
|
|
1165
|
+
* member need to verify the email address using a code that is sent to the address.
|
|
1166
|
+
* @param - Identifier of registering member.
|
|
1167
|
+
*/
|
|
1168
|
+
(loginId: LoginId, options?: RegisterV2Options | undefined): Promise<StateMachineResponse$2 & StateMachineResponseNonNullableFields$2>;
|
|
1169
|
+
}
|
|
1170
|
+
declare function loginV2$1(httpClient: HttpClient): LoginV2Signature;
|
|
1171
|
+
interface LoginV2Signature {
|
|
1172
|
+
/**
|
|
1173
|
+
* Logs in an existing user.
|
|
1174
|
+
*
|
|
1175
|
+
* Typically, after a sucessful login, you generate and use member tokens for the
|
|
1176
|
+
* logged-in member so that subsequent API calls are called as part of a member session.
|
|
1177
|
+
* @param - Identifier of identity logging in.
|
|
1178
|
+
*/
|
|
1179
|
+
(loginId: LoginId, options?: LoginV2Options | undefined): Promise<StateMachineResponse$2 & StateMachineResponseNonNullableFields$2>;
|
|
1180
|
+
}
|
|
1181
|
+
declare function changePassword$1(httpClient: HttpClient): ChangePasswordSignature;
|
|
1182
|
+
interface ChangePasswordSignature {
|
|
1183
|
+
/**
|
|
1184
|
+
* Changes the password of a logged in user.
|
|
1185
|
+
* @param - The new password to set for the logged in user
|
|
1186
|
+
*/
|
|
1187
|
+
(newPassword: string): Promise<void>;
|
|
1188
|
+
}
|
|
1189
|
+
declare function loginWithIdpConnection$1(httpClient: HttpClient): LoginWithIdpConnectionSignature;
|
|
1190
|
+
interface LoginWithIdpConnectionSignature {
|
|
1191
|
+
/** @param - The type of the tenant the caller wants to login into */
|
|
1192
|
+
(identifiers: LoginWithIdpConnectionIdentifiers, tenantType: TenantType$1, options?: LoginWithIdpConnectionOptions | undefined): Promise<RawHttpResponse$1 & RawHttpResponseNonNullableFields$1>;
|
|
1193
|
+
}
|
|
1194
|
+
declare function loginCallback$1(httpClient: HttpClient): LoginCallbackSignature;
|
|
1195
|
+
interface LoginCallbackSignature {
|
|
1196
|
+
/** */
|
|
1197
|
+
(options?: LoginCallbackOptions | undefined): Promise<RawHttpResponse$1 & RawHttpResponseNonNullableFields$1>;
|
|
1198
|
+
}
|
|
1199
|
+
declare function loginWithIdpConnectionTokenParams$1(httpClient: HttpClient): LoginWithIdpConnectionTokenParamsSignature;
|
|
1200
|
+
interface LoginWithIdpConnectionTokenParamsSignature {
|
|
1201
|
+
/** */
|
|
1202
|
+
(options?: LoginWithIdpConnectionTokenParamsOptions | undefined): Promise<StateMachineResponse$2 & StateMachineResponseNonNullableFields$2>;
|
|
1203
|
+
}
|
|
1204
|
+
declare function signOn$1(httpClient: HttpClient): SignOnSignature;
|
|
1205
|
+
interface SignOnSignature {
|
|
1206
|
+
/** @param - the identifier of the identity */
|
|
1207
|
+
(loginId: LoginId, options?: SignOnOptions | undefined): Promise<SignOnResponse & SignOnResponseNonNullableFields>;
|
|
1208
|
+
}
|
|
1209
|
+
declare function logout$1(httpClient: HttpClient): LogoutSignature;
|
|
1210
|
+
interface LogoutSignature {
|
|
1211
|
+
/**
|
|
1212
|
+
* Logs out a member.
|
|
1213
|
+
*/
|
|
1214
|
+
(options?: LogoutOptions | undefined): Promise<RawHttpResponse$1 & RawHttpResponseNonNullableFields$1>;
|
|
1215
|
+
}
|
|
1216
|
+
declare function verify$1(httpClient: HttpClient): VerifySignature;
|
|
1217
|
+
interface VerifySignature {
|
|
1218
|
+
/** */
|
|
1219
|
+
(factorType: FactorType$2, options?: VerifyOptions | undefined): Promise<StateMachineResponse$2 & StateMachineResponseNonNullableFields$2>;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
declare const registerV2: MaybeContext<BuildRESTFunction<typeof registerV2$1> & typeof registerV2$1>;
|
|
1223
|
+
declare const loginV2: MaybeContext<BuildRESTFunction<typeof loginV2$1> & typeof loginV2$1>;
|
|
1224
|
+
declare const changePassword: MaybeContext<BuildRESTFunction<typeof changePassword$1> & typeof changePassword$1>;
|
|
1225
|
+
declare const loginWithIdpConnection: MaybeContext<BuildRESTFunction<typeof loginWithIdpConnection$1> & typeof loginWithIdpConnection$1>;
|
|
1226
|
+
declare const loginCallback: MaybeContext<BuildRESTFunction<typeof loginCallback$1> & typeof loginCallback$1>;
|
|
1227
|
+
declare const loginWithIdpConnectionTokenParams: MaybeContext<BuildRESTFunction<typeof loginWithIdpConnectionTokenParams$1> & typeof loginWithIdpConnectionTokenParams$1>;
|
|
1228
|
+
declare const signOn: MaybeContext<BuildRESTFunction<typeof signOn$1> & typeof signOn$1>;
|
|
1229
|
+
declare const logout: MaybeContext<BuildRESTFunction<typeof logout$1> & typeof logout$1>;
|
|
1230
|
+
declare const verify: MaybeContext<BuildRESTFunction<typeof verify$1> & typeof verify$1>;
|
|
1231
|
+
|
|
1232
|
+
type context$7_Authentication = Authentication;
|
|
1233
|
+
type context$7_CaptchaToken = CaptchaToken;
|
|
1234
|
+
type context$7_CaptchaTokenTokenOneOf = CaptchaTokenTokenOneOf;
|
|
1235
|
+
type context$7_ChangePasswordRequest = ChangePasswordRequest;
|
|
1236
|
+
type context$7_ChangePasswordResponse = ChangePasswordResponse;
|
|
1237
|
+
type context$7_LoginCallbackOptions = LoginCallbackOptions;
|
|
1238
|
+
type context$7_LoginCallbackRequest = LoginCallbackRequest;
|
|
1239
|
+
type context$7_LoginId = LoginId;
|
|
1240
|
+
type context$7_LoginIdTypeOneOf = LoginIdTypeOneOf;
|
|
1241
|
+
type context$7_LoginV2Options = LoginV2Options;
|
|
1242
|
+
type context$7_LoginV2Request = LoginV2Request;
|
|
1243
|
+
type context$7_LoginWithIdpConnectionIdentifiers = LoginWithIdpConnectionIdentifiers;
|
|
1244
|
+
type context$7_LoginWithIdpConnectionOptions = LoginWithIdpConnectionOptions;
|
|
1245
|
+
type context$7_LoginWithIdpConnectionRequest = LoginWithIdpConnectionRequest;
|
|
1246
|
+
type context$7_LoginWithIdpConnectionTokenParamsOptions = LoginWithIdpConnectionTokenParamsOptions;
|
|
1247
|
+
type context$7_LoginWithIdpConnectionTokenParamsRequest = LoginWithIdpConnectionTokenParamsRequest;
|
|
1248
|
+
type context$7_LogoutOptions = LogoutOptions;
|
|
1249
|
+
type context$7_LogoutRequest = LogoutRequest;
|
|
1250
|
+
type context$7_OtpVerificationData = OtpVerificationData;
|
|
1251
|
+
type context$7_RegisterV2Options = RegisterV2Options;
|
|
1252
|
+
type context$7_RegisterV2Request = RegisterV2Request;
|
|
1253
|
+
type context$7_SignOnOptions = SignOnOptions;
|
|
1254
|
+
type context$7_SignOnRequest = SignOnRequest;
|
|
1255
|
+
type context$7_SignOnResponse = SignOnResponse;
|
|
1256
|
+
type context$7_SignOnResponseNonNullableFields = SignOnResponseNonNullableFields;
|
|
1257
|
+
type context$7_VerifyOptions = VerifyOptions;
|
|
1258
|
+
type context$7_VerifyRequestFactorDataOneOf = VerifyRequestFactorDataOneOf;
|
|
1259
|
+
declare const context$7_changePassword: typeof changePassword;
|
|
1260
|
+
declare const context$7_loginCallback: typeof loginCallback;
|
|
1261
|
+
declare const context$7_loginV2: typeof loginV2;
|
|
1262
|
+
declare const context$7_loginWithIdpConnection: typeof loginWithIdpConnection;
|
|
1263
|
+
declare const context$7_loginWithIdpConnectionTokenParams: typeof loginWithIdpConnectionTokenParams;
|
|
1264
|
+
declare const context$7_logout: typeof logout;
|
|
1265
|
+
declare const context$7_registerV2: typeof registerV2;
|
|
1266
|
+
declare const context$7_signOn: typeof signOn;
|
|
1267
|
+
declare const context$7_verify: typeof verify;
|
|
1268
|
+
declare namespace context$7 {
|
|
1269
|
+
export { type Address$2 as Address, AddressTag$2 as AddressTag, type AddressWrapper$2 as AddressWrapper, type context$7_Authentication as Authentication, type AuthenticatorConnection$2 as AuthenticatorConnection, type context$7_CaptchaToken as CaptchaToken, type context$7_CaptchaTokenTokenOneOf as CaptchaTokenTokenOneOf, type context$7_ChangePasswordRequest as ChangePasswordRequest, type context$7_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$3 as Email, EmailTag$2 as EmailTag, type Factor$2 as Factor, FactorType$2 as FactorType, type HeadersEntry$1 as HeadersEntry, type Identity$2 as Identity, type IdentityProfile$2 as IdentityProfile, type IdpConnection$2 as IdpConnection, type ListValue$2 as ListValue, type context$7_LoginCallbackOptions as LoginCallbackOptions, type context$7_LoginCallbackRequest as LoginCallbackRequest, type context$7_LoginId as LoginId, type context$7_LoginIdTypeOneOf as LoginIdTypeOneOf, type context$7_LoginV2Options as LoginV2Options, type context$7_LoginV2Request as LoginV2Request, type context$7_LoginWithIdpConnectionIdentifiers as LoginWithIdpConnectionIdentifiers, type context$7_LoginWithIdpConnectionOptions as LoginWithIdpConnectionOptions, type context$7_LoginWithIdpConnectionRequest as LoginWithIdpConnectionRequest, type context$7_LoginWithIdpConnectionTokenParamsOptions as LoginWithIdpConnectionTokenParamsOptions, type context$7_LoginWithIdpConnectionTokenParamsRequest as LoginWithIdpConnectionTokenParamsRequest, type context$7_LogoutOptions as LogoutOptions, type context$7_LogoutRequest as LogoutRequest, type MapValue$2 as MapValue, type Metadata$2 as Metadata, type MfaChallengeData$2 as MfaChallengeData, type context$7_OtpVerificationData as OtpVerificationData, 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 context$7_RegisterV2Options as RegisterV2Options, type context$7_RegisterV2Request as RegisterV2Request, type RequireMfaData$2 as RequireMfaData, type SecondaryEmail$2 as SecondaryEmail, type context$7_SignOnOptions as SignOnOptions, type context$7_SignOnRequest as SignOnRequest, type context$7_SignOnResponse as SignOnResponse, type context$7_SignOnResponseNonNullableFields as SignOnResponseNonNullableFields, type StateMachineResponse$2 as StateMachineResponse, type StateMachineResponseNonNullableFields$2 as StateMachineResponseNonNullableFields, type StateMachineResponseStateDataOneOf$2 as StateMachineResponseStateDataOneOf, 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 V1Factor$2 as V1Factor, type V1ListValue$2 as V1ListValue, type V1MapValue$2 as V1MapValue, type VerificationChallenge$2 as VerificationChallenge, type context$7_VerifyOptions as VerifyOptions, type VerifyRequest$1 as VerifyRequest, type context$7_VerifyRequestFactorDataOneOf as VerifyRequestFactorDataOneOf, context$7_changePassword as changePassword, context$7_loginCallback as loginCallback, context$7_loginV2 as loginV2, context$7_loginWithIdpConnection as loginWithIdpConnection, context$7_loginWithIdpConnectionTokenParams as loginWithIdpConnectionTokenParams, context$7_logout as logout, context$7_registerV2 as registerV2, context$7_signOn as signOn, context$7_verify as verify };
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
/** Recovery token proto is the saved data on the recovery token. */
|
|
1273
|
+
interface RecoveryToken {
|
|
1274
|
+
/**
|
|
1275
|
+
* Recovery token ID
|
|
1276
|
+
* @readonly
|
|
1277
|
+
*/
|
|
1278
|
+
_id?: string | null;
|
|
1279
|
+
/**
|
|
1280
|
+
* Represents the time this SessionToken was created
|
|
1281
|
+
* @readonly
|
|
1282
|
+
*/
|
|
1283
|
+
_createdDate?: Date | null;
|
|
1284
|
+
/**
|
|
1285
|
+
* tenantId
|
|
1286
|
+
* @readonly
|
|
1287
|
+
*/
|
|
1288
|
+
tenantId?: string;
|
|
1289
|
+
/**
|
|
1290
|
+
* TenantType
|
|
1291
|
+
* @readonly
|
|
1292
|
+
*/
|
|
1293
|
+
tenantType?: TenantType;
|
|
1294
|
+
/**
|
|
1295
|
+
* identity id
|
|
1296
|
+
* @readonly
|
|
1297
|
+
*/
|
|
1298
|
+
identityId?: string;
|
|
1299
|
+
}
|
|
1300
|
+
declare enum TenantType {
|
|
1301
|
+
UNKNOWN_TENANT_TYPE = "UNKNOWN_TENANT_TYPE",
|
|
1302
|
+
ACCOUNT = "ACCOUNT",
|
|
1303
|
+
SITE = "SITE",
|
|
1304
|
+
ROOT = "ROOT"
|
|
1305
|
+
}
|
|
1306
|
+
interface SendRecoveryEmailRequest {
|
|
1307
|
+
/** Email address associated with the account to recover. */
|
|
1308
|
+
email: string;
|
|
1309
|
+
/** Language of the email to be sent. Defaults to the language specified in the member's profile. */
|
|
1310
|
+
language?: string | null;
|
|
1311
|
+
/** Where to redirect to after a successful recovery. */
|
|
1312
|
+
redirect?: Redirect;
|
|
1313
|
+
}
|
|
1314
|
+
interface Redirect {
|
|
1315
|
+
/** The URL to redirect to after a successful recovery. */
|
|
1316
|
+
url?: string;
|
|
1317
|
+
/** Caller identifier. */
|
|
1318
|
+
clientId?: string | null;
|
|
1319
|
+
}
|
|
1320
|
+
interface SendRecoveryEmailResponse {
|
|
1321
|
+
}
|
|
1322
|
+
interface SendActivationEmailRequest {
|
|
1323
|
+
/** Id of the activating user */
|
|
1324
|
+
identityId: string;
|
|
1325
|
+
/** Options for the activation email */
|
|
1326
|
+
emailOptions?: EmailOptions;
|
|
1327
|
+
}
|
|
1328
|
+
interface EmailOptions {
|
|
1329
|
+
/** language of the email - if not received will fallback to the identity language */
|
|
1330
|
+
language?: string | null;
|
|
1331
|
+
/** Where to redirect after a successful activation process */
|
|
1332
|
+
redirect?: Redirect;
|
|
1333
|
+
}
|
|
1334
|
+
interface SendActivationEmailResponse {
|
|
1335
|
+
}
|
|
1336
|
+
interface RecoverRequest {
|
|
1337
|
+
/** recovery token */
|
|
1338
|
+
recoveryToken: string;
|
|
1339
|
+
/** new password to set for the identity */
|
|
1340
|
+
password?: string | null;
|
|
1341
|
+
}
|
|
1342
|
+
interface StateMachineResponse$1 extends StateMachineResponseStateDataOneOf$1 {
|
|
1343
|
+
requireMfaData?: RequireMfaData$1;
|
|
1344
|
+
mfaChallengeData?: MfaChallengeData$1;
|
|
1345
|
+
/** The current state of the login or registration process. */
|
|
1346
|
+
state?: StateType$1;
|
|
1347
|
+
/** If state is `SUCCESS`, a session token. */
|
|
1348
|
+
sessionToken?: string | null;
|
|
1349
|
+
/** A token representing the current state of the login or registration process. */
|
|
1350
|
+
stateToken?: string | null;
|
|
1351
|
+
/** Identing of the current member. */
|
|
1352
|
+
identity?: Identity$1;
|
|
1353
|
+
/** additional_data = 5; //TBD */
|
|
1354
|
+
additionalData?: Record<string, CustomValue$1>;
|
|
1355
|
+
}
|
|
1356
|
+
/** @oneof */
|
|
1357
|
+
interface StateMachineResponseStateDataOneOf$1 {
|
|
1358
|
+
requireMfaData?: RequireMfaData$1;
|
|
1359
|
+
mfaChallengeData?: MfaChallengeData$1;
|
|
1360
|
+
}
|
|
1361
|
+
declare enum StateType$1 {
|
|
1362
|
+
/** Initial unknown state. */
|
|
1363
|
+
UNKNOWN_STATE = "UNKNOWN_STATE",
|
|
1364
|
+
/** The operation completed successfully. */
|
|
1365
|
+
SUCCESS = "SUCCESS",
|
|
1366
|
+
/** State that indicates that the member needs owner approval to proceed, available action in: OwnerApprovalStateHandler */
|
|
1367
|
+
REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
|
|
1368
|
+
/**
|
|
1369
|
+
* State that indicates a member waiting for verification, available action are: verifyDuringAuthentication or resendDuringAuthentication
|
|
1370
|
+
* https://dev.wix.com/docs/rest/api-reference/auth-management/verification-v1/verify-during-authentication
|
|
1371
|
+
*/
|
|
1372
|
+
REQUIRE_EMAIL_VERIFICATION = "REQUIRE_EMAIL_VERIFICATION",
|
|
1373
|
+
/** State that indicates checking that the status is not one of the `invalidStates` before proceeding. */
|
|
1374
|
+
STATUS_CHECK = "STATUS_CHECK",
|
|
1375
|
+
REQUIRE_MFA = "REQUIRE_MFA",
|
|
1376
|
+
MFA_CHALLENGE = "MFA_CHALLENGE"
|
|
1377
|
+
}
|
|
1378
|
+
interface Identity$1 {
|
|
1379
|
+
/** Identity ID */
|
|
1380
|
+
_id?: string | null;
|
|
1381
|
+
/**
|
|
1382
|
+
* Represents the current state of an item. Each time the item is modified, its `revision` changes.
|
|
1383
|
+
* For an update operation to succeed, you MUST pass the latest revision.
|
|
1384
|
+
*/
|
|
1385
|
+
revision?: string | null;
|
|
1386
|
+
/**
|
|
1387
|
+
* The time this identity was created.
|
|
1388
|
+
* @readonly
|
|
1389
|
+
*/
|
|
1390
|
+
_createdDate?: Date | null;
|
|
1391
|
+
/**
|
|
1392
|
+
* The time this identity was last updated.
|
|
1393
|
+
* @readonly
|
|
1394
|
+
*/
|
|
1395
|
+
_updatedDate?: Date | null;
|
|
1396
|
+
/** The identity configured connections to authenticate with. */
|
|
1397
|
+
connections?: Connection$1[];
|
|
1398
|
+
/** Identity profile. */
|
|
1399
|
+
identityProfile?: IdentityProfile$1;
|
|
1400
|
+
/**
|
|
1401
|
+
* Additional information about the identity that can impact user access.
|
|
1402
|
+
* This data cannot be set.
|
|
1403
|
+
*/
|
|
1404
|
+
metadata?: Metadata$1;
|
|
1405
|
+
/** Identity email address. */
|
|
1406
|
+
email?: Email$2;
|
|
1407
|
+
/** Identity's current status. */
|
|
1408
|
+
status?: StatusV2$1;
|
|
1409
|
+
/** filled by pre registered spi */
|
|
1410
|
+
customAttributes?: Record<string, any> | null;
|
|
1411
|
+
/**
|
|
1412
|
+
* Identity factors.
|
|
1413
|
+
* @readonly
|
|
1414
|
+
*/
|
|
1415
|
+
factors?: Factor$1[];
|
|
1416
|
+
}
|
|
1417
|
+
interface Connection$1 extends ConnectionTypeOneOf$1 {
|
|
1418
|
+
/** IDP connection. */
|
|
1419
|
+
idpConnection?: IdpConnection$1;
|
|
1420
|
+
/** Authenticator connection. */
|
|
1421
|
+
authenticatorConnection?: AuthenticatorConnection$1;
|
|
1422
|
+
}
|
|
1423
|
+
/** @oneof */
|
|
1424
|
+
interface ConnectionTypeOneOf$1 {
|
|
1425
|
+
/** IDP connection. */
|
|
1426
|
+
idpConnection?: IdpConnection$1;
|
|
1427
|
+
/** Authenticator connection. */
|
|
1428
|
+
authenticatorConnection?: AuthenticatorConnection$1;
|
|
1429
|
+
}
|
|
1430
|
+
interface IdpConnection$1 {
|
|
1431
|
+
/** IDP connection ID. */
|
|
1432
|
+
idpConnectionId?: string;
|
|
1433
|
+
/** IDP user ID. */
|
|
1434
|
+
idpUserId?: string;
|
|
1435
|
+
}
|
|
1436
|
+
interface AuthenticatorConnection$1 {
|
|
1437
|
+
/** Authenticator connection ID. */
|
|
1438
|
+
authenticatorConnectionId?: string;
|
|
1439
|
+
/** Whether re-enrollment is required. */
|
|
1440
|
+
reEnrollmentRequired?: boolean;
|
|
1441
|
+
}
|
|
1442
|
+
interface IdentityProfile$1 {
|
|
1443
|
+
/** Profile first name. */
|
|
1444
|
+
firstName?: string | null;
|
|
1445
|
+
/** Profile last name. */
|
|
1446
|
+
lastName?: string | null;
|
|
1447
|
+
/** Profile nickname. */
|
|
1448
|
+
nickname?: string | null;
|
|
1449
|
+
/** Profile picture URL. */
|
|
1450
|
+
picture?: string | null;
|
|
1451
|
+
/**
|
|
1452
|
+
* Deprecated. Use `secondaryEmails` instead.
|
|
1453
|
+
* @deprecated Deprecated. Use `secondaryEmails` instead.
|
|
1454
|
+
* @replacedBy secondary_emails
|
|
1455
|
+
* @targetRemovalDate 2023-11-01
|
|
1456
|
+
*/
|
|
1457
|
+
emails?: string[];
|
|
1458
|
+
/**
|
|
1459
|
+
* Deprecated. Use `phonesV2` instead.
|
|
1460
|
+
* @deprecated Deprecated. Use `phonesV2` instead.
|
|
1461
|
+
* @replacedBy phones_v2
|
|
1462
|
+
* @targetRemovalDate 2023-11-01
|
|
1463
|
+
*/
|
|
1464
|
+
phones?: string[];
|
|
1465
|
+
/** List of profile labels. */
|
|
1466
|
+
labels?: string[];
|
|
1467
|
+
/** Profile language. */
|
|
1468
|
+
language?: string | null;
|
|
1469
|
+
/** Profile privacy status. */
|
|
1470
|
+
privacyStatus?: PrivacyStatus$1;
|
|
1471
|
+
/**
|
|
1472
|
+
* Any number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts)
|
|
1473
|
+
* are used to store additional information about your site or app's contacts.
|
|
1474
|
+
*/
|
|
1475
|
+
customFields?: CustomField$1[];
|
|
1476
|
+
/** List of profile email addresses. */
|
|
1477
|
+
secondaryEmails?: SecondaryEmail$1[];
|
|
1478
|
+
/** List of profile phone numbers. */
|
|
1479
|
+
phonesV2?: Phone$1[];
|
|
1480
|
+
/** List of profile physical addresses. */
|
|
1481
|
+
addresses?: AddressWrapper$1[];
|
|
1482
|
+
/** Company name. */
|
|
1483
|
+
company?: string | null;
|
|
1484
|
+
/** Position within company. */
|
|
1485
|
+
position?: string | null;
|
|
1486
|
+
/** Profile birthdate - ISO-8601 extended local date format (YYYY-MM-DD). */
|
|
1487
|
+
birthdate?: string | null;
|
|
1488
|
+
/** slug */
|
|
1489
|
+
slug?: string | null;
|
|
1490
|
+
}
|
|
1491
|
+
declare enum PrivacyStatus$1 {
|
|
1492
|
+
UNDEFINED = "UNDEFINED",
|
|
1493
|
+
PUBLIC = "PUBLIC",
|
|
1494
|
+
PRIVATE = "PRIVATE"
|
|
1495
|
+
}
|
|
1496
|
+
interface CustomField$1 {
|
|
1497
|
+
/**
|
|
1498
|
+
* Custom field name. The name must match one of the key properties of the objects returned by
|
|
1499
|
+
* [`List Extended Fields`](https://dev.wix.com/docs/rest/api-reference/contacts/extended-fields/list-extended-fields)
|
|
1500
|
+
* with the `custom.` prefix removed.
|
|
1501
|
+
*/
|
|
1502
|
+
name?: string;
|
|
1503
|
+
/** Custom field value. */
|
|
1504
|
+
value?: V1CustomValue$1;
|
|
1505
|
+
}
|
|
1506
|
+
interface V1CustomValue$1 extends V1CustomValueValueOneOf$1 {
|
|
1507
|
+
/** String value. */
|
|
1508
|
+
strValue?: string;
|
|
1509
|
+
/** Number value. */
|
|
1510
|
+
numValue?: number;
|
|
1511
|
+
/** Date value. */
|
|
1512
|
+
dateValue?: Date | null;
|
|
1513
|
+
/** List value. */
|
|
1514
|
+
listValue?: V1ListValue$1;
|
|
1515
|
+
/** Map value. */
|
|
1516
|
+
mapValue?: V1MapValue$1;
|
|
1517
|
+
}
|
|
1518
|
+
/** @oneof */
|
|
1519
|
+
interface V1CustomValueValueOneOf$1 {
|
|
1520
|
+
/** String value. */
|
|
1521
|
+
strValue?: string;
|
|
1522
|
+
/** Number value. */
|
|
1523
|
+
numValue?: number;
|
|
1524
|
+
/** Date value. */
|
|
1525
|
+
dateValue?: Date | null;
|
|
1526
|
+
/** List value. */
|
|
1527
|
+
listValue?: V1ListValue$1;
|
|
1528
|
+
/** Map value. */
|
|
1529
|
+
mapValue?: V1MapValue$1;
|
|
1530
|
+
}
|
|
1531
|
+
interface V1ListValue$1 {
|
|
1532
|
+
/** Custom value. */
|
|
1533
|
+
value?: V1CustomValue$1[];
|
|
1534
|
+
}
|
|
1535
|
+
interface V1MapValue$1 {
|
|
1536
|
+
/** Mapped custom value. */
|
|
1537
|
+
value?: Record<string, V1CustomValue$1>;
|
|
1538
|
+
}
|
|
1539
|
+
interface SecondaryEmail$1 {
|
|
1540
|
+
/** Email address. */
|
|
1541
|
+
email?: string;
|
|
1542
|
+
/** Email tag. */
|
|
1543
|
+
tag?: EmailTag$1;
|
|
1544
|
+
}
|
|
1545
|
+
declare enum EmailTag$1 {
|
|
1546
|
+
UNTAGGED = "UNTAGGED",
|
|
1547
|
+
MAIN = "MAIN",
|
|
1548
|
+
HOME = "HOME",
|
|
1549
|
+
WORK = "WORK"
|
|
1550
|
+
}
|
|
1551
|
+
interface Phone$1 {
|
|
1552
|
+
/** Phone country code. */
|
|
1553
|
+
countryCode?: string | null;
|
|
1554
|
+
/** Phone number. */
|
|
1555
|
+
phone?: string;
|
|
1556
|
+
/** Phone tag. */
|
|
1557
|
+
tag?: PhoneTag$1;
|
|
1558
|
+
}
|
|
1559
|
+
declare enum PhoneTag$1 {
|
|
1560
|
+
UNTAGGED = "UNTAGGED",
|
|
1561
|
+
MAIN = "MAIN",
|
|
1562
|
+
HOME = "HOME",
|
|
1563
|
+
MOBILE = "MOBILE",
|
|
1564
|
+
WORK = "WORK",
|
|
1565
|
+
FAX = "FAX"
|
|
1566
|
+
}
|
|
1567
|
+
interface AddressWrapper$1 {
|
|
1568
|
+
/** Address. */
|
|
1569
|
+
address?: Address$1;
|
|
1570
|
+
/** Address tag. */
|
|
1571
|
+
tag?: AddressTag$1;
|
|
1572
|
+
}
|
|
1573
|
+
/** Physical address */
|
|
1574
|
+
interface Address$1 {
|
|
1575
|
+
/** Country code. */
|
|
1576
|
+
country?: string | null;
|
|
1577
|
+
/** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
|
|
1578
|
+
subdivision?: string | null;
|
|
1579
|
+
/** City name. */
|
|
1580
|
+
city?: string | null;
|
|
1581
|
+
/** Zip/postal code. */
|
|
1582
|
+
postalCode?: string | null;
|
|
1583
|
+
/** Main address line, usually street and number as free text. */
|
|
1584
|
+
addressLine1?: string | null;
|
|
1585
|
+
/** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
|
|
1586
|
+
addressLine2?: string | null;
|
|
1587
|
+
}
|
|
1588
|
+
declare enum AddressTag$1 {
|
|
1589
|
+
UNTAGGED = "UNTAGGED",
|
|
1590
|
+
HOME = "HOME",
|
|
1591
|
+
WORK = "WORK",
|
|
1592
|
+
BILLING = "BILLING",
|
|
1593
|
+
SHIPPING = "SHIPPING"
|
|
1594
|
+
}
|
|
1595
|
+
interface Metadata$1 {
|
|
1596
|
+
/**
|
|
1597
|
+
* represents general tags such as "isOwner", "isContributor"
|
|
1598
|
+
* @readonly
|
|
1599
|
+
*/
|
|
1600
|
+
tags?: string[];
|
|
1601
|
+
}
|
|
1602
|
+
interface Email$2 {
|
|
1603
|
+
address?: string;
|
|
1604
|
+
isVerified?: boolean;
|
|
1605
|
+
}
|
|
1606
|
+
interface StatusV2$1 {
|
|
1607
|
+
name?: StatusName$1;
|
|
1608
|
+
reasons?: Reason$1[];
|
|
1609
|
+
}
|
|
1610
|
+
declare enum StatusName$1 {
|
|
1611
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
1612
|
+
PENDING = "PENDING",
|
|
1613
|
+
ACTIVE = "ACTIVE",
|
|
1614
|
+
DELETED = "DELETED",
|
|
1615
|
+
BLOCKED = "BLOCKED",
|
|
1616
|
+
OFFLINE = "OFFLINE"
|
|
1617
|
+
}
|
|
1618
|
+
declare enum Reason$1 {
|
|
1619
|
+
UNKNOWN_REASON = "UNKNOWN_REASON",
|
|
1620
|
+
PENDING_ADMIN_APPROVAL_REQUIRED = "PENDING_ADMIN_APPROVAL_REQUIRED",
|
|
1621
|
+
PENDING_EMAIL_VERIFICATION_REQUIRED = "PENDING_EMAIL_VERIFICATION_REQUIRED"
|
|
1622
|
+
}
|
|
1623
|
+
interface Factor$1 {
|
|
1624
|
+
/** Factor ID. */
|
|
1625
|
+
factorId?: string;
|
|
1626
|
+
/** Factor type. */
|
|
1627
|
+
type?: FactorType$1;
|
|
1628
|
+
/** Factor status. */
|
|
1629
|
+
status?: Status$1;
|
|
1630
|
+
}
|
|
1631
|
+
declare enum FactorType$1 {
|
|
1632
|
+
UNKNOWN_FACTOR_TYPE = "UNKNOWN_FACTOR_TYPE",
|
|
1633
|
+
PASSWORD = "PASSWORD",
|
|
1634
|
+
SMS = "SMS",
|
|
1635
|
+
CALL = "CALL",
|
|
1636
|
+
EMAIL = "EMAIL",
|
|
1637
|
+
TOTP = "TOTP",
|
|
1638
|
+
PUSH = "PUSH"
|
|
1639
|
+
}
|
|
1640
|
+
declare enum Status$1 {
|
|
1641
|
+
/** Factor requires activation. */
|
|
1642
|
+
INACTIVE = "INACTIVE",
|
|
1643
|
+
/** Factor is active and can be used for authentication. */
|
|
1644
|
+
ACTIVE = "ACTIVE",
|
|
1645
|
+
/** Factor is blocked and cannot be used for authentication. The user should reenroll the factor. */
|
|
1646
|
+
REQUIRE_REENROLL = "REQUIRE_REENROLL"
|
|
1647
|
+
}
|
|
1648
|
+
interface CustomValue$1 extends CustomValueValueOneOf$1 {
|
|
1649
|
+
/** String value. */
|
|
1650
|
+
strValue?: string;
|
|
1651
|
+
/** Number value. */
|
|
1652
|
+
numValue?: number;
|
|
1653
|
+
/** Date value. */
|
|
1654
|
+
dateValue?: Date | null;
|
|
1655
|
+
/** List value. */
|
|
1656
|
+
listValue?: ListValue$1;
|
|
1657
|
+
/** Map value. */
|
|
1658
|
+
mapValue?: MapValue$1;
|
|
1659
|
+
}
|
|
1660
|
+
/** @oneof */
|
|
1661
|
+
interface CustomValueValueOneOf$1 {
|
|
1662
|
+
/** String value. */
|
|
1663
|
+
strValue?: string;
|
|
1664
|
+
/** Number value. */
|
|
1665
|
+
numValue?: number;
|
|
1666
|
+
/** Date value. */
|
|
1667
|
+
dateValue?: Date | null;
|
|
1668
|
+
/** List value. */
|
|
1669
|
+
listValue?: ListValue$1;
|
|
1670
|
+
/** Map value. */
|
|
1671
|
+
mapValue?: MapValue$1;
|
|
1672
|
+
}
|
|
1673
|
+
interface ListValue$1 {
|
|
1674
|
+
/** Custom value. */
|
|
1675
|
+
value?: CustomValue$1[];
|
|
1676
|
+
}
|
|
1677
|
+
interface MapValue$1 {
|
|
1678
|
+
/** Mapped custom value. */
|
|
1679
|
+
value?: Record<string, CustomValue$1>;
|
|
1680
|
+
}
|
|
1681
|
+
interface RequireMfaData$1 {
|
|
1682
|
+
availableFactors?: V1Factor$1[];
|
|
1683
|
+
}
|
|
1684
|
+
interface V1Factor$1 {
|
|
1685
|
+
factorType?: FactorType$1;
|
|
1686
|
+
}
|
|
1687
|
+
interface MfaChallengeData$1 {
|
|
1688
|
+
factorType?: FactorType$1;
|
|
1689
|
+
verificationChallengeData?: VerificationChallenge$1;
|
|
1690
|
+
availableFactors?: V1Factor$1[];
|
|
1691
|
+
}
|
|
1692
|
+
interface VerificationChallenge$1 {
|
|
1693
|
+
hint?: string | null;
|
|
1694
|
+
}
|
|
1695
|
+
interface V1FactorNonNullableFields$1 {
|
|
1696
|
+
factorType: FactorType$1;
|
|
1697
|
+
}
|
|
1698
|
+
interface RequireMfaDataNonNullableFields$1 {
|
|
1699
|
+
availableFactors: V1FactorNonNullableFields$1[];
|
|
1700
|
+
}
|
|
1701
|
+
interface MfaChallengeDataNonNullableFields$1 {
|
|
1702
|
+
factorType: FactorType$1;
|
|
1703
|
+
availableFactors: V1FactorNonNullableFields$1[];
|
|
1704
|
+
}
|
|
1705
|
+
interface IdpConnectionNonNullableFields$1 {
|
|
1706
|
+
idpConnectionId: string;
|
|
1707
|
+
idpUserId: string;
|
|
1708
|
+
}
|
|
1709
|
+
interface AuthenticatorConnectionNonNullableFields$1 {
|
|
1710
|
+
authenticatorConnectionId: string;
|
|
1711
|
+
reEnrollmentRequired: boolean;
|
|
1712
|
+
}
|
|
1713
|
+
interface ConnectionNonNullableFields$1 {
|
|
1714
|
+
idpConnection?: IdpConnectionNonNullableFields$1;
|
|
1715
|
+
authenticatorConnection?: AuthenticatorConnectionNonNullableFields$1;
|
|
1716
|
+
}
|
|
1717
|
+
interface V1ListValueNonNullableFields$1 {
|
|
1718
|
+
value: V1CustomValueNonNullableFields$1[];
|
|
1719
|
+
}
|
|
1720
|
+
interface V1CustomValueNonNullableFields$1 {
|
|
1721
|
+
strValue: string;
|
|
1722
|
+
numValue: number;
|
|
1723
|
+
listValue?: V1ListValueNonNullableFields$1;
|
|
1724
|
+
}
|
|
1725
|
+
interface CustomFieldNonNullableFields$1 {
|
|
1726
|
+
name: string;
|
|
1727
|
+
value?: V1CustomValueNonNullableFields$1;
|
|
1728
|
+
}
|
|
1729
|
+
interface SecondaryEmailNonNullableFields$1 {
|
|
1730
|
+
email: string;
|
|
1731
|
+
tag: EmailTag$1;
|
|
1732
|
+
}
|
|
1733
|
+
interface PhoneNonNullableFields$1 {
|
|
1734
|
+
phone: string;
|
|
1735
|
+
tag: PhoneTag$1;
|
|
1736
|
+
}
|
|
1737
|
+
interface AddressWrapperNonNullableFields$1 {
|
|
1738
|
+
tag: AddressTag$1;
|
|
1739
|
+
}
|
|
1740
|
+
interface IdentityProfileNonNullableFields$1 {
|
|
1741
|
+
emails: string[];
|
|
1742
|
+
phones: string[];
|
|
1743
|
+
labels: string[];
|
|
1744
|
+
privacyStatus: PrivacyStatus$1;
|
|
1745
|
+
customFields: CustomFieldNonNullableFields$1[];
|
|
1746
|
+
secondaryEmails: SecondaryEmailNonNullableFields$1[];
|
|
1747
|
+
phonesV2: PhoneNonNullableFields$1[];
|
|
1748
|
+
addresses: AddressWrapperNonNullableFields$1[];
|
|
1749
|
+
}
|
|
1750
|
+
interface MetadataNonNullableFields$1 {
|
|
1751
|
+
tags: string[];
|
|
1752
|
+
}
|
|
1753
|
+
interface EmailNonNullableFields$1 {
|
|
1754
|
+
address: string;
|
|
1755
|
+
isVerified: boolean;
|
|
1756
|
+
}
|
|
1757
|
+
interface StatusV2NonNullableFields$1 {
|
|
1758
|
+
name: StatusName$1;
|
|
1759
|
+
reasons: Reason$1[];
|
|
1760
|
+
}
|
|
1761
|
+
interface FactorNonNullableFields$1 {
|
|
1762
|
+
factorId: string;
|
|
1763
|
+
type: FactorType$1;
|
|
1764
|
+
status: Status$1;
|
|
1765
|
+
}
|
|
1766
|
+
interface IdentityNonNullableFields$1 {
|
|
1767
|
+
connections: ConnectionNonNullableFields$1[];
|
|
1768
|
+
identityProfile?: IdentityProfileNonNullableFields$1;
|
|
1769
|
+
metadata?: MetadataNonNullableFields$1;
|
|
1770
|
+
email?: EmailNonNullableFields$1;
|
|
1771
|
+
status?: StatusV2NonNullableFields$1;
|
|
1772
|
+
factors: FactorNonNullableFields$1[];
|
|
1773
|
+
}
|
|
1774
|
+
interface StateMachineResponseNonNullableFields$1 {
|
|
1775
|
+
requireMfaData?: RequireMfaDataNonNullableFields$1;
|
|
1776
|
+
mfaChallengeData?: MfaChallengeDataNonNullableFields$1;
|
|
1777
|
+
state: StateType$1;
|
|
1778
|
+
identity?: IdentityNonNullableFields$1;
|
|
1779
|
+
}
|
|
1780
|
+
interface SendRecoveryEmailOptions {
|
|
1781
|
+
/** Language of the email to be sent. Defaults to the language specified in the member's profile. */
|
|
1782
|
+
language?: string | null;
|
|
1783
|
+
/** Where to redirect to after a successful recovery. */
|
|
1784
|
+
redirect?: Redirect;
|
|
1785
|
+
}
|
|
1786
|
+
interface SendActivationEmailOptions {
|
|
1787
|
+
/** Options for the activation email */
|
|
1788
|
+
emailOptions?: EmailOptions;
|
|
1789
|
+
}
|
|
1790
|
+
interface RecoverOptions {
|
|
1791
|
+
/** new password to set for the identity */
|
|
1792
|
+
password?: string | null;
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
declare function sendRecoveryEmail$1(httpClient: HttpClient): SendRecoveryEmailSignature;
|
|
1796
|
+
interface SendRecoveryEmailSignature {
|
|
1797
|
+
/**
|
|
1798
|
+
* Sends a member an email containing a customized link to a Wix-managed page
|
|
1799
|
+
* where the member can set a new password for their account.
|
|
1800
|
+
* @param - Email address associated with the account to recover.
|
|
1801
|
+
*/
|
|
1802
|
+
(email: string, options?: SendRecoveryEmailOptions | undefined): Promise<void>;
|
|
1803
|
+
}
|
|
1804
|
+
declare function sendActivationEmail$1(httpClient: HttpClient): SendActivationEmailSignature;
|
|
1805
|
+
interface SendActivationEmailSignature {
|
|
1806
|
+
/**
|
|
1807
|
+
* Sends an activation email with an activation token
|
|
1808
|
+
* making the transition from initial contact to a site member
|
|
1809
|
+
* @param - Id of the activating user
|
|
1810
|
+
*/
|
|
1811
|
+
(identityId: string, options?: SendActivationEmailOptions | undefined): Promise<void>;
|
|
1812
|
+
}
|
|
1813
|
+
declare function recover$1(httpClient: HttpClient): RecoverSignature;
|
|
1814
|
+
interface RecoverSignature {
|
|
1815
|
+
/** @param - recovery token */
|
|
1816
|
+
(recoveryToken: string, options?: RecoverOptions | undefined): Promise<StateMachineResponse$1 & StateMachineResponseNonNullableFields$1>;
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
declare const sendRecoveryEmail: MaybeContext<BuildRESTFunction<typeof sendRecoveryEmail$1> & typeof sendRecoveryEmail$1>;
|
|
1820
|
+
declare const sendActivationEmail: MaybeContext<BuildRESTFunction<typeof sendActivationEmail$1> & typeof sendActivationEmail$1>;
|
|
1821
|
+
declare const recover: MaybeContext<BuildRESTFunction<typeof recover$1> & typeof recover$1>;
|
|
1822
|
+
|
|
1823
|
+
type context$6_EmailOptions = EmailOptions;
|
|
1824
|
+
type context$6_RecoverOptions = RecoverOptions;
|
|
1825
|
+
type context$6_RecoverRequest = RecoverRequest;
|
|
1826
|
+
type context$6_RecoveryToken = RecoveryToken;
|
|
1827
|
+
type context$6_Redirect = Redirect;
|
|
1828
|
+
type context$6_SendActivationEmailOptions = SendActivationEmailOptions;
|
|
1829
|
+
type context$6_SendActivationEmailRequest = SendActivationEmailRequest;
|
|
1830
|
+
type context$6_SendActivationEmailResponse = SendActivationEmailResponse;
|
|
1831
|
+
type context$6_SendRecoveryEmailOptions = SendRecoveryEmailOptions;
|
|
1832
|
+
type context$6_SendRecoveryEmailRequest = SendRecoveryEmailRequest;
|
|
1833
|
+
type context$6_SendRecoveryEmailResponse = SendRecoveryEmailResponse;
|
|
1834
|
+
type context$6_TenantType = TenantType;
|
|
1835
|
+
declare const context$6_TenantType: typeof TenantType;
|
|
1836
|
+
declare const context$6_recover: typeof recover;
|
|
1837
|
+
declare const context$6_sendActivationEmail: typeof sendActivationEmail;
|
|
1838
|
+
declare const context$6_sendRecoveryEmail: typeof sendRecoveryEmail;
|
|
1839
|
+
declare namespace context$6 {
|
|
1840
|
+
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$2 as Email, type context$6_EmailOptions as EmailOptions, EmailTag$1 as EmailTag, type Factor$1 as Factor, FactorType$1 as FactorType, 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 MfaChallengeData$1 as MfaChallengeData, type Phone$1 as Phone, PhoneTag$1 as PhoneTag, PrivacyStatus$1 as PrivacyStatus, Reason$1 as Reason, type context$6_RecoverOptions as RecoverOptions, type context$6_RecoverRequest as RecoverRequest, type context$6_RecoveryToken as RecoveryToken, type context$6_Redirect as Redirect, type RequireMfaData$1 as RequireMfaData, type SecondaryEmail$1 as SecondaryEmail, type context$6_SendActivationEmailOptions as SendActivationEmailOptions, type context$6_SendActivationEmailRequest as SendActivationEmailRequest, type context$6_SendActivationEmailResponse as SendActivationEmailResponse, type context$6_SendRecoveryEmailOptions as SendRecoveryEmailOptions, type context$6_SendRecoveryEmailRequest as SendRecoveryEmailRequest, type context$6_SendRecoveryEmailResponse as SendRecoveryEmailResponse, type StateMachineResponse$1 as StateMachineResponse, type StateMachineResponseNonNullableFields$1 as StateMachineResponseNonNullableFields, type StateMachineResponseStateDataOneOf$1 as StateMachineResponseStateDataOneOf, StateType$1 as StateType, Status$1 as Status, StatusName$1 as StatusName, type StatusV2$1 as StatusV2, context$6_TenantType as TenantType, type V1CustomValue$1 as V1CustomValue, type V1CustomValueValueOneOf$1 as V1CustomValueValueOneOf, type V1Factor$1 as V1Factor, type V1ListValue$1 as V1ListValue, type V1MapValue$1 as V1MapValue, type VerificationChallenge$1 as VerificationChallenge, context$6_recover as recover, context$6_sendActivationEmail as sendActivationEmail, context$6_sendRecoveryEmail as sendRecoveryEmail };
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
interface StartResponse {
|
|
1844
|
+
/** the identifier of the verification process */
|
|
1845
|
+
verificationId?: string;
|
|
1846
|
+
}
|
|
1847
|
+
interface StartRequest {
|
|
1848
|
+
/**
|
|
1849
|
+
* an identity_Id.
|
|
1850
|
+
* If not provided - currently, an exception is thrown. In the future the identity from identity response will be taken.
|
|
1851
|
+
*/
|
|
1852
|
+
identityId?: string | null;
|
|
1853
|
+
/** the delivery target */
|
|
1854
|
+
target?: Target;
|
|
1855
|
+
}
|
|
1856
|
+
declare enum Target {
|
|
1857
|
+
UNKNOWN_TARGET = "UNKNOWN_TARGET",
|
|
1858
|
+
EMAIL = "EMAIL"
|
|
1859
|
+
}
|
|
1860
|
+
interface VerifyRequest {
|
|
1861
|
+
/** the code to verify */
|
|
1862
|
+
code?: string;
|
|
1863
|
+
/** the identifier of the verification process */
|
|
1864
|
+
verificationId?: string;
|
|
1865
|
+
}
|
|
1866
|
+
interface VerifyResponse {
|
|
1867
|
+
}
|
|
1868
|
+
interface VerifyDuringAuthenticationRequest {
|
|
1869
|
+
/** The code to verify. */
|
|
1870
|
+
code: string;
|
|
1871
|
+
/** A state token representing the `REQUIRE_EMAIL_VERIFICATION` state. */
|
|
1872
|
+
stateToken: string;
|
|
1873
|
+
}
|
|
1874
|
+
interface StateMachineResponse extends StateMachineResponseStateDataOneOf {
|
|
1875
|
+
requireMfaData?: RequireMfaData;
|
|
1876
|
+
mfaChallengeData?: MfaChallengeData;
|
|
1877
|
+
/** The current state of the login or registration process. */
|
|
1878
|
+
state?: StateType;
|
|
1879
|
+
/** If state is `SUCCESS`, a session token. */
|
|
1880
|
+
sessionToken?: string | null;
|
|
1881
|
+
/** A token representing the current state of the login or registration process. */
|
|
1882
|
+
stateToken?: string | null;
|
|
1883
|
+
/** Identing of the current member. */
|
|
1884
|
+
identity?: Identity;
|
|
1885
|
+
/** additional_data = 5; //TBD */
|
|
1886
|
+
additionalData?: Record<string, CustomValue>;
|
|
1887
|
+
}
|
|
1888
|
+
/** @oneof */
|
|
1889
|
+
interface StateMachineResponseStateDataOneOf {
|
|
1890
|
+
requireMfaData?: RequireMfaData;
|
|
1891
|
+
mfaChallengeData?: MfaChallengeData;
|
|
1892
|
+
}
|
|
1893
|
+
declare enum StateType {
|
|
1894
|
+
/** Initial unknown state. */
|
|
1895
|
+
UNKNOWN_STATE = "UNKNOWN_STATE",
|
|
1896
|
+
/** The operation completed successfully. */
|
|
1897
|
+
SUCCESS = "SUCCESS",
|
|
1898
|
+
/** State that indicates that the member needs owner approval to proceed, available action in: OwnerApprovalStateHandler */
|
|
1899
|
+
REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
|
|
1900
|
+
/**
|
|
1901
|
+
* State that indicates a member waiting for verification, available action are: verifyDuringAuthentication or resendDuringAuthentication
|
|
1902
|
+
* https://dev.wix.com/docs/rest/api-reference/auth-management/verification-v1/verify-during-authentication
|
|
1903
|
+
*/
|
|
1904
|
+
REQUIRE_EMAIL_VERIFICATION = "REQUIRE_EMAIL_VERIFICATION",
|
|
1905
|
+
/** State that indicates checking that the status is not one of the `invalidStates` before proceeding. */
|
|
1906
|
+
STATUS_CHECK = "STATUS_CHECK",
|
|
1907
|
+
REQUIRE_MFA = "REQUIRE_MFA",
|
|
1908
|
+
MFA_CHALLENGE = "MFA_CHALLENGE"
|
|
1909
|
+
}
|
|
1910
|
+
interface Identity {
|
|
1911
|
+
/** Identity ID */
|
|
1912
|
+
_id?: string | null;
|
|
1913
|
+
/**
|
|
1914
|
+
* Represents the current state of an item. Each time the item is modified, its `revision` changes.
|
|
1915
|
+
* For an update operation to succeed, you MUST pass the latest revision.
|
|
1916
|
+
*/
|
|
1917
|
+
revision?: string | null;
|
|
1918
|
+
/**
|
|
1919
|
+
* The time this identity was created.
|
|
1920
|
+
* @readonly
|
|
1921
|
+
*/
|
|
1922
|
+
_createdDate?: Date | null;
|
|
1923
|
+
/**
|
|
1924
|
+
* The time this identity was last updated.
|
|
1925
|
+
* @readonly
|
|
1926
|
+
*/
|
|
1927
|
+
_updatedDate?: Date | null;
|
|
1928
|
+
/** The identity configured connections to authenticate with. */
|
|
1929
|
+
connections?: Connection[];
|
|
1930
|
+
/** Identity profile. */
|
|
1931
|
+
identityProfile?: IdentityProfile;
|
|
1932
|
+
/**
|
|
1933
|
+
* Additional information about the identity that can impact user access.
|
|
1934
|
+
* This data cannot be set.
|
|
1935
|
+
*/
|
|
1936
|
+
metadata?: Metadata;
|
|
1937
|
+
/** Identity email address. */
|
|
1938
|
+
email?: Email$1;
|
|
1939
|
+
/** Identity's current status. */
|
|
1940
|
+
status?: StatusV2;
|
|
1941
|
+
/** filled by pre registered spi */
|
|
1942
|
+
customAttributes?: Record<string, any> | null;
|
|
1943
|
+
/**
|
|
1944
|
+
* Identity factors.
|
|
1945
|
+
* @readonly
|
|
1946
|
+
*/
|
|
1947
|
+
factors?: Factor[];
|
|
1948
|
+
}
|
|
1949
|
+
interface Connection extends ConnectionTypeOneOf {
|
|
1950
|
+
/** IDP connection. */
|
|
1951
|
+
idpConnection?: IdpConnection;
|
|
1952
|
+
/** Authenticator connection. */
|
|
1953
|
+
authenticatorConnection?: AuthenticatorConnection;
|
|
1954
|
+
}
|
|
1955
|
+
/** @oneof */
|
|
1956
|
+
interface ConnectionTypeOneOf {
|
|
1957
|
+
/** IDP connection. */
|
|
1958
|
+
idpConnection?: IdpConnection;
|
|
1959
|
+
/** Authenticator connection. */
|
|
1960
|
+
authenticatorConnection?: AuthenticatorConnection;
|
|
1961
|
+
}
|
|
1962
|
+
interface IdpConnection {
|
|
1963
|
+
/** IDP connection ID. */
|
|
1964
|
+
idpConnectionId?: string;
|
|
1965
|
+
/** IDP user ID. */
|
|
1966
|
+
idpUserId?: string;
|
|
1967
|
+
}
|
|
1968
|
+
interface AuthenticatorConnection {
|
|
1969
|
+
/** Authenticator connection ID. */
|
|
1970
|
+
authenticatorConnectionId?: string;
|
|
1971
|
+
/** Whether re-enrollment is required. */
|
|
1972
|
+
reEnrollmentRequired?: boolean;
|
|
1973
|
+
}
|
|
1974
|
+
interface IdentityProfile {
|
|
1975
|
+
/** Profile first name. */
|
|
1976
|
+
firstName?: string | null;
|
|
1977
|
+
/** Profile last name. */
|
|
1978
|
+
lastName?: string | null;
|
|
1979
|
+
/** Profile nickname. */
|
|
1980
|
+
nickname?: string | null;
|
|
1981
|
+
/** Profile picture URL. */
|
|
1982
|
+
picture?: string | null;
|
|
1983
|
+
/**
|
|
1984
|
+
* Deprecated. Use `secondaryEmails` instead.
|
|
1985
|
+
* @deprecated Deprecated. Use `secondaryEmails` instead.
|
|
1986
|
+
* @replacedBy secondary_emails
|
|
1987
|
+
* @targetRemovalDate 2023-11-01
|
|
1988
|
+
*/
|
|
1989
|
+
emails?: string[];
|
|
1990
|
+
/**
|
|
1991
|
+
* Deprecated. Use `phonesV2` instead.
|
|
1992
|
+
* @deprecated Deprecated. Use `phonesV2` instead.
|
|
1993
|
+
* @replacedBy phones_v2
|
|
1994
|
+
* @targetRemovalDate 2023-11-01
|
|
1995
|
+
*/
|
|
1996
|
+
phones?: string[];
|
|
1997
|
+
/** List of profile labels. */
|
|
1998
|
+
labels?: string[];
|
|
1999
|
+
/** Profile language. */
|
|
2000
|
+
language?: string | null;
|
|
2001
|
+
/** Profile privacy status. */
|
|
2002
|
+
privacyStatus?: PrivacyStatus;
|
|
2003
|
+
/**
|
|
2004
|
+
* Any number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts)
|
|
2005
|
+
* are used to store additional information about your site or app's contacts.
|
|
2006
|
+
*/
|
|
2007
|
+
customFields?: CustomField[];
|
|
2008
|
+
/** List of profile email addresses. */
|
|
2009
|
+
secondaryEmails?: SecondaryEmail[];
|
|
2010
|
+
/** List of profile phone numbers. */
|
|
2011
|
+
phonesV2?: Phone[];
|
|
2012
|
+
/** List of profile physical addresses. */
|
|
2013
|
+
addresses?: AddressWrapper[];
|
|
2014
|
+
/** Company name. */
|
|
2015
|
+
company?: string | null;
|
|
2016
|
+
/** Position within company. */
|
|
2017
|
+
position?: string | null;
|
|
2018
|
+
/** Profile birthdate - ISO-8601 extended local date format (YYYY-MM-DD). */
|
|
2019
|
+
birthdate?: string | null;
|
|
2020
|
+
/** slug */
|
|
2021
|
+
slug?: string | null;
|
|
2022
|
+
}
|
|
2023
|
+
declare enum PrivacyStatus {
|
|
2024
|
+
UNDEFINED = "UNDEFINED",
|
|
2025
|
+
PUBLIC = "PUBLIC",
|
|
2026
|
+
PRIVATE = "PRIVATE"
|
|
2027
|
+
}
|
|
2028
|
+
interface CustomField {
|
|
2029
|
+
/**
|
|
2030
|
+
* Custom field name. The name must match one of the key properties of the objects returned by
|
|
2031
|
+
* [`List Extended Fields`](https://dev.wix.com/docs/rest/api-reference/contacts/extended-fields/list-extended-fields)
|
|
2032
|
+
* with the `custom.` prefix removed.
|
|
2033
|
+
*/
|
|
2034
|
+
name?: string;
|
|
2035
|
+
/** Custom field value. */
|
|
2036
|
+
value?: V1CustomValue;
|
|
2037
|
+
}
|
|
2038
|
+
interface V1CustomValue extends V1CustomValueValueOneOf {
|
|
2039
|
+
/** String value. */
|
|
2040
|
+
strValue?: string;
|
|
2041
|
+
/** Number value. */
|
|
2042
|
+
numValue?: number;
|
|
2043
|
+
/** Date value. */
|
|
2044
|
+
dateValue?: Date | null;
|
|
2045
|
+
/** List value. */
|
|
2046
|
+
listValue?: V1ListValue;
|
|
2047
|
+
/** Map value. */
|
|
2048
|
+
mapValue?: V1MapValue;
|
|
2049
|
+
}
|
|
2050
|
+
/** @oneof */
|
|
2051
|
+
interface V1CustomValueValueOneOf {
|
|
2052
|
+
/** String value. */
|
|
2053
|
+
strValue?: string;
|
|
2054
|
+
/** Number value. */
|
|
2055
|
+
numValue?: number;
|
|
2056
|
+
/** Date value. */
|
|
2057
|
+
dateValue?: Date | null;
|
|
2058
|
+
/** List value. */
|
|
2059
|
+
listValue?: V1ListValue;
|
|
2060
|
+
/** Map value. */
|
|
2061
|
+
mapValue?: V1MapValue;
|
|
2062
|
+
}
|
|
2063
|
+
interface V1ListValue {
|
|
2064
|
+
/** Custom value. */
|
|
2065
|
+
value?: V1CustomValue[];
|
|
2066
|
+
}
|
|
2067
|
+
interface V1MapValue {
|
|
2068
|
+
/** Mapped custom value. */
|
|
2069
|
+
value?: Record<string, V1CustomValue>;
|
|
2070
|
+
}
|
|
2071
|
+
interface SecondaryEmail {
|
|
2072
|
+
/** Email address. */
|
|
2073
|
+
email?: string;
|
|
2074
|
+
/** Email tag. */
|
|
2075
|
+
tag?: EmailTag;
|
|
2076
|
+
}
|
|
2077
|
+
declare enum EmailTag {
|
|
2078
|
+
UNTAGGED = "UNTAGGED",
|
|
2079
|
+
MAIN = "MAIN",
|
|
2080
|
+
HOME = "HOME",
|
|
2081
|
+
WORK = "WORK"
|
|
2082
|
+
}
|
|
2083
|
+
interface Phone {
|
|
2084
|
+
/** Phone country code. */
|
|
2085
|
+
countryCode?: string | null;
|
|
2086
|
+
/** Phone number. */
|
|
2087
|
+
phone?: string;
|
|
2088
|
+
/** Phone tag. */
|
|
2089
|
+
tag?: PhoneTag;
|
|
2090
|
+
}
|
|
2091
|
+
declare enum PhoneTag {
|
|
2092
|
+
UNTAGGED = "UNTAGGED",
|
|
2093
|
+
MAIN = "MAIN",
|
|
2094
|
+
HOME = "HOME",
|
|
2095
|
+
MOBILE = "MOBILE",
|
|
2096
|
+
WORK = "WORK",
|
|
2097
|
+
FAX = "FAX"
|
|
2098
|
+
}
|
|
2099
|
+
interface AddressWrapper {
|
|
2100
|
+
/** Address. */
|
|
2101
|
+
address?: Address;
|
|
2102
|
+
/** Address tag. */
|
|
2103
|
+
tag?: AddressTag;
|
|
2104
|
+
}
|
|
2105
|
+
/** Physical address */
|
|
2106
|
+
interface Address {
|
|
2107
|
+
/** Country code. */
|
|
2108
|
+
country?: string | null;
|
|
2109
|
+
/** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
|
|
2110
|
+
subdivision?: string | null;
|
|
2111
|
+
/** City name. */
|
|
2112
|
+
city?: string | null;
|
|
2113
|
+
/** Zip/postal code. */
|
|
2114
|
+
postalCode?: string | null;
|
|
2115
|
+
/** Main address line, usually street and number as free text. */
|
|
2116
|
+
addressLine1?: string | null;
|
|
2117
|
+
/** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
|
|
2118
|
+
addressLine2?: string | null;
|
|
2119
|
+
}
|
|
2120
|
+
declare enum AddressTag {
|
|
2121
|
+
UNTAGGED = "UNTAGGED",
|
|
2122
|
+
HOME = "HOME",
|
|
2123
|
+
WORK = "WORK",
|
|
2124
|
+
BILLING = "BILLING",
|
|
2125
|
+
SHIPPING = "SHIPPING"
|
|
2126
|
+
}
|
|
2127
|
+
interface Metadata {
|
|
2128
|
+
/**
|
|
2129
|
+
* represents general tags such as "isOwner", "isContributor"
|
|
2130
|
+
* @readonly
|
|
2131
|
+
*/
|
|
2132
|
+
tags?: string[];
|
|
2133
|
+
}
|
|
2134
|
+
interface Email$1 {
|
|
2135
|
+
address?: string;
|
|
2136
|
+
isVerified?: boolean;
|
|
2137
|
+
}
|
|
2138
|
+
interface StatusV2 {
|
|
2139
|
+
name?: StatusName;
|
|
2140
|
+
reasons?: Reason[];
|
|
2141
|
+
}
|
|
2142
|
+
declare enum StatusName {
|
|
2143
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
2144
|
+
PENDING = "PENDING",
|
|
2145
|
+
ACTIVE = "ACTIVE",
|
|
2146
|
+
DELETED = "DELETED",
|
|
2147
|
+
BLOCKED = "BLOCKED",
|
|
2148
|
+
OFFLINE = "OFFLINE"
|
|
2149
|
+
}
|
|
2150
|
+
declare enum Reason {
|
|
2151
|
+
UNKNOWN_REASON = "UNKNOWN_REASON",
|
|
2152
|
+
PENDING_ADMIN_APPROVAL_REQUIRED = "PENDING_ADMIN_APPROVAL_REQUIRED",
|
|
2153
|
+
PENDING_EMAIL_VERIFICATION_REQUIRED = "PENDING_EMAIL_VERIFICATION_REQUIRED"
|
|
2154
|
+
}
|
|
2155
|
+
interface Factor {
|
|
2156
|
+
/** Factor ID. */
|
|
2157
|
+
factorId?: string;
|
|
2158
|
+
/** Factor type. */
|
|
2159
|
+
type?: FactorType;
|
|
2160
|
+
/** Factor status. */
|
|
2161
|
+
status?: Status;
|
|
2162
|
+
}
|
|
2163
|
+
declare enum FactorType {
|
|
2164
|
+
UNKNOWN_FACTOR_TYPE = "UNKNOWN_FACTOR_TYPE",
|
|
2165
|
+
PASSWORD = "PASSWORD",
|
|
2166
|
+
SMS = "SMS",
|
|
2167
|
+
CALL = "CALL",
|
|
2168
|
+
EMAIL = "EMAIL",
|
|
2169
|
+
TOTP = "TOTP",
|
|
2170
|
+
PUSH = "PUSH"
|
|
2171
|
+
}
|
|
2172
|
+
declare enum Status {
|
|
2173
|
+
/** Factor requires activation. */
|
|
2174
|
+
INACTIVE = "INACTIVE",
|
|
2175
|
+
/** Factor is active and can be used for authentication. */
|
|
2176
|
+
ACTIVE = "ACTIVE",
|
|
2177
|
+
/** Factor is blocked and cannot be used for authentication. The user should reenroll the factor. */
|
|
2178
|
+
REQUIRE_REENROLL = "REQUIRE_REENROLL"
|
|
2179
|
+
}
|
|
2180
|
+
interface CustomValue extends CustomValueValueOneOf {
|
|
2181
|
+
/** String value. */
|
|
2182
|
+
strValue?: string;
|
|
2183
|
+
/** Number value. */
|
|
2184
|
+
numValue?: number;
|
|
2185
|
+
/** Date value. */
|
|
2186
|
+
dateValue?: Date | null;
|
|
2187
|
+
/** List value. */
|
|
2188
|
+
listValue?: ListValue;
|
|
2189
|
+
/** Map value. */
|
|
2190
|
+
mapValue?: MapValue;
|
|
2191
|
+
}
|
|
2192
|
+
/** @oneof */
|
|
2193
|
+
interface CustomValueValueOneOf {
|
|
2194
|
+
/** String value. */
|
|
2195
|
+
strValue?: string;
|
|
2196
|
+
/** Number value. */
|
|
2197
|
+
numValue?: number;
|
|
2198
|
+
/** Date value. */
|
|
2199
|
+
dateValue?: Date | null;
|
|
2200
|
+
/** List value. */
|
|
2201
|
+
listValue?: ListValue;
|
|
2202
|
+
/** Map value. */
|
|
2203
|
+
mapValue?: MapValue;
|
|
2204
|
+
}
|
|
2205
|
+
interface ListValue {
|
|
2206
|
+
/** Custom value. */
|
|
2207
|
+
value?: CustomValue[];
|
|
2208
|
+
}
|
|
2209
|
+
interface MapValue {
|
|
2210
|
+
/** Mapped custom value. */
|
|
2211
|
+
value?: Record<string, CustomValue>;
|
|
2212
|
+
}
|
|
2213
|
+
interface RequireMfaData {
|
|
2214
|
+
availableFactors?: V1Factor[];
|
|
2215
|
+
}
|
|
2216
|
+
interface V1Factor {
|
|
2217
|
+
factorType?: FactorType;
|
|
2218
|
+
}
|
|
2219
|
+
interface MfaChallengeData {
|
|
2220
|
+
factorType?: FactorType;
|
|
2221
|
+
verificationChallengeData?: VerificationChallenge;
|
|
2222
|
+
availableFactors?: V1Factor[];
|
|
2223
|
+
}
|
|
2224
|
+
interface VerificationChallenge {
|
|
2225
|
+
hint?: string | null;
|
|
2226
|
+
}
|
|
2227
|
+
interface ResendDuringAuthenticationRequest {
|
|
2228
|
+
/** A state token representing the `REQUIRE_EMAIL_VERIFICATION` state. */
|
|
2229
|
+
stateToken: string;
|
|
2230
|
+
}
|
|
2231
|
+
interface StartResponseNonNullableFields {
|
|
2232
|
+
verificationId: string;
|
|
2233
|
+
}
|
|
2234
|
+
interface V1FactorNonNullableFields {
|
|
2235
|
+
factorType: FactorType;
|
|
2236
|
+
}
|
|
2237
|
+
interface RequireMfaDataNonNullableFields {
|
|
2238
|
+
availableFactors: V1FactorNonNullableFields[];
|
|
2239
|
+
}
|
|
2240
|
+
interface MfaChallengeDataNonNullableFields {
|
|
2241
|
+
factorType: FactorType;
|
|
2242
|
+
availableFactors: V1FactorNonNullableFields[];
|
|
2243
|
+
}
|
|
2244
|
+
interface IdpConnectionNonNullableFields {
|
|
2245
|
+
idpConnectionId: string;
|
|
2246
|
+
idpUserId: string;
|
|
2247
|
+
}
|
|
2248
|
+
interface AuthenticatorConnectionNonNullableFields {
|
|
2249
|
+
authenticatorConnectionId: string;
|
|
2250
|
+
reEnrollmentRequired: boolean;
|
|
2251
|
+
}
|
|
2252
|
+
interface ConnectionNonNullableFields {
|
|
2253
|
+
idpConnection?: IdpConnectionNonNullableFields;
|
|
2254
|
+
authenticatorConnection?: AuthenticatorConnectionNonNullableFields;
|
|
2255
|
+
}
|
|
2256
|
+
interface V1ListValueNonNullableFields {
|
|
2257
|
+
value: V1CustomValueNonNullableFields[];
|
|
2258
|
+
}
|
|
2259
|
+
interface V1CustomValueNonNullableFields {
|
|
2260
|
+
strValue: string;
|
|
2261
|
+
numValue: number;
|
|
2262
|
+
listValue?: V1ListValueNonNullableFields;
|
|
2263
|
+
}
|
|
2264
|
+
interface CustomFieldNonNullableFields {
|
|
2265
|
+
name: string;
|
|
2266
|
+
value?: V1CustomValueNonNullableFields;
|
|
2267
|
+
}
|
|
2268
|
+
interface SecondaryEmailNonNullableFields {
|
|
2269
|
+
email: string;
|
|
2270
|
+
tag: EmailTag;
|
|
2271
|
+
}
|
|
2272
|
+
interface PhoneNonNullableFields {
|
|
2273
|
+
phone: string;
|
|
2274
|
+
tag: PhoneTag;
|
|
2275
|
+
}
|
|
2276
|
+
interface AddressWrapperNonNullableFields {
|
|
2277
|
+
tag: AddressTag;
|
|
2278
|
+
}
|
|
2279
|
+
interface IdentityProfileNonNullableFields {
|
|
2280
|
+
emails: string[];
|
|
2281
|
+
phones: string[];
|
|
2282
|
+
labels: string[];
|
|
2283
|
+
privacyStatus: PrivacyStatus;
|
|
2284
|
+
customFields: CustomFieldNonNullableFields[];
|
|
2285
|
+
secondaryEmails: SecondaryEmailNonNullableFields[];
|
|
2286
|
+
phonesV2: PhoneNonNullableFields[];
|
|
2287
|
+
addresses: AddressWrapperNonNullableFields[];
|
|
2288
|
+
}
|
|
2289
|
+
interface MetadataNonNullableFields {
|
|
2290
|
+
tags: string[];
|
|
2291
|
+
}
|
|
2292
|
+
interface EmailNonNullableFields {
|
|
2293
|
+
address: string;
|
|
2294
|
+
isVerified: boolean;
|
|
2295
|
+
}
|
|
2296
|
+
interface StatusV2NonNullableFields {
|
|
2297
|
+
name: StatusName;
|
|
2298
|
+
reasons: Reason[];
|
|
2299
|
+
}
|
|
2300
|
+
interface FactorNonNullableFields {
|
|
2301
|
+
factorId: string;
|
|
2302
|
+
type: FactorType;
|
|
2303
|
+
status: Status;
|
|
2304
|
+
}
|
|
2305
|
+
interface IdentityNonNullableFields {
|
|
2306
|
+
connections: ConnectionNonNullableFields[];
|
|
2307
|
+
identityProfile?: IdentityProfileNonNullableFields;
|
|
2308
|
+
metadata?: MetadataNonNullableFields;
|
|
2309
|
+
email?: EmailNonNullableFields;
|
|
2310
|
+
status?: StatusV2NonNullableFields;
|
|
2311
|
+
factors: FactorNonNullableFields[];
|
|
2312
|
+
}
|
|
2313
|
+
interface StateMachineResponseNonNullableFields {
|
|
2314
|
+
requireMfaData?: RequireMfaDataNonNullableFields;
|
|
2315
|
+
mfaChallengeData?: MfaChallengeDataNonNullableFields;
|
|
2316
|
+
state: StateType;
|
|
2317
|
+
identity?: IdentityNonNullableFields;
|
|
2318
|
+
}
|
|
2319
|
+
interface StartOptions {
|
|
2320
|
+
/**
|
|
2321
|
+
* an identity_Id.
|
|
2322
|
+
* If not provided - currently, an exception is thrown. In the future the identity from identity response will be taken.
|
|
2323
|
+
*/
|
|
2324
|
+
identityId?: string | null;
|
|
2325
|
+
/** the delivery target */
|
|
2326
|
+
target?: Target;
|
|
2327
|
+
}
|
|
2328
|
+
interface VerifyDuringAuthenticationOptions {
|
|
2329
|
+
/** A state token representing the `REQUIRE_EMAIL_VERIFICATION` state. */
|
|
2330
|
+
stateToken: string;
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
declare function start$1(httpClient: HttpClient): StartSignature;
|
|
2334
|
+
interface StartSignature {
|
|
2335
|
+
/**
|
|
2336
|
+
* starts a verification process
|
|
2337
|
+
* example: sends a code to the identity's email
|
|
2338
|
+
*/
|
|
2339
|
+
(options?: StartOptions | undefined): Promise<StartResponse & StartResponseNonNullableFields>;
|
|
2340
|
+
}
|
|
2341
|
+
declare function verifyDuringAuthentication$1(httpClient: HttpClient): VerifyDuringAuthenticationSignature;
|
|
2342
|
+
interface VerifyDuringAuthenticationSignature {
|
|
2343
|
+
/**
|
|
2344
|
+
* Continues the registration process when a member is required to verify an email address
|
|
2345
|
+
* using a verification code received by email.
|
|
2346
|
+
*
|
|
2347
|
+
* Email verification is required when the registering member is already listed as a contact.
|
|
2348
|
+
*
|
|
2349
|
+
* Typically, after a successful verification, you generate and use member tokens for the
|
|
2350
|
+
* registered member so that subsequent API calls are called as part of a member session.
|
|
2351
|
+
* @param - The code to verify.
|
|
2352
|
+
*/
|
|
2353
|
+
(code: string, options: VerifyDuringAuthenticationOptions): Promise<StateMachineResponse & StateMachineResponseNonNullableFields>;
|
|
2354
|
+
}
|
|
2355
|
+
declare function resendDuringAuthentication$1(httpClient: HttpClient): ResendDuringAuthenticationSignature;
|
|
2356
|
+
interface ResendDuringAuthenticationSignature {
|
|
2357
|
+
/**
|
|
2358
|
+
* Resend the verification email and continue the registration process when a member is required to verify an email address
|
|
2359
|
+
* using a verification code received by email.
|
|
2360
|
+
* @param - A state token representing the `REQUIRE_EMAIL_VERIFICATION` state.
|
|
2361
|
+
*/
|
|
2362
|
+
(stateToken: string): Promise<StateMachineResponse & StateMachineResponseNonNullableFields>;
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2365
|
+
declare const start: MaybeContext<BuildRESTFunction<typeof start$1> & typeof start$1>;
|
|
2366
|
+
declare const verifyDuringAuthentication: MaybeContext<BuildRESTFunction<typeof verifyDuringAuthentication$1> & typeof verifyDuringAuthentication$1>;
|
|
2367
|
+
declare const resendDuringAuthentication: MaybeContext<BuildRESTFunction<typeof resendDuringAuthentication$1> & typeof resendDuringAuthentication$1>;
|
|
2368
|
+
|
|
2369
|
+
type context$5_Address = Address;
|
|
2370
|
+
type context$5_AddressTag = AddressTag;
|
|
2371
|
+
declare const context$5_AddressTag: typeof AddressTag;
|
|
2372
|
+
type context$5_AddressWrapper = AddressWrapper;
|
|
2373
|
+
type context$5_AuthenticatorConnection = AuthenticatorConnection;
|
|
2374
|
+
type context$5_Connection = Connection;
|
|
2375
|
+
type context$5_ConnectionTypeOneOf = ConnectionTypeOneOf;
|
|
2376
|
+
type context$5_CustomField = CustomField;
|
|
2377
|
+
type context$5_CustomValue = CustomValue;
|
|
2378
|
+
type context$5_CustomValueValueOneOf = CustomValueValueOneOf;
|
|
2379
|
+
type context$5_EmailTag = EmailTag;
|
|
2380
|
+
declare const context$5_EmailTag: typeof EmailTag;
|
|
2381
|
+
type context$5_Factor = Factor;
|
|
2382
|
+
type context$5_FactorType = FactorType;
|
|
2383
|
+
declare const context$5_FactorType: typeof FactorType;
|
|
2384
|
+
type context$5_Identity = Identity;
|
|
2385
|
+
type context$5_IdentityProfile = IdentityProfile;
|
|
2386
|
+
type context$5_IdpConnection = IdpConnection;
|
|
2387
|
+
type context$5_ListValue = ListValue;
|
|
2388
|
+
type context$5_MapValue = MapValue;
|
|
2389
|
+
type context$5_Metadata = Metadata;
|
|
2390
|
+
type context$5_MfaChallengeData = MfaChallengeData;
|
|
2391
|
+
type context$5_Phone = Phone;
|
|
2392
|
+
type context$5_PhoneTag = PhoneTag;
|
|
2393
|
+
declare const context$5_PhoneTag: typeof PhoneTag;
|
|
2394
|
+
type context$5_PrivacyStatus = PrivacyStatus;
|
|
2395
|
+
declare const context$5_PrivacyStatus: typeof PrivacyStatus;
|
|
2396
|
+
type context$5_Reason = Reason;
|
|
2397
|
+
declare const context$5_Reason: typeof Reason;
|
|
2398
|
+
type context$5_RequireMfaData = RequireMfaData;
|
|
2399
|
+
type context$5_ResendDuringAuthenticationRequest = ResendDuringAuthenticationRequest;
|
|
2400
|
+
type context$5_SecondaryEmail = SecondaryEmail;
|
|
2401
|
+
type context$5_StartOptions = StartOptions;
|
|
2402
|
+
type context$5_StartRequest = StartRequest;
|
|
2403
|
+
type context$5_StartResponse = StartResponse;
|
|
2404
|
+
type context$5_StartResponseNonNullableFields = StartResponseNonNullableFields;
|
|
2405
|
+
type context$5_StateMachineResponse = StateMachineResponse;
|
|
2406
|
+
type context$5_StateMachineResponseNonNullableFields = StateMachineResponseNonNullableFields;
|
|
2407
|
+
type context$5_StateMachineResponseStateDataOneOf = StateMachineResponseStateDataOneOf;
|
|
2408
|
+
type context$5_StateType = StateType;
|
|
2409
|
+
declare const context$5_StateType: typeof StateType;
|
|
2410
|
+
type context$5_Status = Status;
|
|
2411
|
+
declare const context$5_Status: typeof Status;
|
|
2412
|
+
type context$5_StatusName = StatusName;
|
|
2413
|
+
declare const context$5_StatusName: typeof StatusName;
|
|
2414
|
+
type context$5_StatusV2 = StatusV2;
|
|
2415
|
+
type context$5_Target = Target;
|
|
2416
|
+
declare const context$5_Target: typeof Target;
|
|
2417
|
+
type context$5_V1CustomValue = V1CustomValue;
|
|
2418
|
+
type context$5_V1CustomValueValueOneOf = V1CustomValueValueOneOf;
|
|
2419
|
+
type context$5_V1Factor = V1Factor;
|
|
2420
|
+
type context$5_V1ListValue = V1ListValue;
|
|
2421
|
+
type context$5_V1MapValue = V1MapValue;
|
|
2422
|
+
type context$5_VerificationChallenge = VerificationChallenge;
|
|
2423
|
+
type context$5_VerifyDuringAuthenticationOptions = VerifyDuringAuthenticationOptions;
|
|
2424
|
+
type context$5_VerifyDuringAuthenticationRequest = VerifyDuringAuthenticationRequest;
|
|
2425
|
+
type context$5_VerifyRequest = VerifyRequest;
|
|
2426
|
+
type context$5_VerifyResponse = VerifyResponse;
|
|
2427
|
+
declare const context$5_resendDuringAuthentication: typeof resendDuringAuthentication;
|
|
2428
|
+
declare const context$5_start: typeof start;
|
|
2429
|
+
declare const context$5_verifyDuringAuthentication: typeof verifyDuringAuthentication;
|
|
2430
|
+
declare namespace context$5 {
|
|
2431
|
+
export { type context$5_Address as Address, context$5_AddressTag as AddressTag, type context$5_AddressWrapper as AddressWrapper, type context$5_AuthenticatorConnection as AuthenticatorConnection, type context$5_Connection as Connection, type context$5_ConnectionTypeOneOf as ConnectionTypeOneOf, type context$5_CustomField as CustomField, type context$5_CustomValue as CustomValue, type context$5_CustomValueValueOneOf as CustomValueValueOneOf, type Email$1 as Email, context$5_EmailTag as EmailTag, type context$5_Factor as Factor, context$5_FactorType as FactorType, type context$5_Identity as Identity, type context$5_IdentityProfile as IdentityProfile, type context$5_IdpConnection as IdpConnection, type context$5_ListValue as ListValue, type context$5_MapValue as MapValue, type context$5_Metadata as Metadata, type context$5_MfaChallengeData as MfaChallengeData, type context$5_Phone as Phone, context$5_PhoneTag as PhoneTag, context$5_PrivacyStatus as PrivacyStatus, context$5_Reason as Reason, type context$5_RequireMfaData as RequireMfaData, type context$5_ResendDuringAuthenticationRequest as ResendDuringAuthenticationRequest, type context$5_SecondaryEmail as SecondaryEmail, type context$5_StartOptions as StartOptions, type context$5_StartRequest as StartRequest, type context$5_StartResponse as StartResponse, type context$5_StartResponseNonNullableFields as StartResponseNonNullableFields, type context$5_StateMachineResponse as StateMachineResponse, type context$5_StateMachineResponseNonNullableFields as StateMachineResponseNonNullableFields, type context$5_StateMachineResponseStateDataOneOf as StateMachineResponseStateDataOneOf, context$5_StateType as StateType, context$5_Status as Status, context$5_StatusName as StatusName, type context$5_StatusV2 as StatusV2, context$5_Target as Target, type context$5_V1CustomValue as V1CustomValue, type context$5_V1CustomValueValueOneOf as V1CustomValueValueOneOf, type context$5_V1Factor as V1Factor, type context$5_V1ListValue as V1ListValue, type context$5_V1MapValue as V1MapValue, type context$5_VerificationChallenge as VerificationChallenge, type context$5_VerifyDuringAuthenticationOptions as VerifyDuringAuthenticationOptions, type context$5_VerifyDuringAuthenticationRequest as VerifyDuringAuthenticationRequest, type context$5_VerifyRequest as VerifyRequest, type context$5_VerifyResponse as VerifyResponse, context$5_resendDuringAuthentication as resendDuringAuthentication, context$5_start as start, context$5_verifyDuringAuthentication as verifyDuringAuthentication };
|
|
2432
|
+
}
|
|
2433
|
+
|
|
2434
|
+
interface AccountV2 {
|
|
2435
|
+
/** Account ID. */
|
|
2436
|
+
accountId?: string;
|
|
2437
|
+
}
|
|
2438
|
+
interface GetUserAccountRequest {
|
|
2439
|
+
/** the user id that his account we query */
|
|
2440
|
+
userId?: string;
|
|
2441
|
+
}
|
|
2442
|
+
interface Account {
|
|
2443
|
+
/** Account ID. */
|
|
2444
|
+
accountId?: string;
|
|
2445
|
+
/** Account slug - used in the free URL prefix */
|
|
2446
|
+
slug?: string;
|
|
2447
|
+
/** Account name (display) */
|
|
2448
|
+
accountName?: string | null;
|
|
2449
|
+
/**
|
|
2450
|
+
* DEPRECATED field of account image
|
|
2451
|
+
* @deprecated
|
|
2452
|
+
*/
|
|
2453
|
+
accountImg?: string | null;
|
|
2454
|
+
/** account status */
|
|
2455
|
+
status?: AccountStatus;
|
|
2456
|
+
/** account owner user id */
|
|
2457
|
+
accountOwner?: string;
|
|
2458
|
+
/** account extra properties */
|
|
2459
|
+
accountProperties?: AccountProperties;
|
|
2460
|
+
/** the account creation date */
|
|
2461
|
+
dateCreated?: Date | null;
|
|
2462
|
+
/** last time account was updated */
|
|
2463
|
+
dateUpdated?: Date | null;
|
|
2464
|
+
}
|
|
2465
|
+
/** enum with all available statuses of account */
|
|
2466
|
+
declare enum AccountStatus {
|
|
2467
|
+
ACTIVE = "ACTIVE",
|
|
2468
|
+
BLOCKED = "BLOCKED",
|
|
2469
|
+
DELETED = "DELETED"
|
|
2470
|
+
}
|
|
2471
|
+
/** All relevant account properties */
|
|
2472
|
+
interface AccountProperties {
|
|
2473
|
+
/** Whether this account is a team account. */
|
|
2474
|
+
isTeam?: boolean;
|
|
2475
|
+
/**
|
|
2476
|
+
* Account image (display)
|
|
2477
|
+
* relevant mainly for CoBranded accounts
|
|
2478
|
+
*/
|
|
2479
|
+
accountImg?: string | null;
|
|
2480
|
+
/**
|
|
2481
|
+
* the account banner (display)
|
|
2482
|
+
* relevant mainly for CoBranded accounts
|
|
2483
|
+
*/
|
|
2484
|
+
accountBanner?: string | null;
|
|
2485
|
+
/**
|
|
2486
|
+
* the account logo (display)
|
|
2487
|
+
* wll be shown as the account logo in the UI (top right corner, contributor list etc..)
|
|
2488
|
+
*/
|
|
2489
|
+
accountLogo?: string | null;
|
|
2490
|
+
/**
|
|
2491
|
+
* account co branding flag (if exists)
|
|
2492
|
+
* an enum for CoBranding flag contains 4 possible options:
|
|
2493
|
+
* None - the account is not CoBranded
|
|
2494
|
+
* CoBranded - the account has a CoBranding flag
|
|
2495
|
+
* CoBranded_Customer_New - the account is a contributor of a CoBranded account. This account was created because of the contributor invite
|
|
2496
|
+
* CoBranded_Customer_Existing - the account is a contributor of a CoBranded account. This account was created before the invite of the contributor invite
|
|
2497
|
+
*/
|
|
2498
|
+
coBranding?: CoBranding;
|
|
2499
|
+
/** account's website URL (shown on co branding customers sites) */
|
|
2500
|
+
websiteUrl?: string | null;
|
|
2501
|
+
/** the id of the parent account of this account, if it has a parent */
|
|
2502
|
+
parentAccountId?: string | null;
|
|
2503
|
+
}
|
|
2504
|
+
/** co branding flag options for account */
|
|
2505
|
+
declare enum CoBranding {
|
|
2506
|
+
None = "None",
|
|
2507
|
+
CoBranded = "CoBranded",
|
|
2508
|
+
CoBranded_Customer_New = "CoBranded_Customer_New",
|
|
2509
|
+
CoBranded_Customer_Existing = "CoBranded_Customer_Existing"
|
|
2510
|
+
}
|
|
2511
|
+
interface GetUserAccountsRequest {
|
|
2512
|
+
/** the user id that his accounts we query */
|
|
2513
|
+
userId?: string;
|
|
2514
|
+
/** Limited to max 20 at a single request */
|
|
2515
|
+
paging?: Paging$1;
|
|
2516
|
+
}
|
|
2517
|
+
interface Paging$1 {
|
|
2518
|
+
/** Number of items to load. */
|
|
2519
|
+
limit?: number | null;
|
|
2520
|
+
/** Number of items to skip in the current sort order. */
|
|
2521
|
+
offset?: number | null;
|
|
2522
|
+
}
|
|
2523
|
+
interface AccountsResponse {
|
|
2524
|
+
accounts?: Account[];
|
|
2525
|
+
}
|
|
2526
|
+
interface GetMyUserAccountsRequest {
|
|
2527
|
+
/** Limited to max 20 at a single request */
|
|
2528
|
+
paging?: Paging$1;
|
|
2529
|
+
}
|
|
2530
|
+
interface GetAccountRequest {
|
|
2531
|
+
/** the account id that it's data should be retrieved */
|
|
2532
|
+
accountId?: string;
|
|
2533
|
+
}
|
|
2534
|
+
interface AccountResponse {
|
|
2535
|
+
account?: Account;
|
|
2536
|
+
}
|
|
2537
|
+
interface GetMyAccountRequest {
|
|
2538
|
+
}
|
|
2539
|
+
interface GetAccountsRequest {
|
|
2540
|
+
/** the account id to retrieve */
|
|
2541
|
+
accountIds?: string[];
|
|
2542
|
+
}
|
|
2543
|
+
interface CreateAccountRequest {
|
|
2544
|
+
/** The user to create under the new account, with the roles defined in `roles`. */
|
|
2545
|
+
user: User$1;
|
|
2546
|
+
/**
|
|
2547
|
+
* Roles to be assigned to the user in the new account. To retrieve all available roles, call Get Roles Info in the Users API.
|
|
2548
|
+
* Default: OWNER.
|
|
2549
|
+
*/
|
|
2550
|
+
roles?: string[] | null;
|
|
2551
|
+
}
|
|
2552
|
+
/** A User to be created under an implicitly provided accountId: must have a unique email. */
|
|
2553
|
+
interface User$1 {
|
|
2554
|
+
/** User's unique email address details. Required. */
|
|
2555
|
+
email?: Email;
|
|
2556
|
+
/** User's single sign on identity, when the user is identified via SSO authentication response token params, as specified by [OpenID Connect](https://openid.net/developers/how-connect-works/) (aka. OIDC) protocol. */
|
|
2557
|
+
ssoIdentities?: SsoIdentity[];
|
|
2558
|
+
/** Additional user details. */
|
|
2559
|
+
userDetails?: UserDetails;
|
|
2560
|
+
}
|
|
2561
|
+
/** User's email address. */
|
|
2562
|
+
interface Email {
|
|
2563
|
+
/** User's email address. */
|
|
2564
|
+
emailAddress?: string;
|
|
2565
|
+
/** Whether the caller has verified the user's email address. */
|
|
2566
|
+
isVerified?: boolean;
|
|
2567
|
+
}
|
|
2568
|
+
/** Single Sign On (aka. SSO) identity; user is identified via SSO authentication response token params, as specified by OpenID Connect (aka. OIDC) protocol */
|
|
2569
|
+
interface SsoIdentity {
|
|
2570
|
+
/** An SSO setting (URLs, clientId, secret, etc. as required by OIDC protocol) for a specific Identity-Provider (aka. IdP) for a specific Wix account. */
|
|
2571
|
+
ssoId?: string;
|
|
2572
|
+
/**
|
|
2573
|
+
* User ID as stored in IdP. For example a "sub" claim of OIDC protocol,
|
|
2574
|
+
* or any other alternative, specified by IdP (Identity Provider).
|
|
2575
|
+
*/
|
|
2576
|
+
userId?: string;
|
|
2577
|
+
}
|
|
2578
|
+
/** additional user details */
|
|
2579
|
+
interface UserDetails {
|
|
2580
|
+
/** User's first name. */
|
|
2581
|
+
firstName?: string | null;
|
|
2582
|
+
/** User's last name. */
|
|
2583
|
+
lastName?: string | null;
|
|
2584
|
+
/** URL to location of user's profile picture. */
|
|
2585
|
+
profilePictureUrl?: string | null;
|
|
2586
|
+
/** User's preferred language in [ISO 639-1:2002](https://en.wikipedia.org/wiki/ISO_639-1) format. For example, "en", "es". */
|
|
2587
|
+
language?: string | null;
|
|
2588
|
+
/**
|
|
2589
|
+
* Original Client IP from which a request was made.
|
|
2590
|
+
* This is useful in case where a createUser API is called by some server call, which, in turn, has been called by some client from another IP.
|
|
2591
|
+
* Wix checks this IP against the [OFAC sanctioned countries](https://ofac.treasury.gov/sanctions-programs-and-country-information).
|
|
2592
|
+
*/
|
|
2593
|
+
clientIp?: string | null;
|
|
2594
|
+
}
|
|
2595
|
+
interface CreateAccountResponse {
|
|
2596
|
+
/** The created account. */
|
|
2597
|
+
account?: AccountV2;
|
|
2598
|
+
}
|
|
2599
|
+
interface CreateAccountForMyUserRequest {
|
|
2600
|
+
/** the account name */
|
|
2601
|
+
accountName?: string | null;
|
|
2602
|
+
/** account image url */
|
|
2603
|
+
accountImg?: string | null;
|
|
2604
|
+
/** whether to mark the account as `studio` */
|
|
2605
|
+
studio?: boolean;
|
|
2606
|
+
}
|
|
2607
|
+
interface CreateAccountTenantRequest {
|
|
2608
|
+
slug?: string | null;
|
|
2609
|
+
}
|
|
2610
|
+
interface CreateAccountTenantResponse {
|
|
2611
|
+
account?: AccountV2;
|
|
2612
|
+
}
|
|
2613
|
+
interface CreateAccountAndAssignUserRequest {
|
|
2614
|
+
/** the user id for which we are creating the account */
|
|
2615
|
+
userId?: string;
|
|
2616
|
+
/** the user name of the user for which the account is created */
|
|
2617
|
+
userName?: string;
|
|
2618
|
+
/** the parent account of the created account */
|
|
2619
|
+
parentAccountId?: string | null;
|
|
2620
|
+
/** whether to mark the account as `studio` */
|
|
2621
|
+
studio?: boolean;
|
|
2622
|
+
}
|
|
2623
|
+
interface UpdateAccountRequest {
|
|
2624
|
+
/** the account id to update */
|
|
2625
|
+
accountId?: string;
|
|
2626
|
+
/**
|
|
2627
|
+
* DEPRECATED field of image
|
|
2628
|
+
* @deprecated
|
|
2629
|
+
*/
|
|
2630
|
+
accountImg?: string | null;
|
|
2631
|
+
/** optional - new account name */
|
|
2632
|
+
accountName?: string | null;
|
|
2633
|
+
/**
|
|
2634
|
+
* the new properties for the account.
|
|
2635
|
+
* can be passed partially - and only relevant fields will be updated
|
|
2636
|
+
*/
|
|
2637
|
+
accountProperties?: AccountProperties;
|
|
2638
|
+
}
|
|
2639
|
+
interface UpdateParentAccountRequest extends UpdateParentAccountRequestUpdateOneOf {
|
|
2640
|
+
/** Removes the parent account */
|
|
2641
|
+
remove?: RemoveParent;
|
|
2642
|
+
}
|
|
2643
|
+
/** @oneof */
|
|
2644
|
+
interface UpdateParentAccountRequestUpdateOneOf {
|
|
2645
|
+
/** Removes the parent account */
|
|
2646
|
+
remove?: RemoveParent;
|
|
2647
|
+
}
|
|
2648
|
+
interface RemoveParent {
|
|
2649
|
+
}
|
|
2650
|
+
interface UpdateParentAccountResponse {
|
|
2651
|
+
newParentAccountId?: string | null;
|
|
2652
|
+
}
|
|
2653
|
+
interface DeleteAccountRequest {
|
|
2654
|
+
/** the account id to delete */
|
|
2655
|
+
accountId?: string;
|
|
2656
|
+
/** will throw exception if trying to delete the account of the last user when the value is true */
|
|
2657
|
+
shouldNotDeleteLastAccount?: boolean;
|
|
2658
|
+
}
|
|
2659
|
+
interface EmptyResponse {
|
|
2660
|
+
}
|
|
2661
|
+
interface UpdateSlugRequest {
|
|
2662
|
+
/** account id */
|
|
2663
|
+
accountId?: string;
|
|
2664
|
+
/** new slug */
|
|
2665
|
+
newSlugName?: string;
|
|
2666
|
+
}
|
|
2667
|
+
interface IsTeamRequest {
|
|
2668
|
+
/** the account id to check if it's a team account */
|
|
2669
|
+
accountId?: string;
|
|
2670
|
+
}
|
|
2671
|
+
interface IsTeamResponse {
|
|
2672
|
+
/** true if the account is marked as a team account, false if not */
|
|
2673
|
+
isTeamAccount?: boolean;
|
|
2674
|
+
}
|
|
2675
|
+
interface MarkAccountFlagRequest extends MarkAccountFlagRequestFlagOneOf {
|
|
2676
|
+
/**
|
|
2677
|
+
* account co branding flag (if exists)
|
|
2678
|
+
* an enum for CoBranding flag contains 4 possible options:
|
|
2679
|
+
* None - the account is not CoBranded
|
|
2680
|
+
* CoBranded - the account has a CoBranding flag
|
|
2681
|
+
* CoBranded_Customer_New - the account is a contributor of a CoBranded account. This account was created because of the contributor invite
|
|
2682
|
+
* CoBranded_Customer_Existing - the account is a contributor of a CoBranded account. This account was created before the invite of the contributor invite
|
|
2683
|
+
*/
|
|
2684
|
+
coBranding?: CoBranding;
|
|
2685
|
+
/** the account id to mark */
|
|
2686
|
+
accountId?: string;
|
|
2687
|
+
/** the inviting account id in case the flag is given by an invite */
|
|
2688
|
+
invitedByAccountId?: string | null;
|
|
2689
|
+
}
|
|
2690
|
+
/** @oneof */
|
|
2691
|
+
interface MarkAccountFlagRequestFlagOneOf {
|
|
2692
|
+
/**
|
|
2693
|
+
* account co branding flag (if exists)
|
|
2694
|
+
* an enum for CoBranding flag contains 4 possible options:
|
|
2695
|
+
* None - the account is not CoBranded
|
|
2696
|
+
* CoBranded - the account has a CoBranding flag
|
|
2697
|
+
* CoBranded_Customer_New - the account is a contributor of a CoBranded account. This account was created because of the contributor invite
|
|
2698
|
+
* CoBranded_Customer_Existing - the account is a contributor of a CoBranded account. This account was created before the invite of the contributor invite
|
|
2699
|
+
*/
|
|
2700
|
+
coBranding?: CoBranding;
|
|
2701
|
+
}
|
|
2702
|
+
interface GetParentAccountInfoRequest {
|
|
2703
|
+
}
|
|
2704
|
+
interface GetParentAccountInfoResponse {
|
|
2705
|
+
/** The info of the parent account, if the account has a parent */
|
|
2706
|
+
parentAccountInfo?: AccountInfo$1;
|
|
2707
|
+
}
|
|
2708
|
+
interface AccountInfo$1 {
|
|
2709
|
+
/** The name of the account */
|
|
2710
|
+
name?: string | null;
|
|
2711
|
+
/** The url of the image of the account */
|
|
2712
|
+
image?: string | null;
|
|
2713
|
+
}
|
|
2714
|
+
interface GetSubAccountsRequest {
|
|
2715
|
+
/** Offset-based pagination for the response. Default page size is 20, max page size is 50 */
|
|
2716
|
+
paging?: Paging$1;
|
|
2717
|
+
}
|
|
2718
|
+
interface GetSubAccountsResponse {
|
|
2719
|
+
/** The sub accounts of the target account */
|
|
2720
|
+
subAccounts?: SubAccountInfo[];
|
|
2721
|
+
/** Metadata of the response pagination */
|
|
2722
|
+
pagingMetadata?: PagingMetadata;
|
|
2723
|
+
}
|
|
2724
|
+
interface SubAccountInfo {
|
|
2725
|
+
/** The id of the sub account */
|
|
2726
|
+
accountId?: string;
|
|
2727
|
+
}
|
|
2728
|
+
interface PagingMetadata {
|
|
2729
|
+
/** Number of items returned in the response. */
|
|
2730
|
+
count?: number | null;
|
|
2731
|
+
/** Offset that was requested. */
|
|
2732
|
+
offset?: number | null;
|
|
2733
|
+
/** Total number of items that match the query. */
|
|
2734
|
+
total?: number | null;
|
|
2735
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
2736
|
+
tooManyToCount?: boolean | null;
|
|
2737
|
+
}
|
|
2738
|
+
interface ListChildAccountsRequest {
|
|
2739
|
+
/**
|
|
2740
|
+
* Paging options to limit and offset the number of items.
|
|
2741
|
+
* Default: 20. Max: 50.
|
|
2742
|
+
*/
|
|
2743
|
+
paging?: Paging$1;
|
|
2744
|
+
}
|
|
2745
|
+
interface ListChildAccountsResponse {
|
|
2746
|
+
/** The requested child accounts. */
|
|
2747
|
+
childAccounts?: AccountV2[];
|
|
2748
|
+
/** Metadata of the response pagination. */
|
|
2749
|
+
pagingMetadata?: PagingMetadata;
|
|
2750
|
+
}
|
|
2751
|
+
interface SetIsReadOnlyAccountRequest {
|
|
2752
|
+
accountId?: string;
|
|
2753
|
+
isReadOnly?: boolean;
|
|
2754
|
+
}
|
|
2755
|
+
interface AccountV2NonNullableFields {
|
|
2756
|
+
accountId: string;
|
|
2757
|
+
}
|
|
2758
|
+
interface CreateAccountResponseNonNullableFields {
|
|
2759
|
+
account?: AccountV2NonNullableFields;
|
|
2760
|
+
}
|
|
2761
|
+
interface ListChildAccountsResponseNonNullableFields {
|
|
2762
|
+
childAccounts: AccountV2NonNullableFields[];
|
|
2763
|
+
}
|
|
2764
|
+
interface CreateAccountOptions {
|
|
2765
|
+
/**
|
|
2766
|
+
* Roles to be assigned to the user in the new account. To retrieve all available roles, call Get Roles Info in the Users API.
|
|
2767
|
+
* Default: OWNER.
|
|
2768
|
+
*/
|
|
2769
|
+
roles?: string[] | null;
|
|
2770
|
+
}
|
|
2771
|
+
interface ListChildAccountsOptions {
|
|
2772
|
+
/**
|
|
2773
|
+
* Paging options to limit and offset the number of items.
|
|
2774
|
+
* Default: 20. Max: 50.
|
|
2775
|
+
*/
|
|
2776
|
+
paging?: Paging$1;
|
|
2777
|
+
}
|
|
2778
|
+
|
|
2779
|
+
declare function createAccount$1(httpClient: HttpClient): CreateAccountSignature;
|
|
2780
|
+
interface CreateAccountSignature {
|
|
2781
|
+
/**
|
|
2782
|
+
* Creates a new Wix account, and creates a new Wix user as the account owner.
|
|
2783
|
+
* The newly created account is a child account of the account used to create it, making that account its parent.
|
|
2784
|
+
*
|
|
2785
|
+
* > **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.
|
|
2786
|
+
* @param - The user to create under the new account, with the roles defined in `roles`.
|
|
2787
|
+
*/
|
|
2788
|
+
(user: User$1, options?: CreateAccountOptions | undefined): Promise<CreateAccountResponse & CreateAccountResponseNonNullableFields>;
|
|
2789
|
+
}
|
|
2790
|
+
declare function listChildAccounts$1(httpClient: HttpClient): ListChildAccountsSignature;
|
|
2791
|
+
interface ListChildAccountsSignature {
|
|
2792
|
+
/**
|
|
2793
|
+
* Retrieves a list of child account IDs for the requesting account.
|
|
2794
|
+
* If no child accounts exist, an empty list will be returned.
|
|
2795
|
+
*
|
|
2796
|
+
* > **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.
|
|
2797
|
+
*/
|
|
2798
|
+
(options?: ListChildAccountsOptions | undefined): Promise<ListChildAccountsResponse & ListChildAccountsResponseNonNullableFields>;
|
|
2799
|
+
}
|
|
2800
|
+
|
|
2801
|
+
declare const createAccount: MaybeContext<BuildRESTFunction<typeof createAccount$1> & typeof createAccount$1>;
|
|
2802
|
+
declare const listChildAccounts: MaybeContext<BuildRESTFunction<typeof listChildAccounts$1> & typeof listChildAccounts$1>;
|
|
2803
|
+
|
|
2804
|
+
type context$4_Account = Account;
|
|
2805
|
+
type context$4_AccountProperties = AccountProperties;
|
|
2806
|
+
type context$4_AccountResponse = AccountResponse;
|
|
2807
|
+
type context$4_AccountStatus = AccountStatus;
|
|
2808
|
+
declare const context$4_AccountStatus: typeof AccountStatus;
|
|
2809
|
+
type context$4_AccountV2 = AccountV2;
|
|
2810
|
+
type context$4_AccountsResponse = AccountsResponse;
|
|
2811
|
+
type context$4_CoBranding = CoBranding;
|
|
2812
|
+
declare const context$4_CoBranding: typeof CoBranding;
|
|
2813
|
+
type context$4_CreateAccountAndAssignUserRequest = CreateAccountAndAssignUserRequest;
|
|
2814
|
+
type context$4_CreateAccountForMyUserRequest = CreateAccountForMyUserRequest;
|
|
2815
|
+
type context$4_CreateAccountOptions = CreateAccountOptions;
|
|
2816
|
+
type context$4_CreateAccountRequest = CreateAccountRequest;
|
|
2817
|
+
type context$4_CreateAccountResponse = CreateAccountResponse;
|
|
2818
|
+
type context$4_CreateAccountResponseNonNullableFields = CreateAccountResponseNonNullableFields;
|
|
2819
|
+
type context$4_CreateAccountTenantRequest = CreateAccountTenantRequest;
|
|
2820
|
+
type context$4_CreateAccountTenantResponse = CreateAccountTenantResponse;
|
|
2821
|
+
type context$4_DeleteAccountRequest = DeleteAccountRequest;
|
|
2822
|
+
type context$4_Email = Email;
|
|
2823
|
+
type context$4_EmptyResponse = EmptyResponse;
|
|
2824
|
+
type context$4_GetAccountRequest = GetAccountRequest;
|
|
2825
|
+
type context$4_GetAccountsRequest = GetAccountsRequest;
|
|
2826
|
+
type context$4_GetMyAccountRequest = GetMyAccountRequest;
|
|
2827
|
+
type context$4_GetMyUserAccountsRequest = GetMyUserAccountsRequest;
|
|
2828
|
+
type context$4_GetParentAccountInfoRequest = GetParentAccountInfoRequest;
|
|
2829
|
+
type context$4_GetParentAccountInfoResponse = GetParentAccountInfoResponse;
|
|
2830
|
+
type context$4_GetSubAccountsRequest = GetSubAccountsRequest;
|
|
2831
|
+
type context$4_GetSubAccountsResponse = GetSubAccountsResponse;
|
|
2832
|
+
type context$4_GetUserAccountRequest = GetUserAccountRequest;
|
|
2833
|
+
type context$4_GetUserAccountsRequest = GetUserAccountsRequest;
|
|
2834
|
+
type context$4_IsTeamRequest = IsTeamRequest;
|
|
2835
|
+
type context$4_IsTeamResponse = IsTeamResponse;
|
|
2836
|
+
type context$4_ListChildAccountsOptions = ListChildAccountsOptions;
|
|
2837
|
+
type context$4_ListChildAccountsRequest = ListChildAccountsRequest;
|
|
2838
|
+
type context$4_ListChildAccountsResponse = ListChildAccountsResponse;
|
|
2839
|
+
type context$4_ListChildAccountsResponseNonNullableFields = ListChildAccountsResponseNonNullableFields;
|
|
2840
|
+
type context$4_MarkAccountFlagRequest = MarkAccountFlagRequest;
|
|
2841
|
+
type context$4_MarkAccountFlagRequestFlagOneOf = MarkAccountFlagRequestFlagOneOf;
|
|
2842
|
+
type context$4_PagingMetadata = PagingMetadata;
|
|
2843
|
+
type context$4_RemoveParent = RemoveParent;
|
|
2844
|
+
type context$4_SetIsReadOnlyAccountRequest = SetIsReadOnlyAccountRequest;
|
|
2845
|
+
type context$4_SsoIdentity = SsoIdentity;
|
|
2846
|
+
type context$4_SubAccountInfo = SubAccountInfo;
|
|
2847
|
+
type context$4_UpdateAccountRequest = UpdateAccountRequest;
|
|
2848
|
+
type context$4_UpdateParentAccountRequest = UpdateParentAccountRequest;
|
|
2849
|
+
type context$4_UpdateParentAccountRequestUpdateOneOf = UpdateParentAccountRequestUpdateOneOf;
|
|
2850
|
+
type context$4_UpdateParentAccountResponse = UpdateParentAccountResponse;
|
|
2851
|
+
type context$4_UpdateSlugRequest = UpdateSlugRequest;
|
|
2852
|
+
type context$4_UserDetails = UserDetails;
|
|
2853
|
+
declare const context$4_createAccount: typeof createAccount;
|
|
2854
|
+
declare const context$4_listChildAccounts: typeof listChildAccounts;
|
|
2855
|
+
declare namespace context$4 {
|
|
2856
|
+
export { type context$4_Account as Account, type AccountInfo$1 as AccountInfo, type context$4_AccountProperties as AccountProperties, type context$4_AccountResponse as AccountResponse, context$4_AccountStatus as AccountStatus, type context$4_AccountV2 as AccountV2, type context$4_AccountsResponse as AccountsResponse, context$4_CoBranding as CoBranding, type context$4_CreateAccountAndAssignUserRequest as CreateAccountAndAssignUserRequest, type context$4_CreateAccountForMyUserRequest as CreateAccountForMyUserRequest, type context$4_CreateAccountOptions as CreateAccountOptions, type context$4_CreateAccountRequest as CreateAccountRequest, type context$4_CreateAccountResponse as CreateAccountResponse, type context$4_CreateAccountResponseNonNullableFields as CreateAccountResponseNonNullableFields, type context$4_CreateAccountTenantRequest as CreateAccountTenantRequest, type context$4_CreateAccountTenantResponse as CreateAccountTenantResponse, type context$4_DeleteAccountRequest as DeleteAccountRequest, type context$4_Email as Email, type context$4_EmptyResponse as EmptyResponse, type context$4_GetAccountRequest as GetAccountRequest, type context$4_GetAccountsRequest as GetAccountsRequest, type context$4_GetMyAccountRequest as GetMyAccountRequest, type context$4_GetMyUserAccountsRequest as GetMyUserAccountsRequest, type context$4_GetParentAccountInfoRequest as GetParentAccountInfoRequest, type context$4_GetParentAccountInfoResponse as GetParentAccountInfoResponse, type context$4_GetSubAccountsRequest as GetSubAccountsRequest, type context$4_GetSubAccountsResponse as GetSubAccountsResponse, type context$4_GetUserAccountRequest as GetUserAccountRequest, type context$4_GetUserAccountsRequest as GetUserAccountsRequest, type context$4_IsTeamRequest as IsTeamRequest, type context$4_IsTeamResponse as IsTeamResponse, type context$4_ListChildAccountsOptions as ListChildAccountsOptions, type context$4_ListChildAccountsRequest as ListChildAccountsRequest, type context$4_ListChildAccountsResponse as ListChildAccountsResponse, type context$4_ListChildAccountsResponseNonNullableFields as ListChildAccountsResponseNonNullableFields, type context$4_MarkAccountFlagRequest as MarkAccountFlagRequest, type context$4_MarkAccountFlagRequestFlagOneOf as MarkAccountFlagRequestFlagOneOf, type Paging$1 as Paging, type context$4_PagingMetadata as PagingMetadata, type context$4_RemoveParent as RemoveParent, type context$4_SetIsReadOnlyAccountRequest as SetIsReadOnlyAccountRequest, type context$4_SsoIdentity as SsoIdentity, type context$4_SubAccountInfo as SubAccountInfo, type context$4_UpdateAccountRequest as UpdateAccountRequest, type context$4_UpdateParentAccountRequest as UpdateParentAccountRequest, type context$4_UpdateParentAccountRequestUpdateOneOf as UpdateParentAccountRequestUpdateOneOf, type context$4_UpdateParentAccountResponse as UpdateParentAccountResponse, type context$4_UpdateSlugRequest as UpdateSlugRequest, type User$1 as User, type context$4_UserDetails as UserDetails, context$4_createAccount as createAccount, context$4_listChildAccounts as listChildAccounts };
|
|
2857
|
+
}
|
|
2858
|
+
|
|
2859
|
+
interface AccountInvite {
|
|
2860
|
+
/**
|
|
2861
|
+
* Invite ID.
|
|
2862
|
+
* @readonly
|
|
2863
|
+
*/
|
|
2864
|
+
_id?: string;
|
|
2865
|
+
/**
|
|
2866
|
+
* Account ID.
|
|
2867
|
+
* @readonly
|
|
2868
|
+
*/
|
|
2869
|
+
accountId?: string;
|
|
2870
|
+
/** Email address where the invite was sent. */
|
|
2871
|
+
email?: string;
|
|
2872
|
+
/**
|
|
2873
|
+
* Deprecated. Use `policyIds`.
|
|
2874
|
+
* @deprecated
|
|
2875
|
+
*/
|
|
2876
|
+
role?: string;
|
|
2877
|
+
/**
|
|
2878
|
+
* Deprecated. Use `inviterAccountId`.
|
|
2879
|
+
* @readonly
|
|
2880
|
+
* @deprecated
|
|
2881
|
+
*/
|
|
2882
|
+
inviterId?: string;
|
|
2883
|
+
/**
|
|
2884
|
+
* Invite status.
|
|
2885
|
+
*
|
|
2886
|
+
* Supported values:
|
|
2887
|
+
* - **Pending:** The invite has been sent and is valid, waiting for the user's response.
|
|
2888
|
+
* - **Used:** The invite has been accepted.
|
|
2889
|
+
* - **Deleted:** The invite has been deleted or revoked.
|
|
2890
|
+
* - **Declined:** The user has declined the invite.
|
|
2891
|
+
* - **Expired:** The invite has expired without being accepted.
|
|
2892
|
+
*/
|
|
2893
|
+
status?: InviteStatus$2;
|
|
2894
|
+
/** Link to accept the invite. */
|
|
2895
|
+
acceptLink?: string;
|
|
2896
|
+
/**
|
|
2897
|
+
* Inviting account ID.
|
|
2898
|
+
* @readonly
|
|
2899
|
+
*/
|
|
2900
|
+
inviterAccountId?: string;
|
|
2901
|
+
/**
|
|
2902
|
+
* Account ID that accepted the invite. Populated only once the invite is accepted.
|
|
2903
|
+
* @readonly
|
|
2904
|
+
*/
|
|
2905
|
+
acceptedByAccountId?: string | null;
|
|
2906
|
+
/** Date the invite was created. */
|
|
2907
|
+
dateCreated?: Date | null;
|
|
2908
|
+
/** Role IDs included in the invite. */
|
|
2909
|
+
policyIds?: string[];
|
|
2910
|
+
/** Date the invite was last updated. */
|
|
2911
|
+
dateUpdated?: Date | null;
|
|
2912
|
+
/** Assets the users are invited to join. */
|
|
2913
|
+
assignments?: InviteResourceAssignment[];
|
|
2914
|
+
/** Invite expiration date. */
|
|
2915
|
+
expirationDate?: Date | null;
|
|
2916
|
+
}
|
|
2917
|
+
/** Invite status stating whether the invite was accepted, waiting to be accepted, deleted etc.. */
|
|
2918
|
+
declare enum InviteStatus$2 {
|
|
2919
|
+
Pending = "Pending",
|
|
2920
|
+
Used = "Used",
|
|
2921
|
+
Deleted = "Deleted",
|
|
2922
|
+
Declined = "Declined",
|
|
2923
|
+
Expired = "Expired"
|
|
2924
|
+
}
|
|
2925
|
+
interface InviteResourceAssignment {
|
|
2926
|
+
/** Role ID. */
|
|
2927
|
+
policyId?: string;
|
|
2928
|
+
/** Resources the user will be able to access. */
|
|
2929
|
+
assignments?: InviteAssignment[];
|
|
2930
|
+
}
|
|
2931
|
+
interface InviteAssignment {
|
|
2932
|
+
/** Full name of resource to be assigned. */
|
|
2933
|
+
fullNameResource?: FullNameResource;
|
|
2934
|
+
}
|
|
2935
|
+
interface FullNameResource extends FullNameResourceResourceContextOneOf {
|
|
2936
|
+
/** Specific site details. */
|
|
2937
|
+
siteContext?: SiteResourceContext;
|
|
2938
|
+
/** Specific account details. */
|
|
2939
|
+
accountContext?: AccountResourceContext;
|
|
2940
|
+
}
|
|
2941
|
+
/** @oneof */
|
|
2942
|
+
interface FullNameResourceResourceContextOneOf {
|
|
2943
|
+
/** Specific site details. */
|
|
2944
|
+
siteContext?: SiteResourceContext;
|
|
2945
|
+
/** Specific account details. */
|
|
2946
|
+
accountContext?: AccountResourceContext;
|
|
2947
|
+
}
|
|
2948
|
+
/** 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) */
|
|
2949
|
+
interface SiteResourceContext {
|
|
2950
|
+
/** Site ID. */
|
|
2951
|
+
metasiteId?: string;
|
|
2952
|
+
}
|
|
2953
|
+
/** 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) */
|
|
2954
|
+
interface AccountResourceContext {
|
|
2955
|
+
/** Account ID. */
|
|
2956
|
+
accountId?: string;
|
|
2957
|
+
}
|
|
2958
|
+
interface OrganizationResourceContext {
|
|
2959
|
+
}
|
|
2960
|
+
/**
|
|
2961
|
+
* A custom resource. Is used to represent some asset that is not a direct resource context (site or account), but something custom.
|
|
2962
|
+
* For example: payment method, blog post, domain, logo.
|
|
2963
|
+
*/
|
|
2964
|
+
interface Resource$1 {
|
|
2965
|
+
/** The resource id. */
|
|
2966
|
+
_id?: string | null;
|
|
2967
|
+
/** The resource type */
|
|
2968
|
+
type?: string | null;
|
|
2969
|
+
}
|
|
2970
|
+
interface PolicyCondition {
|
|
2971
|
+
/** The type of the condition */
|
|
2972
|
+
condition?: ConditionType;
|
|
2973
|
+
}
|
|
2974
|
+
interface ConditionType extends ConditionTypeOfOneOf {
|
|
2975
|
+
/** @deprecated */
|
|
2976
|
+
simpleCondition?: SimpleCondition;
|
|
2977
|
+
/** A logic combination between several conditions, with an operator between them */
|
|
2978
|
+
joinedConditions?: JoinedCondition;
|
|
2979
|
+
/** @deprecated */
|
|
2980
|
+
environmentCondition?: EnvironmentCondition;
|
|
2981
|
+
/** A single condition */
|
|
2982
|
+
condition?: Condition$1;
|
|
2983
|
+
}
|
|
2984
|
+
/** @oneof */
|
|
2985
|
+
interface ConditionTypeOfOneOf {
|
|
2986
|
+
/** @deprecated */
|
|
2987
|
+
simpleCondition?: SimpleCondition;
|
|
2988
|
+
/** A logic combination between several conditions, with an operator between them */
|
|
2989
|
+
joinedConditions?: JoinedCondition;
|
|
2990
|
+
/** @deprecated */
|
|
2991
|
+
environmentCondition?: EnvironmentCondition;
|
|
2992
|
+
/** A single condition */
|
|
2993
|
+
condition?: Condition$1;
|
|
2994
|
+
}
|
|
2995
|
+
interface SimpleCondition {
|
|
2996
|
+
attrName?: string;
|
|
2997
|
+
value?: SimpleConditionValue;
|
|
2998
|
+
op?: SimpleConditionOperator;
|
|
2999
|
+
conditionModelId?: string;
|
|
3000
|
+
}
|
|
3001
|
+
interface SimpleConditionValue extends SimpleConditionValueValueOneOf {
|
|
3002
|
+
attrName?: string;
|
|
3003
|
+
stringValue?: string;
|
|
3004
|
+
boolValue?: boolean;
|
|
3005
|
+
}
|
|
3006
|
+
/** @oneof */
|
|
3007
|
+
interface SimpleConditionValueValueOneOf {
|
|
3008
|
+
attrName?: string;
|
|
3009
|
+
stringValue?: string;
|
|
3010
|
+
boolValue?: boolean;
|
|
3011
|
+
}
|
|
3012
|
+
declare enum SimpleConditionOperator {
|
|
3013
|
+
UNKNOWN_SIMPLE_OP = "UNKNOWN_SIMPLE_OP",
|
|
3014
|
+
EQUAL = "EQUAL"
|
|
3015
|
+
}
|
|
3016
|
+
interface JoinedCondition {
|
|
3017
|
+
/** The operator that should be used when evaluating the condition */
|
|
3018
|
+
op?: JoinedConditionOperator;
|
|
3019
|
+
/** The conditions that should be evaluated, and then joined using the operator provided */
|
|
3020
|
+
conditions?: ConditionType[];
|
|
3021
|
+
}
|
|
3022
|
+
declare enum JoinedConditionOperator {
|
|
3023
|
+
UNKNOWN_JOIN_OP = "UNKNOWN_JOIN_OP",
|
|
3024
|
+
OR = "OR",
|
|
3025
|
+
AND = "AND"
|
|
3026
|
+
}
|
|
3027
|
+
interface EnvironmentCondition extends EnvironmentConditionConditionOneOf {
|
|
3028
|
+
experimentCondition?: ExperimentCondition;
|
|
3029
|
+
}
|
|
3030
|
+
/** @oneof */
|
|
3031
|
+
interface EnvironmentConditionConditionOneOf {
|
|
3032
|
+
experimentCondition?: ExperimentCondition;
|
|
3033
|
+
}
|
|
3034
|
+
interface ExperimentCondition {
|
|
3035
|
+
spec?: string;
|
|
3036
|
+
fallbackValue?: string;
|
|
3037
|
+
expectedValue?: string;
|
|
3038
|
+
}
|
|
3039
|
+
interface Condition$1 {
|
|
3040
|
+
/** The unique identifier of the condition model. Indicates which actions the condition is working on */
|
|
3041
|
+
conditionModelId?: string;
|
|
3042
|
+
/** The operator that should be evaluated */
|
|
3043
|
+
operator?: ConditionOperator;
|
|
3044
|
+
}
|
|
3045
|
+
interface ConditionOperator extends ConditionOperatorOperatorsOneOf {
|
|
3046
|
+
/** Comparison of equality - will be evaluated to true if the given parties are equal */
|
|
3047
|
+
equals?: EqualOperator;
|
|
3048
|
+
/** Regex operator - will be evaluated to true if the given value matches the provided regex */
|
|
3049
|
+
like?: LikeOperator;
|
|
3050
|
+
/** Petri experiment - will be evaluated using petri. */
|
|
3051
|
+
experiment?: ExperimentOperator;
|
|
3052
|
+
/** Operator that indicates a dependency on another subject being allowed to perform something. */
|
|
3053
|
+
dependOn?: DependOnOperator;
|
|
3054
|
+
}
|
|
3055
|
+
/** @oneof */
|
|
3056
|
+
interface ConditionOperatorOperatorsOneOf {
|
|
3057
|
+
/** Comparison of equality - will be evaluated to true if the given parties are equal */
|
|
3058
|
+
equals?: EqualOperator;
|
|
3059
|
+
/** Regex operator - will be evaluated to true if the given value matches the provided regex */
|
|
3060
|
+
like?: LikeOperator;
|
|
3061
|
+
/** Petri experiment - will be evaluated using petri. */
|
|
3062
|
+
experiment?: ExperimentOperator;
|
|
3063
|
+
/** Operator that indicates a dependency on another subject being allowed to perform something. */
|
|
3064
|
+
dependOn?: DependOnOperator;
|
|
3065
|
+
}
|
|
3066
|
+
interface EqualOperator {
|
|
3067
|
+
/** The attribute which should be compared. The attribute will be first evaluated to a value, and then compared the other side (attribute/value) */
|
|
3068
|
+
attrName?: string;
|
|
3069
|
+
/** The value to compare to. If the two parties are equal - we will return true. */
|
|
3070
|
+
value?: ConditionValue;
|
|
3071
|
+
}
|
|
3072
|
+
interface ConditionValue extends ConditionValueValueOneOf {
|
|
3073
|
+
/** 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. */
|
|
3074
|
+
attrName?: string;
|
|
3075
|
+
/** a value with a string type. Will be compared to the attribute provided, and be true only if they match the operator. */
|
|
3076
|
+
stringValue?: string;
|
|
3077
|
+
/** a value with a boolean type. Will be compared to the attribute provided, and be true only if they match the operator. */
|
|
3078
|
+
boolValue?: boolean;
|
|
3079
|
+
}
|
|
3080
|
+
/** @oneof */
|
|
3081
|
+
interface ConditionValueValueOneOf {
|
|
3082
|
+
/** 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. */
|
|
3083
|
+
attrName?: string;
|
|
3084
|
+
/** a value with a string type. Will be compared to the attribute provided, and be true only if they match the operator. */
|
|
3085
|
+
stringValue?: string;
|
|
3086
|
+
/** a value with a boolean type. Will be compared to the attribute provided, and be true only if they match the operator. */
|
|
3087
|
+
boolValue?: boolean;
|
|
3088
|
+
}
|
|
3089
|
+
interface LikeOperator {
|
|
3090
|
+
/** The attribute which should be compared. The attribute will be first evaluated to a value, and then compared the regex values provided. */
|
|
3091
|
+
attrName?: string;
|
|
3092
|
+
/** 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 */
|
|
3093
|
+
values?: string[];
|
|
3094
|
+
}
|
|
3095
|
+
interface ExperimentOperator {
|
|
3096
|
+
/** The spec to conduct the experiment on. */
|
|
3097
|
+
spec?: string;
|
|
3098
|
+
/** The value to use if the experiment could not be conducted */
|
|
3099
|
+
fallbackValue?: string;
|
|
3100
|
+
/** The expected value of the experiment conduction. If it matches the actual value - true will be returned. Otherwise - false. */
|
|
3101
|
+
expectedValue?: string;
|
|
3102
|
+
}
|
|
3103
|
+
/** Implies that the policy takes affect only if the depend on subject is permitted as well. */
|
|
3104
|
+
interface DependOnOperator {
|
|
3105
|
+
/** 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 */
|
|
3106
|
+
dependOnSubject?: Subject$1;
|
|
3107
|
+
}
|
|
3108
|
+
interface Subject$1 {
|
|
3109
|
+
/** ID of identity assigned to the asset. */
|
|
3110
|
+
_id?: string;
|
|
3111
|
+
/** Type of identity assigned to the asset. Supported subject types include user IDs, account IDs, and app IDs. */
|
|
3112
|
+
subjectType?: SubjectType$2;
|
|
3113
|
+
/** Context of identity assigned to the asset. For example, a `subjectType` = `USER` will have `context` = `ACCOUNT`. */
|
|
3114
|
+
context?: SubjectContext$1;
|
|
3115
|
+
}
|
|
3116
|
+
declare enum SubjectType$2 {
|
|
3117
|
+
UNKNOWN = "UNKNOWN",
|
|
3118
|
+
ACCOUNT = "ACCOUNT",
|
|
3119
|
+
USER = "USER",
|
|
3120
|
+
USER_GROUP = "USER_GROUP",
|
|
3121
|
+
MEMBER_GROUP = "MEMBER_GROUP",
|
|
3122
|
+
VISITOR_GROUP = "VISITOR_GROUP",
|
|
3123
|
+
EXTERNAL_APP = "EXTERNAL_APP",
|
|
3124
|
+
ACCOUNT_GROUP = "ACCOUNT_GROUP",
|
|
3125
|
+
WIX_APP = "WIX_APP"
|
|
3126
|
+
}
|
|
3127
|
+
interface SubjectContext$1 {
|
|
3128
|
+
_id?: string;
|
|
3129
|
+
contextType?: SubjectContextType$1;
|
|
3130
|
+
}
|
|
3131
|
+
declare enum SubjectContextType$1 {
|
|
3132
|
+
UNKNOWN_CTX = "UNKNOWN_CTX",
|
|
3133
|
+
ORG_CTX = "ORG_CTX",
|
|
3134
|
+
ACCOUNT_CTX = "ACCOUNT_CTX"
|
|
3135
|
+
}
|
|
3136
|
+
interface GetAccountInvitesRequest {
|
|
3137
|
+
}
|
|
3138
|
+
interface GetAccountInvitesResponse {
|
|
3139
|
+
invites?: AccountInvite[];
|
|
3140
|
+
}
|
|
3141
|
+
interface GetAccountInviteRequest {
|
|
3142
|
+
_id?: string;
|
|
3143
|
+
}
|
|
3144
|
+
interface GetAccountInviteResponse {
|
|
3145
|
+
invite?: AccountInvite;
|
|
3146
|
+
}
|
|
3147
|
+
interface AccountInviteRequest {
|
|
3148
|
+
role?: string;
|
|
3149
|
+
email?: string;
|
|
3150
|
+
policyIds?: string[];
|
|
3151
|
+
}
|
|
3152
|
+
interface AccountInviteResponse {
|
|
3153
|
+
invite?: AccountInvite;
|
|
3154
|
+
}
|
|
3155
|
+
interface CreateInviteRequest {
|
|
3156
|
+
/** Array of potential team members' email addresses and their corresponding assignments (how they will be assigned when they accept the invite). */
|
|
3157
|
+
subjectsAssignments: SubjectInviteAssignments[];
|
|
3158
|
+
/** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
|
|
3159
|
+
defaultEmailLanguage?: string | null;
|
|
3160
|
+
}
|
|
3161
|
+
interface SubjectInviteAssignments {
|
|
3162
|
+
/** Invitee's email address. */
|
|
3163
|
+
subjectEmail?: string;
|
|
3164
|
+
/** 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. */
|
|
3165
|
+
assignments?: InviteResourceAssignment[];
|
|
3166
|
+
}
|
|
3167
|
+
interface CreateInviteResponse {
|
|
3168
|
+
/** Invites that were sent successfully. */
|
|
3169
|
+
successfulInvites?: AccountInvite[];
|
|
3170
|
+
/** Invites that failed. */
|
|
3171
|
+
failedInvites?: InviteFailure[];
|
|
3172
|
+
}
|
|
3173
|
+
interface InviteFailure {
|
|
3174
|
+
/** Email address of the failed invite. */
|
|
3175
|
+
subjectEmail?: string;
|
|
3176
|
+
/** Error description. */
|
|
3177
|
+
errorMessage?: string;
|
|
3178
|
+
}
|
|
3179
|
+
interface BulkAccountInviteRequest {
|
|
3180
|
+
role?: string;
|
|
3181
|
+
emails?: string[];
|
|
3182
|
+
policyIds?: string[];
|
|
3183
|
+
}
|
|
3184
|
+
interface BulkAccountInviteResponse {
|
|
3185
|
+
invites?: AccountInvite[];
|
|
3186
|
+
failedEmails?: string[];
|
|
3187
|
+
}
|
|
3188
|
+
interface ResendAccountInviteRequest {
|
|
3189
|
+
inviteId?: string;
|
|
3190
|
+
/** 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 */
|
|
3191
|
+
defaultEmailLanguage?: string | null;
|
|
3192
|
+
}
|
|
3193
|
+
interface AcceptAccountInviteRequest {
|
|
3194
|
+
inviteToken?: string;
|
|
3195
|
+
}
|
|
3196
|
+
interface AcceptAccountInviteResponse {
|
|
3197
|
+
}
|
|
3198
|
+
interface RevokeAccountInviteRequest {
|
|
3199
|
+
inviteId?: string;
|
|
3200
|
+
}
|
|
3201
|
+
interface RevokeAccountInviteResponse {
|
|
3202
|
+
}
|
|
3203
|
+
interface UpdateAccountInviteRequest {
|
|
3204
|
+
inviteId?: string;
|
|
3205
|
+
role?: string;
|
|
3206
|
+
policyIds?: string[];
|
|
3207
|
+
}
|
|
3208
|
+
interface UpdateAccountInviteResponse {
|
|
3209
|
+
}
|
|
3210
|
+
interface UpdateAccountInviteAssignmentsRequest {
|
|
3211
|
+
inviteId?: string;
|
|
3212
|
+
assignments?: InviteResourceAssignment[];
|
|
3213
|
+
}
|
|
3214
|
+
interface UpdateAccountInviteAssignmentsResponse {
|
|
3215
|
+
}
|
|
3216
|
+
interface ParseAccountInviteTokenRequest {
|
|
3217
|
+
inviteToken?: string;
|
|
3218
|
+
}
|
|
3219
|
+
interface ParseAccountInviteTokenResponse {
|
|
3220
|
+
inviteId?: string;
|
|
3221
|
+
accountId?: string;
|
|
3222
|
+
status?: InviteStatus$2;
|
|
3223
|
+
}
|
|
3224
|
+
interface SiteResourceContextNonNullableFields {
|
|
3225
|
+
metasiteId: string;
|
|
3226
|
+
}
|
|
3227
|
+
interface AccountResourceContextNonNullableFields {
|
|
3228
|
+
accountId: string;
|
|
3229
|
+
}
|
|
3230
|
+
interface FullNameResourceNonNullableFields {
|
|
3231
|
+
siteContext?: SiteResourceContextNonNullableFields;
|
|
3232
|
+
accountContext?: AccountResourceContextNonNullableFields;
|
|
3233
|
+
}
|
|
3234
|
+
interface SimpleConditionValueNonNullableFields {
|
|
3235
|
+
attrName: string;
|
|
3236
|
+
stringValue: string;
|
|
3237
|
+
boolValue: boolean;
|
|
3238
|
+
}
|
|
3239
|
+
interface SimpleConditionNonNullableFields {
|
|
3240
|
+
attrName: string;
|
|
3241
|
+
value?: SimpleConditionValueNonNullableFields;
|
|
3242
|
+
op: SimpleConditionOperator;
|
|
3243
|
+
conditionModelId: string;
|
|
3244
|
+
}
|
|
3245
|
+
interface JoinedConditionNonNullableFields {
|
|
3246
|
+
op: JoinedConditionOperator;
|
|
3247
|
+
conditions: ConditionTypeNonNullableFields[];
|
|
3248
|
+
}
|
|
3249
|
+
interface ExperimentConditionNonNullableFields {
|
|
3250
|
+
spec: string;
|
|
3251
|
+
fallbackValue: string;
|
|
3252
|
+
expectedValue: string;
|
|
3253
|
+
}
|
|
3254
|
+
interface EnvironmentConditionNonNullableFields {
|
|
3255
|
+
experimentCondition?: ExperimentConditionNonNullableFields;
|
|
3256
|
+
}
|
|
3257
|
+
interface ConditionValueNonNullableFields {
|
|
3258
|
+
attrName: string;
|
|
3259
|
+
stringValue: string;
|
|
3260
|
+
boolValue: boolean;
|
|
3261
|
+
}
|
|
3262
|
+
interface EqualOperatorNonNullableFields {
|
|
3263
|
+
attrName: string;
|
|
3264
|
+
value?: ConditionValueNonNullableFields;
|
|
3265
|
+
}
|
|
3266
|
+
interface LikeOperatorNonNullableFields {
|
|
3267
|
+
attrName: string;
|
|
3268
|
+
values: string[];
|
|
3269
|
+
}
|
|
3270
|
+
interface ExperimentOperatorNonNullableFields {
|
|
3271
|
+
spec: string;
|
|
3272
|
+
fallbackValue: string;
|
|
3273
|
+
expectedValue: string;
|
|
3274
|
+
}
|
|
3275
|
+
interface SubjectContextNonNullableFields {
|
|
3276
|
+
_id: string;
|
|
3277
|
+
contextType: SubjectContextType$1;
|
|
3278
|
+
}
|
|
3279
|
+
interface SubjectNonNullableFields {
|
|
3280
|
+
_id: string;
|
|
3281
|
+
subjectType: SubjectType$2;
|
|
3282
|
+
context?: SubjectContextNonNullableFields;
|
|
3283
|
+
}
|
|
3284
|
+
interface DependOnOperatorNonNullableFields {
|
|
3285
|
+
dependOnSubject?: SubjectNonNullableFields;
|
|
3286
|
+
}
|
|
3287
|
+
interface ConditionOperatorNonNullableFields {
|
|
3288
|
+
equals?: EqualOperatorNonNullableFields;
|
|
3289
|
+
like?: LikeOperatorNonNullableFields;
|
|
3290
|
+
experiment?: ExperimentOperatorNonNullableFields;
|
|
3291
|
+
dependOn?: DependOnOperatorNonNullableFields;
|
|
3292
|
+
}
|
|
3293
|
+
interface ConditionNonNullableFields {
|
|
3294
|
+
conditionModelId: string;
|
|
3295
|
+
operator?: ConditionOperatorNonNullableFields;
|
|
3296
|
+
}
|
|
3297
|
+
interface ConditionTypeNonNullableFields {
|
|
3298
|
+
simpleCondition?: SimpleConditionNonNullableFields;
|
|
3299
|
+
joinedConditions?: JoinedConditionNonNullableFields;
|
|
3300
|
+
environmentCondition?: EnvironmentConditionNonNullableFields;
|
|
3301
|
+
condition?: ConditionNonNullableFields;
|
|
3302
|
+
}
|
|
3303
|
+
interface PolicyConditionNonNullableFields {
|
|
3304
|
+
condition?: ConditionTypeNonNullableFields;
|
|
3305
|
+
}
|
|
3306
|
+
interface InviteAssignmentNonNullableFields {
|
|
3307
|
+
fullNameResource?: FullNameResourceNonNullableFields;
|
|
3308
|
+
condition?: PolicyConditionNonNullableFields;
|
|
3309
|
+
}
|
|
3310
|
+
interface InviteResourceAssignmentNonNullableFields {
|
|
3311
|
+
policyId: string;
|
|
3312
|
+
assignments: InviteAssignmentNonNullableFields[];
|
|
3313
|
+
}
|
|
3314
|
+
interface AccountInviteNonNullableFields {
|
|
3315
|
+
_id: string;
|
|
3316
|
+
accountId: string;
|
|
3317
|
+
email: string;
|
|
3318
|
+
role: string;
|
|
3319
|
+
inviterId: string;
|
|
3320
|
+
status: InviteStatus$2;
|
|
3321
|
+
acceptLink: string;
|
|
3322
|
+
inviterAccountId: string;
|
|
3323
|
+
policyIds: string[];
|
|
3324
|
+
assignments: InviteResourceAssignmentNonNullableFields[];
|
|
3325
|
+
}
|
|
3326
|
+
interface InviteFailureNonNullableFields {
|
|
3327
|
+
subjectEmail: string;
|
|
3328
|
+
errorMessage: string;
|
|
3329
|
+
}
|
|
3330
|
+
interface CreateInviteResponseNonNullableFields {
|
|
3331
|
+
successfulInvites: AccountInviteNonNullableFields[];
|
|
3332
|
+
failedInvites: InviteFailureNonNullableFields[];
|
|
3333
|
+
}
|
|
3334
|
+
interface CreateInviteOptions {
|
|
3335
|
+
/** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
|
|
3336
|
+
defaultEmailLanguage?: string | null;
|
|
3337
|
+
}
|
|
3338
|
+
|
|
3339
|
+
declare function createInvite$1(httpClient: HttpClient): CreateInviteSignature;
|
|
3340
|
+
interface CreateInviteSignature {
|
|
3341
|
+
/**
|
|
3342
|
+
* Creates and sends invite emails to a list of potential team members, inviting them to become team members of the requesting account.
|
|
3343
|
+
* The invites may be limited to a specific resource (site or other asset).
|
|
3344
|
+
* Maximum 50 invitees can be specified per call.
|
|
3345
|
+
*
|
|
3346
|
+
* > **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.
|
|
3347
|
+
* @param - Array of potential team members' email addresses and their corresponding assignments (how they will be assigned when they accept the invite).
|
|
3348
|
+
* @param - Filter options.
|
|
3349
|
+
*/
|
|
3350
|
+
(subjectsAssignments: SubjectInviteAssignments[], options?: CreateInviteOptions | undefined): Promise<CreateInviteResponse & CreateInviteResponseNonNullableFields>;
|
|
3351
|
+
}
|
|
3352
|
+
|
|
3353
|
+
declare const createInvite: MaybeContext<BuildRESTFunction<typeof createInvite$1> & typeof createInvite$1>;
|
|
3354
|
+
|
|
3355
|
+
type context$3_AcceptAccountInviteRequest = AcceptAccountInviteRequest;
|
|
3356
|
+
type context$3_AcceptAccountInviteResponse = AcceptAccountInviteResponse;
|
|
3357
|
+
type context$3_AccountInvite = AccountInvite;
|
|
3358
|
+
type context$3_AccountInviteRequest = AccountInviteRequest;
|
|
3359
|
+
type context$3_AccountInviteResponse = AccountInviteResponse;
|
|
3360
|
+
type context$3_AccountResourceContext = AccountResourceContext;
|
|
3361
|
+
type context$3_BulkAccountInviteRequest = BulkAccountInviteRequest;
|
|
3362
|
+
type context$3_BulkAccountInviteResponse = BulkAccountInviteResponse;
|
|
3363
|
+
type context$3_ConditionOperator = ConditionOperator;
|
|
3364
|
+
type context$3_ConditionOperatorOperatorsOneOf = ConditionOperatorOperatorsOneOf;
|
|
3365
|
+
type context$3_ConditionType = ConditionType;
|
|
3366
|
+
type context$3_ConditionTypeOfOneOf = ConditionTypeOfOneOf;
|
|
3367
|
+
type context$3_ConditionValue = ConditionValue;
|
|
3368
|
+
type context$3_ConditionValueValueOneOf = ConditionValueValueOneOf;
|
|
3369
|
+
type context$3_CreateInviteOptions = CreateInviteOptions;
|
|
3370
|
+
type context$3_CreateInviteRequest = CreateInviteRequest;
|
|
3371
|
+
type context$3_CreateInviteResponse = CreateInviteResponse;
|
|
3372
|
+
type context$3_CreateInviteResponseNonNullableFields = CreateInviteResponseNonNullableFields;
|
|
3373
|
+
type context$3_DependOnOperator = DependOnOperator;
|
|
3374
|
+
type context$3_EnvironmentCondition = EnvironmentCondition;
|
|
3375
|
+
type context$3_EnvironmentConditionConditionOneOf = EnvironmentConditionConditionOneOf;
|
|
3376
|
+
type context$3_EqualOperator = EqualOperator;
|
|
3377
|
+
type context$3_ExperimentCondition = ExperimentCondition;
|
|
3378
|
+
type context$3_ExperimentOperator = ExperimentOperator;
|
|
3379
|
+
type context$3_FullNameResource = FullNameResource;
|
|
3380
|
+
type context$3_FullNameResourceResourceContextOneOf = FullNameResourceResourceContextOneOf;
|
|
3381
|
+
type context$3_GetAccountInviteRequest = GetAccountInviteRequest;
|
|
3382
|
+
type context$3_GetAccountInviteResponse = GetAccountInviteResponse;
|
|
3383
|
+
type context$3_GetAccountInvitesRequest = GetAccountInvitesRequest;
|
|
3384
|
+
type context$3_GetAccountInvitesResponse = GetAccountInvitesResponse;
|
|
3385
|
+
type context$3_InviteAssignment = InviteAssignment;
|
|
3386
|
+
type context$3_InviteFailure = InviteFailure;
|
|
3387
|
+
type context$3_InviteResourceAssignment = InviteResourceAssignment;
|
|
3388
|
+
type context$3_JoinedCondition = JoinedCondition;
|
|
3389
|
+
type context$3_JoinedConditionOperator = JoinedConditionOperator;
|
|
3390
|
+
declare const context$3_JoinedConditionOperator: typeof JoinedConditionOperator;
|
|
3391
|
+
type context$3_LikeOperator = LikeOperator;
|
|
3392
|
+
type context$3_OrganizationResourceContext = OrganizationResourceContext;
|
|
3393
|
+
type context$3_ParseAccountInviteTokenRequest = ParseAccountInviteTokenRequest;
|
|
3394
|
+
type context$3_ParseAccountInviteTokenResponse = ParseAccountInviteTokenResponse;
|
|
3395
|
+
type context$3_PolicyCondition = PolicyCondition;
|
|
3396
|
+
type context$3_ResendAccountInviteRequest = ResendAccountInviteRequest;
|
|
3397
|
+
type context$3_RevokeAccountInviteRequest = RevokeAccountInviteRequest;
|
|
3398
|
+
type context$3_RevokeAccountInviteResponse = RevokeAccountInviteResponse;
|
|
3399
|
+
type context$3_SimpleCondition = SimpleCondition;
|
|
3400
|
+
type context$3_SimpleConditionOperator = SimpleConditionOperator;
|
|
3401
|
+
declare const context$3_SimpleConditionOperator: typeof SimpleConditionOperator;
|
|
3402
|
+
type context$3_SimpleConditionValue = SimpleConditionValue;
|
|
3403
|
+
type context$3_SimpleConditionValueValueOneOf = SimpleConditionValueValueOneOf;
|
|
3404
|
+
type context$3_SiteResourceContext = SiteResourceContext;
|
|
3405
|
+
type context$3_SubjectInviteAssignments = SubjectInviteAssignments;
|
|
3406
|
+
type context$3_UpdateAccountInviteAssignmentsRequest = UpdateAccountInviteAssignmentsRequest;
|
|
3407
|
+
type context$3_UpdateAccountInviteAssignmentsResponse = UpdateAccountInviteAssignmentsResponse;
|
|
3408
|
+
type context$3_UpdateAccountInviteRequest = UpdateAccountInviteRequest;
|
|
3409
|
+
type context$3_UpdateAccountInviteResponse = UpdateAccountInviteResponse;
|
|
3410
|
+
declare const context$3_createInvite: typeof createInvite;
|
|
3411
|
+
declare namespace context$3 {
|
|
3412
|
+
export { type context$3_AcceptAccountInviteRequest as AcceptAccountInviteRequest, type context$3_AcceptAccountInviteResponse as AcceptAccountInviteResponse, type context$3_AccountInvite as AccountInvite, type context$3_AccountInviteRequest as AccountInviteRequest, type context$3_AccountInviteResponse as AccountInviteResponse, type context$3_AccountResourceContext as AccountResourceContext, type context$3_BulkAccountInviteRequest as BulkAccountInviteRequest, type context$3_BulkAccountInviteResponse as BulkAccountInviteResponse, type Condition$1 as Condition, type context$3_ConditionOperator as ConditionOperator, type context$3_ConditionOperatorOperatorsOneOf as ConditionOperatorOperatorsOneOf, type context$3_ConditionType as ConditionType, type context$3_ConditionTypeOfOneOf as ConditionTypeOfOneOf, type context$3_ConditionValue as ConditionValue, type context$3_ConditionValueValueOneOf as ConditionValueValueOneOf, type context$3_CreateInviteOptions as CreateInviteOptions, type context$3_CreateInviteRequest as CreateInviteRequest, type context$3_CreateInviteResponse as CreateInviteResponse, type context$3_CreateInviteResponseNonNullableFields as CreateInviteResponseNonNullableFields, type context$3_DependOnOperator as DependOnOperator, type context$3_EnvironmentCondition as EnvironmentCondition, type context$3_EnvironmentConditionConditionOneOf as EnvironmentConditionConditionOneOf, type context$3_EqualOperator as EqualOperator, type context$3_ExperimentCondition as ExperimentCondition, type context$3_ExperimentOperator as ExperimentOperator, type context$3_FullNameResource as FullNameResource, type context$3_FullNameResourceResourceContextOneOf as FullNameResourceResourceContextOneOf, type context$3_GetAccountInviteRequest as GetAccountInviteRequest, type context$3_GetAccountInviteResponse as GetAccountInviteResponse, type context$3_GetAccountInvitesRequest as GetAccountInvitesRequest, type context$3_GetAccountInvitesResponse as GetAccountInvitesResponse, type context$3_InviteAssignment as InviteAssignment, type context$3_InviteFailure as InviteFailure, type context$3_InviteResourceAssignment as InviteResourceAssignment, InviteStatus$2 as InviteStatus, type context$3_JoinedCondition as JoinedCondition, context$3_JoinedConditionOperator as JoinedConditionOperator, type context$3_LikeOperator as LikeOperator, type context$3_OrganizationResourceContext as OrganizationResourceContext, type context$3_ParseAccountInviteTokenRequest as ParseAccountInviteTokenRequest, type context$3_ParseAccountInviteTokenResponse as ParseAccountInviteTokenResponse, type context$3_PolicyCondition as PolicyCondition, type context$3_ResendAccountInviteRequest as ResendAccountInviteRequest, type Resource$1 as Resource, type context$3_RevokeAccountInviteRequest as RevokeAccountInviteRequest, type context$3_RevokeAccountInviteResponse as RevokeAccountInviteResponse, type context$3_SimpleCondition as SimpleCondition, context$3_SimpleConditionOperator as SimpleConditionOperator, type context$3_SimpleConditionValue as SimpleConditionValue, type context$3_SimpleConditionValueValueOneOf as SimpleConditionValueValueOneOf, type context$3_SiteResourceContext as SiteResourceContext, type Subject$1 as Subject, type SubjectContext$1 as SubjectContext, SubjectContextType$1 as SubjectContextType, type context$3_SubjectInviteAssignments as SubjectInviteAssignments, SubjectType$2 as SubjectType, type context$3_UpdateAccountInviteAssignmentsRequest as UpdateAccountInviteAssignmentsRequest, type context$3_UpdateAccountInviteAssignmentsResponse as UpdateAccountInviteAssignmentsResponse, type context$3_UpdateAccountInviteRequest as UpdateAccountInviteRequest, type context$3_UpdateAccountInviteResponse as UpdateAccountInviteResponse, context$3_createInvite as createInvite };
|
|
3413
|
+
}
|
|
3414
|
+
|
|
3415
|
+
interface SiteInvite$1 {
|
|
3416
|
+
/**
|
|
3417
|
+
* Invite ID.
|
|
3418
|
+
* @readonly
|
|
3419
|
+
*/
|
|
3420
|
+
_id?: string;
|
|
3421
|
+
/**
|
|
3422
|
+
* Site ID the user is invited to as a collaborator.
|
|
3423
|
+
* @readonly
|
|
3424
|
+
*/
|
|
3425
|
+
siteId?: string;
|
|
3426
|
+
/** Email address where the invite was sent. */
|
|
3427
|
+
email?: string;
|
|
3428
|
+
/** Role IDs included in the invite. */
|
|
3429
|
+
policyIds?: string[];
|
|
3430
|
+
/**
|
|
3431
|
+
* Deprecated. Use `inviterAccountId`.
|
|
3432
|
+
* @readonly
|
|
3433
|
+
* @deprecated
|
|
3434
|
+
*/
|
|
3435
|
+
inviterId?: string;
|
|
3436
|
+
/**
|
|
3437
|
+
* Invite Status.
|
|
3438
|
+
*
|
|
3439
|
+
* Supported values:
|
|
3440
|
+
* - **Pending:** The invite has been sent and is valid, waiting for the user's response.
|
|
3441
|
+
* - **Used:** The invite has been accepted.
|
|
3442
|
+
* - **Deleted:** The invite has been deleted or revoked.
|
|
3443
|
+
* - **Declined:** The user declined the invite.
|
|
3444
|
+
* - **Expired:** The invite has expired without being accepted.
|
|
3445
|
+
*/
|
|
3446
|
+
status?: InviteStatus$1;
|
|
3447
|
+
/** Link to accept the invite. */
|
|
3448
|
+
acceptLink?: string;
|
|
3449
|
+
/**
|
|
3450
|
+
* Inviting account ID.
|
|
3451
|
+
* @readonly
|
|
3452
|
+
*/
|
|
3453
|
+
inviterAccountId?: string;
|
|
3454
|
+
/**
|
|
3455
|
+
* Account ID that accepted the invite. Populated only once the invite is accepted.
|
|
3456
|
+
* @readonly
|
|
3457
|
+
*/
|
|
3458
|
+
acceptedByAccountId?: string | null;
|
|
3459
|
+
/** Date the invite was created. */
|
|
3460
|
+
dateCreated?: Date | null;
|
|
3461
|
+
/** User's Wix Bookings staff ID, if relevant. */
|
|
3462
|
+
staffId?: string | null;
|
|
3463
|
+
/** Invite expiration date */
|
|
3464
|
+
expirationDate?: Date | null;
|
|
3465
|
+
}
|
|
3466
|
+
/** Invite status stating whether the invite was accepted, waiting to be accepted, deleted etc.. */
|
|
3467
|
+
declare enum InviteStatus$1 {
|
|
3468
|
+
Pending = "Pending",
|
|
3469
|
+
Used = "Used",
|
|
3470
|
+
Deleted = "Deleted",
|
|
3471
|
+
Declined = "Declined",
|
|
3472
|
+
Expired = "Expired"
|
|
3473
|
+
}
|
|
3474
|
+
interface GetSiteInvitesRequest {
|
|
3475
|
+
}
|
|
3476
|
+
interface GetSiteInvitesResponse {
|
|
3477
|
+
invites?: SiteInvite$1[];
|
|
3478
|
+
}
|
|
3479
|
+
interface QuerySiteInvitesRequest {
|
|
3480
|
+
/**
|
|
3481
|
+
* Supports only `filter` field with
|
|
3482
|
+
* `"filter" : {
|
|
3483
|
+
* "acceptedByAccountId":{"$in": [<id1>, <id2>, ...]}
|
|
3484
|
+
* }`
|
|
3485
|
+
*/
|
|
3486
|
+
query?: QueryV2;
|
|
3487
|
+
}
|
|
3488
|
+
interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
3489
|
+
/** Paging options to limit and skip the number of items. */
|
|
3490
|
+
paging?: Paging;
|
|
3491
|
+
/** 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`. */
|
|
3492
|
+
cursorPaging?: CursorPaging;
|
|
3493
|
+
/**
|
|
3494
|
+
* Filter object.
|
|
3495
|
+
*
|
|
3496
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
3497
|
+
*/
|
|
3498
|
+
filter?: Record<string, any> | null;
|
|
3499
|
+
/**
|
|
3500
|
+
* Sort object.
|
|
3501
|
+
*
|
|
3502
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
3503
|
+
*/
|
|
3504
|
+
sort?: Sorting[];
|
|
3505
|
+
/** 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. */
|
|
3506
|
+
fields?: string[];
|
|
3507
|
+
/** 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. */
|
|
3508
|
+
fieldsets?: string[];
|
|
3509
|
+
}
|
|
3510
|
+
/** @oneof */
|
|
3511
|
+
interface QueryV2PagingMethodOneOf {
|
|
3512
|
+
/** Paging options to limit and skip the number of items. */
|
|
3513
|
+
paging?: Paging;
|
|
3514
|
+
/** 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`. */
|
|
3515
|
+
cursorPaging?: CursorPaging;
|
|
3516
|
+
}
|
|
3517
|
+
interface Sorting {
|
|
3518
|
+
/** Name of the field to sort by. */
|
|
3519
|
+
fieldName?: string;
|
|
3520
|
+
/** Sort order. */
|
|
3521
|
+
order?: SortOrder;
|
|
3522
|
+
}
|
|
3523
|
+
declare enum SortOrder {
|
|
3524
|
+
ASC = "ASC",
|
|
3525
|
+
DESC = "DESC"
|
|
3526
|
+
}
|
|
3527
|
+
interface Paging {
|
|
3528
|
+
/** Number of items to load. */
|
|
3529
|
+
limit?: number | null;
|
|
3530
|
+
/** Number of items to skip in the current sort order. */
|
|
3531
|
+
offset?: number | null;
|
|
3532
|
+
}
|
|
3533
|
+
interface CursorPaging {
|
|
3534
|
+
/** Maximum number of items to return in the results. */
|
|
3535
|
+
limit?: number | null;
|
|
3536
|
+
/**
|
|
3537
|
+
* Pointer to the next or previous page in the list of results.
|
|
3538
|
+
*
|
|
3539
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
3540
|
+
* Not relevant for the first request.
|
|
3541
|
+
*/
|
|
3542
|
+
cursor?: string | null;
|
|
3543
|
+
}
|
|
3544
|
+
interface QuerySiteInvitesResponse {
|
|
3545
|
+
invites?: SiteInvite$1[];
|
|
3546
|
+
}
|
|
3547
|
+
interface GetSiteInviteRequest {
|
|
3548
|
+
_id?: string;
|
|
3549
|
+
}
|
|
3550
|
+
interface GetSiteInviteResponse {
|
|
3551
|
+
invite?: SiteInvite$1;
|
|
3552
|
+
}
|
|
3553
|
+
interface SiteInviteRequest {
|
|
3554
|
+
/** The role ids to be assigned */
|
|
3555
|
+
policyIds?: string[];
|
|
3556
|
+
/** Invitee email */
|
|
3557
|
+
email?: string;
|
|
3558
|
+
/** 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 */
|
|
3559
|
+
defaultEmailLanguage?: string | null;
|
|
3560
|
+
}
|
|
3561
|
+
interface SiteInviteResponse {
|
|
3562
|
+
/** Invites that were sent. */
|
|
3563
|
+
invite?: SiteInvite$1;
|
|
3564
|
+
}
|
|
3565
|
+
interface BulkSiteInviteRequest {
|
|
3566
|
+
/** Role IDs, referred to as policy IDs, to assign to the contributors. */
|
|
3567
|
+
policyIds: string[];
|
|
3568
|
+
/** Email addresses to which the invites should be sent. */
|
|
3569
|
+
emails: string[];
|
|
3570
|
+
/** Details explaining the purpose of the invite. */
|
|
3571
|
+
invitePurpose?: string | null;
|
|
3572
|
+
/** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
|
|
3573
|
+
defaultEmailLanguage?: string | null;
|
|
3574
|
+
}
|
|
3575
|
+
interface BulkSiteInviteResponse {
|
|
3576
|
+
/** Invites that were sent successfully. */
|
|
3577
|
+
invites?: SiteInvite$1[];
|
|
3578
|
+
/** Invites that failed. */
|
|
3579
|
+
failedEmails?: string[];
|
|
3580
|
+
}
|
|
3581
|
+
interface ResendSiteInviteRequest {
|
|
3582
|
+
/** Invite ID. */
|
|
3583
|
+
inviteId: string;
|
|
3584
|
+
/** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
|
|
3585
|
+
defaultEmailLanguage?: string | null;
|
|
3586
|
+
}
|
|
3587
|
+
interface AcceptSiteInviteRequest {
|
|
3588
|
+
inviteToken?: string;
|
|
3589
|
+
}
|
|
3590
|
+
interface AcceptSiteInviteResponse {
|
|
3591
|
+
}
|
|
3592
|
+
interface RevokeSiteInviteRequest {
|
|
3593
|
+
/** Invite ID. */
|
|
3594
|
+
inviteId: string;
|
|
3595
|
+
}
|
|
3596
|
+
interface RevokeSiteInviteResponse {
|
|
3597
|
+
}
|
|
3598
|
+
interface UpdateSiteInviteRequest {
|
|
3599
|
+
inviteId?: string;
|
|
3600
|
+
policyIds?: string[];
|
|
3601
|
+
staffId?: string | null;
|
|
3602
|
+
}
|
|
3603
|
+
interface UpdateSiteInviteResponse {
|
|
3604
|
+
}
|
|
3605
|
+
interface GetContributorLimitRequest {
|
|
3606
|
+
}
|
|
3607
|
+
interface GetContributorLimitResponse {
|
|
3608
|
+
contributorLimitation?: ContributorLimitation;
|
|
3609
|
+
}
|
|
3610
|
+
interface ContributorLimitation {
|
|
3611
|
+
contributorLimit?: number;
|
|
3612
|
+
leftInvites?: number;
|
|
3613
|
+
}
|
|
3614
|
+
interface ParseSiteInviteTokenRequest {
|
|
3615
|
+
inviteToken?: string;
|
|
3616
|
+
}
|
|
3617
|
+
interface ParseSiteInviteTokenResponse {
|
|
3618
|
+
inviteId?: string;
|
|
3619
|
+
siteId?: string;
|
|
3620
|
+
status?: InviteStatus$1;
|
|
3621
|
+
}
|
|
3622
|
+
interface SiteInviteNonNullableFields {
|
|
3623
|
+
_id: string;
|
|
3624
|
+
siteId: string;
|
|
3625
|
+
email: string;
|
|
3626
|
+
policyIds: string[];
|
|
3627
|
+
inviterId: string;
|
|
3628
|
+
status: InviteStatus$1;
|
|
3629
|
+
acceptLink: string;
|
|
3630
|
+
inviterAccountId: string;
|
|
3631
|
+
}
|
|
3632
|
+
interface BulkSiteInviteResponseNonNullableFields {
|
|
3633
|
+
invites: SiteInviteNonNullableFields[];
|
|
3634
|
+
failedEmails: string[];
|
|
3635
|
+
}
|
|
3636
|
+
interface SiteInviteResponseNonNullableFields {
|
|
3637
|
+
invite?: SiteInviteNonNullableFields;
|
|
3638
|
+
}
|
|
3639
|
+
interface BulkInviteOptions {
|
|
3640
|
+
/** Email addresses to which the invites should be sent. */
|
|
3641
|
+
emails: string[];
|
|
3642
|
+
/** Details explaining the purpose of the invite. */
|
|
3643
|
+
invitePurpose?: string | null;
|
|
3644
|
+
/** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
|
|
3645
|
+
defaultEmailLanguage?: string | null;
|
|
3646
|
+
}
|
|
3647
|
+
interface ResendInviteOptions {
|
|
3648
|
+
/** Language of emails to send. Relevant only for recipients that don't currently have a Wix user ID. Default: Site owner's language. */
|
|
3649
|
+
defaultEmailLanguage?: string | null;
|
|
3650
|
+
}
|
|
3651
|
+
|
|
3652
|
+
declare function bulkInvite$1(httpClient: HttpClient): BulkInviteSignature;
|
|
3653
|
+
interface BulkInviteSignature {
|
|
3654
|
+
/**
|
|
3655
|
+
* Creates and sends emails inviting potential site contributors to become contributors in the requesting site.
|
|
3656
|
+
* > **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.
|
|
3657
|
+
* @param - Role IDs, referred to as policy IDs, to assign to the contributors.
|
|
3658
|
+
* @param - Filter options.
|
|
3659
|
+
*/
|
|
3660
|
+
(policyIds: string[], options?: BulkInviteOptions | undefined): Promise<BulkSiteInviteResponse & BulkSiteInviteResponseNonNullableFields>;
|
|
3661
|
+
}
|
|
3662
|
+
declare function resendInvite$1(httpClient: HttpClient): ResendInviteSignature;
|
|
3663
|
+
interface ResendInviteSignature {
|
|
3664
|
+
/**
|
|
3665
|
+
* Resends the email invitation to a potential site contributor.
|
|
3666
|
+
* > **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.
|
|
3667
|
+
* @param - Invite ID.
|
|
3668
|
+
* @param - Filter options.
|
|
3669
|
+
*/
|
|
3670
|
+
(inviteId: string, options?: ResendInviteOptions | undefined): Promise<SiteInviteResponse & SiteInviteResponseNonNullableFields>;
|
|
3671
|
+
}
|
|
3672
|
+
declare function revokeInvite$1(httpClient: HttpClient): RevokeInviteSignature;
|
|
3673
|
+
interface RevokeInviteSignature {
|
|
3674
|
+
/**
|
|
3675
|
+
* Revokes a pending site contributor invite.
|
|
3676
|
+
* > **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.
|
|
3677
|
+
* @param - Invite ID.
|
|
3678
|
+
*/
|
|
3679
|
+
(inviteId: string): Promise<void>;
|
|
3680
|
+
}
|
|
3681
|
+
|
|
3682
|
+
declare const bulkInvite: MaybeContext<BuildRESTFunction<typeof bulkInvite$1> & typeof bulkInvite$1>;
|
|
3683
|
+
declare const resendInvite: MaybeContext<BuildRESTFunction<typeof resendInvite$1> & typeof resendInvite$1>;
|
|
3684
|
+
declare const revokeInvite: MaybeContext<BuildRESTFunction<typeof revokeInvite$1> & typeof revokeInvite$1>;
|
|
3685
|
+
|
|
3686
|
+
type context$2_AcceptSiteInviteRequest = AcceptSiteInviteRequest;
|
|
3687
|
+
type context$2_AcceptSiteInviteResponse = AcceptSiteInviteResponse;
|
|
3688
|
+
type context$2_BulkInviteOptions = BulkInviteOptions;
|
|
3689
|
+
type context$2_BulkSiteInviteRequest = BulkSiteInviteRequest;
|
|
3690
|
+
type context$2_BulkSiteInviteResponse = BulkSiteInviteResponse;
|
|
3691
|
+
type context$2_BulkSiteInviteResponseNonNullableFields = BulkSiteInviteResponseNonNullableFields;
|
|
3692
|
+
type context$2_ContributorLimitation = ContributorLimitation;
|
|
3693
|
+
type context$2_CursorPaging = CursorPaging;
|
|
3694
|
+
type context$2_GetContributorLimitRequest = GetContributorLimitRequest;
|
|
3695
|
+
type context$2_GetContributorLimitResponse = GetContributorLimitResponse;
|
|
3696
|
+
type context$2_GetSiteInviteRequest = GetSiteInviteRequest;
|
|
3697
|
+
type context$2_GetSiteInviteResponse = GetSiteInviteResponse;
|
|
3698
|
+
type context$2_GetSiteInvitesRequest = GetSiteInvitesRequest;
|
|
3699
|
+
type context$2_GetSiteInvitesResponse = GetSiteInvitesResponse;
|
|
3700
|
+
type context$2_Paging = Paging;
|
|
3701
|
+
type context$2_ParseSiteInviteTokenRequest = ParseSiteInviteTokenRequest;
|
|
3702
|
+
type context$2_ParseSiteInviteTokenResponse = ParseSiteInviteTokenResponse;
|
|
3703
|
+
type context$2_QuerySiteInvitesRequest = QuerySiteInvitesRequest;
|
|
3704
|
+
type context$2_QuerySiteInvitesResponse = QuerySiteInvitesResponse;
|
|
3705
|
+
type context$2_QueryV2 = QueryV2;
|
|
3706
|
+
type context$2_QueryV2PagingMethodOneOf = QueryV2PagingMethodOneOf;
|
|
3707
|
+
type context$2_ResendInviteOptions = ResendInviteOptions;
|
|
3708
|
+
type context$2_ResendSiteInviteRequest = ResendSiteInviteRequest;
|
|
3709
|
+
type context$2_RevokeSiteInviteRequest = RevokeSiteInviteRequest;
|
|
3710
|
+
type context$2_RevokeSiteInviteResponse = RevokeSiteInviteResponse;
|
|
3711
|
+
type context$2_SiteInviteRequest = SiteInviteRequest;
|
|
3712
|
+
type context$2_SiteInviteResponse = SiteInviteResponse;
|
|
3713
|
+
type context$2_SiteInviteResponseNonNullableFields = SiteInviteResponseNonNullableFields;
|
|
3714
|
+
type context$2_SortOrder = SortOrder;
|
|
3715
|
+
declare const context$2_SortOrder: typeof SortOrder;
|
|
3716
|
+
type context$2_Sorting = Sorting;
|
|
3717
|
+
type context$2_UpdateSiteInviteRequest = UpdateSiteInviteRequest;
|
|
3718
|
+
type context$2_UpdateSiteInviteResponse = UpdateSiteInviteResponse;
|
|
3719
|
+
declare const context$2_bulkInvite: typeof bulkInvite;
|
|
3720
|
+
declare const context$2_resendInvite: typeof resendInvite;
|
|
3721
|
+
declare const context$2_revokeInvite: typeof revokeInvite;
|
|
3722
|
+
declare namespace context$2 {
|
|
3723
|
+
export { type context$2_AcceptSiteInviteRequest as AcceptSiteInviteRequest, type context$2_AcceptSiteInviteResponse as AcceptSiteInviteResponse, type context$2_BulkInviteOptions as BulkInviteOptions, type context$2_BulkSiteInviteRequest as BulkSiteInviteRequest, type context$2_BulkSiteInviteResponse as BulkSiteInviteResponse, type context$2_BulkSiteInviteResponseNonNullableFields as BulkSiteInviteResponseNonNullableFields, type context$2_ContributorLimitation as ContributorLimitation, type context$2_CursorPaging as CursorPaging, type context$2_GetContributorLimitRequest as GetContributorLimitRequest, type context$2_GetContributorLimitResponse as GetContributorLimitResponse, type context$2_GetSiteInviteRequest as GetSiteInviteRequest, type context$2_GetSiteInviteResponse as GetSiteInviteResponse, type context$2_GetSiteInvitesRequest as GetSiteInvitesRequest, type context$2_GetSiteInvitesResponse as GetSiteInvitesResponse, InviteStatus$1 as InviteStatus, type context$2_Paging as Paging, type context$2_ParseSiteInviteTokenRequest as ParseSiteInviteTokenRequest, type context$2_ParseSiteInviteTokenResponse as ParseSiteInviteTokenResponse, type context$2_QuerySiteInvitesRequest as QuerySiteInvitesRequest, type context$2_QuerySiteInvitesResponse as QuerySiteInvitesResponse, type context$2_QueryV2 as QueryV2, type context$2_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type context$2_ResendInviteOptions as ResendInviteOptions, type context$2_ResendSiteInviteRequest as ResendSiteInviteRequest, type context$2_RevokeSiteInviteRequest as RevokeSiteInviteRequest, type context$2_RevokeSiteInviteResponse as RevokeSiteInviteResponse, type SiteInvite$1 as SiteInvite, type context$2_SiteInviteRequest as SiteInviteRequest, type context$2_SiteInviteResponse as SiteInviteResponse, type context$2_SiteInviteResponseNonNullableFields as SiteInviteResponseNonNullableFields, context$2_SortOrder as SortOrder, type context$2_Sorting as Sorting, type context$2_UpdateSiteInviteRequest as UpdateSiteInviteRequest, type context$2_UpdateSiteInviteResponse as UpdateSiteInviteResponse, context$2_bulkInvite as bulkInvite, context$2_resendInvite as resendInvite, context$2_revokeInvite as revokeInvite };
|
|
3724
|
+
}
|
|
3725
|
+
|
|
3726
|
+
interface RefreshToken {
|
|
3727
|
+
token?: string;
|
|
3728
|
+
}
|
|
3729
|
+
/**
|
|
3730
|
+
* AuthorizeRequest is sent by the client to the authorization server to initiate
|
|
3731
|
+
* the authorization process.
|
|
3732
|
+
*/
|
|
3733
|
+
interface AuthorizeRequest {
|
|
3734
|
+
/** ID of the Wix OAuth app requesting authorization. */
|
|
3735
|
+
clientId?: string;
|
|
3736
|
+
/**
|
|
3737
|
+
* Desired authorization [grant type](https://auth0.com/docs/authenticate/protocols/oauth#grant-types).
|
|
3738
|
+
*
|
|
3739
|
+
* Supported values:
|
|
3740
|
+
* + `code`: The endpoint returns an authorization code that can be used to obtain an access token.
|
|
3741
|
+
*/
|
|
3742
|
+
responseType?: string;
|
|
3743
|
+
/** 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. */
|
|
3744
|
+
redirectUri?: string | null;
|
|
3745
|
+
/**
|
|
3746
|
+
* Desired scope of access. If this field is left empty, only an access token is granted.
|
|
3747
|
+
* To received a refresh token, pass `offline_access` as the value of this field.
|
|
3748
|
+
*/
|
|
3749
|
+
scope?: string | null;
|
|
3750
|
+
/**
|
|
3751
|
+
* A value used to confirm the state of an application before and after it makes an authorization
|
|
3752
|
+
* request. If a value for this field is set in the request, it's added to the `redirectUri` when the browser
|
|
3753
|
+
* is redirected there.
|
|
3754
|
+
* Learn more about [using the state parameter](https://auth0.com/docs/secure/attack-protection/state-parameters).
|
|
3755
|
+
*/
|
|
3756
|
+
state?: string;
|
|
3757
|
+
/**
|
|
3758
|
+
* esired response format.
|
|
3759
|
+
*
|
|
3760
|
+
* Supported values:
|
|
3761
|
+
* + `query`: The response parameters are encoded as query string parameters and added to the `redirectUri` when redirecting.
|
|
3762
|
+
* + `fragment`: The response parameters are encoded as URI fragment parameters and added to the `redirectUri` when redirecting.
|
|
3763
|
+
* + `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).
|
|
3764
|
+
*
|
|
3765
|
+
* Default value: `query`
|
|
3766
|
+
*/
|
|
3767
|
+
responseMode?: string | null;
|
|
3768
|
+
/**
|
|
3769
|
+
* Code challenge to use for PKCE verification.
|
|
3770
|
+
* This field is only used if `responseType` is set to `code`.
|
|
3771
|
+
*/
|
|
3772
|
+
codeChallenge?: string | null;
|
|
3773
|
+
/**
|
|
3774
|
+
* Code challenge method to use for PKCE verification.
|
|
3775
|
+
* This field is only used if `responseType` is set to `code`.
|
|
3776
|
+
*
|
|
3777
|
+
* Supported values:
|
|
3778
|
+
* + `S256`: The code challenge is transformed using SHA-256 encyption.
|
|
3779
|
+
* + `S512`: The code challenge is transformed using SHA-512 encyption.
|
|
3780
|
+
*/
|
|
3781
|
+
codeChallengeMethod?: string | null;
|
|
3782
|
+
/** Session token of the site visitor to authorize. */
|
|
3783
|
+
sessionToken?: string | null;
|
|
3784
|
+
}
|
|
3785
|
+
interface RawHttpResponse {
|
|
3786
|
+
body?: Uint8Array;
|
|
3787
|
+
statusCode?: number | null;
|
|
3788
|
+
headers?: HeadersEntry[];
|
|
3789
|
+
}
|
|
3790
|
+
interface HeadersEntry {
|
|
3791
|
+
key?: string;
|
|
3792
|
+
value?: string;
|
|
3793
|
+
}
|
|
3794
|
+
interface RawHttpRequest {
|
|
3795
|
+
body?: Uint8Array;
|
|
3796
|
+
pathParams?: PathParametersEntry[];
|
|
3797
|
+
queryParams?: QueryParametersEntry[];
|
|
3798
|
+
headers?: HeadersEntry[];
|
|
3799
|
+
method?: string;
|
|
3800
|
+
rawPath?: string;
|
|
3801
|
+
rawQuery?: string;
|
|
3802
|
+
}
|
|
3803
|
+
interface PathParametersEntry {
|
|
3804
|
+
key?: string;
|
|
3805
|
+
value?: string;
|
|
3806
|
+
}
|
|
3807
|
+
interface QueryParametersEntry {
|
|
3808
|
+
key?: string;
|
|
3809
|
+
value?: string;
|
|
3810
|
+
}
|
|
3811
|
+
interface DeviceCodeRequest {
|
|
3812
|
+
/** The ID of the application that asks for authorization. */
|
|
3813
|
+
clientId?: string;
|
|
3814
|
+
/**
|
|
3815
|
+
* scope is a space-delimited string that specifies the requested scope of the
|
|
3816
|
+
* access request.
|
|
3817
|
+
*/
|
|
3818
|
+
scope?: string | null;
|
|
3819
|
+
}
|
|
3820
|
+
interface DeviceCodeResponse {
|
|
3821
|
+
/** 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. */
|
|
3822
|
+
deviceCode?: string;
|
|
3823
|
+
/** contains the code that should be input at the verification_uri to authorize the device. */
|
|
3824
|
+
userCode?: string;
|
|
3825
|
+
/** contains the URL the user should visit to authorize the device. */
|
|
3826
|
+
verificationUri?: string;
|
|
3827
|
+
/** indicates the lifetime (in seconds) of the device_code and user_code. */
|
|
3828
|
+
expiresIn?: number;
|
|
3829
|
+
/** 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 */
|
|
3830
|
+
interval?: number | null;
|
|
3831
|
+
}
|
|
3832
|
+
interface DeviceVerifyRequest {
|
|
3833
|
+
/** User code representing a currently authorizing device. */
|
|
3834
|
+
userCode?: string;
|
|
3835
|
+
}
|
|
3836
|
+
interface DeviceVerifyResponse {
|
|
3837
|
+
}
|
|
3838
|
+
interface DeviceVerifyV2Request {
|
|
3839
|
+
/** User code representing a currently authorizing device. */
|
|
3840
|
+
userCode?: string;
|
|
3841
|
+
}
|
|
3842
|
+
interface DeviceVerifyV2Response {
|
|
3843
|
+
}
|
|
3844
|
+
interface InvalidateUserCodeRequest {
|
|
3845
|
+
/** user code to invalidate. Only the authorizing identity is able to invalidate it. */
|
|
3846
|
+
userCode?: string;
|
|
3847
|
+
}
|
|
3848
|
+
interface InvalidateUserCodeResponse {
|
|
3849
|
+
}
|
|
3850
|
+
interface RevokeRefreshTokenRequest {
|
|
3851
|
+
/** The refresh token itself. Anyone with the token itself is able to revoke it. */
|
|
3852
|
+
token?: string;
|
|
3853
|
+
}
|
|
3854
|
+
interface RevokeRefreshTokenResponse {
|
|
3855
|
+
}
|
|
3856
|
+
interface TokenInfoResponse {
|
|
3857
|
+
active?: boolean;
|
|
3858
|
+
/** subject type. */
|
|
3859
|
+
subjectType?: SubjectType$1;
|
|
3860
|
+
/** subject id */
|
|
3861
|
+
subjectId?: string;
|
|
3862
|
+
/** Expiration time of the token */
|
|
3863
|
+
exp?: string | null;
|
|
3864
|
+
/** Issued time of the token */
|
|
3865
|
+
iat?: string | null;
|
|
3866
|
+
/** Client id */
|
|
3867
|
+
clientId?: string;
|
|
3868
|
+
/** Account id */
|
|
3869
|
+
accountId?: string | null;
|
|
3870
|
+
/** Site id */
|
|
3871
|
+
siteId?: string | null;
|
|
3872
|
+
/** Instance Id */
|
|
3873
|
+
instanceId?: string | null;
|
|
3874
|
+
/** Vendor Product Id */
|
|
3875
|
+
vendorProductId?: string | null;
|
|
3876
|
+
}
|
|
3877
|
+
declare enum SubjectType$1 {
|
|
3878
|
+
/** unknown subject type */
|
|
3879
|
+
UNKNOWN = "UNKNOWN",
|
|
3880
|
+
/** user subject type */
|
|
3881
|
+
USER = "USER",
|
|
3882
|
+
/** visitor subject type */
|
|
3883
|
+
VISITOR = "VISITOR",
|
|
3884
|
+
/** member subject type */
|
|
3885
|
+
MEMBER = "MEMBER",
|
|
3886
|
+
/** app subject type */
|
|
3887
|
+
APP = "APP"
|
|
3888
|
+
}
|
|
3889
|
+
interface Empty {
|
|
3890
|
+
}
|
|
3891
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
3892
|
+
createdEvent?: EntityCreatedEvent;
|
|
3893
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
3894
|
+
deletedEvent?: EntityDeletedEvent;
|
|
3895
|
+
actionEvent?: ActionEvent;
|
|
3896
|
+
/**
|
|
3897
|
+
* Unique event ID.
|
|
3898
|
+
* Allows clients to ignore duplicate webhooks.
|
|
3899
|
+
*/
|
|
3900
|
+
_id?: string;
|
|
3901
|
+
/**
|
|
3902
|
+
* Assumes actions are also always typed to an entity_type
|
|
3903
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
3904
|
+
*/
|
|
3905
|
+
entityFqdn?: string;
|
|
3906
|
+
/**
|
|
3907
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
3908
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
3909
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
3910
|
+
*/
|
|
3911
|
+
slug?: string;
|
|
3912
|
+
/** ID of the entity associated with the event. */
|
|
3913
|
+
entityId?: string;
|
|
3914
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
3915
|
+
eventTime?: Date | null;
|
|
3916
|
+
/**
|
|
3917
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
3918
|
+
* (for example, GDPR).
|
|
3919
|
+
*/
|
|
3920
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
3921
|
+
/** If present, indicates the action that triggered the event. */
|
|
3922
|
+
originatedFrom?: string | null;
|
|
3923
|
+
/**
|
|
3924
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
3925
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
3926
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
3927
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
3928
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
3929
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
3930
|
+
*/
|
|
3931
|
+
entityEventSequence?: string | null;
|
|
3932
|
+
}
|
|
3933
|
+
/** @oneof */
|
|
3934
|
+
interface DomainEventBodyOneOf {
|
|
3935
|
+
createdEvent?: EntityCreatedEvent;
|
|
3936
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
3937
|
+
deletedEvent?: EntityDeletedEvent;
|
|
3938
|
+
actionEvent?: ActionEvent;
|
|
3939
|
+
}
|
|
3940
|
+
interface EntityCreatedEvent {
|
|
3941
|
+
entity?: string;
|
|
3942
|
+
}
|
|
3943
|
+
interface RestoreInfo {
|
|
3944
|
+
deletedDate?: Date | null;
|
|
3945
|
+
}
|
|
3946
|
+
interface EntityUpdatedEvent {
|
|
3947
|
+
/**
|
|
3948
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
3949
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
3950
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
3951
|
+
*/
|
|
3952
|
+
currentEntity?: string;
|
|
3953
|
+
}
|
|
3954
|
+
interface EntityDeletedEvent {
|
|
3955
|
+
/** Entity that was deleted */
|
|
3956
|
+
deletedEntity?: string | null;
|
|
3957
|
+
}
|
|
3958
|
+
interface ActionEvent {
|
|
3959
|
+
body?: string;
|
|
3960
|
+
}
|
|
3961
|
+
interface HeadersEntryNonNullableFields {
|
|
3962
|
+
key: string;
|
|
3963
|
+
value: string;
|
|
3964
|
+
}
|
|
3965
|
+
interface RawHttpResponseNonNullableFields {
|
|
3966
|
+
body: Uint8Array;
|
|
3967
|
+
headers: HeadersEntryNonNullableFields[];
|
|
3968
|
+
}
|
|
3969
|
+
interface TokenInfoResponseNonNullableFields {
|
|
3970
|
+
active: boolean;
|
|
3971
|
+
subjectType: SubjectType$1;
|
|
3972
|
+
subjectId: string;
|
|
3973
|
+
clientId: string;
|
|
3974
|
+
}
|
|
3975
|
+
interface TokenOptions {
|
|
3976
|
+
body?: Uint8Array;
|
|
3977
|
+
pathParams?: PathParametersEntry[];
|
|
3978
|
+
queryParams?: QueryParametersEntry[];
|
|
3979
|
+
headers?: HeadersEntry[];
|
|
3980
|
+
method?: string;
|
|
3981
|
+
rawPath?: string;
|
|
3982
|
+
rawQuery?: string;
|
|
3983
|
+
}
|
|
3984
|
+
interface TokenInfoOptions {
|
|
3985
|
+
body?: Uint8Array;
|
|
3986
|
+
pathParams?: PathParametersEntry[];
|
|
3987
|
+
queryParams?: QueryParametersEntry[];
|
|
3988
|
+
headers?: HeadersEntry[];
|
|
3989
|
+
method?: string;
|
|
3990
|
+
rawPath?: string;
|
|
3991
|
+
rawQuery?: string;
|
|
3992
|
+
}
|
|
3993
|
+
|
|
3994
|
+
declare function token$1(httpClient: HttpClient): TokenSignature;
|
|
3995
|
+
interface TokenSignature {
|
|
3996
|
+
/**
|
|
3997
|
+
* Creates an access token.
|
|
3998
|
+
*
|
|
3999
|
+
*
|
|
4000
|
+
* The endpoint accepts raw HTTP requests. You must pass the request's body
|
|
4001
|
+
* parameters formatted as bytes in the raw HTTP request's `body` field,
|
|
4002
|
+
* following this template:
|
|
4003
|
+
* `{"grantType": "client_credentials", "client_id": "<APP_ID>", "client_secret": "<APP_SECRET_KEY>", "instance_id": "<INSTANCE_ID>"}`.
|
|
4004
|
+
*
|
|
4005
|
+
* When the call succeeds, Wix returns `{"statusCode": 200}` and the created access
|
|
4006
|
+
* token in the `body` field of the raw HTTP response.
|
|
4007
|
+
*
|
|
4008
|
+
* In case the call fails, Wix returns the relevant `4XX` error code in the raw
|
|
4009
|
+
* HTTP response's `statusCode` field and details
|
|
4010
|
+
* about the error in `body`. Error details follow the
|
|
4011
|
+
* [conventions of the Internet Engineering Task Force (IETF)](https://datatracker.ietf.org/doc/html/rfc6749#appendix-A.7).
|
|
4012
|
+
*/
|
|
4013
|
+
(options?: TokenOptions | undefined): Promise<RawHttpResponse & RawHttpResponseNonNullableFields>;
|
|
4014
|
+
}
|
|
4015
|
+
declare function tokenInfo$1(httpClient: HttpClient): TokenInfoSignature;
|
|
4016
|
+
interface TokenInfoSignature {
|
|
4017
|
+
/**
|
|
4018
|
+
* Token Introspection Endpoint.
|
|
4019
|
+
*/
|
|
4020
|
+
(options?: TokenInfoOptions | undefined): Promise<TokenInfoResponse & TokenInfoResponseNonNullableFields>;
|
|
4021
|
+
}
|
|
4022
|
+
|
|
4023
|
+
declare const token: MaybeContext<BuildRESTFunction<typeof token$1> & typeof token$1>;
|
|
4024
|
+
declare const tokenInfo: MaybeContext<BuildRESTFunction<typeof tokenInfo$1> & typeof tokenInfo$1>;
|
|
4025
|
+
|
|
4026
|
+
type context$1_ActionEvent = ActionEvent;
|
|
4027
|
+
type context$1_AuthorizeRequest = AuthorizeRequest;
|
|
4028
|
+
type context$1_DeviceCodeRequest = DeviceCodeRequest;
|
|
4029
|
+
type context$1_DeviceCodeResponse = DeviceCodeResponse;
|
|
4030
|
+
type context$1_DeviceVerifyRequest = DeviceVerifyRequest;
|
|
4031
|
+
type context$1_DeviceVerifyResponse = DeviceVerifyResponse;
|
|
4032
|
+
type context$1_DeviceVerifyV2Request = DeviceVerifyV2Request;
|
|
4033
|
+
type context$1_DeviceVerifyV2Response = DeviceVerifyV2Response;
|
|
4034
|
+
type context$1_DomainEvent = DomainEvent;
|
|
4035
|
+
type context$1_DomainEventBodyOneOf = DomainEventBodyOneOf;
|
|
4036
|
+
type context$1_Empty = Empty;
|
|
4037
|
+
type context$1_EntityCreatedEvent = EntityCreatedEvent;
|
|
4038
|
+
type context$1_EntityDeletedEvent = EntityDeletedEvent;
|
|
4039
|
+
type context$1_EntityUpdatedEvent = EntityUpdatedEvent;
|
|
4040
|
+
type context$1_HeadersEntry = HeadersEntry;
|
|
4041
|
+
type context$1_InvalidateUserCodeRequest = InvalidateUserCodeRequest;
|
|
4042
|
+
type context$1_InvalidateUserCodeResponse = InvalidateUserCodeResponse;
|
|
4043
|
+
type context$1_PathParametersEntry = PathParametersEntry;
|
|
4044
|
+
type context$1_QueryParametersEntry = QueryParametersEntry;
|
|
4045
|
+
type context$1_RawHttpRequest = RawHttpRequest;
|
|
4046
|
+
type context$1_RawHttpResponse = RawHttpResponse;
|
|
4047
|
+
type context$1_RawHttpResponseNonNullableFields = RawHttpResponseNonNullableFields;
|
|
4048
|
+
type context$1_RefreshToken = RefreshToken;
|
|
4049
|
+
type context$1_RestoreInfo = RestoreInfo;
|
|
4050
|
+
type context$1_RevokeRefreshTokenRequest = RevokeRefreshTokenRequest;
|
|
4051
|
+
type context$1_RevokeRefreshTokenResponse = RevokeRefreshTokenResponse;
|
|
4052
|
+
type context$1_TokenInfoOptions = TokenInfoOptions;
|
|
4053
|
+
type context$1_TokenInfoResponse = TokenInfoResponse;
|
|
4054
|
+
type context$1_TokenInfoResponseNonNullableFields = TokenInfoResponseNonNullableFields;
|
|
4055
|
+
type context$1_TokenOptions = TokenOptions;
|
|
4056
|
+
declare const context$1_token: typeof token;
|
|
4057
|
+
declare const context$1_tokenInfo: typeof tokenInfo;
|
|
4058
|
+
declare namespace context$1 {
|
|
4059
|
+
export { type context$1_ActionEvent as ActionEvent, type context$1_AuthorizeRequest as AuthorizeRequest, type context$1_DeviceCodeRequest as DeviceCodeRequest, type context$1_DeviceCodeResponse as DeviceCodeResponse, type context$1_DeviceVerifyRequest as DeviceVerifyRequest, type context$1_DeviceVerifyResponse as DeviceVerifyResponse, type context$1_DeviceVerifyV2Request as DeviceVerifyV2Request, type context$1_DeviceVerifyV2Response as DeviceVerifyV2Response, type context$1_DomainEvent as DomainEvent, type context$1_DomainEventBodyOneOf as DomainEventBodyOneOf, type context$1_Empty as Empty, type context$1_EntityCreatedEvent as EntityCreatedEvent, type context$1_EntityDeletedEvent as EntityDeletedEvent, type context$1_EntityUpdatedEvent as EntityUpdatedEvent, type context$1_HeadersEntry as HeadersEntry, type context$1_InvalidateUserCodeRequest as InvalidateUserCodeRequest, type context$1_InvalidateUserCodeResponse as InvalidateUserCodeResponse, type context$1_PathParametersEntry as PathParametersEntry, type context$1_QueryParametersEntry as QueryParametersEntry, type context$1_RawHttpRequest as RawHttpRequest, type context$1_RawHttpResponse as RawHttpResponse, type context$1_RawHttpResponseNonNullableFields as RawHttpResponseNonNullableFields, type context$1_RefreshToken as RefreshToken, type context$1_RestoreInfo as RestoreInfo, type context$1_RevokeRefreshTokenRequest as RevokeRefreshTokenRequest, type context$1_RevokeRefreshTokenResponse as RevokeRefreshTokenResponse, SubjectType$1 as SubjectType, type context$1_TokenInfoOptions as TokenInfoOptions, type context$1_TokenInfoResponse as TokenInfoResponse, type context$1_TokenInfoResponseNonNullableFields as TokenInfoResponseNonNullableFields, type context$1_TokenOptions as TokenOptions, context$1_token as token, context$1_tokenInfo as tokenInfo };
|
|
4060
|
+
}
|
|
4061
|
+
|
|
4062
|
+
interface Contributor {
|
|
4063
|
+
/** Contributor's metadata. */
|
|
4064
|
+
metaData?: PersonMetaData;
|
|
4065
|
+
/** Whether the contributor account is a team account. */
|
|
4066
|
+
isTeam?: boolean | null;
|
|
4067
|
+
/** Date that the contributor joined the site. */
|
|
4068
|
+
joinedAt?: Date | null;
|
|
4069
|
+
/** Email address that received the invite. */
|
|
4070
|
+
invitedEmail?: string | null;
|
|
4071
|
+
/** Whether the contributor account is a client account. */
|
|
4072
|
+
isClient?: boolean | null;
|
|
4073
|
+
/**
|
|
4074
|
+
* Contributor's user ID.
|
|
4075
|
+
* @readonly
|
|
4076
|
+
*/
|
|
4077
|
+
_id?: string;
|
|
4078
|
+
}
|
|
4079
|
+
interface PersonMetaData {
|
|
4080
|
+
/** Contributor's account ID. */
|
|
4081
|
+
_id?: string;
|
|
4082
|
+
/** Contributor's full name. */
|
|
4083
|
+
fullName?: string | null;
|
|
4084
|
+
/** URL for contributor's profile image. */
|
|
4085
|
+
imageUrl?: string | null;
|
|
4086
|
+
/** Contributor's email address. */
|
|
4087
|
+
email?: string | null;
|
|
4088
|
+
/** Contributor's access to assets and their assigned role (`policy`) for that asset. */
|
|
4089
|
+
assignments?: Assignment[];
|
|
4090
|
+
}
|
|
4091
|
+
interface Assignment {
|
|
4092
|
+
/** Role assigned to the user. */
|
|
4093
|
+
policy?: AssignedPolicy;
|
|
4094
|
+
/** Unique ID for this specific assignment. */
|
|
4095
|
+
assignmentId?: string;
|
|
4096
|
+
/** Identity assigned to the asset in an assignment, referred to as subject. Supported subjects include user IDs, account IDs, and app IDs. */
|
|
4097
|
+
subject?: Subject;
|
|
4098
|
+
}
|
|
4099
|
+
interface AssignedPolicy {
|
|
4100
|
+
/** Role ID. */
|
|
4101
|
+
policyId?: string;
|
|
4102
|
+
/** Role title. */
|
|
4103
|
+
title?: string | null;
|
|
4104
|
+
/** Role description. */
|
|
4105
|
+
description?: string | null;
|
|
4106
|
+
}
|
|
4107
|
+
interface Restriction extends RestrictionRestrictionsOneOf {
|
|
4108
|
+
/**
|
|
4109
|
+
* Deprecated.
|
|
4110
|
+
* @deprecated
|
|
4111
|
+
*/
|
|
4112
|
+
resource?: Resource;
|
|
4113
|
+
/** List of conditions restricting the user's access. Currently only folder conditions are supported. */
|
|
4114
|
+
conditions?: Conditions;
|
|
4115
|
+
/** Site where the assignment restrictions apply. */
|
|
4116
|
+
site?: SiteRestriction;
|
|
4117
|
+
}
|
|
4118
|
+
/** @oneof */
|
|
4119
|
+
interface RestrictionRestrictionsOneOf {
|
|
4120
|
+
/**
|
|
4121
|
+
* Deprecated.
|
|
4122
|
+
* @deprecated
|
|
4123
|
+
*/
|
|
4124
|
+
resource?: Resource;
|
|
4125
|
+
/** List of conditions restricting the user's access. Currently only folder conditions are supported. */
|
|
4126
|
+
conditions?: Conditions;
|
|
4127
|
+
/** Site where the assignment restrictions apply. */
|
|
4128
|
+
site?: SiteRestriction;
|
|
4129
|
+
}
|
|
4130
|
+
interface Resource {
|
|
4131
|
+
/** Resource type. */
|
|
4132
|
+
resourceType?: ResourceType;
|
|
4133
|
+
/** Resource ID. */
|
|
4134
|
+
_id?: string;
|
|
4135
|
+
value?: string | null;
|
|
4136
|
+
}
|
|
4137
|
+
declare enum ResourceType {
|
|
4138
|
+
UNKNOWN_RESOURCE_TYPE = "UNKNOWN_RESOURCE_TYPE",
|
|
4139
|
+
SITE = "SITE"
|
|
4140
|
+
}
|
|
4141
|
+
interface Conditions {
|
|
4142
|
+
/** List of conditions. */
|
|
4143
|
+
conditions?: Condition[];
|
|
4144
|
+
}
|
|
4145
|
+
interface Condition {
|
|
4146
|
+
/** Condition type. */
|
|
4147
|
+
conditionType?: ConditionAttributeType;
|
|
4148
|
+
/** Condition ID. */
|
|
4149
|
+
_id?: string;
|
|
4150
|
+
/** Expected value of the condition. When `conditionType` = "FOLDER", this is the folder path. */
|
|
4151
|
+
value?: string | null;
|
|
4152
|
+
}
|
|
4153
|
+
declare enum ConditionAttributeType {
|
|
4154
|
+
UNKNOWN_CONDITION_TYPE = "UNKNOWN_CONDITION_TYPE",
|
|
4155
|
+
FOLDER = "FOLDER"
|
|
4156
|
+
}
|
|
4157
|
+
interface SiteRestriction {
|
|
4158
|
+
/** Site ID. */
|
|
4159
|
+
_id?: string;
|
|
4160
|
+
/** Site name. */
|
|
4161
|
+
value?: string | null;
|
|
4162
|
+
}
|
|
4163
|
+
interface CompanionResource {
|
|
4164
|
+
/** Asset ID (referred to here as resource ID). */
|
|
4165
|
+
_id?: string;
|
|
4166
|
+
/** Asset type (referred to here as resource type). as predefined in the authorization system */
|
|
4167
|
+
resourceType?: string;
|
|
4168
|
+
}
|
|
4169
|
+
interface Subject {
|
|
4170
|
+
/** ID of identity assigned to the asset. */
|
|
4171
|
+
_id?: string;
|
|
4172
|
+
/** Type of identity assigned to the asset. Supported subject types include user IDs, account IDs, and app IDs. */
|
|
4173
|
+
subjectType?: SubjectType;
|
|
4174
|
+
/** Context of identity assigned to the asset. For example, a `subjectType` = `USER` will have `context` = `ACCOUNT`. */
|
|
4175
|
+
context?: SubjectContext;
|
|
4176
|
+
}
|
|
4177
|
+
declare enum SubjectType {
|
|
4178
|
+
UNKNOWN = "UNKNOWN",
|
|
4179
|
+
ACCOUNT = "ACCOUNT",
|
|
4180
|
+
USER = "USER",
|
|
4181
|
+
USER_GROUP = "USER_GROUP",
|
|
4182
|
+
MEMBER_GROUP = "MEMBER_GROUP",
|
|
4183
|
+
VISITOR_GROUP = "VISITOR_GROUP",
|
|
4184
|
+
EXTERNAL_APP = "EXTERNAL_APP",
|
|
4185
|
+
ACCOUNT_GROUP = "ACCOUNT_GROUP",
|
|
4186
|
+
WIX_APP = "WIX_APP"
|
|
4187
|
+
}
|
|
4188
|
+
interface SubjectContext {
|
|
4189
|
+
_id?: string;
|
|
4190
|
+
contextType?: SubjectContextType;
|
|
4191
|
+
}
|
|
4192
|
+
declare enum SubjectContextType {
|
|
4193
|
+
UNKNOWN_CTX = "UNKNOWN_CTX",
|
|
4194
|
+
ORG_CTX = "ORG_CTX",
|
|
4195
|
+
ACCOUNT_CTX = "ACCOUNT_CTX"
|
|
4196
|
+
}
|
|
4197
|
+
interface GetAppContributorsRequest {
|
|
4198
|
+
appId?: string;
|
|
4199
|
+
/** The locale of the request. Defaults to en-us. */
|
|
4200
|
+
locale?: string | null;
|
|
4201
|
+
}
|
|
4202
|
+
interface GetAppContributorsResponse {
|
|
4203
|
+
contributors?: Contributor[];
|
|
4204
|
+
invites?: AppInvite[];
|
|
4205
|
+
}
|
|
4206
|
+
interface AppInvite {
|
|
4207
|
+
/** @readonly */
|
|
4208
|
+
_id?: string;
|
|
4209
|
+
/** TODO: amitis - remove this comment after the next merge */
|
|
4210
|
+
destEmail?: string;
|
|
4211
|
+
/** @readonly */
|
|
4212
|
+
status?: string;
|
|
4213
|
+
/** @readonly */
|
|
4214
|
+
acceptLink?: string;
|
|
4215
|
+
invitePurpose?: string | null;
|
|
4216
|
+
policies?: AssignedPolicy[];
|
|
4217
|
+
/** @readonly */
|
|
4218
|
+
expirationDate?: Date | null;
|
|
4219
|
+
/** @readonly */
|
|
4220
|
+
dateCreated?: Date | null;
|
|
4221
|
+
/** @readonly */
|
|
4222
|
+
dateUpdated?: Date | null;
|
|
4223
|
+
}
|
|
4224
|
+
interface GetSiteContributorsRequest {
|
|
4225
|
+
/** The locale of the request. Defaults to en-us */
|
|
4226
|
+
locale?: string | null;
|
|
4227
|
+
}
|
|
4228
|
+
interface GetSiteContributorsResponse {
|
|
4229
|
+
users?: User[];
|
|
4230
|
+
teams?: Team[];
|
|
4231
|
+
invites?: SiteInvite[];
|
|
4232
|
+
policies?: Policy[];
|
|
4233
|
+
permissions?: string[];
|
|
4234
|
+
userId?: string;
|
|
4235
|
+
loggedInAccountId?: string;
|
|
4236
|
+
pendingOwner?: PendingOwner;
|
|
4237
|
+
contributorLimit?: ContributorLimit;
|
|
4238
|
+
predefinedRoles?: PredefinedRoles;
|
|
4239
|
+
}
|
|
4240
|
+
interface User {
|
|
4241
|
+
/** User ID. */
|
|
4242
|
+
_id?: string;
|
|
4243
|
+
/**
|
|
4244
|
+
* Deprecated.
|
|
4245
|
+
* @deprecated
|
|
4246
|
+
*/
|
|
4247
|
+
roles?: string[];
|
|
4248
|
+
/** User's email address. */
|
|
4249
|
+
email?: string;
|
|
4250
|
+
/** User's name. */
|
|
4251
|
+
name?: Name;
|
|
4252
|
+
/** URL to user's profile image, when provided. */
|
|
4253
|
+
profileImage?: string | null;
|
|
4254
|
+
/** Date the user joined the team. */
|
|
4255
|
+
joinedTeamAt?: Date | null;
|
|
4256
|
+
/**
|
|
4257
|
+
* Deprecated.
|
|
4258
|
+
* @deprecated
|
|
4259
|
+
*/
|
|
4260
|
+
policyIds?: string[];
|
|
4261
|
+
/** Resources the user can access. */
|
|
4262
|
+
assignments?: Assignment[];
|
|
4263
|
+
}
|
|
4264
|
+
interface Name {
|
|
4265
|
+
/** User's first name. */
|
|
4266
|
+
firstName?: string;
|
|
4267
|
+
/** User's last name. */
|
|
4268
|
+
lastName?: string;
|
|
4269
|
+
}
|
|
4270
|
+
interface Team {
|
|
4271
|
+
accountId?: string;
|
|
4272
|
+
accountInfo?: AccountInfo;
|
|
4273
|
+
policyIds?: string[];
|
|
4274
|
+
joinedAt?: Date | null;
|
|
4275
|
+
}
|
|
4276
|
+
interface AccountInfo {
|
|
4277
|
+
accountName?: string;
|
|
4278
|
+
accountImage?: string;
|
|
4279
|
+
isTeam?: boolean;
|
|
4280
|
+
}
|
|
4281
|
+
interface SiteInvite {
|
|
4282
|
+
/**
|
|
4283
|
+
* Invite ID.
|
|
4284
|
+
* @readonly
|
|
4285
|
+
*/
|
|
4286
|
+
_id?: string;
|
|
4287
|
+
/**
|
|
4288
|
+
* Site ID the user is invited to as a collaborator.
|
|
4289
|
+
* @readonly
|
|
4290
|
+
*/
|
|
4291
|
+
siteId?: string;
|
|
4292
|
+
/** Email address where the invite was sent. */
|
|
4293
|
+
email?: string;
|
|
4294
|
+
/** Role IDs included in the invite. */
|
|
4295
|
+
policyIds?: string[];
|
|
4296
|
+
/**
|
|
4297
|
+
* Deprecated. Use `inviterAccountId`.
|
|
4298
|
+
* @readonly
|
|
4299
|
+
* @deprecated
|
|
4300
|
+
*/
|
|
4301
|
+
inviterId?: string;
|
|
4302
|
+
/**
|
|
4303
|
+
* Invite Status.
|
|
4304
|
+
*
|
|
4305
|
+
* Supported values:
|
|
4306
|
+
* - **Pending:** The invite has been sent and is valid, waiting for the user's response.
|
|
4307
|
+
* - **Used:** The invite has been accepted.
|
|
4308
|
+
* - **Deleted:** The invite has been deleted or revoked.
|
|
4309
|
+
* - **Declined:** The user declined the invite.
|
|
4310
|
+
* - **Expired:** The invite has expired without being accepted.
|
|
4311
|
+
*/
|
|
4312
|
+
status?: InviteStatus;
|
|
4313
|
+
/** Link to accept the invite. */
|
|
4314
|
+
acceptLink?: string;
|
|
4315
|
+
/**
|
|
4316
|
+
* Inviting account ID.
|
|
4317
|
+
* @readonly
|
|
4318
|
+
*/
|
|
4319
|
+
inviterAccountId?: string;
|
|
4320
|
+
/**
|
|
4321
|
+
* Account ID that accepted the invite. Populated only once the invite is accepted.
|
|
4322
|
+
* @readonly
|
|
4323
|
+
*/
|
|
4324
|
+
acceptedByAccountId?: string | null;
|
|
4325
|
+
/** Date the invite was created. */
|
|
4326
|
+
dateCreated?: Date | null;
|
|
4327
|
+
/** User's Wix Bookings staff ID, if relevant. */
|
|
4328
|
+
staffId?: string | null;
|
|
4329
|
+
/** Invite expiration date */
|
|
4330
|
+
expirationDate?: Date | null;
|
|
4331
|
+
}
|
|
4332
|
+
/** Invite status stating whether the invite was accepted, waiting to be accepted, deleted etc.. */
|
|
4333
|
+
declare enum InviteStatus {
|
|
4334
|
+
Pending = "Pending",
|
|
4335
|
+
Used = "Used",
|
|
4336
|
+
Deleted = "Deleted",
|
|
4337
|
+
Declined = "Declined",
|
|
4338
|
+
Expired = "Expired"
|
|
4339
|
+
}
|
|
4340
|
+
interface Policy {
|
|
4341
|
+
_id?: string;
|
|
4342
|
+
description?: string | null;
|
|
4343
|
+
name?: string | null;
|
|
4344
|
+
isCustom?: boolean;
|
|
4345
|
+
scopes?: string[];
|
|
4346
|
+
}
|
|
4347
|
+
interface PendingOwner {
|
|
4348
|
+
email?: string;
|
|
4349
|
+
expirationDate?: Date | null;
|
|
4350
|
+
acceptLink?: string;
|
|
4351
|
+
}
|
|
4352
|
+
interface ContributorLimit {
|
|
4353
|
+
contributorLimit?: number;
|
|
4354
|
+
}
|
|
4355
|
+
interface PredefinedRoles {
|
|
4356
|
+
roles?: PredefinedRole[];
|
|
4357
|
+
}
|
|
4358
|
+
interface PredefinedRole {
|
|
4359
|
+
titleKey?: string;
|
|
4360
|
+
roles?: Role[];
|
|
4361
|
+
title?: string | null;
|
|
4362
|
+
areaId?: string;
|
|
4363
|
+
}
|
|
4364
|
+
interface Role {
|
|
4365
|
+
_id?: string;
|
|
4366
|
+
deprecatedKey?: string;
|
|
4367
|
+
/** @deprecated */
|
|
4368
|
+
titleKey?: string;
|
|
4369
|
+
/** @deprecated */
|
|
4370
|
+
descriptionKey?: string;
|
|
4371
|
+
deprecated?: boolean;
|
|
4372
|
+
restrictFromLevel?: string;
|
|
4373
|
+
experiments?: string[];
|
|
4374
|
+
appDefIds?: string[];
|
|
4375
|
+
title?: string | null;
|
|
4376
|
+
description?: string | null;
|
|
4377
|
+
isCustom?: boolean;
|
|
4378
|
+
scopes?: string[];
|
|
4379
|
+
availableResourceTypes?: ResourceType[];
|
|
4380
|
+
availableConditions?: ConditionAttributeType[];
|
|
4381
|
+
limitToEditorTypes?: string[];
|
|
4382
|
+
}
|
|
4383
|
+
interface GetSiteContributorsV2Request {
|
|
4384
|
+
/** The locale of the request. Defaults to en-us. */
|
|
4385
|
+
locale?: string | null;
|
|
4386
|
+
}
|
|
4387
|
+
interface GetSiteContributorsV2Response {
|
|
4388
|
+
/** List of contributors of the given site. */
|
|
4389
|
+
contributors?: Contributor[];
|
|
4390
|
+
/** List of invites to contribute to the given site. */
|
|
4391
|
+
invites?: SiteInvite[];
|
|
4392
|
+
/** Quota information for contributors on the given site. */
|
|
4393
|
+
contributorsQuota?: ContributorsQuota;
|
|
4394
|
+
}
|
|
4395
|
+
interface ContributorsQuota extends ContributorsQuotaOptionsOneOf {
|
|
4396
|
+
/** Limited contributors quota details. */
|
|
4397
|
+
limitedOptions?: LimitedOptions;
|
|
4398
|
+
/** Type of contributors quota */
|
|
4399
|
+
type?: Type;
|
|
4400
|
+
}
|
|
4401
|
+
/** @oneof */
|
|
4402
|
+
interface ContributorsQuotaOptionsOneOf {
|
|
4403
|
+
/** Limited contributors quota details. */
|
|
4404
|
+
limitedOptions?: LimitedOptions;
|
|
4405
|
+
}
|
|
4406
|
+
/** Enum to represent different types of contributors quota. */
|
|
4407
|
+
declare enum Type {
|
|
4408
|
+
UNKNOWN = "UNKNOWN",
|
|
4409
|
+
LIMITED = "LIMITED",
|
|
4410
|
+
UNLIMITED = "UNLIMITED"
|
|
4411
|
+
}
|
|
4412
|
+
/** Details for a limited contributors quota. */
|
|
4413
|
+
interface LimitedOptions {
|
|
4414
|
+
/** Maximum number of contributors allowed. */
|
|
4415
|
+
limit?: number;
|
|
4416
|
+
/** Number of accepted or pending invitations. */
|
|
4417
|
+
used?: number;
|
|
4418
|
+
}
|
|
4419
|
+
interface HandleSiteTransferRequest {
|
|
4420
|
+
originalOwnerAccountId?: string;
|
|
4421
|
+
newOwnerAccountId?: string;
|
|
4422
|
+
metaSiteId?: string;
|
|
4423
|
+
keepOriginalOwnerAsContributor?: boolean;
|
|
4424
|
+
}
|
|
4425
|
+
interface HandleSiteTransferResponse {
|
|
4426
|
+
}
|
|
4427
|
+
interface GetCurrentUserRolesRequest {
|
|
4428
|
+
/** The locale of the request. Defaults to en-us */
|
|
4429
|
+
locale?: string | null;
|
|
4430
|
+
}
|
|
4431
|
+
interface GetCurrentUserRolesResponse {
|
|
4432
|
+
roles?: LocalizedRole[];
|
|
4433
|
+
}
|
|
4434
|
+
interface LocalizedRole {
|
|
4435
|
+
name?: string;
|
|
4436
|
+
description?: string | null;
|
|
4437
|
+
}
|
|
4438
|
+
interface BulkGetUserRolesOnSiteRequest {
|
|
4439
|
+
users?: UserSubject[];
|
|
4440
|
+
/** The locale of the request. Defaults to en-us */
|
|
4441
|
+
locale?: string | null;
|
|
4442
|
+
}
|
|
4443
|
+
interface UserSubject {
|
|
4444
|
+
userId?: string;
|
|
4445
|
+
accountId?: string;
|
|
4446
|
+
}
|
|
4447
|
+
interface BulkGetUserRolesOnSiteResponse {
|
|
4448
|
+
userRoles?: UserLocalizedRoles[];
|
|
4449
|
+
}
|
|
4450
|
+
interface UserLocalizedRoles {
|
|
4451
|
+
user?: UserSubject;
|
|
4452
|
+
roles?: LocalizedRole[];
|
|
4453
|
+
}
|
|
4454
|
+
interface ChangeContributorRoleRequest {
|
|
4455
|
+
/** Contributor's account ID. */
|
|
4456
|
+
accountId: string;
|
|
4457
|
+
/** New roles to assign to the contributor on the site. */
|
|
4458
|
+
newRoles: SiteRoleAssignment[];
|
|
4459
|
+
}
|
|
4460
|
+
interface SiteRoleAssignment {
|
|
4461
|
+
/** 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. */
|
|
4462
|
+
roleId?: string;
|
|
4463
|
+
/**
|
|
4464
|
+
* Assignment ID mapping the role to the contributor on the site.
|
|
4465
|
+
* @readonly
|
|
4466
|
+
*/
|
|
4467
|
+
assignmentId?: string;
|
|
4468
|
+
}
|
|
4469
|
+
interface ChangeContributorRoleResponse {
|
|
4470
|
+
/** New roles assigned to the contributor on the site. */
|
|
4471
|
+
newAssignedRoles?: SiteRoleAssignment[];
|
|
4472
|
+
}
|
|
4473
|
+
interface QuerySiteContributorsRequest {
|
|
4474
|
+
filter?: QuerySiteContributorsFilter;
|
|
4475
|
+
}
|
|
4476
|
+
interface QuerySiteContributorsFilter {
|
|
4477
|
+
/** 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. */
|
|
4478
|
+
policyIds?: string[];
|
|
4479
|
+
}
|
|
4480
|
+
declare enum FieldSet {
|
|
4481
|
+
UNKNOWN = "UNKNOWN",
|
|
4482
|
+
/** Include only `account_id` and `account_owner_id` fields. */
|
|
4483
|
+
META_DATA = "META_DATA"
|
|
4484
|
+
}
|
|
4485
|
+
interface QuerySiteContributorsResponse {
|
|
4486
|
+
/** List of site contributors. */
|
|
4487
|
+
contributors?: ContributorV2[];
|
|
4488
|
+
}
|
|
4489
|
+
interface ContributorV2 {
|
|
4490
|
+
/** Contributor's account ID. */
|
|
4491
|
+
accountId?: string | null;
|
|
4492
|
+
/** User ID of the owner of the account that the contributor has joined. */
|
|
4493
|
+
accountOwnerId?: string | null;
|
|
4494
|
+
}
|
|
4495
|
+
interface GetContributorsQuotaRequest {
|
|
4496
|
+
}
|
|
4497
|
+
interface GetContributorsQuotaResponse {
|
|
4498
|
+
/** Quota information for contributors on the given site. */
|
|
4499
|
+
contributorsQuota?: ContributorsQuota;
|
|
4500
|
+
}
|
|
4501
|
+
interface SiteRoleAssignmentNonNullableFields {
|
|
4502
|
+
roleId: string;
|
|
4503
|
+
assignmentId: string;
|
|
4504
|
+
}
|
|
4505
|
+
interface ChangeContributorRoleResponseNonNullableFields {
|
|
4506
|
+
newAssignedRoles: SiteRoleAssignmentNonNullableFields[];
|
|
4507
|
+
}
|
|
4508
|
+
interface ChangeRoleOptions {
|
|
4509
|
+
/** New roles to assign to the contributor on the site. */
|
|
4510
|
+
newRoles: SiteRoleAssignment[];
|
|
4511
|
+
}
|
|
4512
|
+
interface QuerySiteContributorsOptions {
|
|
4513
|
+
filter?: QuerySiteContributorsFilter;
|
|
4514
|
+
}
|
|
4515
|
+
|
|
4516
|
+
declare function changeRole$1(httpClient: HttpClient): ChangeRoleSignature;
|
|
4517
|
+
interface ChangeRoleSignature {
|
|
4518
|
+
/**
|
|
4519
|
+
* Overrides all the roles of a contributor for the specified site.
|
|
4520
|
+
* @param - Contributor's account ID.
|
|
4521
|
+
*/
|
|
4522
|
+
(accountId: string, options: ChangeRoleOptions): Promise<ChangeContributorRoleResponse & ChangeContributorRoleResponseNonNullableFields>;
|
|
4523
|
+
}
|
|
4524
|
+
declare function querySiteContributors$1(httpClient: HttpClient): QuerySiteContributorsSignature;
|
|
4525
|
+
interface QuerySiteContributorsSignature {
|
|
4526
|
+
/**
|
|
4527
|
+
* Retrieves a list of contributors for the specified site, given the provided filters.
|
|
4528
|
+
*/
|
|
4529
|
+
(options?: QuerySiteContributorsOptions | undefined): Promise<QuerySiteContributorsResponse>;
|
|
4530
|
+
}
|
|
4531
|
+
|
|
4532
|
+
declare const changeRole: MaybeContext<BuildRESTFunction<typeof changeRole$1> & typeof changeRole$1>;
|
|
4533
|
+
declare const querySiteContributors: MaybeContext<BuildRESTFunction<typeof querySiteContributors$1> & typeof querySiteContributors$1>;
|
|
4534
|
+
|
|
4535
|
+
type context_AccountInfo = AccountInfo;
|
|
4536
|
+
type context_AppInvite = AppInvite;
|
|
4537
|
+
type context_AssignedPolicy = AssignedPolicy;
|
|
4538
|
+
type context_Assignment = Assignment;
|
|
4539
|
+
type context_BulkGetUserRolesOnSiteRequest = BulkGetUserRolesOnSiteRequest;
|
|
4540
|
+
type context_BulkGetUserRolesOnSiteResponse = BulkGetUserRolesOnSiteResponse;
|
|
4541
|
+
type context_ChangeContributorRoleRequest = ChangeContributorRoleRequest;
|
|
4542
|
+
type context_ChangeContributorRoleResponse = ChangeContributorRoleResponse;
|
|
4543
|
+
type context_ChangeContributorRoleResponseNonNullableFields = ChangeContributorRoleResponseNonNullableFields;
|
|
4544
|
+
type context_ChangeRoleOptions = ChangeRoleOptions;
|
|
4545
|
+
type context_CompanionResource = CompanionResource;
|
|
4546
|
+
type context_Condition = Condition;
|
|
4547
|
+
type context_ConditionAttributeType = ConditionAttributeType;
|
|
4548
|
+
declare const context_ConditionAttributeType: typeof ConditionAttributeType;
|
|
4549
|
+
type context_Conditions = Conditions;
|
|
4550
|
+
type context_Contributor = Contributor;
|
|
4551
|
+
type context_ContributorLimit = ContributorLimit;
|
|
4552
|
+
type context_ContributorV2 = ContributorV2;
|
|
4553
|
+
type context_ContributorsQuota = ContributorsQuota;
|
|
4554
|
+
type context_ContributorsQuotaOptionsOneOf = ContributorsQuotaOptionsOneOf;
|
|
4555
|
+
type context_FieldSet = FieldSet;
|
|
4556
|
+
declare const context_FieldSet: typeof FieldSet;
|
|
4557
|
+
type context_GetAppContributorsRequest = GetAppContributorsRequest;
|
|
4558
|
+
type context_GetAppContributorsResponse = GetAppContributorsResponse;
|
|
4559
|
+
type context_GetContributorsQuotaRequest = GetContributorsQuotaRequest;
|
|
4560
|
+
type context_GetContributorsQuotaResponse = GetContributorsQuotaResponse;
|
|
4561
|
+
type context_GetCurrentUserRolesRequest = GetCurrentUserRolesRequest;
|
|
4562
|
+
type context_GetCurrentUserRolesResponse = GetCurrentUserRolesResponse;
|
|
4563
|
+
type context_GetSiteContributorsRequest = GetSiteContributorsRequest;
|
|
4564
|
+
type context_GetSiteContributorsResponse = GetSiteContributorsResponse;
|
|
4565
|
+
type context_GetSiteContributorsV2Request = GetSiteContributorsV2Request;
|
|
4566
|
+
type context_GetSiteContributorsV2Response = GetSiteContributorsV2Response;
|
|
4567
|
+
type context_HandleSiteTransferRequest = HandleSiteTransferRequest;
|
|
4568
|
+
type context_HandleSiteTransferResponse = HandleSiteTransferResponse;
|
|
4569
|
+
type context_InviteStatus = InviteStatus;
|
|
4570
|
+
declare const context_InviteStatus: typeof InviteStatus;
|
|
4571
|
+
type context_LimitedOptions = LimitedOptions;
|
|
4572
|
+
type context_LocalizedRole = LocalizedRole;
|
|
4573
|
+
type context_Name = Name;
|
|
4574
|
+
type context_PendingOwner = PendingOwner;
|
|
4575
|
+
type context_PersonMetaData = PersonMetaData;
|
|
4576
|
+
type context_Policy = Policy;
|
|
4577
|
+
type context_PredefinedRole = PredefinedRole;
|
|
4578
|
+
type context_PredefinedRoles = PredefinedRoles;
|
|
4579
|
+
type context_QuerySiteContributorsFilter = QuerySiteContributorsFilter;
|
|
4580
|
+
type context_QuerySiteContributorsOptions = QuerySiteContributorsOptions;
|
|
4581
|
+
type context_QuerySiteContributorsRequest = QuerySiteContributorsRequest;
|
|
4582
|
+
type context_QuerySiteContributorsResponse = QuerySiteContributorsResponse;
|
|
4583
|
+
type context_Resource = Resource;
|
|
4584
|
+
type context_ResourceType = ResourceType;
|
|
4585
|
+
declare const context_ResourceType: typeof ResourceType;
|
|
4586
|
+
type context_Restriction = Restriction;
|
|
4587
|
+
type context_RestrictionRestrictionsOneOf = RestrictionRestrictionsOneOf;
|
|
4588
|
+
type context_Role = Role;
|
|
4589
|
+
type context_SiteInvite = SiteInvite;
|
|
4590
|
+
type context_SiteRestriction = SiteRestriction;
|
|
4591
|
+
type context_SiteRoleAssignment = SiteRoleAssignment;
|
|
4592
|
+
type context_Subject = Subject;
|
|
4593
|
+
type context_SubjectContext = SubjectContext;
|
|
4594
|
+
type context_SubjectContextType = SubjectContextType;
|
|
4595
|
+
declare const context_SubjectContextType: typeof SubjectContextType;
|
|
4596
|
+
type context_SubjectType = SubjectType;
|
|
4597
|
+
declare const context_SubjectType: typeof SubjectType;
|
|
4598
|
+
type context_Team = Team;
|
|
4599
|
+
type context_Type = Type;
|
|
4600
|
+
declare const context_Type: typeof Type;
|
|
4601
|
+
type context_User = User;
|
|
4602
|
+
type context_UserLocalizedRoles = UserLocalizedRoles;
|
|
4603
|
+
type context_UserSubject = UserSubject;
|
|
4604
|
+
declare const context_changeRole: typeof changeRole;
|
|
4605
|
+
declare const context_querySiteContributors: typeof querySiteContributors;
|
|
4606
|
+
declare namespace context {
|
|
4607
|
+
export { type context_AccountInfo as AccountInfo, type context_AppInvite as AppInvite, type context_AssignedPolicy as AssignedPolicy, type context_Assignment as Assignment, type context_BulkGetUserRolesOnSiteRequest as BulkGetUserRolesOnSiteRequest, type context_BulkGetUserRolesOnSiteResponse as BulkGetUserRolesOnSiteResponse, type context_ChangeContributorRoleRequest as ChangeContributorRoleRequest, type context_ChangeContributorRoleResponse as ChangeContributorRoleResponse, type context_ChangeContributorRoleResponseNonNullableFields as ChangeContributorRoleResponseNonNullableFields, type context_ChangeRoleOptions as ChangeRoleOptions, type context_CompanionResource as CompanionResource, type context_Condition as Condition, context_ConditionAttributeType as ConditionAttributeType, type context_Conditions as Conditions, type context_Contributor as Contributor, type context_ContributorLimit as ContributorLimit, type context_ContributorV2 as ContributorV2, type context_ContributorsQuota as ContributorsQuota, type context_ContributorsQuotaOptionsOneOf as ContributorsQuotaOptionsOneOf, context_FieldSet as FieldSet, type context_GetAppContributorsRequest as GetAppContributorsRequest, type context_GetAppContributorsResponse as GetAppContributorsResponse, type context_GetContributorsQuotaRequest as GetContributorsQuotaRequest, type context_GetContributorsQuotaResponse as GetContributorsQuotaResponse, type context_GetCurrentUserRolesRequest as GetCurrentUserRolesRequest, type context_GetCurrentUserRolesResponse as GetCurrentUserRolesResponse, type context_GetSiteContributorsRequest as GetSiteContributorsRequest, type context_GetSiteContributorsResponse as GetSiteContributorsResponse, type context_GetSiteContributorsV2Request as GetSiteContributorsV2Request, type context_GetSiteContributorsV2Response as GetSiteContributorsV2Response, type context_HandleSiteTransferRequest as HandleSiteTransferRequest, type context_HandleSiteTransferResponse as HandleSiteTransferResponse, context_InviteStatus as InviteStatus, type context_LimitedOptions as LimitedOptions, type context_LocalizedRole as LocalizedRole, type context_Name as Name, type context_PendingOwner as PendingOwner, type context_PersonMetaData as PersonMetaData, type context_Policy as Policy, type context_PredefinedRole as PredefinedRole, type context_PredefinedRoles as PredefinedRoles, type context_QuerySiteContributorsFilter as QuerySiteContributorsFilter, type context_QuerySiteContributorsOptions as QuerySiteContributorsOptions, type context_QuerySiteContributorsRequest as QuerySiteContributorsRequest, type context_QuerySiteContributorsResponse as QuerySiteContributorsResponse, type context_Resource as Resource, context_ResourceType as ResourceType, type context_Restriction as Restriction, type context_RestrictionRestrictionsOneOf as RestrictionRestrictionsOneOf, type context_Role as Role, type context_SiteInvite as SiteInvite, type context_SiteRestriction as SiteRestriction, type context_SiteRoleAssignment as SiteRoleAssignment, type context_Subject as Subject, type context_SubjectContext as SubjectContext, context_SubjectContextType as SubjectContextType, context_SubjectType as SubjectType, type context_Team as Team, context_Type as Type, type context_User as User, type context_UserLocalizedRoles as UserLocalizedRoles, type context_UserSubject as UserSubject, context_changeRole as changeRole, context_querySiteContributors as querySiteContributors };
|
|
4608
|
+
}
|
|
4609
|
+
|
|
4610
|
+
export { context$4 as account, context$3 as accountInvite, context$7 as authentication, context as contributor, context$1 as oauth, context$6 as recovery, context$2 as siteInvite, context$5 as verification };
|