@wix/categories 1.0.52 → 1.0.54
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/categories",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.54",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"type-bundles"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@wix/categories_categories": "1.0.
|
|
21
|
+
"@wix/categories_categories": "1.0.31"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"glob": "^10.4.1",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"fqdn": ""
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
|
-
"falconPackageHash": "
|
|
46
|
+
"falconPackageHash": "363562833af63bd18bfe4440471cb82735d5d98be0bcfa3496a6886e"
|
|
47
47
|
}
|
|
@@ -12,6 +12,10 @@ type Host<Environment = unknown> = {
|
|
|
12
12
|
}>;
|
|
13
13
|
};
|
|
14
14
|
environment?: Environment;
|
|
15
|
+
/**
|
|
16
|
+
* Optional name of the environment, use for logging
|
|
17
|
+
*/
|
|
18
|
+
name?: string;
|
|
15
19
|
/**
|
|
16
20
|
* Optional bast url to use for API requests, for example `www.wixapis.com`
|
|
17
21
|
*/
|
|
@@ -63,16 +67,16 @@ type APIMetadata = {
|
|
|
63
67
|
packageName?: string;
|
|
64
68
|
};
|
|
65
69
|
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
66
|
-
type EventDefinition
|
|
70
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
67
71
|
__type: 'event-definition';
|
|
68
72
|
type: Type;
|
|
69
73
|
isDomainEvent?: boolean;
|
|
70
74
|
transformations?: (envelope: unknown) => Payload;
|
|
71
75
|
__payload: Payload;
|
|
72
76
|
};
|
|
73
|
-
declare function EventDefinition
|
|
74
|
-
type EventHandler
|
|
75
|
-
type BuildEventDefinition
|
|
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;
|
|
76
80
|
|
|
77
81
|
type ServicePluginMethodInput = {
|
|
78
82
|
request: any;
|
|
@@ -271,6 +275,72 @@ type Except<ObjectType, KeysType extends keyof ObjectType, Options extends Excep
|
|
|
271
275
|
? Partial<Record<KeysType, never>>
|
|
272
276
|
: {});
|
|
273
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
|
+
|
|
274
344
|
/**
|
|
275
345
|
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
276
346
|
|
|
@@ -303,21 +373,19 @@ type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
|
303
373
|
|
|
304
374
|
@category Object
|
|
305
375
|
*/
|
|
306
|
-
type ConditionalKeys<Base, Condition> =
|
|
307
|
-
// Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
|
|
376
|
+
type ConditionalKeys<Base, Condition> =
|
|
308
377
|
{
|
|
309
378
|
// Map through all the keys of the given base type.
|
|
310
|
-
[Key in keyof Base]
|
|
379
|
+
[Key in keyof Base]-?:
|
|
311
380
|
// Pick only keys with types extending the given `Condition` type.
|
|
312
381
|
Base[Key] extends Condition
|
|
313
|
-
// Retain this key
|
|
314
|
-
|
|
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>
|
|
315
385
|
// Discard this key since the condition fails.
|
|
316
386
|
: never;
|
|
317
|
-
|
|
318
387
|
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
319
|
-
}[keyof Base]
|
|
320
|
-
>;
|
|
388
|
+
}[keyof Base];
|
|
321
389
|
|
|
322
390
|
/**
|
|
323
391
|
Exclude keys from a shape that matches the given `Condition`.
|
|
@@ -367,7 +435,7 @@ ConditionalKeys<Base, Condition>
|
|
|
367
435
|
* can either be a REST module or a host module.
|
|
368
436
|
* This type is recursive, so it can describe nested modules.
|
|
369
437
|
*/
|
|
370
|
-
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition
|
|
438
|
+
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition<any> | ServicePluginDefinition<any> | {
|
|
371
439
|
[key: string]: Descriptors | PublicMetadata | any;
|
|
372
440
|
};
|
|
373
441
|
/**
|
|
@@ -380,7 +448,7 @@ type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, De
|
|
|
380
448
|
done: T;
|
|
381
449
|
recurse: T extends {
|
|
382
450
|
__type: typeof SERVICE_PLUGIN_ERROR_TYPE;
|
|
383
|
-
} ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition
|
|
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<{
|
|
384
452
|
[Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
|
|
385
453
|
-1,
|
|
386
454
|
0,
|
|
@@ -537,7 +605,7 @@ interface Keyword {
|
|
|
537
605
|
term?: string;
|
|
538
606
|
/** Whether the keyword is the main focus keyword. */
|
|
539
607
|
isMain?: boolean;
|
|
540
|
-
/**
|
|
608
|
+
/** The source that added the keyword terms to the SEO settings. */
|
|
541
609
|
origin?: string | null;
|
|
542
610
|
}
|
|
543
611
|
interface Tag {
|
|
@@ -1842,6 +1910,7 @@ interface InvalidateCache extends InvalidateCacheGetByOneOf {
|
|
|
1842
1910
|
reason?: string | null;
|
|
1843
1911
|
/** Is local DS */
|
|
1844
1912
|
localDc?: boolean;
|
|
1913
|
+
hardPurge?: boolean;
|
|
1845
1914
|
}
|
|
1846
1915
|
/** @oneof */
|
|
1847
1916
|
interface InvalidateCacheGetByOneOf {
|
|
@@ -1957,10 +2026,9 @@ interface CreateCategoryRequest {
|
|
|
1957
2026
|
}
|
|
1958
2027
|
declare enum SingleEntityOpsRequestedFields {
|
|
1959
2028
|
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
1960
|
-
|
|
2029
|
+
BREADCRUMBS_INFO = "BREADCRUMBS_INFO",
|
|
1961
2030
|
DESCRIPTION = "DESCRIPTION",
|
|
1962
|
-
RICH_CONTENT_DESCRIPTION = "RICH_CONTENT_DESCRIPTION"
|
|
1963
|
-
BREADCRUMBS_INFO = "BREADCRUMBS_INFO"
|
|
2031
|
+
RICH_CONTENT_DESCRIPTION = "RICH_CONTENT_DESCRIPTION"
|
|
1964
2032
|
}
|
|
1965
2033
|
interface CreateCategoryResponse {
|
|
1966
2034
|
/** Created category. */
|
|
@@ -2058,7 +2126,6 @@ interface CursorPaging {
|
|
|
2058
2126
|
}
|
|
2059
2127
|
declare enum RequestedFields {
|
|
2060
2128
|
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
2061
|
-
BREADCRUMBS = "BREADCRUMBS",
|
|
2062
2129
|
BREADCRUMBS_INFO = "BREADCRUMBS_INFO"
|
|
2063
2130
|
}
|
|
2064
2131
|
interface QueryCategoriesResponse {
|
|
@@ -4170,31 +4237,13 @@ interface GetArrangedItemsSignature {
|
|
|
4170
4237
|
*/
|
|
4171
4238
|
(categoryId: string, treeReference: TreeReference): Promise<GetArrangedItemsResponse & GetArrangedItemsResponseNonNullableFields>;
|
|
4172
4239
|
}
|
|
4173
|
-
declare const onCategoryCreated$1: EventDefinition
|
|
4174
|
-
declare const onCategoryUpdated$1: EventDefinition
|
|
4175
|
-
declare const onCategoryDeleted$1: EventDefinition
|
|
4176
|
-
declare const onCategoryMoved$1: EventDefinition
|
|
4177
|
-
declare const onCategoryItemAddedToCategory$1: EventDefinition
|
|
4178
|
-
declare const onCategoryItemRemovedFromCategory$1: EventDefinition
|
|
4179
|
-
declare const onCategoryItemsArrangedInCategory$1: EventDefinition
|
|
4180
|
-
|
|
4181
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
4182
|
-
__type: 'event-definition';
|
|
4183
|
-
type: Type;
|
|
4184
|
-
isDomainEvent?: boolean;
|
|
4185
|
-
transformations?: (envelope: unknown) => Payload;
|
|
4186
|
-
__payload: Payload;
|
|
4187
|
-
};
|
|
4188
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
4189
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
4190
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
4191
|
-
|
|
4192
|
-
declare global {
|
|
4193
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4194
|
-
interface SymbolConstructor {
|
|
4195
|
-
readonly observable: symbol;
|
|
4196
|
-
}
|
|
4197
|
-
}
|
|
4240
|
+
declare const onCategoryCreated$1: EventDefinition<CategoryCreatedEnvelope, "wix.categories.v1.category_created">;
|
|
4241
|
+
declare const onCategoryUpdated$1: EventDefinition<CategoryUpdatedEnvelope, "wix.categories.v1.category_updated">;
|
|
4242
|
+
declare const onCategoryDeleted$1: EventDefinition<CategoryDeletedEnvelope, "wix.categories.v1.category_deleted">;
|
|
4243
|
+
declare const onCategoryMoved$1: EventDefinition<CategoryMovedEnvelope, "wix.categories.v1.category_category_moved">;
|
|
4244
|
+
declare const onCategoryItemAddedToCategory$1: EventDefinition<CategoryItemAddedToCategoryEnvelope, "wix.categories.v1.category_item_added_to_category">;
|
|
4245
|
+
declare const onCategoryItemRemovedFromCategory$1: EventDefinition<CategoryItemRemovedFromCategoryEnvelope, "wix.categories.v1.category_item_removed_from_category">;
|
|
4246
|
+
declare const onCategoryItemsArrangedInCategory$1: EventDefinition<CategoryItemsArrangedInCategoryEnvelope, "wix.categories.v1.category_items_arranged_in_category">;
|
|
4198
4247
|
|
|
4199
4248
|
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
4200
4249
|
|
|
@@ -12,6 +12,10 @@ type Host<Environment = unknown> = {
|
|
|
12
12
|
}>;
|
|
13
13
|
};
|
|
14
14
|
environment?: Environment;
|
|
15
|
+
/**
|
|
16
|
+
* Optional name of the environment, use for logging
|
|
17
|
+
*/
|
|
18
|
+
name?: string;
|
|
15
19
|
/**
|
|
16
20
|
* Optional bast url to use for API requests, for example `www.wixapis.com`
|
|
17
21
|
*/
|
|
@@ -63,16 +67,16 @@ type APIMetadata = {
|
|
|
63
67
|
packageName?: string;
|
|
64
68
|
};
|
|
65
69
|
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
66
|
-
type EventDefinition
|
|
70
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
67
71
|
__type: 'event-definition';
|
|
68
72
|
type: Type;
|
|
69
73
|
isDomainEvent?: boolean;
|
|
70
74
|
transformations?: (envelope: unknown) => Payload;
|
|
71
75
|
__payload: Payload;
|
|
72
76
|
};
|
|
73
|
-
declare function EventDefinition
|
|
74
|
-
type EventHandler
|
|
75
|
-
type BuildEventDefinition
|
|
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;
|
|
76
80
|
|
|
77
81
|
type ServicePluginMethodInput = {
|
|
78
82
|
request: any;
|
|
@@ -271,6 +275,72 @@ type Except<ObjectType, KeysType extends keyof ObjectType, Options extends Excep
|
|
|
271
275
|
? Partial<Record<KeysType, never>>
|
|
272
276
|
: {});
|
|
273
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
|
+
|
|
274
344
|
/**
|
|
275
345
|
Extract the keys from a type where the value type of the key extends the given `Condition`.
|
|
276
346
|
|
|
@@ -303,21 +373,19 @@ type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
|
|
|
303
373
|
|
|
304
374
|
@category Object
|
|
305
375
|
*/
|
|
306
|
-
type ConditionalKeys<Base, Condition> =
|
|
307
|
-
// Wrap in `NonNullable` to strip away the `undefined` type from the produced union.
|
|
376
|
+
type ConditionalKeys<Base, Condition> =
|
|
308
377
|
{
|
|
309
378
|
// Map through all the keys of the given base type.
|
|
310
|
-
[Key in keyof Base]
|
|
379
|
+
[Key in keyof Base]-?:
|
|
311
380
|
// Pick only keys with types extending the given `Condition` type.
|
|
312
381
|
Base[Key] extends Condition
|
|
313
|
-
// Retain this key
|
|
314
|
-
|
|
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>
|
|
315
385
|
// Discard this key since the condition fails.
|
|
316
386
|
: never;
|
|
317
|
-
|
|
318
387
|
// Convert the produced object into a union type of the keys which passed the conditional test.
|
|
319
|
-
}[keyof Base]
|
|
320
|
-
>;
|
|
388
|
+
}[keyof Base];
|
|
321
389
|
|
|
322
390
|
/**
|
|
323
391
|
Exclude keys from a shape that matches the given `Condition`.
|
|
@@ -367,7 +435,7 @@ ConditionalKeys<Base, Condition>
|
|
|
367
435
|
* can either be a REST module or a host module.
|
|
368
436
|
* This type is recursive, so it can describe nested modules.
|
|
369
437
|
*/
|
|
370
|
-
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition
|
|
438
|
+
type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition<any> | ServicePluginDefinition<any> | {
|
|
371
439
|
[key: string]: Descriptors | PublicMetadata | any;
|
|
372
440
|
};
|
|
373
441
|
/**
|
|
@@ -380,7 +448,7 @@ type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, De
|
|
|
380
448
|
done: T;
|
|
381
449
|
recurse: T extends {
|
|
382
450
|
__type: typeof SERVICE_PLUGIN_ERROR_TYPE;
|
|
383
|
-
} ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition
|
|
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<{
|
|
384
452
|
[Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
|
|
385
453
|
-1,
|
|
386
454
|
0,
|
|
@@ -537,7 +605,7 @@ interface Keyword {
|
|
|
537
605
|
term?: string;
|
|
538
606
|
/** Whether the keyword is the main focus keyword. */
|
|
539
607
|
isMain?: boolean;
|
|
540
|
-
/**
|
|
608
|
+
/** The source that added the keyword terms to the SEO settings. */
|
|
541
609
|
origin?: string | null;
|
|
542
610
|
}
|
|
543
611
|
interface Tag {
|
|
@@ -1842,6 +1910,7 @@ interface InvalidateCache extends InvalidateCacheGetByOneOf {
|
|
|
1842
1910
|
reason?: string | null;
|
|
1843
1911
|
/** Is local DS */
|
|
1844
1912
|
localDc?: boolean;
|
|
1913
|
+
hardPurge?: boolean;
|
|
1845
1914
|
}
|
|
1846
1915
|
/** @oneof */
|
|
1847
1916
|
interface InvalidateCacheGetByOneOf {
|
|
@@ -1957,10 +2026,9 @@ interface CreateCategoryRequest {
|
|
|
1957
2026
|
}
|
|
1958
2027
|
declare enum SingleEntityOpsRequestedFields {
|
|
1959
2028
|
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
1960
|
-
|
|
2029
|
+
BREADCRUMBS_INFO = "BREADCRUMBS_INFO",
|
|
1961
2030
|
DESCRIPTION = "DESCRIPTION",
|
|
1962
|
-
RICH_CONTENT_DESCRIPTION = "RICH_CONTENT_DESCRIPTION"
|
|
1963
|
-
BREADCRUMBS_INFO = "BREADCRUMBS_INFO"
|
|
2031
|
+
RICH_CONTENT_DESCRIPTION = "RICH_CONTENT_DESCRIPTION"
|
|
1964
2032
|
}
|
|
1965
2033
|
interface CreateCategoryResponse {
|
|
1966
2034
|
/** Created category. */
|
|
@@ -2058,7 +2126,6 @@ interface CursorPaging {
|
|
|
2058
2126
|
}
|
|
2059
2127
|
declare enum RequestedFields {
|
|
2060
2128
|
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
2061
|
-
BREADCRUMBS = "BREADCRUMBS",
|
|
2062
2129
|
BREADCRUMBS_INFO = "BREADCRUMBS_INFO"
|
|
2063
2130
|
}
|
|
2064
2131
|
interface QueryCategoriesResponse {
|
|
@@ -4170,31 +4237,13 @@ interface GetArrangedItemsSignature {
|
|
|
4170
4237
|
*/
|
|
4171
4238
|
(categoryId: string, treeReference: TreeReference): Promise<GetArrangedItemsResponse & GetArrangedItemsResponseNonNullableFields>;
|
|
4172
4239
|
}
|
|
4173
|
-
declare const onCategoryCreated$1: EventDefinition
|
|
4174
|
-
declare const onCategoryUpdated$1: EventDefinition
|
|
4175
|
-
declare const onCategoryDeleted$1: EventDefinition
|
|
4176
|
-
declare const onCategoryMoved$1: EventDefinition
|
|
4177
|
-
declare const onCategoryItemAddedToCategory$1: EventDefinition
|
|
4178
|
-
declare const onCategoryItemRemovedFromCategory$1: EventDefinition
|
|
4179
|
-
declare const onCategoryItemsArrangedInCategory$1: EventDefinition
|
|
4180
|
-
|
|
4181
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
4182
|
-
__type: 'event-definition';
|
|
4183
|
-
type: Type;
|
|
4184
|
-
isDomainEvent?: boolean;
|
|
4185
|
-
transformations?: (envelope: unknown) => Payload;
|
|
4186
|
-
__payload: Payload;
|
|
4187
|
-
};
|
|
4188
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
4189
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
4190
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
4191
|
-
|
|
4192
|
-
declare global {
|
|
4193
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4194
|
-
interface SymbolConstructor {
|
|
4195
|
-
readonly observable: symbol;
|
|
4196
|
-
}
|
|
4197
|
-
}
|
|
4240
|
+
declare const onCategoryCreated$1: EventDefinition<CategoryCreatedEnvelope, "wix.categories.v1.category_created">;
|
|
4241
|
+
declare const onCategoryUpdated$1: EventDefinition<CategoryUpdatedEnvelope, "wix.categories.v1.category_updated">;
|
|
4242
|
+
declare const onCategoryDeleted$1: EventDefinition<CategoryDeletedEnvelope, "wix.categories.v1.category_deleted">;
|
|
4243
|
+
declare const onCategoryMoved$1: EventDefinition<CategoryMovedEnvelope, "wix.categories.v1.category_category_moved">;
|
|
4244
|
+
declare const onCategoryItemAddedToCategory$1: EventDefinition<CategoryItemAddedToCategoryEnvelope, "wix.categories.v1.category_item_added_to_category">;
|
|
4245
|
+
declare const onCategoryItemRemovedFromCategory$1: EventDefinition<CategoryItemRemovedFromCategoryEnvelope, "wix.categories.v1.category_item_removed_from_category">;
|
|
4246
|
+
declare const onCategoryItemsArrangedInCategory$1: EventDefinition<CategoryItemsArrangedInCategoryEnvelope, "wix.categories.v1.category_items_arranged_in_category">;
|
|
4198
4247
|
|
|
4199
4248
|
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
4200
4249
|
|
|
@@ -1396,10 +1396,9 @@ interface CreateCategoryRequest$1 {
|
|
|
1396
1396
|
}
|
|
1397
1397
|
declare enum SingleEntityOpsRequestedFields$1 {
|
|
1398
1398
|
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
1399
|
-
|
|
1399
|
+
BREADCRUMBS_INFO = "BREADCRUMBS_INFO",
|
|
1400
1400
|
DESCRIPTION = "DESCRIPTION",
|
|
1401
|
-
RICH_CONTENT_DESCRIPTION = "RICH_CONTENT_DESCRIPTION"
|
|
1402
|
-
BREADCRUMBS_INFO = "BREADCRUMBS_INFO"
|
|
1401
|
+
RICH_CONTENT_DESCRIPTION = "RICH_CONTENT_DESCRIPTION"
|
|
1403
1402
|
}
|
|
1404
1403
|
interface CreateCategoryResponse$1 {
|
|
1405
1404
|
/** Created category. */
|
|
@@ -1497,7 +1496,6 @@ interface CursorPaging$1 {
|
|
|
1497
1496
|
}
|
|
1498
1497
|
declare enum RequestedFields$1 {
|
|
1499
1498
|
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
1500
|
-
BREADCRUMBS = "BREADCRUMBS",
|
|
1501
1499
|
BREADCRUMBS_INFO = "BREADCRUMBS_INFO"
|
|
1502
1500
|
}
|
|
1503
1501
|
interface QueryCategoriesResponse$1 {
|
|
@@ -4060,10 +4058,9 @@ interface CreateCategoryRequest {
|
|
|
4060
4058
|
}
|
|
4061
4059
|
declare enum SingleEntityOpsRequestedFields {
|
|
4062
4060
|
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
4063
|
-
|
|
4061
|
+
BREADCRUMBS_INFO = "BREADCRUMBS_INFO",
|
|
4064
4062
|
DESCRIPTION = "DESCRIPTION",
|
|
4065
|
-
RICH_CONTENT_DESCRIPTION = "RICH_CONTENT_DESCRIPTION"
|
|
4066
|
-
BREADCRUMBS_INFO = "BREADCRUMBS_INFO"
|
|
4063
|
+
RICH_CONTENT_DESCRIPTION = "RICH_CONTENT_DESCRIPTION"
|
|
4067
4064
|
}
|
|
4068
4065
|
interface CreateCategoryResponse {
|
|
4069
4066
|
/** Created category. */
|
|
@@ -4161,7 +4158,6 @@ interface CursorPaging {
|
|
|
4161
4158
|
}
|
|
4162
4159
|
declare enum RequestedFields {
|
|
4163
4160
|
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
4164
|
-
BREADCRUMBS = "BREADCRUMBS",
|
|
4165
4161
|
BREADCRUMBS_INFO = "BREADCRUMBS_INFO"
|
|
4166
4162
|
}
|
|
4167
4163
|
interface QueryCategoriesResponse {
|