@wix/auto_sdk_benefit-programs_items 1.0.28 → 1.0.30

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/benefit-programs-v1-item-items.universal.ts","../../src/benefit-programs-v1-item-items.http.ts","../../src/benefit-programs-v1-item-items.public.ts","../../src/benefit-programs-v1-item-items.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 { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBenefitProgramsV1Item from './benefit-programs-v1-item-items.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface Item {\n /**\n * Benefit item ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the benefit item is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the benefit item.\n *\n * Ignored when creating a benefit item.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the item was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the item was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * ID of the item in the app providing it.\n *\n * For example, if the item is a product provided by Wix Stores, the `externalId` would be the Wix Stores `product Id`.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalId?: string | null;\n /**\n * Benefit item category.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string | null;\n /**\n * Item set ID of the benefit that this benefit item is a part of.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string | null;\n /**\n * Benefit item display name.\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * ID of the app ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/apps-created-by-wix) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/apps-created-by-wix)) that defines and provides the item. For example, if the item is a Wix Stores product, this field's value is `215238eb-22a5-4c36-9e7b-e7c08025e04e`.\n * @format GUID\n * @immutable\n * @readonly\n */\n providerAppId?: string | null;\n /**\n * Custom field data for the benefit item object.\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface ItemsCloned {\n /**\n * ID of the pool that had its items provisioned\n * @format GUID\n */\n itemSetId?: string;\n}\n\nexport interface CreateItemRequest {\n /** Item to create. */\n item: Item;\n}\n\nexport interface CreateItemResponse {\n /** Created item. */\n item?: Item;\n}\n\nexport interface BulkCreateItemsRequest {\n /**\n * Items to create.\n * @minSize 1\n * @maxSize 100\n */\n items: Item[];\n /**\n * Whether to return the full item entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkCreateItemsResponse {\n /**\n * List of created items and associated metadata.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkItemResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkItemResult {\n /** Item metadata. */\n itemMetadata?: ItemMetadata;\n /** Item. */\n item?: Item;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\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 was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface 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 DeleteItemRequest {\n /**\n * Item ID.\n * @format GUID\n */\n itemId: string;\n}\n\nexport interface DeleteItemResponse {}\n\nexport interface BulkDeleteItemsRequest {\n /**\n * List of IDs of the items to delete.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n itemIds: string[];\n}\n\nexport interface BulkDeleteItemsResponse {\n /**\n * List of deleted items and associated metadata.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkItemResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkDeleteItemsByFilterRequest {\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n /** Filter options. To learn more, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */\n filter?: Record<string, any> | null;\n}\n\nexport interface BulkDeleteItemsByFilterResponse {\n /**\n * Job ID for item deletion. Retrieve job details using the Async Job API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/async-jobs/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/async-job/introduction)).\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface UpdateItemRequest {\n /** Item to update. */\n item: Item;\n}\n\nexport interface UpdateItemResponse {\n /** Updated item. */\n item?: Item;\n}\n\nexport interface BulkUpdateItemsRequest {\n /**\n * Items to update.\n * @minSize 1\n * @maxSize 100\n */\n items?: MaskedItem[];\n /**\n * Whether to return the full item entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface MaskedItem {\n /** Item to update. */\n item?: Item;\n /** Explicit list of fields to update. */\n fieldMask?: string[];\n}\n\nexport interface BulkUpdateItemsResponse {\n /**\n * List of updated items and associated metadata.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkItemResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface GetItemRequest {\n /**\n * ID of the item to retrieve.\n * @format GUID\n */\n itemId: string;\n}\n\nexport interface GetItemResponse {\n /** Retrieved item. */\n item?: Item;\n}\n\nexport interface ListItemsRequest {\n /** Filter. */\n filter?: Filter;\n /** Cursor paging */\n cursorPaging?: CursorPaging;\n}\n\nexport enum Type {\n /** Unknown filter type. */\n UNKNOWN_FILTER = 'UNKNOWN_FILTER',\n /** Use with `filter.byItemSetIdAndReferenceOptions`. */\n BY_ITEM_SET_ID_AND_REFERENCE = 'BY_ITEM_SET_ID_AND_REFERENCE',\n /** Use with `filter.byReferenceOptions`. */\n BY_REFERENCE = 'BY_REFERENCE',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN_FILTER'\n | 'BY_ITEM_SET_ID_AND_REFERENCE'\n | 'BY_REFERENCE';\n\nexport interface ByItemSetIdAndReference {\n /**\n * Filter list.\n * @minSize 1\n * @maxSize 100\n */\n filters?: ByItemSetIdAndReferenceFilter[];\n}\n\nexport interface ByItemSetIdAndReferenceFilter {\n /**\n * ID set ID.\n * @format GUID\n */\n itemSetId?: string;\n /**\n * External item ID.\n * @format GUID\n */\n externalId?: string;\n /**\n * Item category.\n * @maxLength 20\n */\n category?: string;\n /**\n * *Required**. ID of the app providing the item.\n * @format GUID\n */\n providerAppId?: string;\n}\n\nexport interface ByReference {\n /**\n * Filter list.\n * @minSize 1\n * @maxSize 100\n */\n filters?: ByReferenceFilter[];\n}\n\nexport interface ByReferenceFilter {\n /**\n * External item ID.\n * @format GUID\n */\n externalId?: string;\n /**\n * Item category.\n * @maxLength 20\n */\n category?: string;\n /**\n * *Required**. ID of the app providing the item.\n * @format GUID\n */\n providerAppId?: string;\n}\n\nexport interface Filter extends FilterFilterOneOf {\n /** Filter the request by `itemSetId` and item reference. */\n byItemSetIdAndReferenceOptions?: ByItemSetIdAndReference;\n /** Filter the request item reference. */\n byReferenceOptions?: ByReference;\n /** Filter type. */\n type?: TypeWithLiterals;\n /**\n * Filter by namespace.\n * @minLength 1\n * @maxLength 20\n */\n namespace?: string;\n}\n\n/** @oneof */\nexport interface FilterFilterOneOf {\n /** Filter the request by `itemSetId` and item reference. */\n byItemSetIdAndReferenceOptions?: ByItemSetIdAndReference;\n /** Filter the request item reference. */\n byReferenceOptions?: ByReference;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return.\n * @max 1000\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 ListItemsResponse {\n /** Items. */\n items?: Item[];\n /** Metadata for paginated results. */\n metadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\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 QueryItemsRequest {\n /** Filter, sort, and paging to apply to the query. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * 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 QueryItemsResponse {\n /** List of retrieved items. */\n items?: Item[];\n /** Metadata for paginated results. */\n metadata?: CursorPagingMetadata;\n}\n\nexport interface CountItemsRequest {\n /**\n * Items to count.\n *\n * Filter options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language).\n */\n filter?: Record<string, any> | null;\n}\n\nexport interface CountItemsResponse {\n /** Number of items fulfilling the specified filter conditions. */\n count?: number;\n}\n\nexport interface CloneItemsRequest {\n /**\n * Id of the item set to be cloned\n * @format GUID\n */\n itemSetId?: string;\n}\n\nexport interface CloneItemsResponse {\n /**\n * Id of the item set that these items were added to\n * @format GUID\n */\n clonedItemSetId?: string;\n /**\n * Id of the job that is cloning the item set\n * @format GUID\n */\n cloneJobId?: string;\n}\n\nexport interface BulkCloneItemSetsRequest {\n /**\n * Id of the item sets to be cloned\n * @format GUID\n * @minSize 1\n * @maxSize 1000\n */\n itemSetIds?: string[];\n}\n\nexport interface BulkCloneItemSetsResponse {\n /**\n * Results\n * @minSize 1\n * @maxSize 1000\n */\n results?: BulkCloneItemSetsResult[];\n /** Bulk action metadata */\n bulkActionMetadata?: BulkActionMetadata;\n /**\n * Id of the job that is cloning the item set\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface BulkCloneItemSetsResult {\n /** Item metadata */\n itemMetadata?: ItemMetadata;\n /**\n * Id of the item set that these items were added to\n * @format GUID\n */\n clonedItemSetId?: string;\n}\n\nexport interface AllocateItemSetsRequest {\n /**\n * Number of sets to allocate\n * @min 1\n * @max 1000\n */\n numberOfSets?: number;\n}\n\nexport interface AllocateItemSetsResponse {\n /**\n * ID that is a shared reference between a benefit pool and a specific item.\n * @format GUID\n */\n itemSetIds?: 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 MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\nexport type CountItemsApplicationErrors = {\n code?: 'TOO_MANY_TO_COUNT';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Creates a benefit item.\n * @param item - Item to create.\n * @public\n * @documentationMaturity preview\n * @requiredField item\n * @requiredField item.externalId\n * @requiredField item.itemSetId\n * @requiredField item.namespace\n * @requiredField item.providerAppId\n * @permissionId BENEFIT_PROGRAMS.ITEM_CREATE\n * @applicableIdentity APP\n * @returns Created item.\n * @fqn wix.benefit_programs.v1.item.ItemService.CreateItem\n */\nexport async function createItem(\n item: NonNullablePaths<\n Item,\n `externalId` | `itemSetId` | `namespace` | `providerAppId`,\n 2\n >\n): Promise<Item> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ item: item });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.createItem(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.item!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { item: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['item']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates benefit items.\n * @param items - Items to create.\n * @public\n * @documentationMaturity preview\n * @requiredField items\n * @requiredField items.externalId\n * @requiredField items.itemSetId\n * @requiredField items.namespace\n * @requiredField items.providerAppId\n * @permissionId BENEFIT_PROGRAMS.ITEM_CREATE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.BulkCreateItems\n */\nexport async function bulkCreateItems(\n items: NonNullablePaths<\n Item,\n `externalId` | `itemSetId` | `namespace` | `providerAppId`,\n 2\n >[],\n options?: BulkCreateItemsOptions\n): Promise<\n NonNullablePaths<\n BulkCreateItemsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\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 items: items,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.bulkCreateItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n items: '$[0]',\n returnEntity: '$[1].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['items', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkCreateItemsOptions {\n /**\n * Whether to return the full item entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\n/**\n * Deletes a benefit item.\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n * @param itemId - Item ID.\n * @public\n * @documentationMaturity preview\n * @requiredField itemId\n * @permissionId BENEFIT_PROGRAMS.ITEM_DELETE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.DeleteItem\n */\nexport async function deleteItem(itemId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ itemId: itemId });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.deleteItem(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { itemId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['itemId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes benefit items.\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n * @param itemIds - List of IDs of the items to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField itemIds\n * @permissionId BENEFIT_PROGRAMS.ITEM_DELETE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.BulkDeleteItems\n */\nexport async function bulkDeleteItems(\n itemIds: string[]\n): Promise<\n NonNullablePaths<\n BulkDeleteItemsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ itemIds: itemIds });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.bulkDeleteItems(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: { itemIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['itemIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes benefit items that fulfill the specified filter conditions.\n *\n * For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n * @param namespace - Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @public\n * @documentationMaturity preview\n * @requiredField namespace\n * @permissionId BENEFIT_PROGRAMS.ITEM_DELETE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.BulkDeleteItemsByFilter\n */\nexport async function bulkDeleteItemsByFilter(\n namespace: string,\n options?: BulkDeleteItemsByFilterOptions\n): Promise<NonNullablePaths<BulkDeleteItemsByFilterResponse, `jobId`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n namespace: namespace,\n filter: options?.filter,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1Item.bulkDeleteItemsByFilter(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: { namespace: '$[0]', filter: '$[1].filter' },\n singleArgumentUnchanged: false,\n },\n ['namespace', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkDeleteItemsByFilterOptions {\n /** Filter options. To learn more, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */\n filter?: Record<string, any> | null;\n}\n\n/**\n * Updates a benefit item.\n *\n * Each time the benefit item is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the benefit item.\n * This ensures you're working with the latest benefit item\n * and prevents unintended overwrites.\n * @param _id - Benefit item ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField item\n * @requiredField item.revision\n * @permissionId BENEFIT_PROGRAMS.ITEM_UPDATE\n * @applicableIdentity APP\n * @returns Updated item.\n * @fqn wix.benefit_programs.v1.item.ItemService.UpdateItem\n */\nexport async function updateItem(\n _id: string,\n item: NonNullablePaths<UpdateItem, `revision`, 2>\n): Promise<Item> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n item: { ...item, id: _id },\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.updateItem(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.item!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { item: '$[1]' },\n explicitPathsToArguments: { 'item.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'item']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateItem {\n /**\n * Benefit item ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the benefit item is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the benefit item.\n *\n * Ignored when creating a benefit item.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the item was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the item was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * ID of the item in the app providing it.\n *\n * For example, if the item is a product provided by Wix Stores, the `externalId` would be the Wix Stores `product Id`.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalId?: string | null;\n /**\n * Benefit item category.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string | null;\n /**\n * Item set ID of the benefit that this benefit item is a part of.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string | null;\n /**\n * Benefit item display name.\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * ID of the app ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/apps-created-by-wix) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/apps-created-by-wix)) that defines and provides the item. For example, if the item is a Wix Stores product, this field's value is `215238eb-22a5-4c36-9e7b-e7c08025e04e`.\n * @format GUID\n * @immutable\n * @readonly\n */\n providerAppId?: string | null;\n /**\n * Custom field data for the benefit item object.\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string | null;\n}\n\n/**\n * Updates benefit items.\n *\n * Each time the benefit item is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the benefit item.\n * This ensures you're working with the latest benefit item\n * and prevents unintended overwrites.\n * @public\n * @documentationMaturity preview\n * @requiredField options.items.item\n * @requiredField options.items.item._id\n * @requiredField options.items.item.revision\n * @permissionId BENEFIT_PROGRAMS.ITEM_UPDATE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.BulkUpdateItems\n */\nexport async function bulkUpdateItems(\n options?: NonNullablePaths<\n BulkUpdateItemsOptions,\n | `items.${number}.item`\n | `items.${number}.item._id`\n | `items.${number}.item.revision`,\n 5\n >\n): Promise<\n NonNullablePaths<\n BulkUpdateItemsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\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 items: options?.items,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.bulkUpdateItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n items: '$[0].items',\n returnEntity: '$[0].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateItemsOptions {\n /**\n * Items to update.\n * @minSize 1\n * @maxSize 100\n */\n items?: MaskedItem[];\n /**\n * Whether to return the full item entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\n/**\n * Retrieves a benefit item.\n * @param itemId - ID of the item to retrieve.\n * @public\n * @documentationMaturity preview\n * @requiredField itemId\n * @permissionId BENEFIT_PROGRAMS.ITEM_READ\n * @applicableIdentity APP\n * @returns Retrieved item.\n * @fqn wix.benefit_programs.v1.item.ItemService.GetItem\n */\nexport async function getItem(itemId: string): Promise<Item> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ itemId: itemId });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.getItem(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.item!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { itemId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['itemId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of up to 1000 benefit items.\n * @public\n * @documentationMaturity preview\n * @permissionId BENEFIT_PROGRAMS.ITEM_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.ListItems\n */\nexport async function listItems(\n options?: ListItemsOptions\n): Promise<NonNullablePaths<ListItemsResponse, `items`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n cursorPaging: options?.cursorPaging,\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.listItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0].filter',\n cursorPaging: '$[0].cursorPaging',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListItemsOptions {\n /** Filter. */\n filter?: Filter;\n /** Cursor paging */\n cursorPaging?: CursorPaging;\n}\n\n/**\n * Creates a query to retrieve a list of items.\n *\n * The Query Items method builds a query to retrieve a list of items and returns a `ItemsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `ItemsQueryBuilder` methods onto the query. `ItemsQueryBuilder` methods enable you to filter, sort, and control the results that Query Items returns.\n *\n * Query Items has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `ItemsQueryResult`.\n * @public\n * @documentationMaturity preview\n * @permissionId BENEFIT_PROGRAMS.ITEM_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.QueryItems\n */\nexport function queryItems(): ItemsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<Item, 'CURSOR', QueryItemsRequest, QueryItemsResponse>({\n func: async (payload: QueryItemsRequest) => {\n const reqOpts = ambassadorWixBenefitProgramsV1Item.queryItems(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: QueryItemsRequest['query']) => {\n const args = [query, {}] as [QueryItemsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryItemsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.items,\n pagingMetadata: transformedData?.metadata,\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 ItemsQueryResult extends QueryCursorResult {\n items: Item[];\n query: ItemsQueryBuilder;\n next: () => Promise<ItemsQueryResult>;\n prev: () => Promise<ItemsQueryResult>;\n}\n\nexport interface ItemsQueryBuilder {\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 | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\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 | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\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 | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\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 | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\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 | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\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 | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\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:\n | '_id'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: string\n ) => ItemsQueryBuilder;\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:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any[]\n ) => ItemsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: boolean\n ) => ItemsQueryBuilder;\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 | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace'\n >\n ) => ItemsQueryBuilder;\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 | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace'\n >\n ) => ItemsQueryBuilder;\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) => ItemsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => ItemsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<ItemsQueryResult>;\n}\n\n/**\n * Counts how many benefit items exist that fulfill the specified filtering conditions.\n *\n * For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).\n * @public\n * @documentationMaturity preview\n * @permissionId BENEFIT_PROGRAMS.ITEM_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.CountItems\n */\nexport async function countItems(options?: CountItemsOptions): Promise<\n NonNullablePaths<CountItemsResponse, `count`, 2> & {\n __applicationErrorsType?: CountItemsApplicationErrors;\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 filter: options?.filter,\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.countItems(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: { filter: '$[0].filter' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CountItemsOptions {\n /**\n * Items to count.\n *\n * Filter options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language).\n */\n filter?: Record<string, any> | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { 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\nfunction resolveWixBenefitProgramsV1ItemItemServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/benefit-programs-items',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_items';\n\n/** Creates a benefit item. */\nexport function createItem(payload: object): RequestOptionsFactory<any> {\n function __createItem({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'item.createdDate' }, { path: 'item.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.CreateItem',\n packageName: PACKAGE_NAME,\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'item.createdDate' }, { path: 'item.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createItem;\n}\n\n/** Creates benefit items. */\nexport function bulkCreateItems(payload: object): RequestOptionsFactory<any> {\n function __bulkCreateItems({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'items.createdDate' }, { path: 'items.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.BulkCreateItems',\n packageName: PACKAGE_NAME,\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/bulk/items/create',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateItems;\n}\n\n/**\n * Deletes a benefit item.\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n */\nexport function deleteItem(payload: object): RequestOptionsFactory<any> {\n function __deleteItem({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.DeleteItem',\n packageName: PACKAGE_NAME,\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items/{itemId}/delete',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __deleteItem;\n}\n\n/**\n * Deletes benefit items.\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n */\nexport function bulkDeleteItems(payload: object): RequestOptionsFactory<any> {\n function __bulkDeleteItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.BulkDeleteItems',\n packageName: PACKAGE_NAME,\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/bulk/items/delete',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkDeleteItems;\n}\n\n/**\n * Deletes benefit items that fulfill the specified filter conditions.\n *\n * For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n */\nexport function bulkDeleteItemsByFilter(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeleteItemsByFilter({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.item.ItemService.BulkDeleteItemsByFilter',\n packageName: PACKAGE_NAME,\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/bulk/items/delete-by-filter',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteItemsByFilter;\n}\n\n/**\n * Updates a benefit item.\n *\n * Each time the benefit item is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the benefit item.\n * This ensures you're working with the latest benefit item\n * and prevents unintended overwrites.\n */\nexport function updateItem(payload: object): RequestOptionsFactory<any> {\n function __updateItem({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'item.createdDate' }, { path: 'item.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'PATCH' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.UpdateItem',\n packageName: PACKAGE_NAME,\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items/{item.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'item.createdDate' }, { path: 'item.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateItem;\n}\n\n/**\n * Updates benefit items.\n *\n * Each time the benefit item is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the benefit item.\n * This ensures you're working with the latest benefit item\n * and prevents unintended overwrites.\n */\nexport function bulkUpdateItems(payload: object): RequestOptionsFactory<any> {\n function __bulkUpdateItems({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'items.fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'items.item.createdDate' },\n { path: 'items.item.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.BulkUpdateItems',\n packageName: PACKAGE_NAME,\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/bulk/items/update',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpdateItems;\n}\n\n/** Retrieves a benefit item. */\nexport function getItem(payload: object): RequestOptionsFactory<any> {\n function __getItem({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'GET' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.GetItem',\n packageName: PACKAGE_NAME,\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items/{itemId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'item.createdDate' }, { path: 'item.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getItem;\n}\n\n/** Retrieves a list of up to 1000 benefit items. */\nexport function listItems(payload: object): RequestOptionsFactory<any> {\n function __listItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'GET' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.ListItems',\n packageName: PACKAGE_NAME,\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'items.createdDate' },\n { path: 'items.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listItems;\n}\n\n/**\n * Creates a query to retrieve a list of items.\n *\n * The Query Items method builds a query to retrieve a list of items and returns a `ItemsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `ItemsQueryBuilder` methods onto the query. `ItemsQueryBuilder` methods enable you to filter, sort, and control the results that Query Items returns.\n *\n * Query Items has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `ItemsQueryResult`.\n */\nexport function queryItems(payload: object): RequestOptionsFactory<any> {\n function __queryItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.QueryItems',\n packageName: PACKAGE_NAME,\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'items.createdDate' },\n { path: 'items.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryItems;\n}\n\n/**\n * Counts how many benefit items exist that fulfill the specified filtering conditions.\n *\n * For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).\n */\nexport function countItems(payload: object): RequestOptionsFactory<any> {\n function __countItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.CountItems',\n packageName: PACKAGE_NAME,\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items/count',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __countItems;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkCreateItemsOptions,\n BulkCreateItemsResponse,\n BulkDeleteItemsByFilterOptions,\n BulkDeleteItemsByFilterResponse,\n BulkDeleteItemsResponse,\n BulkUpdateItemsOptions,\n BulkUpdateItemsResponse,\n CountItemsApplicationErrors,\n CountItemsOptions,\n CountItemsResponse,\n Item,\n ItemsQueryBuilder,\n ListItemsOptions,\n ListItemsResponse,\n UpdateItem,\n bulkCreateItems as universalBulkCreateItems,\n bulkDeleteItems as universalBulkDeleteItems,\n bulkDeleteItemsByFilter as universalBulkDeleteItemsByFilter,\n bulkUpdateItems as universalBulkUpdateItems,\n countItems as universalCountItems,\n createItem as universalCreateItem,\n deleteItem as universalDeleteItem,\n getItem as universalGetItem,\n listItems as universalListItems,\n queryItems as universalQueryItems,\n updateItem as universalUpdateItem,\n} from './benefit-programs-v1-item-items.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/benefit-programs' };\n\nexport function createItem(httpClient: HttpClient): CreateItemSignature {\n return (\n item: NonNullablePaths<\n Item,\n `externalId` | `itemSetId` | `namespace` | `providerAppId`,\n 2\n >\n ) =>\n universalCreateItem(\n item,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateItemSignature {\n /**\n * Creates a benefit item.\n * @param - Item to create.\n * @returns Created item.\n */\n (\n item: NonNullablePaths<\n Item,\n `externalId` | `itemSetId` | `namespace` | `providerAppId`,\n 2\n >\n ): Promise<Item>;\n}\n\nexport function bulkCreateItems(\n httpClient: HttpClient\n): BulkCreateItemsSignature {\n return (\n items: NonNullablePaths<\n Item,\n `externalId` | `itemSetId` | `namespace` | `providerAppId`,\n 2\n >[],\n options?: BulkCreateItemsOptions\n ) =>\n universalBulkCreateItems(\n items,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkCreateItemsSignature {\n /**\n * Creates benefit items.\n * @param - Items to create.\n */\n (\n items: NonNullablePaths<\n Item,\n `externalId` | `itemSetId` | `namespace` | `providerAppId`,\n 2\n >[],\n options?: BulkCreateItemsOptions\n ): Promise<\n NonNullablePaths<\n BulkCreateItemsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\n}\n\nexport function deleteItem(httpClient: HttpClient): DeleteItemSignature {\n return (itemId: string) =>\n universalDeleteItem(\n itemId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteItemSignature {\n /**\n * Deletes a benefit item.\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n * @param - Item ID.\n */\n (itemId: string): Promise<void>;\n}\n\nexport function bulkDeleteItems(\n httpClient: HttpClient\n): BulkDeleteItemsSignature {\n return (itemIds: string[]) =>\n universalBulkDeleteItems(\n itemIds,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkDeleteItemsSignature {\n /**\n * Deletes benefit items.\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n * @param - List of IDs of the items to delete.\n */\n (itemIds: string[]): Promise<\n NonNullablePaths<\n BulkDeleteItemsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\n}\n\nexport function bulkDeleteItemsByFilter(\n httpClient: HttpClient\n): BulkDeleteItemsByFilterSignature {\n return (namespace: string, options?: BulkDeleteItemsByFilterOptions) =>\n universalBulkDeleteItemsByFilter(\n namespace,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkDeleteItemsByFilterSignature {\n /**\n * Deletes benefit items that fulfill the specified filter conditions.\n *\n * For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n * @param - Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n */\n (namespace: string, options?: BulkDeleteItemsByFilterOptions): Promise<\n NonNullablePaths<BulkDeleteItemsByFilterResponse, `jobId`, 2>\n >;\n}\n\nexport function updateItem(httpClient: HttpClient): UpdateItemSignature {\n return (_id: string, item: NonNullablePaths<UpdateItem, `revision`, 2>) =>\n universalUpdateItem(\n _id,\n item,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateItemSignature {\n /**\n * Updates a benefit item.\n *\n * Each time the benefit item is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the benefit item.\n * This ensures you're working with the latest benefit item\n * and prevents unintended overwrites.\n * @param - Benefit item ID.\n * @returns Updated item.\n */\n (\n _id: string,\n item: NonNullablePaths<UpdateItem, `revision`, 2>\n ): Promise<Item>;\n}\n\nexport function bulkUpdateItems(\n httpClient: HttpClient\n): BulkUpdateItemsSignature {\n return (\n options?: NonNullablePaths<\n BulkUpdateItemsOptions,\n | `items.${number}.item`\n | `items.${number}.item._id`\n | `items.${number}.item.revision`,\n 5\n >\n ) =>\n universalBulkUpdateItems(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdateItemsSignature {\n /**\n * Updates benefit items.\n *\n * Each time the benefit item is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the benefit item.\n * This ensures you're working with the latest benefit item\n * and prevents unintended overwrites.\n */\n (\n options?: NonNullablePaths<\n BulkUpdateItemsOptions,\n | `items.${number}.item`\n | `items.${number}.item._id`\n | `items.${number}.item.revision`,\n 5\n >\n ): Promise<\n NonNullablePaths<\n BulkUpdateItemsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\n}\n\nexport function getItem(httpClient: HttpClient): GetItemSignature {\n return (itemId: string) =>\n universalGetItem(\n itemId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetItemSignature {\n /**\n * Retrieves a benefit item.\n * @param - ID of the item to retrieve.\n * @returns Retrieved item.\n */\n (itemId: string): Promise<Item>;\n}\n\nexport function listItems(httpClient: HttpClient): ListItemsSignature {\n return (options?: ListItemsOptions) =>\n universalListItems(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListItemsSignature {\n /**\n * Retrieves a list of up to 1000 benefit items.\n */\n (options?: ListItemsOptions): Promise<\n NonNullablePaths<ListItemsResponse, `items`, 2>\n >;\n}\n\nexport function queryItems(httpClient: HttpClient): QueryItemsSignature {\n return () =>\n universalQueryItems(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryItemsSignature {\n /**\n * Creates a query to retrieve a list of items.\n *\n * The Query Items method builds a query to retrieve a list of items and returns a `ItemsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `ItemsQueryBuilder` methods onto the query. `ItemsQueryBuilder` methods enable you to filter, sort, and control the results that Query Items returns.\n *\n * Query Items has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `ItemsQueryResult`.\n */\n (): ItemsQueryBuilder;\n}\n\nexport function countItems(httpClient: HttpClient): CountItemsSignature {\n return (options?: CountItemsOptions) =>\n universalCountItems(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CountItemsSignature {\n /**\n * Counts how many benefit items exist that fulfill the specified filtering conditions.\n *\n * For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).\n */\n (options?: CountItemsOptions): Promise<\n NonNullablePaths<CountItemsResponse, `count`, 2> & {\n __applicationErrorsType?: CountItemsApplicationErrors;\n }\n >;\n}\n\nexport {\n ActionEvent,\n AllocateItemSetsRequest,\n AllocateItemSetsResponse,\n ApplicationError,\n BulkActionMetadata,\n BulkCloneItemSetsRequest,\n BulkCloneItemSetsResponse,\n BulkCloneItemSetsResult,\n BulkCreateItemsOptions,\n BulkCreateItemsRequest,\n BulkCreateItemsResponse,\n BulkDeleteItemsByFilterOptions,\n BulkDeleteItemsByFilterRequest,\n BulkDeleteItemsByFilterResponse,\n BulkDeleteItemsRequest,\n BulkDeleteItemsResponse,\n BulkItemResult,\n BulkUpdateItemsOptions,\n BulkUpdateItemsRequest,\n BulkUpdateItemsResponse,\n ByItemSetIdAndReference,\n ByItemSetIdAndReferenceFilter,\n ByReference,\n ByReferenceFilter,\n CloneItemsRequest,\n CloneItemsResponse,\n CountItemsOptions,\n CountItemsRequest,\n CountItemsResponse,\n CreateItemRequest,\n CreateItemResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteItemRequest,\n DeleteItemResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n ExtendedFields,\n Filter,\n FilterFilterOneOf,\n GetItemRequest,\n GetItemResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n Item,\n ItemMetadata,\n ItemsCloned,\n ItemsQueryBuilder,\n ItemsQueryResult,\n ListItemsOptions,\n ListItemsRequest,\n ListItemsResponse,\n MaskedItem,\n MessageEnvelope,\n QueryItemsRequest,\n QueryItemsResponse,\n RestoreInfo,\n SortOrder,\n Sorting,\n Type,\n UpdateItem,\n UpdateItemRequest,\n UpdateItemResponse,\n WebhookIdentityType,\n} from './benefit-programs-v1-item-items.universal.js';\n","import {\n createItem as publicCreateItem,\n bulkCreateItems as publicBulkCreateItems,\n deleteItem as publicDeleteItem,\n bulkDeleteItems as publicBulkDeleteItems,\n bulkDeleteItemsByFilter as publicBulkDeleteItemsByFilter,\n updateItem as publicUpdateItem,\n bulkUpdateItems as publicBulkUpdateItems,\n getItem as publicGetItem,\n listItems as publicListItems,\n queryItems as publicQueryItems,\n countItems as publicCountItems,\n} from './benefit-programs-v1-item-items.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const createItem: MaybeContext<\n BuildRESTFunction<typeof publicCreateItem> & typeof publicCreateItem\n> = /*#__PURE__*/ createRESTModule(publicCreateItem);\nexport const bulkCreateItems: MaybeContext<\n BuildRESTFunction<typeof publicBulkCreateItems> & typeof publicBulkCreateItems\n> = /*#__PURE__*/ createRESTModule(publicBulkCreateItems);\nexport const deleteItem: MaybeContext<\n BuildRESTFunction<typeof publicDeleteItem> & typeof publicDeleteItem\n> = /*#__PURE__*/ createRESTModule(publicDeleteItem);\nexport const bulkDeleteItems: MaybeContext<\n BuildRESTFunction<typeof publicBulkDeleteItems> & typeof publicBulkDeleteItems\n> = /*#__PURE__*/ createRESTModule(publicBulkDeleteItems);\nexport const bulkDeleteItemsByFilter: MaybeContext<\n BuildRESTFunction<typeof publicBulkDeleteItemsByFilter> &\n typeof publicBulkDeleteItemsByFilter\n> = /*#__PURE__*/ createRESTModule(publicBulkDeleteItemsByFilter);\nexport const updateItem: MaybeContext<\n BuildRESTFunction<typeof publicUpdateItem> & typeof publicUpdateItem\n> = /*#__PURE__*/ createRESTModule(publicUpdateItem);\nexport const bulkUpdateItems: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdateItems> & typeof publicBulkUpdateItems\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdateItems);\nexport const getItem: MaybeContext<\n BuildRESTFunction<typeof publicGetItem> & typeof publicGetItem\n> = /*#__PURE__*/ createRESTModule(publicGetItem);\nexport const listItems: MaybeContext<\n BuildRESTFunction<typeof publicListItems> & typeof publicListItems\n> = /*#__PURE__*/ createRESTModule(publicListItems);\nexport const queryItems: MaybeContext<\n BuildRESTFunction<typeof publicQueryItems> & typeof publicQueryItems\n> = /*#__PURE__*/ createRESTModule(publicQueryItems);\nexport const countItems: MaybeContext<\n BuildRESTFunction<typeof publicCountItems> & typeof publicCountItems\n> = /*#__PURE__*/ createRESTModule(publicCountItems);\n\nexport {\n Type,\n SortOrder,\n WebhookIdentityType,\n} from './benefit-programs-v1-item-items.universal.js';\nexport {\n Item,\n ExtendedFields,\n ItemsCloned,\n CreateItemRequest,\n CreateItemResponse,\n BulkCreateItemsRequest,\n BulkCreateItemsResponse,\n BulkItemResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n DeleteItemRequest,\n DeleteItemResponse,\n BulkDeleteItemsRequest,\n BulkDeleteItemsResponse,\n BulkDeleteItemsByFilterRequest,\n BulkDeleteItemsByFilterResponse,\n UpdateItemRequest,\n UpdateItemResponse,\n BulkUpdateItemsRequest,\n MaskedItem,\n BulkUpdateItemsResponse,\n GetItemRequest,\n GetItemResponse,\n ListItemsRequest,\n ByItemSetIdAndReference,\n ByItemSetIdAndReferenceFilter,\n ByReference,\n ByReferenceFilter,\n Filter,\n FilterFilterOneOf,\n CursorPaging,\n ListItemsResponse,\n CursorPagingMetadata,\n Cursors,\n QueryItemsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n QueryItemsResponse,\n CountItemsRequest,\n CountItemsResponse,\n CloneItemsRequest,\n CloneItemsResponse,\n BulkCloneItemSetsRequest,\n BulkCloneItemSetsResponse,\n BulkCloneItemSetsResult,\n AllocateItemSetsRequest,\n AllocateItemSetsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BulkCreateItemsOptions,\n BulkDeleteItemsByFilterOptions,\n UpdateItem,\n BulkUpdateItemsOptions,\n ListItemsOptions,\n ItemsQueryResult,\n ItemsQueryBuilder,\n CountItemsOptions,\n} from './benefit-programs-v1-item-items.universal.js';\nexport {\n TypeWithLiterals,\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CountItemsApplicationErrors,\n} from './benefit-programs-v1-item-items.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,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;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,CAAC,KAAa,SACnBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAoBO,SAASC,iBACd,YAC0B;AAC1B,SAAO,CACL,YAQAA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAoCO,SAASC,SAAQ,YAA0C;AAChE,SAAO,CAAC,WACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAWO,SAASC,WAAU,YAA4C;AACpE,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAWO,SAASC,YAAW,YAA6C;AACtE,SAAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;AAmBO,SAASC,YAAW,YAA6C;AACtE,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AChVA,SAAS,wBAAwB;AAG1B,IAAMC,cAEK,iCAAiBA,WAAgB;AAC5C,IAAMC,mBAEK,iCAAiBA,gBAAqB;AACjD,IAAMC,cAEK,iCAAiBA,WAAgB;AAC5C,IAAMC,mBAEK,iCAAiBA,gBAAqB;AACjD,IAAMC,2BAGK,iCAAiBA,wBAA6B;AACzD,IAAMC,cAEK,iCAAiBA,WAAgB;AAC5C,IAAMC,mBAEK,iCAAiBA,gBAAqB;AACjD,IAAMC,WAEK,iCAAiBA,QAAa;AACzC,IAAMC,aAEK,iCAAiBA,UAAe;AAC3C,IAAMC,cAEK,iCAAiBA,WAAgB;AAC5C,IAAMC,cAEK,iCAAiBA,WAAgB;","names":["payload","transformPaths","Type","SortOrder","WebhookIdentityType","createItem","bulkCreateItems","deleteItem","bulkDeleteItems","bulkDeleteItemsByFilter","updateItem","bulkUpdateItems","getItem","listItems","queryItems","countItems","createItem","bulkCreateItems","deleteItem","bulkDeleteItems","bulkDeleteItemsByFilter","updateItem","bulkUpdateItems","getItem","listItems","queryItems","countItems","createItem","bulkCreateItems","deleteItem","bulkDeleteItems","bulkDeleteItemsByFilter","updateItem","bulkUpdateItems","getItem","listItems","queryItems","countItems"]}
1
+ {"version":3,"sources":["../../src/benefit-programs-v1-item-items.universal.ts","../../src/benefit-programs-v1-item-items.http.ts","../../src/benefit-programs-v1-item-items.public.ts","../../src/benefit-programs-v1-item-items.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 { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBenefitProgramsV1Item from './benefit-programs-v1-item-items.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface Item {\n /**\n * Benefit item ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the benefit item is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the benefit item.\n *\n * Ignored when creating a benefit item.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the item was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the item was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * ID of the item in the app providing it.\n *\n * For example, if the item is a product provided by Wix Stores, the `externalId` would be the Wix Stores `product Id`.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalId?: string | null;\n /**\n * Benefit item category.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string | null;\n /**\n * Item set ID of the benefit that this benefit item is a part of.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string | null;\n /**\n * Benefit item display name.\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * ID of the app ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/apps-created-by-wix) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/apps-created-by-wix)) that defines and provides the item. For example, if the item is a Wix Stores product, this field's value is `215238eb-22a5-4c36-9e7b-e7c08025e04e`.\n * @format GUID\n * @immutable\n * @readonly\n */\n providerAppId?: string | null;\n /**\n * Custom field data for the benefit item object.\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface ItemsCloned {\n /**\n * ID of the pool that had its items provisioned\n * @format GUID\n */\n itemSetId?: string;\n}\n\nexport interface CreateItemRequest {\n /** Item to create. */\n item: Item;\n}\n\nexport interface CreateItemResponse {\n /** Created item. */\n item?: Item;\n}\n\nexport interface BulkCreateItemsRequest {\n /**\n * Items to create.\n * @minSize 1\n * @maxSize 100\n */\n items: Item[];\n /**\n * Whether to return the full item entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkCreateItemsResponse {\n /**\n * List of created items and associated metadata.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkItemResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkItemResult {\n /** Item metadata. */\n itemMetadata?: ItemMetadata;\n /** Item. */\n item?: Item;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\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 was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface 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 DeleteItemRequest {\n /**\n * Item ID.\n * @format GUID\n */\n itemId: string;\n}\n\nexport interface DeleteItemResponse {}\n\nexport interface BulkDeleteItemsRequest {\n /**\n * List of IDs of the items to delete.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n itemIds: string[];\n}\n\nexport interface BulkDeleteItemsResponse {\n /**\n * List of deleted items and associated metadata.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkItemResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkDeleteItemsByFilterRequest {\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n /** Filter options. To learn more, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */\n filter?: Record<string, any> | null;\n}\n\nexport interface BulkDeleteItemsByFilterResponse {\n /**\n * Job ID for item deletion. Retrieve job details using the Async Job API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/async-jobs/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/async-job/introduction)).\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface UpdateItemRequest {\n /** Item to update. */\n item: Item;\n}\n\nexport interface UpdateItemResponse {\n /** Updated item. */\n item?: Item;\n}\n\nexport interface BulkUpdateItemsRequest {\n /**\n * Items to update.\n * @minSize 1\n * @maxSize 100\n */\n items?: MaskedItem[];\n /**\n * Whether to return the full item entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface MaskedItem {\n /** Item to update. */\n item?: Item;\n /** Explicit list of fields to update. */\n fieldMask?: string[];\n}\n\nexport interface BulkUpdateItemsResponse {\n /**\n * List of updated items and associated metadata.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkItemResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface GetItemRequest {\n /**\n * ID of the item to retrieve.\n * @format GUID\n */\n itemId: string;\n}\n\nexport interface GetItemResponse {\n /** Retrieved item. */\n item?: Item;\n}\n\nexport interface ListItemsRequest {\n /** Filter. */\n filter?: Filter;\n /** Cursor paging */\n cursorPaging?: CursorPaging;\n}\n\nexport enum Type {\n /** Unknown filter type. */\n UNKNOWN_FILTER = 'UNKNOWN_FILTER',\n /** Use with `filter.byItemSetIdAndReferenceOptions`. */\n BY_ITEM_SET_ID_AND_REFERENCE = 'BY_ITEM_SET_ID_AND_REFERENCE',\n /** Use with `filter.byReferenceOptions`. */\n BY_REFERENCE = 'BY_REFERENCE',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN_FILTER'\n | 'BY_ITEM_SET_ID_AND_REFERENCE'\n | 'BY_REFERENCE';\n\nexport interface ByItemSetIdAndReference {\n /**\n * Filter list.\n * @minSize 1\n * @maxSize 100\n */\n filters?: ByItemSetIdAndReferenceFilter[];\n}\n\nexport interface ByItemSetIdAndReferenceFilter {\n /**\n * ID set ID.\n * @format GUID\n */\n itemSetId?: string;\n /**\n * External item ID.\n * @format GUID\n */\n externalId?: string;\n /**\n * Item category.\n * @maxLength 20\n */\n category?: string;\n /**\n * *Required**. ID of the app providing the item.\n * @format GUID\n */\n providerAppId?: string;\n}\n\nexport interface ByReference {\n /**\n * Filter list.\n * @minSize 1\n * @maxSize 100\n */\n filters?: ByReferenceFilter[];\n}\n\nexport interface ByReferenceFilter {\n /**\n * External item ID.\n * @format GUID\n */\n externalId?: string;\n /**\n * Item category.\n * @maxLength 20\n */\n category?: string;\n /**\n * *Required**. ID of the app providing the item.\n * @format GUID\n */\n providerAppId?: string;\n}\n\nexport interface Filter extends FilterFilterOneOf {\n /** Filter the request by `itemSetId` and item reference. */\n byItemSetIdAndReferenceOptions?: ByItemSetIdAndReference;\n /** Filter the request item reference. */\n byReferenceOptions?: ByReference;\n /** Filter type. */\n type?: TypeWithLiterals;\n /**\n * Filter by namespace.\n * @minLength 1\n * @maxLength 20\n */\n namespace?: string;\n}\n\n/** @oneof */\nexport interface FilterFilterOneOf {\n /** Filter the request by `itemSetId` and item reference. */\n byItemSetIdAndReferenceOptions?: ByItemSetIdAndReference;\n /** Filter the request item reference. */\n byReferenceOptions?: ByReference;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return.\n * @max 1000\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 ListItemsResponse {\n /** Items. */\n items?: Item[];\n /** Metadata for paginated results. */\n metadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\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 QueryItemsRequest {\n /** Filter, sort, and paging to apply to the query. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * 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 QueryItemsResponse {\n /** List of retrieved items. */\n items?: Item[];\n /** Metadata for paginated results. */\n metadata?: CursorPagingMetadata;\n}\n\nexport interface CountItemsRequest {\n /**\n * Items to count.\n *\n * Filter options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language).\n */\n filter?: Record<string, any> | null;\n}\n\nexport interface CountItemsResponse {\n /** Number of items fulfilling the specified filter conditions. */\n count?: number;\n}\n\nexport interface CloneItemsRequest {\n /**\n * Id of the item set to be cloned\n * @format GUID\n */\n itemSetId?: string;\n}\n\nexport interface CloneItemsResponse {\n /**\n * Id of the item set that these items were added to\n * @format GUID\n */\n clonedItemSetId?: string;\n /**\n * Id of the job that is cloning the item set\n * @format GUID\n */\n cloneJobId?: string;\n}\n\nexport interface BulkCloneItemSetsRequest {\n /**\n * Id of the item sets to be cloned\n * @format GUID\n * @minSize 1\n * @maxSize 1000\n */\n itemSetIds?: string[];\n}\n\nexport interface BulkCloneItemSetsResponse {\n /**\n * Results\n * @minSize 1\n * @maxSize 1000\n */\n results?: BulkCloneItemSetsResult[];\n /** Bulk action metadata */\n bulkActionMetadata?: BulkActionMetadata;\n /**\n * Id of the job that is cloning the item set\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface BulkCloneItemSetsResult {\n /** Item metadata */\n itemMetadata?: ItemMetadata;\n /**\n * Id of the item set that these items were added to\n * @format GUID\n */\n clonedItemSetId?: string;\n}\n\nexport interface AllocateItemSetsRequest {\n /**\n * Number of sets to allocate\n * @min 1\n * @max 1000\n */\n numberOfSets?: number;\n}\n\nexport interface AllocateItemSetsResponse {\n /**\n * ID that is a shared reference between a benefit pool and a specific item.\n * @format GUID\n */\n itemSetIds?: 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 MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type CountItemsApplicationErrors = {\n code?: 'TOO_MANY_TO_COUNT';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Creates a benefit item.\n * @param item - Item to create.\n * @public\n * @documentationMaturity preview\n * @requiredField item\n * @requiredField item.externalId\n * @requiredField item.itemSetId\n * @requiredField item.namespace\n * @requiredField item.providerAppId\n * @permissionId BENEFIT_PROGRAMS.ITEM_CREATE\n * @applicableIdentity APP\n * @returns Created item.\n * @fqn wix.benefit_programs.v1.item.ItemService.CreateItem\n */\nexport async function createItem(\n item: NonNullablePaths<\n Item,\n `externalId` | `itemSetId` | `namespace` | `providerAppId`,\n 2\n >\n): Promise<Item> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ item: item });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.createItem(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.item!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { item: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['item']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates benefit items.\n * @param items - Items to create.\n * @public\n * @documentationMaturity preview\n * @requiredField items\n * @requiredField items.externalId\n * @requiredField items.itemSetId\n * @requiredField items.namespace\n * @requiredField items.providerAppId\n * @permissionId BENEFIT_PROGRAMS.ITEM_CREATE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.BulkCreateItems\n */\nexport async function bulkCreateItems(\n items: NonNullablePaths<\n Item,\n `externalId` | `itemSetId` | `namespace` | `providerAppId`,\n 2\n >[],\n options?: BulkCreateItemsOptions\n): Promise<\n NonNullablePaths<\n BulkCreateItemsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\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 items: items,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.bulkCreateItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n items: '$[0]',\n returnEntity: '$[1].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['items', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkCreateItemsOptions {\n /**\n * Whether to return the full item entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\n/**\n * Deletes a benefit item.\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n * @param itemId - Item ID.\n * @public\n * @documentationMaturity preview\n * @requiredField itemId\n * @permissionId BENEFIT_PROGRAMS.ITEM_DELETE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.DeleteItem\n */\nexport async function deleteItem(itemId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ itemId: itemId });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.deleteItem(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { itemId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['itemId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes benefit items.\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n * @param itemIds - List of IDs of the items to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField itemIds\n * @permissionId BENEFIT_PROGRAMS.ITEM_DELETE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.BulkDeleteItems\n */\nexport async function bulkDeleteItems(\n itemIds: string[]\n): Promise<\n NonNullablePaths<\n BulkDeleteItemsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ itemIds: itemIds });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.bulkDeleteItems(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: { itemIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['itemIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes benefit items that fulfill the specified filter conditions.\n *\n * For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n * @param namespace - Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @public\n * @documentationMaturity preview\n * @requiredField namespace\n * @permissionId BENEFIT_PROGRAMS.ITEM_DELETE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.BulkDeleteItemsByFilter\n */\nexport async function bulkDeleteItemsByFilter(\n namespace: string,\n options?: BulkDeleteItemsByFilterOptions\n): Promise<NonNullablePaths<BulkDeleteItemsByFilterResponse, `jobId`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n namespace: namespace,\n filter: options?.filter,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1Item.bulkDeleteItemsByFilter(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: { namespace: '$[0]', filter: '$[1].filter' },\n singleArgumentUnchanged: false,\n },\n ['namespace', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkDeleteItemsByFilterOptions {\n /** Filter options. To learn more, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */\n filter?: Record<string, any> | null;\n}\n\n/**\n * Updates a benefit item.\n *\n * Each time the benefit item is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the benefit item.\n * This ensures you're working with the latest benefit item\n * and prevents unintended overwrites.\n * @param _id - Benefit item ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField item\n * @requiredField item.revision\n * @permissionId BENEFIT_PROGRAMS.ITEM_UPDATE\n * @applicableIdentity APP\n * @returns Updated item.\n * @fqn wix.benefit_programs.v1.item.ItemService.UpdateItem\n */\nexport async function updateItem(\n _id: string,\n item: NonNullablePaths<UpdateItem, `revision`, 2>\n): Promise<Item> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n item: { ...item, id: _id },\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.updateItem(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.item!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { item: '$[1]' },\n explicitPathsToArguments: { 'item.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'item']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateItem {\n /**\n * Benefit item ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the benefit item is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the benefit item.\n *\n * Ignored when creating a benefit item.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the item was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the item was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * ID of the item in the app providing it.\n *\n * For example, if the item is a product provided by Wix Stores, the `externalId` would be the Wix Stores `product Id`.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalId?: string | null;\n /**\n * Benefit item category.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string | null;\n /**\n * Item set ID of the benefit that this benefit item is a part of.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string | null;\n /**\n * Benefit item display name.\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * ID of the app ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/apps-created-by-wix) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/apps-created-by-wix)) that defines and provides the item. For example, if the item is a Wix Stores product, this field's value is `215238eb-22a5-4c36-9e7b-e7c08025e04e`.\n * @format GUID\n * @immutable\n * @readonly\n */\n providerAppId?: string | null;\n /**\n * Custom field data for the benefit item object.\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string | null;\n}\n\n/**\n * Updates benefit items.\n *\n * Each time the benefit item is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the benefit item.\n * This ensures you're working with the latest benefit item\n * and prevents unintended overwrites.\n * @public\n * @documentationMaturity preview\n * @requiredField options.items.item\n * @requiredField options.items.item._id\n * @requiredField options.items.item.revision\n * @permissionId BENEFIT_PROGRAMS.ITEM_UPDATE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.BulkUpdateItems\n */\nexport async function bulkUpdateItems(\n options?: NonNullablePaths<\n BulkUpdateItemsOptions,\n | `items.${number}.item`\n | `items.${number}.item._id`\n | `items.${number}.item.revision`,\n 5\n >\n): Promise<\n NonNullablePaths<\n BulkUpdateItemsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\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 items: options?.items,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.bulkUpdateItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n items: '$[0].items',\n returnEntity: '$[0].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateItemsOptions {\n /**\n * Items to update.\n * @minSize 1\n * @maxSize 100\n */\n items?: MaskedItem[];\n /**\n * Whether to return the full item entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\n/**\n * Retrieves a benefit item.\n * @param itemId - ID of the item to retrieve.\n * @public\n * @documentationMaturity preview\n * @requiredField itemId\n * @permissionId BENEFIT_PROGRAMS.ITEM_READ\n * @applicableIdentity APP\n * @returns Retrieved item.\n * @fqn wix.benefit_programs.v1.item.ItemService.GetItem\n */\nexport async function getItem(itemId: string): Promise<Item> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ itemId: itemId });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.getItem(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.item!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { itemId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['itemId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of up to 1000 benefit items.\n * @public\n * @documentationMaturity preview\n * @permissionId BENEFIT_PROGRAMS.ITEM_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.ListItems\n */\nexport async function listItems(\n options?: ListItemsOptions\n): Promise<NonNullablePaths<ListItemsResponse, `items`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n cursorPaging: options?.cursorPaging,\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.listItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0].filter',\n cursorPaging: '$[0].cursorPaging',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListItemsOptions {\n /** Filter. */\n filter?: Filter;\n /** Cursor paging */\n cursorPaging?: CursorPaging;\n}\n\n/**\n * Creates a query to retrieve a list of items.\n *\n * The Query Items method builds a query to retrieve a list of items and returns a `ItemsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `ItemsQueryBuilder` methods onto the query. `ItemsQueryBuilder` methods enable you to filter, sort, and control the results that Query Items returns.\n *\n * Query Items has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `ItemsQueryResult`.\n * @public\n * @documentationMaturity preview\n * @permissionId BENEFIT_PROGRAMS.ITEM_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.QueryItems\n */\nexport function queryItems(): ItemsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<Item, 'CURSOR', QueryItemsRequest, QueryItemsResponse>({\n func: async (payload: QueryItemsRequest) => {\n const reqOpts = ambassadorWixBenefitProgramsV1Item.queryItems(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: QueryItemsRequest['query']) => {\n const args = [query, {}] as [QueryItemsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryItemsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.items,\n pagingMetadata: transformedData?.metadata,\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 ItemsQueryResult extends QueryCursorResult {\n items: Item[];\n query: ItemsQueryBuilder;\n next: () => Promise<ItemsQueryResult>;\n prev: () => Promise<ItemsQueryResult>;\n}\n\nexport interface ItemsQueryBuilder {\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 | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\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 | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\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 | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\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 | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\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 | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\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 | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\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:\n | '_id'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: string\n ) => ItemsQueryBuilder;\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:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any[]\n ) => ItemsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: boolean\n ) => ItemsQueryBuilder;\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 | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace'\n >\n ) => ItemsQueryBuilder;\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 | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace'\n >\n ) => ItemsQueryBuilder;\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) => ItemsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => ItemsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<ItemsQueryResult>;\n}\n\n/**\n * Counts how many benefit items exist that fulfill the specified filtering conditions.\n *\n * For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).\n * @public\n * @documentationMaturity preview\n * @permissionId BENEFIT_PROGRAMS.ITEM_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.CountItems\n */\nexport async function countItems(options?: CountItemsOptions): Promise<\n NonNullablePaths<CountItemsResponse, `count`, 2> & {\n __applicationErrorsType?: CountItemsApplicationErrors;\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 filter: options?.filter,\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.countItems(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: { filter: '$[0].filter' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CountItemsOptions {\n /**\n * Items to count.\n *\n * Filter options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language).\n */\n filter?: Record<string, any> | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { 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\nfunction resolveWixBenefitProgramsV1ItemItemServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/benefit-programs-items',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_items';\n\n/** Creates a benefit item. */\nexport function createItem(payload: object): RequestOptionsFactory<any> {\n function __createItem({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'item.createdDate' }, { path: 'item.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.CreateItem',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'item.createdDate' }, { path: 'item.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createItem;\n}\n\n/** Creates benefit items. */\nexport function bulkCreateItems(payload: object): RequestOptionsFactory<any> {\n function __bulkCreateItems({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'items.createdDate' }, { path: 'items.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.BulkCreateItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/bulk/items/create',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateItems;\n}\n\n/**\n * Deletes a benefit item.\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n */\nexport function deleteItem(payload: object): RequestOptionsFactory<any> {\n function __deleteItem({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.DeleteItem',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items/{itemId}/delete',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __deleteItem;\n}\n\n/**\n * Deletes benefit items.\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n */\nexport function bulkDeleteItems(payload: object): RequestOptionsFactory<any> {\n function __bulkDeleteItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.BulkDeleteItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/bulk/items/delete',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkDeleteItems;\n}\n\n/**\n * Deletes benefit items that fulfill the specified filter conditions.\n *\n * For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n */\nexport function bulkDeleteItemsByFilter(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeleteItemsByFilter({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.item.ItemService.BulkDeleteItemsByFilter',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/bulk/items/delete-by-filter',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteItemsByFilter;\n}\n\n/**\n * Updates a benefit item.\n *\n * Each time the benefit item is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the benefit item.\n * This ensures you're working with the latest benefit item\n * and prevents unintended overwrites.\n */\nexport function updateItem(payload: object): RequestOptionsFactory<any> {\n function __updateItem({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'item.createdDate' }, { path: 'item.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'PATCH' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.UpdateItem',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items/{item.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'item.createdDate' }, { path: 'item.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateItem;\n}\n\n/**\n * Updates benefit items.\n *\n * Each time the benefit item is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the benefit item.\n * This ensures you're working with the latest benefit item\n * and prevents unintended overwrites.\n */\nexport function bulkUpdateItems(payload: object): RequestOptionsFactory<any> {\n function __bulkUpdateItems({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'items.fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'items.item.createdDate' },\n { path: 'items.item.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.BulkUpdateItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/bulk/items/update',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpdateItems;\n}\n\n/** Retrieves a benefit item. */\nexport function getItem(payload: object): RequestOptionsFactory<any> {\n function __getItem({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'GET' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.GetItem',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items/{itemId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'item.createdDate' }, { path: 'item.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getItem;\n}\n\n/** Retrieves a list of up to 1000 benefit items. */\nexport function listItems(payload: object): RequestOptionsFactory<any> {\n function __listItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'GET' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.ListItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'items.createdDate' },\n { path: 'items.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listItems;\n}\n\n/**\n * Creates a query to retrieve a list of items.\n *\n * The Query Items method builds a query to retrieve a list of items and returns a `ItemsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `ItemsQueryBuilder` methods onto the query. `ItemsQueryBuilder` methods enable you to filter, sort, and control the results that Query Items returns.\n *\n * Query Items has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `ItemsQueryResult`.\n */\nexport function queryItems(payload: object): RequestOptionsFactory<any> {\n function __queryItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.QueryItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'items.createdDate' },\n { path: 'items.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryItems;\n}\n\n/**\n * Counts how many benefit items exist that fulfill the specified filtering conditions.\n *\n * For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).\n */\nexport function countItems(payload: object): RequestOptionsFactory<any> {\n function __countItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.CountItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items/count',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __countItems;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkCreateItemsOptions,\n BulkCreateItemsResponse,\n BulkDeleteItemsByFilterOptions,\n BulkDeleteItemsByFilterResponse,\n BulkDeleteItemsResponse,\n BulkUpdateItemsOptions,\n BulkUpdateItemsResponse,\n CountItemsApplicationErrors,\n CountItemsOptions,\n CountItemsResponse,\n Item,\n ItemsQueryBuilder,\n ListItemsOptions,\n ListItemsResponse,\n UpdateItem,\n bulkCreateItems as universalBulkCreateItems,\n bulkDeleteItems as universalBulkDeleteItems,\n bulkDeleteItemsByFilter as universalBulkDeleteItemsByFilter,\n bulkUpdateItems as universalBulkUpdateItems,\n countItems as universalCountItems,\n createItem as universalCreateItem,\n deleteItem as universalDeleteItem,\n getItem as universalGetItem,\n listItems as universalListItems,\n queryItems as universalQueryItems,\n updateItem as universalUpdateItem,\n} from './benefit-programs-v1-item-items.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/benefit-programs' };\n\nexport function createItem(httpClient: HttpClient): CreateItemSignature {\n return (\n item: NonNullablePaths<\n Item,\n `externalId` | `itemSetId` | `namespace` | `providerAppId`,\n 2\n >\n ) =>\n universalCreateItem(\n item,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateItemSignature {\n /**\n * Creates a benefit item.\n * @param - Item to create.\n * @returns Created item.\n */\n (\n item: NonNullablePaths<\n Item,\n `externalId` | `itemSetId` | `namespace` | `providerAppId`,\n 2\n >\n ): Promise<Item>;\n}\n\nexport function bulkCreateItems(\n httpClient: HttpClient\n): BulkCreateItemsSignature {\n return (\n items: NonNullablePaths<\n Item,\n `externalId` | `itemSetId` | `namespace` | `providerAppId`,\n 2\n >[],\n options?: BulkCreateItemsOptions\n ) =>\n universalBulkCreateItems(\n items,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkCreateItemsSignature {\n /**\n * Creates benefit items.\n * @param - Items to create.\n */\n (\n items: NonNullablePaths<\n Item,\n `externalId` | `itemSetId` | `namespace` | `providerAppId`,\n 2\n >[],\n options?: BulkCreateItemsOptions\n ): Promise<\n NonNullablePaths<\n BulkCreateItemsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\n}\n\nexport function deleteItem(httpClient: HttpClient): DeleteItemSignature {\n return (itemId: string) =>\n universalDeleteItem(\n itemId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeleteItemSignature {\n /**\n * Deletes a benefit item.\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n * @param - Item ID.\n */\n (itemId: string): Promise<void>;\n}\n\nexport function bulkDeleteItems(\n httpClient: HttpClient\n): BulkDeleteItemsSignature {\n return (itemIds: string[]) =>\n universalBulkDeleteItems(\n itemIds,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkDeleteItemsSignature {\n /**\n * Deletes benefit items.\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n * @param - List of IDs of the items to delete.\n */\n (itemIds: string[]): Promise<\n NonNullablePaths<\n BulkDeleteItemsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\n}\n\nexport function bulkDeleteItemsByFilter(\n httpClient: HttpClient\n): BulkDeleteItemsByFilterSignature {\n return (namespace: string, options?: BulkDeleteItemsByFilterOptions) =>\n universalBulkDeleteItemsByFilter(\n namespace,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkDeleteItemsByFilterSignature {\n /**\n * Deletes benefit items that fulfill the specified filter conditions.\n *\n * For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n * @param - Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n */\n (namespace: string, options?: BulkDeleteItemsByFilterOptions): Promise<\n NonNullablePaths<BulkDeleteItemsByFilterResponse, `jobId`, 2>\n >;\n}\n\nexport function updateItem(httpClient: HttpClient): UpdateItemSignature {\n return (_id: string, item: NonNullablePaths<UpdateItem, `revision`, 2>) =>\n universalUpdateItem(\n _id,\n item,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateItemSignature {\n /**\n * Updates a benefit item.\n *\n * Each time the benefit item is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the benefit item.\n * This ensures you're working with the latest benefit item\n * and prevents unintended overwrites.\n * @param - Benefit item ID.\n * @returns Updated item.\n */\n (\n _id: string,\n item: NonNullablePaths<UpdateItem, `revision`, 2>\n ): Promise<Item>;\n}\n\nexport function bulkUpdateItems(\n httpClient: HttpClient\n): BulkUpdateItemsSignature {\n return (\n options?: NonNullablePaths<\n BulkUpdateItemsOptions,\n | `items.${number}.item`\n | `items.${number}.item._id`\n | `items.${number}.item.revision`,\n 5\n >\n ) =>\n universalBulkUpdateItems(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdateItemsSignature {\n /**\n * Updates benefit items.\n *\n * Each time the benefit item is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the benefit item.\n * This ensures you're working with the latest benefit item\n * and prevents unintended overwrites.\n */\n (\n options?: NonNullablePaths<\n BulkUpdateItemsOptions,\n | `items.${number}.item`\n | `items.${number}.item._id`\n | `items.${number}.item.revision`,\n 5\n >\n ): Promise<\n NonNullablePaths<\n BulkUpdateItemsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\n}\n\nexport function getItem(httpClient: HttpClient): GetItemSignature {\n return (itemId: string) =>\n universalGetItem(\n itemId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetItemSignature {\n /**\n * Retrieves a benefit item.\n * @param - ID of the item to retrieve.\n * @returns Retrieved item.\n */\n (itemId: string): Promise<Item>;\n}\n\nexport function listItems(httpClient: HttpClient): ListItemsSignature {\n return (options?: ListItemsOptions) =>\n universalListItems(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListItemsSignature {\n /**\n * Retrieves a list of up to 1000 benefit items.\n */\n (options?: ListItemsOptions): Promise<\n NonNullablePaths<ListItemsResponse, `items`, 2>\n >;\n}\n\nexport function queryItems(httpClient: HttpClient): QueryItemsSignature {\n return () =>\n universalQueryItems(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryItemsSignature {\n /**\n * Creates a query to retrieve a list of items.\n *\n * The Query Items method builds a query to retrieve a list of items and returns a `ItemsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `ItemsQueryBuilder` methods onto the query. `ItemsQueryBuilder` methods enable you to filter, sort, and control the results that Query Items returns.\n *\n * Query Items has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `ItemsQueryResult`.\n */\n (): ItemsQueryBuilder;\n}\n\nexport function countItems(httpClient: HttpClient): CountItemsSignature {\n return (options?: CountItemsOptions) =>\n universalCountItems(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CountItemsSignature {\n /**\n * Counts how many benefit items exist that fulfill the specified filtering conditions.\n *\n * For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).\n */\n (options?: CountItemsOptions): Promise<\n NonNullablePaths<CountItemsResponse, `count`, 2> & {\n __applicationErrorsType?: CountItemsApplicationErrors;\n }\n >;\n}\n\nexport {\n ActionEvent,\n AllocateItemSetsRequest,\n AllocateItemSetsResponse,\n ApplicationError,\n BulkActionMetadata,\n BulkCloneItemSetsRequest,\n BulkCloneItemSetsResponse,\n BulkCloneItemSetsResult,\n BulkCreateItemsOptions,\n BulkCreateItemsRequest,\n BulkCreateItemsResponse,\n BulkDeleteItemsByFilterOptions,\n BulkDeleteItemsByFilterRequest,\n BulkDeleteItemsByFilterResponse,\n BulkDeleteItemsRequest,\n BulkDeleteItemsResponse,\n BulkItemResult,\n BulkUpdateItemsOptions,\n BulkUpdateItemsRequest,\n BulkUpdateItemsResponse,\n ByItemSetIdAndReference,\n ByItemSetIdAndReferenceFilter,\n ByReference,\n ByReferenceFilter,\n CloneItemsRequest,\n CloneItemsResponse,\n CountItemsOptions,\n CountItemsRequest,\n CountItemsResponse,\n CreateItemRequest,\n CreateItemResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteItemRequest,\n DeleteItemResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n ExtendedFields,\n Filter,\n FilterFilterOneOf,\n GetItemRequest,\n GetItemResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n Item,\n ItemMetadata,\n ItemsCloned,\n ItemsQueryBuilder,\n ItemsQueryResult,\n ListItemsOptions,\n ListItemsRequest,\n ListItemsResponse,\n MaskedItem,\n MessageEnvelope,\n QueryItemsRequest,\n QueryItemsResponse,\n RestoreInfo,\n SortOrder,\n Sorting,\n Type,\n UpdateItem,\n UpdateItemRequest,\n UpdateItemResponse,\n WebhookIdentityType,\n} from './benefit-programs-v1-item-items.universal.js';\n","import {\n createItem as publicCreateItem,\n bulkCreateItems as publicBulkCreateItems,\n deleteItem as publicDeleteItem,\n bulkDeleteItems as publicBulkDeleteItems,\n bulkDeleteItemsByFilter as publicBulkDeleteItemsByFilter,\n updateItem as publicUpdateItem,\n bulkUpdateItems as publicBulkUpdateItems,\n getItem as publicGetItem,\n listItems as publicListItems,\n queryItems as publicQueryItems,\n countItems as publicCountItems,\n} from './benefit-programs-v1-item-items.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const createItem: MaybeContext<\n BuildRESTFunction<typeof publicCreateItem> & typeof publicCreateItem\n> = /*#__PURE__*/ createRESTModule(publicCreateItem);\nexport const bulkCreateItems: MaybeContext<\n BuildRESTFunction<typeof publicBulkCreateItems> & typeof publicBulkCreateItems\n> = /*#__PURE__*/ createRESTModule(publicBulkCreateItems);\nexport const deleteItem: MaybeContext<\n BuildRESTFunction<typeof publicDeleteItem> & typeof publicDeleteItem\n> = /*#__PURE__*/ createRESTModule(publicDeleteItem);\nexport const bulkDeleteItems: MaybeContext<\n BuildRESTFunction<typeof publicBulkDeleteItems> & typeof publicBulkDeleteItems\n> = /*#__PURE__*/ createRESTModule(publicBulkDeleteItems);\nexport const bulkDeleteItemsByFilter: MaybeContext<\n BuildRESTFunction<typeof publicBulkDeleteItemsByFilter> &\n typeof publicBulkDeleteItemsByFilter\n> = /*#__PURE__*/ createRESTModule(publicBulkDeleteItemsByFilter);\nexport const updateItem: MaybeContext<\n BuildRESTFunction<typeof publicUpdateItem> & typeof publicUpdateItem\n> = /*#__PURE__*/ createRESTModule(publicUpdateItem);\nexport const bulkUpdateItems: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdateItems> & typeof publicBulkUpdateItems\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdateItems);\nexport const getItem: MaybeContext<\n BuildRESTFunction<typeof publicGetItem> & typeof publicGetItem\n> = /*#__PURE__*/ createRESTModule(publicGetItem);\nexport const listItems: MaybeContext<\n BuildRESTFunction<typeof publicListItems> & typeof publicListItems\n> = /*#__PURE__*/ createRESTModule(publicListItems);\nexport const queryItems: MaybeContext<\n BuildRESTFunction<typeof publicQueryItems> & typeof publicQueryItems\n> = /*#__PURE__*/ createRESTModule(publicQueryItems);\nexport const countItems: MaybeContext<\n BuildRESTFunction<typeof publicCountItems> & typeof publicCountItems\n> = /*#__PURE__*/ createRESTModule(publicCountItems);\n\nexport {\n Type,\n SortOrder,\n WebhookIdentityType,\n} from './benefit-programs-v1-item-items.universal.js';\nexport {\n Item,\n ExtendedFields,\n ItemsCloned,\n CreateItemRequest,\n CreateItemResponse,\n BulkCreateItemsRequest,\n BulkCreateItemsResponse,\n BulkItemResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n DeleteItemRequest,\n DeleteItemResponse,\n BulkDeleteItemsRequest,\n BulkDeleteItemsResponse,\n BulkDeleteItemsByFilterRequest,\n BulkDeleteItemsByFilterResponse,\n UpdateItemRequest,\n UpdateItemResponse,\n BulkUpdateItemsRequest,\n MaskedItem,\n BulkUpdateItemsResponse,\n GetItemRequest,\n GetItemResponse,\n ListItemsRequest,\n ByItemSetIdAndReference,\n ByItemSetIdAndReferenceFilter,\n ByReference,\n ByReferenceFilter,\n Filter,\n FilterFilterOneOf,\n CursorPaging,\n ListItemsResponse,\n CursorPagingMetadata,\n Cursors,\n QueryItemsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n QueryItemsResponse,\n CountItemsRequest,\n CountItemsResponse,\n CloneItemsRequest,\n CloneItemsResponse,\n BulkCloneItemSetsRequest,\n BulkCloneItemSetsResponse,\n BulkCloneItemSetsResult,\n AllocateItemSetsRequest,\n AllocateItemSetsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BulkCreateItemsOptions,\n BulkDeleteItemsByFilterOptions,\n UpdateItem,\n BulkUpdateItemsOptions,\n ListItemsOptions,\n ItemsQueryResult,\n ItemsQueryBuilder,\n CountItemsOptions,\n} from './benefit-programs-v1-item-items.universal.js';\nexport {\n TypeWithLiterals,\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CountItemsApplicationErrors,\n} from './benefit-programs-v1-item-items.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,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,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,EACf;AACJ;AAWO,SAASC,WAAU,YAA4C;AACpE,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAWO,SAASC,YAAW,YAA6C;AACtE,SAAO,MACLA;AAAA;AAAA,IAEE,EAAE,WAAW;AAAA,EACf;AACJ;AAmBO,SAASC,YAAW,YAA6C;AACtE,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AChVA,SAAS,wBAAwB;AAG1B,IAAMC,cAEK,iCAAiBA,WAAgB;AAC5C,IAAMC,mBAEK,iCAAiBA,gBAAqB;AACjD,IAAMC,cAEK,iCAAiBA,WAAgB;AAC5C,IAAMC,mBAEK,iCAAiBA,gBAAqB;AACjD,IAAMC,2BAGK,iCAAiBA,wBAA6B;AACzD,IAAMC,cAEK,iCAAiBA,WAAgB;AAC5C,IAAMC,mBAEK,iCAAiBA,gBAAqB;AACjD,IAAMC,WAEK,iCAAiBA,QAAa;AACzC,IAAMC,aAEK,iCAAiBA,UAAe;AAC3C,IAAMC,cAEK,iCAAiBA,WAAgB;AAC5C,IAAMC,cAEK,iCAAiBA,WAAgB;","names":["payload","transformPaths","Type","SortOrder","WebhookIdentityType","createItem","bulkCreateItems","deleteItem","bulkDeleteItems","bulkDeleteItemsByFilter","updateItem","bulkUpdateItems","getItem","listItems","queryItems","countItems","createItem","bulkCreateItems","deleteItem","bulkDeleteItems","bulkDeleteItemsByFilter","updateItem","bulkUpdateItems","getItem","listItems","queryItems","countItems","createItem","bulkCreateItems","deleteItem","bulkDeleteItems","bulkDeleteItemsByFilter","updateItem","bulkUpdateItems","getItem","listItems","queryItems","countItems"]}
@@ -654,6 +654,7 @@ declare enum WebhookIdentityType {
654
654
  }
655
655
  /** @enumType */
656
656
  type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
657
+ /** @docsIgnore */
657
658
  type CountItemsApplicationErrors = {
658
659
  code?: 'TOO_MANY_TO_COUNT';
659
660
  description?: string;
@@ -156,6 +156,9 @@ function createItem(payload) {
156
156
  method: "POST",
157
157
  methodFqn: "wix.benefit_programs.v1.item.ItemService.CreateItem",
158
158
  packageName: PACKAGE_NAME,
159
+ migrationOptions: {
160
+ optInTransformResponse: true
161
+ },
159
162
  url: resolveWixBenefitProgramsV1ItemItemServiceUrl({
160
163
  protoPath: "/v1/items",
161
164
  data: serializedData,
@@ -186,6 +189,9 @@ function bulkCreateItems(payload) {
186
189
  method: "POST",
187
190
  methodFqn: "wix.benefit_programs.v1.item.ItemService.BulkCreateItems",
188
191
  packageName: PACKAGE_NAME,
192
+ migrationOptions: {
193
+ optInTransformResponse: true
194
+ },
189
195
  url: resolveWixBenefitProgramsV1ItemItemServiceUrl({
190
196
  protoPath: "/v1/bulk/items/create",
191
197
  data: serializedData,
@@ -213,6 +219,9 @@ function deleteItem(payload) {
213
219
  method: "POST",
214
220
  methodFqn: "wix.benefit_programs.v1.item.ItemService.DeleteItem",
215
221
  packageName: PACKAGE_NAME,
222
+ migrationOptions: {
223
+ optInTransformResponse: true
224
+ },
216
225
  url: resolveWixBenefitProgramsV1ItemItemServiceUrl({
217
226
  protoPath: "/v1/items/{itemId}/delete",
218
227
  data: payload,
@@ -231,6 +240,9 @@ function bulkDeleteItems(payload) {
231
240
  method: "POST",
232
241
  methodFqn: "wix.benefit_programs.v1.item.ItemService.BulkDeleteItems",
233
242
  packageName: PACKAGE_NAME,
243
+ migrationOptions: {
244
+ optInTransformResponse: true
245
+ },
234
246
  url: resolveWixBenefitProgramsV1ItemItemServiceUrl({
235
247
  protoPath: "/v1/bulk/items/delete",
236
248
  data: payload,
@@ -258,6 +270,9 @@ function bulkDeleteItemsByFilter(payload) {
258
270
  method: "POST",
259
271
  methodFqn: "wix.benefit_programs.v1.item.ItemService.BulkDeleteItemsByFilter",
260
272
  packageName: PACKAGE_NAME,
273
+ migrationOptions: {
274
+ optInTransformResponse: true
275
+ },
261
276
  url: resolveWixBenefitProgramsV1ItemItemServiceUrl({
262
277
  protoPath: "/v1/bulk/items/delete-by-filter",
263
278
  data: payload,
@@ -286,6 +301,9 @@ function updateItem(payload) {
286
301
  method: "PATCH",
287
302
  methodFqn: "wix.benefit_programs.v1.item.ItemService.UpdateItem",
288
303
  packageName: PACKAGE_NAME,
304
+ migrationOptions: {
305
+ optInTransformResponse: true
306
+ },
289
307
  url: resolveWixBenefitProgramsV1ItemItemServiceUrl({
290
308
  protoPath: "/v1/items/{item.id}",
291
309
  data: serializedData,
@@ -323,6 +341,9 @@ function bulkUpdateItems(payload) {
323
341
  method: "POST",
324
342
  methodFqn: "wix.benefit_programs.v1.item.ItemService.BulkUpdateItems",
325
343
  packageName: PACKAGE_NAME,
344
+ migrationOptions: {
345
+ optInTransformResponse: true
346
+ },
326
347
  url: resolveWixBenefitProgramsV1ItemItemServiceUrl({
327
348
  protoPath: "/v1/bulk/items/update",
328
349
  data: serializedData,
@@ -350,6 +371,9 @@ function getItem(payload) {
350
371
  method: "GET",
351
372
  methodFqn: "wix.benefit_programs.v1.item.ItemService.GetItem",
352
373
  packageName: PACKAGE_NAME,
374
+ migrationOptions: {
375
+ optInTransformResponse: true
376
+ },
353
377
  url: resolveWixBenefitProgramsV1ItemItemServiceUrl({
354
378
  protoPath: "/v1/items/{itemId}",
355
379
  data: payload,
@@ -374,6 +398,9 @@ function listItems(payload) {
374
398
  method: "GET",
375
399
  methodFqn: "wix.benefit_programs.v1.item.ItemService.ListItems",
376
400
  packageName: PACKAGE_NAME,
401
+ migrationOptions: {
402
+ optInTransformResponse: true
403
+ },
377
404
  url: resolveWixBenefitProgramsV1ItemItemServiceUrl({
378
405
  protoPath: "/v1/items",
379
406
  data: payload,
@@ -401,6 +428,9 @@ function queryItems(payload) {
401
428
  method: "POST",
402
429
  methodFqn: "wix.benefit_programs.v1.item.ItemService.QueryItems",
403
430
  packageName: PACKAGE_NAME,
431
+ migrationOptions: {
432
+ optInTransformResponse: true
433
+ },
404
434
  url: resolveWixBenefitProgramsV1ItemItemServiceUrl({
405
435
  protoPath: "/v1/items/query",
406
436
  data: payload,
@@ -428,6 +458,9 @@ function countItems(payload) {
428
458
  method: "POST",
429
459
  methodFqn: "wix.benefit_programs.v1.item.ItemService.CountItems",
430
460
  packageName: PACKAGE_NAME,
461
+ migrationOptions: {
462
+ optInTransformResponse: true
463
+ },
431
464
  url: resolveWixBenefitProgramsV1ItemItemServiceUrl({
432
465
  protoPath: "/v1/items/count",
433
466
  data: payload,