@wix/auto_sdk_blog_likes 1.0.5 → 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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +13 -3
  2. package/build/cjs/index.js +66 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +29 -3
  5. package/build/cjs/index.typings.js +58 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +8 -4
  8. package/build/cjs/meta.js +47 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +13 -3
  11. package/build/es/index.mjs +65 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +29 -3
  14. package/build/es/index.typings.mjs +57 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +8 -4
  17. package/build/es/meta.mjs +46 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +13 -3
  20. package/build/internal/cjs/index.js +66 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +29 -3
  23. package/build/internal/cjs/index.typings.js +58 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +8 -4
  26. package/build/internal/cjs/meta.js +47 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +13 -3
  29. package/build/internal/es/index.mjs +65 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +29 -3
  32. package/build/internal/es/index.typings.mjs +57 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +8 -4
  35. package/build/internal/es/meta.mjs +46 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -126,6 +126,33 @@ function getLike(payload) {
126
126
  }
127
127
  return __getLike;
128
128
  }
129
+ function getLikeByFqdnAndEntityId(payload) {
130
+ function __getLikeByFqdnAndEntityId({ host }) {
131
+ const metadata = {
132
+ entityFqdn: "wix.blog.v1.like",
133
+ method: "GET",
134
+ methodFqn: "wix.blog.v1.LikeService.GetLikeByFqdnAndEntityId",
135
+ packageName: PACKAGE_NAME,
136
+ migrationOptions: {
137
+ optInTransformResponse: true
138
+ },
139
+ url: resolveWixBlogV1LikeServiceUrl({
140
+ protoPath: "/v1/likes/fqdn/{fqdn}/entity-id/{entityId}",
141
+ data: payload,
142
+ host
143
+ }),
144
+ params: toURLSearchParams(payload),
145
+ transformResponse: (payload2) => transformPaths(payload2, [
146
+ {
147
+ transformFn: transformRESTTimestampToSDKTimestamp,
148
+ paths: [{ path: "like.createdDate" }]
149
+ }
150
+ ])
151
+ };
152
+ return metadata;
153
+ }
154
+ return __getLikeByFqdnAndEntityId;
155
+ }
129
156
  function queryLikes(payload) {
130
157
  function __queryLikes({ host }) {
131
158
  const metadata = {
@@ -259,6 +286,35 @@ async function getLike2(likeId) {
259
286
  throw transformedError;
260
287
  }
261
288
  }
289
+ async function getLikeByFqdnAndEntityId2(identifiers) {
290
+ const { httpClient, sideEffects } = arguments[1];
291
+ const payload = renameKeysFromSDKRequestToRESTRequest({
292
+ fqdn: identifiers?.fqdn,
293
+ entityId: identifiers?.entityId
294
+ });
295
+ const reqOpts = getLikeByFqdnAndEntityId(payload);
296
+ sideEffects?.onSiteCall?.();
297
+ try {
298
+ const result = await httpClient.request(reqOpts);
299
+ sideEffects?.onSuccess?.(result);
300
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
301
+ } catch (err) {
302
+ const transformedError = sdkTransformError(
303
+ err,
304
+ {
305
+ spreadPathsToArguments: {},
306
+ explicitPathsToArguments: {
307
+ fqdn: "$[0].fqdn",
308
+ entityId: "$[0].entityId"
309
+ },
310
+ singleArgumentUnchanged: false
311
+ },
312
+ ["identifiers"]
313
+ );
314
+ sideEffects?.onError?.(err);
315
+ throw transformedError;
316
+ }
317
+ }
262
318
  function queryLikes2() {
263
319
  const { httpClient, sideEffects } = arguments[0];
264
320
  return queryBuilder({
@@ -391,6 +447,13 @@ function getLike3(httpClient) {
391
447
  { httpClient }
392
448
  );
393
449
  }
450
+ function getLikeByFqdnAndEntityId3(httpClient) {
451
+ return (identifiers) => getLikeByFqdnAndEntityId2(
452
+ identifiers,
453
+ // @ts-ignore
454
+ { httpClient }
455
+ );
456
+ }
394
457
  function queryLikes3(httpClient) {
395
458
  return () => queryLikes2(
396
459
  // @ts-ignore
@@ -466,6 +529,7 @@ function customQueryLikes(httpClient) {
466
529
  }
467
530
  var createLike4 = /* @__PURE__ */ createRESTModule(createLike3);
468
531
  var getLike4 = /* @__PURE__ */ createRESTModule(getLike3);
532
+ var getLikeByFqdnAndEntityId4 = /* @__PURE__ */ createRESTModule(getLikeByFqdnAndEntityId3);
469
533
  var deleteLike4 = /* @__PURE__ */ createRESTModule(deleteLike3);
470
534
  var deleteLikeByFqdnAndEntityId4 = /* @__PURE__ */ createRESTModule(deleteLikeByFqdnAndEntityId3);
471
535
  var queryLikes4 = /* @__PURE__ */ createRESTModule(customQueryLikes);
@@ -478,6 +542,7 @@ export {
478
542
  deleteLike4 as deleteLike,
479
543
  deleteLikeByFqdnAndEntityId4 as deleteLikeByFqdnAndEntityId,
480
544
  getLike4 as getLike,
545
+ getLikeByFqdnAndEntityId4 as getLikeByFqdnAndEntityId,
481
546
  onLikeCreated2 as onLikeCreated,
482
547
  onLikeDeleted2 as onLikeDeleted,
483
548
  queryLikes4 as queryLikes
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../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":["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 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 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 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 * 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 * 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 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,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,wCAAAC,6CAA4C;AACrD,SAAS,kBAAAC,uBAAsB;AAC/B,SAAS,uBAAqD;;;ACH9D,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;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,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAs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A;AAAA,EACA,CAAC,UACCC;AAAA,IACEC,gBAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAaC;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;AAChB,IAAM,gBAAgB;AAAA,EAC3B;AAAA,EACA;AAAA,EACA,CAAC,UACCF;AAAA,IACEC,gBAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAaC;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;;;AGnMvB,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAOlC,SAAS,iCAAiC;AAS1C,SAAS,iBAAiB,YAAwB;AAChD,QAAM,SAAS,0BAA0B;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,iCAAiBA,WAAgB;AAC5C,IAAMC,WAEK,iCAAiBA,QAAa;AACzC,IAAMC,cAEK,iCAAiBA,WAAgB;AAC5C,IAAMC,+BAGK,iCAAiBA,4BAAiC;AAC7D,IAAML,cAEK,iCAAiB,gBAAgB;AAI5C,IAAMM,iBACkB,kBAAkB,aAAmB;AAI7D,IAAMC,iBACkB,kBAAkB,aAAmB;","names":["renameKeysFromRESTResponseToSDKResponse","transformRESTTimestampToSDKTimestamp","transformPaths","payload","transformPaths","SortOrder","WebhookIdentityType","createLike","getLike","queryLikes","deleteLike","deleteLikeByFqdnAndEntityId","createLike","getLike","queryLikes","typedQueryLikes","deleteLike","deleteLikeByFqdnAndEntityId","renameKeysFromRESTResponseToSDKResponse","transformPaths","transformRESTTimestampToSDKTimestamp","queryLikes","typedQueryLikes","createLike","getLike","deleteLike","deleteLikeByFqdnAndEntityId","onLikeCreated","onLikeDeleted"]}
1
+ {"version":3,"sources":["../../../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":["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,SAAS,2CAAAA,gDAA+C;AACxD,SAAS,wCAAAC,6CAA4C;AACrD,SAAS,kBAAAC,uBAAsB;AAC/B,SAAS,uBAAqD;;;ACH9D,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;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;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/C,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,cAEK,iCAAiBA,WAAgB;AAC5C,IAAMC,WAEK,iCAAiBA,QAAa;AACzC,IAAMC,4BAGK,iCAAiBA,yBAA8B;AAC1D,IAAMC,cAEK,iCAAiBA,WAAgB;AAC5C,IAAMC,+BAGK,iCAAiBA,4BAAiC;AAC7D,IAAMN,cAEK,iCAAiB,gBAAgB;AAI5C,IAAMO,iBACkB,kBAAkB,aAAmB;AAI7D,IAAMC,iBACkB,kBAAkB,aAAmB;","names":["renameKeysFromRESTResponseToSDKResponse","transformRESTTimestampToSDKTimestamp","transformPaths","payload","transformPaths","SortOrder","WebhookIdentityType","createLike","getLike","getLikeByFqdnAndEntityId","queryLikes","deleteLike","deleteLikeByFqdnAndEntityId","createLike","getLike","getLikeByFqdnAndEntityId","queryLikes","typedQueryLikes","deleteLike","deleteLikeByFqdnAndEntityId","renameKeysFromRESTResponseToSDKResponse","transformPaths","transformRESTTimestampToSDKTimestamp","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?: string | null;
56
+ fqdn: string | null;
57
57
  /**
58
58
  * ID of the liked entity.
59
59
  * @format GUID
60
60
  */
61
- entityId?: string | null;
61
+ entityId: string | null;
62
62
  }
63
63
  interface GetLikeByFqdnAndEntityIdResponse {
64
64
  /** Retrieved like. */
@@ -526,6 +526,32 @@ interface CreateLikeOptions {
526
526
  * @fqn wix.blog.v1.LikeService.GetLike
527
527
  */
528
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
+ }
529
555
  /**
530
556
  * Creates a query to retrieve a list of likes.
531
557
  *
@@ -698,4 +724,4 @@ interface DeleteLikeByFqdnAndEntityIdIdentifiers {
698
724
  entityId: string | null;
699
725
  }
700
726
 
701
- 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 };
@@ -120,6 +120,33 @@ function getLike(payload) {
120
120
  }
121
121
  return __getLike;
122
122
  }
123
+ function getLikeByFqdnAndEntityId(payload) {
124
+ function __getLikeByFqdnAndEntityId({ host }) {
125
+ const metadata = {
126
+ entityFqdn: "wix.blog.v1.like",
127
+ method: "GET",
128
+ methodFqn: "wix.blog.v1.LikeService.GetLikeByFqdnAndEntityId",
129
+ packageName: PACKAGE_NAME,
130
+ migrationOptions: {
131
+ optInTransformResponse: true
132
+ },
133
+ url: resolveWixBlogV1LikeServiceUrl({
134
+ protoPath: "/v1/likes/fqdn/{fqdn}/entity-id/{entityId}",
135
+ data: payload,
136
+ host
137
+ }),
138
+ params: toURLSearchParams(payload),
139
+ transformResponse: (payload2) => transformPaths(payload2, [
140
+ {
141
+ transformFn: transformRESTTimestampToSDKTimestamp,
142
+ paths: [{ path: "like.createdDate" }]
143
+ }
144
+ ])
145
+ };
146
+ return metadata;
147
+ }
148
+ return __getLikeByFqdnAndEntityId;
149
+ }
123
150
  function queryLikes(payload) {
124
151
  function __queryLikes({ host }) {
125
152
  const metadata = {
@@ -253,6 +280,35 @@ async function getLike2(likeId) {
253
280
  throw transformedError;
254
281
  }
255
282
  }
283
+ async function getLikeByFqdnAndEntityId2(identifiers) {
284
+ const { httpClient, sideEffects } = arguments[1];
285
+ const payload = renameKeysFromSDKRequestToRESTRequest({
286
+ fqdn: identifiers?.fqdn,
287
+ entityId: identifiers?.entityId
288
+ });
289
+ const reqOpts = getLikeByFqdnAndEntityId(payload);
290
+ sideEffects?.onSiteCall?.();
291
+ try {
292
+ const result = await httpClient.request(reqOpts);
293
+ sideEffects?.onSuccess?.(result);
294
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
295
+ } catch (err) {
296
+ const transformedError = sdkTransformError(
297
+ err,
298
+ {
299
+ spreadPathsToArguments: {},
300
+ explicitPathsToArguments: {
301
+ fqdn: "$[0].fqdn",
302
+ entityId: "$[0].entityId"
303
+ },
304
+ singleArgumentUnchanged: false
305
+ },
306
+ ["identifiers"]
307
+ );
308
+ sideEffects?.onError?.(err);
309
+ throw transformedError;
310
+ }
311
+ }
256
312
  function queryLikes2() {
257
313
  const { httpClient, sideEffects } = arguments[0];
258
314
  return queryBuilder({
@@ -376,6 +432,7 @@ export {
376
432
  deleteLike2 as deleteLike,
377
433
  deleteLikeByFqdnAndEntityId2 as deleteLikeByFqdnAndEntityId,
378
434
  getLike2 as getLike,
435
+ getLikeByFqdnAndEntityId2 as getLikeByFqdnAndEntityId,
379
436
  queryLikes2 as queryLikes,
380
437
  typedQueryLikes
381
438
  };