@wix/blog 1.0.273 → 1.0.274

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/blog",
3
- "version": "1.0.273",
3
+ "version": "1.0.274",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -18,13 +18,12 @@
18
18
  "type-bundles"
19
19
  ],
20
20
  "dependencies": {
21
- "@wix/blog_categories": "1.0.34",
22
- "@wix/blog_draft-posts": "1.0.31",
23
- "@wix/blog_posts": "1.0.36",
24
- "@wix/blog_tags": "1.0.26"
21
+ "@wix/blog_categories": "1.0.35",
22
+ "@wix/blog_draft-posts": "1.0.32",
23
+ "@wix/blog_posts": "1.0.37",
24
+ "@wix/blog_tags": "1.0.27"
25
25
  },
26
26
  "devDependencies": {
27
- "@wix/sdk": "https://cdn.dev.wixpress.com/@wix/sdk/02e8069ab2fd783e0e6a080fc7d590e76cb26ab93c8389574286305b.tar.gz",
28
27
  "glob": "^10.4.1",
29
28
  "rollup": "^4.18.0",
30
29
  "rollup-plugin-dts": "^6.1.1",
@@ -46,5 +45,5 @@
46
45
  "fqdn": ""
47
46
  }
48
47
  },
49
- "falconPackageHash": "d0e8454b5bdfaae451f7207d6d09e951c55176ef9aa4a612c1cf5eef"
48
+ "falconPackageHash": "950e577d6162e7d2285076cab04708e5f9075207ec0d726884cbe34c"
50
49
  }
@@ -573,56 +573,64 @@ interface CategoriesQueryBuilder {
573
573
  find: () => Promise<CategoriesQueryResult>;
574
574
  }
575
575
 
576
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
577
- interface HttpClient {
578
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
576
+ type RESTFunctionDescriptor$3<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$3) => T;
577
+ interface HttpClient$3 {
578
+ request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
579
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
579
580
  }
580
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
581
- type HttpResponse<T = any> = {
581
+ type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
582
+ type HttpResponse$3<T = any> = {
582
583
  data: T;
583
584
  status: number;
584
585
  statusText: string;
585
586
  headers: any;
586
587
  request?: any;
587
588
  };
588
- type RequestOptions<_TResponse = any, Data = any> = {
589
+ type RequestOptions$3<_TResponse = any, Data = any> = {
589
590
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
590
591
  url: string;
591
592
  data?: Data;
592
593
  params?: URLSearchParams;
593
- } & APIMetadata;
594
- type APIMetadata = {
594
+ } & APIMetadata$3;
595
+ type APIMetadata$3 = {
595
596
  methodFqn?: string;
596
597
  entityFqdn?: string;
597
598
  packageName?: string;
598
599
  };
599
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
600
- type EventDefinition<Payload = unknown, Type extends string = string> = {
600
+ type BuildRESTFunction$3<T extends RESTFunctionDescriptor$3> = T extends RESTFunctionDescriptor$3<infer U> ? U : never;
601
+ type EventDefinition$3<Payload = unknown, Type extends string = string> = {
601
602
  __type: 'event-definition';
602
603
  type: Type;
603
604
  isDomainEvent?: boolean;
604
- transformations?: unknown;
605
+ transformations?: (envelope: unknown) => Payload;
605
606
  __payload: Payload;
606
607
  };
607
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
608
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
609
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
608
+ declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
609
+ type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
610
+ type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
610
611
 
611
- declare function getCategory$1(httpClient: HttpClient): (categoryId: string, options?: GetCategoryOptions) => Promise<GetCategoryResponse & GetCategoryResponseNonNullableFields>;
612
- declare function getCategoryBySlug$1(httpClient: HttpClient): (slug: string, options?: GetCategoryBySlugOptions) => Promise<GetCategoryBySlugResponse & GetCategoryBySlugResponseNonNullableFields>;
613
- declare function listCategories$1(httpClient: HttpClient): (options?: ListCategoriesOptions) => Promise<ListCategoriesResponse & ListCategoriesResponseNonNullableFields>;
614
- declare function queryCategories$1(httpClient: HttpClient): (options?: QueryCategoriesOptions) => CategoriesQueryBuilder;
615
- declare const onCategoryCreated$1: EventDefinition<CategoryCreatedEnvelope, "wix.blog.v3.category_created">;
616
- declare const onCategoryUpdated$1: EventDefinition<CategoryUpdatedEnvelope, "wix.blog.v3.category_updated">;
617
- declare const onCategoryDeleted$1: EventDefinition<CategoryDeletedEnvelope, "wix.blog.v3.category_deleted">;
612
+ declare global {
613
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
614
+ interface SymbolConstructor {
615
+ readonly observable: symbol;
616
+ }
617
+ }
618
+
619
+ declare function getCategory$1(httpClient: HttpClient$3): (categoryId: string, options?: GetCategoryOptions) => Promise<GetCategoryResponse & GetCategoryResponseNonNullableFields>;
620
+ declare function getCategoryBySlug$1(httpClient: HttpClient$3): (slug: string, options?: GetCategoryBySlugOptions) => Promise<GetCategoryBySlugResponse & GetCategoryBySlugResponseNonNullableFields>;
621
+ declare function listCategories$1(httpClient: HttpClient$3): (options?: ListCategoriesOptions) => Promise<ListCategoriesResponse & ListCategoriesResponseNonNullableFields>;
622
+ declare function queryCategories$1(httpClient: HttpClient$3): (options?: QueryCategoriesOptions) => CategoriesQueryBuilder;
623
+ declare const onCategoryCreated$1: EventDefinition$3<CategoryCreatedEnvelope, "wix.blog.v3.category_created">;
624
+ declare const onCategoryUpdated$1: EventDefinition$3<CategoryUpdatedEnvelope, "wix.blog.v3.category_updated">;
625
+ declare const onCategoryDeleted$1: EventDefinition$3<CategoryDeletedEnvelope, "wix.blog.v3.category_deleted">;
618
626
 
619
- declare const getCategory: BuildRESTFunction<typeof getCategory$1>;
620
- declare const getCategoryBySlug: BuildRESTFunction<typeof getCategoryBySlug$1>;
621
- declare const listCategories: BuildRESTFunction<typeof listCategories$1>;
622
- declare const queryCategories: BuildRESTFunction<typeof queryCategories$1>;
623
- declare const onCategoryCreated: BuildEventDefinition<typeof onCategoryCreated$1>;
624
- declare const onCategoryUpdated: BuildEventDefinition<typeof onCategoryUpdated$1>;
625
- declare const onCategoryDeleted: BuildEventDefinition<typeof onCategoryDeleted$1>;
627
+ declare const getCategory: BuildRESTFunction$3<typeof getCategory$1>;
628
+ declare const getCategoryBySlug: BuildRESTFunction$3<typeof getCategoryBySlug$1>;
629
+ declare const listCategories: BuildRESTFunction$3<typeof listCategories$1>;
630
+ declare const queryCategories: BuildRESTFunction$3<typeof queryCategories$1>;
631
+ declare const onCategoryCreated: BuildEventDefinition$3<typeof onCategoryCreated$1>;
632
+ declare const onCategoryUpdated: BuildEventDefinition$3<typeof onCategoryUpdated$1>;
633
+ declare const onCategoryDeleted: BuildEventDefinition$3<typeof onCategoryDeleted$1>;
626
634
 
627
635
  declare const context$3_getCategory: typeof getCategory;
628
636
  declare const context$3_getCategoryBySlug: typeof getCategoryBySlug;
@@ -8061,41 +8069,84 @@ interface DraftPostsQueryBuilder {
8061
8069
  find: () => Promise<DraftPostsQueryResult>;
8062
8070
  }
8063
8071
 
8064
- declare function createDraftPost$1(httpClient: HttpClient): (draftPost: DraftPost, options?: CreateDraftPostOptions) => Promise<CreateDraftPostResponse & CreateDraftPostResponseNonNullableFields>;
8065
- declare function bulkCreateDraftPosts$1(httpClient: HttpClient): (draftPosts: DraftPost[], options?: BulkCreateDraftPostsOptions) => Promise<BulkCreateDraftPostsResponse & BulkCreateDraftPostsResponseNonNullableFields>;
8066
- declare function bulkUpdateDraftPosts$1(httpClient: HttpClient): (options?: BulkUpdateDraftPostsOptions) => Promise<BulkUpdateDraftPostsResponse & BulkUpdateDraftPostsResponseNonNullableFields>;
8067
- declare function listDeletedDraftPosts$1(httpClient: HttpClient): (options?: ListDeletedDraftPostsOptions) => Promise<ListDeletedDraftPostsResponse & ListDeletedDraftPostsResponseNonNullableFields>;
8068
- declare function getDraftPost$1(httpClient: HttpClient): (draftPostId: string, options?: GetDraftPostOptions) => Promise<GetDraftPostResponse & GetDraftPostResponseNonNullableFields>;
8069
- declare function updateDraftPost$1(httpClient: HttpClient): (_id: string, draftPost: UpdateDraftPost, options?: UpdateDraftPostOptions) => Promise<UpdateDraftPostResponse & UpdateDraftPostResponseNonNullableFields>;
8070
- declare function deleteDraftPost$1(httpClient: HttpClient): (draftPostId: string, options?: DeleteDraftPostOptions) => Promise<void>;
8071
- declare function removeFromTrashBin$1(httpClient: HttpClient): (draftPostId: string) => Promise<void>;
8072
- declare function bulkDeleteDraftPosts$1(httpClient: HttpClient): (postIds: string[], options?: BulkDeleteDraftPostsOptions) => Promise<BulkDeleteDraftPostsResponse & BulkDeleteDraftPostsResponseNonNullableFields>;
8073
- declare function listDraftPosts$1(httpClient: HttpClient): (options?: ListDraftPostsOptions) => Promise<ListDraftPostsResponse & ListDraftPostsResponseNonNullableFields>;
8074
- declare function getDeletedDraftPost$1(httpClient: HttpClient): (draftPostId: string) => Promise<GetDeletedDraftPostResponse & GetDeletedDraftPostResponseNonNullableFields>;
8075
- declare function restoreFromTrashBin$1(httpClient: HttpClient): (draftPostId: string) => Promise<RestoreFromTrashBinResponse & RestoreFromTrashBinResponseNonNullableFields>;
8076
- declare function queryDraftPosts$1(httpClient: HttpClient): (options?: QueryDraftPostsOptions) => DraftPostsQueryBuilder;
8077
- declare function publishDraftPost$1(httpClient: HttpClient): (draftPostId: string) => Promise<PublishDraftPostResponse & PublishDraftPostResponseNonNullableFields>;
8078
- declare const onDraftCreated$1: EventDefinition<DraftCreatedEnvelope, "wix.blog.v3.draft_created">;
8079
- declare const onDraftUpdated$1: EventDefinition<DraftUpdatedEnvelope, "wix.blog.v3.draft_updated">;
8080
- declare const onDraftDeleted$1: EventDefinition<DraftDeletedEnvelope, "wix.blog.v3.draft_deleted">;
8072
+ type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
8073
+ interface HttpClient$2 {
8074
+ request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
8075
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
8076
+ }
8077
+ type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
8078
+ type HttpResponse$2<T = any> = {
8079
+ data: T;
8080
+ status: number;
8081
+ statusText: string;
8082
+ headers: any;
8083
+ request?: any;
8084
+ };
8085
+ type RequestOptions$2<_TResponse = any, Data = any> = {
8086
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
8087
+ url: string;
8088
+ data?: Data;
8089
+ params?: URLSearchParams;
8090
+ } & APIMetadata$2;
8091
+ type APIMetadata$2 = {
8092
+ methodFqn?: string;
8093
+ entityFqdn?: string;
8094
+ packageName?: string;
8095
+ };
8096
+ type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
8097
+ type EventDefinition$2<Payload = unknown, Type extends string = string> = {
8098
+ __type: 'event-definition';
8099
+ type: Type;
8100
+ isDomainEvent?: boolean;
8101
+ transformations?: (envelope: unknown) => Payload;
8102
+ __payload: Payload;
8103
+ };
8104
+ declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
8105
+ type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
8106
+ type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
8107
+
8108
+ declare global {
8109
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
8110
+ interface SymbolConstructor {
8111
+ readonly observable: symbol;
8112
+ }
8113
+ }
8114
+
8115
+ declare function createDraftPost$1(httpClient: HttpClient$2): (draftPost: DraftPost, options?: CreateDraftPostOptions) => Promise<CreateDraftPostResponse & CreateDraftPostResponseNonNullableFields>;
8116
+ declare function bulkCreateDraftPosts$1(httpClient: HttpClient$2): (draftPosts: DraftPost[], options?: BulkCreateDraftPostsOptions) => Promise<BulkCreateDraftPostsResponse & BulkCreateDraftPostsResponseNonNullableFields>;
8117
+ declare function bulkUpdateDraftPosts$1(httpClient: HttpClient$2): (options?: BulkUpdateDraftPostsOptions) => Promise<BulkUpdateDraftPostsResponse & BulkUpdateDraftPostsResponseNonNullableFields>;
8118
+ declare function listDeletedDraftPosts$1(httpClient: HttpClient$2): (options?: ListDeletedDraftPostsOptions) => Promise<ListDeletedDraftPostsResponse & ListDeletedDraftPostsResponseNonNullableFields>;
8119
+ declare function getDraftPost$1(httpClient: HttpClient$2): (draftPostId: string, options?: GetDraftPostOptions) => Promise<GetDraftPostResponse & GetDraftPostResponseNonNullableFields>;
8120
+ declare function updateDraftPost$1(httpClient: HttpClient$2): (_id: string, draftPost: UpdateDraftPost, options?: UpdateDraftPostOptions) => Promise<UpdateDraftPostResponse & UpdateDraftPostResponseNonNullableFields>;
8121
+ declare function deleteDraftPost$1(httpClient: HttpClient$2): (draftPostId: string, options?: DeleteDraftPostOptions) => Promise<void>;
8122
+ declare function removeFromTrashBin$1(httpClient: HttpClient$2): (draftPostId: string) => Promise<void>;
8123
+ declare function bulkDeleteDraftPosts$1(httpClient: HttpClient$2): (postIds: string[], options?: BulkDeleteDraftPostsOptions) => Promise<BulkDeleteDraftPostsResponse & BulkDeleteDraftPostsResponseNonNullableFields>;
8124
+ declare function listDraftPosts$1(httpClient: HttpClient$2): (options?: ListDraftPostsOptions) => Promise<ListDraftPostsResponse & ListDraftPostsResponseNonNullableFields>;
8125
+ declare function getDeletedDraftPost$1(httpClient: HttpClient$2): (draftPostId: string) => Promise<GetDeletedDraftPostResponse & GetDeletedDraftPostResponseNonNullableFields>;
8126
+ declare function restoreFromTrashBin$1(httpClient: HttpClient$2): (draftPostId: string) => Promise<RestoreFromTrashBinResponse & RestoreFromTrashBinResponseNonNullableFields>;
8127
+ declare function queryDraftPosts$1(httpClient: HttpClient$2): (options?: QueryDraftPostsOptions) => DraftPostsQueryBuilder;
8128
+ declare function publishDraftPost$1(httpClient: HttpClient$2): (draftPostId: string) => Promise<PublishDraftPostResponse & PublishDraftPostResponseNonNullableFields>;
8129
+ declare const onDraftCreated$1: EventDefinition$2<DraftCreatedEnvelope, "wix.blog.v3.draft_created">;
8130
+ declare const onDraftUpdated$1: EventDefinition$2<DraftUpdatedEnvelope, "wix.blog.v3.draft_updated">;
8131
+ declare const onDraftDeleted$1: EventDefinition$2<DraftDeletedEnvelope, "wix.blog.v3.draft_deleted">;
8081
8132
 
8082
- declare const createDraftPost: BuildRESTFunction<typeof createDraftPost$1>;
8083
- declare const bulkCreateDraftPosts: BuildRESTFunction<typeof bulkCreateDraftPosts$1>;
8084
- declare const bulkUpdateDraftPosts: BuildRESTFunction<typeof bulkUpdateDraftPosts$1>;
8085
- declare const listDeletedDraftPosts: BuildRESTFunction<typeof listDeletedDraftPosts$1>;
8086
- declare const getDraftPost: BuildRESTFunction<typeof getDraftPost$1>;
8087
- declare const updateDraftPost: BuildRESTFunction<typeof updateDraftPost$1>;
8088
- declare const deleteDraftPost: BuildRESTFunction<typeof deleteDraftPost$1>;
8089
- declare const removeFromTrashBin: BuildRESTFunction<typeof removeFromTrashBin$1>;
8090
- declare const bulkDeleteDraftPosts: BuildRESTFunction<typeof bulkDeleteDraftPosts$1>;
8091
- declare const listDraftPosts: BuildRESTFunction<typeof listDraftPosts$1>;
8092
- declare const getDeletedDraftPost: BuildRESTFunction<typeof getDeletedDraftPost$1>;
8093
- declare const restoreFromTrashBin: BuildRESTFunction<typeof restoreFromTrashBin$1>;
8094
- declare const queryDraftPosts: BuildRESTFunction<typeof queryDraftPosts$1>;
8095
- declare const publishDraftPost: BuildRESTFunction<typeof publishDraftPost$1>;
8096
- declare const onDraftCreated: BuildEventDefinition<typeof onDraftCreated$1>;
8097
- declare const onDraftUpdated: BuildEventDefinition<typeof onDraftUpdated$1>;
8098
- declare const onDraftDeleted: BuildEventDefinition<typeof onDraftDeleted$1>;
8133
+ declare const createDraftPost: BuildRESTFunction$2<typeof createDraftPost$1>;
8134
+ declare const bulkCreateDraftPosts: BuildRESTFunction$2<typeof bulkCreateDraftPosts$1>;
8135
+ declare const bulkUpdateDraftPosts: BuildRESTFunction$2<typeof bulkUpdateDraftPosts$1>;
8136
+ declare const listDeletedDraftPosts: BuildRESTFunction$2<typeof listDeletedDraftPosts$1>;
8137
+ declare const getDraftPost: BuildRESTFunction$2<typeof getDraftPost$1>;
8138
+ declare const updateDraftPost: BuildRESTFunction$2<typeof updateDraftPost$1>;
8139
+ declare const deleteDraftPost: BuildRESTFunction$2<typeof deleteDraftPost$1>;
8140
+ declare const removeFromTrashBin: BuildRESTFunction$2<typeof removeFromTrashBin$1>;
8141
+ declare const bulkDeleteDraftPosts: BuildRESTFunction$2<typeof bulkDeleteDraftPosts$1>;
8142
+ declare const listDraftPosts: BuildRESTFunction$2<typeof listDraftPosts$1>;
8143
+ declare const getDeletedDraftPost: BuildRESTFunction$2<typeof getDeletedDraftPost$1>;
8144
+ declare const restoreFromTrashBin: BuildRESTFunction$2<typeof restoreFromTrashBin$1>;
8145
+ declare const queryDraftPosts: BuildRESTFunction$2<typeof queryDraftPosts$1>;
8146
+ declare const publishDraftPost: BuildRESTFunction$2<typeof publishDraftPost$1>;
8147
+ declare const onDraftCreated: BuildEventDefinition$2<typeof onDraftCreated$1>;
8148
+ declare const onDraftUpdated: BuildEventDefinition$2<typeof onDraftUpdated$1>;
8149
+ declare const onDraftDeleted: BuildEventDefinition$2<typeof onDraftDeleted$1>;
8099
8150
 
8100
8151
  declare const context$2_bulkCreateDraftPosts: typeof bulkCreateDraftPosts;
8101
8152
  declare const context$2_bulkDeleteDraftPosts: typeof bulkDeleteDraftPosts;
@@ -11763,31 +11814,74 @@ interface GetTotalPostsOptions {
11763
11814
  language?: string | null;
11764
11815
  }
11765
11816
 
11766
- declare function getPost$1(httpClient: HttpClient): (postId: string, options?: GetPostOptions) => Promise<GetPostResponse & GetPostResponseNonNullableFields>;
11767
- declare function getPostBySlug$1(httpClient: HttpClient): (slug: string, options?: GetPostBySlugOptions) => Promise<GetPostBySlugResponse & GetPostBySlugResponseNonNullableFields>;
11768
- declare function listPosts$1(httpClient: HttpClient): (options?: ListPostsOptions) => Promise<ListPostsResponse & ListPostsResponseNonNullableFields>;
11769
- declare function queryPosts$1(httpClient: HttpClient): (options?: QueryPostsOptions) => PostsQueryBuilder;
11770
- declare function getPostMetrics$1(httpClient: HttpClient): (postId: string) => Promise<GetPostMetricsResponse & GetPostMetricsResponseNonNullableFields>;
11771
- declare function queryPostCountStats$1(httpClient: HttpClient): (options?: QueryPostCountStatsOptions) => Promise<QueryPostCountStatsResponse & QueryPostCountStatsResponseNonNullableFields>;
11772
- declare function getTotalPosts$1(httpClient: HttpClient): (options?: GetTotalPostsOptions) => Promise<GetTotalPostsResponse & GetTotalPostsResponseNonNullableFields>;
11773
- declare const onPostCreated$1: EventDefinition<PostCreatedEnvelope, "wix.blog.v3.post_created">;
11774
- declare const onPostUpdated$1: EventDefinition<PostUpdatedEnvelope, "wix.blog.v3.post_updated">;
11775
- declare const onPostDeleted$1: EventDefinition<PostDeletedEnvelope, "wix.blog.v3.post_deleted">;
11776
- declare const onPostLiked$1: EventDefinition<PostLikedEnvelope, "wix.blog.v3.post_liked">;
11777
- declare const onPostUnliked$1: EventDefinition<PostUnlikedEnvelope, "wix.blog.v3.post_unliked">;
11817
+ type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
11818
+ interface HttpClient$1 {
11819
+ request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
11820
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
11821
+ }
11822
+ type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
11823
+ type HttpResponse$1<T = any> = {
11824
+ data: T;
11825
+ status: number;
11826
+ statusText: string;
11827
+ headers: any;
11828
+ request?: any;
11829
+ };
11830
+ type RequestOptions$1<_TResponse = any, Data = any> = {
11831
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
11832
+ url: string;
11833
+ data?: Data;
11834
+ params?: URLSearchParams;
11835
+ } & APIMetadata$1;
11836
+ type APIMetadata$1 = {
11837
+ methodFqn?: string;
11838
+ entityFqdn?: string;
11839
+ packageName?: string;
11840
+ };
11841
+ type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
11842
+ type EventDefinition$1<Payload = unknown, Type extends string = string> = {
11843
+ __type: 'event-definition';
11844
+ type: Type;
11845
+ isDomainEvent?: boolean;
11846
+ transformations?: (envelope: unknown) => Payload;
11847
+ __payload: Payload;
11848
+ };
11849
+ declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
11850
+ type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
11851
+ type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
11852
+
11853
+ declare global {
11854
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
11855
+ interface SymbolConstructor {
11856
+ readonly observable: symbol;
11857
+ }
11858
+ }
11859
+
11860
+ declare function getPost$1(httpClient: HttpClient$1): (postId: string, options?: GetPostOptions) => Promise<GetPostResponse & GetPostResponseNonNullableFields>;
11861
+ declare function getPostBySlug$1(httpClient: HttpClient$1): (slug: string, options?: GetPostBySlugOptions) => Promise<GetPostBySlugResponse & GetPostBySlugResponseNonNullableFields>;
11862
+ declare function listPosts$1(httpClient: HttpClient$1): (options?: ListPostsOptions) => Promise<ListPostsResponse & ListPostsResponseNonNullableFields>;
11863
+ declare function queryPosts$1(httpClient: HttpClient$1): (options?: QueryPostsOptions) => PostsQueryBuilder;
11864
+ declare function getPostMetrics$1(httpClient: HttpClient$1): (postId: string) => Promise<GetPostMetricsResponse & GetPostMetricsResponseNonNullableFields>;
11865
+ declare function queryPostCountStats$1(httpClient: HttpClient$1): (options?: QueryPostCountStatsOptions) => Promise<QueryPostCountStatsResponse & QueryPostCountStatsResponseNonNullableFields>;
11866
+ declare function getTotalPosts$1(httpClient: HttpClient$1): (options?: GetTotalPostsOptions) => Promise<GetTotalPostsResponse & GetTotalPostsResponseNonNullableFields>;
11867
+ declare const onPostCreated$1: EventDefinition$1<PostCreatedEnvelope, "wix.blog.v3.post_created">;
11868
+ declare const onPostUpdated$1: EventDefinition$1<PostUpdatedEnvelope, "wix.blog.v3.post_updated">;
11869
+ declare const onPostDeleted$1: EventDefinition$1<PostDeletedEnvelope, "wix.blog.v3.post_deleted">;
11870
+ declare const onPostLiked$1: EventDefinition$1<PostLikedEnvelope, "wix.blog.v3.post_liked">;
11871
+ declare const onPostUnliked$1: EventDefinition$1<PostUnlikedEnvelope, "wix.blog.v3.post_unliked">;
11778
11872
 
11779
- declare const getPost: BuildRESTFunction<typeof getPost$1>;
11780
- declare const getPostBySlug: BuildRESTFunction<typeof getPostBySlug$1>;
11781
- declare const listPosts: BuildRESTFunction<typeof listPosts$1>;
11782
- declare const queryPosts: BuildRESTFunction<typeof queryPosts$1>;
11783
- declare const getPostMetrics: BuildRESTFunction<typeof getPostMetrics$1>;
11784
- declare const queryPostCountStats: BuildRESTFunction<typeof queryPostCountStats$1>;
11785
- declare const getTotalPosts: BuildRESTFunction<typeof getTotalPosts$1>;
11786
- declare const onPostCreated: BuildEventDefinition<typeof onPostCreated$1>;
11787
- declare const onPostUpdated: BuildEventDefinition<typeof onPostUpdated$1>;
11788
- declare const onPostDeleted: BuildEventDefinition<typeof onPostDeleted$1>;
11789
- declare const onPostLiked: BuildEventDefinition<typeof onPostLiked$1>;
11790
- declare const onPostUnliked: BuildEventDefinition<typeof onPostUnliked$1>;
11873
+ declare const getPost: BuildRESTFunction$1<typeof getPost$1>;
11874
+ declare const getPostBySlug: BuildRESTFunction$1<typeof getPostBySlug$1>;
11875
+ declare const listPosts: BuildRESTFunction$1<typeof listPosts$1>;
11876
+ declare const queryPosts: BuildRESTFunction$1<typeof queryPosts$1>;
11877
+ declare const getPostMetrics: BuildRESTFunction$1<typeof getPostMetrics$1>;
11878
+ declare const queryPostCountStats: BuildRESTFunction$1<typeof queryPostCountStats$1>;
11879
+ declare const getTotalPosts: BuildRESTFunction$1<typeof getTotalPosts$1>;
11880
+ declare const onPostCreated: BuildEventDefinition$1<typeof onPostCreated$1>;
11881
+ declare const onPostUpdated: BuildEventDefinition$1<typeof onPostUpdated$1>;
11882
+ declare const onPostDeleted: BuildEventDefinition$1<typeof onPostDeleted$1>;
11883
+ declare const onPostLiked: BuildEventDefinition$1<typeof onPostLiked$1>;
11884
+ declare const onPostUnliked: BuildEventDefinition$1<typeof onPostUnliked$1>;
11791
11885
 
11792
11886
  declare const context$1_getPost: typeof getPost;
11793
11887
  declare const context$1_getPostBySlug: typeof getPostBySlug;
@@ -12192,6 +12286,49 @@ interface TagsQueryBuilder {
12192
12286
  find: () => Promise<TagsQueryResult>;
12193
12287
  }
12194
12288
 
12289
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
12290
+ interface HttpClient {
12291
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
12292
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
12293
+ }
12294
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
12295
+ type HttpResponse<T = any> = {
12296
+ data: T;
12297
+ status: number;
12298
+ statusText: string;
12299
+ headers: any;
12300
+ request?: any;
12301
+ };
12302
+ type RequestOptions<_TResponse = any, Data = any> = {
12303
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
12304
+ url: string;
12305
+ data?: Data;
12306
+ params?: URLSearchParams;
12307
+ } & APIMetadata;
12308
+ type APIMetadata = {
12309
+ methodFqn?: string;
12310
+ entityFqdn?: string;
12311
+ packageName?: string;
12312
+ };
12313
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
12314
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
12315
+ __type: 'event-definition';
12316
+ type: Type;
12317
+ isDomainEvent?: boolean;
12318
+ transformations?: (envelope: unknown) => Payload;
12319
+ __payload: Payload;
12320
+ };
12321
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
12322
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
12323
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
12324
+
12325
+ declare global {
12326
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
12327
+ interface SymbolConstructor {
12328
+ readonly observable: symbol;
12329
+ }
12330
+ }
12331
+
12195
12332
  declare function createTag$1(httpClient: HttpClient): (label: string, options?: CreateTagOptions) => Promise<CreateTagResponse & CreateTagResponseNonNullableFields>;
12196
12333
  declare function getTagByLabel$1(httpClient: HttpClient): (label: string, options?: GetTagByLabelOptions) => Promise<GetTagByLabelResponse & GetTagByLabelResponseNonNullableFields>;
12197
12334
  declare function getTag$1(httpClient: HttpClient): (tagId: string, options?: GetTagOptions) => Promise<BlogTag & {
@@ -1057,47 +1057,55 @@ interface CategoriesQueryBuilder {
1057
1057
  find: () => Promise<CategoriesQueryResult>;
1058
1058
  }
1059
1059
 
1060
- interface HttpClient {
1061
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
1060
+ interface HttpClient$3 {
1061
+ request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
1062
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
1062
1063
  }
1063
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
1064
- type HttpResponse<T = any> = {
1064
+ type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
1065
+ type HttpResponse$3<T = any> = {
1065
1066
  data: T;
1066
1067
  status: number;
1067
1068
  statusText: string;
1068
1069
  headers: any;
1069
1070
  request?: any;
1070
1071
  };
1071
- type RequestOptions<_TResponse = any, Data = any> = {
1072
+ type RequestOptions$3<_TResponse = any, Data = any> = {
1072
1073
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1073
1074
  url: string;
1074
1075
  data?: Data;
1075
1076
  params?: URLSearchParams;
1076
- } & APIMetadata;
1077
- type APIMetadata = {
1077
+ } & APIMetadata$3;
1078
+ type APIMetadata$3 = {
1078
1079
  methodFqn?: string;
1079
1080
  entityFqdn?: string;
1080
1081
  packageName?: string;
1081
1082
  };
1082
- type EventDefinition<Payload = unknown, Type extends string = string> = {
1083
+ type EventDefinition$3<Payload = unknown, Type extends string = string> = {
1083
1084
  __type: 'event-definition';
1084
1085
  type: Type;
1085
1086
  isDomainEvent?: boolean;
1086
- transformations?: unknown;
1087
+ transformations?: (envelope: unknown) => Payload;
1087
1088
  __payload: Payload;
1088
1089
  };
1089
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
1090
+ declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
1091
+
1092
+ declare global {
1093
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
1094
+ interface SymbolConstructor {
1095
+ readonly observable: symbol;
1096
+ }
1097
+ }
1090
1098
 
1091
1099
  declare const __metadata$3: {
1092
1100
  PACKAGE_NAME: string;
1093
1101
  };
1094
- declare function getCategory(httpClient: HttpClient): (categoryId: string, options?: GetCategoryOptions) => Promise<GetCategoryResponse & GetCategoryResponseNonNullableFields>;
1095
- declare function getCategoryBySlug(httpClient: HttpClient): (slug: string, options?: GetCategoryBySlugOptions) => Promise<GetCategoryBySlugResponse & GetCategoryBySlugResponseNonNullableFields>;
1096
- declare function listCategories(httpClient: HttpClient): (options?: ListCategoriesOptions) => Promise<ListCategoriesResponse & ListCategoriesResponseNonNullableFields>;
1097
- declare function queryCategories(httpClient: HttpClient): (options?: QueryCategoriesOptions) => CategoriesQueryBuilder;
1098
- declare const onCategoryCreated: EventDefinition<CategoryCreatedEnvelope, "wix.blog.v3.category_created">;
1099
- declare const onCategoryUpdated: EventDefinition<CategoryUpdatedEnvelope, "wix.blog.v3.category_updated">;
1100
- declare const onCategoryDeleted: EventDefinition<CategoryDeletedEnvelope, "wix.blog.v3.category_deleted">;
1102
+ declare function getCategory(httpClient: HttpClient$3): (categoryId: string, options?: GetCategoryOptions) => Promise<GetCategoryResponse & GetCategoryResponseNonNullableFields>;
1103
+ declare function getCategoryBySlug(httpClient: HttpClient$3): (slug: string, options?: GetCategoryBySlugOptions) => Promise<GetCategoryBySlugResponse & GetCategoryBySlugResponseNonNullableFields>;
1104
+ declare function listCategories(httpClient: HttpClient$3): (options?: ListCategoriesOptions) => Promise<ListCategoriesResponse & ListCategoriesResponseNonNullableFields>;
1105
+ declare function queryCategories(httpClient: HttpClient$3): (options?: QueryCategoriesOptions) => CategoriesQueryBuilder;
1106
+ declare const onCategoryCreated: EventDefinition$3<CategoryCreatedEnvelope, "wix.blog.v3.category_created">;
1107
+ declare const onCategoryUpdated: EventDefinition$3<CategoryUpdatedEnvelope, "wix.blog.v3.category_updated">;
1108
+ declare const onCategoryDeleted: EventDefinition$3<CategoryDeletedEnvelope, "wix.blog.v3.category_deleted">;
1101
1109
 
1102
1110
  type index_d$3_BulkCategoryResult = BulkCategoryResult;
1103
1111
  type index_d$3_BulkCreateCategoriesRequest = BulkCreateCategoriesRequest;
@@ -9887,26 +9895,65 @@ interface DraftPostsQueryBuilder {
9887
9895
  find: () => Promise<DraftPostsQueryResult>;
9888
9896
  }
9889
9897
 
9898
+ interface HttpClient$2 {
9899
+ request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
9900
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
9901
+ }
9902
+ type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
9903
+ type HttpResponse$2<T = any> = {
9904
+ data: T;
9905
+ status: number;
9906
+ statusText: string;
9907
+ headers: any;
9908
+ request?: any;
9909
+ };
9910
+ type RequestOptions$2<_TResponse = any, Data = any> = {
9911
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
9912
+ url: string;
9913
+ data?: Data;
9914
+ params?: URLSearchParams;
9915
+ } & APIMetadata$2;
9916
+ type APIMetadata$2 = {
9917
+ methodFqn?: string;
9918
+ entityFqdn?: string;
9919
+ packageName?: string;
9920
+ };
9921
+ type EventDefinition$2<Payload = unknown, Type extends string = string> = {
9922
+ __type: 'event-definition';
9923
+ type: Type;
9924
+ isDomainEvent?: boolean;
9925
+ transformations?: (envelope: unknown) => Payload;
9926
+ __payload: Payload;
9927
+ };
9928
+ declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
9929
+
9930
+ declare global {
9931
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
9932
+ interface SymbolConstructor {
9933
+ readonly observable: symbol;
9934
+ }
9935
+ }
9936
+
9890
9937
  declare const __metadata$2: {
9891
9938
  PACKAGE_NAME: string;
9892
9939
  };
9893
- declare function createDraftPost(httpClient: HttpClient): (draftPost: DraftPost$1, options?: CreateDraftPostOptions) => Promise<CreateDraftPostResponse & CreateDraftPostResponseNonNullableFields>;
9894
- declare function bulkCreateDraftPosts(httpClient: HttpClient): (draftPosts: DraftPost$1[], options?: BulkCreateDraftPostsOptions) => Promise<BulkCreateDraftPostsResponse & BulkCreateDraftPostsResponseNonNullableFields>;
9895
- declare function bulkUpdateDraftPosts(httpClient: HttpClient): (options?: BulkUpdateDraftPostsOptions) => Promise<BulkUpdateDraftPostsResponse & BulkUpdateDraftPostsResponseNonNullableFields>;
9896
- declare function listDeletedDraftPosts(httpClient: HttpClient): (options?: ListDeletedDraftPostsOptions) => Promise<ListDeletedDraftPostsResponse & ListDeletedDraftPostsResponseNonNullableFields>;
9897
- declare function getDraftPost(httpClient: HttpClient): (draftPostId: string, options?: GetDraftPostOptions) => Promise<GetDraftPostResponse & GetDraftPostResponseNonNullableFields>;
9898
- declare function updateDraftPost(httpClient: HttpClient): (_id: string, draftPost: UpdateDraftPost, options?: UpdateDraftPostOptions) => Promise<UpdateDraftPostResponse & UpdateDraftPostResponseNonNullableFields>;
9899
- declare function deleteDraftPost(httpClient: HttpClient): (draftPostId: string, options?: DeleteDraftPostOptions) => Promise<void>;
9900
- declare function removeFromTrashBin(httpClient: HttpClient): (draftPostId: string) => Promise<void>;
9901
- declare function bulkDeleteDraftPosts(httpClient: HttpClient): (postIds: string[], options?: BulkDeleteDraftPostsOptions) => Promise<BulkDeleteDraftPostsResponse & BulkDeleteDraftPostsResponseNonNullableFields>;
9902
- declare function listDraftPosts(httpClient: HttpClient): (options?: ListDraftPostsOptions) => Promise<ListDraftPostsResponse & ListDraftPostsResponseNonNullableFields>;
9903
- declare function getDeletedDraftPost(httpClient: HttpClient): (draftPostId: string) => Promise<GetDeletedDraftPostResponse & GetDeletedDraftPostResponseNonNullableFields>;
9904
- declare function restoreFromTrashBin(httpClient: HttpClient): (draftPostId: string) => Promise<RestoreFromTrashBinResponse & RestoreFromTrashBinResponseNonNullableFields>;
9905
- declare function queryDraftPosts(httpClient: HttpClient): (options?: QueryDraftPostsOptions) => DraftPostsQueryBuilder;
9906
- declare function publishDraftPost(httpClient: HttpClient): (draftPostId: string) => Promise<PublishDraftPostResponse & PublishDraftPostResponseNonNullableFields>;
9907
- declare const onDraftCreated: EventDefinition<DraftCreatedEnvelope, "wix.blog.v3.draft_created">;
9908
- declare const onDraftUpdated: EventDefinition<DraftUpdatedEnvelope, "wix.blog.v3.draft_updated">;
9909
- declare const onDraftDeleted: EventDefinition<DraftDeletedEnvelope, "wix.blog.v3.draft_deleted">;
9940
+ declare function createDraftPost(httpClient: HttpClient$2): (draftPost: DraftPost$1, options?: CreateDraftPostOptions) => Promise<CreateDraftPostResponse & CreateDraftPostResponseNonNullableFields>;
9941
+ declare function bulkCreateDraftPosts(httpClient: HttpClient$2): (draftPosts: DraftPost$1[], options?: BulkCreateDraftPostsOptions) => Promise<BulkCreateDraftPostsResponse & BulkCreateDraftPostsResponseNonNullableFields>;
9942
+ declare function bulkUpdateDraftPosts(httpClient: HttpClient$2): (options?: BulkUpdateDraftPostsOptions) => Promise<BulkUpdateDraftPostsResponse & BulkUpdateDraftPostsResponseNonNullableFields>;
9943
+ declare function listDeletedDraftPosts(httpClient: HttpClient$2): (options?: ListDeletedDraftPostsOptions) => Promise<ListDeletedDraftPostsResponse & ListDeletedDraftPostsResponseNonNullableFields>;
9944
+ declare function getDraftPost(httpClient: HttpClient$2): (draftPostId: string, options?: GetDraftPostOptions) => Promise<GetDraftPostResponse & GetDraftPostResponseNonNullableFields>;
9945
+ declare function updateDraftPost(httpClient: HttpClient$2): (_id: string, draftPost: UpdateDraftPost, options?: UpdateDraftPostOptions) => Promise<UpdateDraftPostResponse & UpdateDraftPostResponseNonNullableFields>;
9946
+ declare function deleteDraftPost(httpClient: HttpClient$2): (draftPostId: string, options?: DeleteDraftPostOptions) => Promise<void>;
9947
+ declare function removeFromTrashBin(httpClient: HttpClient$2): (draftPostId: string) => Promise<void>;
9948
+ declare function bulkDeleteDraftPosts(httpClient: HttpClient$2): (postIds: string[], options?: BulkDeleteDraftPostsOptions) => Promise<BulkDeleteDraftPostsResponse & BulkDeleteDraftPostsResponseNonNullableFields>;
9949
+ declare function listDraftPosts(httpClient: HttpClient$2): (options?: ListDraftPostsOptions) => Promise<ListDraftPostsResponse & ListDraftPostsResponseNonNullableFields>;
9950
+ declare function getDeletedDraftPost(httpClient: HttpClient$2): (draftPostId: string) => Promise<GetDeletedDraftPostResponse & GetDeletedDraftPostResponseNonNullableFields>;
9951
+ declare function restoreFromTrashBin(httpClient: HttpClient$2): (draftPostId: string) => Promise<RestoreFromTrashBinResponse & RestoreFromTrashBinResponseNonNullableFields>;
9952
+ declare function queryDraftPosts(httpClient: HttpClient$2): (options?: QueryDraftPostsOptions) => DraftPostsQueryBuilder;
9953
+ declare function publishDraftPost(httpClient: HttpClient$2): (draftPostId: string) => Promise<PublishDraftPostResponse & PublishDraftPostResponseNonNullableFields>;
9954
+ declare const onDraftCreated: EventDefinition$2<DraftCreatedEnvelope, "wix.blog.v3.draft_created">;
9955
+ declare const onDraftUpdated: EventDefinition$2<DraftUpdatedEnvelope, "wix.blog.v3.draft_updated">;
9956
+ declare const onDraftDeleted: EventDefinition$2<DraftDeletedEnvelope, "wix.blog.v3.draft_deleted">;
9910
9957
 
9911
9958
  type index_d$2_Action = Action;
9912
9959
  declare const index_d$2_Action: typeof Action;
@@ -15316,21 +15363,60 @@ interface GetTotalPostsOptions {
15316
15363
  language?: string | null;
15317
15364
  }
15318
15365
 
15366
+ interface HttpClient$1 {
15367
+ request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
15368
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
15369
+ }
15370
+ type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
15371
+ type HttpResponse$1<T = any> = {
15372
+ data: T;
15373
+ status: number;
15374
+ statusText: string;
15375
+ headers: any;
15376
+ request?: any;
15377
+ };
15378
+ type RequestOptions$1<_TResponse = any, Data = any> = {
15379
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
15380
+ url: string;
15381
+ data?: Data;
15382
+ params?: URLSearchParams;
15383
+ } & APIMetadata$1;
15384
+ type APIMetadata$1 = {
15385
+ methodFqn?: string;
15386
+ entityFqdn?: string;
15387
+ packageName?: string;
15388
+ };
15389
+ type EventDefinition$1<Payload = unknown, Type extends string = string> = {
15390
+ __type: 'event-definition';
15391
+ type: Type;
15392
+ isDomainEvent?: boolean;
15393
+ transformations?: (envelope: unknown) => Payload;
15394
+ __payload: Payload;
15395
+ };
15396
+ declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
15397
+
15398
+ declare global {
15399
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
15400
+ interface SymbolConstructor {
15401
+ readonly observable: symbol;
15402
+ }
15403
+ }
15404
+
15319
15405
  declare const __metadata$1: {
15320
15406
  PACKAGE_NAME: string;
15321
15407
  };
15322
- declare function getPost(httpClient: HttpClient): (postId: string, options?: GetPostOptions) => Promise<GetPostResponse & GetPostResponseNonNullableFields>;
15323
- declare function getPostBySlug(httpClient: HttpClient): (slug: string, options?: GetPostBySlugOptions) => Promise<GetPostBySlugResponse & GetPostBySlugResponseNonNullableFields>;
15324
- declare function listPosts(httpClient: HttpClient): (options?: ListPostsOptions) => Promise<ListPostsResponse & ListPostsResponseNonNullableFields>;
15325
- declare function queryPosts(httpClient: HttpClient): (options?: QueryPostsOptions) => PostsQueryBuilder;
15326
- declare function getPostMetrics(httpClient: HttpClient): (postId: string) => Promise<GetPostMetricsResponse & GetPostMetricsResponseNonNullableFields>;
15327
- declare function queryPostCountStats(httpClient: HttpClient): (options?: QueryPostCountStatsOptions) => Promise<QueryPostCountStatsResponse & QueryPostCountStatsResponseNonNullableFields>;
15328
- declare function getTotalPosts(httpClient: HttpClient): (options?: GetTotalPostsOptions) => Promise<GetTotalPostsResponse & GetTotalPostsResponseNonNullableFields>;
15329
- declare const onPostCreated: EventDefinition<PostCreatedEnvelope, "wix.blog.v3.post_created">;
15330
- declare const onPostUpdated: EventDefinition<PostUpdatedEnvelope, "wix.blog.v3.post_updated">;
15331
- declare const onPostDeleted: EventDefinition<PostDeletedEnvelope, "wix.blog.v3.post_deleted">;
15332
- declare const onPostLiked: EventDefinition<PostLikedEnvelope, "wix.blog.v3.post_liked">;
15333
- declare const onPostUnliked: EventDefinition<PostUnlikedEnvelope, "wix.blog.v3.post_unliked">;
15408
+ declare function getPost(httpClient: HttpClient$1): (postId: string, options?: GetPostOptions) => Promise<GetPostResponse & GetPostResponseNonNullableFields>;
15409
+ declare function getPostBySlug(httpClient: HttpClient$1): (slug: string, options?: GetPostBySlugOptions) => Promise<GetPostBySlugResponse & GetPostBySlugResponseNonNullableFields>;
15410
+ declare function listPosts(httpClient: HttpClient$1): (options?: ListPostsOptions) => Promise<ListPostsResponse & ListPostsResponseNonNullableFields>;
15411
+ declare function queryPosts(httpClient: HttpClient$1): (options?: QueryPostsOptions) => PostsQueryBuilder;
15412
+ declare function getPostMetrics(httpClient: HttpClient$1): (postId: string) => Promise<GetPostMetricsResponse & GetPostMetricsResponseNonNullableFields>;
15413
+ declare function queryPostCountStats(httpClient: HttpClient$1): (options?: QueryPostCountStatsOptions) => Promise<QueryPostCountStatsResponse & QueryPostCountStatsResponseNonNullableFields>;
15414
+ declare function getTotalPosts(httpClient: HttpClient$1): (options?: GetTotalPostsOptions) => Promise<GetTotalPostsResponse & GetTotalPostsResponseNonNullableFields>;
15415
+ declare const onPostCreated: EventDefinition$1<PostCreatedEnvelope, "wix.blog.v3.post_created">;
15416
+ declare const onPostUpdated: EventDefinition$1<PostUpdatedEnvelope, "wix.blog.v3.post_updated">;
15417
+ declare const onPostDeleted: EventDefinition$1<PostDeletedEnvelope, "wix.blog.v3.post_deleted">;
15418
+ declare const onPostLiked: EventDefinition$1<PostLikedEnvelope, "wix.blog.v3.post_liked">;
15419
+ declare const onPostUnliked: EventDefinition$1<PostUnlikedEnvelope, "wix.blog.v3.post_unliked">;
15334
15420
 
15335
15421
  type index_d$1_Alignment = Alignment;
15336
15422
  declare const index_d$1_Alignment: typeof Alignment;
@@ -16537,6 +16623,45 @@ interface TagsQueryBuilder {
16537
16623
  find: () => Promise<TagsQueryResult>;
16538
16624
  }
16539
16625
 
16626
+ interface HttpClient {
16627
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
16628
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
16629
+ }
16630
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
16631
+ type HttpResponse<T = any> = {
16632
+ data: T;
16633
+ status: number;
16634
+ statusText: string;
16635
+ headers: any;
16636
+ request?: any;
16637
+ };
16638
+ type RequestOptions<_TResponse = any, Data = any> = {
16639
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
16640
+ url: string;
16641
+ data?: Data;
16642
+ params?: URLSearchParams;
16643
+ } & APIMetadata;
16644
+ type APIMetadata = {
16645
+ methodFqn?: string;
16646
+ entityFqdn?: string;
16647
+ packageName?: string;
16648
+ };
16649
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
16650
+ __type: 'event-definition';
16651
+ type: Type;
16652
+ isDomainEvent?: boolean;
16653
+ transformations?: (envelope: unknown) => Payload;
16654
+ __payload: Payload;
16655
+ };
16656
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
16657
+
16658
+ declare global {
16659
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
16660
+ interface SymbolConstructor {
16661
+ readonly observable: symbol;
16662
+ }
16663
+ }
16664
+
16540
16665
  declare const __metadata: {
16541
16666
  PACKAGE_NAME: string;
16542
16667
  };