@wix/auto_sdk_events_item-groups 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 +4 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +12 -2
- package/build/cjs/index.typings.js +4 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +6 -1
- package/build/cjs/meta.js +4 -2
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +4 -2
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +12 -2
- package/build/es/index.typings.mjs +4 -2
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +6 -1
- package/build/es/meta.mjs +4 -2
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +12 -2
- package/build/internal/cjs/meta.d.ts +6 -1
- package/build/internal/es/index.typings.d.mts +12 -2
- package/build/internal/es/meta.d.mts +6 -1
- package/package.json +2 -2
package/build/es/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/events-itemgroups-v1-item-group-item-groups.universal.ts","../../src/events-itemgroups-v1-item-group-item-groups.http.ts","../../src/events-itemgroups-v1-item-group-item-groups.public.ts","../../src/events-itemgroups-v1-item-group-item-groups.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixEventsItemgroupsV1ItemGroup from './events-itemgroups-v1-item-group-item-groups.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\n/** A set of items, such as events or ticket definitions, that other features like coupons reference by one ID. */\nexport interface ItemGroup {\n /**\n * Item group ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the item group is updated. Pass the current revision when updating.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the item group was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the item group was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Type of the items in the group. Can't be changed.\n * @readonly\n * @immutable\n */\n itemType?: ItemTypeWithLiterals;\n /**\n * ID of the event the ticket definitions belong to. Required when `itemType` is `TICKET_DEFINITION`, empty otherwise. Can't be changed.\n * @format GUID\n * @readonly\n * @immutable\n */\n eventId?: string | null;\n /**\n * Items in the group, without duplicates. Empty when `itemType` is `ALL_EVENTS`, at least one item otherwise.\n * @maxSize 100\n */\n items?: Item[];\n /**\n * Feature that claimed the group, set by the server. Empty while unclaimed. When the owner stops using a group that others still use, one of them becomes the owner.\n * @readonly\n */\n owner?: Owner;\n /** Settings used only when the group belongs to a coupon. Empty when not used. */\n couponOptions?: CouponOptions;\n /** Tags. */\n tags?: Tags;\n}\n\nexport enum ItemType {\n /** Events. */\n EVENT = 'EVENT',\n /** Ticket definitions of one event. */\n TICKET_DEFINITION = 'TICKET_DEFINITION',\n /** Events of categories, including events added to them later. */\n CATEGORY = 'CATEGORY',\n /** All events. Lets group settings, such as `couponOptions`, apply to every event. */\n ALL_EVENTS = 'ALL_EVENTS',\n}\n\n/** @enumType */\nexport type ItemTypeWithLiterals =\n | ItemType\n | 'EVENT'\n | 'TICKET_DEFINITION'\n | 'CATEGORY'\n | 'ALL_EVENTS';\n\n/** An item in an item group. */\nexport interface Item {\n /**\n * ID of an item of the group's `itemType`.\n * @format GUID\n */\n _id?: string;\n}\n\n/** Feature that claimed an item group. */\nexport interface Owner {\n /** Type of the owner. */\n type?: TypeWithLiterals;\n /**\n * Owner ID, for example the coupon ID. Free-form, because some legacy coupon IDs aren't GUIDs.\n * @maxLength 100\n */\n _id?: string;\n}\n\nexport enum Type {\n /** Wix Coupons coupon. */\n COUPON = 'COUPON',\n}\n\n/** @enumType */\nexport type TypeWithLiterals = Type | 'COUPON';\n\n/** Settings used only when an item group belongs to a coupon. */\nexport interface CouponOptions {\n /**\n * Minimum order total, in the event's currency, for the coupon to apply. Empty means no minimum.\n * @decimalValue options { gt:0, maxScale:2 }\n */\n minimumSubtotal?: string | null;\n}\n\n/**\n * Common object for tags.\n * Should be use as in this example:\n * message Foo {\n * option (.wix.api.decomposite_of) = \"wix.commons.v2.tags.Foo\";\n * string id = 1;\n * ...\n * Tags tags = 5\n * }\n *\n * example of taggable entity\n * {\n * id: \"123\"\n * tags: {\n * public_tags: {\n * tag_ids:[\"11\",\"22\"]\n * },\n * private_tags: {\n * tag_ids: [\"33\", \"44\"]\n * }\n * }\n * }\n */\nexport interface Tags {\n /** Tags for back-office use, returned to anyone who can read the entity. */\n privateTags?: TagList;\n /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */\n publicTags?: TagList;\n}\n\nexport interface TagList {\n /**\n * List of tag IDs.\n * @maxSize 100\n * @maxLength 5\n */\n tagIds?: string[];\n}\n\nexport interface ItemGroupTagsModified {\n /** Updated item group. */\n itemGroup?: ItemGroup;\n /** Assigned tags. */\n assignedTags?: Tags;\n /** Unassigned tags. */\n unassignedTags?: Tags;\n}\n\nexport interface CreateItemGroupRequest {\n /** Item group to create. */\n itemGroup: ItemGroup;\n}\n\nexport interface CreateItemGroupResponse {\n /** Created item group. */\n itemGroup?: ItemGroup;\n}\n\nexport interface GetItemGroupRequest {\n /**\n * ID of the item group to retrieve.\n * @format GUID\n */\n itemGroupId: string;\n}\n\nexport interface GetItemGroupResponse {\n /** Requested item group. */\n itemGroup?: ItemGroup;\n}\n\nexport interface UpdateItemGroupRequest {\n /** Item group to update. Only `items` and `couponOptions` can be changed. */\n itemGroup: ItemGroup;\n /**\n * Fields to update.\n * @internal\n */\n fieldMask?: string[];\n}\n\nexport interface UpdateItemGroupResponse {\n /** Updated item group. */\n itemGroup?: ItemGroup;\n}\n\nexport interface DeleteItemGroupRequest {\n /**\n * ID of the item group to delete.\n * @format GUID\n */\n itemGroupId: string;\n}\n\nexport interface DeleteItemGroupResponse {}\n\nexport interface QueryItemGroupsRequest {\n /** Filter, sort and cursor paging for the query. */\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 the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\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 QueryItemGroupsResponse {\n /**\n * Matching item groups.\n * @maxSize 100\n */\n itemGroups?: ItemGroup[];\n /** Cursor 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 BulkUpdateItemGroupTagsRequest {\n /**\n * IDs of the item groups to update.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n itemGroupIds?: string[];\n /** Tags to assign. */\n assignTags?: Tags;\n /** Tags to unassign. */\n unassignTags?: Tags;\n}\n\nexport interface BulkUpdateItemGroupTagsResponse {\n /**\n * Result per item group.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkUpdateItemGroupTagsResult[];\n /** Metadata about the bulk operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed.\n * @format GUID\n */\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 for this item was successful. When `false`, the `error` field is returned. */\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 BulkUpdateItemGroupTagsResult {\n /** Result metadata. */\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 BulkUpdateItemGroupTagsByFilterRequest {\n /** Item groups to update. */\n filter?: Record<string, any> | null;\n /** Tags to assign. */\n assignTags?: Tags;\n /** Tags to unassign. */\n unassignTags?: Tags;\n}\n\nexport interface BulkUpdateItemGroupTagsByFilterResponse {\n /**\n * ID of the async job.\n * @format GUID\n */\n jobId?: string;\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 /** Details related to the account */\n accountInfo?: AccountInfo;\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 AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type CreateItemGroupApplicationErrors =\n | {\n code?: 'EVENT_ID_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'EVENT_ID_NOT_ALLOWED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_ITEMS';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type UpdateItemGroupApplicationErrors = {\n code?: 'INVALID_ITEMS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type DeleteItemGroupApplicationErrors = {\n code?: 'ITEM_GROUP_IN_USE';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Creates an unclaimed item group.\n * @param itemGroup - Item group to create.\n * @public\n * @documentationMaturity preview\n * @requiredField itemGroup\n * @requiredField itemGroup.itemType\n * @requiredField itemGroup.items._id\n * @permissionId events:itemgroups:v1:item_group:create_item_group\n * @applicableIdentity APP\n * @returns Created item group.\n * @fqn wix.events.itemgroups.v1.ItemGroupService.CreateItemGroup\n */\nexport async function createItemGroup(\n itemGroup: NonNullablePaths<ItemGroup, `itemType` | `items.${number}._id`, 2>\n): Promise<\n NonNullablePaths<\n ItemGroup,\n | `itemType`\n | `items`\n | `items.${number}._id`\n | `owner.type`\n | `owner._id`\n | `tags.privateTags.tagIds`,\n 2\n > & {\n __applicationErrorsType?: CreateItemGroupApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n itemGroup: itemGroup,\n });\n\n const reqOpts =\n ambassadorWixEventsItemgroupsV1ItemGroup.createItemGroup(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.itemGroup!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { itemGroup: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['itemGroup']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves an item group.\n * @param itemGroupId - ID of the item group to retrieve.\n * @internal\n * @documentationMaturity preview\n * @requiredField itemGroupId\n * @permissionId events:itemgroups:v1:item_group:get_item_group\n * @returns Requested item group.\n * @fqn wix.events.itemgroups.v1.ItemGroupService.GetItemGroup\n */\nexport async function getItemGroup(\n itemGroupId: string\n): Promise<\n NonNullablePaths<\n ItemGroup,\n | `itemType`\n | `items`\n | `items.${number}._id`\n | `owner.type`\n | `owner._id`\n | `tags.privateTags.tagIds`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n itemGroupId: itemGroupId,\n });\n\n const reqOpts =\n ambassadorWixEventsItemgroupsV1ItemGroup.getItemGroup(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.itemGroup!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { itemGroupId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['itemGroupId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates an item group.\n * @param _id - Item group ID.\n * @internal\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField itemGroup\n * @requiredField itemGroup.revision\n * @permissionId events:itemgroups:v1:item_group:update_item_group\n * @returns Updated item group.\n * @fqn wix.events.itemgroups.v1.ItemGroupService.UpdateItemGroup\n */\nexport async function updateItemGroup(\n _id: string,\n itemGroup: NonNullablePaths<UpdateItemGroup, `revision`, 0>\n): Promise<\n NonNullablePaths<\n ItemGroup,\n | `itemType`\n | `items`\n | `items.${number}._id`\n | `owner.type`\n | `owner._id`\n | `tags.privateTags.tagIds`,\n 2\n > & {\n __applicationErrorsType?: UpdateItemGroupApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n itemGroup: { ...itemGroup, id: _id },\n });\n\n const reqOpts =\n ambassadorWixEventsItemgroupsV1ItemGroup.updateItemGroup(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.itemGroup!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { itemGroup: '$[1]' },\n explicitPathsToArguments: { 'itemGroup.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'itemGroup']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateItemGroup {\n /**\n * Item group ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the item group is updated. Pass the current revision when updating.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the item group was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the item group was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Type of the items in the group. Can't be changed.\n * @readonly\n * @immutable\n */\n itemType?: ItemTypeWithLiterals;\n /**\n * ID of the event the ticket definitions belong to. Required when `itemType` is `TICKET_DEFINITION`, empty otherwise. Can't be changed.\n * @format GUID\n * @readonly\n * @immutable\n */\n eventId?: string | null;\n /**\n * Items in the group, without duplicates. Empty when `itemType` is `ALL_EVENTS`, at least one item otherwise.\n * @maxSize 100\n */\n items?: Item[];\n /**\n * Feature that claimed the group, set by the server. Empty while unclaimed. When the owner stops using a group that others still use, one of them becomes the owner.\n * @readonly\n */\n owner?: Owner;\n /** Settings used only when the group belongs to a coupon. Empty when not used. */\n couponOptions?: CouponOptions;\n /** Tags. */\n tags?: Tags;\n}\n\n/**\n * Deletes an unused item group.\n * @param itemGroupId - ID of the item group to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField itemGroupId\n * @permissionId events:itemgroups:v1:item_group:delete_item_group\n * @fqn wix.events.itemgroups.v1.ItemGroupService.DeleteItemGroup\n */\nexport async function deleteItemGroup(itemGroupId: string): Promise<\n void & {\n __applicationErrorsType?: DeleteItemGroupApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n itemGroupId: itemGroupId,\n });\n\n const reqOpts =\n ambassadorWixEventsItemgroupsV1ItemGroup.deleteItemGroup(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: { itemGroupId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['itemGroupId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves item groups, up to 100 per page.\n *\n * Filter `id` with `$in` to get groups by ID, or `items.id` with `$hasSome` to find the groups that contain any of the given items.\n * @public\n * @documentationMaturity preview\n * @permissionId events:itemgroups:v1:item_group:query_item_groups\n * @applicableIdentity APP\n * @fqn wix.events.itemgroups.v1.ItemGroupService.QueryItemGroups\n */\nexport function queryItemGroups(): ItemGroupsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n ItemGroup,\n 'CURSOR',\n QueryItemGroupsRequest,\n QueryItemGroupsResponse\n >({\n func: async (payload: QueryItemGroupsRequest) => {\n const reqOpts =\n ambassadorWixEventsItemgroupsV1ItemGroup.queryItemGroups(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: QueryItemGroupsRequest['query']) => {\n const args = [query, {}] as [QueryItemGroupsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryItemGroupsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.itemGroups,\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 ItemGroupsQueryResult extends QueryCursorResult {\n items: ItemGroup[];\n query: ItemGroupsQueryBuilder;\n next: () => Promise<ItemGroupsQueryResult>;\n prev: () => Promise<ItemGroupsQueryResult>;\n}\n\nexport interface ItemGroupsQueryBuilder {\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:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'itemType'\n | 'eventId'\n | 'items.id'\n | 'owner.type'\n | 'owner.id',\n value: any\n ) => ItemGroupsQueryBuilder;\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:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'itemType'\n | 'eventId'\n | 'items.id'\n | 'owner.type'\n | 'owner.id',\n value: any\n ) => ItemGroupsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'eventId'\n | 'items.id'\n | 'owner.id',\n value: any\n ) => ItemGroupsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'eventId'\n | 'items.id'\n | 'owner.id',\n value: any\n ) => ItemGroupsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'eventId'\n | 'items.id'\n | 'owner.id',\n value: any\n ) => ItemGroupsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'eventId'\n | 'items.id'\n | 'owner.id',\n value: any\n ) => ItemGroupsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (\n propertyName: '_id' | 'eventId' | 'items.id' | 'owner.id',\n value: string\n ) => ItemGroupsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n * @documentationMaturity preview\n */\n hasSome: (\n propertyName: 'tags.privateTags.tagIds' | 'tags.publicTags.tagIds',\n value: any[]\n ) => ItemGroupsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n * @documentationMaturity preview\n */\n hasAll: (\n propertyName: 'tags.privateTags.tagIds' | 'tags.publicTags.tagIds',\n value: any[]\n ) => ItemGroupsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'itemType'\n | 'eventId'\n | 'items.id'\n | 'owner.type'\n | 'owner.id',\n value: any\n ) => ItemGroupsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'itemType'\n | 'eventId'\n | 'items.id'\n | 'owner.type'\n | 'owner.id'\n | 'tags.privateTags.tagIds'\n | 'tags.publicTags.tagIds',\n value: boolean\n ) => ItemGroupsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'itemType'\n | 'eventId'\n | 'items.id'\n | 'owner.type'\n | 'owner.id'\n | 'tags.privateTags.tagIds'\n | 'tags.publicTags.tagIds'\n >\n ) => ItemGroupsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'itemType'\n | 'eventId'\n | 'items.id'\n | 'owner.type'\n | 'owner.id'\n | 'tags.privateTags.tagIds'\n | 'tags.publicTags.tagIds'\n >\n ) => ItemGroupsQueryBuilder;\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) => ItemGroupsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => ItemGroupsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<ItemGroupsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.events.itemgroups.v1.ItemGroupService.QueryItemGroups\n * @requiredField query\n */\nexport async function typedQueryItemGroups(\n query: ItemGroupQuery\n): Promise<\n NonNullablePaths<\n QueryItemGroupsResponse,\n | `itemGroups`\n | `itemGroups.${number}.itemType`\n | `itemGroups.${number}.owner.type`\n | `itemGroups.${number}.owner._id`,\n 3\n >\n> {\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 =\n ambassadorWixEventsItemgroupsV1ItemGroup.queryItemGroups(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ItemGroupQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: [\n 'items._id',\n 'tags.privateTags.tagIds',\n 'tags.publicTags.tagIds'\n ];\n operators: ['$hasAll', '$hasSome'];\n sort: 'BOTH';\n },\n {\n fields: [\n '_createdDate',\n '_id',\n '_updatedDate',\n 'eventId',\n 'itemType',\n 'owner._id',\n 'owner.type'\n ];\n operators: '*';\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n ItemGroup,\n ItemGroupQuerySpec\n>;\nexport type ItemGroupQuery = {\n /** \n Cursor paging options.\n\n Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). \n */\n cursorPaging?: {\n /** \n Maximum number of items to return in the results. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n\n Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object.\n\n Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). \n @maxSize: 5 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\nexport const utils = {\n query: /*#__PURE__*/ createQueryUtils<\n ItemGroup,\n ItemGroupQuerySpec,\n ItemGroupQuery\n >(),\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 { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\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\nconst TRANSFORM_PATHS_0 = [\n { path: 'itemGroup.createdDate' },\n { path: 'itemGroup.updatedDate' },\n];\nconst TRANSFORM_PATHS_1 = [{ path: 'fieldMask' }];\nconst TRANSFORM_PATHS_2 = [\n { path: 'itemGroups.createdDate' },\n { path: 'itemGroups.updatedDate' },\n];\n\nfunction resolveWixEventsItemgroupsV1ItemGroupServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/events-item-groups',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/events-item-groups',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/events-item-groups',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/events-item-groups',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/events/v1/item-groups',\n destPath: '/v1/item-groups',\n },\n ],\n _: [\n {\n srcPath: '/_api/events-item-groups',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/events-item-groups',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_events_item-groups';\n\n/** Creates an unclaimed item group. */\nexport function createItemGroup(payload: object): RequestOptionsFactory<any> {\n function __createItemGroup({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.events.itemgroups.v1.item_group',\n method: 'POST' as any,\n methodFqn: 'wix.events.itemgroups.v1.ItemGroupService.CreateItemGroup',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEventsItemgroupsV1ItemGroupServiceUrl({\n protoPath: '/v1/item-groups',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createItemGroup;\n}\n\n/** Retrieves an item group. */\nexport function getItemGroup(payload: object): RequestOptionsFactory<any> {\n function __getItemGroup({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.events.itemgroups.v1.item_group',\n method: 'GET' as any,\n methodFqn: 'wix.events.itemgroups.v1.ItemGroupService.GetItemGroup',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEventsItemgroupsV1ItemGroupServiceUrl({\n protoPath: '/v1/item-groups/{itemGroupId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getItemGroup;\n}\n\n/** Updates an item group. */\nexport function updateItemGroup(payload: object): RequestOptionsFactory<any> {\n function __updateItemGroup({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: TRANSFORM_PATHS_1,\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.events.itemgroups.v1.item_group',\n method: 'PATCH' as any,\n methodFqn: 'wix.events.itemgroups.v1.ItemGroupService.UpdateItemGroup',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEventsItemgroupsV1ItemGroupServiceUrl({\n protoPath: '/v1/item-groups/{itemGroup.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateItemGroup;\n}\n\n/** Deletes an unused item group. */\nexport function deleteItemGroup(payload: object): RequestOptionsFactory<any> {\n function __deleteItemGroup({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.events.itemgroups.v1.item_group',\n method: 'DELETE' as any,\n methodFqn: 'wix.events.itemgroups.v1.ItemGroupService.DeleteItemGroup',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEventsItemgroupsV1ItemGroupServiceUrl({\n protoPath: '/v1/item-groups/{itemGroupId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteItemGroup;\n}\n\n/**\n * Retrieves item groups, up to 100 per page.\n *\n * Filter `id` with `$in` to get groups by ID, or `items.id` with `$hasSome` to find the groups that contain any of the given items.\n */\nexport function queryItemGroups(payload: object): RequestOptionsFactory<any> {\n function __queryItemGroups({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.events.itemgroups.v1.item_group',\n method: 'GET' as any,\n methodFqn: 'wix.events.itemgroups.v1.ItemGroupService.QueryItemGroups',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEventsItemgroupsV1ItemGroupServiceUrl({\n protoPath: '/v1/item-groups/query',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_2,\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixEventsItemgroupsV1ItemGroupServiceUrl({\n protoPath: '/v1/item-groups/query',\n data: payload,\n host,\n }),\n data: payload,\n },\n ],\n };\n\n return metadata;\n }\n\n return __queryItemGroups;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CreateItemGroupApplicationErrors,\n DeleteItemGroupApplicationErrors,\n ItemGroup,\n ItemGroupQuery,\n ItemGroupsQueryBuilder,\n QueryItemGroupsResponse,\n UpdateItemGroup,\n UpdateItemGroupApplicationErrors,\n createItemGroup as universalCreateItemGroup,\n deleteItemGroup as universalDeleteItemGroup,\n getItemGroup as universalGetItemGroup,\n queryItemGroups as universalQueryItemGroups,\n typedQueryItemGroups as universalTypedQueryItemGroups,\n updateItemGroup as universalUpdateItemGroup,\n} from './events-itemgroups-v1-item-group-item-groups.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/events' };\n\nexport function createItemGroup(\n httpClient: HttpClient\n): CreateItemGroupSignature {\n return (\n itemGroup: NonNullablePaths<\n ItemGroup,\n `itemType` | `items.${number}._id`,\n 2\n >\n ) =>\n universalCreateItemGroup(\n itemGroup,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateItemGroupSignature {\n /**\n * Creates an unclaimed item group.\n * @param - Item group to create.\n * @returns Created item group.\n */\n (\n itemGroup: NonNullablePaths<\n ItemGroup,\n `itemType` | `items.${number}._id`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n ItemGroup,\n | `itemType`\n | `items`\n | `items.${number}._id`\n | `owner.type`\n | `owner._id`\n | `tags.privateTags.tagIds`,\n 2\n > & {\n __applicationErrorsType?: CreateItemGroupApplicationErrors;\n }\n >;\n}\n\n/** @internal */\nexport function getItemGroup(httpClient: HttpClient): GetItemGroupSignature {\n return (itemGroupId: string) =>\n universalGetItemGroup(\n itemGroupId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetItemGroupSignature {\n /**\n * Retrieves an item group.\n * @param - ID of the item group to retrieve.\n * @returns Requested item group.\n */\n (itemGroupId: string): Promise<\n NonNullablePaths<\n ItemGroup,\n | `itemType`\n | `items`\n | `items.${number}._id`\n | `owner.type`\n | `owner._id`\n | `tags.privateTags.tagIds`,\n 2\n >\n >;\n}\n\n/** @internal */\nexport function updateItemGroup(\n httpClient: HttpClient\n): UpdateItemGroupSignature {\n return (\n _id: string,\n itemGroup: NonNullablePaths<UpdateItemGroup, `revision`, 0>\n ) =>\n universalUpdateItemGroup(\n _id,\n itemGroup,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateItemGroupSignature {\n /**\n * Updates an item group.\n * @param - Item group ID.\n * @returns Updated item group.\n */\n (\n _id: string,\n itemGroup: NonNullablePaths<UpdateItemGroup, `revision`, 0>\n ): Promise<\n NonNullablePaths<\n ItemGroup,\n | `itemType`\n | `items`\n | `items.${number}._id`\n | `owner.type`\n | `owner._id`\n | `tags.privateTags.tagIds`,\n 2\n > & {\n __applicationErrorsType?: UpdateItemGroupApplicationErrors;\n }\n >;\n}\n\nexport function deleteItemGroup(\n httpClient: HttpClient\n): DeleteItemGroupSignature {\n return (itemGroupId: string) =>\n universalDeleteItemGroup(\n itemGroupId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteItemGroupSignature {\n /**\n * Deletes an unused item group.\n * @param - ID of the item group to delete.\n */\n (itemGroupId: string): Promise<\n void & {\n __applicationErrorsType?: DeleteItemGroupApplicationErrors;\n }\n >;\n}\n\nexport function queryItemGroups(\n httpClient: HttpClient\n): QueryItemGroupsSignature {\n return () =>\n universalQueryItemGroups(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryItemGroupsSignature {\n /**\n * Retrieves item groups, up to 100 per page.\n *\n * Filter `id` with `$in` to get groups by ID, or `items.id` with `$hasSome` to find the groups that contain any of the given items.\n */\n (): ItemGroupsQueryBuilder;\n}\n\nexport function typedQueryItemGroups(\n httpClient: HttpClient\n): TypedQueryItemGroupsSignature {\n return (query: ItemGroupQuery) =>\n universalTypedQueryItemGroups(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryItemGroupsSignature {\n /** */\n (query: ItemGroupQuery): Promise<\n NonNullablePaths<\n QueryItemGroupsResponse,\n | `itemGroups`\n | `itemGroups.${number}.itemType`\n | `itemGroups.${number}.owner.type`\n | `itemGroups.${number}.owner._id`,\n 3\n >\n >;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n ApplicationError,\n BulkActionMetadata,\n BulkUpdateItemGroupTagsByFilterRequest,\n BulkUpdateItemGroupTagsByFilterResponse,\n BulkUpdateItemGroupTagsRequest,\n BulkUpdateItemGroupTagsResponse,\n BulkUpdateItemGroupTagsResult,\n CouponOptions,\n CreateItemGroupRequest,\n CreateItemGroupResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteItemGroupRequest,\n DeleteItemGroupResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n GetItemGroupRequest,\n GetItemGroupResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n Item,\n ItemGroup,\n ItemGroupQuerySpec,\n ItemGroupTagsModified,\n ItemGroupsQueryBuilder,\n ItemGroupsQueryResult,\n ItemMetadata,\n ItemType,\n MessageEnvelope,\n Owner,\n QueryItemGroupsRequest,\n QueryItemGroupsResponse,\n RestoreInfo,\n SortOrder,\n Sorting,\n TagList,\n Tags,\n Type,\n UpdateItemGroup,\n UpdateItemGroupRequest,\n UpdateItemGroupResponse,\n WebhookIdentityType,\n utils,\n} from './events-itemgroups-v1-item-group-item-groups.universal.js';\n","import {\n createItemGroup as publicCreateItemGroup,\n getItemGroup as publicGetItemGroup,\n updateItemGroup as publicUpdateItemGroup,\n deleteItemGroup as publicDeleteItemGroup,\n queryItemGroups as publicQueryItemGroups,\n typedQueryItemGroups as publicTypedQueryItemGroups,\n} from './events-itemgroups-v1-item-group-item-groups.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n ItemGroupQuery,\n ItemGroupsQueryBuilder,\n typedQueryItemGroups as universalTypedQueryItemGroups,\n} from './events-itemgroups-v1-item-group-item-groups.universal.js';\n\nfunction customQueryItemGroups(httpClient: HttpClient) {\n const router = /*#__PURE__*/ createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryItemGroups(httpClient)(),\n typedQueryFunction: (query: ItemGroupQuery) =>\n publicTypedQueryItemGroups(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): ItemGroupsQueryBuilder;\n function overloadedQuery(\n query: ItemGroupQuery\n ): ReturnType<typeof universalTypedQueryItemGroups>;\n function overloadedQuery(query?: ItemGroupQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const createItemGroup: MaybeContext<\n BuildRESTFunction<typeof publicCreateItemGroup> & typeof publicCreateItemGroup\n> = /*#__PURE__*/ createRESTModule(publicCreateItemGroup);\n/** @internal */\nexport const getItemGroup: MaybeContext<\n BuildRESTFunction<typeof publicGetItemGroup> & typeof publicGetItemGroup\n> = /*#__PURE__*/ createRESTModule(publicGetItemGroup);\n/** @internal */\nexport const updateItemGroup: MaybeContext<\n BuildRESTFunction<typeof publicUpdateItemGroup> & typeof publicUpdateItemGroup\n> = /*#__PURE__*/ createRESTModule(publicUpdateItemGroup);\nexport const deleteItemGroup: MaybeContext<\n BuildRESTFunction<typeof publicDeleteItemGroup> & typeof publicDeleteItemGroup\n> = /*#__PURE__*/ createRESTModule(publicDeleteItemGroup);\nexport const queryItemGroups: MaybeContext<\n BuildRESTFunction<typeof customQueryItemGroups> & typeof customQueryItemGroups\n> = /*#__PURE__*/ createRESTModule(customQueryItemGroups);\n\nexport {\n ItemType,\n Type,\n SortOrder,\n WebhookIdentityType,\n} from './events-itemgroups-v1-item-group-item-groups.universal.js';\nexport {\n ItemGroup,\n Item,\n Owner,\n CouponOptions,\n Tags,\n TagList,\n ItemGroupTagsModified,\n CreateItemGroupRequest,\n CreateItemGroupResponse,\n GetItemGroupRequest,\n GetItemGroupResponse,\n UpdateItemGroupRequest,\n UpdateItemGroupResponse,\n DeleteItemGroupRequest,\n DeleteItemGroupResponse,\n QueryItemGroupsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryItemGroupsResponse,\n CursorPagingMetadata,\n Cursors,\n BulkUpdateItemGroupTagsRequest,\n BulkUpdateItemGroupTagsResponse,\n ItemMetadata,\n ApplicationError,\n BulkUpdateItemGroupTagsResult,\n BulkActionMetadata,\n BulkUpdateItemGroupTagsByFilterRequest,\n BulkUpdateItemGroupTagsByFilterResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n UpdateItemGroup,\n ItemGroupsQueryResult,\n ItemGroupsQueryBuilder,\n ItemGroupQuerySpec,\n} from './events-itemgroups-v1-item-group-item-groups.universal.js';\nexport { utils } from './events-itemgroups-v1-item-group-item-groups.universal.js';\nexport {\n ItemTypeWithLiterals,\n TypeWithLiterals,\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CreateItemGroupApplicationErrors,\n UpdateItemGroupApplicationErrors,\n DeleteItemGroupApplicationErrors,\n CommonQueryWithEntityContext,\n ItemGroupQuery,\n} from './events-itemgroups-v1-item-group-item-groups.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,wBAAwB;AAAA,EAChC,EAAE,MAAM,wBA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J;AAcO,SAASC,iBACd,YAC0B;AAC1B,SAAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;AAWO,SAASC,sBACd,YAC+B;AAC/B,SAAO,CAAC,UACN;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACnLA,SAAS,wBAAwB;AAGjC,SAAS,iCAAiC;AAO1C,SAAS,sBAAsB,YAAwB;AACrD,QAAM,SAAuB,0CAA0B;AAAA,IACrD,sBAAsB,MAAMC,iBAAsB,UAAU,EAAE;AAAA,IAC9D,oBAAoB,CAAC,UACnBC,sBAA2B,UAAU,EAAE,KAAK;AAAA,IAC9C,qBAAqB;AAAA,EACvB,CAAC;AAMD,WAAS,gBAAgB,OAA6B;AACpD,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,mBAEK,iCAAiBA,gBAAqB;AAEjD,IAAMC,gBAEK,iCAAiBA,aAAkB;AAE9C,IAAMC,mBAEK,iCAAiBA,gBAAqB;AACjD,IAAMC,mBAEK,iCAAiBA,gBAAqB;AACjD,IAAML,mBAEK,iCAAiB,qBAAqB;","names":["payload","transformPaths","ItemType","Type","SortOrder","WebhookIdentityType","createItemGroup","getItemGroup","updateItemGroup","deleteItemGroup","queryItemGroups","createItemGroup","getItemGroup","updateItemGroup","deleteItemGroup","queryItemGroups","typedQueryItemGroups","queryItemGroups","typedQueryItemGroups","createItemGroup","getItemGroup","updateItemGroup","deleteItemGroup"]}
|
|
1
|
+
{"version":3,"sources":["../../src/events-itemgroups-v1-item-group-item-groups.universal.ts","../../src/events-itemgroups-v1-item-group-item-groups.http.ts","../../src/events-itemgroups-v1-item-group-item-groups.public.ts","../../src/events-itemgroups-v1-item-group-item-groups.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixEventsItemgroupsV1ItemGroup from './events-itemgroups-v1-item-group-item-groups.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\n/** A set of items, such as events or ticket definitions, that other features like coupons reference by one ID. */\nexport interface ItemGroup {\n /**\n * Item group ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the item group is updated. Pass the current revision when updating.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the item group was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the item group was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Type of the items in the group. Can't be changed.\n * @readonly\n * @immutable\n */\n itemType?: ItemTypeWithLiterals;\n /**\n * ID of the event the ticket definitions belong to. Required when `itemType` is `TICKET_DEFINITION`, empty otherwise. Can't be changed.\n * @format GUID\n * @readonly\n * @immutable\n */\n eventId?: string | null;\n /**\n * Items in the group, without duplicates. Empty when `itemType` is `ALL_EVENTS`, at least one item otherwise.\n * @maxSize 100\n */\n items?: Item[];\n /**\n * Feature that uses the group, set by the server. Empty if no feature has used it. Only `type` is set while `reservationEndDate` is set.\n * @readonly\n */\n owner?: Owner;\n /** Settings used only when the group belongs to a coupon. Empty when not used. */\n couponOptions?: CouponOptions;\n /**\n * Date and time the group is deleted if no feature uses it by then. Empty unless the group is reserved.\n * @readonly\n */\n reservationEndDate?: Date | null;\n /** Tags. */\n tags?: Tags;\n}\n\nexport enum ItemType {\n /** Events. */\n EVENT = 'EVENT',\n /** Ticket definitions of one event. */\n TICKET_DEFINITION = 'TICKET_DEFINITION',\n /** Events of categories, including events added to them later. */\n CATEGORY = 'CATEGORY',\n /** All events. Lets group settings, such as `couponOptions`, apply to every event. */\n ALL_EVENTS = 'ALL_EVENTS',\n}\n\n/** @enumType */\nexport type ItemTypeWithLiterals =\n | ItemType\n | 'EVENT'\n | 'TICKET_DEFINITION'\n | 'CATEGORY'\n | 'ALL_EVENTS';\n\n/** An item in an item group. */\nexport interface Item {\n /**\n * ID of an item of the group's `itemType`.\n * @format GUID\n */\n _id?: string;\n}\n\n/** Feature that claimed an item group. */\nexport interface Owner {\n /** Type of the owner. */\n type?: TypeWithLiterals;\n /**\n * Owner ID, for example the coupon ID. Free-form, because some legacy coupon IDs aren't GUIDs.\n * @maxLength 100\n */\n _id?: string;\n}\n\nexport enum Type {\n /** Wix Coupons coupon. */\n COUPON = 'COUPON',\n}\n\n/** @enumType */\nexport type TypeWithLiterals = Type | 'COUPON';\n\n/** Settings used only when an item group belongs to a coupon. */\nexport interface CouponOptions {\n /**\n * Minimum order total, in the event's currency, for the coupon to apply. Empty means no minimum.\n * @decimalValue options { gt:0, maxScale:2 }\n */\n minimumSubtotal?: string | null;\n}\n\n/**\n * Common object for tags.\n * Should be use as in this example:\n * message Foo {\n * option (.wix.api.decomposite_of) = \"wix.commons.v2.tags.Foo\";\n * string id = 1;\n * ...\n * Tags tags = 5\n * }\n *\n * example of taggable entity\n * {\n * id: \"123\"\n * tags: {\n * public_tags: {\n * tag_ids:[\"11\",\"22\"]\n * },\n * private_tags: {\n * tag_ids: [\"33\", \"44\"]\n * }\n * }\n * }\n */\nexport interface Tags {\n /** Tags for back-office use, returned to anyone who can read the entity. */\n privateTags?: TagList;\n /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */\n publicTags?: TagList;\n}\n\nexport interface TagList {\n /**\n * List of tag IDs.\n * @maxSize 100\n * @maxLength 5\n */\n tagIds?: string[];\n}\n\nexport interface ItemGroupTagsModified {\n /** Updated item group. */\n itemGroup?: ItemGroup;\n /** Assigned tags. */\n assignedTags?: Tags;\n /** Unassigned tags. */\n unassignedTags?: Tags;\n}\n\nexport interface CreateItemGroupRequest {\n /** Item group to create. */\n itemGroup: ItemGroup;\n}\n\nexport interface CreateItemGroupResponse {\n /** Created item group. */\n itemGroup?: ItemGroup;\n}\n\nexport interface GetItemGroupRequest {\n /**\n * ID of the item group to retrieve.\n * @format GUID\n */\n itemGroupId: string;\n}\n\nexport interface GetItemGroupResponse {\n /** Requested item group. */\n itemGroup?: ItemGroup;\n}\n\nexport interface UpdateItemGroupRequest {\n /** Item group to update. Only `items` and `couponOptions` can be changed. */\n itemGroup: ItemGroup;\n /**\n * Fields to update.\n * @internal\n */\n fieldMask?: string[];\n}\n\nexport interface UpdateItemGroupResponse {\n /** Updated item group. */\n itemGroup?: ItemGroup;\n}\n\nexport interface DeleteItemGroupRequest {\n /**\n * ID of the item group to delete.\n * @format GUID\n */\n itemGroupId: string;\n}\n\nexport interface DeleteItemGroupResponse {}\n\nexport interface QueryItemGroupsRequest {\n /** Filter, sort and cursor paging for the query. */\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 the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\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 QueryItemGroupsResponse {\n /**\n * Matching item groups.\n * @maxSize 100\n */\n itemGroups?: ItemGroup[];\n /** Cursor 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 BulkUpdateItemGroupTagsRequest {\n /**\n * IDs of the item groups to update.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n itemGroupIds?: string[];\n /** Tags to assign. */\n assignTags?: Tags;\n /** Tags to unassign. */\n unassignTags?: Tags;\n}\n\nexport interface BulkUpdateItemGroupTagsResponse {\n /**\n * Result per item group.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkUpdateItemGroupTagsResult[];\n /** Metadata about the bulk operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Provided only whenever possible. For example, `itemId` can't be provided when item creation has failed.\n * @format GUID\n */\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 for this item was successful. When `false`, the `error` field is returned. */\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 BulkUpdateItemGroupTagsResult {\n /** Result metadata. */\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 BulkUpdateItemGroupTagsByFilterRequest {\n /** Item groups to update. */\n filter?: Record<string, any> | null;\n /** Tags to assign. */\n assignTags?: Tags;\n /** Tags to unassign. */\n unassignTags?: Tags;\n}\n\nexport interface BulkUpdateItemGroupTagsByFilterResponse {\n /**\n * ID of the async job.\n * @format GUID\n */\n jobId?: string;\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 /** Details related to the account */\n accountInfo?: AccountInfo;\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 AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type CreateItemGroupApplicationErrors =\n | {\n code?: 'EVENT_ID_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'EVENT_ID_NOT_ALLOWED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_ITEMS';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type UpdateItemGroupApplicationErrors = {\n code?: 'INVALID_ITEMS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type DeleteItemGroupApplicationErrors = {\n code?: 'ITEM_GROUP_IN_USE';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Creates an unclaimed item group.\n * @param itemGroup - Item group to create.\n * @public\n * @documentationMaturity preview\n * @requiredField itemGroup\n * @requiredField itemGroup.itemType\n * @requiredField itemGroup.items._id\n * @permissionId events:itemgroups:v1:item_group:create_item_group\n * @applicableIdentity APP\n * @returns Created item group.\n * @fqn wix.events.itemgroups.v1.ItemGroupService.CreateItemGroup\n */\nexport async function createItemGroup(\n itemGroup: NonNullablePaths<ItemGroup, `itemType` | `items.${number}._id`, 2>\n): Promise<\n NonNullablePaths<\n ItemGroup,\n | `itemType`\n | `items`\n | `items.${number}._id`\n | `owner.type`\n | `owner._id`\n | `tags.privateTags.tagIds`,\n 2\n > & {\n __applicationErrorsType?: CreateItemGroupApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n itemGroup: itemGroup,\n });\n\n const reqOpts =\n ambassadorWixEventsItemgroupsV1ItemGroup.createItemGroup(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.itemGroup!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { itemGroup: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['itemGroup']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves an item group.\n * @param itemGroupId - ID of the item group to retrieve.\n * @internal\n * @documentationMaturity preview\n * @requiredField itemGroupId\n * @permissionId events:itemgroups:v1:item_group:get_item_group\n * @returns Requested item group.\n * @fqn wix.events.itemgroups.v1.ItemGroupService.GetItemGroup\n */\nexport async function getItemGroup(\n itemGroupId: string\n): Promise<\n NonNullablePaths<\n ItemGroup,\n | `itemType`\n | `items`\n | `items.${number}._id`\n | `owner.type`\n | `owner._id`\n | `tags.privateTags.tagIds`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n itemGroupId: itemGroupId,\n });\n\n const reqOpts =\n ambassadorWixEventsItemgroupsV1ItemGroup.getItemGroup(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.itemGroup!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { itemGroupId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['itemGroupId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates an item group.\n * @param _id - Item group ID.\n * @internal\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField itemGroup\n * @requiredField itemGroup.revision\n * @permissionId events:itemgroups:v1:item_group:update_item_group\n * @returns Updated item group.\n * @fqn wix.events.itemgroups.v1.ItemGroupService.UpdateItemGroup\n */\nexport async function updateItemGroup(\n _id: string,\n itemGroup: NonNullablePaths<UpdateItemGroup, `revision`, 0>\n): Promise<\n NonNullablePaths<\n ItemGroup,\n | `itemType`\n | `items`\n | `items.${number}._id`\n | `owner.type`\n | `owner._id`\n | `tags.privateTags.tagIds`,\n 2\n > & {\n __applicationErrorsType?: UpdateItemGroupApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n itemGroup: { ...itemGroup, id: _id },\n });\n\n const reqOpts =\n ambassadorWixEventsItemgroupsV1ItemGroup.updateItemGroup(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.itemGroup!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { itemGroup: '$[1]' },\n explicitPathsToArguments: { 'itemGroup.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'itemGroup']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateItemGroup {\n /**\n * Item group ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the item group is updated. Pass the current revision when updating.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the item group was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the item group was last updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Type of the items in the group. Can't be changed.\n * @readonly\n * @immutable\n */\n itemType?: ItemTypeWithLiterals;\n /**\n * ID of the event the ticket definitions belong to. Required when `itemType` is `TICKET_DEFINITION`, empty otherwise. Can't be changed.\n * @format GUID\n * @readonly\n * @immutable\n */\n eventId?: string | null;\n /**\n * Items in the group, without duplicates. Empty when `itemType` is `ALL_EVENTS`, at least one item otherwise.\n * @maxSize 100\n */\n items?: Item[];\n /**\n * Feature that uses the group, set by the server. Empty if no feature has used it. Only `type` is set while `reservationEndDate` is set.\n * @readonly\n */\n owner?: Owner;\n /** Settings used only when the group belongs to a coupon. Empty when not used. */\n couponOptions?: CouponOptions;\n /**\n * Date and time the group is deleted if no feature uses it by then. Empty unless the group is reserved.\n * @readonly\n */\n reservationEndDate?: Date | null;\n /** Tags. */\n tags?: Tags;\n}\n\n/**\n * Deletes an unused item group.\n * @param itemGroupId - ID of the item group to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField itemGroupId\n * @permissionId events:itemgroups:v1:item_group:delete_item_group\n * @fqn wix.events.itemgroups.v1.ItemGroupService.DeleteItemGroup\n */\nexport async function deleteItemGroup(itemGroupId: string): Promise<\n void & {\n __applicationErrorsType?: DeleteItemGroupApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n itemGroupId: itemGroupId,\n });\n\n const reqOpts =\n ambassadorWixEventsItemgroupsV1ItemGroup.deleteItemGroup(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: { itemGroupId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['itemGroupId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves item groups, up to 100 per page.\n *\n * Filter `id` with `$in` to get groups by ID, or `items.id` with `$hasSome` to find the groups that contain any of the given items.\n * @public\n * @documentationMaturity preview\n * @permissionId events:itemgroups:v1:item_group:query_item_groups\n * @applicableIdentity APP\n * @fqn wix.events.itemgroups.v1.ItemGroupService.QueryItemGroups\n */\nexport function queryItemGroups(): ItemGroupsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n ItemGroup,\n 'CURSOR',\n QueryItemGroupsRequest,\n QueryItemGroupsResponse\n >({\n func: async (payload: QueryItemGroupsRequest) => {\n const reqOpts =\n ambassadorWixEventsItemgroupsV1ItemGroup.queryItemGroups(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: QueryItemGroupsRequest['query']) => {\n const args = [query, {}] as [QueryItemGroupsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryItemGroupsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.itemGroups,\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 ItemGroupsQueryResult extends QueryCursorResult {\n items: ItemGroup[];\n query: ItemGroupsQueryBuilder;\n next: () => Promise<ItemGroupsQueryResult>;\n prev: () => Promise<ItemGroupsQueryResult>;\n}\n\nexport interface ItemGroupsQueryBuilder {\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:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'itemType'\n | 'eventId'\n | 'items.id'\n | 'owner.type'\n | 'owner.id',\n value: any\n ) => ItemGroupsQueryBuilder;\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:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'itemType'\n | 'eventId'\n | 'items.id'\n | 'owner.type'\n | 'owner.id',\n value: any\n ) => ItemGroupsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'eventId'\n | 'items.id'\n | 'owner.id',\n value: any\n ) => ItemGroupsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'eventId'\n | 'items.id'\n | 'owner.id',\n value: any\n ) => ItemGroupsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'eventId'\n | 'items.id'\n | 'owner.id',\n value: any\n ) => ItemGroupsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'eventId'\n | 'items.id'\n | 'owner.id',\n value: any\n ) => ItemGroupsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (\n propertyName: '_id' | 'eventId' | 'items.id' | 'owner.id',\n value: string\n ) => ItemGroupsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n * @documentationMaturity preview\n */\n hasSome: (\n propertyName: 'tags.privateTags.tagIds' | 'tags.publicTags.tagIds',\n value: any[]\n ) => ItemGroupsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n * @documentationMaturity preview\n */\n hasAll: (\n propertyName: 'tags.privateTags.tagIds' | 'tags.publicTags.tagIds',\n value: any[]\n ) => ItemGroupsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'itemType'\n | 'eventId'\n | 'items.id'\n | 'owner.type'\n | 'owner.id',\n value: any\n ) => ItemGroupsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'itemType'\n | 'eventId'\n | 'items.id'\n | 'owner.type'\n | 'owner.id'\n | 'tags.privateTags.tagIds'\n | 'tags.publicTags.tagIds',\n value: boolean\n ) => ItemGroupsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'itemType'\n | 'eventId'\n | 'items.id'\n | 'owner.type'\n | 'owner.id'\n | 'tags.privateTags.tagIds'\n | 'tags.publicTags.tagIds'\n >\n ) => ItemGroupsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'itemType'\n | 'eventId'\n | 'items.id'\n | 'owner.type'\n | 'owner.id'\n | 'tags.privateTags.tagIds'\n | 'tags.publicTags.tagIds'\n >\n ) => ItemGroupsQueryBuilder;\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) => ItemGroupsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => ItemGroupsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<ItemGroupsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.events.itemgroups.v1.ItemGroupService.QueryItemGroups\n * @requiredField query\n */\nexport async function typedQueryItemGroups(\n query: ItemGroupQuery\n): Promise<\n NonNullablePaths<\n QueryItemGroupsResponse,\n | `itemGroups`\n | `itemGroups.${number}.itemType`\n | `itemGroups.${number}.owner.type`\n | `itemGroups.${number}.owner._id`,\n 3\n >\n> {\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 =\n ambassadorWixEventsItemgroupsV1ItemGroup.queryItemGroups(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ItemGroupQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: [\n 'items._id',\n 'tags.privateTags.tagIds',\n 'tags.publicTags.tagIds'\n ];\n operators: ['$hasAll', '$hasSome'];\n sort: 'BOTH';\n },\n {\n fields: [\n '_createdDate',\n '_id',\n '_updatedDate',\n 'eventId',\n 'itemType',\n 'owner._id',\n 'owner.type'\n ];\n operators: '*';\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n ItemGroup,\n ItemGroupQuerySpec\n>;\nexport type ItemGroupQuery = {\n /** \n Cursor paging options.\n\n Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). \n */\n cursorPaging?: {\n /** \n Maximum number of items to return in the results. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n\n Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object.\n\n Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). \n @maxSize: 5 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\nexport const utils = {\n query: /*#__PURE__*/ createQueryUtils<\n ItemGroup,\n ItemGroupQuerySpec,\n ItemGroupQuery\n >(),\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 { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\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\nconst TRANSFORM_PATHS_0 = [\n { path: 'itemGroup.createdDate' },\n { path: 'itemGroup.updatedDate' },\n { path: 'itemGroup.reservationEndDate' },\n];\nconst TRANSFORM_PATHS_1 = [{ path: 'fieldMask' }];\nconst TRANSFORM_PATHS_2 = [\n { path: 'itemGroups.createdDate' },\n { path: 'itemGroups.updatedDate' },\n { path: 'itemGroups.reservationEndDate' },\n];\n\nfunction resolveWixEventsItemgroupsV1ItemGroupServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/events-item-groups',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/events-item-groups',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/events-item-groups',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/events-item-groups',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/events/v1/item-groups',\n destPath: '/v1/item-groups',\n },\n ],\n _: [\n {\n srcPath: '/_api/events-item-groups',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/events-item-groups',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_events_item-groups';\n\n/** Creates an unclaimed item group. */\nexport function createItemGroup(payload: object): RequestOptionsFactory<any> {\n function __createItemGroup({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.events.itemgroups.v1.item_group',\n method: 'POST' as any,\n methodFqn: 'wix.events.itemgroups.v1.ItemGroupService.CreateItemGroup',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEventsItemgroupsV1ItemGroupServiceUrl({\n protoPath: '/v1/item-groups',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createItemGroup;\n}\n\n/** Retrieves an item group. */\nexport function getItemGroup(payload: object): RequestOptionsFactory<any> {\n function __getItemGroup({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.events.itemgroups.v1.item_group',\n method: 'GET' as any,\n methodFqn: 'wix.events.itemgroups.v1.ItemGroupService.GetItemGroup',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEventsItemgroupsV1ItemGroupServiceUrl({\n protoPath: '/v1/item-groups/{itemGroupId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getItemGroup;\n}\n\n/** Updates an item group. */\nexport function updateItemGroup(payload: object): RequestOptionsFactory<any> {\n function __updateItemGroup({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: TRANSFORM_PATHS_1,\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.events.itemgroups.v1.item_group',\n method: 'PATCH' as any,\n methodFqn: 'wix.events.itemgroups.v1.ItemGroupService.UpdateItemGroup',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEventsItemgroupsV1ItemGroupServiceUrl({\n protoPath: '/v1/item-groups/{itemGroup.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateItemGroup;\n}\n\n/** Deletes an unused item group. */\nexport function deleteItemGroup(payload: object): RequestOptionsFactory<any> {\n function __deleteItemGroup({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.events.itemgroups.v1.item_group',\n method: 'DELETE' as any,\n methodFqn: 'wix.events.itemgroups.v1.ItemGroupService.DeleteItemGroup',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEventsItemgroupsV1ItemGroupServiceUrl({\n protoPath: '/v1/item-groups/{itemGroupId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteItemGroup;\n}\n\n/**\n * Retrieves item groups, up to 100 per page.\n *\n * Filter `id` with `$in` to get groups by ID, or `items.id` with `$hasSome` to find the groups that contain any of the given items.\n */\nexport function queryItemGroups(payload: object): RequestOptionsFactory<any> {\n function __queryItemGroups({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.events.itemgroups.v1.item_group',\n method: 'GET' as any,\n methodFqn: 'wix.events.itemgroups.v1.ItemGroupService.QueryItemGroups',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixEventsItemgroupsV1ItemGroupServiceUrl({\n protoPath: '/v1/item-groups/query',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_2,\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixEventsItemgroupsV1ItemGroupServiceUrl({\n protoPath: '/v1/item-groups/query',\n data: payload,\n host,\n }),\n data: payload,\n },\n ],\n };\n\n return metadata;\n }\n\n return __queryItemGroups;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CreateItemGroupApplicationErrors,\n DeleteItemGroupApplicationErrors,\n ItemGroup,\n ItemGroupQuery,\n ItemGroupsQueryBuilder,\n QueryItemGroupsResponse,\n UpdateItemGroup,\n UpdateItemGroupApplicationErrors,\n createItemGroup as universalCreateItemGroup,\n deleteItemGroup as universalDeleteItemGroup,\n getItemGroup as universalGetItemGroup,\n queryItemGroups as universalQueryItemGroups,\n typedQueryItemGroups as universalTypedQueryItemGroups,\n updateItemGroup as universalUpdateItemGroup,\n} from './events-itemgroups-v1-item-group-item-groups.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/events' };\n\nexport function createItemGroup(\n httpClient: HttpClient\n): CreateItemGroupSignature {\n return (\n itemGroup: NonNullablePaths<\n ItemGroup,\n `itemType` | `items.${number}._id`,\n 2\n >\n ) =>\n universalCreateItemGroup(\n itemGroup,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateItemGroupSignature {\n /**\n * Creates an unclaimed item group.\n * @param - Item group to create.\n * @returns Created item group.\n */\n (\n itemGroup: NonNullablePaths<\n ItemGroup,\n `itemType` | `items.${number}._id`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n ItemGroup,\n | `itemType`\n | `items`\n | `items.${number}._id`\n | `owner.type`\n | `owner._id`\n | `tags.privateTags.tagIds`,\n 2\n > & {\n __applicationErrorsType?: CreateItemGroupApplicationErrors;\n }\n >;\n}\n\n/** @internal */\nexport function getItemGroup(httpClient: HttpClient): GetItemGroupSignature {\n return (itemGroupId: string) =>\n universalGetItemGroup(\n itemGroupId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetItemGroupSignature {\n /**\n * Retrieves an item group.\n * @param - ID of the item group to retrieve.\n * @returns Requested item group.\n */\n (itemGroupId: string): Promise<\n NonNullablePaths<\n ItemGroup,\n | `itemType`\n | `items`\n | `items.${number}._id`\n | `owner.type`\n | `owner._id`\n | `tags.privateTags.tagIds`,\n 2\n >\n >;\n}\n\n/** @internal */\nexport function updateItemGroup(\n httpClient: HttpClient\n): UpdateItemGroupSignature {\n return (\n _id: string,\n itemGroup: NonNullablePaths<UpdateItemGroup, `revision`, 0>\n ) =>\n universalUpdateItemGroup(\n _id,\n itemGroup,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateItemGroupSignature {\n /**\n * Updates an item group.\n * @param - Item group ID.\n * @returns Updated item group.\n */\n (\n _id: string,\n itemGroup: NonNullablePaths<UpdateItemGroup, `revision`, 0>\n ): Promise<\n NonNullablePaths<\n ItemGroup,\n | `itemType`\n | `items`\n | `items.${number}._id`\n | `owner.type`\n | `owner._id`\n | `tags.privateTags.tagIds`,\n 2\n > & {\n __applicationErrorsType?: UpdateItemGroupApplicationErrors;\n }\n >;\n}\n\nexport function deleteItemGroup(\n httpClient: HttpClient\n): DeleteItemGroupSignature {\n return (itemGroupId: string) =>\n universalDeleteItemGroup(\n itemGroupId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteItemGroupSignature {\n /**\n * Deletes an unused item group.\n * @param - ID of the item group to delete.\n */\n (itemGroupId: string): Promise<\n void & {\n __applicationErrorsType?: DeleteItemGroupApplicationErrors;\n }\n >;\n}\n\nexport function queryItemGroups(\n httpClient: HttpClient\n): QueryItemGroupsSignature {\n return () =>\n universalQueryItemGroups(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryItemGroupsSignature {\n /**\n * Retrieves item groups, up to 100 per page.\n *\n * Filter `id` with `$in` to get groups by ID, or `items.id` with `$hasSome` to find the groups that contain any of the given items.\n */\n (): ItemGroupsQueryBuilder;\n}\n\nexport function typedQueryItemGroups(\n httpClient: HttpClient\n): TypedQueryItemGroupsSignature {\n return (query: ItemGroupQuery) =>\n universalTypedQueryItemGroups(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryItemGroupsSignature {\n /** */\n (query: ItemGroupQuery): Promise<\n NonNullablePaths<\n QueryItemGroupsResponse,\n | `itemGroups`\n | `itemGroups.${number}.itemType`\n | `itemGroups.${number}.owner.type`\n | `itemGroups.${number}.owner._id`,\n 3\n >\n >;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n ApplicationError,\n BulkActionMetadata,\n BulkUpdateItemGroupTagsByFilterRequest,\n BulkUpdateItemGroupTagsByFilterResponse,\n BulkUpdateItemGroupTagsRequest,\n BulkUpdateItemGroupTagsResponse,\n BulkUpdateItemGroupTagsResult,\n CouponOptions,\n CreateItemGroupRequest,\n CreateItemGroupResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteItemGroupRequest,\n DeleteItemGroupResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n GetItemGroupRequest,\n GetItemGroupResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n Item,\n ItemGroup,\n ItemGroupQuerySpec,\n ItemGroupTagsModified,\n ItemGroupsQueryBuilder,\n ItemGroupsQueryResult,\n ItemMetadata,\n ItemType,\n MessageEnvelope,\n Owner,\n QueryItemGroupsRequest,\n QueryItemGroupsResponse,\n RestoreInfo,\n SortOrder,\n Sorting,\n TagList,\n Tags,\n Type,\n UpdateItemGroup,\n UpdateItemGroupRequest,\n UpdateItemGroupResponse,\n WebhookIdentityType,\n utils,\n} from './events-itemgroups-v1-item-group-item-groups.universal.js';\n","import {\n createItemGroup as publicCreateItemGroup,\n getItemGroup as publicGetItemGroup,\n updateItemGroup as publicUpdateItemGroup,\n deleteItemGroup as publicDeleteItemGroup,\n queryItemGroups as publicQueryItemGroups,\n typedQueryItemGroups as publicTypedQueryItemGroups,\n} from './events-itemgroups-v1-item-group-item-groups.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n ItemGroupQuery,\n ItemGroupsQueryBuilder,\n typedQueryItemGroups as universalTypedQueryItemGroups,\n} from './events-itemgroups-v1-item-group-item-groups.universal.js';\n\nfunction customQueryItemGroups(httpClient: HttpClient) {\n const router = /*#__PURE__*/ createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryItemGroups(httpClient)(),\n typedQueryFunction: (query: ItemGroupQuery) =>\n publicTypedQueryItemGroups(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): ItemGroupsQueryBuilder;\n function overloadedQuery(\n query: ItemGroupQuery\n ): ReturnType<typeof universalTypedQueryItemGroups>;\n function overloadedQuery(query?: ItemGroupQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const createItemGroup: MaybeContext<\n BuildRESTFunction<typeof publicCreateItemGroup> & typeof publicCreateItemGroup\n> = /*#__PURE__*/ createRESTModule(publicCreateItemGroup);\n/** @internal */\nexport const getItemGroup: MaybeContext<\n BuildRESTFunction<typeof publicGetItemGroup> & typeof publicGetItemGroup\n> = /*#__PURE__*/ createRESTModule(publicGetItemGroup);\n/** @internal */\nexport const updateItemGroup: MaybeContext<\n BuildRESTFunction<typeof publicUpdateItemGroup> & typeof publicUpdateItemGroup\n> = /*#__PURE__*/ createRESTModule(publicUpdateItemGroup);\nexport const deleteItemGroup: MaybeContext<\n BuildRESTFunction<typeof publicDeleteItemGroup> & typeof publicDeleteItemGroup\n> = /*#__PURE__*/ createRESTModule(publicDeleteItemGroup);\nexport const queryItemGroups: MaybeContext<\n BuildRESTFunction<typeof customQueryItemGroups> & typeof customQueryItemGroups\n> = /*#__PURE__*/ createRESTModule(customQueryItemGroups);\n\nexport {\n ItemType,\n Type,\n SortOrder,\n WebhookIdentityType,\n} from './events-itemgroups-v1-item-group-item-groups.universal.js';\nexport {\n ItemGroup,\n Item,\n Owner,\n CouponOptions,\n Tags,\n TagList,\n ItemGroupTagsModified,\n CreateItemGroupRequest,\n CreateItemGroupResponse,\n GetItemGroupRequest,\n GetItemGroupResponse,\n UpdateItemGroupRequest,\n UpdateItemGroupResponse,\n DeleteItemGroupRequest,\n DeleteItemGroupResponse,\n QueryItemGroupsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryItemGroupsResponse,\n CursorPagingMetadata,\n Cursors,\n BulkUpdateItemGroupTagsRequest,\n BulkUpdateItemGroupTagsResponse,\n ItemMetadata,\n ApplicationError,\n BulkUpdateItemGroupTagsResult,\n BulkActionMetadata,\n BulkUpdateItemGroupTagsByFilterRequest,\n BulkUpdateItemGroupTagsByFilterResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n UpdateItemGroup,\n ItemGroupsQueryResult,\n ItemGroupsQueryBuilder,\n ItemGroupQuerySpec,\n} from './events-itemgroups-v1-item-group-item-groups.universal.js';\nexport { utils } from './events-itemgroups-v1-item-group-item-groups.universal.js';\nexport {\n ItemTypeWithLiterals,\n TypeWithLiterals,\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CreateItemGroupApplicationErrors,\n UpdateItemGroupApplicationErrors,\n DeleteItemGroupApplicationErrors,\n CommonQueryWithEntityContext,\n ItemGroupQuery,\n} from './events-itemgroups-v1-item-group-item-groups.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,wBAAwB;AAAA,EAChC,EAAE,MAAM,wBAAwB;AAAA,EAChC,EAAE,MAAM,+BAA+B;AACzC;AACA,IAAM,oBAAoB,CAAC,EAAE,MAAM,YAAY,CAAC;AAChD,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,yBAAyB;AAAA,EACjC,EAAE,MAAM,yBAAyB;AAAA,EACjC,EAAE,MAAM,gCAAgC;AAC1C;AAEA,SAAS,gDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA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CAAiB,qBAAqB;","names":["payload","transformPaths","ItemType","Type","SortOrder","WebhookIdentityType","createItemGroup","getItemGroup","updateItemGroup","deleteItemGroup","queryItemGroups","createItemGroup","getItemGroup","updateItemGroup","deleteItemGroup","queryItemGroups","typedQueryItemGroups","queryItemGroups","typedQueryItemGroups","createItemGroup","getItemGroup","updateItemGroup","deleteItemGroup"]}
|
|
@@ -43,12 +43,17 @@ interface ItemGroup {
|
|
|
43
43
|
*/
|
|
44
44
|
items?: Item[];
|
|
45
45
|
/**
|
|
46
|
-
* Feature that
|
|
46
|
+
* Feature that uses the group, set by the server. Empty if no feature has used it. Only `type` is set while `reservationEndDate` is set.
|
|
47
47
|
* @readonly
|
|
48
48
|
*/
|
|
49
49
|
owner?: Owner;
|
|
50
50
|
/** Settings used only when the group belongs to a coupon. Empty when not used. */
|
|
51
51
|
couponOptions?: CouponOptions;
|
|
52
|
+
/**
|
|
53
|
+
* Date and time the group is deleted if no feature uses it by then. Empty unless the group is reserved.
|
|
54
|
+
* @readonly
|
|
55
|
+
*/
|
|
56
|
+
reservationEndDate?: Date | null;
|
|
52
57
|
/** Tags. */
|
|
53
58
|
tags?: Tags;
|
|
54
59
|
}
|
|
@@ -584,12 +589,17 @@ interface UpdateItemGroup {
|
|
|
584
589
|
*/
|
|
585
590
|
items?: Item[];
|
|
586
591
|
/**
|
|
587
|
-
* Feature that
|
|
592
|
+
* Feature that uses the group, set by the server. Empty if no feature has used it. Only `type` is set while `reservationEndDate` is set.
|
|
588
593
|
* @readonly
|
|
589
594
|
*/
|
|
590
595
|
owner?: Owner;
|
|
591
596
|
/** Settings used only when the group belongs to a coupon. Empty when not used. */
|
|
592
597
|
couponOptions?: CouponOptions;
|
|
598
|
+
/**
|
|
599
|
+
* Date and time the group is deleted if no feature uses it by then. Empty unless the group is reserved.
|
|
600
|
+
* @readonly
|
|
601
|
+
*/
|
|
602
|
+
reservationEndDate?: Date | null;
|
|
593
603
|
/** Tags. */
|
|
594
604
|
tags?: Tags;
|
|
595
605
|
}
|
|
@@ -15,12 +15,14 @@ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths
|
|
|
15
15
|
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
16
16
|
var TRANSFORM_PATHS_0 = [
|
|
17
17
|
{ path: "itemGroup.createdDate" },
|
|
18
|
-
{ path: "itemGroup.updatedDate" }
|
|
18
|
+
{ path: "itemGroup.updatedDate" },
|
|
19
|
+
{ path: "itemGroup.reservationEndDate" }
|
|
19
20
|
];
|
|
20
21
|
var TRANSFORM_PATHS_1 = [{ path: "fieldMask" }];
|
|
21
22
|
var TRANSFORM_PATHS_2 = [
|
|
22
23
|
{ path: "itemGroups.createdDate" },
|
|
23
|
-
{ path: "itemGroups.updatedDate" }
|
|
24
|
+
{ path: "itemGroups.updatedDate" },
|
|
25
|
+
{ path: "itemGroups.reservationEndDate" }
|
|
24
26
|
];
|
|
25
27
|
function resolveWixEventsItemgroupsV1ItemGroupServiceUrl(opts) {
|
|
26
28
|
const domainToMappings = {
|