@wix/auto_sdk_blog_likes 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +21 -5
- package/build/cjs/index.js +66 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +37 -5
- package/build/cjs/index.typings.js +58 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +8 -4
- package/build/cjs/meta.js +47 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +21 -5
- package/build/es/index.mjs +65 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +37 -5
- package/build/es/index.typings.mjs +57 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +8 -4
- package/build/es/meta.mjs +46 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +21 -5
- package/build/internal/cjs/index.js +66 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +37 -5
- package/build/internal/cjs/index.typings.js +58 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +8 -4
- package/build/internal/cjs/meta.js +47 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +21 -5
- package/build/internal/es/index.mjs +65 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +37 -5
- package/build/internal/es/index.typings.mjs +57 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +8 -4
- package/build/internal/es/meta.mjs +46 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { CreateLikeOptions, Like, DeleteLikeByFqdnAndEntityIdIdentifiers, LikeCreatedEnvelope, LikeDeletedEnvelope, LikesQueryBuilder, LikeQuery, typedQueryLikes } from './index.typings.js';
|
|
3
|
-
export { ActionEvent, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkCreateLikesMigrationRequest, BulkCreateLikesMigrationResponse, CommonQueryWithEntityContext, CountLikesMigrationRequest, CountLikesMigrationResponse, CountLikesRequest, CountLikesResponse, CreateLikeRequest, CreateLikeResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteLikeByFqdnAndEntityIdRequest, DeleteLikeByFqdnAndEntityIdResponse, DeleteLikeRequest, DeleteLikeResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, GetLikeByFqdnAndEntityIdRequest,
|
|
2
|
+
import { CreateLikeOptions, Like, GetLikeByFqdnAndEntityIdIdentifiers, GetLikeByFqdnAndEntityIdResponse, DeleteLikeByFqdnAndEntityIdIdentifiers, LikeCreatedEnvelope, LikeDeletedEnvelope, LikesQueryBuilder, LikeQuery, typedQueryLikes } from './index.typings.js';
|
|
3
|
+
export { ActionEvent, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkCreateLikesMigrationRequest, BulkCreateLikesMigrationResponse, CommonQueryWithEntityContext, CountLikesMigrationRequest, CountLikesMigrationResponse, CountLikesRequest, CountLikesResponse, CreateLikeRequest, CreateLikeResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteLikeByFqdnAndEntityIdRequest, DeleteLikeByFqdnAndEntityIdResponse, DeleteLikeRequest, DeleteLikeResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, GetLikeByFqdnAndEntityIdRequest, GetLikeRequest, GetLikeResponse, IdentificationData, IdentificationDataIdOneOf, ItemMetadata, LikeQuerySpec, LikesQueryResult, MessageEnvelope, MigrationLike, QueryLikesMigrationRequest, QueryLikesMigrationResponse, QueryLikesRequest, QueryLikesResponse, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function createLike$1(httpClient: HttpClient): CreateLikeSignature;
|
|
6
6
|
interface CreateLikeSignature {
|
|
@@ -16,16 +16,31 @@ interface CreateLikeSignature {
|
|
|
16
16
|
declare function getLike$1(httpClient: HttpClient): GetLikeSignature;
|
|
17
17
|
interface GetLikeSignature {
|
|
18
18
|
/**
|
|
19
|
-
* Retrieves a like.
|
|
19
|
+
* Retrieves a like created by the currently authenticated site visitor or member.
|
|
20
|
+
*
|
|
21
|
+
* >**Note:**
|
|
22
|
+
* >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).
|
|
20
23
|
* @param - Like ID.
|
|
21
24
|
* @returns Retrieved like.
|
|
22
25
|
*/
|
|
23
26
|
(likeId: string): Promise<Like>;
|
|
24
27
|
}
|
|
28
|
+
declare function getLikeByFqdnAndEntityId$1(httpClient: HttpClient): GetLikeByFqdnAndEntityIdSignature;
|
|
29
|
+
interface GetLikeByFqdnAndEntityIdSignature {
|
|
30
|
+
/**
|
|
31
|
+
* Retrieves a like by blog content FQDN and entity ID.
|
|
32
|
+
*
|
|
33
|
+
* This is a convenience method for when you don't have the like ID.
|
|
34
|
+
*/
|
|
35
|
+
(identifiers: NonNullablePaths<GetLikeByFqdnAndEntityIdIdentifiers, `entityId` | `fqdn`, 2>): Promise<GetLikeByFqdnAndEntityIdResponse>;
|
|
36
|
+
}
|
|
25
37
|
declare function deleteLike$1(httpClient: HttpClient): DeleteLikeSignature;
|
|
26
38
|
interface DeleteLikeSignature {
|
|
27
39
|
/**
|
|
28
|
-
* Deletes a like.
|
|
40
|
+
* Deletes a like created by the currently authenticated site visitor or member.
|
|
41
|
+
*
|
|
42
|
+
* >**Note:**
|
|
43
|
+
* >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).
|
|
29
44
|
* @param - ID of the like to delete.
|
|
30
45
|
*/
|
|
31
46
|
(likeId: string): Promise<void>;
|
|
@@ -49,6 +64,7 @@ declare function customQueryLikes(httpClient: HttpClient): {
|
|
|
49
64
|
};
|
|
50
65
|
declare const createLike: MaybeContext<BuildRESTFunction<typeof createLike$1> & typeof createLike$1>;
|
|
51
66
|
declare const getLike: MaybeContext<BuildRESTFunction<typeof getLike$1> & typeof getLike$1>;
|
|
67
|
+
declare const getLikeByFqdnAndEntityId: MaybeContext<BuildRESTFunction<typeof getLikeByFqdnAndEntityId$1> & typeof getLikeByFqdnAndEntityId$1>;
|
|
52
68
|
declare const deleteLike: MaybeContext<BuildRESTFunction<typeof deleteLike$1> & typeof deleteLike$1>;
|
|
53
69
|
declare const deleteLikeByFqdnAndEntityId: MaybeContext<BuildRESTFunction<typeof deleteLikeByFqdnAndEntityId$1> & typeof deleteLikeByFqdnAndEntityId$1>;
|
|
54
70
|
declare const queryLikes: MaybeContext<BuildRESTFunction<typeof customQueryLikes> & typeof customQueryLikes>;
|
|
@@ -61,4 +77,4 @@ declare const onLikeCreated: BuildEventDefinition<typeof onLikeCreated$1> & type
|
|
|
61
77
|
*/
|
|
62
78
|
declare const onLikeDeleted: BuildEventDefinition<typeof onLikeDeleted$1> & typeof onLikeDeleted$1;
|
|
63
79
|
|
|
64
|
-
export { CreateLikeOptions, DeleteLikeByFqdnAndEntityIdIdentifiers, Like, LikeCreatedEnvelope, LikeDeletedEnvelope, LikeQuery, LikesQueryBuilder, createLike, deleteLike, deleteLikeByFqdnAndEntityId, getLike, onLikeCreated, onLikeDeleted, queryLikes };
|
|
80
|
+
export { CreateLikeOptions, DeleteLikeByFqdnAndEntityIdIdentifiers, GetLikeByFqdnAndEntityIdIdentifiers, GetLikeByFqdnAndEntityIdResponse, Like, LikeCreatedEnvelope, LikeDeletedEnvelope, LikeQuery, LikesQueryBuilder, createLike, deleteLike, deleteLikeByFqdnAndEntityId, getLike, getLikeByFqdnAndEntityId, onLikeCreated, onLikeDeleted, queryLikes };
|
package/build/cjs/index.js
CHANGED
|
@@ -26,6 +26,7 @@ __export(index_exports, {
|
|
|
26
26
|
deleteLike: () => deleteLike4,
|
|
27
27
|
deleteLikeByFqdnAndEntityId: () => deleteLikeByFqdnAndEntityId4,
|
|
28
28
|
getLike: () => getLike4,
|
|
29
|
+
getLikeByFqdnAndEntityId: () => getLikeByFqdnAndEntityId4,
|
|
29
30
|
onLikeCreated: () => onLikeCreated2,
|
|
30
31
|
onLikeDeleted: () => onLikeDeleted2,
|
|
31
32
|
queryLikes: () => queryLikes4
|
|
@@ -157,6 +158,33 @@ function getLike(payload) {
|
|
|
157
158
|
}
|
|
158
159
|
return __getLike;
|
|
159
160
|
}
|
|
161
|
+
function getLikeByFqdnAndEntityId(payload) {
|
|
162
|
+
function __getLikeByFqdnAndEntityId({ host }) {
|
|
163
|
+
const metadata = {
|
|
164
|
+
entityFqdn: "wix.blog.v1.like",
|
|
165
|
+
method: "GET",
|
|
166
|
+
methodFqn: "wix.blog.v1.LikeService.GetLikeByFqdnAndEntityId",
|
|
167
|
+
packageName: PACKAGE_NAME,
|
|
168
|
+
migrationOptions: {
|
|
169
|
+
optInTransformResponse: true
|
|
170
|
+
},
|
|
171
|
+
url: resolveWixBlogV1LikeServiceUrl({
|
|
172
|
+
protoPath: "/v1/likes/fqdn/{fqdn}/entity-id/{entityId}",
|
|
173
|
+
data: payload,
|
|
174
|
+
host
|
|
175
|
+
}),
|
|
176
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
177
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
178
|
+
{
|
|
179
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
180
|
+
paths: [{ path: "like.createdDate" }]
|
|
181
|
+
}
|
|
182
|
+
])
|
|
183
|
+
};
|
|
184
|
+
return metadata;
|
|
185
|
+
}
|
|
186
|
+
return __getLikeByFqdnAndEntityId;
|
|
187
|
+
}
|
|
160
188
|
function queryLikes(payload) {
|
|
161
189
|
function __queryLikes({ host }) {
|
|
162
190
|
const metadata = {
|
|
@@ -290,6 +318,35 @@ async function getLike2(likeId) {
|
|
|
290
318
|
throw transformedError;
|
|
291
319
|
}
|
|
292
320
|
}
|
|
321
|
+
async function getLikeByFqdnAndEntityId2(identifiers) {
|
|
322
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
323
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
324
|
+
fqdn: identifiers?.fqdn,
|
|
325
|
+
entityId: identifiers?.entityId
|
|
326
|
+
});
|
|
327
|
+
const reqOpts = getLikeByFqdnAndEntityId(payload);
|
|
328
|
+
sideEffects?.onSiteCall?.();
|
|
329
|
+
try {
|
|
330
|
+
const result = await httpClient.request(reqOpts);
|
|
331
|
+
sideEffects?.onSuccess?.(result);
|
|
332
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
333
|
+
} catch (err) {
|
|
334
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
335
|
+
err,
|
|
336
|
+
{
|
|
337
|
+
spreadPathsToArguments: {},
|
|
338
|
+
explicitPathsToArguments: {
|
|
339
|
+
fqdn: "$[0].fqdn",
|
|
340
|
+
entityId: "$[0].entityId"
|
|
341
|
+
},
|
|
342
|
+
singleArgumentUnchanged: false
|
|
343
|
+
},
|
|
344
|
+
["identifiers"]
|
|
345
|
+
);
|
|
346
|
+
sideEffects?.onError?.(err);
|
|
347
|
+
throw transformedError;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
293
350
|
function queryLikes2() {
|
|
294
351
|
const { httpClient, sideEffects } = arguments[0];
|
|
295
352
|
return (0, import_query_builder.queryBuilder)({
|
|
@@ -422,6 +479,13 @@ function getLike3(httpClient) {
|
|
|
422
479
|
{ httpClient }
|
|
423
480
|
);
|
|
424
481
|
}
|
|
482
|
+
function getLikeByFqdnAndEntityId3(httpClient) {
|
|
483
|
+
return (identifiers) => getLikeByFqdnAndEntityId2(
|
|
484
|
+
identifiers,
|
|
485
|
+
// @ts-ignore
|
|
486
|
+
{ httpClient }
|
|
487
|
+
);
|
|
488
|
+
}
|
|
425
489
|
function queryLikes3(httpClient) {
|
|
426
490
|
return () => queryLikes2(
|
|
427
491
|
// @ts-ignore
|
|
@@ -497,6 +561,7 @@ function customQueryLikes(httpClient) {
|
|
|
497
561
|
}
|
|
498
562
|
var createLike4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createLike3);
|
|
499
563
|
var getLike4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getLike3);
|
|
564
|
+
var getLikeByFqdnAndEntityId4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getLikeByFqdnAndEntityId3);
|
|
500
565
|
var deleteLike4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteLike3);
|
|
501
566
|
var deleteLikeByFqdnAndEntityId4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteLikeByFqdnAndEntityId3);
|
|
502
567
|
var queryLikes4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryLikes);
|
|
@@ -510,6 +575,7 @@ var onLikeDeleted2 = (0, import_event_definition_modules.createEventModule)(onLi
|
|
|
510
575
|
deleteLike,
|
|
511
576
|
deleteLikeByFqdnAndEntityId,
|
|
512
577
|
getLike,
|
|
578
|
+
getLikeByFqdnAndEntityId,
|
|
513
579
|
onLikeCreated,
|
|
514
580
|
onLikeDeleted,
|
|
515
581
|
queryLikes
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/blog-v1-like-likes.public.ts","../../src/blog-v1-like-likes.universal.ts","../../src/blog-v1-like-likes.http.ts","../../src/blog-v1-like-likes.context.ts"],"sourcesContent":["export * from './src/blog-v1-like-likes.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CreateLikeOptions,\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n Like,\n LikeCreatedEnvelope,\n LikeDeletedEnvelope,\n LikeQuery,\n LikesQueryBuilder,\n QueryLikesResponse,\n createLike as universalCreateLike,\n deleteLike as universalDeleteLike,\n deleteLikeByFqdnAndEntityId as universalDeleteLikeByFqdnAndEntityId,\n getLike as universalGetLike,\n queryLikes as universalQueryLikes,\n typedQueryLikes as universalTypedQueryLikes,\n} from './blog-v1-like-likes.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/blog' };\n\nexport function createLike(httpClient: HttpClient): CreateLikeSignature {\n return (\n options?: NonNullablePaths<\n CreateLikeOptions,\n `like.entityId` | `like.fqdn`,\n 3\n >\n ) =>\n universalCreateLike(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateLikeSignature {\n /**\n * Creates a like for blog content.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n * @returns Created like.\n */\n (\n options?: NonNullablePaths<\n CreateLikeOptions,\n `like.entityId` | `like.fqdn`,\n 3\n >\n ): Promise<Like>;\n}\n\nexport function getLike(httpClient: HttpClient): GetLikeSignature {\n return (likeId: string) =>\n universalGetLike(\n likeId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetLikeSignature {\n /**\n * Retrieves a like.\n * @param - Like ID.\n * @returns Retrieved like.\n */\n (likeId: string): Promise<Like>;\n}\n\nexport function queryLikes(httpClient: HttpClient): QueryLikesSignature {\n return () =>\n universalQueryLikes(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryLikesSignature {\n /**\n * Creates a query to retrieve a list of likes.\n *\n *\n * The `queryLikes()` method builds a query to retrieve a list of likes and returns a [`LikesQueryBuilder`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/eq) object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/find) method.\n *\n * You can refine the query by chaining `LikesQueryBuilder` methods onto the query. `LikesQueryBuilder` methods enable you to sort, filter, and control the results `queryLikes()` returns.\n *\n * `queryLikes()` runs with these `LikesQueryBuilder` defaults, which you can override:\n *\n * - [`skip(0)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/skip-to)\n * - [`limit(50)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/limit)\n */\n (): LikesQueryBuilder;\n}\n\nexport function typedQueryLikes(\n httpClient: HttpClient\n): TypedQueryLikesSignature {\n return (query: LikeQuery) =>\n universalTypedQueryLikes(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryLikesSignature {\n /** */\n (query: LikeQuery): Promise<NonNullablePaths<QueryLikesResponse, `likes`, 2>>;\n}\n\nexport function deleteLike(httpClient: HttpClient): DeleteLikeSignature {\n return (likeId: string) =>\n universalDeleteLike(\n likeId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteLikeSignature {\n /**\n * Deletes a like.\n * @param - ID of the like to delete.\n */\n (likeId: string): Promise<void>;\n}\n\nexport function deleteLikeByFqdnAndEntityId(\n httpClient: HttpClient\n): DeleteLikeByFqdnAndEntityIdSignature {\n return (\n identifiers: NonNullablePaths<\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n `entityId` | `fqdn`,\n 2\n >\n ) =>\n universalDeleteLikeByFqdnAndEntityId(\n identifiers,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteLikeByFqdnAndEntityIdSignature {\n /**\n * Deletes a site visitors' or members' like by blog content FQDN and entity ID.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n */\n (\n identifiers: NonNullablePaths<\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n `entityId` | `fqdn`,\n 2\n >\n ): Promise<void>;\n}\n\nexport const onLikeCreated = EventDefinition(\n 'wix.blog.v1.like_created',\n true,\n (event: LikeCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<LikeCreatedEnvelope>();\nexport const onLikeDeleted = EventDefinition(\n 'wix.blog.v1.like_deleted',\n true,\n (event: LikeDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<LikeDeletedEnvelope>();\n\nexport {\n ActionEvent,\n ApplicationError,\n BaseEventMetadata,\n BulkActionMetadata,\n BulkCreateLikesMigrationRequest,\n BulkCreateLikesMigrationResponse,\n CountLikesMigrationRequest,\n CountLikesMigrationResponse,\n CountLikesRequest,\n CountLikesResponse,\n CreateLikeOptions,\n CreateLikeRequest,\n CreateLikeResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n DeleteLikeByFqdnAndEntityIdRequest,\n DeleteLikeByFqdnAndEntityIdResponse,\n DeleteLikeRequest,\n DeleteLikeResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n GetLikeByFqdnAndEntityIdRequest,\n GetLikeByFqdnAndEntityIdResponse,\n GetLikeRequest,\n GetLikeResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ItemMetadata,\n Like,\n LikeCreatedEnvelope,\n LikeDeletedEnvelope,\n LikeQuerySpec,\n LikesQueryBuilder,\n LikesQueryResult,\n MessageEnvelope,\n MigrationLike,\n QueryLikesMigrationRequest,\n QueryLikesMigrationResponse,\n QueryLikesRequest,\n QueryLikesResponse,\n RestoreInfo,\n SortOrder,\n Sorting,\n WebhookIdentityType,\n} from './blog-v1-like-likes.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixBlogV1Like from './blog-v1-like-likes.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * A like represents a positive reaction to blog content.\n *\n * Likes are associated with specific blog content using their FQDN and entity ID,\n * allowing likes to be created for various types of blog content such as posts or comments.\n */\nexport interface Like {\n /**\n * Like ID.\n * @immutable\n * @format GUID\n */\n _id?: string | null;\n /**\n * Date and time the like was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * ID of the specific blog content being liked, such as a blog post or comment.\n * @format GUID\n */\n entityId?: string | null;\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn?: string | null;\n}\n\nexport interface CreateLikeRequest {\n /** Like to create. */\n like?: Like;\n}\n\nexport interface CreateLikeResponse {\n /** Created like. */\n like?: Like;\n}\n\nexport interface GetLikeRequest {\n /**\n * Like ID.\n * @format GUID\n */\n likeId: string | null;\n}\n\nexport interface GetLikeResponse {\n /** Retrieved like. */\n like?: Like;\n}\n\nexport interface GetLikeByFqdnAndEntityIdRequest {\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn?: string | null;\n /**\n * ID of the liked entity.\n * @format GUID\n */\n entityId?: string | null;\n}\n\nexport interface GetLikeByFqdnAndEntityIdResponse {\n /** Retrieved like. */\n like?: Like;\n}\n\nexport interface QueryLikesRequest {\n /** Query options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more details. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryLikesResponse {\n /** Retrieved likes. */\n likes?: Like[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface CountLikesRequest {\n /**\n * Fully qualified domain name of the liked entity. For example, `wix.blog.v3.post`.\n * @maxLength 256\n */\n fqdn?: string | null;\n /**\n * User identity ID.\n * @format GUID\n */\n identityId?: string | null;\n}\n\nexport interface CountLikesResponse {\n /** Number of likes. */\n count?: number;\n}\n\nexport interface DeleteLikeRequest {\n /**\n * ID of the like to delete.\n * @format GUID\n */\n likeId: string | null;\n}\n\nexport interface DeleteLikeResponse {}\n\nexport interface DeleteLikeByFqdnAndEntityIdRequest {\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn: string | null;\n /**\n * ID of the specific blog content being liked.\n * @format GUID\n */\n entityId: string | null;\n}\n\nexport interface DeleteLikeByFqdnAndEntityIdResponse {}\n\nexport interface BulkCreateLikesMigrationRequest {\n /**\n * Likes to create.\n * @minSize 1\n * @maxSize 50\n */\n likes?: MigrationLike[];\n}\n\n/** Like object used for migration purposes with additional user identity fields. */\nexport interface MigrationLike {\n /** Date and time the like was created. */\n _createdDate?: Date | null;\n /**\n * ID of the liked entity.\n * @format GUID\n */\n entityId?: string | null;\n /**\n * ID of the member who created the like.\n * @format GUID\n */\n memberId?: string | null;\n /**\n * ID of the anonymous user who created the like.\n * @format GUID\n */\n anonymousUserId?: string | null;\n}\n\nexport interface BulkCreateLikesMigrationResponse {\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n /** Metadata for each created like. */\n itemMetadata?: ItemMetadata[];\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface CountLikesMigrationRequest {}\n\nexport interface CountLikesMigrationResponse {\n /** Total number of likes. */\n count?: number;\n}\n\nexport interface QueryLikesMigrationRequest {\n /** Query options. */\n query?: CursorQuery;\n}\n\nexport interface QueryLikesMigrationResponse {\n /** Retrieved likes. */\n likes?: Like[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface LikeCreatedEnvelope {\n entity: Like;\n metadata: EventMetadata;\n}\n\n/**\n * Triggers when a like is created.\n * @permissionScope Read Blog\n * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS\n * @permissionScope Manage Blog\n * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG\n * @permissionScope Read Draft Blog Posts\n * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS\n * @permissionId BLOG.LIKE_READ\n * @webhook\n * @eventType wix.blog.v1.like_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onLikeCreated(\n handler: (event: LikeCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface LikeDeletedEnvelope {\n entity: Like;\n metadata: EventMetadata;\n}\n\n/**\n * Triggers when a like is deleted.\n * @permissionScope Read Blog\n * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS\n * @permissionScope Manage Blog\n * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG\n * @permissionScope Read Draft Blog Posts\n * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS\n * @permissionId BLOG.LIKE_READ\n * @webhook\n * @eventType wix.blog.v1.like_deleted\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onLikeDeleted(\n handler: (event: LikeDeletedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a like for blog content.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n * @public\n * @documentationMaturity preview\n * @requiredField options.like.entityId\n * @requiredField options.like.fqdn\n * @permissionId BLOG.LIKE_CREATE\n * @applicableIdentity APP\n * @returns Created like.\n * @fqn wix.blog.v1.LikeService.CreateLike\n */\nexport async function createLike(\n options?: NonNullablePaths<\n CreateLikeOptions,\n `like.entityId` | `like.fqdn`,\n 3\n >\n): Promise<Like> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n like: options?.like,\n });\n\n const reqOpts = ambassadorWixBlogV1Like.createLike(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.like!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { like: '$[0].like' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateLikeOptions {\n /** Like to create. */\n like?: Like;\n}\n\n/**\n * Retrieves a like.\n * @param likeId - Like ID.\n * @public\n * @documentationMaturity preview\n * @requiredField likeId\n * @permissionId BLOG.LIKE_READ\n * @applicableIdentity APP\n * @returns Retrieved like.\n * @fqn wix.blog.v1.LikeService.GetLike\n */\nexport async function getLike(likeId: string): Promise<Like> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ likeId: likeId });\n\n const reqOpts = ambassadorWixBlogV1Like.getLike(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.like!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { likeId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['likeId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a query to retrieve a list of likes.\n *\n *\n * The `queryLikes()` method builds a query to retrieve a list of likes and returns a [`LikesQueryBuilder`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/eq) object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/find) method.\n *\n * You can refine the query by chaining `LikesQueryBuilder` methods onto the query. `LikesQueryBuilder` methods enable you to sort, filter, and control the results `queryLikes()` returns.\n *\n * `queryLikes()` runs with these `LikesQueryBuilder` defaults, which you can override:\n *\n * - [`skip(0)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/skip-to)\n * - [`limit(50)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/limit)\n * @public\n * @documentationMaturity preview\n * @permissionId BLOG.LIKE_READ\n * @applicableIdentity APP\n * @fqn wix.blog.v1.LikeService.QueryLikes\n */\nexport function queryLikes(): LikesQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<Like, 'CURSOR', QueryLikesRequest, QueryLikesResponse>({\n func: async (payload: QueryLikesRequest) => {\n const reqOpts = ambassadorWixBlogV1Like.queryLikes(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryLikesRequest['query']) => {\n const args = [query, {}] as [QueryLikesRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryLikesResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.likes,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface LikesQueryResult extends QueryCursorResult {\n items: Like[];\n query: LikesQueryBuilder;\n next: () => Promise<LikesQueryResult>;\n prev: () => Promise<LikesQueryResult>;\n}\n\nexport interface LikesQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName: '_id' | 'entityId' | 'fqdn',\n value: any\n ) => LikesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName: '_id' | 'entityId' | 'fqdn',\n value: any\n ) => LikesQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName: '_id' | 'entityId' | 'fqdn',\n value: any\n ) => LikesQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => LikesQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => LikesQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<LikesQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.blog.v1.LikeService.QueryLikes\n * @requiredField query\n */\nexport async function typedQueryLikes(\n query: LikeQuery\n): Promise<NonNullablePaths<QueryLikesResponse, `likes`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts = ambassadorWixBlogV1Like.queryLikes(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface LikeQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['_id'];\n operators: ['$eq', '$in', '$ne'];\n sort: 'NONE';\n },\n {\n fields: ['fqdn'];\n operators: ['$eq', '$in', '$ne'];\n sort: 'NONE';\n },\n {\n fields: ['entityId'];\n operators: ['$eq', '$in', '$ne'];\n sort: 'NONE';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<Like, LikeQuerySpec>;\nexport type LikeQuery = {\n /** \n Cursor paging options.\n\n Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). \n */\n cursorPaging?: {\n /** \n Maximum number of items to return in the results. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n\n Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object.\n\n Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). \n @maxSize: 5 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\n/**\n * Deletes a like.\n * @param likeId - ID of the like to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField likeId\n * @permissionId BLOG.LIKE_DELETE\n * @applicableIdentity APP\n * @fqn wix.blog.v1.LikeService.DeleteLike\n */\nexport async function deleteLike(likeId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ likeId: likeId });\n\n const reqOpts = ambassadorWixBlogV1Like.deleteLike(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { likeId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['likeId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes a site visitors' or members' like by blog content FQDN and entity ID.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n * @public\n * @documentationMaturity preview\n * @requiredField identifiers\n * @requiredField identifiers.entityId\n * @requiredField identifiers.fqdn\n * @permissionId BLOG.LIKE_DELETE\n * @applicableIdentity APP\n * @fqn wix.blog.v1.LikeService.DeleteLikeByFqdnAndEntityId\n */\nexport async function deleteLikeByFqdnAndEntityId(\n identifiers: NonNullablePaths<\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n `entityId` | `fqdn`,\n 2\n >\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n fqdn: identifiers?.fqdn,\n entityId: identifiers?.entityId,\n });\n\n const reqOpts = ambassadorWixBlogV1Like.deleteLikeByFqdnAndEntityId(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n fqdn: '$[0].fqdn',\n entityId: '$[0].entityId',\n },\n singleArgumentUnchanged: false,\n },\n ['identifiers']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteLikeByFqdnAndEntityIdIdentifiers {\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn: string | null;\n /**\n * ID of the specific blog content being liked.\n * @format GUID\n */\n entityId: string | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBlogV1LikeServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/blog-like-service',\n destPath: '',\n },\n ],\n 'social-blog._base_domain_': [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/blog/v1/likes',\n destPath: '/v1/likes',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/blog/v1/likes',\n destPath: '/v1/likes',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_blog_likes';\n\n/**\n * Creates a like for blog content.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n */\nexport function createLike(payload: object): RequestOptionsFactory<any> {\n function __createLike({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'like.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'POST' as any,\n methodFqn: 'wix.blog.v1.LikeService.CreateLike',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'like.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createLike;\n}\n\n/** Retrieves a like. */\nexport function getLike(payload: object): RequestOptionsFactory<any> {\n function __getLike({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'GET' as any,\n methodFqn: 'wix.blog.v1.LikeService.GetLike',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/{likeId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'like.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getLike;\n}\n\n/**\n * Creates a query to retrieve a list of likes.\n *\n *\n * The `queryLikes()` method builds a query to retrieve a list of likes and returns a [`LikesQueryBuilder`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/eq) object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/find) method.\n *\n * You can refine the query by chaining `LikesQueryBuilder` methods onto the query. `LikesQueryBuilder` methods enable you to sort, filter, and control the results `queryLikes()` returns.\n *\n * `queryLikes()` runs with these `LikesQueryBuilder` defaults, which you can override:\n *\n * - [`skip(0)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/skip-to)\n * - [`limit(50)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/limit)\n */\nexport function queryLikes(payload: object): RequestOptionsFactory<any> {\n function __queryLikes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'POST' as any,\n methodFqn: 'wix.blog.v1.LikeService.QueryLikes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'likes.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryLikes;\n}\n\n/** Deletes a like. */\nexport function deleteLike(payload: object): RequestOptionsFactory<any> {\n function __deleteLike({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'DELETE' as any,\n methodFqn: 'wix.blog.v1.LikeService.DeleteLike',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/{likeId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteLike;\n}\n\n/**\n * Deletes a site visitors' or members' like by blog content FQDN and entity ID.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n */\nexport function deleteLikeByFqdnAndEntityId(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteLikeByFqdnAndEntityId({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'DELETE' as any,\n methodFqn: 'wix.blog.v1.LikeService.DeleteLikeByFqdnAndEntityId',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/fqdn/{fqdn}/entity-id/{entityId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteLikeByFqdnAndEntityId;\n}\n","import {\n createLike as publicCreateLike,\n getLike as publicGetLike,\n queryLikes as publicQueryLikes,\n typedQueryLikes as publicTypedQueryLikes,\n deleteLike as publicDeleteLike,\n deleteLikeByFqdnAndEntityId as publicDeleteLikeByFqdnAndEntityId,\n} from './blog-v1-like-likes.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n LikeQuery,\n LikesQueryBuilder,\n typedQueryLikes as universalTypedQueryLikes,\n} from './blog-v1-like-likes.universal.js';\nimport { onLikeCreated as publicOnLikeCreated } from './blog-v1-like-likes.public.js';\nimport { onLikeDeleted as publicOnLikeDeleted } from './blog-v1-like-likes.public.js';\n\nfunction customQueryLikes(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryLikes(httpClient)(),\n typedQueryFunction: (query: LikeQuery) =>\n publicTypedQueryLikes(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): LikesQueryBuilder;\n function overloadedQuery(\n query: LikeQuery\n ): ReturnType<typeof universalTypedQueryLikes>;\n function overloadedQuery(query?: LikeQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const createLike: MaybeContext<\n BuildRESTFunction<typeof publicCreateLike> & typeof publicCreateLike\n> = /*#__PURE__*/ createRESTModule(publicCreateLike);\nexport const getLike: MaybeContext<\n BuildRESTFunction<typeof publicGetLike> & typeof publicGetLike\n> = /*#__PURE__*/ createRESTModule(publicGetLike);\nexport const deleteLike: MaybeContext<\n BuildRESTFunction<typeof publicDeleteLike> & typeof publicDeleteLike\n> = /*#__PURE__*/ createRESTModule(publicDeleteLike);\nexport const deleteLikeByFqdnAndEntityId: MaybeContext<\n BuildRESTFunction<typeof publicDeleteLikeByFqdnAndEntityId> &\n typeof publicDeleteLikeByFqdnAndEntityId\n> = /*#__PURE__*/ createRESTModule(publicDeleteLikeByFqdnAndEntityId);\nexport const queryLikes: MaybeContext<\n BuildRESTFunction<typeof customQueryLikes> & typeof customQueryLikes\n> = /*#__PURE__*/ createRESTModule(customQueryLikes);\n/**\n * Triggers when a like is created.\n */\nexport const onLikeCreated: BuildEventDefinition<typeof publicOnLikeCreated> &\n typeof publicOnLikeCreated = createEventModule(publicOnLikeCreated);\n/**\n * Triggers when a like is deleted.\n */\nexport const onLikeDeleted: BuildEventDefinition<typeof publicOnLikeDeleted> &\n typeof publicOnLikeDeleted = createEventModule(publicOnLikeDeleted);\n\nexport {\n SortOrder,\n WebhookIdentityType,\n} from './blog-v1-like-likes.universal.js';\nexport {\n Like,\n CreateLikeRequest,\n CreateLikeResponse,\n GetLikeRequest,\n GetLikeResponse,\n GetLikeByFqdnAndEntityIdRequest,\n GetLikeByFqdnAndEntityIdResponse,\n QueryLikesRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryLikesResponse,\n CursorPagingMetadata,\n Cursors,\n CountLikesRequest,\n CountLikesResponse,\n DeleteLikeRequest,\n DeleteLikeResponse,\n DeleteLikeByFqdnAndEntityIdRequest,\n DeleteLikeByFqdnAndEntityIdResponse,\n BulkCreateLikesMigrationRequest,\n MigrationLike,\n BulkCreateLikesMigrationResponse,\n BulkActionMetadata,\n ItemMetadata,\n ApplicationError,\n CountLikesMigrationRequest,\n CountLikesMigrationResponse,\n QueryLikesMigrationRequest,\n QueryLikesMigrationResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n LikeCreatedEnvelope,\n LikeDeletedEnvelope,\n CreateLikeOptions,\n LikesQueryResult,\n LikesQueryBuilder,\n LikeQuerySpec,\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n} from './blog-v1-like-likes.universal.js';\nexport {\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CommonQueryWithEntityContext,\n LikeQuery,\n} from './blog-v1-like-likes.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA,kBAAAC;AAAA,EAAA,mCAAAC;AAAA,EAAA,eAAAC;AAAA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CAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO;AAAA,UACL,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAuB;;;AG7LvB,IAAAC,uBAAiC;AACjC,sCAAkC;AAOlC,iCAA0C;AAS1C,SAAS,iBAAiB,YAAwB;AAChD,QAAM,aAAS,sDAA0B;AAAA,IACvC,sBAAsB,MAAMC,YAAiB,UAAU,EAAE;AAAA,IACzD,oBAAoB,CAAC,UACnBC,iBAAsB,UAAU,EAAE,KAAK;AAAA,IACzC,qBAAqB;AAAA,EACvB,CAAC;AAMD,WAAS,gBAAgB,OAAwB;AAC/C,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,WAEK,2DAAiBA,QAAa;AACzC,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,+BAGK,2DAAiBA,4BAAiC;AAC7D,IAAML,cAEK,2DAAiB,gBAAgB;AAI5C,IAAMM,qBACkB,mDAAkB,aAAmB;AAI7D,IAAMC,qBACkB,mDAAkB,aAAmB;","names":["createLike","deleteLike","deleteLikeByFqdnAndEntityId","getLike","onLikeCreated","onLikeDeleted","queryLikes","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","import_transform_paths","SortOrder","WebhookIdentityType","createLike","sdkTransformError","getLike","queryLikes","deleteLike","deleteLikeByFqdnAndEntityId","createLike","getLike","queryLikes","typedQueryLikes","deleteLike","deleteLikeByFqdnAndEntityId","import_rest_modules","queryLikes","typedQueryLikes","createLike","getLike","deleteLike","deleteLikeByFqdnAndEntityId","onLikeCreated","onLikeDeleted"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/blog-v1-like-likes.public.ts","../../src/blog-v1-like-likes.universal.ts","../../src/blog-v1-like-likes.http.ts","../../src/blog-v1-like-likes.context.ts"],"sourcesContent":["export * from './src/blog-v1-like-likes.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CreateLikeOptions,\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n GetLikeByFqdnAndEntityIdIdentifiers,\n GetLikeByFqdnAndEntityIdResponse,\n Like,\n LikeCreatedEnvelope,\n LikeDeletedEnvelope,\n LikeQuery,\n LikesQueryBuilder,\n QueryLikesResponse,\n createLike as universalCreateLike,\n deleteLike as universalDeleteLike,\n deleteLikeByFqdnAndEntityId as universalDeleteLikeByFqdnAndEntityId,\n getLike as universalGetLike,\n getLikeByFqdnAndEntityId as universalGetLikeByFqdnAndEntityId,\n queryLikes as universalQueryLikes,\n typedQueryLikes as universalTypedQueryLikes,\n} from './blog-v1-like-likes.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/blog' };\n\nexport function createLike(httpClient: HttpClient): CreateLikeSignature {\n return (\n options?: NonNullablePaths<\n CreateLikeOptions,\n `like.entityId` | `like.fqdn`,\n 3\n >\n ) =>\n universalCreateLike(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateLikeSignature {\n /**\n * Creates a like for blog content.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n * @returns Created like.\n */\n (\n options?: NonNullablePaths<\n CreateLikeOptions,\n `like.entityId` | `like.fqdn`,\n 3\n >\n ): Promise<Like>;\n}\n\nexport function getLike(httpClient: HttpClient): GetLikeSignature {\n return (likeId: string) =>\n universalGetLike(\n likeId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetLikeSignature {\n /**\n * Retrieves a like created by the currently authenticated site visitor or member.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n * @param - Like ID.\n * @returns Retrieved like.\n */\n (likeId: string): Promise<Like>;\n}\n\nexport function getLikeByFqdnAndEntityId(\n httpClient: HttpClient\n): GetLikeByFqdnAndEntityIdSignature {\n return (\n identifiers: NonNullablePaths<\n GetLikeByFqdnAndEntityIdIdentifiers,\n `entityId` | `fqdn`,\n 2\n >\n ) =>\n universalGetLikeByFqdnAndEntityId(\n identifiers,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetLikeByFqdnAndEntityIdSignature {\n /**\n * Retrieves a like by blog content FQDN and entity ID.\n *\n * This is a convenience method for when you don't have the like ID.\n */\n (\n identifiers: NonNullablePaths<\n GetLikeByFqdnAndEntityIdIdentifiers,\n `entityId` | `fqdn`,\n 2\n >\n ): Promise<GetLikeByFqdnAndEntityIdResponse>;\n}\n\nexport function queryLikes(httpClient: HttpClient): QueryLikesSignature {\n return () =>\n universalQueryLikes(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryLikesSignature {\n /**\n * Creates a query to retrieve a list of likes.\n *\n *\n * The `queryLikes()` method builds a query to retrieve a list of likes and returns a [`LikesQueryBuilder`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/eq) object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/find) method.\n *\n * You can refine the query by chaining `LikesQueryBuilder` methods onto the query. `LikesQueryBuilder` methods enable you to sort, filter, and control the results `queryLikes()` returns.\n *\n * `queryLikes()` runs with these `LikesQueryBuilder` defaults, which you can override:\n *\n * - [`skip(0)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/skip-to)\n * - [`limit(50)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/limit)\n */\n (): LikesQueryBuilder;\n}\n\nexport function typedQueryLikes(\n httpClient: HttpClient\n): TypedQueryLikesSignature {\n return (query: LikeQuery) =>\n universalTypedQueryLikes(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryLikesSignature {\n /** */\n (query: LikeQuery): Promise<NonNullablePaths<QueryLikesResponse, `likes`, 2>>;\n}\n\nexport function deleteLike(httpClient: HttpClient): DeleteLikeSignature {\n return (likeId: string) =>\n universalDeleteLike(\n likeId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteLikeSignature {\n /**\n * Deletes a like created by the currently authenticated site visitor or member.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n * @param - ID of the like to delete.\n */\n (likeId: string): Promise<void>;\n}\n\nexport function deleteLikeByFqdnAndEntityId(\n httpClient: HttpClient\n): DeleteLikeByFqdnAndEntityIdSignature {\n return (\n identifiers: NonNullablePaths<\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n `entityId` | `fqdn`,\n 2\n >\n ) =>\n universalDeleteLikeByFqdnAndEntityId(\n identifiers,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteLikeByFqdnAndEntityIdSignature {\n /**\n * Deletes a site visitors' or members' like by blog content FQDN and entity ID.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n */\n (\n identifiers: NonNullablePaths<\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n `entityId` | `fqdn`,\n 2\n >\n ): Promise<void>;\n}\n\nexport const onLikeCreated = EventDefinition(\n 'wix.blog.v1.like_created',\n true,\n (event: LikeCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<LikeCreatedEnvelope>();\nexport const onLikeDeleted = EventDefinition(\n 'wix.blog.v1.like_deleted',\n true,\n (event: LikeDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<LikeDeletedEnvelope>();\n\nexport {\n ActionEvent,\n ApplicationError,\n BaseEventMetadata,\n BulkActionMetadata,\n BulkCreateLikesMigrationRequest,\n BulkCreateLikesMigrationResponse,\n CountLikesMigrationRequest,\n CountLikesMigrationResponse,\n CountLikesRequest,\n CountLikesResponse,\n CreateLikeOptions,\n CreateLikeRequest,\n CreateLikeResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n DeleteLikeByFqdnAndEntityIdRequest,\n DeleteLikeByFqdnAndEntityIdResponse,\n DeleteLikeRequest,\n DeleteLikeResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n GetLikeByFqdnAndEntityIdIdentifiers,\n GetLikeByFqdnAndEntityIdRequest,\n GetLikeByFqdnAndEntityIdResponse,\n GetLikeRequest,\n GetLikeResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ItemMetadata,\n Like,\n LikeCreatedEnvelope,\n LikeDeletedEnvelope,\n LikeQuerySpec,\n LikesQueryBuilder,\n LikesQueryResult,\n MessageEnvelope,\n MigrationLike,\n QueryLikesMigrationRequest,\n QueryLikesMigrationResponse,\n QueryLikesRequest,\n QueryLikesResponse,\n RestoreInfo,\n SortOrder,\n Sorting,\n WebhookIdentityType,\n} from './blog-v1-like-likes.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixBlogV1Like from './blog-v1-like-likes.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * A like represents a positive reaction to blog content.\n *\n * Likes are associated with specific blog content using their FQDN and entity ID,\n * allowing likes to be created for various types of blog content such as posts or comments.\n */\nexport interface Like {\n /**\n * Like ID.\n * @immutable\n * @format GUID\n */\n _id?: string | null;\n /**\n * Date and time the like was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * ID of the specific blog content being liked, such as a blog post or comment.\n * @format GUID\n */\n entityId?: string | null;\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn?: string | null;\n}\n\nexport interface CreateLikeRequest {\n /** Like to create. */\n like?: Like;\n}\n\nexport interface CreateLikeResponse {\n /** Created like. */\n like?: Like;\n}\n\nexport interface GetLikeRequest {\n /**\n * Like ID.\n * @format GUID\n */\n likeId: string | null;\n}\n\nexport interface GetLikeResponse {\n /** Retrieved like. */\n like?: Like;\n}\n\nexport interface GetLikeByFqdnAndEntityIdRequest {\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn: string | null;\n /**\n * ID of the liked entity.\n * @format GUID\n */\n entityId: string | null;\n}\n\nexport interface GetLikeByFqdnAndEntityIdResponse {\n /** Retrieved like. */\n like?: Like;\n}\n\nexport interface QueryLikesRequest {\n /** Query options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more details. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryLikesResponse {\n /** Retrieved likes. */\n likes?: Like[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface CountLikesRequest {\n /**\n * Fully qualified domain name of the liked entity. For example, `wix.blog.v3.post`.\n * @maxLength 256\n */\n fqdn?: string | null;\n /**\n * User identity ID.\n * @format GUID\n */\n identityId?: string | null;\n}\n\nexport interface CountLikesResponse {\n /** Number of likes. */\n count?: number;\n}\n\nexport interface DeleteLikeRequest {\n /**\n * ID of the like to delete.\n * @format GUID\n */\n likeId: string | null;\n}\n\nexport interface DeleteLikeResponse {}\n\nexport interface DeleteLikeByFqdnAndEntityIdRequest {\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn: string | null;\n /**\n * ID of the specific blog content being liked.\n * @format GUID\n */\n entityId: string | null;\n}\n\nexport interface DeleteLikeByFqdnAndEntityIdResponse {}\n\nexport interface BulkCreateLikesMigrationRequest {\n /**\n * Likes to create.\n * @minSize 1\n * @maxSize 50\n */\n likes?: MigrationLike[];\n}\n\n/** Like object used for migration purposes with additional user identity fields. */\nexport interface MigrationLike {\n /** Date and time the like was created. */\n _createdDate?: Date | null;\n /**\n * ID of the liked entity.\n * @format GUID\n */\n entityId?: string | null;\n /**\n * ID of the member who created the like.\n * @format GUID\n */\n memberId?: string | null;\n /**\n * ID of the anonymous user who created the like.\n * @format GUID\n */\n anonymousUserId?: string | null;\n}\n\nexport interface BulkCreateLikesMigrationResponse {\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n /** Metadata for each created like. */\n itemMetadata?: ItemMetadata[];\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface CountLikesMigrationRequest {}\n\nexport interface CountLikesMigrationResponse {\n /** Total number of likes. */\n count?: number;\n}\n\nexport interface QueryLikesMigrationRequest {\n /** Query options. */\n query?: CursorQuery;\n}\n\nexport interface QueryLikesMigrationResponse {\n /** Retrieved likes. */\n likes?: Like[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface LikeCreatedEnvelope {\n entity: Like;\n metadata: EventMetadata;\n}\n\n/**\n * Triggers when a like is created.\n * @permissionScope Read Blog\n * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS\n * @permissionScope Manage Blog\n * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG\n * @permissionScope Read Draft Blog Posts\n * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS\n * @permissionId BLOG.LIKE_READ\n * @webhook\n * @eventType wix.blog.v1.like_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onLikeCreated(\n handler: (event: LikeCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface LikeDeletedEnvelope {\n entity: Like;\n metadata: EventMetadata;\n}\n\n/**\n * Triggers when a like is deleted.\n * @permissionScope Read Blog\n * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS\n * @permissionScope Manage Blog\n * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG\n * @permissionScope Read Draft Blog Posts\n * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS\n * @permissionId BLOG.LIKE_READ\n * @webhook\n * @eventType wix.blog.v1.like_deleted\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onLikeDeleted(\n handler: (event: LikeDeletedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a like for blog content.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n * @public\n * @documentationMaturity preview\n * @requiredField options.like.entityId\n * @requiredField options.like.fqdn\n * @permissionId BLOG.LIKE_CREATE\n * @applicableIdentity APP\n * @returns Created like.\n * @fqn wix.blog.v1.LikeService.CreateLike\n */\nexport async function createLike(\n options?: NonNullablePaths<\n CreateLikeOptions,\n `like.entityId` | `like.fqdn`,\n 3\n >\n): Promise<Like> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n like: options?.like,\n });\n\n const reqOpts = ambassadorWixBlogV1Like.createLike(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.like!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { like: '$[0].like' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateLikeOptions {\n /** Like to create. */\n like?: Like;\n}\n\n/**\n * Retrieves a like created by the currently authenticated site visitor or member.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n * @param likeId - Like ID.\n * @public\n * @documentationMaturity preview\n * @requiredField likeId\n * @permissionId BLOG.LIKE_READ\n * @applicableIdentity APP\n * @returns Retrieved like.\n * @fqn wix.blog.v1.LikeService.GetLike\n */\nexport async function getLike(likeId: string): Promise<Like> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ likeId: likeId });\n\n const reqOpts = ambassadorWixBlogV1Like.getLike(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.like!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { likeId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['likeId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a like by blog content FQDN and entity ID.\n *\n * This is a convenience method for when you don't have the like ID.\n * @public\n * @documentationMaturity preview\n * @requiredField identifiers\n * @requiredField identifiers.entityId\n * @requiredField identifiers.fqdn\n * @permissionId BLOG.LIKE_READ\n * @applicableIdentity APP\n * @fqn wix.blog.v1.LikeService.GetLikeByFqdnAndEntityId\n */\nexport async function getLikeByFqdnAndEntityId(\n identifiers: NonNullablePaths<\n GetLikeByFqdnAndEntityIdIdentifiers,\n `entityId` | `fqdn`,\n 2\n >\n): Promise<GetLikeByFqdnAndEntityIdResponse> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n fqdn: identifiers?.fqdn,\n entityId: identifiers?.entityId,\n });\n\n const reqOpts = ambassadorWixBlogV1Like.getLikeByFqdnAndEntityId(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n fqdn: '$[0].fqdn',\n entityId: '$[0].entityId',\n },\n singleArgumentUnchanged: false,\n },\n ['identifiers']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetLikeByFqdnAndEntityIdIdentifiers {\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn: string | null;\n /**\n * ID of the liked entity.\n * @format GUID\n */\n entityId: string | null;\n}\n\n/**\n * Creates a query to retrieve a list of likes.\n *\n *\n * The `queryLikes()` method builds a query to retrieve a list of likes and returns a [`LikesQueryBuilder`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/eq) object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/find) method.\n *\n * You can refine the query by chaining `LikesQueryBuilder` methods onto the query. `LikesQueryBuilder` methods enable you to sort, filter, and control the results `queryLikes()` returns.\n *\n * `queryLikes()` runs with these `LikesQueryBuilder` defaults, which you can override:\n *\n * - [`skip(0)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/skip-to)\n * - [`limit(50)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/limit)\n * @public\n * @documentationMaturity preview\n * @permissionId BLOG.LIKE_READ\n * @applicableIdentity APP\n * @fqn wix.blog.v1.LikeService.QueryLikes\n */\nexport function queryLikes(): LikesQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<Like, 'CURSOR', QueryLikesRequest, QueryLikesResponse>({\n func: async (payload: QueryLikesRequest) => {\n const reqOpts = ambassadorWixBlogV1Like.queryLikes(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryLikesRequest['query']) => {\n const args = [query, {}] as [QueryLikesRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryLikesResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.likes,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface LikesQueryResult extends QueryCursorResult {\n items: Like[];\n query: LikesQueryBuilder;\n next: () => Promise<LikesQueryResult>;\n prev: () => Promise<LikesQueryResult>;\n}\n\nexport interface LikesQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName: '_id' | 'entityId' | 'fqdn',\n value: any\n ) => LikesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName: '_id' | 'entityId' | 'fqdn',\n value: any\n ) => LikesQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName: '_id' | 'entityId' | 'fqdn',\n value: any\n ) => LikesQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => LikesQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => LikesQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<LikesQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.blog.v1.LikeService.QueryLikes\n * @requiredField query\n */\nexport async function typedQueryLikes(\n query: LikeQuery\n): Promise<NonNullablePaths<QueryLikesResponse, `likes`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts = ambassadorWixBlogV1Like.queryLikes(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface LikeQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['_id'];\n operators: ['$eq', '$in', '$ne'];\n sort: 'NONE';\n },\n {\n fields: ['fqdn'];\n operators: ['$eq', '$in', '$ne'];\n sort: 'NONE';\n },\n {\n fields: ['entityId'];\n operators: ['$eq', '$in', '$ne'];\n sort: 'NONE';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<Like, LikeQuerySpec>;\nexport type LikeQuery = {\n /** \n Cursor paging options.\n\n Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). \n */\n cursorPaging?: {\n /** \n Maximum number of items to return in the results. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n\n Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object.\n\n Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). \n @maxSize: 5 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\n/**\n * Deletes a like created by the currently authenticated site visitor or member.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n * @param likeId - ID of the like to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField likeId\n * @permissionId BLOG.LIKE_DELETE\n * @applicableIdentity APP\n * @fqn wix.blog.v1.LikeService.DeleteLike\n */\nexport async function deleteLike(likeId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ likeId: likeId });\n\n const reqOpts = ambassadorWixBlogV1Like.deleteLike(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { likeId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['likeId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes a site visitors' or members' like by blog content FQDN and entity ID.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n * @public\n * @documentationMaturity preview\n * @requiredField identifiers\n * @requiredField identifiers.entityId\n * @requiredField identifiers.fqdn\n * @permissionId BLOG.LIKE_DELETE\n * @applicableIdentity APP\n * @fqn wix.blog.v1.LikeService.DeleteLikeByFqdnAndEntityId\n */\nexport async function deleteLikeByFqdnAndEntityId(\n identifiers: NonNullablePaths<\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n `entityId` | `fqdn`,\n 2\n >\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n fqdn: identifiers?.fqdn,\n entityId: identifiers?.entityId,\n });\n\n const reqOpts = ambassadorWixBlogV1Like.deleteLikeByFqdnAndEntityId(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n fqdn: '$[0].fqdn',\n entityId: '$[0].entityId',\n },\n singleArgumentUnchanged: false,\n },\n ['identifiers']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteLikeByFqdnAndEntityIdIdentifiers {\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn: string | null;\n /**\n * ID of the specific blog content being liked.\n * @format GUID\n */\n entityId: string | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBlogV1LikeServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/blog-like-service',\n destPath: '',\n },\n ],\n 'social-blog._base_domain_': [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/blog/v1/likes',\n destPath: '/v1/likes',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/blog/v1/likes',\n destPath: '/v1/likes',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_blog_likes';\n\n/**\n * Creates a like for blog content.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n */\nexport function createLike(payload: object): RequestOptionsFactory<any> {\n function __createLike({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'like.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'POST' as any,\n methodFqn: 'wix.blog.v1.LikeService.CreateLike',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'like.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createLike;\n}\n\n/**\n * Retrieves a like created by the currently authenticated site visitor or member.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n */\nexport function getLike(payload: object): RequestOptionsFactory<any> {\n function __getLike({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'GET' as any,\n methodFqn: 'wix.blog.v1.LikeService.GetLike',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/{likeId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'like.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getLike;\n}\n\n/**\n * Retrieves a like by blog content FQDN and entity ID.\n *\n * This is a convenience method for when you don't have the like ID.\n */\nexport function getLikeByFqdnAndEntityId(\n payload: object\n): RequestOptionsFactory<any> {\n function __getLikeByFqdnAndEntityId({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'GET' as any,\n methodFqn: 'wix.blog.v1.LikeService.GetLikeByFqdnAndEntityId',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/fqdn/{fqdn}/entity-id/{entityId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'like.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getLikeByFqdnAndEntityId;\n}\n\n/**\n * Creates a query to retrieve a list of likes.\n *\n *\n * The `queryLikes()` method builds a query to retrieve a list of likes and returns a [`LikesQueryBuilder`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/eq) object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/find) method.\n *\n * You can refine the query by chaining `LikesQueryBuilder` methods onto the query. `LikesQueryBuilder` methods enable you to sort, filter, and control the results `queryLikes()` returns.\n *\n * `queryLikes()` runs with these `LikesQueryBuilder` defaults, which you can override:\n *\n * - [`skip(0)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/skip-to)\n * - [`limit(50)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/limit)\n */\nexport function queryLikes(payload: object): RequestOptionsFactory<any> {\n function __queryLikes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'POST' as any,\n methodFqn: 'wix.blog.v1.LikeService.QueryLikes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'likes.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryLikes;\n}\n\n/**\n * Deletes a like created by the currently authenticated site visitor or member.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n */\nexport function deleteLike(payload: object): RequestOptionsFactory<any> {\n function __deleteLike({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'DELETE' as any,\n methodFqn: 'wix.blog.v1.LikeService.DeleteLike',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/{likeId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteLike;\n}\n\n/**\n * Deletes a site visitors' or members' like by blog content FQDN and entity ID.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n */\nexport function deleteLikeByFqdnAndEntityId(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteLikeByFqdnAndEntityId({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'DELETE' as any,\n methodFqn: 'wix.blog.v1.LikeService.DeleteLikeByFqdnAndEntityId',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/fqdn/{fqdn}/entity-id/{entityId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteLikeByFqdnAndEntityId;\n}\n","import {\n createLike as publicCreateLike,\n getLike as publicGetLike,\n getLikeByFqdnAndEntityId as publicGetLikeByFqdnAndEntityId,\n queryLikes as publicQueryLikes,\n typedQueryLikes as publicTypedQueryLikes,\n deleteLike as publicDeleteLike,\n deleteLikeByFqdnAndEntityId as publicDeleteLikeByFqdnAndEntityId,\n} from './blog-v1-like-likes.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n LikeQuery,\n LikesQueryBuilder,\n typedQueryLikes as universalTypedQueryLikes,\n} from './blog-v1-like-likes.universal.js';\nimport { onLikeCreated as publicOnLikeCreated } from './blog-v1-like-likes.public.js';\nimport { onLikeDeleted as publicOnLikeDeleted } from './blog-v1-like-likes.public.js';\n\nfunction customQueryLikes(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryLikes(httpClient)(),\n typedQueryFunction: (query: LikeQuery) =>\n publicTypedQueryLikes(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): LikesQueryBuilder;\n function overloadedQuery(\n query: LikeQuery\n ): ReturnType<typeof universalTypedQueryLikes>;\n function overloadedQuery(query?: LikeQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const createLike: MaybeContext<\n BuildRESTFunction<typeof publicCreateLike> & typeof publicCreateLike\n> = /*#__PURE__*/ createRESTModule(publicCreateLike);\nexport const getLike: MaybeContext<\n BuildRESTFunction<typeof publicGetLike> & typeof publicGetLike\n> = /*#__PURE__*/ createRESTModule(publicGetLike);\nexport const getLikeByFqdnAndEntityId: MaybeContext<\n BuildRESTFunction<typeof publicGetLikeByFqdnAndEntityId> &\n typeof publicGetLikeByFqdnAndEntityId\n> = /*#__PURE__*/ createRESTModule(publicGetLikeByFqdnAndEntityId);\nexport const deleteLike: MaybeContext<\n BuildRESTFunction<typeof publicDeleteLike> & typeof publicDeleteLike\n> = /*#__PURE__*/ createRESTModule(publicDeleteLike);\nexport const deleteLikeByFqdnAndEntityId: MaybeContext<\n BuildRESTFunction<typeof publicDeleteLikeByFqdnAndEntityId> &\n typeof publicDeleteLikeByFqdnAndEntityId\n> = /*#__PURE__*/ createRESTModule(publicDeleteLikeByFqdnAndEntityId);\nexport const queryLikes: MaybeContext<\n BuildRESTFunction<typeof customQueryLikes> & typeof customQueryLikes\n> = /*#__PURE__*/ createRESTModule(customQueryLikes);\n/**\n * Triggers when a like is created.\n */\nexport const onLikeCreated: BuildEventDefinition<typeof publicOnLikeCreated> &\n typeof publicOnLikeCreated = createEventModule(publicOnLikeCreated);\n/**\n * Triggers when a like is deleted.\n */\nexport const onLikeDeleted: BuildEventDefinition<typeof publicOnLikeDeleted> &\n typeof publicOnLikeDeleted = createEventModule(publicOnLikeDeleted);\n\nexport {\n SortOrder,\n WebhookIdentityType,\n} from './blog-v1-like-likes.universal.js';\nexport {\n Like,\n CreateLikeRequest,\n CreateLikeResponse,\n GetLikeRequest,\n GetLikeResponse,\n GetLikeByFqdnAndEntityIdRequest,\n GetLikeByFqdnAndEntityIdResponse,\n QueryLikesRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryLikesResponse,\n CursorPagingMetadata,\n Cursors,\n CountLikesRequest,\n CountLikesResponse,\n DeleteLikeRequest,\n DeleteLikeResponse,\n DeleteLikeByFqdnAndEntityIdRequest,\n DeleteLikeByFqdnAndEntityIdResponse,\n BulkCreateLikesMigrationRequest,\n MigrationLike,\n BulkCreateLikesMigrationResponse,\n BulkActionMetadata,\n ItemMetadata,\n ApplicationError,\n CountLikesMigrationRequest,\n CountLikesMigrationResponse,\n QueryLikesMigrationRequest,\n QueryLikesMigrationResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n LikeCreatedEnvelope,\n LikeDeletedEnvelope,\n CreateLikeOptions,\n GetLikeByFqdnAndEntityIdIdentifiers,\n LikesQueryResult,\n LikesQueryBuilder,\n LikeQuerySpec,\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n} from './blog-v1-like-likes.universal.js';\nexport {\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CommonQueryWithEntityContext,\n LikeQuery,\n} from './blog-v1-like-likes.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA,kBAAAC;AAAA,EAAA,mCAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA,gCAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,kBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,+BACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,6BAA6B;AAAA,MAC3B;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA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K,2DAAiBA,WAAgB;AAC5C,IAAMC,WAEK,2DAAiBA,QAAa;AACzC,IAAMC,4BAGK,2DAAiBA,yBAA8B;AAC1D,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,+BAGK,2DAAiBA,4BAAiC;AAC7D,IAAMN,cAEK,2DAAiB,gBAAgB;AAI5C,IAAMO,qBACkB,mDAAkB,aAAmB;AAI7D,IAAMC,qBACkB,mDAAkB,aAAmB;","names":["createLike","deleteLike","deleteLikeByFqdnAndEntityId","getLike","getLikeByFqdnAndEntityId","onLikeCreated","onLikeDeleted","queryLikes","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","import_transform_paths","SortOrder","WebhookIdentityType","createLike","sdkTransformError","getLike","getLikeByFqdnAndEntityId","queryLikes","deleteLike","deleteLikeByFqdnAndEntityId","createLike","getLike","getLikeByFqdnAndEntityId","queryLikes","typedQueryLikes","deleteLike","deleteLikeByFqdnAndEntityId","import_rest_modules","queryLikes","typedQueryLikes","createLike","getLike","getLikeByFqdnAndEntityId","deleteLike","deleteLikeByFqdnAndEntityId","onLikeCreated","onLikeDeleted"]}
|
|
@@ -53,12 +53,12 @@ interface GetLikeByFqdnAndEntityIdRequest {
|
|
|
53
53
|
* Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.
|
|
54
54
|
* @maxLength 256
|
|
55
55
|
*/
|
|
56
|
-
fqdn
|
|
56
|
+
fqdn: string | null;
|
|
57
57
|
/**
|
|
58
58
|
* ID of the liked entity.
|
|
59
59
|
* @format GUID
|
|
60
60
|
*/
|
|
61
|
-
entityId
|
|
61
|
+
entityId: string | null;
|
|
62
62
|
}
|
|
63
63
|
interface GetLikeByFqdnAndEntityIdResponse {
|
|
64
64
|
/** Retrieved like. */
|
|
@@ -512,7 +512,10 @@ interface CreateLikeOptions {
|
|
|
512
512
|
like?: Like;
|
|
513
513
|
}
|
|
514
514
|
/**
|
|
515
|
-
* Retrieves a like.
|
|
515
|
+
* Retrieves a like created by the currently authenticated site visitor or member.
|
|
516
|
+
*
|
|
517
|
+
* >**Note:**
|
|
518
|
+
* >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).
|
|
516
519
|
* @param likeId - Like ID.
|
|
517
520
|
* @public
|
|
518
521
|
* @documentationMaturity preview
|
|
@@ -523,6 +526,32 @@ interface CreateLikeOptions {
|
|
|
523
526
|
* @fqn wix.blog.v1.LikeService.GetLike
|
|
524
527
|
*/
|
|
525
528
|
declare function getLike(likeId: string): Promise<Like>;
|
|
529
|
+
/**
|
|
530
|
+
* Retrieves a like by blog content FQDN and entity ID.
|
|
531
|
+
*
|
|
532
|
+
* This is a convenience method for when you don't have the like ID.
|
|
533
|
+
* @public
|
|
534
|
+
* @documentationMaturity preview
|
|
535
|
+
* @requiredField identifiers
|
|
536
|
+
* @requiredField identifiers.entityId
|
|
537
|
+
* @requiredField identifiers.fqdn
|
|
538
|
+
* @permissionId BLOG.LIKE_READ
|
|
539
|
+
* @applicableIdentity APP
|
|
540
|
+
* @fqn wix.blog.v1.LikeService.GetLikeByFqdnAndEntityId
|
|
541
|
+
*/
|
|
542
|
+
declare function getLikeByFqdnAndEntityId(identifiers: NonNullablePaths<GetLikeByFqdnAndEntityIdIdentifiers, `entityId` | `fqdn`, 2>): Promise<GetLikeByFqdnAndEntityIdResponse>;
|
|
543
|
+
interface GetLikeByFqdnAndEntityIdIdentifiers {
|
|
544
|
+
/**
|
|
545
|
+
* Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.
|
|
546
|
+
* @maxLength 256
|
|
547
|
+
*/
|
|
548
|
+
fqdn: string | null;
|
|
549
|
+
/**
|
|
550
|
+
* ID of the liked entity.
|
|
551
|
+
* @format GUID
|
|
552
|
+
*/
|
|
553
|
+
entityId: string | null;
|
|
554
|
+
}
|
|
526
555
|
/**
|
|
527
556
|
* Creates a query to retrieve a list of likes.
|
|
528
557
|
*
|
|
@@ -654,7 +683,10 @@ type LikeQuery = {
|
|
|
654
683
|
}[];
|
|
655
684
|
};
|
|
656
685
|
/**
|
|
657
|
-
* Deletes a like.
|
|
686
|
+
* Deletes a like created by the currently authenticated site visitor or member.
|
|
687
|
+
*
|
|
688
|
+
* >**Note:**
|
|
689
|
+
* >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).
|
|
658
690
|
* @param likeId - ID of the like to delete.
|
|
659
691
|
* @public
|
|
660
692
|
* @documentationMaturity preview
|
|
@@ -692,4 +724,4 @@ interface DeleteLikeByFqdnAndEntityIdIdentifiers {
|
|
|
692
724
|
entityId: string | null;
|
|
693
725
|
}
|
|
694
726
|
|
|
695
|
-
export { type ActionEvent, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkCreateLikesMigrationRequest, type BulkCreateLikesMigrationResponse, type CommonQueryWithEntityContext, type CountLikesMigrationRequest, type CountLikesMigrationResponse, type CountLikesRequest, type CountLikesResponse, type CreateLikeOptions, type CreateLikeRequest, type CreateLikeResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteLikeByFqdnAndEntityIdIdentifiers, type DeleteLikeByFqdnAndEntityIdRequest, type DeleteLikeByFqdnAndEntityIdResponse, type DeleteLikeRequest, type DeleteLikeResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type GetLikeByFqdnAndEntityIdRequest, type GetLikeByFqdnAndEntityIdResponse, type GetLikeRequest, type GetLikeResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type Like, type LikeCreatedEnvelope, type LikeDeletedEnvelope, type LikeQuery, type LikeQuerySpec, type LikesQueryBuilder, type LikesQueryResult, type MessageEnvelope, type MigrationLike, type QueryLikesMigrationRequest, type QueryLikesMigrationResponse, type QueryLikesRequest, type QueryLikesResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createLike, deleteLike, deleteLikeByFqdnAndEntityId, getLike, onLikeCreated, onLikeDeleted, queryLikes, typedQueryLikes };
|
|
727
|
+
export { type ActionEvent, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkCreateLikesMigrationRequest, type BulkCreateLikesMigrationResponse, type CommonQueryWithEntityContext, type CountLikesMigrationRequest, type CountLikesMigrationResponse, type CountLikesRequest, type CountLikesResponse, type CreateLikeOptions, type CreateLikeRequest, type CreateLikeResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteLikeByFqdnAndEntityIdIdentifiers, type DeleteLikeByFqdnAndEntityIdRequest, type DeleteLikeByFqdnAndEntityIdResponse, type DeleteLikeRequest, type DeleteLikeResponse, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type GetLikeByFqdnAndEntityIdIdentifiers, type GetLikeByFqdnAndEntityIdRequest, type GetLikeByFqdnAndEntityIdResponse, type GetLikeRequest, type GetLikeResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type Like, type LikeCreatedEnvelope, type LikeDeletedEnvelope, type LikeQuery, type LikeQuerySpec, type LikesQueryBuilder, type LikesQueryResult, type MessageEnvelope, type MigrationLike, type QueryLikesMigrationRequest, type QueryLikesMigrationResponse, type QueryLikesRequest, type QueryLikesResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createLike, deleteLike, deleteLikeByFqdnAndEntityId, getLike, getLikeByFqdnAndEntityId, onLikeCreated, onLikeDeleted, queryLikes, typedQueryLikes };
|