@wix/blog 1.0.305 → 1.0.307
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 +8 -8
- package/type-bundles/context.bundle.d.ts +106 -136
- package/type-bundles/index.bundle.d.ts +106 -136
- package/type-bundles/meta.bundle.d.ts +12 -64
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/blog",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.307",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"type-bundles"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@wix/blog_blog-cache": "1.0.
|
|
22
|
-
"@wix/blog_blog-importer": "1.0.
|
|
23
|
-
"@wix/blog_categories": "1.0.
|
|
24
|
-
"@wix/blog_draft-posts": "1.0.
|
|
25
|
-
"@wix/blog_posts": "1.0.
|
|
26
|
-
"@wix/blog_tags": "1.0.
|
|
21
|
+
"@wix/blog_blog-cache": "1.0.6",
|
|
22
|
+
"@wix/blog_blog-importer": "1.0.17",
|
|
23
|
+
"@wix/blog_categories": "1.0.44",
|
|
24
|
+
"@wix/blog_draft-posts": "1.0.44",
|
|
25
|
+
"@wix/blog_posts": "1.0.50",
|
|
26
|
+
"@wix/blog_tags": "1.0.42"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"glob": "^10.4.1",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"fqdn": ""
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
|
-
"falconPackageHash": "
|
|
51
|
+
"falconPackageHash": "e61700ba7fc994882ee2caeb6f386c95f3a373c0ba2fd11fb028fb26"
|
|
52
52
|
}
|
|
@@ -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,
|
|
@@ -1422,7 +1490,7 @@ interface Keyword$3 {
|
|
|
1422
1490
|
term?: string;
|
|
1423
1491
|
/** Whether the keyword is the main focus keyword. */
|
|
1424
1492
|
isMain?: boolean;
|
|
1425
|
-
/**
|
|
1493
|
+
/** The source that added the keyword terms to the SEO settings. */
|
|
1426
1494
|
origin?: string | null;
|
|
1427
1495
|
}
|
|
1428
1496
|
interface Tag$3 {
|
|
@@ -1492,9 +1560,7 @@ declare enum Field$3 {
|
|
|
1492
1560
|
*/
|
|
1493
1561
|
INTERNAL_ID = "INTERNAL_ID",
|
|
1494
1562
|
/** Includes SEO data. */
|
|
1495
|
-
SEO = "SEO"
|
|
1496
|
-
/** Includes translations. */
|
|
1497
|
-
TRANSLATIONS = "TRANSLATIONS"
|
|
1563
|
+
SEO = "SEO"
|
|
1498
1564
|
}
|
|
1499
1565
|
interface CreateCategoryResponse {
|
|
1500
1566
|
/** Category info. */
|
|
@@ -2154,29 +2220,11 @@ interface QueryCategoriesSignature {
|
|
|
2154
2220
|
*/
|
|
2155
2221
|
(options?: QueryCategoriesOptions | undefined): CategoriesQueryBuilder;
|
|
2156
2222
|
}
|
|
2157
|
-
declare const onCategoryCreated$1: EventDefinition
|
|
2158
|
-
declare const onCategoryUpdated$1: EventDefinition
|
|
2159
|
-
declare const onCategoryDeleted$1: EventDefinition
|
|
2160
|
-
|
|
2161
|
-
type EventDefinition$3<Payload = unknown, Type extends string = string> = {
|
|
2162
|
-
__type: 'event-definition';
|
|
2163
|
-
type: Type;
|
|
2164
|
-
isDomainEvent?: boolean;
|
|
2165
|
-
transformations?: (envelope: unknown) => Payload;
|
|
2166
|
-
__payload: Payload;
|
|
2167
|
-
};
|
|
2168
|
-
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
2169
|
-
type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
|
|
2170
|
-
type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
|
|
2171
|
-
|
|
2172
|
-
declare global {
|
|
2173
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2174
|
-
interface SymbolConstructor {
|
|
2175
|
-
readonly observable: symbol;
|
|
2176
|
-
}
|
|
2177
|
-
}
|
|
2223
|
+
declare const onCategoryCreated$1: EventDefinition<CategoryCreatedEnvelope, "wix.blog.v3.category_created">;
|
|
2224
|
+
declare const onCategoryUpdated$1: EventDefinition<CategoryUpdatedEnvelope, "wix.blog.v3.category_updated">;
|
|
2225
|
+
declare const onCategoryDeleted$1: EventDefinition<CategoryDeletedEnvelope, "wix.blog.v3.category_deleted">;
|
|
2178
2226
|
|
|
2179
|
-
declare function createEventModule$3<T extends EventDefinition
|
|
2227
|
+
declare function createEventModule$3<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
2180
2228
|
|
|
2181
2229
|
declare const getCategory: MaybeContext<BuildRESTFunction<typeof getCategory$1> & typeof getCategory$1>;
|
|
2182
2230
|
declare const getCategoryBySlug: MaybeContext<BuildRESTFunction<typeof getCategoryBySlug$1> & typeof getCategoryBySlug$1>;
|
|
@@ -3769,7 +3817,7 @@ interface Keyword$2 {
|
|
|
3769
3817
|
term?: string;
|
|
3770
3818
|
/** Whether the keyword is the main focus keyword. */
|
|
3771
3819
|
isMain?: boolean;
|
|
3772
|
-
/**
|
|
3820
|
+
/** The source that added the keyword terms to the SEO settings. */
|
|
3773
3821
|
origin?: string | null;
|
|
3774
3822
|
}
|
|
3775
3823
|
interface Tag$2 {
|
|
@@ -3920,8 +3968,6 @@ declare enum Field$2 {
|
|
|
3920
3968
|
CONTENT = "CONTENT",
|
|
3921
3969
|
/** Includes rich content field. */
|
|
3922
3970
|
RICH_CONTENT = "RICH_CONTENT",
|
|
3923
|
-
/** Includes draft post translations when present. */
|
|
3924
|
-
TRANSLATIONS = "TRANSLATIONS",
|
|
3925
3971
|
/** If the user has not set excerpt, returns the one autogenerated from content. */
|
|
3926
3972
|
GENERATED_EXCERPT = "GENERATED_EXCERPT"
|
|
3927
3973
|
}
|
|
@@ -5713,29 +5759,11 @@ interface PublishDraftPostSignature {
|
|
|
5713
5759
|
*/
|
|
5714
5760
|
(draftPostId: string): Promise<PublishDraftPostResponse & PublishDraftPostResponseNonNullableFields>;
|
|
5715
5761
|
}
|
|
5716
|
-
declare const onDraftCreated$1: EventDefinition
|
|
5717
|
-
declare const onDraftUpdated$1: EventDefinition
|
|
5718
|
-
declare const onDraftDeleted$1: EventDefinition
|
|
5762
|
+
declare const onDraftCreated$1: EventDefinition<DraftCreatedEnvelope, "wix.blog.v3.draft_created">;
|
|
5763
|
+
declare const onDraftUpdated$1: EventDefinition<DraftUpdatedEnvelope, "wix.blog.v3.draft_updated">;
|
|
5764
|
+
declare const onDraftDeleted$1: EventDefinition<DraftDeletedEnvelope, "wix.blog.v3.draft_deleted">;
|
|
5719
5765
|
|
|
5720
|
-
|
|
5721
|
-
__type: 'event-definition';
|
|
5722
|
-
type: Type;
|
|
5723
|
-
isDomainEvent?: boolean;
|
|
5724
|
-
transformations?: (envelope: unknown) => Payload;
|
|
5725
|
-
__payload: Payload;
|
|
5726
|
-
};
|
|
5727
|
-
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
5728
|
-
type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
|
|
5729
|
-
type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
|
|
5730
|
-
|
|
5731
|
-
declare global {
|
|
5732
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
5733
|
-
interface SymbolConstructor {
|
|
5734
|
-
readonly observable: symbol;
|
|
5735
|
-
}
|
|
5736
|
-
}
|
|
5737
|
-
|
|
5738
|
-
declare function createEventModule$2<T extends EventDefinition$2<any, string>>(eventDefinition: T): BuildEventDefinition$2<T> & T;
|
|
5766
|
+
declare function createEventModule$2<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
5739
5767
|
|
|
5740
5768
|
declare const createDraftPost: MaybeContext<BuildRESTFunction<typeof createDraftPost$1> & typeof createDraftPost$1>;
|
|
5741
5769
|
declare const bulkCreateDraftPosts: MaybeContext<BuildRESTFunction<typeof bulkCreateDraftPosts$1> & typeof bulkCreateDraftPosts$1>;
|
|
@@ -7685,9 +7713,7 @@ declare enum GetPostsSort {
|
|
|
7685
7713
|
/** Sorting by title ascending */
|
|
7686
7714
|
TITLE_ASC = "TITLE_ASC",
|
|
7687
7715
|
/** Sorting by title descending */
|
|
7688
|
-
TITLE_DESC = "TITLE_DESC"
|
|
7689
|
-
/** Sorting by post rating descending. */
|
|
7690
|
-
RATING = "RATING"
|
|
7716
|
+
TITLE_DESC = "TITLE_DESC"
|
|
7691
7717
|
}
|
|
7692
7718
|
interface BlogPaging {
|
|
7693
7719
|
/**
|
|
@@ -7709,8 +7735,6 @@ interface BlogPaging {
|
|
|
7709
7735
|
}
|
|
7710
7736
|
declare enum PostFieldField {
|
|
7711
7737
|
UNKNOWN = "UNKNOWN",
|
|
7712
|
-
/** Deprecated use `METRICS` instead */
|
|
7713
|
-
COUNTERS = "COUNTERS",
|
|
7714
7738
|
/** Includes Post url when present */
|
|
7715
7739
|
URL = "URL",
|
|
7716
7740
|
/** Includes Post content text string when present */
|
|
@@ -7719,26 +7743,10 @@ declare enum PostFieldField {
|
|
|
7719
7743
|
METRICS = "METRICS",
|
|
7720
7744
|
/** Includes SEO data */
|
|
7721
7745
|
SEO = "SEO",
|
|
7722
|
-
/**
|
|
7723
|
-
* Includes Post content as a stringified DraftJS document
|
|
7724
|
-
* Reserved for internal use
|
|
7725
|
-
*/
|
|
7726
|
-
CONTENT = "CONTENT",
|
|
7727
|
-
/**
|
|
7728
|
-
* Includes internal id field
|
|
7729
|
-
* Reserved for internal use
|
|
7730
|
-
*/
|
|
7731
|
-
INTERNAL_ID = "INTERNAL_ID",
|
|
7732
7746
|
/** Includes post owners Contact Id */
|
|
7733
7747
|
CONTACT_ID = "CONTACT_ID",
|
|
7734
7748
|
/** Includes post rich content */
|
|
7735
|
-
RICH_CONTENT = "RICH_CONTENT"
|
|
7736
|
-
/** Includes post rich content string */
|
|
7737
|
-
RICH_CONTENT_STRING = "RICH_CONTENT_STRING",
|
|
7738
|
-
/** Includes compressed post rich content string */
|
|
7739
|
-
RICH_CONTENT_COMPRESSED = "RICH_CONTENT_COMPRESSED",
|
|
7740
|
-
/** Includes post translations */
|
|
7741
|
-
TRANSLATIONS = "TRANSLATIONS"
|
|
7749
|
+
RICH_CONTENT = "RICH_CONTENT"
|
|
7742
7750
|
}
|
|
7743
7751
|
interface ListDemoPostsResponse {
|
|
7744
7752
|
/** List of posts. */
|
|
@@ -9486,31 +9494,13 @@ interface GetTotalPostsSignature {
|
|
|
9486
9494
|
*/
|
|
9487
9495
|
(options?: GetTotalPostsOptions | undefined): Promise<GetTotalPostsResponse & GetTotalPostsResponseNonNullableFields>;
|
|
9488
9496
|
}
|
|
9489
|
-
declare const onPostCreated$1: EventDefinition
|
|
9490
|
-
declare const onPostUpdated$1: EventDefinition
|
|
9491
|
-
declare const onPostDeleted$1: EventDefinition
|
|
9492
|
-
declare const onPostLiked$1: EventDefinition
|
|
9493
|
-
declare const onPostUnliked$1: EventDefinition
|
|
9494
|
-
|
|
9495
|
-
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
9496
|
-
__type: 'event-definition';
|
|
9497
|
-
type: Type;
|
|
9498
|
-
isDomainEvent?: boolean;
|
|
9499
|
-
transformations?: (envelope: unknown) => Payload;
|
|
9500
|
-
__payload: Payload;
|
|
9501
|
-
};
|
|
9502
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
9503
|
-
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
9504
|
-
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
9505
|
-
|
|
9506
|
-
declare global {
|
|
9507
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
9508
|
-
interface SymbolConstructor {
|
|
9509
|
-
readonly observable: symbol;
|
|
9510
|
-
}
|
|
9511
|
-
}
|
|
9497
|
+
declare const onPostCreated$1: EventDefinition<PostCreatedEnvelope, "wix.blog.v3.post_created">;
|
|
9498
|
+
declare const onPostUpdated$1: EventDefinition<PostUpdatedEnvelope, "wix.blog.v3.post_updated">;
|
|
9499
|
+
declare const onPostDeleted$1: EventDefinition<PostDeletedEnvelope, "wix.blog.v3.post_deleted">;
|
|
9500
|
+
declare const onPostLiked$1: EventDefinition<PostLikedEnvelope, "wix.blog.v3.post_liked">;
|
|
9501
|
+
declare const onPostUnliked$1: EventDefinition<PostUnlikedEnvelope, "wix.blog.v3.post_unliked">;
|
|
9512
9502
|
|
|
9513
|
-
declare function createEventModule$1<T extends EventDefinition
|
|
9503
|
+
declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
9514
9504
|
|
|
9515
9505
|
declare const getPost: MaybeContext<BuildRESTFunction<typeof getPost$1> & typeof getPost$1>;
|
|
9516
9506
|
declare const getPostBySlug: MaybeContext<BuildRESTFunction<typeof getPostBySlug$1> & typeof getPostBySlug$1>;
|
|
@@ -9910,7 +9900,7 @@ interface Keyword {
|
|
|
9910
9900
|
term?: string;
|
|
9911
9901
|
/** Whether the keyword is the main focus keyword. */
|
|
9912
9902
|
isMain?: boolean;
|
|
9913
|
-
/**
|
|
9903
|
+
/** The source that added the keyword terms to the SEO settings. */
|
|
9914
9904
|
origin?: string | null;
|
|
9915
9905
|
}
|
|
9916
9906
|
interface Tag {
|
|
@@ -9965,9 +9955,7 @@ interface GetOrCreateTagRequest {
|
|
|
9965
9955
|
declare enum Field {
|
|
9966
9956
|
UNKNOWN = "UNKNOWN",
|
|
9967
9957
|
/** Includes Tag URL when present. */
|
|
9968
|
-
URL = "URL"
|
|
9969
|
-
/** Includes SEO data. */
|
|
9970
|
-
SEO = "SEO"
|
|
9958
|
+
URL = "URL"
|
|
9971
9959
|
}
|
|
9972
9960
|
interface GetOrCreateTagResponse {
|
|
9973
9961
|
/** Tag info. */
|
|
@@ -10842,27 +10830,9 @@ interface DeleteTagSignature {
|
|
|
10842
10830
|
*/
|
|
10843
10831
|
(tagId: string): Promise<void>;
|
|
10844
10832
|
}
|
|
10845
|
-
declare const onTagCreated$1: EventDefinition
|
|
10846
|
-
declare const onTagUpdated$1: EventDefinition
|
|
10847
|
-
declare const onTagDeleted$1: EventDefinition
|
|
10848
|
-
|
|
10849
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
10850
|
-
__type: 'event-definition';
|
|
10851
|
-
type: Type;
|
|
10852
|
-
isDomainEvent?: boolean;
|
|
10853
|
-
transformations?: (envelope: unknown) => Payload;
|
|
10854
|
-
__payload: Payload;
|
|
10855
|
-
};
|
|
10856
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
10857
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
10858
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
10859
|
-
|
|
10860
|
-
declare global {
|
|
10861
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
10862
|
-
interface SymbolConstructor {
|
|
10863
|
-
readonly observable: symbol;
|
|
10864
|
-
}
|
|
10865
|
-
}
|
|
10833
|
+
declare const onTagCreated$1: EventDefinition<TagCreatedEnvelope, "wix.blog.v3.tag_created">;
|
|
10834
|
+
declare const onTagUpdated$1: EventDefinition<TagUpdatedEnvelope, "wix.blog.v3.tag_updated">;
|
|
10835
|
+
declare const onTagDeleted$1: EventDefinition<TagDeletedEnvelope, "wix.blog.v3.tag_deleted">;
|
|
10866
10836
|
|
|
10867
10837
|
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
10868
10838
|
|
|
@@ -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,
|
|
@@ -1422,7 +1490,7 @@ interface Keyword$3 {
|
|
|
1422
1490
|
term?: string;
|
|
1423
1491
|
/** Whether the keyword is the main focus keyword. */
|
|
1424
1492
|
isMain?: boolean;
|
|
1425
|
-
/**
|
|
1493
|
+
/** The source that added the keyword terms to the SEO settings. */
|
|
1426
1494
|
origin?: string | null;
|
|
1427
1495
|
}
|
|
1428
1496
|
interface Tag$3 {
|
|
@@ -1492,9 +1560,7 @@ declare enum Field$3 {
|
|
|
1492
1560
|
*/
|
|
1493
1561
|
INTERNAL_ID = "INTERNAL_ID",
|
|
1494
1562
|
/** Includes SEO data. */
|
|
1495
|
-
SEO = "SEO"
|
|
1496
|
-
/** Includes translations. */
|
|
1497
|
-
TRANSLATIONS = "TRANSLATIONS"
|
|
1563
|
+
SEO = "SEO"
|
|
1498
1564
|
}
|
|
1499
1565
|
interface CreateCategoryResponse {
|
|
1500
1566
|
/** Category info. */
|
|
@@ -2154,29 +2220,11 @@ interface QueryCategoriesSignature {
|
|
|
2154
2220
|
*/
|
|
2155
2221
|
(options?: QueryCategoriesOptions | undefined): CategoriesQueryBuilder;
|
|
2156
2222
|
}
|
|
2157
|
-
declare const onCategoryCreated$1: EventDefinition
|
|
2158
|
-
declare const onCategoryUpdated$1: EventDefinition
|
|
2159
|
-
declare const onCategoryDeleted$1: EventDefinition
|
|
2160
|
-
|
|
2161
|
-
type EventDefinition$3<Payload = unknown, Type extends string = string> = {
|
|
2162
|
-
__type: 'event-definition';
|
|
2163
|
-
type: Type;
|
|
2164
|
-
isDomainEvent?: boolean;
|
|
2165
|
-
transformations?: (envelope: unknown) => Payload;
|
|
2166
|
-
__payload: Payload;
|
|
2167
|
-
};
|
|
2168
|
-
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
2169
|
-
type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
|
|
2170
|
-
type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
|
|
2171
|
-
|
|
2172
|
-
declare global {
|
|
2173
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2174
|
-
interface SymbolConstructor {
|
|
2175
|
-
readonly observable: symbol;
|
|
2176
|
-
}
|
|
2177
|
-
}
|
|
2223
|
+
declare const onCategoryCreated$1: EventDefinition<CategoryCreatedEnvelope, "wix.blog.v3.category_created">;
|
|
2224
|
+
declare const onCategoryUpdated$1: EventDefinition<CategoryUpdatedEnvelope, "wix.blog.v3.category_updated">;
|
|
2225
|
+
declare const onCategoryDeleted$1: EventDefinition<CategoryDeletedEnvelope, "wix.blog.v3.category_deleted">;
|
|
2178
2226
|
|
|
2179
|
-
declare function createEventModule$3<T extends EventDefinition
|
|
2227
|
+
declare function createEventModule$3<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
2180
2228
|
|
|
2181
2229
|
declare const getCategory: MaybeContext<BuildRESTFunction<typeof getCategory$1> & typeof getCategory$1>;
|
|
2182
2230
|
declare const getCategoryBySlug: MaybeContext<BuildRESTFunction<typeof getCategoryBySlug$1> & typeof getCategoryBySlug$1>;
|
|
@@ -3769,7 +3817,7 @@ interface Keyword$2 {
|
|
|
3769
3817
|
term?: string;
|
|
3770
3818
|
/** Whether the keyword is the main focus keyword. */
|
|
3771
3819
|
isMain?: boolean;
|
|
3772
|
-
/**
|
|
3820
|
+
/** The source that added the keyword terms to the SEO settings. */
|
|
3773
3821
|
origin?: string | null;
|
|
3774
3822
|
}
|
|
3775
3823
|
interface Tag$2 {
|
|
@@ -3920,8 +3968,6 @@ declare enum Field$2 {
|
|
|
3920
3968
|
CONTENT = "CONTENT",
|
|
3921
3969
|
/** Includes rich content field. */
|
|
3922
3970
|
RICH_CONTENT = "RICH_CONTENT",
|
|
3923
|
-
/** Includes draft post translations when present. */
|
|
3924
|
-
TRANSLATIONS = "TRANSLATIONS",
|
|
3925
3971
|
/** If the user has not set excerpt, returns the one autogenerated from content. */
|
|
3926
3972
|
GENERATED_EXCERPT = "GENERATED_EXCERPT"
|
|
3927
3973
|
}
|
|
@@ -5713,29 +5759,11 @@ interface PublishDraftPostSignature {
|
|
|
5713
5759
|
*/
|
|
5714
5760
|
(draftPostId: string): Promise<PublishDraftPostResponse & PublishDraftPostResponseNonNullableFields>;
|
|
5715
5761
|
}
|
|
5716
|
-
declare const onDraftCreated$1: EventDefinition
|
|
5717
|
-
declare const onDraftUpdated$1: EventDefinition
|
|
5718
|
-
declare const onDraftDeleted$1: EventDefinition
|
|
5762
|
+
declare const onDraftCreated$1: EventDefinition<DraftCreatedEnvelope, "wix.blog.v3.draft_created">;
|
|
5763
|
+
declare const onDraftUpdated$1: EventDefinition<DraftUpdatedEnvelope, "wix.blog.v3.draft_updated">;
|
|
5764
|
+
declare const onDraftDeleted$1: EventDefinition<DraftDeletedEnvelope, "wix.blog.v3.draft_deleted">;
|
|
5719
5765
|
|
|
5720
|
-
|
|
5721
|
-
__type: 'event-definition';
|
|
5722
|
-
type: Type;
|
|
5723
|
-
isDomainEvent?: boolean;
|
|
5724
|
-
transformations?: (envelope: unknown) => Payload;
|
|
5725
|
-
__payload: Payload;
|
|
5726
|
-
};
|
|
5727
|
-
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
5728
|
-
type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
|
|
5729
|
-
type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
|
|
5730
|
-
|
|
5731
|
-
declare global {
|
|
5732
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
5733
|
-
interface SymbolConstructor {
|
|
5734
|
-
readonly observable: symbol;
|
|
5735
|
-
}
|
|
5736
|
-
}
|
|
5737
|
-
|
|
5738
|
-
declare function createEventModule$2<T extends EventDefinition$2<any, string>>(eventDefinition: T): BuildEventDefinition$2<T> & T;
|
|
5766
|
+
declare function createEventModule$2<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
5739
5767
|
|
|
5740
5768
|
declare const createDraftPost: MaybeContext<BuildRESTFunction<typeof createDraftPost$1> & typeof createDraftPost$1>;
|
|
5741
5769
|
declare const bulkCreateDraftPosts: MaybeContext<BuildRESTFunction<typeof bulkCreateDraftPosts$1> & typeof bulkCreateDraftPosts$1>;
|
|
@@ -7685,9 +7713,7 @@ declare enum GetPostsSort {
|
|
|
7685
7713
|
/** Sorting by title ascending */
|
|
7686
7714
|
TITLE_ASC = "TITLE_ASC",
|
|
7687
7715
|
/** Sorting by title descending */
|
|
7688
|
-
TITLE_DESC = "TITLE_DESC"
|
|
7689
|
-
/** Sorting by post rating descending. */
|
|
7690
|
-
RATING = "RATING"
|
|
7716
|
+
TITLE_DESC = "TITLE_DESC"
|
|
7691
7717
|
}
|
|
7692
7718
|
interface BlogPaging {
|
|
7693
7719
|
/**
|
|
@@ -7709,8 +7735,6 @@ interface BlogPaging {
|
|
|
7709
7735
|
}
|
|
7710
7736
|
declare enum PostFieldField {
|
|
7711
7737
|
UNKNOWN = "UNKNOWN",
|
|
7712
|
-
/** Deprecated use `METRICS` instead */
|
|
7713
|
-
COUNTERS = "COUNTERS",
|
|
7714
7738
|
/** Includes Post url when present */
|
|
7715
7739
|
URL = "URL",
|
|
7716
7740
|
/** Includes Post content text string when present */
|
|
@@ -7719,26 +7743,10 @@ declare enum PostFieldField {
|
|
|
7719
7743
|
METRICS = "METRICS",
|
|
7720
7744
|
/** Includes SEO data */
|
|
7721
7745
|
SEO = "SEO",
|
|
7722
|
-
/**
|
|
7723
|
-
* Includes Post content as a stringified DraftJS document
|
|
7724
|
-
* Reserved for internal use
|
|
7725
|
-
*/
|
|
7726
|
-
CONTENT = "CONTENT",
|
|
7727
|
-
/**
|
|
7728
|
-
* Includes internal id field
|
|
7729
|
-
* Reserved for internal use
|
|
7730
|
-
*/
|
|
7731
|
-
INTERNAL_ID = "INTERNAL_ID",
|
|
7732
7746
|
/** Includes post owners Contact Id */
|
|
7733
7747
|
CONTACT_ID = "CONTACT_ID",
|
|
7734
7748
|
/** Includes post rich content */
|
|
7735
|
-
RICH_CONTENT = "RICH_CONTENT"
|
|
7736
|
-
/** Includes post rich content string */
|
|
7737
|
-
RICH_CONTENT_STRING = "RICH_CONTENT_STRING",
|
|
7738
|
-
/** Includes compressed post rich content string */
|
|
7739
|
-
RICH_CONTENT_COMPRESSED = "RICH_CONTENT_COMPRESSED",
|
|
7740
|
-
/** Includes post translations */
|
|
7741
|
-
TRANSLATIONS = "TRANSLATIONS"
|
|
7749
|
+
RICH_CONTENT = "RICH_CONTENT"
|
|
7742
7750
|
}
|
|
7743
7751
|
interface ListDemoPostsResponse {
|
|
7744
7752
|
/** List of posts. */
|
|
@@ -9486,31 +9494,13 @@ interface GetTotalPostsSignature {
|
|
|
9486
9494
|
*/
|
|
9487
9495
|
(options?: GetTotalPostsOptions | undefined): Promise<GetTotalPostsResponse & GetTotalPostsResponseNonNullableFields>;
|
|
9488
9496
|
}
|
|
9489
|
-
declare const onPostCreated$1: EventDefinition
|
|
9490
|
-
declare const onPostUpdated$1: EventDefinition
|
|
9491
|
-
declare const onPostDeleted$1: EventDefinition
|
|
9492
|
-
declare const onPostLiked$1: EventDefinition
|
|
9493
|
-
declare const onPostUnliked$1: EventDefinition
|
|
9494
|
-
|
|
9495
|
-
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
9496
|
-
__type: 'event-definition';
|
|
9497
|
-
type: Type;
|
|
9498
|
-
isDomainEvent?: boolean;
|
|
9499
|
-
transformations?: (envelope: unknown) => Payload;
|
|
9500
|
-
__payload: Payload;
|
|
9501
|
-
};
|
|
9502
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
9503
|
-
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
9504
|
-
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
9505
|
-
|
|
9506
|
-
declare global {
|
|
9507
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
9508
|
-
interface SymbolConstructor {
|
|
9509
|
-
readonly observable: symbol;
|
|
9510
|
-
}
|
|
9511
|
-
}
|
|
9497
|
+
declare const onPostCreated$1: EventDefinition<PostCreatedEnvelope, "wix.blog.v3.post_created">;
|
|
9498
|
+
declare const onPostUpdated$1: EventDefinition<PostUpdatedEnvelope, "wix.blog.v3.post_updated">;
|
|
9499
|
+
declare const onPostDeleted$1: EventDefinition<PostDeletedEnvelope, "wix.blog.v3.post_deleted">;
|
|
9500
|
+
declare const onPostLiked$1: EventDefinition<PostLikedEnvelope, "wix.blog.v3.post_liked">;
|
|
9501
|
+
declare const onPostUnliked$1: EventDefinition<PostUnlikedEnvelope, "wix.blog.v3.post_unliked">;
|
|
9512
9502
|
|
|
9513
|
-
declare function createEventModule$1<T extends EventDefinition
|
|
9503
|
+
declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
9514
9504
|
|
|
9515
9505
|
declare const getPost: MaybeContext<BuildRESTFunction<typeof getPost$1> & typeof getPost$1>;
|
|
9516
9506
|
declare const getPostBySlug: MaybeContext<BuildRESTFunction<typeof getPostBySlug$1> & typeof getPostBySlug$1>;
|
|
@@ -9910,7 +9900,7 @@ interface Keyword {
|
|
|
9910
9900
|
term?: string;
|
|
9911
9901
|
/** Whether the keyword is the main focus keyword. */
|
|
9912
9902
|
isMain?: boolean;
|
|
9913
|
-
/**
|
|
9903
|
+
/** The source that added the keyword terms to the SEO settings. */
|
|
9914
9904
|
origin?: string | null;
|
|
9915
9905
|
}
|
|
9916
9906
|
interface Tag {
|
|
@@ -9965,9 +9955,7 @@ interface GetOrCreateTagRequest {
|
|
|
9965
9955
|
declare enum Field {
|
|
9966
9956
|
UNKNOWN = "UNKNOWN",
|
|
9967
9957
|
/** Includes Tag URL when present. */
|
|
9968
|
-
URL = "URL"
|
|
9969
|
-
/** Includes SEO data. */
|
|
9970
|
-
SEO = "SEO"
|
|
9958
|
+
URL = "URL"
|
|
9971
9959
|
}
|
|
9972
9960
|
interface GetOrCreateTagResponse {
|
|
9973
9961
|
/** Tag info. */
|
|
@@ -10842,27 +10830,9 @@ interface DeleteTagSignature {
|
|
|
10842
10830
|
*/
|
|
10843
10831
|
(tagId: string): Promise<void>;
|
|
10844
10832
|
}
|
|
10845
|
-
declare const onTagCreated$1: EventDefinition
|
|
10846
|
-
declare const onTagUpdated$1: EventDefinition
|
|
10847
|
-
declare const onTagDeleted$1: EventDefinition
|
|
10848
|
-
|
|
10849
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
10850
|
-
__type: 'event-definition';
|
|
10851
|
-
type: Type;
|
|
10852
|
-
isDomainEvent?: boolean;
|
|
10853
|
-
transformations?: (envelope: unknown) => Payload;
|
|
10854
|
-
__payload: Payload;
|
|
10855
|
-
};
|
|
10856
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
10857
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
10858
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
10859
|
-
|
|
10860
|
-
declare global {
|
|
10861
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
10862
|
-
interface SymbolConstructor {
|
|
10863
|
-
readonly observable: symbol;
|
|
10864
|
-
}
|
|
10865
|
-
}
|
|
10833
|
+
declare const onTagCreated$1: EventDefinition<TagCreatedEnvelope, "wix.blog.v3.tag_created">;
|
|
10834
|
+
declare const onTagUpdated$1: EventDefinition<TagUpdatedEnvelope, "wix.blog.v3.tag_updated">;
|
|
10835
|
+
declare const onTagDeleted$1: EventDefinition<TagDeletedEnvelope, "wix.blog.v3.tag_deleted">;
|
|
10866
10836
|
|
|
10867
10837
|
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
10868
10838
|
|
|
@@ -1052,7 +1052,7 @@ interface Keyword$5 {
|
|
|
1052
1052
|
term?: string;
|
|
1053
1053
|
/** Whether the keyword is the main focus keyword. */
|
|
1054
1054
|
isMain?: boolean;
|
|
1055
|
-
/**
|
|
1055
|
+
/** The source that added the keyword terms to the SEO settings. */
|
|
1056
1056
|
origin?: string | null;
|
|
1057
1057
|
}
|
|
1058
1058
|
interface Tag$5 {
|
|
@@ -1121,9 +1121,7 @@ declare enum Field$5 {
|
|
|
1121
1121
|
*/
|
|
1122
1122
|
INTERNAL_ID = "INTERNAL_ID",
|
|
1123
1123
|
/** Includes SEO data. */
|
|
1124
|
-
SEO = "SEO"
|
|
1125
|
-
/** Includes translations. */
|
|
1126
|
-
TRANSLATIONS = "TRANSLATIONS"
|
|
1124
|
+
SEO = "SEO"
|
|
1127
1125
|
}
|
|
1128
1126
|
interface GetCategoryRequest$1 {
|
|
1129
1127
|
/** Category ID. */
|
|
@@ -1432,7 +1430,7 @@ interface Keyword$4 {
|
|
|
1432
1430
|
term?: string;
|
|
1433
1431
|
/** Whether the keyword is the main focus keyword. */
|
|
1434
1432
|
isMain?: boolean;
|
|
1435
|
-
/**
|
|
1433
|
+
/** The source that added the keyword terms to the SEO settings. */
|
|
1436
1434
|
origin?: string | null;
|
|
1437
1435
|
}
|
|
1438
1436
|
interface Tag$4 {
|
|
@@ -1478,9 +1476,7 @@ declare enum Field$4 {
|
|
|
1478
1476
|
*/
|
|
1479
1477
|
INTERNAL_ID = "INTERNAL_ID",
|
|
1480
1478
|
/** Includes SEO data. */
|
|
1481
|
-
SEO = "SEO"
|
|
1482
|
-
/** Includes translations. */
|
|
1483
|
-
TRANSLATIONS = "TRANSLATIONS"
|
|
1479
|
+
SEO = "SEO"
|
|
1484
1480
|
}
|
|
1485
1481
|
interface GetCategoryRequest {
|
|
1486
1482
|
/** Category ID. */
|
|
@@ -3229,7 +3225,7 @@ interface Keyword$3 {
|
|
|
3229
3225
|
term?: string;
|
|
3230
3226
|
/** Whether the keyword is the main focus keyword. */
|
|
3231
3227
|
isMain?: boolean;
|
|
3232
|
-
/**
|
|
3228
|
+
/** The source that added the keyword terms to the SEO settings. */
|
|
3233
3229
|
origin?: string | null;
|
|
3234
3230
|
}
|
|
3235
3231
|
interface Tag$3 {
|
|
@@ -3369,8 +3365,6 @@ declare enum Field$3 {
|
|
|
3369
3365
|
CONTENT = "CONTENT",
|
|
3370
3366
|
/** Includes rich content field. */
|
|
3371
3367
|
RICH_CONTENT = "RICH_CONTENT",
|
|
3372
|
-
/** Includes draft post translations when present. */
|
|
3373
|
-
TRANSLATIONS = "TRANSLATIONS",
|
|
3374
3368
|
/** If the user has not set excerpt, returns the one autogenerated from content. */
|
|
3375
3369
|
GENERATED_EXCERPT = "GENERATED_EXCERPT"
|
|
3376
3370
|
}
|
|
@@ -5681,7 +5675,7 @@ interface Keyword$2 {
|
|
|
5681
5675
|
term?: string;
|
|
5682
5676
|
/** Whether the keyword is the main focus keyword. */
|
|
5683
5677
|
isMain?: boolean;
|
|
5684
|
-
/**
|
|
5678
|
+
/** The source that added the keyword terms to the SEO settings. */
|
|
5685
5679
|
origin?: string | null;
|
|
5686
5680
|
}
|
|
5687
5681
|
interface Tag$2 {
|
|
@@ -5791,8 +5785,6 @@ declare enum Field$2 {
|
|
|
5791
5785
|
CONTENT = "CONTENT",
|
|
5792
5786
|
/** Includes rich content field. */
|
|
5793
5787
|
RICH_CONTENT = "RICH_CONTENT",
|
|
5794
|
-
/** Includes draft post translations when present. */
|
|
5795
|
-
TRANSLATIONS = "TRANSLATIONS",
|
|
5796
5788
|
/** If the user has not set excerpt, returns the one autogenerated from content. */
|
|
5797
5789
|
GENERATED_EXCERPT = "GENERATED_EXCERPT"
|
|
5798
5790
|
}
|
|
@@ -8226,9 +8218,7 @@ declare enum GetPostsSort$1 {
|
|
|
8226
8218
|
/** Sorting by title ascending */
|
|
8227
8219
|
TITLE_ASC = "TITLE_ASC",
|
|
8228
8220
|
/** Sorting by title descending */
|
|
8229
|
-
TITLE_DESC = "TITLE_DESC"
|
|
8230
|
-
/** Sorting by post rating descending. */
|
|
8231
|
-
RATING = "RATING"
|
|
8221
|
+
TITLE_DESC = "TITLE_DESC"
|
|
8232
8222
|
}
|
|
8233
8223
|
interface BlogPaging$1 {
|
|
8234
8224
|
/**
|
|
@@ -8250,8 +8240,6 @@ interface BlogPaging$1 {
|
|
|
8250
8240
|
}
|
|
8251
8241
|
declare enum PostFieldField$1 {
|
|
8252
8242
|
UNKNOWN = "UNKNOWN",
|
|
8253
|
-
/** Deprecated use `METRICS` instead */
|
|
8254
|
-
COUNTERS = "COUNTERS",
|
|
8255
8243
|
/** Includes Post url when present */
|
|
8256
8244
|
URL = "URL",
|
|
8257
8245
|
/** Includes Post content text string when present */
|
|
@@ -8260,26 +8248,10 @@ declare enum PostFieldField$1 {
|
|
|
8260
8248
|
METRICS = "METRICS",
|
|
8261
8249
|
/** Includes SEO data */
|
|
8262
8250
|
SEO = "SEO",
|
|
8263
|
-
/**
|
|
8264
|
-
* Includes Post content as a stringified DraftJS document
|
|
8265
|
-
* Reserved for internal use
|
|
8266
|
-
*/
|
|
8267
|
-
CONTENT = "CONTENT",
|
|
8268
|
-
/**
|
|
8269
|
-
* Includes internal id field
|
|
8270
|
-
* Reserved for internal use
|
|
8271
|
-
*/
|
|
8272
|
-
INTERNAL_ID = "INTERNAL_ID",
|
|
8273
8251
|
/** Includes post owners Contact Id */
|
|
8274
8252
|
CONTACT_ID = "CONTACT_ID",
|
|
8275
8253
|
/** Includes post rich content */
|
|
8276
|
-
RICH_CONTENT = "RICH_CONTENT"
|
|
8277
|
-
/** Includes post rich content string */
|
|
8278
|
-
RICH_CONTENT_STRING = "RICH_CONTENT_STRING",
|
|
8279
|
-
/** Includes compressed post rich content string */
|
|
8280
|
-
RICH_CONTENT_COMPRESSED = "RICH_CONTENT_COMPRESSED",
|
|
8281
|
-
/** Includes post translations */
|
|
8282
|
-
TRANSLATIONS = "TRANSLATIONS"
|
|
8254
|
+
RICH_CONTENT = "RICH_CONTENT"
|
|
8283
8255
|
}
|
|
8284
8256
|
interface MetaData$3 {
|
|
8285
8257
|
/** Number of items returned in this response. */
|
|
@@ -10587,9 +10559,7 @@ declare enum GetPostsSort {
|
|
|
10587
10559
|
/** Sorting by title ascending */
|
|
10588
10560
|
TITLE_ASC = "TITLE_ASC",
|
|
10589
10561
|
/** Sorting by title descending */
|
|
10590
|
-
TITLE_DESC = "TITLE_DESC"
|
|
10591
|
-
/** Sorting by post rating descending. */
|
|
10592
|
-
RATING = "RATING"
|
|
10562
|
+
TITLE_DESC = "TITLE_DESC"
|
|
10593
10563
|
}
|
|
10594
10564
|
interface BlogPaging {
|
|
10595
10565
|
/**
|
|
@@ -10611,8 +10581,6 @@ interface BlogPaging {
|
|
|
10611
10581
|
}
|
|
10612
10582
|
declare enum PostFieldField {
|
|
10613
10583
|
UNKNOWN = "UNKNOWN",
|
|
10614
|
-
/** Deprecated use `METRICS` instead */
|
|
10615
|
-
COUNTERS = "COUNTERS",
|
|
10616
10584
|
/** Includes Post url when present */
|
|
10617
10585
|
URL = "URL",
|
|
10618
10586
|
/** Includes Post content text string when present */
|
|
@@ -10621,26 +10589,10 @@ declare enum PostFieldField {
|
|
|
10621
10589
|
METRICS = "METRICS",
|
|
10622
10590
|
/** Includes SEO data */
|
|
10623
10591
|
SEO = "SEO",
|
|
10624
|
-
/**
|
|
10625
|
-
* Includes Post content as a stringified DraftJS document
|
|
10626
|
-
* Reserved for internal use
|
|
10627
|
-
*/
|
|
10628
|
-
CONTENT = "CONTENT",
|
|
10629
|
-
/**
|
|
10630
|
-
* Includes internal id field
|
|
10631
|
-
* Reserved for internal use
|
|
10632
|
-
*/
|
|
10633
|
-
INTERNAL_ID = "INTERNAL_ID",
|
|
10634
10592
|
/** Includes post owners Contact Id */
|
|
10635
10593
|
CONTACT_ID = "CONTACT_ID",
|
|
10636
10594
|
/** Includes post rich content */
|
|
10637
|
-
RICH_CONTENT = "RICH_CONTENT"
|
|
10638
|
-
/** Includes post rich content string */
|
|
10639
|
-
RICH_CONTENT_STRING = "RICH_CONTENT_STRING",
|
|
10640
|
-
/** Includes compressed post rich content string */
|
|
10641
|
-
RICH_CONTENT_COMPRESSED = "RICH_CONTENT_COMPRESSED",
|
|
10642
|
-
/** Includes post translations */
|
|
10643
|
-
TRANSLATIONS = "TRANSLATIONS"
|
|
10595
|
+
RICH_CONTENT = "RICH_CONTENT"
|
|
10644
10596
|
}
|
|
10645
10597
|
interface MetaData$2 {
|
|
10646
10598
|
/** Number of items returned in this response. */
|
|
@@ -11464,9 +11416,7 @@ interface PageUrl {
|
|
|
11464
11416
|
declare enum Field$1 {
|
|
11465
11417
|
UNKNOWN = "UNKNOWN",
|
|
11466
11418
|
/** Includes Tag URL when present. */
|
|
11467
|
-
URL = "URL"
|
|
11468
|
-
/** Includes SEO data. */
|
|
11469
|
-
SEO = "SEO"
|
|
11419
|
+
URL = "URL"
|
|
11470
11420
|
}
|
|
11471
11421
|
interface CreateTagRequest$1 {
|
|
11472
11422
|
/** Tag label. The label for each tag in a blog must be unique. */
|
|
@@ -11873,9 +11823,7 @@ interface BlogTag {
|
|
|
11873
11823
|
declare enum Field {
|
|
11874
11824
|
UNKNOWN = "UNKNOWN",
|
|
11875
11825
|
/** Includes Tag URL when present. */
|
|
11876
|
-
URL = "URL"
|
|
11877
|
-
/** Includes SEO data. */
|
|
11878
|
-
SEO = "SEO"
|
|
11826
|
+
URL = "URL"
|
|
11879
11827
|
}
|
|
11880
11828
|
interface CreateTagRequest {
|
|
11881
11829
|
/** Tag label. The label for each tag in a blog must be unique. */
|