@wix/auto_sdk_blog_likes 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +10 -6
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +10 -6
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +10 -6
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +10 -6
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../index.ts","../../../src/blog-v1-like-likes.public.ts","../../../src/blog-v1-like-likes.universal.ts","../../../src/blog-v1-like-likes.http.ts","../../../src/blog-v1-like-likes.context.ts"],"sourcesContent":["export * from './src/blog-v1-like-likes.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CreateLikeOptions,\n CursorQuery,\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n Like,\n LikeCreatedEnvelope,\n LikeDeletedEnvelope,\n LikesQueryBuilder,\n QueryLikesResponse,\n createLike as universalCreateLike,\n deleteLike as universalDeleteLike,\n deleteLikeByFqdnAndEntityId as universalDeleteLikeByFqdnAndEntityId,\n getLike as universalGetLike,\n queryLikes as universalQueryLikes,\n typedQueryLikes as universalTypedQueryLikes,\n} from './blog-v1-like-likes.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/blog' };\n\nexport function createLike(httpClient: HttpClient): CreateLikeSignature {\n return (\n options?: NonNullablePaths<\n CreateLikeOptions,\n `like.entityId` | `like.fqdn`,\n 3\n >\n ) =>\n universalCreateLike(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateLikeSignature {\n /**\n * Creates a like for blog content.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n * @returns Created like.\n */\n (\n options?: NonNullablePaths<\n CreateLikeOptions,\n `like.entityId` | `like.fqdn`,\n 3\n >\n ): Promise<Like>;\n}\n\nexport function getLike(httpClient: HttpClient): GetLikeSignature {\n return (likeId: string) =>\n universalGetLike(\n likeId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetLikeSignature {\n /**\n * Retrieves a like.\n * @param - Like ID.\n * @returns Retrieved like.\n */\n (likeId: string): Promise<Like>;\n}\n\nexport function queryLikes(httpClient: HttpClient): QueryLikesSignature {\n return () =>\n universalQueryLikes(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryLikesSignature {\n /**\n * Retrieves a list of likes, given the provided paging, filtering, and sorting.\n *\n * Up to 100 likes can be returned per request.\n *\n * Query Likes runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `paging.limit` is `50`\n * - `paging.offset` is `0`\n */\n (): LikesQueryBuilder;\n}\n\nexport function typedQueryLikes(\n httpClient: HttpClient\n): TypedQueryLikesSignature {\n return (query: CursorQuery) =>\n universalTypedQueryLikes(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryLikesSignature {\n /** */\n (query: CursorQuery): Promise<\n NonNullablePaths<QueryLikesResponse, `likes`, 2>\n >;\n}\n\nexport function deleteLike(httpClient: HttpClient): DeleteLikeSignature {\n return (likeId: string) =>\n universalDeleteLike(\n likeId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteLikeSignature {\n /**\n * Deletes a like.\n * @param - ID of the like to delete.\n */\n (likeId: string): Promise<void>;\n}\n\nexport function deleteLikeByFqdnAndEntityId(\n httpClient: HttpClient\n): DeleteLikeByFqdnAndEntityIdSignature {\n return (\n identifiers: NonNullablePaths<\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n `entityId` | `fqdn`,\n 2\n >\n ) =>\n universalDeleteLikeByFqdnAndEntityId(\n identifiers,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteLikeByFqdnAndEntityIdSignature {\n /**\n * Deletes a site visitors' or members' like by blog content FQDN and entity ID.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n */\n (\n identifiers: NonNullablePaths<\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n `entityId` | `fqdn`,\n 2\n >\n ): Promise<void>;\n}\n\nexport const onLikeCreated = EventDefinition(\n 'wix.blog.v1.like_created',\n true,\n (event: LikeCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<LikeCreatedEnvelope>();\nexport const onLikeDeleted = EventDefinition(\n 'wix.blog.v1.like_deleted',\n true,\n (event: LikeDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<LikeDeletedEnvelope>();\n\nexport {\n ActionEvent,\n ApplicationError,\n BaseEventMetadata,\n BulkActionMetadata,\n BulkCreateLikesMigrationRequest,\n BulkCreateLikesMigrationResponse,\n CountLikesMigrationRequest,\n CountLikesMigrationResponse,\n CountLikesRequest,\n CountLikesResponse,\n CreateLikeOptions,\n CreateLikeRequest,\n CreateLikeResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n DeleteLikeByFqdnAndEntityIdRequest,\n DeleteLikeByFqdnAndEntityIdResponse,\n DeleteLikeRequest,\n DeleteLikeResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n GetLikeByFqdnAndEntityIdRequest,\n GetLikeByFqdnAndEntityIdResponse,\n GetLikeRequest,\n GetLikeResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ItemMetadata,\n Like,\n LikeCreatedEnvelope,\n LikeDeletedEnvelope,\n 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 { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBlogV1Like from './blog-v1-like-likes.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * A like represents a positive reaction to blog content.\n *\n * Likes are associated with specific blog content using their FQDN and entity ID,\n * allowing likes to be created for various types of blog content such as posts or comments.\n */\nexport interface Like {\n /**\n * Like ID.\n * @immutable\n * @format GUID\n */\n _id?: string | null;\n /**\n * Date and time the like was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * ID of the specific blog content being liked, such as a blog post or comment.\n * @format GUID\n */\n entityId?: string | null;\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn?: string | null;\n}\n\nexport interface CreateLikeRequest {\n /** Like to create. */\n like?: Like;\n}\n\nexport interface CreateLikeResponse {\n /** Created like. */\n like?: Like;\n}\n\nexport interface GetLikeRequest {\n /**\n * Like ID.\n * @format GUID\n */\n likeId: string | null;\n}\n\nexport interface GetLikeResponse {\n /** Retrieved like. */\n like?: Like;\n}\n\nexport interface GetLikeByFqdnAndEntityIdRequest {\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn?: string | null;\n /**\n * ID of the liked entity.\n * @format GUID\n */\n entityId?: string | null;\n}\n\nexport interface GetLikeByFqdnAndEntityIdResponse {\n /** Retrieved like. */\n like?: Like;\n}\n\nexport interface QueryLikesRequest {\n /** Query options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more details. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryLikesResponse {\n /** Retrieved likes. */\n likes?: Like[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface CountLikesRequest {\n /**\n * Fully qualified domain name of the liked entity. For example, `wix.blog.v3.post`.\n * @maxLength 256\n */\n fqdn?: string | null;\n /**\n * User identity ID.\n * @format GUID\n */\n identityId?: string | null;\n}\n\nexport interface CountLikesResponse {\n /** Number of likes. */\n count?: number;\n}\n\nexport interface DeleteLikeRequest {\n /**\n * ID of the like to delete.\n * @format GUID\n */\n likeId: string | null;\n}\n\nexport interface DeleteLikeResponse {}\n\nexport interface DeleteLikeByFqdnAndEntityIdRequest {\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn: string | null;\n /**\n * ID of the specific blog content being liked.\n * @format GUID\n */\n entityId: string | null;\n}\n\nexport interface DeleteLikeByFqdnAndEntityIdResponse {}\n\nexport interface BulkCreateLikesMigrationRequest {\n /**\n * Likes to create.\n * @minSize 1\n * @maxSize 50\n */\n likes?: MigrationLike[];\n}\n\n/** Like object used for migration purposes with additional user identity fields. */\nexport interface MigrationLike {\n /** Date and time the like was created. */\n _createdDate?: Date | null;\n /**\n * ID of the liked entity.\n * @format GUID\n */\n entityId?: string | null;\n /**\n * ID of the member who created the like.\n * @format GUID\n */\n memberId?: string | null;\n /**\n * ID of the anonymous user who created the like.\n * @format GUID\n */\n anonymousUserId?: string | null;\n}\n\nexport interface BulkCreateLikesMigrationResponse {\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n /** Metadata for each created like. */\n itemMetadata?: ItemMetadata[];\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface CountLikesMigrationRequest {}\n\nexport interface CountLikesMigrationResponse {\n /** Total number of likes. */\n count?: number;\n}\n\nexport interface QueryLikesMigrationRequest {\n /** Query options. */\n query?: CursorQuery;\n}\n\nexport interface QueryLikesMigrationResponse {\n /** Retrieved likes. */\n likes?: Like[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface LikeCreatedEnvelope {\n entity: Like;\n metadata: EventMetadata;\n}\n\n/**\n * Triggers when a like is created.\n * @permissionScope Read Blog\n * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS\n * @permissionScope Manage Blog\n * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG\n * @permissionScope Read Draft Blog Posts\n * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS\n * @permissionId BLOG.LIKE_READ\n * @webhook\n * @eventType wix.blog.v1.like_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onLikeCreated(\n handler: (event: LikeCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface LikeDeletedEnvelope {\n entity: Like;\n metadata: EventMetadata;\n}\n\n/**\n * Triggers when a like is deleted.\n * @permissionScope Read Blog\n * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS\n * @permissionScope Manage Blog\n * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG\n * @permissionScope Read Draft Blog Posts\n * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS\n * @permissionId BLOG.LIKE_READ\n * @webhook\n * @eventType wix.blog.v1.like_deleted\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onLikeDeleted(\n handler: (event: LikeDeletedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a like for blog content.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n * @public\n * @documentationMaturity preview\n * @requiredField options.like.entityId\n * @requiredField options.like.fqdn\n * @permissionId BLOG.LIKE_CREATE\n * @applicableIdentity APP\n * @returns Created like.\n * @fqn wix.blog.v1.LikeService.CreateLike\n */\nexport async function createLike(\n options?: NonNullablePaths<\n CreateLikeOptions,\n `like.entityId` | `like.fqdn`,\n 3\n >\n): Promise<Like> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n like: options?.like,\n });\n\n const reqOpts = ambassadorWixBlogV1Like.createLike(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.like!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { like: '$[0].like' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateLikeOptions {\n /** Like to create. */\n like?: Like;\n}\n\n/**\n * Retrieves a like.\n * @param likeId - Like ID.\n * @public\n * @documentationMaturity preview\n * @requiredField likeId\n * @permissionId BLOG.LIKE_READ\n * @applicableIdentity APP\n * @returns Retrieved like.\n * @fqn wix.blog.v1.LikeService.GetLike\n */\nexport async function getLike(likeId: string): Promise<Like> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ likeId: likeId });\n\n const reqOpts = ambassadorWixBlogV1Like.getLike(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.like!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { likeId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['likeId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of likes, given the provided paging, filtering, and sorting.\n *\n * Up to 100 likes can be returned per request.\n *\n * Query Likes runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `paging.limit` is `50`\n * - `paging.offset` is `0`\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: CursorQuery\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\n/**\n * Deletes a like.\n * @param likeId - ID of the like to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField likeId\n * @permissionId BLOG.LIKE_DELETE\n * @applicableIdentity APP\n * @fqn wix.blog.v1.LikeService.DeleteLike\n */\nexport async function deleteLike(likeId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ likeId: likeId });\n\n const reqOpts = ambassadorWixBlogV1Like.deleteLike(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { likeId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['likeId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes a site visitors' or members' like by blog content FQDN and entity ID.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n * @public\n * @documentationMaturity preview\n * @requiredField identifiers\n * @requiredField identifiers.entityId\n * @requiredField identifiers.fqdn\n * @permissionId BLOG.LIKE_DELETE\n * @applicableIdentity APP\n * @fqn wix.blog.v1.LikeService.DeleteLikeByFqdnAndEntityId\n */\nexport async function deleteLikeByFqdnAndEntityId(\n identifiers: NonNullablePaths<\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n `entityId` | `fqdn`,\n 2\n >\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n fqdn: identifiers?.fqdn,\n entityId: identifiers?.entityId,\n });\n\n const reqOpts = ambassadorWixBlogV1Like.deleteLikeByFqdnAndEntityId(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n fqdn: '$[0].fqdn',\n entityId: '$[0].entityId',\n },\n singleArgumentUnchanged: false,\n },\n ['identifiers']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteLikeByFqdnAndEntityIdIdentifiers {\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn: string | null;\n /**\n * ID of the specific blog content being liked.\n * @format GUID\n */\n entityId: string | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBlogV1LikeServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/blog-like-service',\n destPath: '',\n },\n ],\n 'social-blog._base_domain_': [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/blog/v1/likes',\n destPath: '/v1/likes',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/blog/v1/likes',\n destPath: '/v1/likes',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_blog_likes';\n\n/**\n * Creates a like for blog content.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n */\nexport function createLike(payload: object): RequestOptionsFactory<any> {\n function __createLike({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'like.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'POST' as any,\n methodFqn: 'wix.blog.v1.LikeService.CreateLike',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'like.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createLike;\n}\n\n/** Retrieves a like. */\nexport function getLike(payload: object): RequestOptionsFactory<any> {\n function __getLike({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'GET' as any,\n methodFqn: 'wix.blog.v1.LikeService.GetLike',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/{likeId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'like.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getLike;\n}\n\n/**\n * Retrieves a list of likes, given the provided paging, filtering, and sorting.\n *\n * Up to 100 likes can be returned per request.\n *\n * Query Likes runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `paging.limit` is `50`\n * - `paging.offset` is `0`\n */\nexport function queryLikes(payload: object): RequestOptionsFactory<any> {\n function __queryLikes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'POST' as any,\n methodFqn: 'wix.blog.v1.LikeService.QueryLikes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'likes.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryLikes;\n}\n\n/** Deletes a like. */\nexport function deleteLike(payload: object): RequestOptionsFactory<any> {\n function __deleteLike({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'DELETE' as any,\n methodFqn: 'wix.blog.v1.LikeService.DeleteLike',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/{likeId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteLike;\n}\n\n/**\n * Deletes a site visitors' or members' like by blog content FQDN and entity ID.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n */\nexport function deleteLikeByFqdnAndEntityId(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteLikeByFqdnAndEntityId({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'DELETE' as any,\n methodFqn: 'wix.blog.v1.LikeService.DeleteLikeByFqdnAndEntityId',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/fqdn/{fqdn}/entity-id/{entityId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteLikeByFqdnAndEntityId;\n}\n","import {\n createLike as publicCreateLike,\n getLike as publicGetLike,\n queryLikes as publicQueryLikes,\n typedQueryLikes as publicTypedQueryLikes,\n deleteLike as publicDeleteLike,\n deleteLikeByFqdnAndEntityId as publicDeleteLikeByFqdnAndEntityId,\n} from './blog-v1-like-likes.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n CursorQuery,\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: CursorQuery) =>\n publicTypedQueryLikes(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): LikesQueryBuilder;\n function overloadedQuery(\n query: CursorQuery\n ): ReturnType<typeof universalTypedQueryLikes>;\n function overloadedQuery(query?: CursorQuery): 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 DeleteLikeByFqdnAndEntityIdIdentifiers,\n} from './blog-v1-like-likes.universal.js';\nexport {\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './blog-v1-like-likes.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA,kBAAAC;AAAA,EAAA,mCAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,kBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AAC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iCAA0C;AAS1C,SAAS,iBAAiB,YAAwB;AAChD,QAAM,aAAS,sDAA0B;AAAA,IACvC,sBAAsB,MAAMC,YAAiB,UAAU,EAAE;AAAA,IACzD,oBAAoB,CAAC,UACnBC,iBAAsB,UAAU,EAAE,KAAK;AAAA,IACzC,qBAAqB;AAAA,EACvB,CAAC;AAMD,WAAS,gBAAgB,OAA0B;AACjD,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,WAEK,2DAAiBA,QAAa;AACzC,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,+BAGK,2DAAiBA,4BAAiC;AAC7D,IAAML,cAEK,2DAAiB,gBAAgB;AAI5C,IAAMM,qBACkB,mDAAkB,aAAmB;AAI7D,IAAMC,qBACkB,mDAAkB,aAAmB;","names":["createLike","deleteLike","deleteLikeByFqdnAndEntityId","getLike","onLikeCreated","onLikeDeleted","queryLikes","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","import_transform_paths","SortOrder","WebhookIdentityType","createLike","sdkTransformError","getLike","queryLikes","deleteLike","deleteLikeByFqdnAndEntityId","createLike","getLike","queryLikes","typedQueryLikes","deleteLike","deleteLikeByFqdnAndEntityId","import_rest_modules","queryLikes","typedQueryLikes","createLike","getLike","deleteLike","deleteLikeByFqdnAndEntityId","onLikeCreated","onLikeDeleted"]}
|
|
1
|
+
{"version":3,"sources":["../../../index.ts","../../../src/blog-v1-like-likes.public.ts","../../../src/blog-v1-like-likes.universal.ts","../../../src/blog-v1-like-likes.http.ts","../../../src/blog-v1-like-likes.context.ts"],"sourcesContent":["export * from './src/blog-v1-like-likes.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CreateLikeOptions,\n CursorQuery,\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n Like,\n LikeCreatedEnvelope,\n LikeDeletedEnvelope,\n LikesQueryBuilder,\n QueryLikesResponse,\n createLike as universalCreateLike,\n deleteLike as universalDeleteLike,\n deleteLikeByFqdnAndEntityId as universalDeleteLikeByFqdnAndEntityId,\n getLike as universalGetLike,\n queryLikes as universalQueryLikes,\n typedQueryLikes as universalTypedQueryLikes,\n} from './blog-v1-like-likes.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/blog' };\n\nexport function createLike(httpClient: HttpClient): CreateLikeSignature {\n return (\n options?: NonNullablePaths<\n CreateLikeOptions,\n `like.entityId` | `like.fqdn`,\n 3\n >\n ) =>\n universalCreateLike(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateLikeSignature {\n /**\n * Creates a like for blog content.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n * @returns Created like.\n */\n (\n options?: NonNullablePaths<\n CreateLikeOptions,\n `like.entityId` | `like.fqdn`,\n 3\n >\n ): Promise<Like>;\n}\n\nexport function getLike(httpClient: HttpClient): GetLikeSignature {\n return (likeId: string) =>\n universalGetLike(\n likeId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetLikeSignature {\n /**\n * Retrieves a like.\n * @param - Like ID.\n * @returns Retrieved like.\n */\n (likeId: string): Promise<Like>;\n}\n\nexport function queryLikes(httpClient: HttpClient): QueryLikesSignature {\n return () =>\n universalQueryLikes(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryLikesSignature {\n /**\n * Creates a query to retrieve a list of likes.\n *\n *\n * The `queryLikes()` method builds a query to retrieve a list of likes and returns a [`LikesQueryBuilder`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/eq) object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/find) method.\n *\n * You can refine the query by chaining `LikesQueryBuilder` methods onto the query. `LikesQueryBuilder` methods enable you to sort, filter, and control the results `queryLikes()` returns.\n *\n * `queryLikes()` runs with these `LikesQueryBuilder` defaults, which you can override:\n *\n * - [`skip(0)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/skip-to)\n * - [`limit(50)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/limit)\n */\n (): LikesQueryBuilder;\n}\n\nexport function typedQueryLikes(\n httpClient: HttpClient\n): TypedQueryLikesSignature {\n return (query: CursorQuery) =>\n universalTypedQueryLikes(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryLikesSignature {\n /** */\n (query: CursorQuery): Promise<\n NonNullablePaths<QueryLikesResponse, `likes`, 2>\n >;\n}\n\nexport function deleteLike(httpClient: HttpClient): DeleteLikeSignature {\n return (likeId: string) =>\n universalDeleteLike(\n likeId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteLikeSignature {\n /**\n * Deletes a like.\n * @param - ID of the like to delete.\n */\n (likeId: string): Promise<void>;\n}\n\nexport function deleteLikeByFqdnAndEntityId(\n httpClient: HttpClient\n): DeleteLikeByFqdnAndEntityIdSignature {\n return (\n identifiers: NonNullablePaths<\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n `entityId` | `fqdn`,\n 2\n >\n ) =>\n universalDeleteLikeByFqdnAndEntityId(\n identifiers,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteLikeByFqdnAndEntityIdSignature {\n /**\n * Deletes a site visitors' or members' like by blog content FQDN and entity ID.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n */\n (\n identifiers: NonNullablePaths<\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n `entityId` | `fqdn`,\n 2\n >\n ): Promise<void>;\n}\n\nexport const onLikeCreated = EventDefinition(\n 'wix.blog.v1.like_created',\n true,\n (event: LikeCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<LikeCreatedEnvelope>();\nexport const onLikeDeleted = EventDefinition(\n 'wix.blog.v1.like_deleted',\n true,\n (event: LikeDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<LikeDeletedEnvelope>();\n\nexport {\n ActionEvent,\n ApplicationError,\n BaseEventMetadata,\n BulkActionMetadata,\n BulkCreateLikesMigrationRequest,\n BulkCreateLikesMigrationResponse,\n CountLikesMigrationRequest,\n CountLikesMigrationResponse,\n CountLikesRequest,\n CountLikesResponse,\n CreateLikeOptions,\n CreateLikeRequest,\n CreateLikeResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n DeleteLikeByFqdnAndEntityIdRequest,\n DeleteLikeByFqdnAndEntityIdResponse,\n DeleteLikeRequest,\n DeleteLikeResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n GetLikeByFqdnAndEntityIdRequest,\n GetLikeByFqdnAndEntityIdResponse,\n GetLikeRequest,\n GetLikeResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ItemMetadata,\n Like,\n LikeCreatedEnvelope,\n LikeDeletedEnvelope,\n 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 { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBlogV1Like from './blog-v1-like-likes.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * A like represents a positive reaction to blog content.\n *\n * Likes are associated with specific blog content using their FQDN and entity ID,\n * allowing likes to be created for various types of blog content such as posts or comments.\n */\nexport interface Like {\n /**\n * Like ID.\n * @immutable\n * @format GUID\n */\n _id?: string | null;\n /**\n * Date and time the like was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * ID of the specific blog content being liked, such as a blog post or comment.\n * @format GUID\n */\n entityId?: string | null;\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn?: string | null;\n}\n\nexport interface CreateLikeRequest {\n /** Like to create. */\n like?: Like;\n}\n\nexport interface CreateLikeResponse {\n /** Created like. */\n like?: Like;\n}\n\nexport interface GetLikeRequest {\n /**\n * Like ID.\n * @format GUID\n */\n likeId: string | null;\n}\n\nexport interface GetLikeResponse {\n /** Retrieved like. */\n like?: Like;\n}\n\nexport interface GetLikeByFqdnAndEntityIdRequest {\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn?: string | null;\n /**\n * ID of the liked entity.\n * @format GUID\n */\n entityId?: string | null;\n}\n\nexport interface GetLikeByFqdnAndEntityIdResponse {\n /** Retrieved like. */\n like?: Like;\n}\n\nexport interface QueryLikesRequest {\n /** Query options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more details. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryLikesResponse {\n /** Retrieved likes. */\n likes?: Like[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface CountLikesRequest {\n /**\n * Fully qualified domain name of the liked entity. For example, `wix.blog.v3.post`.\n * @maxLength 256\n */\n fqdn?: string | null;\n /**\n * User identity ID.\n * @format GUID\n */\n identityId?: string | null;\n}\n\nexport interface CountLikesResponse {\n /** Number of likes. */\n count?: number;\n}\n\nexport interface DeleteLikeRequest {\n /**\n * ID of the like to delete.\n * @format GUID\n */\n likeId: string | null;\n}\n\nexport interface DeleteLikeResponse {}\n\nexport interface DeleteLikeByFqdnAndEntityIdRequest {\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn: string | null;\n /**\n * ID of the specific blog content being liked.\n * @format GUID\n */\n entityId: string | null;\n}\n\nexport interface DeleteLikeByFqdnAndEntityIdResponse {}\n\nexport interface BulkCreateLikesMigrationRequest {\n /**\n * Likes to create.\n * @minSize 1\n * @maxSize 50\n */\n likes?: MigrationLike[];\n}\n\n/** Like object used for migration purposes with additional user identity fields. */\nexport interface MigrationLike {\n /** Date and time the like was created. */\n _createdDate?: Date | null;\n /**\n * ID of the liked entity.\n * @format GUID\n */\n entityId?: string | null;\n /**\n * ID of the member who created the like.\n * @format GUID\n */\n memberId?: string | null;\n /**\n * ID of the anonymous user who created the like.\n * @format GUID\n */\n anonymousUserId?: string | null;\n}\n\nexport interface BulkCreateLikesMigrationResponse {\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n /** Metadata for each created like. */\n itemMetadata?: ItemMetadata[];\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface CountLikesMigrationRequest {}\n\nexport interface CountLikesMigrationResponse {\n /** Total number of likes. */\n count?: number;\n}\n\nexport interface QueryLikesMigrationRequest {\n /** Query options. */\n query?: CursorQuery;\n}\n\nexport interface QueryLikesMigrationResponse {\n /** Retrieved likes. */\n likes?: Like[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface LikeCreatedEnvelope {\n entity: Like;\n metadata: EventMetadata;\n}\n\n/**\n * Triggers when a like is created.\n * @permissionScope Read Blog\n * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS\n * @permissionScope Manage Blog\n * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG\n * @permissionScope Read Draft Blog Posts\n * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS\n * @permissionId BLOG.LIKE_READ\n * @webhook\n * @eventType wix.blog.v1.like_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onLikeCreated(\n handler: (event: LikeCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface LikeDeletedEnvelope {\n entity: Like;\n metadata: EventMetadata;\n}\n\n/**\n * Triggers when a like is deleted.\n * @permissionScope Read Blog\n * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS\n * @permissionScope Manage Blog\n * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG\n * @permissionScope Read Draft Blog Posts\n * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS\n * @permissionId BLOG.LIKE_READ\n * @webhook\n * @eventType wix.blog.v1.like_deleted\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onLikeDeleted(\n handler: (event: LikeDeletedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a like for blog content.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n * @public\n * @documentationMaturity preview\n * @requiredField options.like.entityId\n * @requiredField options.like.fqdn\n * @permissionId BLOG.LIKE_CREATE\n * @applicableIdentity APP\n * @returns Created like.\n * @fqn wix.blog.v1.LikeService.CreateLike\n */\nexport async function createLike(\n options?: NonNullablePaths<\n CreateLikeOptions,\n `like.entityId` | `like.fqdn`,\n 3\n >\n): Promise<Like> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n like: options?.like,\n });\n\n const reqOpts = ambassadorWixBlogV1Like.createLike(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.like!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { like: '$[0].like' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateLikeOptions {\n /** Like to create. */\n like?: Like;\n}\n\n/**\n * Retrieves a like.\n * @param likeId - Like ID.\n * @public\n * @documentationMaturity preview\n * @requiredField likeId\n * @permissionId BLOG.LIKE_READ\n * @applicableIdentity APP\n * @returns Retrieved like.\n * @fqn wix.blog.v1.LikeService.GetLike\n */\nexport async function getLike(likeId: string): Promise<Like> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ likeId: likeId });\n\n const reqOpts = ambassadorWixBlogV1Like.getLike(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.like!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { likeId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['likeId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a query to retrieve a list of likes.\n *\n *\n * The `queryLikes()` method builds a query to retrieve a list of likes and returns a [`LikesQueryBuilder`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/eq) object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/find) method.\n *\n * You can refine the query by chaining `LikesQueryBuilder` methods onto the query. `LikesQueryBuilder` methods enable you to sort, filter, and control the results `queryLikes()` returns.\n *\n * `queryLikes()` runs with these `LikesQueryBuilder` defaults, which you can override:\n *\n * - [`skip(0)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/skip-to)\n * - [`limit(50)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/limit)\n * @public\n * @documentationMaturity preview\n * @permissionId BLOG.LIKE_READ\n * @applicableIdentity APP\n * @fqn wix.blog.v1.LikeService.QueryLikes\n */\nexport function queryLikes(): LikesQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<Like, 'CURSOR', QueryLikesRequest, QueryLikesResponse>({\n func: async (payload: QueryLikesRequest) => {\n const reqOpts = ambassadorWixBlogV1Like.queryLikes(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryLikesRequest['query']) => {\n const args = [query, {}] as [QueryLikesRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryLikesResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.likes,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface LikesQueryResult extends QueryCursorResult {\n items: Like[];\n query: LikesQueryBuilder;\n next: () => Promise<LikesQueryResult>;\n prev: () => Promise<LikesQueryResult>;\n}\n\nexport interface LikesQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName: '_id' | 'entityId' | 'fqdn',\n value: any\n ) => LikesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName: '_id' | 'entityId' | 'fqdn',\n value: any\n ) => LikesQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName: '_id' | 'entityId' | 'fqdn',\n value: any\n ) => LikesQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => LikesQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => LikesQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<LikesQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.blog.v1.LikeService.QueryLikes\n * @requiredField query\n */\nexport async function typedQueryLikes(\n query: CursorQuery\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\n/**\n * Deletes a like.\n * @param likeId - ID of the like to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField likeId\n * @permissionId BLOG.LIKE_DELETE\n * @applicableIdentity APP\n * @fqn wix.blog.v1.LikeService.DeleteLike\n */\nexport async function deleteLike(likeId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ likeId: likeId });\n\n const reqOpts = ambassadorWixBlogV1Like.deleteLike(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { likeId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['likeId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes a site visitors' or members' like by blog content FQDN and entity ID.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n * @public\n * @documentationMaturity preview\n * @requiredField identifiers\n * @requiredField identifiers.entityId\n * @requiredField identifiers.fqdn\n * @permissionId BLOG.LIKE_DELETE\n * @applicableIdentity APP\n * @fqn wix.blog.v1.LikeService.DeleteLikeByFqdnAndEntityId\n */\nexport async function deleteLikeByFqdnAndEntityId(\n identifiers: NonNullablePaths<\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n `entityId` | `fqdn`,\n 2\n >\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n fqdn: identifiers?.fqdn,\n entityId: identifiers?.entityId,\n });\n\n const reqOpts = ambassadorWixBlogV1Like.deleteLikeByFqdnAndEntityId(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n fqdn: '$[0].fqdn',\n entityId: '$[0].entityId',\n },\n singleArgumentUnchanged: false,\n },\n ['identifiers']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteLikeByFqdnAndEntityIdIdentifiers {\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn: string | null;\n /**\n * ID of the specific blog content being liked.\n * @format GUID\n */\n entityId: string | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBlogV1LikeServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/blog-like-service',\n destPath: '',\n },\n ],\n 'social-blog._base_domain_': [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/blog/v1/likes',\n destPath: '/v1/likes',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/blog/v1/likes',\n destPath: '/v1/likes',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_blog_likes';\n\n/**\n * Creates a like for blog content.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n */\nexport function createLike(payload: object): RequestOptionsFactory<any> {\n function __createLike({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'like.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'POST' as any,\n methodFqn: 'wix.blog.v1.LikeService.CreateLike',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'like.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createLike;\n}\n\n/** Retrieves a like. */\nexport function getLike(payload: object): RequestOptionsFactory<any> {\n function __getLike({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'GET' as any,\n methodFqn: 'wix.blog.v1.LikeService.GetLike',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/{likeId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'like.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getLike;\n}\n\n/**\n * Creates a query to retrieve a list of likes.\n *\n *\n * The `queryLikes()` method builds a query to retrieve a list of likes and returns a [`LikesQueryBuilder`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/eq) object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/find) method.\n *\n * You can refine the query by chaining `LikesQueryBuilder` methods onto the query. `LikesQueryBuilder` methods enable you to sort, filter, and control the results `queryLikes()` returns.\n *\n * `queryLikes()` runs with these `LikesQueryBuilder` defaults, which you can override:\n *\n * - [`skip(0)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/skip-to)\n * - [`limit(50)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/limit)\n */\nexport function queryLikes(payload: object): RequestOptionsFactory<any> {\n function __queryLikes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'POST' as any,\n methodFqn: 'wix.blog.v1.LikeService.QueryLikes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'likes.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryLikes;\n}\n\n/** Deletes a like. */\nexport function deleteLike(payload: object): RequestOptionsFactory<any> {\n function __deleteLike({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'DELETE' as any,\n methodFqn: 'wix.blog.v1.LikeService.DeleteLike',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/{likeId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteLike;\n}\n\n/**\n * Deletes a site visitors' or members' like by blog content FQDN and entity ID.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n */\nexport function deleteLikeByFqdnAndEntityId(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteLikeByFqdnAndEntityId({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'DELETE' as any,\n methodFqn: 'wix.blog.v1.LikeService.DeleteLikeByFqdnAndEntityId',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/fqdn/{fqdn}/entity-id/{entityId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteLikeByFqdnAndEntityId;\n}\n","import {\n createLike as publicCreateLike,\n getLike as publicGetLike,\n queryLikes as publicQueryLikes,\n typedQueryLikes as publicTypedQueryLikes,\n deleteLike as publicDeleteLike,\n deleteLikeByFqdnAndEntityId as publicDeleteLikeByFqdnAndEntityId,\n} from './blog-v1-like-likes.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n CursorQuery,\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: CursorQuery) =>\n publicTypedQueryLikes(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): LikesQueryBuilder;\n function overloadedQuery(\n query: CursorQuery\n ): ReturnType<typeof universalTypedQueryLikes>;\n function overloadedQuery(query?: CursorQuery): 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 DeleteLikeByFqdnAndEntityIdIdentifiers,\n} from './blog-v1-like-likes.universal.js';\nexport {\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './blog-v1-like-likes.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA,kBAAAC;AAAA,EAAA,mCAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,kBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B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AAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAuB;;;AG/LvB,IAAAC,uBAAiC;AACjC,sCAAkC;AAOlC,iCAA0C;AAS1C,SAAS,iBAAiB,YAAwB;AAChD,QAAM,aAAS,sDAA0B;AAAA,IACvC,sBAAsB,MAAMC,YAAiB,UAAU,EAAE;AAAA,IACzD,oBAAoB,CAAC,UACnBC,iBAAsB,UAAU,EAAE,KAAK;AAAA,IACzC,qBAAqB;AAAA,EACvB,CAAC;AAMD,WAAS,gBAAgB,OAA0B;AACjD,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,WAEK,2DAAiBA,QAAa;AACzC,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,+BAGK,2DAAiBA,4BAAiC;AAC7D,IAAML,cAEK,2DAAiB,gBAAgB;AAI5C,IAAMM,qBACkB,mDAAkB,aAAmB;AAI7D,IAAMC,qBACkB,mDAAkB,aAAmB;","names":["createLike","deleteLike","deleteLikeByFqdnAndEntityId","getLike","onLikeCreated","onLikeDeleted","queryLikes","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","import_transform_paths","SortOrder","WebhookIdentityType","createLike","sdkTransformError","getLike","queryLikes","deleteLike","deleteLikeByFqdnAndEntityId","createLike","getLike","queryLikes","typedQueryLikes","deleteLike","deleteLikeByFqdnAndEntityId","import_rest_modules","queryLikes","typedQueryLikes","createLike","getLike","deleteLike","deleteLikeByFqdnAndEntityId","onLikeCreated","onLikeDeleted"]}
|
|
@@ -524,15 +524,19 @@ interface CreateLikeOptions {
|
|
|
524
524
|
*/
|
|
525
525
|
declare function getLike(likeId: string): Promise<Like>;
|
|
526
526
|
/**
|
|
527
|
-
*
|
|
527
|
+
* Creates a query to retrieve a list of likes.
|
|
528
528
|
*
|
|
529
|
-
* Up to 100 likes can be returned per request.
|
|
530
529
|
*
|
|
531
|
-
*
|
|
530
|
+
* 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.
|
|
532
531
|
*
|
|
533
|
-
*
|
|
534
|
-
*
|
|
535
|
-
*
|
|
532
|
+
* 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.
|
|
533
|
+
*
|
|
534
|
+
* 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.
|
|
535
|
+
*
|
|
536
|
+
* `queryLikes()` runs with these `LikesQueryBuilder` defaults, which you can override:
|
|
537
|
+
*
|
|
538
|
+
* - [`skip(0)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/skip-to)
|
|
539
|
+
* - [`limit(50)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/limit)
|
|
536
540
|
* @public
|
|
537
541
|
* @documentationMaturity preview
|
|
538
542
|
* @permissionId BLOG.LIKE_READ
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../index.typings.ts","../../../src/blog-v1-like-likes.universal.ts","../../../src/blog-v1-like-likes.http.ts"],"sourcesContent":["export * from './src/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 { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBlogV1Like from './blog-v1-like-likes.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * A like represents a positive reaction to blog content.\n *\n * Likes are associated with specific blog content using their FQDN and entity ID,\n * allowing likes to be created for various types of blog content such as posts or comments.\n */\nexport interface Like {\n /**\n * Like ID.\n * @immutable\n * @format GUID\n */\n _id?: string | null;\n /**\n * Date and time the like was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * ID of the specific blog content being liked, such as a blog post or comment.\n * @format GUID\n */\n entityId?: string | null;\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn?: string | null;\n}\n\nexport interface CreateLikeRequest {\n /** Like to create. */\n like?: Like;\n}\n\nexport interface CreateLikeResponse {\n /** Created like. */\n like?: Like;\n}\n\nexport interface GetLikeRequest {\n /**\n * Like ID.\n * @format GUID\n */\n likeId: string | null;\n}\n\nexport interface GetLikeResponse {\n /** Retrieved like. */\n like?: Like;\n}\n\nexport interface GetLikeByFqdnAndEntityIdRequest {\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn?: string | null;\n /**\n * ID of the liked entity.\n * @format GUID\n */\n entityId?: string | null;\n}\n\nexport interface GetLikeByFqdnAndEntityIdResponse {\n /** Retrieved like. */\n like?: Like;\n}\n\nexport interface QueryLikesRequest {\n /** Query options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more details. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryLikesResponse {\n /** Retrieved likes. */\n likes?: Like[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface CountLikesRequest {\n /**\n * Fully qualified domain name of the liked entity. For example, `wix.blog.v3.post`.\n * @maxLength 256\n */\n fqdn?: string | null;\n /**\n * User identity ID.\n * @format GUID\n */\n identityId?: string | null;\n}\n\nexport interface CountLikesResponse {\n /** Number of likes. */\n count?: number;\n}\n\nexport interface DeleteLikeRequest {\n /**\n * ID of the like to delete.\n * @format GUID\n */\n likeId: string | null;\n}\n\nexport interface DeleteLikeResponse {}\n\nexport interface DeleteLikeByFqdnAndEntityIdRequest {\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn: string | null;\n /**\n * ID of the specific blog content being liked.\n * @format GUID\n */\n entityId: string | null;\n}\n\nexport interface DeleteLikeByFqdnAndEntityIdResponse {}\n\nexport interface BulkCreateLikesMigrationRequest {\n /**\n * Likes to create.\n * @minSize 1\n * @maxSize 50\n */\n likes?: MigrationLike[];\n}\n\n/** Like object used for migration purposes with additional user identity fields. */\nexport interface MigrationLike {\n /** Date and time the like was created. */\n _createdDate?: Date | null;\n /**\n * ID of the liked entity.\n * @format GUID\n */\n entityId?: string | null;\n /**\n * ID of the member who created the like.\n * @format GUID\n */\n memberId?: string | null;\n /**\n * ID of the anonymous user who created the like.\n * @format GUID\n */\n anonymousUserId?: string | null;\n}\n\nexport interface BulkCreateLikesMigrationResponse {\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n /** Metadata for each created like. */\n itemMetadata?: ItemMetadata[];\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface CountLikesMigrationRequest {}\n\nexport interface CountLikesMigrationResponse {\n /** Total number of likes. */\n count?: number;\n}\n\nexport interface QueryLikesMigrationRequest {\n /** Query options. */\n query?: CursorQuery;\n}\n\nexport interface QueryLikesMigrationResponse {\n /** Retrieved likes. */\n likes?: Like[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface LikeCreatedEnvelope {\n entity: Like;\n metadata: EventMetadata;\n}\n\n/**\n * Triggers when a like is created.\n * @permissionScope Read Blog\n * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS\n * @permissionScope Manage Blog\n * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG\n * @permissionScope Read Draft Blog Posts\n * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS\n * @permissionId BLOG.LIKE_READ\n * @webhook\n * @eventType wix.blog.v1.like_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onLikeCreated(\n handler: (event: LikeCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface LikeDeletedEnvelope {\n entity: Like;\n metadata: EventMetadata;\n}\n\n/**\n * Triggers when a like is deleted.\n * @permissionScope Read Blog\n * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS\n * @permissionScope Manage Blog\n * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG\n * @permissionScope Read Draft Blog Posts\n * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS\n * @permissionId BLOG.LIKE_READ\n * @webhook\n * @eventType wix.blog.v1.like_deleted\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onLikeDeleted(\n handler: (event: LikeDeletedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a like for blog content.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n * @public\n * @documentationMaturity preview\n * @requiredField options.like.entityId\n * @requiredField options.like.fqdn\n * @permissionId BLOG.LIKE_CREATE\n * @applicableIdentity APP\n * @returns Created like.\n * @fqn wix.blog.v1.LikeService.CreateLike\n */\nexport async function createLike(\n options?: NonNullablePaths<\n CreateLikeOptions,\n `like.entityId` | `like.fqdn`,\n 3\n >\n): Promise<Like> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n like: options?.like,\n });\n\n const reqOpts = ambassadorWixBlogV1Like.createLike(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.like!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { like: '$[0].like' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateLikeOptions {\n /** Like to create. */\n like?: Like;\n}\n\n/**\n * Retrieves a like.\n * @param likeId - Like ID.\n * @public\n * @documentationMaturity preview\n * @requiredField likeId\n * @permissionId BLOG.LIKE_READ\n * @applicableIdentity APP\n * @returns Retrieved like.\n * @fqn wix.blog.v1.LikeService.GetLike\n */\nexport async function getLike(likeId: string): Promise<Like> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ likeId: likeId });\n\n const reqOpts = ambassadorWixBlogV1Like.getLike(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.like!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { likeId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['likeId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of likes, given the provided paging, filtering, and sorting.\n *\n * Up to 100 likes can be returned per request.\n *\n * Query Likes runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `paging.limit` is `50`\n * - `paging.offset` is `0`\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: CursorQuery\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\n/**\n * Deletes a like.\n * @param likeId - ID of the like to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField likeId\n * @permissionId BLOG.LIKE_DELETE\n * @applicableIdentity APP\n * @fqn wix.blog.v1.LikeService.DeleteLike\n */\nexport async function deleteLike(likeId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ likeId: likeId });\n\n const reqOpts = ambassadorWixBlogV1Like.deleteLike(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { likeId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['likeId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes a site visitors' or members' like by blog content FQDN and entity ID.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n * @public\n * @documentationMaturity preview\n * @requiredField identifiers\n * @requiredField identifiers.entityId\n * @requiredField identifiers.fqdn\n * @permissionId BLOG.LIKE_DELETE\n * @applicableIdentity APP\n * @fqn wix.blog.v1.LikeService.DeleteLikeByFqdnAndEntityId\n */\nexport async function deleteLikeByFqdnAndEntityId(\n identifiers: NonNullablePaths<\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n `entityId` | `fqdn`,\n 2\n >\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n fqdn: identifiers?.fqdn,\n entityId: identifiers?.entityId,\n });\n\n const reqOpts = ambassadorWixBlogV1Like.deleteLikeByFqdnAndEntityId(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n fqdn: '$[0].fqdn',\n entityId: '$[0].entityId',\n },\n singleArgumentUnchanged: false,\n },\n ['identifiers']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteLikeByFqdnAndEntityIdIdentifiers {\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn: string | null;\n /**\n * ID of the specific blog content being liked.\n * @format GUID\n */\n entityId: string | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBlogV1LikeServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/blog-like-service',\n destPath: '',\n },\n ],\n 'social-blog._base_domain_': [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/blog/v1/likes',\n destPath: '/v1/likes',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/blog/v1/likes',\n destPath: '/v1/likes',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_blog_likes';\n\n/**\n * Creates a like for blog content.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n */\nexport function createLike(payload: object): RequestOptionsFactory<any> {\n function __createLike({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'like.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'POST' as any,\n methodFqn: 'wix.blog.v1.LikeService.CreateLike',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'like.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createLike;\n}\n\n/** Retrieves a like. */\nexport function getLike(payload: object): RequestOptionsFactory<any> {\n function __getLike({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'GET' as any,\n methodFqn: 'wix.blog.v1.LikeService.GetLike',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/{likeId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'like.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getLike;\n}\n\n/**\n * Retrieves a list of likes, given the provided paging, filtering, and sorting.\n *\n * Up to 100 likes can be returned per request.\n *\n * Query Likes runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `paging.limit` is `50`\n * - `paging.offset` is `0`\n */\nexport function queryLikes(payload: object): RequestOptionsFactory<any> {\n function __queryLikes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'POST' as any,\n methodFqn: 'wix.blog.v1.LikeService.QueryLikes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'likes.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryLikes;\n}\n\n/** Deletes a like. */\nexport function deleteLike(payload: object): RequestOptionsFactory<any> {\n function __deleteLike({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'DELETE' as any,\n methodFqn: 'wix.blog.v1.LikeService.DeleteLike',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/{likeId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteLike;\n}\n\n/**\n * Deletes a site visitors' or members' like by blog content FQDN and entity ID.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n */\nexport function deleteLikeByFqdnAndEntityId(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteLikeByFqdnAndEntityId({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'DELETE' as any,\n methodFqn: 'wix.blog.v1.LikeService.DeleteLikeByFqdnAndEntityId',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/fqdn/{fqdn}/entity-id/{entityId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteLikeByFqdnAndEntityId;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA,kBAAAC;AAAA,EAAA,mCAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,+BACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,I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E,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC,EAAE,OAAe,CAAC;AAExE,QAAM,UAAkC,WAAW,OAAO;AAE1D,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAAA,EACjC,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAH;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,QAAQ,OAAO;AAAA,QAC3C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,QAAQ;AAAA,IACX;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAgBA,eAAsBI,6BACpB,aAKe;AAEf,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD,MAAM,aAAa;AAAA,IACnB,UAAU,aAAa;AAAA,EACzB,CAAC;AAED,QAAM,UAAkC,4BAA4B,OAAO;AAE3E,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAAA,EACjC,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAJ;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,MAAM;AAAA,UACN,UAAU;AAAA,QACZ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,aAAa;AAAA,IAChB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["createLike","deleteLike","deleteLikeByFqdnAndEntityId","getLike","queryLikes","import_timestamp","import_rest_modules","payload","import_transform_paths","SortOrder","WebhookIdentityType","createLike","sdkTransformError","getLike","queryLikes","deleteLike","deleteLikeByFqdnAndEntityId"]}
|
|
1
|
+
{"version":3,"sources":["../../../index.typings.ts","../../../src/blog-v1-like-likes.universal.ts","../../../src/blog-v1-like-likes.http.ts"],"sourcesContent":["export * from './src/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 { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBlogV1Like from './blog-v1-like-likes.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * A like represents a positive reaction to blog content.\n *\n * Likes are associated with specific blog content using their FQDN and entity ID,\n * allowing likes to be created for various types of blog content such as posts or comments.\n */\nexport interface Like {\n /**\n * Like ID.\n * @immutable\n * @format GUID\n */\n _id?: string | null;\n /**\n * Date and time the like was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * ID of the specific blog content being liked, such as a blog post or comment.\n * @format GUID\n */\n entityId?: string | null;\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn?: string | null;\n}\n\nexport interface CreateLikeRequest {\n /** Like to create. */\n like?: Like;\n}\n\nexport interface CreateLikeResponse {\n /** Created like. */\n like?: Like;\n}\n\nexport interface GetLikeRequest {\n /**\n * Like ID.\n * @format GUID\n */\n likeId: string | null;\n}\n\nexport interface GetLikeResponse {\n /** Retrieved like. */\n like?: Like;\n}\n\nexport interface GetLikeByFqdnAndEntityIdRequest {\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn?: string | null;\n /**\n * ID of the liked entity.\n * @format GUID\n */\n entityId?: string | null;\n}\n\nexport interface GetLikeByFqdnAndEntityIdResponse {\n /** Retrieved like. */\n like?: Like;\n}\n\nexport interface QueryLikesRequest {\n /** Query options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more details. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryLikesResponse {\n /** Retrieved likes. */\n likes?: Like[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface CountLikesRequest {\n /**\n * Fully qualified domain name of the liked entity. For example, `wix.blog.v3.post`.\n * @maxLength 256\n */\n fqdn?: string | null;\n /**\n * User identity ID.\n * @format GUID\n */\n identityId?: string | null;\n}\n\nexport interface CountLikesResponse {\n /** Number of likes. */\n count?: number;\n}\n\nexport interface DeleteLikeRequest {\n /**\n * ID of the like to delete.\n * @format GUID\n */\n likeId: string | null;\n}\n\nexport interface DeleteLikeResponse {}\n\nexport interface DeleteLikeByFqdnAndEntityIdRequest {\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn: string | null;\n /**\n * ID of the specific blog content being liked.\n * @format GUID\n */\n entityId: string | null;\n}\n\nexport interface DeleteLikeByFqdnAndEntityIdResponse {}\n\nexport interface BulkCreateLikesMigrationRequest {\n /**\n * Likes to create.\n * @minSize 1\n * @maxSize 50\n */\n likes?: MigrationLike[];\n}\n\n/** Like object used for migration purposes with additional user identity fields. */\nexport interface MigrationLike {\n /** Date and time the like was created. */\n _createdDate?: Date | null;\n /**\n * ID of the liked entity.\n * @format GUID\n */\n entityId?: string | null;\n /**\n * ID of the member who created the like.\n * @format GUID\n */\n memberId?: string | null;\n /**\n * ID of the anonymous user who created the like.\n * @format GUID\n */\n anonymousUserId?: string | null;\n}\n\nexport interface BulkCreateLikesMigrationResponse {\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n /** Metadata for each created like. */\n itemMetadata?: ItemMetadata[];\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface ItemMetadata {\n /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface CountLikesMigrationRequest {}\n\nexport interface CountLikesMigrationResponse {\n /** Total number of likes. */\n count?: number;\n}\n\nexport interface QueryLikesMigrationRequest {\n /** Query options. */\n query?: CursorQuery;\n}\n\nexport interface QueryLikesMigrationResponse {\n /** Retrieved likes. */\n likes?: Like[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\nexport interface LikeCreatedEnvelope {\n entity: Like;\n metadata: EventMetadata;\n}\n\n/**\n * Triggers when a like is created.\n * @permissionScope Read Blog\n * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS\n * @permissionScope Manage Blog\n * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG\n * @permissionScope Read Draft Blog Posts\n * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS\n * @permissionId BLOG.LIKE_READ\n * @webhook\n * @eventType wix.blog.v1.like_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onLikeCreated(\n handler: (event: LikeCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface LikeDeletedEnvelope {\n entity: Like;\n metadata: EventMetadata;\n}\n\n/**\n * Triggers when a like is deleted.\n * @permissionScope Read Blog\n * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS\n * @permissionScope Manage Blog\n * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG\n * @permissionScope Read Draft Blog Posts\n * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS\n * @permissionId BLOG.LIKE_READ\n * @webhook\n * @eventType wix.blog.v1.like_deleted\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onLikeDeleted(\n handler: (event: LikeDeletedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a like for blog content.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n * @public\n * @documentationMaturity preview\n * @requiredField options.like.entityId\n * @requiredField options.like.fqdn\n * @permissionId BLOG.LIKE_CREATE\n * @applicableIdentity APP\n * @returns Created like.\n * @fqn wix.blog.v1.LikeService.CreateLike\n */\nexport async function createLike(\n options?: NonNullablePaths<\n CreateLikeOptions,\n `like.entityId` | `like.fqdn`,\n 3\n >\n): Promise<Like> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n like: options?.like,\n });\n\n const reqOpts = ambassadorWixBlogV1Like.createLike(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.like!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { like: '$[0].like' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateLikeOptions {\n /** Like to create. */\n like?: Like;\n}\n\n/**\n * Retrieves a like.\n * @param likeId - Like ID.\n * @public\n * @documentationMaturity preview\n * @requiredField likeId\n * @permissionId BLOG.LIKE_READ\n * @applicableIdentity APP\n * @returns Retrieved like.\n * @fqn wix.blog.v1.LikeService.GetLike\n */\nexport async function getLike(likeId: string): Promise<Like> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ likeId: likeId });\n\n const reqOpts = ambassadorWixBlogV1Like.getLike(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.like!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { likeId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['likeId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates a query to retrieve a list of likes.\n *\n *\n * The `queryLikes()` method builds a query to retrieve a list of likes and returns a [`LikesQueryBuilder`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/eq) object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/find) method.\n *\n * You can refine the query by chaining `LikesQueryBuilder` methods onto the query. `LikesQueryBuilder` methods enable you to sort, filter, and control the results `queryLikes()` returns.\n *\n * `queryLikes()` runs with these `LikesQueryBuilder` defaults, which you can override:\n *\n * - [`skip(0)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/skip-to)\n * - [`limit(50)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/limit)\n * @public\n * @documentationMaturity preview\n * @permissionId BLOG.LIKE_READ\n * @applicableIdentity APP\n * @fqn wix.blog.v1.LikeService.QueryLikes\n */\nexport function queryLikes(): LikesQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<Like, 'CURSOR', QueryLikesRequest, QueryLikesResponse>({\n func: async (payload: QueryLikesRequest) => {\n const reqOpts = ambassadorWixBlogV1Like.queryLikes(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryLikesRequest['query']) => {\n const args = [query, {}] as [QueryLikesRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryLikesResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.likes,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface LikesQueryResult extends QueryCursorResult {\n items: Like[];\n query: LikesQueryBuilder;\n next: () => Promise<LikesQueryResult>;\n prev: () => Promise<LikesQueryResult>;\n}\n\nexport interface LikesQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName: '_id' | 'entityId' | 'fqdn',\n value: any\n ) => LikesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName: '_id' | 'entityId' | 'fqdn',\n value: any\n ) => LikesQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName: '_id' | 'entityId' | 'fqdn',\n value: any\n ) => LikesQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => LikesQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => LikesQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<LikesQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.blog.v1.LikeService.QueryLikes\n * @requiredField query\n */\nexport async function typedQueryLikes(\n query: CursorQuery\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\n/**\n * Deletes a like.\n * @param likeId - ID of the like to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField likeId\n * @permissionId BLOG.LIKE_DELETE\n * @applicableIdentity APP\n * @fqn wix.blog.v1.LikeService.DeleteLike\n */\nexport async function deleteLike(likeId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ likeId: likeId });\n\n const reqOpts = ambassadorWixBlogV1Like.deleteLike(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { likeId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['likeId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes a site visitors' or members' like by blog content FQDN and entity ID.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n * @public\n * @documentationMaturity preview\n * @requiredField identifiers\n * @requiredField identifiers.entityId\n * @requiredField identifiers.fqdn\n * @permissionId BLOG.LIKE_DELETE\n * @applicableIdentity APP\n * @fqn wix.blog.v1.LikeService.DeleteLikeByFqdnAndEntityId\n */\nexport async function deleteLikeByFqdnAndEntityId(\n identifiers: NonNullablePaths<\n DeleteLikeByFqdnAndEntityIdIdentifiers,\n `entityId` | `fqdn`,\n 2\n >\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n fqdn: identifiers?.fqdn,\n entityId: identifiers?.entityId,\n });\n\n const reqOpts = ambassadorWixBlogV1Like.deleteLikeByFqdnAndEntityId(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n fqdn: '$[0].fqdn',\n entityId: '$[0].entityId',\n },\n singleArgumentUnchanged: false,\n },\n ['identifiers']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DeleteLikeByFqdnAndEntityIdIdentifiers {\n /**\n * Fully qualified domain name that identifies the type of blog content being liked. For example, `wix.blog.v3.post` for blog posts.\n * @maxLength 256\n */\n fqdn: string | null;\n /**\n * ID of the specific blog content being liked.\n * @format GUID\n */\n entityId: string | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBlogV1LikeServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/blog-like-service',\n destPath: '',\n },\n ],\n 'social-blog._base_domain_': [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'apps._base_domain_': [\n {\n srcPath: '/_api/blog-like-service',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/blog/v1/likes',\n destPath: '/v1/likes',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/blog/v1/likes',\n destPath: '/v1/likes',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_blog_likes';\n\n/**\n * Creates a like for blog content.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n */\nexport function createLike(payload: object): RequestOptionsFactory<any> {\n function __createLike({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'like.createdDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'POST' as any,\n methodFqn: 'wix.blog.v1.LikeService.CreateLike',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'like.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createLike;\n}\n\n/** Retrieves a like. */\nexport function getLike(payload: object): RequestOptionsFactory<any> {\n function __getLike({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'GET' as any,\n methodFqn: 'wix.blog.v1.LikeService.GetLike',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/{likeId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'like.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getLike;\n}\n\n/**\n * Creates a query to retrieve a list of likes.\n *\n *\n * The `queryLikes()` method builds a query to retrieve a list of likes and returns a [`LikesQueryBuilder`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/eq) object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/find) method.\n *\n * You can refine the query by chaining `LikesQueryBuilder` methods onto the query. `LikesQueryBuilder` methods enable you to sort, filter, and control the results `queryLikes()` returns.\n *\n * `queryLikes()` runs with these `LikesQueryBuilder` defaults, which you can override:\n *\n * - [`skip(0)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/skip-to)\n * - [`limit(50)`](https://dev.wix.com/docs/sdk/backend-modules/blog/likes/likes-query-builder/limit)\n */\nexport function queryLikes(payload: object): RequestOptionsFactory<any> {\n function __queryLikes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'POST' as any,\n methodFqn: 'wix.blog.v1.LikeService.QueryLikes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'likes.createdDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryLikes;\n}\n\n/** Deletes a like. */\nexport function deleteLike(payload: object): RequestOptionsFactory<any> {\n function __deleteLike({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'DELETE' as any,\n methodFqn: 'wix.blog.v1.LikeService.DeleteLike',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/{likeId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteLike;\n}\n\n/**\n * Deletes a site visitors' or members' like by blog content FQDN and entity ID.\n *\n * >**Note:**\n * >This method requires [visitor or member authentication](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/make-api-calls-with-oauth).\n */\nexport function deleteLikeByFqdnAndEntityId(\n payload: object\n): RequestOptionsFactory<any> {\n function __deleteLikeByFqdnAndEntityId({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.blog.v1.like',\n method: 'DELETE' as any,\n methodFqn: 'wix.blog.v1.LikeService.DeleteLikeByFqdnAndEntityId',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBlogV1LikeServiceUrl({\n protoPath: '/v1/likes/fqdn/{fqdn}/entity-id/{entityId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteLikeByFqdnAndEntityId;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA,kBAAAC;AAAA,EAAA,mCAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,+BACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA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AsC,EAAE,OAAe,CAAC;AAExE,QAAM,UAAkC,WAAW,OAAO;AAE1D,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAAA,EACjC,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAH;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,QAAQ,OAAO;AAAA,QAC3C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,QAAQ;AAAA,IACX;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAgBA,eAAsBI,6BACpB,aAKe;AAEf,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD,MAAM,aAAa;AAAA,IACnB,UAAU,aAAa;AAAA,EACzB,CAAC;AAED,QAAM,UAAkC,4BAA4B,OAAO;AAE3E,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAAA,EACjC,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAJ;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,MAAM;AAAA,UACN,UAAU;AAAA,QACZ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,aAAa;AAAA,IAChB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["createLike","deleteLike","deleteLikeByFqdnAndEntityId","getLike","queryLikes","import_timestamp","import_rest_modules","payload","import_transform_paths","SortOrder","WebhookIdentityType","createLike","sdkTransformError","getLike","queryLikes","deleteLike","deleteLikeByFqdnAndEntityId"]}
|