@wix/domains 1.0.34 → 1.0.35
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.js +1 -0
- package/build/cjs/context.js.map +1 -0
- package/build/cjs/index.js +1 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/meta.js +1 -0
- package/build/cjs/meta.js.map +1 -0
- package/package.json +8 -8
- package/type-bundles/context.bundle.d.ts +416 -210
- package/type-bundles/index.bundle.d.ts +416 -210
|
@@ -1,29 +1,127 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
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 bast url to use for API requests, for example `www.wixapis.com`
|
|
17
|
+
*/
|
|
18
|
+
apiBaseUrl?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Possible data to be provided by every host, for cross cutting concerns
|
|
21
|
+
* like internationalization, billing, etc.
|
|
22
|
+
*/
|
|
23
|
+
essentials?: {
|
|
24
|
+
/**
|
|
25
|
+
* The language of the currently viewed session
|
|
26
|
+
*/
|
|
27
|
+
language?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The locale of the currently viewed session
|
|
30
|
+
*/
|
|
31
|
+
locale?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Any headers that should be passed through to the API requests
|
|
34
|
+
*/
|
|
35
|
+
passThroughHeaders?: Record<string, string>;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
40
|
+
interface HttpClient {
|
|
41
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4
42
|
fetchWithAuth: typeof fetch;
|
|
5
43
|
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
44
|
+
getActiveToken?: () => string | undefined;
|
|
6
45
|
}
|
|
7
|
-
type RequestOptionsFactory
|
|
8
|
-
type HttpResponse
|
|
46
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
47
|
+
type HttpResponse<T = any> = {
|
|
9
48
|
data: T;
|
|
10
49
|
status: number;
|
|
11
50
|
statusText: string;
|
|
12
51
|
headers: any;
|
|
13
52
|
request?: any;
|
|
14
53
|
};
|
|
15
|
-
type RequestOptions
|
|
54
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
16
55
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
17
56
|
url: string;
|
|
18
57
|
data?: Data;
|
|
19
58
|
params?: URLSearchParams;
|
|
20
|
-
} & APIMetadata
|
|
21
|
-
type APIMetadata
|
|
59
|
+
} & APIMetadata;
|
|
60
|
+
type APIMetadata = {
|
|
22
61
|
methodFqn?: string;
|
|
23
62
|
entityFqdn?: string;
|
|
24
63
|
packageName?: string;
|
|
25
64
|
};
|
|
26
|
-
type BuildRESTFunction
|
|
65
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
66
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
67
|
+
__type: 'event-definition';
|
|
68
|
+
type: Type;
|
|
69
|
+
isDomainEvent?: boolean;
|
|
70
|
+
transformations?: (envelope: unknown) => Payload;
|
|
71
|
+
__payload: Payload;
|
|
72
|
+
};
|
|
73
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
74
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
75
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
76
|
+
|
|
77
|
+
type ServicePluginMethodInput = {
|
|
78
|
+
request: any;
|
|
79
|
+
metadata: any;
|
|
80
|
+
};
|
|
81
|
+
type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
|
|
82
|
+
type ServicePluginMethodMetadata = {
|
|
83
|
+
name: string;
|
|
84
|
+
primaryHttpMappingPath: string;
|
|
85
|
+
transformations: {
|
|
86
|
+
fromREST: (...args: unknown[]) => ServicePluginMethodInput;
|
|
87
|
+
toREST: (...args: unknown[]) => unknown;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
type ServicePluginDefinition<Contract extends ServicePluginContract> = {
|
|
91
|
+
__type: 'service-plugin-definition';
|
|
92
|
+
componentType: string;
|
|
93
|
+
methods: ServicePluginMethodMetadata[];
|
|
94
|
+
__contract: Contract;
|
|
95
|
+
};
|
|
96
|
+
declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
|
|
97
|
+
type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
|
|
98
|
+
declare const SERVICE_PLUGIN_ERROR_TYPE = "wix_spi_error";
|
|
99
|
+
|
|
100
|
+
type RequestContext = {
|
|
101
|
+
isSSR: boolean;
|
|
102
|
+
host: string;
|
|
103
|
+
protocol?: string;
|
|
104
|
+
};
|
|
105
|
+
type ResponseTransformer = (data: any, headers?: any) => any;
|
|
106
|
+
/**
|
|
107
|
+
* Ambassador request options types are copied mostly from AxiosRequestConfig.
|
|
108
|
+
* They are copied and not imported to reduce the amount of dependencies (to reduce install time).
|
|
109
|
+
* https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
|
|
110
|
+
*/
|
|
111
|
+
type Method = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
112
|
+
type AmbassadorRequestOptions<T = any> = {
|
|
113
|
+
_?: T;
|
|
114
|
+
url?: string;
|
|
115
|
+
method?: Method;
|
|
116
|
+
params?: any;
|
|
117
|
+
data?: any;
|
|
118
|
+
transformResponse?: ResponseTransformer | ResponseTransformer[];
|
|
119
|
+
};
|
|
120
|
+
type AmbassadorFactory<Request, Response> = (payload: Request) => ((context: RequestContext) => AmbassadorRequestOptions<Response>) & {
|
|
121
|
+
__isAmbassador: boolean;
|
|
122
|
+
};
|
|
123
|
+
type AmbassadorFunctionDescriptor<Request = any, Response = any> = AmbassadorFactory<Request, Response>;
|
|
124
|
+
type BuildAmbassadorFunction<T extends AmbassadorFunctionDescriptor> = T extends AmbassadorFunctionDescriptor<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
|
|
27
125
|
|
|
28
126
|
declare global {
|
|
29
127
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -32,6 +130,284 @@ declare global {
|
|
|
32
130
|
}
|
|
33
131
|
}
|
|
34
132
|
|
|
133
|
+
declare const emptyObjectSymbol: unique symbol;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
Represents a strictly empty plain object, the `{}` value.
|
|
137
|
+
|
|
138
|
+
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)).
|
|
139
|
+
|
|
140
|
+
@example
|
|
141
|
+
```
|
|
142
|
+
import type {EmptyObject} from 'type-fest';
|
|
143
|
+
|
|
144
|
+
// The following illustrates the problem with `{}`.
|
|
145
|
+
const foo1: {} = {}; // Pass
|
|
146
|
+
const foo2: {} = []; // Pass
|
|
147
|
+
const foo3: {} = 42; // Pass
|
|
148
|
+
const foo4: {} = {a: 1}; // Pass
|
|
149
|
+
|
|
150
|
+
// With `EmptyObject` only the first case is valid.
|
|
151
|
+
const bar1: EmptyObject = {}; // Pass
|
|
152
|
+
const bar2: EmptyObject = 42; // Fail
|
|
153
|
+
const bar3: EmptyObject = []; // Fail
|
|
154
|
+
const bar4: EmptyObject = {a: 1}; // Fail
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
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}.
|
|
158
|
+
|
|
159
|
+
@category Object
|
|
160
|
+
*/
|
|
161
|
+
type EmptyObject = {[emptyObjectSymbol]?: never};
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
Returns a boolean for whether the two given types are equal.
|
|
165
|
+
|
|
166
|
+
@link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
|
|
167
|
+
@link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
|
|
168
|
+
|
|
169
|
+
Use-cases:
|
|
170
|
+
- If you want to make a conditional branch based on the result of a comparison of two types.
|
|
171
|
+
|
|
172
|
+
@example
|
|
173
|
+
```
|
|
174
|
+
import type {IsEqual} from 'type-fest';
|
|
175
|
+
|
|
176
|
+
// This type returns a boolean for whether the given array includes the given item.
|
|
177
|
+
// `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
|
|
178
|
+
type Includes<Value extends readonly any[], Item> =
|
|
179
|
+
Value extends readonly [Value[0], ...infer rest]
|
|
180
|
+
? IsEqual<Value[0], Item> extends true
|
|
181
|
+
? true
|
|
182
|
+
: Includes<rest, Item>
|
|
183
|
+
: false;
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
@category Type Guard
|
|
187
|
+
@category Utilities
|
|
188
|
+
*/
|
|
189
|
+
type IsEqual<A, B> =
|
|
190
|
+
(<G>() => G extends A ? 1 : 2) extends
|
|
191
|
+
(<G>() => G extends B ? 1 : 2)
|
|
192
|
+
? true
|
|
193
|
+
: false;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
Filter out keys from an object.
|
|
197
|
+
|
|
198
|
+
Returns `never` if `Exclude` is strictly equal to `Key`.
|
|
199
|
+
Returns `never` if `Key` extends `Exclude`.
|
|
200
|
+
Returns `Key` otherwise.
|
|
201
|
+
|
|
202
|
+
@example
|
|
203
|
+
```
|
|
204
|
+
type Filtered = Filter<'foo', 'foo'>;
|
|
205
|
+
//=> never
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
@example
|
|
209
|
+
```
|
|
210
|
+
type Filtered = Filter<'bar', string>;
|
|
211
|
+
//=> never
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
@example
|
|
215
|
+
```
|
|
216
|
+
type Filtered = Filter<'bar', 'foo'>;
|
|
217
|
+
//=> 'bar'
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
@see {Except}
|
|
221
|
+
*/
|
|
222
|
+
type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
|
|
223
|
+
|
|
224
|
+
type ExceptOptions = {
|
|
225
|
+
/**
|
|
226
|
+
Disallow assigning non-specified properties.
|
|
227
|
+
|
|
228
|
+
Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
|
|
229
|
+
|
|
230
|
+
@default false
|
|
231
|
+
*/
|
|
232
|
+
requireExactProps?: boolean;
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
Create a type from an object type without certain keys.
|
|
237
|
+
|
|
238
|
+
We recommend setting the `requireExactProps` option to `true`.
|
|
239
|
+
|
|
240
|
+
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.
|
|
241
|
+
|
|
242
|
+
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)).
|
|
243
|
+
|
|
244
|
+
@example
|
|
245
|
+
```
|
|
246
|
+
import type {Except} from 'type-fest';
|
|
247
|
+
|
|
248
|
+
type Foo = {
|
|
249
|
+
a: number;
|
|
250
|
+
b: string;
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
type FooWithoutA = Except<Foo, 'a'>;
|
|
254
|
+
//=> {b: string}
|
|
255
|
+
|
|
256
|
+
const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
|
|
257
|
+
//=> errors: 'a' does not exist in type '{ b: string; }'
|
|
258
|
+
|
|
259
|
+
type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
|
|
260
|
+
//=> {a: number} & Partial<Record<"b", never>>
|
|
261
|
+
|
|
262
|
+
const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
|
|
263
|
+
//=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
@category Object
|
|
267
|
+
*/
|
|
268
|
+
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
|
|
269
|
+
[KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
|
|
270
|
+
} & (Options['requireExactProps'] extends true
|
|
271
|
+
? Partial<Record<KeysType, never>>
|
|
272
|
+
: {});
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
276
|
+
|
|
277
|
+
Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
|
|
278
|
+
|
|
279
|
+
@example
|
|
280
|
+
```
|
|
281
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
282
|
+
|
|
283
|
+
interface Example {
|
|
284
|
+
a: string;
|
|
285
|
+
b: string | number;
|
|
286
|
+
c?: string;
|
|
287
|
+
d: {};
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
type StringKeysOnly = ConditionalKeys<Example, string>;
|
|
291
|
+
//=> 'a'
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
|
|
295
|
+
|
|
296
|
+
@example
|
|
297
|
+
```
|
|
298
|
+
import type {ConditionalKeys} from 'type-fest';
|
|
299
|
+
|
|
300
|
+
type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
301
|
+
//=> 'a' | 'c'
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
@category Object
|
|
305
|
+
*/
|
|
306
|
+
type ConditionalKeys<Base, Condition> = NonNullable<
|
|
307
|
+
// Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
|
|
308
|
+
{
|
|
309
|
+
// Map through all the keys of the given base type.
|
|
310
|
+
[Key in keyof Base]:
|
|
311
|
+
// Pick only keys with types extending the given `Condition` type.
|
|
312
|
+
Base[Key] extends Condition
|
|
313
|
+
// Retain this key since the condition passes.
|
|
314
|
+
? Key
|
|
315
|
+
// Discard this key since the condition fails.
|
|
316
|
+
: never;
|
|
317
|
+
|
|
318
|
+
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
319
|
+
}[keyof Base]
|
|
320
|
+
>;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
Exclude keys from a shape that matches the given `Condition`.
|
|
324
|
+
|
|
325
|
+
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.
|
|
326
|
+
|
|
327
|
+
@example
|
|
328
|
+
```
|
|
329
|
+
import type {Primitive, ConditionalExcept} from 'type-fest';
|
|
330
|
+
|
|
331
|
+
class Awesome {
|
|
332
|
+
name: string;
|
|
333
|
+
successes: number;
|
|
334
|
+
failures: bigint;
|
|
335
|
+
|
|
336
|
+
run() {}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
|
|
340
|
+
//=> {run: () => void}
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
@example
|
|
344
|
+
```
|
|
345
|
+
import type {ConditionalExcept} from 'type-fest';
|
|
346
|
+
|
|
347
|
+
interface Example {
|
|
348
|
+
a: string;
|
|
349
|
+
b: string | number;
|
|
350
|
+
c: () => void;
|
|
351
|
+
d: {};
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
type NonStringKeysOnly = ConditionalExcept<Example, string>;
|
|
355
|
+
//=> {b: string | number; c: () => void; d: {}}
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
@category Object
|
|
359
|
+
*/
|
|
360
|
+
type ConditionalExcept<Base, Condition> = Except<
|
|
361
|
+
Base,
|
|
362
|
+
ConditionalKeys<Base, Condition>
|
|
363
|
+
>;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Descriptors are objects that describe the API of a module, and the module
|
|
367
|
+
* can either be a REST module or a host module.
|
|
368
|
+
* This type is recursive, so it can describe nested modules.
|
|
369
|
+
*/
|
|
370
|
+
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition<any> | ServicePluginDefinition<any> | {
|
|
371
|
+
[key: string]: Descriptors | PublicMetadata | any;
|
|
372
|
+
};
|
|
373
|
+
/**
|
|
374
|
+
* This type takes in a descriptors object of a certain Host (including an `unknown` host)
|
|
375
|
+
* and returns an object with the same structure, but with all descriptors replaced with their API.
|
|
376
|
+
* Any non-descriptor properties are removed from the returned object, including descriptors that
|
|
377
|
+
* do not match the given host (as they will not work with the given host).
|
|
378
|
+
*/
|
|
379
|
+
type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, Depth extends number = 5> = {
|
|
380
|
+
done: T;
|
|
381
|
+
recurse: T extends {
|
|
382
|
+
__type: typeof SERVICE_PLUGIN_ERROR_TYPE;
|
|
383
|
+
} ? 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<{
|
|
384
|
+
[Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
|
|
385
|
+
-1,
|
|
386
|
+
0,
|
|
387
|
+
1,
|
|
388
|
+
2,
|
|
389
|
+
3,
|
|
390
|
+
4,
|
|
391
|
+
5
|
|
392
|
+
][Depth]> : never;
|
|
393
|
+
}, EmptyObject>;
|
|
394
|
+
}[Depth extends -1 ? 'done' : 'recurse'];
|
|
395
|
+
type PublicMetadata = {
|
|
396
|
+
PACKAGE_NAME?: string;
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
declare global {
|
|
400
|
+
interface ContextualClient {
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* A type used to create concerete types from SDK descriptors in
|
|
405
|
+
* case a contextual client is available.
|
|
406
|
+
*/
|
|
407
|
+
type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
408
|
+
host: Host;
|
|
409
|
+
} ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
|
|
410
|
+
|
|
35
411
|
/** A `connectedDomain` object holds information about an external domain and its connection to a Wix site. */
|
|
36
412
|
interface ConnectedDomain {
|
|
37
413
|
/**
|
|
@@ -347,7 +723,7 @@ interface ListConnectedDomainsOptions {
|
|
|
347
723
|
paging?: CursorPaging$2;
|
|
348
724
|
}
|
|
349
725
|
|
|
350
|
-
declare function createConnectedDomain$1(httpClient: HttpClient
|
|
726
|
+
declare function createConnectedDomain$1(httpClient: HttpClient): CreateConnectedDomainSignature;
|
|
351
727
|
interface CreateConnectedDomainSignature {
|
|
352
728
|
/**
|
|
353
729
|
* Creates a `connectedDomain` object and starts the domain connection process. It may take up to 48 hours for the DNS changes to take effect.
|
|
@@ -366,7 +742,7 @@ interface CreateConnectedDomainSignature {
|
|
|
366
742
|
*/
|
|
367
743
|
(connectedDomain: ConnectedDomain): Promise<ConnectedDomain & ConnectedDomainNonNullableFields>;
|
|
368
744
|
}
|
|
369
|
-
declare function getConnectedDomain$1(httpClient: HttpClient
|
|
745
|
+
declare function getConnectedDomain$1(httpClient: HttpClient): GetConnectedDomainSignature;
|
|
370
746
|
interface GetConnectedDomainSignature {
|
|
371
747
|
/**
|
|
372
748
|
* Retrieves a connected domain.
|
|
@@ -380,7 +756,7 @@ interface GetConnectedDomainSignature {
|
|
|
380
756
|
*/
|
|
381
757
|
(connectedDomainId: string): Promise<ConnectedDomain & ConnectedDomainNonNullableFields>;
|
|
382
758
|
}
|
|
383
|
-
declare function deleteConnectedDomain$1(httpClient: HttpClient
|
|
759
|
+
declare function deleteConnectedDomain$1(httpClient: HttpClient): DeleteConnectedDomainSignature;
|
|
384
760
|
interface DeleteConnectedDomainSignature {
|
|
385
761
|
/**
|
|
386
762
|
* Deletes a `connectedDomain` object and removes related DNS records from
|
|
@@ -400,7 +776,7 @@ interface DeleteConnectedDomainSignature {
|
|
|
400
776
|
*/
|
|
401
777
|
(connectedDomainId: string): Promise<void>;
|
|
402
778
|
}
|
|
403
|
-
declare function listConnectedDomains$1(httpClient: HttpClient
|
|
779
|
+
declare function listConnectedDomains$1(httpClient: HttpClient): ListConnectedDomainsSignature;
|
|
404
780
|
interface ListConnectedDomainsSignature {
|
|
405
781
|
/**
|
|
406
782
|
* Retrieves a list of up to 100 connected domains.
|
|
@@ -415,10 +791,10 @@ interface ListConnectedDomainsSignature {
|
|
|
415
791
|
(options?: ListConnectedDomainsOptions | undefined): Promise<ListConnectedDomainsResponse & ListConnectedDomainsResponseNonNullableFields>;
|
|
416
792
|
}
|
|
417
793
|
|
|
418
|
-
declare const createConnectedDomain: BuildRESTFunction
|
|
419
|
-
declare const getConnectedDomain: BuildRESTFunction
|
|
420
|
-
declare const deleteConnectedDomain: BuildRESTFunction
|
|
421
|
-
declare const listConnectedDomains: BuildRESTFunction
|
|
794
|
+
declare const createConnectedDomain: MaybeContext<BuildRESTFunction<typeof createConnectedDomain$1> & typeof createConnectedDomain$1>;
|
|
795
|
+
declare const getConnectedDomain: MaybeContext<BuildRESTFunction<typeof getConnectedDomain$1> & typeof getConnectedDomain$1>;
|
|
796
|
+
declare const deleteConnectedDomain: MaybeContext<BuildRESTFunction<typeof deleteConnectedDomain$1> & typeof deleteConnectedDomain$1>;
|
|
797
|
+
declare const listConnectedDomains: MaybeContext<BuildRESTFunction<typeof listConnectedDomains$1> & typeof listConnectedDomains$1>;
|
|
422
798
|
|
|
423
799
|
type context$5_ConnectedDomain = ConnectedDomain;
|
|
424
800
|
type context$5_ConnectedDomainNonNullableFields = ConnectedDomainNonNullableFields;
|
|
@@ -442,40 +818,6 @@ declare namespace context$5 {
|
|
|
442
818
|
export { type ActionEvent$2 as ActionEvent, AssignmentType$1 as AssignmentType, type context$5_ConnectedDomain as ConnectedDomain, type context$5_ConnectedDomainNonNullableFields as ConnectedDomainNonNullableFields, ConnectionType$1 as ConnectionType, type context$5_CreateConnectedDomainRequest as CreateConnectedDomainRequest, type context$5_CreateConnectedDomainResponse as CreateConnectedDomainResponse, type context$5_CreateConnectedDomainResponseNonNullableFields as CreateConnectedDomainResponseNonNullableFields, type CursorPaging$2 as CursorPaging, type CursorPagingMetadata$2 as CursorPagingMetadata, type Cursors$2 as Cursors, type context$5_DeleteConnectedDomainRequest as DeleteConnectedDomainRequest, type context$5_DeleteConnectedDomainResponse as DeleteConnectedDomainResponse, DnsPropagationStatus$1 as DnsPropagationStatus, type DomainEvent$2 as DomainEvent, type DomainEventBodyOneOf$2 as DomainEventBodyOneOf, type DomainRemovedEvent$1 as DomainRemovedEvent, type EntityCreatedEvent$2 as EntityCreatedEvent, type EntityDeletedEvent$2 as EntityDeletedEvent, type EntityUpdatedEvent$2 as EntityUpdatedEvent, type context$5_GetConnectedDomainRequest as GetConnectedDomainRequest, type context$5_GetConnectedDomainResponse as GetConnectedDomainResponse, type context$5_GetConnectedDomainResponseNonNullableFields as GetConnectedDomainResponseNonNullableFields, type IdentificationData$2 as IdentificationData, type IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, type context$5_ListConnectedDomainsOptions as ListConnectedDomainsOptions, type context$5_ListConnectedDomainsRequest as ListConnectedDomainsRequest, type context$5_ListConnectedDomainsResponse as ListConnectedDomainsResponse, type context$5_ListConnectedDomainsResponseNonNullableFields as ListConnectedDomainsResponseNonNullableFields, type MessageEnvelope$2 as MessageEnvelope, type RedirectAssignmentInfo$1 as RedirectAssignmentInfo, type RestoreInfo$2 as RestoreInfo, type SiteInfo$1 as SiteInfo, type SiteInfoAssignmentInfoOneOf$1 as SiteInfoAssignmentInfoOneOf, WebhookIdentityType$2 as WebhookIdentityType, context$5_createConnectedDomain as createConnectedDomain, context$5_deleteConnectedDomain as deleteConnectedDomain, context$5_getConnectedDomain as getConnectedDomain, context$5_listConnectedDomains as listConnectedDomains };
|
|
443
819
|
}
|
|
444
820
|
|
|
445
|
-
type RESTFunctionDescriptor$4<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$4) => T;
|
|
446
|
-
interface HttpClient$4 {
|
|
447
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
|
|
448
|
-
fetchWithAuth: typeof fetch;
|
|
449
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
450
|
-
}
|
|
451
|
-
type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
|
|
452
|
-
type HttpResponse$4<T = any> = {
|
|
453
|
-
data: T;
|
|
454
|
-
status: number;
|
|
455
|
-
statusText: string;
|
|
456
|
-
headers: any;
|
|
457
|
-
request?: any;
|
|
458
|
-
};
|
|
459
|
-
type RequestOptions$4<_TResponse = any, Data = any> = {
|
|
460
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
461
|
-
url: string;
|
|
462
|
-
data?: Data;
|
|
463
|
-
params?: URLSearchParams;
|
|
464
|
-
} & APIMetadata$4;
|
|
465
|
-
type APIMetadata$4 = {
|
|
466
|
-
methodFqn?: string;
|
|
467
|
-
entityFqdn?: string;
|
|
468
|
-
packageName?: string;
|
|
469
|
-
};
|
|
470
|
-
type BuildRESTFunction$4<T extends RESTFunctionDescriptor$4> = T extends RESTFunctionDescriptor$4<infer U> ? U : never;
|
|
471
|
-
|
|
472
|
-
declare global {
|
|
473
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
474
|
-
interface SymbolConstructor {
|
|
475
|
-
readonly observable: symbol;
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
|
|
479
821
|
/**
|
|
480
822
|
* A `connectedDomainSetupInfo` object holds information the connected domain's
|
|
481
823
|
* external registrar and some DNS records. You can use this information to guide
|
|
@@ -683,7 +1025,7 @@ interface GetConnectedDomainSetupInfoResponseNonNullableFields {
|
|
|
683
1025
|
connectedDomainSetupInfo?: ConnectedDomainSetupInfoNonNullableFields;
|
|
684
1026
|
}
|
|
685
1027
|
|
|
686
|
-
declare function getConnectedDomainSetupInfo$1(httpClient: HttpClient
|
|
1028
|
+
declare function getConnectedDomainSetupInfo$1(httpClient: HttpClient): GetConnectedDomainSetupInfoSignature;
|
|
687
1029
|
interface GetConnectedDomainSetupInfoSignature {
|
|
688
1030
|
/**
|
|
689
1031
|
* Retrieves information for the initial setup of a connected domain.
|
|
@@ -698,7 +1040,7 @@ interface GetConnectedDomainSetupInfoSignature {
|
|
|
698
1040
|
(connectedDomainId: string): Promise<GetConnectedDomainSetupInfoResponse & GetConnectedDomainSetupInfoResponseNonNullableFields>;
|
|
699
1041
|
}
|
|
700
1042
|
|
|
701
|
-
declare const getConnectedDomainSetupInfo: BuildRESTFunction
|
|
1043
|
+
declare const getConnectedDomainSetupInfo: MaybeContext<BuildRESTFunction<typeof getConnectedDomainSetupInfo$1> & typeof getConnectedDomainSetupInfo$1>;
|
|
702
1044
|
|
|
703
1045
|
type context$4_ARecord = ARecord;
|
|
704
1046
|
type context$4_CnameRecord = CnameRecord;
|
|
@@ -723,40 +1065,6 @@ declare namespace context$4 {
|
|
|
723
1065
|
export { type context$4_ARecord as ARecord, type context$4_CnameRecord as CnameRecord, type context$4_ConnectedDomainSetupInfo as ConnectedDomainSetupInfo, type context$4_ConnectedDomainSetupInfoDnsRecordsOneOf as ConnectedDomainSetupInfoDnsRecordsOneOf, context$4_ConnectionType as ConnectionType, type context$4_GetConnectedDomainSetupInfoRequest as GetConnectedDomainSetupInfoRequest, type context$4_GetConnectedDomainSetupInfoResponse as GetConnectedDomainSetupInfoResponse, type context$4_GetConnectedDomainSetupInfoResponseNonNullableFields as GetConnectedDomainSetupInfoResponseNonNullableFields, type context$4_GetSetupInfoRequest as GetSetupInfoRequest, type context$4_GetSetupInfoResponse as GetSetupInfoResponse, type context$4_NameserverRecord as NameserverRecord, type context$4_NsRecord as NsRecord, type context$4_PointingRecords as PointingRecords, type context$4_PreCreateConnectedDomainRequest as PreCreateConnectedDomainRequest, type context$4_PreCreateConnectedDomainResponse as PreCreateConnectedDomainResponse, type context$4_Registrar as Registrar, type context$4_SubdomainRecords as SubdomainRecords, context$4_getConnectedDomainSetupInfo as getConnectedDomainSetupInfo };
|
|
724
1066
|
}
|
|
725
1067
|
|
|
726
|
-
type RESTFunctionDescriptor$3<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$3) => T;
|
|
727
|
-
interface HttpClient$3 {
|
|
728
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
|
|
729
|
-
fetchWithAuth: typeof fetch;
|
|
730
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
731
|
-
}
|
|
732
|
-
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
733
|
-
type HttpResponse$3<T = any> = {
|
|
734
|
-
data: T;
|
|
735
|
-
status: number;
|
|
736
|
-
statusText: string;
|
|
737
|
-
headers: any;
|
|
738
|
-
request?: any;
|
|
739
|
-
};
|
|
740
|
-
type RequestOptions$3<_TResponse = any, Data = any> = {
|
|
741
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
742
|
-
url: string;
|
|
743
|
-
data?: Data;
|
|
744
|
-
params?: URLSearchParams;
|
|
745
|
-
} & APIMetadata$3;
|
|
746
|
-
type APIMetadata$3 = {
|
|
747
|
-
methodFqn?: string;
|
|
748
|
-
entityFqdn?: string;
|
|
749
|
-
packageName?: string;
|
|
750
|
-
};
|
|
751
|
-
type BuildRESTFunction$3<T extends RESTFunctionDescriptor$3> = T extends RESTFunctionDescriptor$3<infer U> ? U : never;
|
|
752
|
-
|
|
753
|
-
declare global {
|
|
754
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
755
|
-
interface SymbolConstructor {
|
|
756
|
-
readonly observable: symbol;
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
|
|
760
1068
|
/** DNS zones hold information about the records that map a domain's URL to an IP address. */
|
|
761
1069
|
interface DnsZone {
|
|
762
1070
|
/** Domain name including the TLD. Both root domains and subdomains are supported. */
|
|
@@ -1074,7 +1382,7 @@ interface UpdateDnsZoneOptions {
|
|
|
1074
1382
|
dnssecEnabled?: boolean | null;
|
|
1075
1383
|
}
|
|
1076
1384
|
|
|
1077
|
-
declare function createDnsZone$1(httpClient: HttpClient
|
|
1385
|
+
declare function createDnsZone$1(httpClient: HttpClient): CreateDnsZoneSignature;
|
|
1078
1386
|
interface CreateDnsZoneSignature {
|
|
1079
1387
|
/**
|
|
1080
1388
|
* Creates a DNS zone in [Google's Cloud DNS](https://cloud.google.com/dns).
|
|
@@ -1096,7 +1404,7 @@ interface CreateDnsZoneSignature {
|
|
|
1096
1404
|
*/
|
|
1097
1405
|
(dnsZone: DnsZone): Promise<DnsZone & DnsZoneNonNullableFields>;
|
|
1098
1406
|
}
|
|
1099
|
-
declare function getDnsZone$1(httpClient: HttpClient
|
|
1407
|
+
declare function getDnsZone$1(httpClient: HttpClient): GetDnsZoneSignature;
|
|
1100
1408
|
interface GetDnsZoneSignature {
|
|
1101
1409
|
/**
|
|
1102
1410
|
* Retrieves the DNS zone belonging to the domain from
|
|
@@ -1109,7 +1417,7 @@ interface GetDnsZoneSignature {
|
|
|
1109
1417
|
*/
|
|
1110
1418
|
(domainName: string): Promise<DnsZone & DnsZoneNonNullableFields>;
|
|
1111
1419
|
}
|
|
1112
|
-
declare function updateDnsZone$1(httpClient: HttpClient
|
|
1420
|
+
declare function updateDnsZone$1(httpClient: HttpClient): UpdateDnsZoneSignature;
|
|
1113
1421
|
interface UpdateDnsZoneSignature {
|
|
1114
1422
|
/**
|
|
1115
1423
|
* Adds DNS records to and removes DNS records from a DNS zone in
|
|
@@ -1130,7 +1438,7 @@ interface UpdateDnsZoneSignature {
|
|
|
1130
1438
|
*/
|
|
1131
1439
|
(domainName: string, options?: UpdateDnsZoneOptions | undefined): Promise<UpdateDnsZoneResponse & UpdateDnsZoneResponseNonNullableFields>;
|
|
1132
1440
|
}
|
|
1133
|
-
declare function deleteDnsZone$1(httpClient: HttpClient
|
|
1441
|
+
declare function deleteDnsZone$1(httpClient: HttpClient): DeleteDnsZoneSignature;
|
|
1134
1442
|
interface DeleteDnsZoneSignature {
|
|
1135
1443
|
/**
|
|
1136
1444
|
* Deletes a DNS zone in [Google's Cloud DNS](https://cloud.google.com/dns).
|
|
@@ -1144,7 +1452,7 @@ interface DeleteDnsZoneSignature {
|
|
|
1144
1452
|
*/
|
|
1145
1453
|
(domainName: string): Promise<void>;
|
|
1146
1454
|
}
|
|
1147
|
-
declare function previewDnsZone$1(httpClient: HttpClient
|
|
1455
|
+
declare function previewDnsZone$1(httpClient: HttpClient): PreviewDnsZoneSignature;
|
|
1148
1456
|
interface PreviewDnsZoneSignature {
|
|
1149
1457
|
/**
|
|
1150
1458
|
* Generates a preview for a DNS zone based on
|
|
@@ -1161,11 +1469,11 @@ interface PreviewDnsZoneSignature {
|
|
|
1161
1469
|
(domainName: string): Promise<PreviewDnsZoneResponse & PreviewDnsZoneResponseNonNullableFields>;
|
|
1162
1470
|
}
|
|
1163
1471
|
|
|
1164
|
-
declare const createDnsZone: BuildRESTFunction
|
|
1165
|
-
declare const getDnsZone: BuildRESTFunction
|
|
1166
|
-
declare const updateDnsZone: BuildRESTFunction
|
|
1167
|
-
declare const deleteDnsZone: BuildRESTFunction
|
|
1168
|
-
declare const previewDnsZone: BuildRESTFunction
|
|
1472
|
+
declare const createDnsZone: MaybeContext<BuildRESTFunction<typeof createDnsZone$1> & typeof createDnsZone$1>;
|
|
1473
|
+
declare const getDnsZone: MaybeContext<BuildRESTFunction<typeof getDnsZone$1> & typeof getDnsZone$1>;
|
|
1474
|
+
declare const updateDnsZone: MaybeContext<BuildRESTFunction<typeof updateDnsZone$1> & typeof updateDnsZone$1>;
|
|
1475
|
+
declare const deleteDnsZone: MaybeContext<BuildRESTFunction<typeof deleteDnsZone$1> & typeof deleteDnsZone$1>;
|
|
1476
|
+
declare const previewDnsZone: MaybeContext<BuildRESTFunction<typeof previewDnsZone$1> & typeof previewDnsZone$1>;
|
|
1169
1477
|
|
|
1170
1478
|
type context$3_CreateDnsZoneRequest = CreateDnsZoneRequest;
|
|
1171
1479
|
type context$3_CreateDnsZoneResponse = CreateDnsZoneResponse;
|
|
@@ -1199,40 +1507,6 @@ declare namespace context$3 {
|
|
|
1199
1507
|
export { type ActionEvent$1 as ActionEvent, type context$3_CreateDnsZoneRequest as CreateDnsZoneRequest, type context$3_CreateDnsZoneResponse as CreateDnsZoneResponse, type context$3_CreateDnsZoneResponseNonNullableFields as CreateDnsZoneResponseNonNullableFields, type context$3_DeleteDnsZoneRequest as DeleteDnsZoneRequest, type context$3_DeleteDnsZoneResponse as DeleteDnsZoneResponse, type context$3_DnsRecord as DnsRecord, type context$3_DnsRecordsChangedEvent as DnsRecordsChangedEvent, type context$3_DnsZone as DnsZone, type context$3_DnsZoneNonNullableFields as DnsZoneNonNullableFields, type context$3_DnssecInfo as DnssecInfo, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type context$3_DomainRemovedEvent as DomainRemovedEvent, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type context$3_GetDnsZoneRequest as GetDnsZoneRequest, type context$3_GetDnsZoneResponse as GetDnsZoneResponse, type context$3_GetDnsZoneResponseNonNullableFields as GetDnsZoneResponseNonNullableFields, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type MessageEnvelope$1 as MessageEnvelope, type context$3_PreviewDnsZoneRequest as PreviewDnsZoneRequest, type context$3_PreviewDnsZoneResponse as PreviewDnsZoneResponse, type context$3_PreviewDnsZoneResponseNonNullableFields as PreviewDnsZoneResponseNonNullableFields, context$3_RecordType as RecordType, type RestoreInfo$1 as RestoreInfo, type context$3_UpdateDnsZoneOptions as UpdateDnsZoneOptions, type context$3_UpdateDnsZoneRequest as UpdateDnsZoneRequest, type context$3_UpdateDnsZoneResponse as UpdateDnsZoneResponse, type context$3_UpdateDnsZoneResponseNonNullableFields as UpdateDnsZoneResponseNonNullableFields, WebhookIdentityType$1 as WebhookIdentityType, context$3_createDnsZone as createDnsZone, context$3_deleteDnsZone as deleteDnsZone, context$3_getDnsZone as getDnsZone, context$3_previewDnsZone as previewDnsZone, context$3_updateDnsZone as updateDnsZone };
|
|
1200
1508
|
}
|
|
1201
1509
|
|
|
1202
|
-
type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
|
|
1203
|
-
interface HttpClient$2 {
|
|
1204
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
|
|
1205
|
-
fetchWithAuth: typeof fetch;
|
|
1206
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
1207
|
-
}
|
|
1208
|
-
type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
|
|
1209
|
-
type HttpResponse$2<T = any> = {
|
|
1210
|
-
data: T;
|
|
1211
|
-
status: number;
|
|
1212
|
-
statusText: string;
|
|
1213
|
-
headers: any;
|
|
1214
|
-
request?: any;
|
|
1215
|
-
};
|
|
1216
|
-
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
1217
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1218
|
-
url: string;
|
|
1219
|
-
data?: Data;
|
|
1220
|
-
params?: URLSearchParams;
|
|
1221
|
-
} & APIMetadata$2;
|
|
1222
|
-
type APIMetadata$2 = {
|
|
1223
|
-
methodFqn?: string;
|
|
1224
|
-
entityFqdn?: string;
|
|
1225
|
-
packageName?: string;
|
|
1226
|
-
};
|
|
1227
|
-
type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
|
|
1228
|
-
|
|
1229
|
-
declare global {
|
|
1230
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1231
|
-
interface SymbolConstructor {
|
|
1232
|
-
readonly observable: symbol;
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
1510
|
/**
|
|
1237
1511
|
* A registered domain is a domain that Wix has registered on behalf of a customer
|
|
1238
1512
|
* with an external registar.
|
|
@@ -1883,7 +2157,7 @@ interface ListRegisteredDomainsOptions {
|
|
|
1883
2157
|
paging?: CursorPaging$1;
|
|
1884
2158
|
}
|
|
1885
2159
|
|
|
1886
|
-
declare function createRegisteredDomain$1(httpClient: HttpClient
|
|
2160
|
+
declare function createRegisteredDomain$1(httpClient: HttpClient): CreateRegisteredDomainSignature;
|
|
1887
2161
|
interface CreateRegisteredDomainSignature {
|
|
1888
2162
|
/**
|
|
1889
2163
|
* Creates a registeredDomain object and starts the domain registration process that may take up to 48 hours to resolve.
|
|
@@ -1908,7 +2182,7 @@ interface CreateRegisteredDomainSignature {
|
|
|
1908
2182
|
*/
|
|
1909
2183
|
(registeredDomain: RegisteredDomain): Promise<RegisteredDomain & RegisteredDomainNonNullableFields>;
|
|
1910
2184
|
}
|
|
1911
|
-
declare function getRegisteredDomain$1(httpClient: HttpClient
|
|
2185
|
+
declare function getRegisteredDomain$1(httpClient: HttpClient): GetRegisteredDomainSignature;
|
|
1912
2186
|
interface GetRegisteredDomainSignature {
|
|
1913
2187
|
/**
|
|
1914
2188
|
* Retrieves a registered domain.
|
|
@@ -1922,7 +2196,7 @@ interface GetRegisteredDomainSignature {
|
|
|
1922
2196
|
*/
|
|
1923
2197
|
(registeredDomainId: string): Promise<RegisteredDomain & RegisteredDomainNonNullableFields>;
|
|
1924
2198
|
}
|
|
1925
|
-
declare function listRegisteredDomains$1(httpClient: HttpClient
|
|
2199
|
+
declare function listRegisteredDomains$1(httpClient: HttpClient): ListRegisteredDomainsSignature;
|
|
1926
2200
|
interface ListRegisteredDomainsSignature {
|
|
1927
2201
|
/**
|
|
1928
2202
|
* Retrieves a list of up to 100 registered domains.
|
|
@@ -1936,7 +2210,7 @@ interface ListRegisteredDomainsSignature {
|
|
|
1936
2210
|
*/
|
|
1937
2211
|
(options?: ListRegisteredDomainsOptions | undefined): Promise<ListRegisteredDomainsResponse & ListRegisteredDomainsResponseNonNullableFields>;
|
|
1938
2212
|
}
|
|
1939
|
-
declare function redeemRegisteredDomain$1(httpClient: HttpClient
|
|
2213
|
+
declare function redeemRegisteredDomain$1(httpClient: HttpClient): RedeemRegisteredDomainSignature;
|
|
1940
2214
|
interface RedeemRegisteredDomainSignature {
|
|
1941
2215
|
/**
|
|
1942
2216
|
* Redeems a registered domain that's currently in redemption.
|
|
@@ -1958,10 +2232,10 @@ interface RedeemRegisteredDomainSignature {
|
|
|
1958
2232
|
(registeredDomainId: string): Promise<RedeemRegisteredDomainResponse & RedeemRegisteredDomainResponseNonNullableFields>;
|
|
1959
2233
|
}
|
|
1960
2234
|
|
|
1961
|
-
declare const createRegisteredDomain: BuildRESTFunction
|
|
1962
|
-
declare const getRegisteredDomain: BuildRESTFunction
|
|
1963
|
-
declare const listRegisteredDomains: BuildRESTFunction
|
|
1964
|
-
declare const redeemRegisteredDomain: BuildRESTFunction
|
|
2235
|
+
declare const createRegisteredDomain: MaybeContext<BuildRESTFunction<typeof createRegisteredDomain$1> & typeof createRegisteredDomain$1>;
|
|
2236
|
+
declare const getRegisteredDomain: MaybeContext<BuildRESTFunction<typeof getRegisteredDomain$1> & typeof getRegisteredDomain$1>;
|
|
2237
|
+
declare const listRegisteredDomains: MaybeContext<BuildRESTFunction<typeof listRegisteredDomains$1> & typeof listRegisteredDomains$1>;
|
|
2238
|
+
declare const redeemRegisteredDomain: MaybeContext<BuildRESTFunction<typeof redeemRegisteredDomain$1> & typeof redeemRegisteredDomain$1>;
|
|
1965
2239
|
|
|
1966
2240
|
type context$2_ActionEvent = ActionEvent;
|
|
1967
2241
|
type context$2_AssignmentType = AssignmentType;
|
|
@@ -2023,40 +2297,6 @@ declare namespace context$2 {
|
|
|
2023
2297
|
export { type context$2_ActionEvent as ActionEvent, context$2_AssignmentType as AssignmentType, type context$2_ContactData as ContactData, type context$2_Contacts as Contacts, type context$2_CreateRegisteredDomainRequest as CreateRegisteredDomainRequest, type context$2_CreateRegisteredDomainResponse as CreateRegisteredDomainResponse, type context$2_CreateRegisteredDomainResponseNonNullableFields as CreateRegisteredDomainResponseNonNullableFields, type CursorPaging$1 as CursorPaging, type CursorPagingMetadata$1 as CursorPagingMetadata, type Cursors$1 as Cursors, type context$2_DeleteRegisteredDomainByIdRequest as DeleteRegisteredDomainByIdRequest, type context$2_DeleteRegisteredDomainByIdResponse as DeleteRegisteredDomainByIdResponse, context$2_DnsPropagationStatus as DnsPropagationStatus, type context$2_DomainEvent as DomainEvent, type context$2_DomainEventBodyOneOf as DomainEventBodyOneOf, type context$2_EntityCreatedEvent as EntityCreatedEvent, type context$2_EntityDeletedEvent as EntityDeletedEvent, type context$2_EntityUpdatedEvent as EntityUpdatedEvent, type context$2_Expired as Expired, type context$2_FailedRegistrationInfo as FailedRegistrationInfo, context$2_FailureCode as FailureCode, type context$2_GetRegisteredDomainRequest as GetRegisteredDomainRequest, type context$2_GetRegisteredDomainResponse as GetRegisteredDomainResponse, type context$2_GetRegisteredDomainResponseNonNullableFields as GetRegisteredDomainResponseNonNullableFields, context$2_ICANNConfirmationStatus as ICANNConfirmationStatus, type context$2_ICANNConfirmationStatusInfo as ICANNConfirmationStatusInfo, type context$2_ICANNConfirmationStatusInfoStatusOneOf as ICANNConfirmationStatusInfoStatusOneOf, type context$2_IdentificationData as IdentificationData, type context$2_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type context$2_LatestAttempt as LatestAttempt, type context$2_ListRegisteredDomainsOptions as ListRegisteredDomainsOptions, type context$2_ListRegisteredDomainsRequest as ListRegisteredDomainsRequest, type context$2_ListRegisteredDomainsResponse as ListRegisteredDomainsResponse, type context$2_ListRegisteredDomainsResponseNonNullableFields as ListRegisteredDomainsResponseNonNullableFields, type context$2_MessageEnvelope as MessageEnvelope, type context$2_Pending as Pending, type context$2_PendingRegistrationInfo as PendingRegistrationInfo, type context$2_RedeemRegisteredDomainRequest as RedeemRegisteredDomainRequest, type context$2_RedeemRegisteredDomainResponse as RedeemRegisteredDomainResponse, type context$2_RedeemRegisteredDomainResponseNonNullableFields as RedeemRegisteredDomainResponseNonNullableFields, type context$2_RedirectAssignmentInfo as RedirectAssignmentInfo, type context$2_RegisteredDomain as RegisteredDomain, type context$2_RegisteredDomainNonNullableFields as RegisteredDomainNonNullableFields, type context$2_RegisteredDomainStatusInfoOneOf as RegisteredDomainStatusInfoOneOf, type context$2_RestoreInfo as RestoreInfo, type context$2_SiteInfo as SiteInfo, type context$2_SiteInfoAssignmentInfoOneOf as SiteInfoAssignmentInfoOneOf, context$2_Status as Status, context$2_WebhookIdentityType as WebhookIdentityType, context$2_createRegisteredDomain as createRegisteredDomain, context$2_getRegisteredDomain as getRegisteredDomain, context$2_listRegisteredDomains as listRegisteredDomains, context$2_redeemRegisteredDomain as redeemRegisteredDomain };
|
|
2024
2298
|
}
|
|
2025
2299
|
|
|
2026
|
-
type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
|
|
2027
|
-
interface HttpClient$1 {
|
|
2028
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
2029
|
-
fetchWithAuth: typeof fetch;
|
|
2030
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
2031
|
-
}
|
|
2032
|
-
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
2033
|
-
type HttpResponse$1<T = any> = {
|
|
2034
|
-
data: T;
|
|
2035
|
-
status: number;
|
|
2036
|
-
statusText: string;
|
|
2037
|
-
headers: any;
|
|
2038
|
-
request?: any;
|
|
2039
|
-
};
|
|
2040
|
-
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
2041
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2042
|
-
url: string;
|
|
2043
|
-
data?: Data;
|
|
2044
|
-
params?: URLSearchParams;
|
|
2045
|
-
} & APIMetadata$1;
|
|
2046
|
-
type APIMetadata$1 = {
|
|
2047
|
-
methodFqn?: string;
|
|
2048
|
-
entityFqdn?: string;
|
|
2049
|
-
packageName?: string;
|
|
2050
|
-
};
|
|
2051
|
-
type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
|
|
2052
|
-
|
|
2053
|
-
declare global {
|
|
2054
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2055
|
-
interface SymbolConstructor {
|
|
2056
|
-
readonly observable: symbol;
|
|
2057
|
-
}
|
|
2058
|
-
}
|
|
2059
|
-
|
|
2060
2300
|
interface DomainAvailability {
|
|
2061
2301
|
/** Domain name including TLD. For example, `my-new-domain.com`. */
|
|
2062
2302
|
domain?: string;
|
|
@@ -2092,7 +2332,7 @@ interface CheckDomainAvailabilityResponseNonNullableFields {
|
|
|
2092
2332
|
availability?: DomainAvailabilityNonNullableFields;
|
|
2093
2333
|
}
|
|
2094
2334
|
|
|
2095
|
-
declare function checkDomainAvailability$1(httpClient: HttpClient
|
|
2335
|
+
declare function checkDomainAvailability$1(httpClient: HttpClient): CheckDomainAvailabilitySignature;
|
|
2096
2336
|
interface CheckDomainAvailabilitySignature {
|
|
2097
2337
|
/**
|
|
2098
2338
|
* Checks whether the given domain is available for purchase.
|
|
@@ -2114,7 +2354,7 @@ interface CheckDomainAvailabilitySignature {
|
|
|
2114
2354
|
(domain: string): Promise<CheckDomainAvailabilityResponse & CheckDomainAvailabilityResponseNonNullableFields>;
|
|
2115
2355
|
}
|
|
2116
2356
|
|
|
2117
|
-
declare const checkDomainAvailability: BuildRESTFunction
|
|
2357
|
+
declare const checkDomainAvailability: MaybeContext<BuildRESTFunction<typeof checkDomainAvailability$1> & typeof checkDomainAvailability$1>;
|
|
2118
2358
|
|
|
2119
2359
|
type context$1_CheckDomainAvailabilityRequest = CheckDomainAvailabilityRequest;
|
|
2120
2360
|
type context$1_CheckDomainAvailabilityResponse = CheckDomainAvailabilityResponse;
|
|
@@ -2125,40 +2365,6 @@ declare namespace context$1 {
|
|
|
2125
2365
|
export { type context$1_CheckDomainAvailabilityRequest as CheckDomainAvailabilityRequest, type context$1_CheckDomainAvailabilityResponse as CheckDomainAvailabilityResponse, type context$1_CheckDomainAvailabilityResponseNonNullableFields as CheckDomainAvailabilityResponseNonNullableFields, type context$1_DomainAvailability as DomainAvailability, context$1_checkDomainAvailability as checkDomainAvailability };
|
|
2126
2366
|
}
|
|
2127
2367
|
|
|
2128
|
-
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
2129
|
-
interface HttpClient {
|
|
2130
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
2131
|
-
fetchWithAuth: typeof fetch;
|
|
2132
|
-
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
2133
|
-
}
|
|
2134
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
2135
|
-
type HttpResponse<T = any> = {
|
|
2136
|
-
data: T;
|
|
2137
|
-
status: number;
|
|
2138
|
-
statusText: string;
|
|
2139
|
-
headers: any;
|
|
2140
|
-
request?: any;
|
|
2141
|
-
};
|
|
2142
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
2143
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2144
|
-
url: string;
|
|
2145
|
-
data?: Data;
|
|
2146
|
-
params?: URLSearchParams;
|
|
2147
|
-
} & APIMetadata;
|
|
2148
|
-
type APIMetadata = {
|
|
2149
|
-
methodFqn?: string;
|
|
2150
|
-
entityFqdn?: string;
|
|
2151
|
-
packageName?: string;
|
|
2152
|
-
};
|
|
2153
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
2154
|
-
|
|
2155
|
-
declare global {
|
|
2156
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2157
|
-
interface SymbolConstructor {
|
|
2158
|
-
readonly observable: symbol;
|
|
2159
|
-
}
|
|
2160
|
-
}
|
|
2161
|
-
|
|
2162
2368
|
interface DomainSuggestion {
|
|
2163
2369
|
/** Suggested domain name including TLD. */
|
|
2164
2370
|
domain?: string;
|
|
@@ -2319,7 +2525,7 @@ interface SuggestDomainsSignature {
|
|
|
2319
2525
|
(query: string, options?: SuggestDomainsOptions | undefined): Promise<SuggestDomainsResponse & SuggestDomainsResponseNonNullableFields>;
|
|
2320
2526
|
}
|
|
2321
2527
|
|
|
2322
|
-
declare const suggestDomains: BuildRESTFunction<typeof suggestDomains$1> & typeof suggestDomains$1
|
|
2528
|
+
declare const suggestDomains: MaybeContext<BuildRESTFunction<typeof suggestDomains$1> & typeof suggestDomains$1>;
|
|
2323
2529
|
|
|
2324
2530
|
type context_CursorPaging = CursorPaging;
|
|
2325
2531
|
type context_CursorPagingMetadata = CursorPagingMetadata;
|