@wix/auto_sdk_benefit-programs_pool-definition-items 1.0.17 → 1.0.18

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,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
2
  import { ItemReference, RemoveItemsFromBenefitOptions, RemoveItemsFromBenefitResponse, RemoveItemsFromBenefitApplicationErrors, AddItemsToBenefitOptions, AddItemsToBenefitResponse, AddItemsToBenefitApplicationErrors, PoolDefinitionItemQuery, QueryPoolDefinitionItemsOptions, typedQueryPoolDefinitionItems, PoolDefinitionItemsQueryBuilder } from './index.typings.js';
3
- export { AccountInfo, ActionEvent, AddItemsToBenefitRequest, ApplicationError, BenefitInfo, BulkActionMetadata, BulkAddItemResult, BulkRemoveItemResult, CommonQueryWithEntityContext, CreditConfiguration, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, IdentificationData, IdentificationDataIdOneOf, InvalidatePoolDefinitionItemsRequest, InvalidatePoolDefinitionItemsResponse, ItemInfo, ItemMetadata, MessageEnvelope, PoolDefinitionInfo, PoolDefinitionItem, PoolDefinitionItemDeactivated, PoolDefinitionItemQuerySpec, PoolDefinitionItemRemoved, PoolDefinitionItemsQueryResult, ProgramDefinitionInfo, QueryPoolDefinitionItemsRequest, QueryPoolDefinitionItemsResponse, RemoveItemsFromBenefitRequest, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
3
+ export { AccountInfo, ActionEvent, AddItemsToBenefitRequest, ApplicationError, BenefitInfo, BulkActionMetadata, BulkAddItemResult, BulkRemoveItemResult, CommonQueryWithEntityContext, CreditConfiguration, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, IdentificationData, IdentificationDataIdOneOf, InvalidatePoolDefinitionItemsRequest, InvalidatePoolDefinitionItemsResponse, ItemInfo, ItemMetadata, MessageEnvelope, PoolDefinitionInfo, PoolDefinitionItem, PoolDefinitionItemQuerySpec, PoolDefinitionItemRemoved, PoolDefinitionItemsQueryResult, ProgramDefinitionInfo, QueryPoolDefinitionItemsRequest, QueryPoolDefinitionItemsResponse, RemoveItemsFromBenefitRequest, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
4
4
 
5
5
  declare function removeItemsFromBenefit$1(httpClient: HttpClient): RemoveItemsFromBenefitSignature;
6
6
  interface RemoveItemsFromBenefitSignature {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.universal.ts","../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.http.ts","../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.public.ts","../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.context.ts"],"sourcesContent":["export * from './src/benefit-programs-v1-pool-definition-item-pool-definition-items.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixBenefitProgramsV1PoolDefinitionItem from './benefit-programs-v1-pool-definition-item-pool-definition-items.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\nexport interface PoolDefinitionItem {\n /**\n * Benefit item ID. Deterministically generated from pool_definition_id and item_id — if you know both, you can compute the ID without querying.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Revision number, which increments by 1 each time the benefit item is updated.\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 * External item ID assigned by the provider of the items.\n *\n * For example, if the benefit items are products, this ID corresponds to the specific product ID in the provider's system.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalId?: string;\n /**\n * Item category. Groups benefit items together for organization and management purposes. For example, classes, posts, groups.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string;\n /**\n * ID of the application providing the benefit items. Each item's external_id is unique within its provider application.\n * @format GUID\n * @immutable\n * @readonly\n */\n providerAppId?: string;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you\n * created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string;\n /**\n * ID of the pool definition - the configuration that defines a set of benefits and which items are accessible within each benefit.\n * @format GUID\n * @immutable\n * @readonly\n */\n poolDefinitionId?: string;\n /**\n * Internal grouping identifier for this benefit's item set. Use pool_definition_id together with benefit_key\n * to identify a benefit — item_set_id is an implementation detail.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string;\n /**\n * Pool definition details including display name, description, and credit settings. Only populated when\n * POOL_DEFINITION is included in the fields request parameter.\n * @readonly\n */\n poolDefinition?: PoolDefinitionInfo;\n /**\n * Program definitions that include this item as an accessible benefit. Only id and external_id are\n * returned by default; request PROGRAM_DEFINITION to include display_name and description.\n * @maxSize 20\n * @readonly\n */\n programDefinitions?: ProgramDefinitionInfo[];\n /**\n * Item ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemId?: string;\n /**\n * Pricing and display information for the associated benefit, including credit price, name, and description.\n * Only populated when BENEFIT is included in the fields request parameter.\n * @readonly\n */\n benefitInfo?: BenefitInfo;\n /**\n * Display name for the catalog item. Only populated when ITEM is included in the fields request parameter.\n * @readonly\n */\n itemInfo?: ItemInfo;\n /**\n * Unique identifier for the benefit associated with this item.\n * @maxLength 64\n * @immutable\n * @readonly\n */\n benefitKey?: string;\n /**\n * Pre-computed search key for the item reference, built by concatenating provider_app_id, category, and external_id\n * separated by /. Use this field for efficient single-field filtering instead of composing three separate conditions.\n * @maxLength 94\n * @immutable\n * @readonly\n */\n itemSearchKey?: string;\n /**\n * Indicates whether this pool definition item has been removed\n * @readonly\n */\n removed?: boolean | null;\n}\n\nexport interface PoolDefinitionInfo {\n /**\n * Pool definition name.\n * @maxLength 64\n */\n displayName?: string;\n /**\n * Pool definition description.\n * @maxLength 450\n */\n description?: string | null;\n /** Credit configuration for this pool definition. When absent, benefits in this pool do not support credit-based pricing. */\n creditConfiguration?: CreditConfiguration;\n}\n\nexport interface CreditConfiguration {\n /**\n * Number of credits initially granted to a subscriber when this pool definition's benefits are activated.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n amount?: string;\n /**\n * Credit unit display name.\n * @maxLength 32\n */\n unitDisplayName?: string | null;\n /**\n * Credit unit type.\n * @maxLength 16\n */\n unitType?: string | null;\n}\n\nexport interface ProgramDefinitionInfo {\n /**\n * Program definition id\n * @format GUID\n */\n _id?: string;\n /**\n * Program definition external id\n * @format GUID\n */\n externalId?: string | null;\n /**\n * Program definition name\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * Program definition description.\n * @maxLength 450\n */\n description?: string | null;\n}\n\nexport interface BenefitInfo {\n /**\n * Price of the benefit in credits. The price is the same for all of this benefit's items.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n price?: string | null;\n /**\n * Benefit name.\n * @maxLength 40\n */\n displayName?: string | null;\n /**\n * Benefit description.\n * @maxLength 255\n */\n description?: string | null;\n}\n\nexport interface ItemInfo {\n /**\n * Item display name.\n * @maxLength 400\n */\n displayName?: string | null;\n}\n\n/** Deprecated: use PoolDefinitionItemRemoved instead. Will be removed after clients are migrated. */\nexport interface PoolDefinitionItemDeactivated {\n /** The pool definition item that was deactivated. */\n poolDefinitionItem?: PoolDefinitionItem;\n}\n\nexport interface PoolDefinitionItemRemoved {\n /** The pool definition item that was removed from the benefit. */\n poolDefinitionItem?: PoolDefinitionItem;\n}\n\nexport interface QueryPoolDefinitionItemsRequest {\n /** Query to select pool definition items. */\n query?: CursorQuery;\n /**\n * Fields to be included in the response.\n * @maxSize 4\n */\n fields?: RequestedFieldsWithLiterals[];\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 * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 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 enum RequestedFields {\n /** Populates the `poolDefinition` field with display name, description, and credit configuration. */\n POOL_DEFINITION = 'POOL_DEFINITION',\n /** Populates the `programDefinitions` field with `displayName` and description. */\n PROGRAM_DEFINITION = 'PROGRAM_DEFINITION',\n /** Populates the `benefitInfo` field with credit price, name, and description. */\n BENEFIT = 'BENEFIT',\n /** Populates the `itemInfo` field with the catalog item's display name. */\n ITEM = 'ITEM',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'POOL_DEFINITION'\n | 'PROGRAM_DEFINITION'\n | 'BENEFIT'\n | 'ITEM';\n\nexport interface QueryPoolDefinitionItemsResponse {\n /** List of items. */\n poolDefinitionItems?: PoolDefinitionItem[];\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 InvalidatePoolDefinitionItemsRequest {\n /**\n * The pool definition ID whose items are to be invalidated\n * @format GUID\n */\n poolDefinitionId?: string;\n /**\n * List of item set ids whose items are to be invalidated\n * @maxSize 10\n * @format GUID\n */\n itemSetIds?: string[];\n}\n\nexport interface InvalidatePoolDefinitionItemsResponse {}\n\nexport interface RemoveItemsFromBenefitRequest {\n /**\n * Items to remove from the benefit's item set.\n * @minSize 1\n * @maxSize 100\n */\n itemReferences: ItemReference[];\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit in the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\nexport interface ItemReference {\n /**\n * External item ID assigned by the provider.\n * @format GUID\n */\n externalId?: string;\n /**\n * Item category.\n * @maxLength 20\n */\n category?: string;\n}\n\nexport interface RemoveItemsFromBenefitResponse {\n /**\n * Per-item results aligned 1:1 with `itemReferences` from the request. `itemMetadata.originalIndex` always\n * refers to the position in the request. Item references that didn't match any registered item appear here as\n * failures with `itemMetadata.error.code` set to `NOT_FOUND`.\n */\n results?: BulkRemoveItemResult[];\n /** Aggregate counts for the bulk operation, including successes and failures. The service counts unresolved item references as failures. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkRemoveItemResult {\n /** Outcome metadata for a single item, including the underlying item ID, success flag, and error details on failure. */\n itemMetadata?: ItemMetadata;\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 AddItemsToBenefitRequest {\n /**\n * Items to add to the benefit's item set.\n * @minSize 1\n * @maxSize 100\n */\n itemReferences: ItemReference[];\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit in the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\nexport interface AddItemsToBenefitResponse {\n /** Per-item results. `itemMetadata.originalIndex` corresponds to the order of `itemReferences` in the request. */\n results?: BulkAddItemResult[];\n /** Aggregate counts for the bulk operation, including successes and failures. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkAddItemResult {\n /**\n * Outcome metadata for the catalog item created in the underlying item service. The item ID here is the Item entity\n * ID. The service creates PoolDefinitionItem records asynchronously and doesn't include their IDs in this response.\n */\n itemMetadata?: ItemMetadata;\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 /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type RemoveItemsFromBenefitApplicationErrors = {\n code?: 'POOL_DEFINITION_BENEFIT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type AddItemsToBenefitApplicationErrors = {\n code?: 'POOL_DEFINITION_BENEFIT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Creates a query to retrieve a list of poolDefinitionItems.\n *\n * The `queryPoolDefinitionItems()` method builds a query to retrieve a list of poolDefinitionItems and returns a `PoolDefinitionItemsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the [`find()`](/poolDefinitionItems/poolDefinitionItems-query-builder/find) function.\n *\n * You can refine the query by chaining `PoolDefinitionItemsQueryBuilder` methods onto the query. `PoolDefinitionItemsQueryBuilder` methods enable you to filter, sort, and control the results that `queryPoolDefinitionItems()` returns.\n *\n * The following `PoolDefinitionItemsQueryBuilder` functions are supported for `queryPoolDefinitionItems()`. For a full description of the item object, see the object returned for the [`poolDefinitionItems`](/poolDefinitionItems/poolDefinitionItems-query-result/poolDefinitionItems) property in `PoolDefinitionItemsQueryResult`.\n * @public\n * @documentationMaturity preview\n * @permissionId benefit_programs:v1:pool_definition_item:query_pool_definition_items\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.QueryPoolDefinitionItems\n */\nexport function queryPoolDefinitionItems(\n options?: QueryPoolDefinitionItemsOptions\n): PoolDefinitionItemsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n PoolDefinitionItem,\n 'CURSOR',\n QueryPoolDefinitionItemsRequest,\n QueryPoolDefinitionItemsResponse\n >({\n func: async (payload: QueryPoolDefinitionItemsRequest) => {\n const reqOpts =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.queryPoolDefinitionItems(\n { ...payload, ...(options ?? {}) }\n );\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: QueryPoolDefinitionItemsRequest['query']) => {\n const args = [query, options] as [\n QueryPoolDefinitionItemsRequest['query'],\n QueryPoolDefinitionItemsOptions\n ];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({\n data,\n }: HttpResponse<QueryPoolDefinitionItemsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.poolDefinitionItems,\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\nexport interface QueryPoolDefinitionItemsOptions {\n /**\n * Fields to be included in the response.\n * @maxSize 4\n */\n fields?: RequestedFieldsWithLiterals[] | undefined;\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface PoolDefinitionItemsQueryResult extends QueryCursorResult {\n items: PoolDefinitionItem[];\n query: PoolDefinitionItemsQueryBuilder;\n next: () => Promise<PoolDefinitionItemsQueryResult>;\n prev: () => Promise<PoolDefinitionItemsQueryResult>;\n}\n\nexport interface PoolDefinitionItemsQueryBuilder {\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 | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolDefinitionItemsQueryBuilder;\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 | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolDefinitionItemsQueryBuilder;\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 | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolDefinitionItemsQueryBuilder;\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 | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolDefinitionItemsQueryBuilder;\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 | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolDefinitionItemsQueryBuilder;\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 | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolDefinitionItemsQueryBuilder;\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 | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey',\n value: string\n ) => PoolDefinitionItemsQueryBuilder;\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 | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any[]\n ) => PoolDefinitionItemsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolDefinitionItemsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey',\n value: boolean\n ) => PoolDefinitionItemsQueryBuilder;\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 | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey'\n >\n ) => PoolDefinitionItemsQueryBuilder;\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 | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey'\n >\n ) => PoolDefinitionItemsQueryBuilder;\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) => PoolDefinitionItemsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => PoolDefinitionItemsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<PoolDefinitionItemsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.QueryPoolDefinitionItems\n * @requiredField query\n */\nexport async function typedQueryPoolDefinitionItems(\n query: PoolDefinitionItemQuery,\n options?: QueryPoolDefinitionItemsOptions\n): Promise<\n NonNullablePaths<\n QueryPoolDefinitionItemsResponse,\n | `poolDefinitionItems`\n | `poolDefinitionItems.${number}._id`\n | `poolDefinitionItems.${number}.externalId`\n | `poolDefinitionItems.${number}.category`\n | `poolDefinitionItems.${number}.providerAppId`\n | `poolDefinitionItems.${number}.namespace`\n | `poolDefinitionItems.${number}.poolDefinitionId`\n | `poolDefinitionItems.${number}.itemSetId`\n | `poolDefinitionItems.${number}.poolDefinition.displayName`\n | `poolDefinitionItems.${number}.poolDefinition.creditConfiguration.amount`\n | `poolDefinitionItems.${number}.itemId`\n | `poolDefinitionItems.${number}.benefitKey`\n | `poolDefinitionItems.${number}.itemSearchKey`,\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 query: query,\n ...options,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.queryPoolDefinitionItems(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PoolDefinitionItemQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['programDefinitions._id', 'programDefinitions.externalId'];\n operators: ['$hasAll', '$hasSome'];\n sort: 'BOTH';\n },\n {\n fields: [\n '_createdDate',\n '_id',\n 'benefitKey',\n 'category',\n 'externalId',\n 'itemSearchKey',\n 'itemSetId',\n 'namespace',\n 'poolDefinitionId',\n 'providerAppId'\n ];\n operators: '*';\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n PoolDefinitionItem,\n PoolDefinitionItemQuerySpec\n>;\nexport type PoolDefinitionItemQuery = {\n /** \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 */\n cursorPaging?: {\n /** \n Maximum number of items to return in the results. \n @max: 1000 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object 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?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object in the following format:\n `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]` \n @maxSize: 5 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\nexport const utils = {\n query: {\n ...createQueryUtils<\n PoolDefinitionItem,\n PoolDefinitionItemQuerySpec,\n PoolDefinitionItemQuery\n >(),\n },\n};\n\n/**\n * Removes items from a benefit. The service removes items asynchronously. They may briefly still appear in\n * Query Pool Definition Items results after the call returns.\n * Item references not matching any registered item appear in results as per-item failures with `itemMetadata.error.code` set to `NOT_FOUND`.\n * @param itemReferences - Items to remove from the benefit's item set.\n * @public\n * @documentationMaturity preview\n * @requiredField itemReferences\n * @requiredField itemReferences.externalId\n * @requiredField options\n * @requiredField options.benefitKey\n * @requiredField options.poolDefinitionId\n * @permissionId benefit_programs:v1:pool_definition_item:remove_items_from_benefit\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.RemoveItemsFromBenefit\n */\nexport async function removeItemsFromBenefit(\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n RemoveItemsFromBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n): Promise<\n NonNullablePaths<\n RemoveItemsFromBenefitResponse,\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 __applicationErrorsType?: RemoveItemsFromBenefitApplicationErrors;\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 itemReferences: itemReferences,\n poolDefinitionId: options?.poolDefinitionId,\n benefitKey: options?.benefitKey,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.removeItemsFromBenefit(\n payload\n );\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 itemReferences: '$[0]',\n poolDefinitionId: '$[1].poolDefinitionId',\n benefitKey: '$[1].benefitKey',\n },\n singleArgumentUnchanged: false,\n },\n ['itemReferences', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface RemoveItemsFromBenefitOptions {\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit in the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\n/**\n * Registers items with a benefit. This is an eventually consistent operation. Items may take a short time to appear\n * in Query Pool Definition Items results after the call returns. Uses a partial success model. Items already registered\n * with the benefit return a per-item error in `results.itemMetadata`, while new items are added successfully.\n * Check `bulkActionMetadata` for overall counts and results for per-item outcomes.\n * @param itemReferences - Items to add to the benefit's item set.\n * @public\n * @documentationMaturity preview\n * @requiredField itemReferences\n * @requiredField itemReferences.externalId\n * @requiredField options\n * @requiredField options.benefitKey\n * @requiredField options.poolDefinitionId\n * @permissionId benefit_programs:v1:pool_definition_item:add_items_to_benefit\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.AddItemsToBenefit\n */\nexport async function addItemsToBenefit(\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n AddItemsToBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n): Promise<\n NonNullablePaths<\n AddItemsToBenefitResponse,\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 __applicationErrorsType?: AddItemsToBenefitApplicationErrors;\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 itemReferences: itemReferences,\n poolDefinitionId: options?.poolDefinitionId,\n benefitKey: options?.benefitKey,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.addItemsToBenefit(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 itemReferences: '$[0]',\n poolDefinitionId: '$[1].poolDefinitionId',\n benefitKey: '$[1].benefitKey',\n },\n singleArgumentUnchanged: false,\n },\n ['itemReferences', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface AddItemsToBenefitOptions {\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit in the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n","import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n _: [\n {\n srcPath: '/_api/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_pool-definition-items';\n\n/**\n * Creates a query to retrieve a list of poolDefinitionItems.\n *\n * The `queryPoolDefinitionItems()` method builds a query to retrieve a list of poolDefinitionItems and returns a `PoolDefinitionItemsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the [`find()`](/poolDefinitionItems/poolDefinitionItems-query-builder/find) function.\n *\n * You can refine the query by chaining `PoolDefinitionItemsQueryBuilder` methods onto the query. `PoolDefinitionItemsQueryBuilder` methods enable you to filter, sort, and control the results that `queryPoolDefinitionItems()` returns.\n *\n * The following `PoolDefinitionItemsQueryBuilder` functions are supported for `queryPoolDefinitionItems()`. For a full description of the item object, see the object returned for the [`poolDefinitionItems`](/poolDefinitionItems/poolDefinitionItems-query-result/poolDefinitionItems) property in `PoolDefinitionItemsQueryResult`.\n */\nexport function queryPoolDefinitionItems(\n payload: object\n): RequestOptionsFactory<any> {\n function __queryPoolDefinitionItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_definition_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.QueryPoolDefinitionItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n { protoPath: '/v1/pool-definition-items/query', data: payload, host }\n ),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'poolDefinitionItems.createdDate' },\n { path: 'poolDefinitionItems.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryPoolDefinitionItems;\n}\n\n/**\n * Removes items from a benefit. The service removes items asynchronously. They may briefly still appear in\n * Query Pool Definition Items results after the call returns.\n * Item references not matching any registered item appear in results as per-item failures with `itemMetadata.error.code` set to `NOT_FOUND`.\n */\nexport function removeItemsFromBenefit(\n payload: object\n): RequestOptionsFactory<any> {\n function __removeItemsFromBenefit({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_definition_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.RemoveItemsFromBenefit',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n {\n protoPath: '/v1/pool-definition-items/remove-items-from-benefit',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __removeItemsFromBenefit;\n}\n\n/**\n * Registers items with a benefit. This is an eventually consistent operation. Items may take a short time to appear\n * in Query Pool Definition Items results after the call returns. Uses a partial success model. Items already registered\n * with the benefit return a per-item error in `results.itemMetadata`, while new items are added successfully.\n * Check `bulkActionMetadata` for overall counts and results for per-item outcomes.\n */\nexport function addItemsToBenefit(payload: object): RequestOptionsFactory<any> {\n function __addItemsToBenefit({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_definition_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.AddItemsToBenefit',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n {\n protoPath: '/v1/pool-definition-items/add-items-to-benefit',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __addItemsToBenefit;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n AddItemsToBenefitApplicationErrors,\n AddItemsToBenefitOptions,\n AddItemsToBenefitResponse,\n ItemReference,\n PoolDefinitionItemQuery,\n PoolDefinitionItemsQueryBuilder,\n QueryPoolDefinitionItemsOptions,\n QueryPoolDefinitionItemsResponse,\n RemoveItemsFromBenefitApplicationErrors,\n RemoveItemsFromBenefitOptions,\n RemoveItemsFromBenefitResponse,\n addItemsToBenefit as universalAddItemsToBenefit,\n queryPoolDefinitionItems as universalQueryPoolDefinitionItems,\n removeItemsFromBenefit as universalRemoveItemsFromBenefit,\n typedQueryPoolDefinitionItems as universalTypedQueryPoolDefinitionItems,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/benefit-programs' };\n\nexport function queryPoolDefinitionItems(\n httpClient: HttpClient\n): QueryPoolDefinitionItemsSignature {\n return (options?: QueryPoolDefinitionItemsOptions) =>\n universalQueryPoolDefinitionItems(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryPoolDefinitionItemsSignature {\n /**\n * Creates a query to retrieve a list of poolDefinitionItems.\n *\n * The `queryPoolDefinitionItems()` method builds a query to retrieve a list of poolDefinitionItems and returns a `PoolDefinitionItemsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the [`find()`](/poolDefinitionItems/poolDefinitionItems-query-builder/find) function.\n *\n * You can refine the query by chaining `PoolDefinitionItemsQueryBuilder` methods onto the query. `PoolDefinitionItemsQueryBuilder` methods enable you to filter, sort, and control the results that `queryPoolDefinitionItems()` returns.\n *\n * The following `PoolDefinitionItemsQueryBuilder` functions are supported for `queryPoolDefinitionItems()`. For a full description of the item object, see the object returned for the [`poolDefinitionItems`](/poolDefinitionItems/poolDefinitionItems-query-result/poolDefinitionItems) property in `PoolDefinitionItemsQueryResult`.\n */\n (options?: QueryPoolDefinitionItemsOptions): PoolDefinitionItemsQueryBuilder;\n}\n\nexport function typedQueryPoolDefinitionItems(\n httpClient: HttpClient\n): TypedQueryPoolDefinitionItemsSignature {\n return (\n query: PoolDefinitionItemQuery,\n options?: QueryPoolDefinitionItemsOptions\n ) =>\n universalTypedQueryPoolDefinitionItems(\n query,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryPoolDefinitionItemsSignature {\n /** */\n (\n query: PoolDefinitionItemQuery,\n options?: QueryPoolDefinitionItemsOptions\n ): Promise<\n NonNullablePaths<\n QueryPoolDefinitionItemsResponse,\n | `poolDefinitionItems`\n | `poolDefinitionItems.${number}._id`\n | `poolDefinitionItems.${number}.externalId`\n | `poolDefinitionItems.${number}.category`\n | `poolDefinitionItems.${number}.providerAppId`\n | `poolDefinitionItems.${number}.namespace`\n | `poolDefinitionItems.${number}.poolDefinitionId`\n | `poolDefinitionItems.${number}.itemSetId`\n | `poolDefinitionItems.${number}.poolDefinition.displayName`\n | `poolDefinitionItems.${number}.poolDefinition.creditConfiguration.amount`\n | `poolDefinitionItems.${number}.itemId`\n | `poolDefinitionItems.${number}.benefitKey`\n | `poolDefinitionItems.${number}.itemSearchKey`,\n 6\n >\n >;\n}\n\nexport function removeItemsFromBenefit(\n httpClient: HttpClient\n): RemoveItemsFromBenefitSignature {\n return (\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n RemoveItemsFromBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n ) =>\n universalRemoveItemsFromBenefit(\n itemReferences,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RemoveItemsFromBenefitSignature {\n /**\n * Removes items from a benefit. The service removes items asynchronously. They may briefly still appear in\n * Query Pool Definition Items results after the call returns.\n * Item references not matching any registered item appear in results as per-item failures with `itemMetadata.error.code` set to `NOT_FOUND`.\n * @param - Items to remove from the benefit's item set.\n */\n (\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n RemoveItemsFromBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n RemoveItemsFromBenefitResponse,\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 __applicationErrorsType?: RemoveItemsFromBenefitApplicationErrors;\n }\n >;\n}\n\nexport function addItemsToBenefit(\n httpClient: HttpClient\n): AddItemsToBenefitSignature {\n return (\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n AddItemsToBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n ) =>\n universalAddItemsToBenefit(\n itemReferences,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface AddItemsToBenefitSignature {\n /**\n * Registers items with a benefit. This is an eventually consistent operation. Items may take a short time to appear\n * in Query Pool Definition Items results after the call returns. Uses a partial success model. Items already registered\n * with the benefit return a per-item error in `results.itemMetadata`, while new items are added successfully.\n * Check `bulkActionMetadata` for overall counts and results for per-item outcomes.\n * @param - Items to add to the benefit's item set.\n */\n (\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n AddItemsToBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n AddItemsToBenefitResponse,\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 __applicationErrorsType?: AddItemsToBenefitApplicationErrors;\n }\n >;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n AddItemsToBenefitOptions,\n AddItemsToBenefitRequest,\n AddItemsToBenefitResponse,\n ApplicationError,\n BenefitInfo,\n BulkActionMetadata,\n BulkAddItemResult,\n BulkRemoveItemResult,\n CreditConfiguration,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n IdentificationData,\n IdentificationDataIdOneOf,\n InvalidatePoolDefinitionItemsRequest,\n InvalidatePoolDefinitionItemsResponse,\n ItemInfo,\n ItemMetadata,\n ItemReference,\n MessageEnvelope,\n PoolDefinitionInfo,\n PoolDefinitionItem,\n PoolDefinitionItemDeactivated,\n PoolDefinitionItemQuerySpec,\n PoolDefinitionItemRemoved,\n PoolDefinitionItemsQueryBuilder,\n PoolDefinitionItemsQueryResult,\n ProgramDefinitionInfo,\n QueryPoolDefinitionItemsOptions,\n QueryPoolDefinitionItemsRequest,\n QueryPoolDefinitionItemsResponse,\n RemoveItemsFromBenefitOptions,\n RemoveItemsFromBenefitRequest,\n RemoveItemsFromBenefitResponse,\n RequestedFields,\n RestoreInfo,\n SortOrder,\n Sorting,\n WebhookIdentityType,\n utils,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\n","import {\n queryPoolDefinitionItems as publicQueryPoolDefinitionItems,\n typedQueryPoolDefinitionItems as publicTypedQueryPoolDefinitionItems,\n removeItemsFromBenefit as publicRemoveItemsFromBenefit,\n addItemsToBenefit as publicAddItemsToBenefit,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n PoolDefinitionItemQuery,\n PoolDefinitionItemsQueryBuilder,\n QueryPoolDefinitionItemsOptions,\n typedQueryPoolDefinitionItems as universalTypedQueryPoolDefinitionItems,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\n\nfunction customQueryPoolDefinitionItems(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: (options?: QueryPoolDefinitionItemsOptions) =>\n publicQueryPoolDefinitionItems(httpClient)(options),\n typedQueryFunction: (\n query: PoolDefinitionItemQuery,\n options?: QueryPoolDefinitionItemsOptions\n ) => publicTypedQueryPoolDefinitionItems(httpClient)(query, options),\n hasOptionsParameter: true,\n });\n\n function overloadedQuery(\n query: PoolDefinitionItemQuery,\n options?: QueryPoolDefinitionItemsOptions\n ): ReturnType<typeof universalTypedQueryPoolDefinitionItems>;\n function overloadedQuery(\n options?: QueryPoolDefinitionItemsOptions\n ): PoolDefinitionItemsQueryBuilder;\n function overloadedQuery(\n queryOrOptions?: PoolDefinitionItemQuery | QueryPoolDefinitionItemsOptions,\n options?: QueryPoolDefinitionItemsOptions\n ): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const removeItemsFromBenefit: MaybeContext<\n BuildRESTFunction<typeof publicRemoveItemsFromBenefit> &\n typeof publicRemoveItemsFromBenefit\n> = /*#__PURE__*/ createRESTModule(publicRemoveItemsFromBenefit);\nexport const addItemsToBenefit: MaybeContext<\n BuildRESTFunction<typeof publicAddItemsToBenefit> &\n typeof publicAddItemsToBenefit\n> = /*#__PURE__*/ createRESTModule(publicAddItemsToBenefit);\nexport const queryPoolDefinitionItems: MaybeContext<\n BuildRESTFunction<typeof customQueryPoolDefinitionItems> &\n typeof customQueryPoolDefinitionItems\n> = /*#__PURE__*/ createRESTModule(customQueryPoolDefinitionItems);\n\nexport {\n SortOrder,\n RequestedFields,\n WebhookIdentityType,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\nexport {\n PoolDefinitionItem,\n PoolDefinitionInfo,\n CreditConfiguration,\n ProgramDefinitionInfo,\n BenefitInfo,\n ItemInfo,\n PoolDefinitionItemDeactivated,\n PoolDefinitionItemRemoved,\n QueryPoolDefinitionItemsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryPoolDefinitionItemsResponse,\n CursorPagingMetadata,\n Cursors,\n InvalidatePoolDefinitionItemsRequest,\n InvalidatePoolDefinitionItemsResponse,\n RemoveItemsFromBenefitRequest,\n ItemReference,\n RemoveItemsFromBenefitResponse,\n BulkRemoveItemResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n AddItemsToBenefitRequest,\n AddItemsToBenefitResponse,\n BulkAddItemResult,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n QueryPoolDefinitionItemsOptions,\n PoolDefinitionItemsQueryResult,\n PoolDefinitionItemsQueryBuilder,\n PoolDefinitionItemQuerySpec,\n RemoveItemsFromBenefitOptions,\n AddItemsToBenefitOptions,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\nexport { utils } from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\nexport {\n SortOrderWithLiterals,\n RequestedFieldsWithLiterals,\n WebhookIdentityTypeWithLiterals,\n RemoveItemsFromBenefitApplicationErrors,\n AddItemsToBenefitApplicationErrors,\n CommonQueryWithEntityContext,\n PoolDefinitionItemQuery,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,gCAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,uBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,0EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAA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,QACzB,0BAA0B;AAAA,UACxB,gBAAgB;AAAA,UAChB,kBAAkB;AAAA,UAClB,YAAY;AAAA,QACd;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,kBAAkB,SAAS;AAAA,IAC9B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEpzCO,SAASG,0BACd,YACmC;AACnC,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAiBO,SAASC,+BACd,YACwC;AACxC,SAAO,CACL,OACA,YAEA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA4BO,SAASC,wBACd,YACiC;AACjC,SAAO,CACL,gBACA,YAMAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAkCO,SAASC,mBACd,YAC4B;AAC5B,SAAO,CACL,gBACA,YAMAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACtJA,IAAAC,uBAAiC;AAGjC,iCAA0C;AAQ1C,SAAS,+BAA+B,YAAwB;AAC9D,QAAM,aAAS,sDAA0B;AAAA,IACvC,sBAAsB,CAAC,YACrBC,0BAA+B,UAAU,EAAE,OAAO;AAAA,IACpD,oBAAoB,CAClB,OACA,YACGC,+BAAoC,UAAU,EAAE,OAAO,OAAO;AAAA,IACnE,qBAAqB;AAAA,EACvB,CAAC;AASD,WAAS,gBACP,gBACA,SACK;AACL,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,0BAGK,2DAAiBA,uBAA4B;AACxD,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMH,4BAGK,2DAAiB,8BAA8B;","names":["addItemsToBenefit","queryPoolDefinitionItems","removeItemsFromBenefit","payload","import_transform_paths","SortOrder","RequestedFields","WebhookIdentityType","queryPoolDefinitionItems","sdkTransformError","removeItemsFromBenefit","addItemsToBenefit","queryPoolDefinitionItems","typedQueryPoolDefinitionItems","removeItemsFromBenefit","addItemsToBenefit","import_rest_modules","queryPoolDefinitionItems","typedQueryPoolDefinitionItems","removeItemsFromBenefit","addItemsToBenefit"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.universal.ts","../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.http.ts","../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.public.ts","../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.context.ts"],"sourcesContent":["export * from './src/benefit-programs-v1-pool-definition-item-pool-definition-items.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixBenefitProgramsV1PoolDefinitionItem from './benefit-programs-v1-pool-definition-item-pool-definition-items.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\nexport interface PoolDefinitionItem {\n /**\n * Benefit item ID. Deterministically generated from pool_definition_id and item_id — if you know both, you can compute the ID without querying.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Revision number, which increments by 1 each time the benefit item is updated.\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 * External item ID assigned by the provider of the items.\n *\n * For example, if the benefit items are products, this ID corresponds to the specific product ID in the provider's system.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalId?: string;\n /**\n * Item category. Groups benefit items together for organization and management purposes. For example, classes, posts, groups.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string;\n /**\n * ID of the application providing the benefit items. Each item's external_id is unique within its provider application.\n * @format GUID\n * @immutable\n * @readonly\n */\n providerAppId?: string;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you\n * created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string;\n /**\n * ID of the pool definition - the configuration that defines a set of benefits and which items are accessible within each benefit.\n * @format GUID\n * @immutable\n * @readonly\n */\n poolDefinitionId?: string;\n /**\n * Internal grouping identifier for this benefit's item set. Use pool_definition_id together with benefit_key\n * to identify a benefit — item_set_id is an implementation detail.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string;\n /**\n * Pool definition details including display name, description, and credit settings. Only populated when\n * POOL_DEFINITION is included in the fields request parameter.\n * @readonly\n */\n poolDefinition?: PoolDefinitionInfo;\n /**\n * Program definitions that include this item as an accessible benefit. Only id and external_id are\n * returned by default; request PROGRAM_DEFINITION to include display_name and description.\n * @maxSize 20\n * @readonly\n */\n programDefinitions?: ProgramDefinitionInfo[];\n /**\n * Item ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemId?: string;\n /**\n * Pricing and display information for the associated benefit, including credit price, name, and description.\n * Only populated when BENEFIT is included in the fields request parameter.\n * @readonly\n */\n benefitInfo?: BenefitInfo;\n /**\n * Display name for the catalog item. Only populated when ITEM is included in the fields request parameter.\n * @readonly\n */\n itemInfo?: ItemInfo;\n /**\n * Unique identifier for the benefit associated with this item.\n * @maxLength 64\n * @immutable\n * @readonly\n */\n benefitKey?: string;\n /**\n * Pre-computed search key for the item reference, built by concatenating provider_app_id, category, and external_id\n * separated by /. Use this field for efficient single-field filtering instead of composing three separate conditions.\n * @maxLength 94\n * @immutable\n * @readonly\n */\n itemSearchKey?: string;\n /**\n * Whether this item has been removed from the pool definition.\n * @readonly\n */\n removed?: boolean | null;\n}\n\nexport interface PoolDefinitionInfo {\n /**\n * Pool definition name.\n * @maxLength 64\n */\n displayName?: string;\n /**\n * Pool definition description.\n * @maxLength 450\n */\n description?: string | null;\n /** Credit configuration for this pool definition. When absent, benefits in this pool do not support credit-based pricing. */\n creditConfiguration?: CreditConfiguration;\n}\n\nexport interface CreditConfiguration {\n /**\n * Number of credits initially granted to a subscriber when this pool definition's benefits are activated.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n amount?: string;\n /**\n * Credit unit display name.\n * @maxLength 32\n */\n unitDisplayName?: string | null;\n /**\n * Credit unit type.\n * @maxLength 16\n */\n unitType?: string | null;\n}\n\nexport interface ProgramDefinitionInfo {\n /**\n * Program definition id\n * @format GUID\n */\n _id?: string;\n /**\n * Program definition external id\n * @format GUID\n */\n externalId?: string | null;\n /**\n * Program definition name\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * Program definition description.\n * @maxLength 450\n */\n description?: string | null;\n}\n\nexport interface BenefitInfo {\n /**\n * Price of the benefit in credits. The price is the same for all of this benefit's items.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n price?: string | null;\n /**\n * Benefit name.\n * @maxLength 40\n */\n displayName?: string | null;\n /**\n * Benefit description.\n * @maxLength 255\n */\n description?: string | null;\n}\n\nexport interface ItemInfo {\n /**\n * Item display name.\n * @maxLength 400\n */\n displayName?: string | null;\n}\n\nexport interface PoolDefinitionItemRemoved {\n /** The pool definition item that was removed from the benefit. */\n poolDefinitionItem?: PoolDefinitionItem;\n}\n\nexport interface QueryPoolDefinitionItemsRequest {\n /** Query to select pool definition items. */\n query?: CursorQuery;\n /**\n * Fields to be included in the response.\n * @maxSize 4\n */\n fields?: RequestedFieldsWithLiterals[];\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 * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 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 enum RequestedFields {\n /** Populates the `poolDefinition` field with display name, description, and credit configuration. */\n POOL_DEFINITION = 'POOL_DEFINITION',\n /** Populates the `programDefinitions` field with `displayName` and description. */\n PROGRAM_DEFINITION = 'PROGRAM_DEFINITION',\n /** Populates the `benefitInfo` field with credit price, name, and description. */\n BENEFIT = 'BENEFIT',\n /** Populates the `itemInfo` field with the catalog item's display name. */\n ITEM = 'ITEM',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'POOL_DEFINITION'\n | 'PROGRAM_DEFINITION'\n | 'BENEFIT'\n | 'ITEM';\n\nexport interface QueryPoolDefinitionItemsResponse {\n /** List of items. */\n poolDefinitionItems?: PoolDefinitionItem[];\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 InvalidatePoolDefinitionItemsRequest {\n /**\n * The pool definition ID whose items are to be invalidated\n * @format GUID\n */\n poolDefinitionId?: string;\n /**\n * List of item set ids whose items are to be invalidated\n * @maxSize 10\n * @format GUID\n */\n itemSetIds?: string[];\n}\n\nexport interface InvalidatePoolDefinitionItemsResponse {}\n\nexport interface RemoveItemsFromBenefitRequest {\n /**\n * Items to remove from the benefit's item set.\n * @minSize 1\n * @maxSize 100\n */\n itemReferences: ItemReference[];\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit in the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\nexport interface ItemReference {\n /**\n * External item ID assigned by the provider.\n * @format GUID\n */\n externalId?: string;\n /**\n * Item category.\n * @maxLength 20\n */\n category?: string;\n}\n\nexport interface RemoveItemsFromBenefitResponse {\n /**\n * Per-item results aligned 1:1 with `itemReferences` from the request. `itemMetadata.originalIndex` always\n * refers to the position in the request. Item references that didn't match any registered item appear here as\n * failures with `itemMetadata.error.code` set to `NOT_FOUND`.\n */\n results?: BulkRemoveItemResult[];\n /** Aggregate counts for the bulk operation, including successes and failures. The service counts unresolved item references as failures. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkRemoveItemResult {\n /** Outcome metadata for a single item, including the underlying item ID, success flag, and error details on failure. */\n itemMetadata?: ItemMetadata;\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 AddItemsToBenefitRequest {\n /**\n * Items to add to the benefit's item set.\n * @minSize 1\n * @maxSize 100\n */\n itemReferences: ItemReference[];\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit in the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\nexport interface AddItemsToBenefitResponse {\n /** Per-item results. `itemMetadata.originalIndex` corresponds to the order of `itemReferences` in the request. */\n results?: BulkAddItemResult[];\n /** Aggregate counts for the bulk operation, including successes and failures. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkAddItemResult {\n /**\n * Outcome metadata for the catalog item created in the underlying item service. The item ID here is the Item entity\n * ID. The service creates PoolDefinitionItem records asynchronously and doesn't include their IDs in this response.\n */\n itemMetadata?: ItemMetadata;\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 /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type RemoveItemsFromBenefitApplicationErrors = {\n code?: 'POOL_DEFINITION_BENEFIT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type AddItemsToBenefitApplicationErrors = {\n code?: 'POOL_DEFINITION_BENEFIT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Creates a query to retrieve a list of poolDefinitionItems.\n *\n * The `queryPoolDefinitionItems()` method builds a query to retrieve a list of poolDefinitionItems and returns a `PoolDefinitionItemsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the [`find()`](/poolDefinitionItems/poolDefinitionItems-query-builder/find) function.\n *\n * You can refine the query by chaining `PoolDefinitionItemsQueryBuilder` methods onto the query. `PoolDefinitionItemsQueryBuilder` methods enable you to filter, sort, and control the results that `queryPoolDefinitionItems()` returns.\n *\n * The following `PoolDefinitionItemsQueryBuilder` functions are supported for `queryPoolDefinitionItems()`. For a full description of the item object, see the object returned for the [`poolDefinitionItems`](/poolDefinitionItems/poolDefinitionItems-query-result/poolDefinitionItems) property in `PoolDefinitionItemsQueryResult`.\n * @public\n * @documentationMaturity preview\n * @permissionId benefit_programs:v1:pool_definition_item:query_pool_definition_items\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.QueryPoolDefinitionItems\n */\nexport function queryPoolDefinitionItems(\n options?: QueryPoolDefinitionItemsOptions\n): PoolDefinitionItemsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n PoolDefinitionItem,\n 'CURSOR',\n QueryPoolDefinitionItemsRequest,\n QueryPoolDefinitionItemsResponse\n >({\n func: async (payload: QueryPoolDefinitionItemsRequest) => {\n const reqOpts =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.queryPoolDefinitionItems(\n { ...payload, ...(options ?? {}) }\n );\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: QueryPoolDefinitionItemsRequest['query']) => {\n const args = [query, options] as [\n QueryPoolDefinitionItemsRequest['query'],\n QueryPoolDefinitionItemsOptions\n ];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({\n data,\n }: HttpResponse<QueryPoolDefinitionItemsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.poolDefinitionItems,\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\nexport interface QueryPoolDefinitionItemsOptions {\n /**\n * Fields to be included in the response.\n * @maxSize 4\n */\n fields?: RequestedFieldsWithLiterals[] | undefined;\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface PoolDefinitionItemsQueryResult extends QueryCursorResult {\n items: PoolDefinitionItem[];\n query: PoolDefinitionItemsQueryBuilder;\n next: () => Promise<PoolDefinitionItemsQueryResult>;\n prev: () => Promise<PoolDefinitionItemsQueryResult>;\n}\n\nexport interface PoolDefinitionItemsQueryBuilder {\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 | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolDefinitionItemsQueryBuilder;\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 | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolDefinitionItemsQueryBuilder;\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 | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolDefinitionItemsQueryBuilder;\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 | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolDefinitionItemsQueryBuilder;\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 | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolDefinitionItemsQueryBuilder;\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 | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolDefinitionItemsQueryBuilder;\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 | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey',\n value: string\n ) => PoolDefinitionItemsQueryBuilder;\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 | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any[]\n ) => PoolDefinitionItemsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolDefinitionItemsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey',\n value: boolean\n ) => PoolDefinitionItemsQueryBuilder;\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 | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey'\n >\n ) => PoolDefinitionItemsQueryBuilder;\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 | 'providerAppId'\n | 'namespace'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'programDefinitions.id'\n | 'programDefinitions.externalId'\n | 'benefitKey'\n | 'itemSearchKey'\n >\n ) => PoolDefinitionItemsQueryBuilder;\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) => PoolDefinitionItemsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => PoolDefinitionItemsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<PoolDefinitionItemsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.QueryPoolDefinitionItems\n * @requiredField query\n */\nexport async function typedQueryPoolDefinitionItems(\n query: PoolDefinitionItemQuery,\n options?: QueryPoolDefinitionItemsOptions\n): Promise<\n NonNullablePaths<\n QueryPoolDefinitionItemsResponse,\n | `poolDefinitionItems`\n | `poolDefinitionItems.${number}._id`\n | `poolDefinitionItems.${number}.externalId`\n | `poolDefinitionItems.${number}.category`\n | `poolDefinitionItems.${number}.providerAppId`\n | `poolDefinitionItems.${number}.namespace`\n | `poolDefinitionItems.${number}.poolDefinitionId`\n | `poolDefinitionItems.${number}.itemSetId`\n | `poolDefinitionItems.${number}.poolDefinition.displayName`\n | `poolDefinitionItems.${number}.poolDefinition.creditConfiguration.amount`\n | `poolDefinitionItems.${number}.itemId`\n | `poolDefinitionItems.${number}.benefitKey`\n | `poolDefinitionItems.${number}.itemSearchKey`,\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 query: query,\n ...options,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.queryPoolDefinitionItems(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PoolDefinitionItemQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['programDefinitions._id', 'programDefinitions.externalId'];\n operators: ['$hasAll', '$hasSome'];\n sort: 'BOTH';\n },\n {\n fields: [\n '_createdDate',\n '_id',\n 'benefitKey',\n 'category',\n 'externalId',\n 'itemSearchKey',\n 'itemSetId',\n 'namespace',\n 'poolDefinitionId',\n 'providerAppId'\n ];\n operators: '*';\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n PoolDefinitionItem,\n PoolDefinitionItemQuerySpec\n>;\nexport type PoolDefinitionItemQuery = {\n /** \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 */\n cursorPaging?: {\n /** \n Maximum number of items to return in the results. \n @max: 1000 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object 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?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object in the following format:\n `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]` \n @maxSize: 5 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\nexport const utils = {\n query: {\n ...createQueryUtils<\n PoolDefinitionItem,\n PoolDefinitionItemQuerySpec,\n PoolDefinitionItemQuery\n >(),\n },\n};\n\n/**\n * Removes items from a benefit. The service removes items asynchronously. They may briefly still appear in\n * Query Pool Definition Items results after the call returns.\n * Item references not matching any registered item appear in results as per-item failures with `itemMetadata.error.code` set to `NOT_FOUND`.\n * @param itemReferences - Items to remove from the benefit's item set.\n * @public\n * @documentationMaturity preview\n * @requiredField itemReferences\n * @requiredField itemReferences.externalId\n * @requiredField options\n * @requiredField options.benefitKey\n * @requiredField options.poolDefinitionId\n * @permissionId benefit_programs:v1:pool_definition_item:remove_items_from_benefit\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.RemoveItemsFromBenefit\n */\nexport async function removeItemsFromBenefit(\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n RemoveItemsFromBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n): Promise<\n NonNullablePaths<\n RemoveItemsFromBenefitResponse,\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 __applicationErrorsType?: RemoveItemsFromBenefitApplicationErrors;\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 itemReferences: itemReferences,\n poolDefinitionId: options?.poolDefinitionId,\n benefitKey: options?.benefitKey,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.removeItemsFromBenefit(\n payload\n );\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 itemReferences: '$[0]',\n poolDefinitionId: '$[1].poolDefinitionId',\n benefitKey: '$[1].benefitKey',\n },\n singleArgumentUnchanged: false,\n },\n ['itemReferences', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface RemoveItemsFromBenefitOptions {\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit in the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\n/**\n * Registers items with a benefit. This is an eventually consistent operation. Items may take a short time to appear\n * in Query Pool Definition Items results after the call returns. Uses a partial success model. Items already registered\n * with the benefit return a per-item error in `results.itemMetadata`, while new items are added successfully.\n * Check `bulkActionMetadata` for overall counts and results for per-item outcomes.\n * @param itemReferences - Items to add to the benefit's item set.\n * @public\n * @documentationMaturity preview\n * @requiredField itemReferences\n * @requiredField itemReferences.externalId\n * @requiredField options\n * @requiredField options.benefitKey\n * @requiredField options.poolDefinitionId\n * @permissionId benefit_programs:v1:pool_definition_item:add_items_to_benefit\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.AddItemsToBenefit\n */\nexport async function addItemsToBenefit(\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n AddItemsToBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n): Promise<\n NonNullablePaths<\n AddItemsToBenefitResponse,\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 __applicationErrorsType?: AddItemsToBenefitApplicationErrors;\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 itemReferences: itemReferences,\n poolDefinitionId: options?.poolDefinitionId,\n benefitKey: options?.benefitKey,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.addItemsToBenefit(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 itemReferences: '$[0]',\n poolDefinitionId: '$[1].poolDefinitionId',\n benefitKey: '$[1].benefitKey',\n },\n singleArgumentUnchanged: false,\n },\n ['itemReferences', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface AddItemsToBenefitOptions {\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit in the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n","import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n _: [\n {\n srcPath: '/_api/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_pool-definition-items';\n\n/**\n * Creates a query to retrieve a list of poolDefinitionItems.\n *\n * The `queryPoolDefinitionItems()` method builds a query to retrieve a list of poolDefinitionItems and returns a `PoolDefinitionItemsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the [`find()`](/poolDefinitionItems/poolDefinitionItems-query-builder/find) function.\n *\n * You can refine the query by chaining `PoolDefinitionItemsQueryBuilder` methods onto the query. `PoolDefinitionItemsQueryBuilder` methods enable you to filter, sort, and control the results that `queryPoolDefinitionItems()` returns.\n *\n * The following `PoolDefinitionItemsQueryBuilder` functions are supported for `queryPoolDefinitionItems()`. For a full description of the item object, see the object returned for the [`poolDefinitionItems`](/poolDefinitionItems/poolDefinitionItems-query-result/poolDefinitionItems) property in `PoolDefinitionItemsQueryResult`.\n */\nexport function queryPoolDefinitionItems(\n payload: object\n): RequestOptionsFactory<any> {\n function __queryPoolDefinitionItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_definition_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.QueryPoolDefinitionItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n { protoPath: '/v1/pool-definition-items/query', data: payload, host }\n ),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'poolDefinitionItems.createdDate' },\n { path: 'poolDefinitionItems.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryPoolDefinitionItems;\n}\n\n/**\n * Removes items from a benefit. The service removes items asynchronously. They may briefly still appear in\n * Query Pool Definition Items results after the call returns.\n * Item references not matching any registered item appear in results as per-item failures with `itemMetadata.error.code` set to `NOT_FOUND`.\n */\nexport function removeItemsFromBenefit(\n payload: object\n): RequestOptionsFactory<any> {\n function __removeItemsFromBenefit({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_definition_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.RemoveItemsFromBenefit',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n {\n protoPath: '/v1/pool-definition-items/remove-items-from-benefit',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __removeItemsFromBenefit;\n}\n\n/**\n * Registers items with a benefit. This is an eventually consistent operation. Items may take a short time to appear\n * in Query Pool Definition Items results after the call returns. Uses a partial success model. Items already registered\n * with the benefit return a per-item error in `results.itemMetadata`, while new items are added successfully.\n * Check `bulkActionMetadata` for overall counts and results for per-item outcomes.\n */\nexport function addItemsToBenefit(payload: object): RequestOptionsFactory<any> {\n function __addItemsToBenefit({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_definition_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.AddItemsToBenefit',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n {\n protoPath: '/v1/pool-definition-items/add-items-to-benefit',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __addItemsToBenefit;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n AddItemsToBenefitApplicationErrors,\n AddItemsToBenefitOptions,\n AddItemsToBenefitResponse,\n ItemReference,\n PoolDefinitionItemQuery,\n PoolDefinitionItemsQueryBuilder,\n QueryPoolDefinitionItemsOptions,\n QueryPoolDefinitionItemsResponse,\n RemoveItemsFromBenefitApplicationErrors,\n RemoveItemsFromBenefitOptions,\n RemoveItemsFromBenefitResponse,\n addItemsToBenefit as universalAddItemsToBenefit,\n queryPoolDefinitionItems as universalQueryPoolDefinitionItems,\n removeItemsFromBenefit as universalRemoveItemsFromBenefit,\n typedQueryPoolDefinitionItems as universalTypedQueryPoolDefinitionItems,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/benefit-programs' };\n\nexport function queryPoolDefinitionItems(\n httpClient: HttpClient\n): QueryPoolDefinitionItemsSignature {\n return (options?: QueryPoolDefinitionItemsOptions) =>\n universalQueryPoolDefinitionItems(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryPoolDefinitionItemsSignature {\n /**\n * Creates a query to retrieve a list of poolDefinitionItems.\n *\n * The `queryPoolDefinitionItems()` method builds a query to retrieve a list of poolDefinitionItems and returns a `PoolDefinitionItemsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the [`find()`](/poolDefinitionItems/poolDefinitionItems-query-builder/find) function.\n *\n * You can refine the query by chaining `PoolDefinitionItemsQueryBuilder` methods onto the query. `PoolDefinitionItemsQueryBuilder` methods enable you to filter, sort, and control the results that `queryPoolDefinitionItems()` returns.\n *\n * The following `PoolDefinitionItemsQueryBuilder` functions are supported for `queryPoolDefinitionItems()`. For a full description of the item object, see the object returned for the [`poolDefinitionItems`](/poolDefinitionItems/poolDefinitionItems-query-result/poolDefinitionItems) property in `PoolDefinitionItemsQueryResult`.\n */\n (options?: QueryPoolDefinitionItemsOptions): PoolDefinitionItemsQueryBuilder;\n}\n\nexport function typedQueryPoolDefinitionItems(\n httpClient: HttpClient\n): TypedQueryPoolDefinitionItemsSignature {\n return (\n query: PoolDefinitionItemQuery,\n options?: QueryPoolDefinitionItemsOptions\n ) =>\n universalTypedQueryPoolDefinitionItems(\n query,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryPoolDefinitionItemsSignature {\n /** */\n (\n query: PoolDefinitionItemQuery,\n options?: QueryPoolDefinitionItemsOptions\n ): Promise<\n NonNullablePaths<\n QueryPoolDefinitionItemsResponse,\n | `poolDefinitionItems`\n | `poolDefinitionItems.${number}._id`\n | `poolDefinitionItems.${number}.externalId`\n | `poolDefinitionItems.${number}.category`\n | `poolDefinitionItems.${number}.providerAppId`\n | `poolDefinitionItems.${number}.namespace`\n | `poolDefinitionItems.${number}.poolDefinitionId`\n | `poolDefinitionItems.${number}.itemSetId`\n | `poolDefinitionItems.${number}.poolDefinition.displayName`\n | `poolDefinitionItems.${number}.poolDefinition.creditConfiguration.amount`\n | `poolDefinitionItems.${number}.itemId`\n | `poolDefinitionItems.${number}.benefitKey`\n | `poolDefinitionItems.${number}.itemSearchKey`,\n 6\n >\n >;\n}\n\nexport function removeItemsFromBenefit(\n httpClient: HttpClient\n): RemoveItemsFromBenefitSignature {\n return (\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n RemoveItemsFromBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n ) =>\n universalRemoveItemsFromBenefit(\n itemReferences,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RemoveItemsFromBenefitSignature {\n /**\n * Removes items from a benefit. The service removes items asynchronously. They may briefly still appear in\n * Query Pool Definition Items results after the call returns.\n * Item references not matching any registered item appear in results as per-item failures with `itemMetadata.error.code` set to `NOT_FOUND`.\n * @param - Items to remove from the benefit's item set.\n */\n (\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n RemoveItemsFromBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n RemoveItemsFromBenefitResponse,\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 __applicationErrorsType?: RemoveItemsFromBenefitApplicationErrors;\n }\n >;\n}\n\nexport function addItemsToBenefit(\n httpClient: HttpClient\n): AddItemsToBenefitSignature {\n return (\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n AddItemsToBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n ) =>\n universalAddItemsToBenefit(\n itemReferences,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface AddItemsToBenefitSignature {\n /**\n * Registers items with a benefit. This is an eventually consistent operation. Items may take a short time to appear\n * in Query Pool Definition Items results after the call returns. Uses a partial success model. Items already registered\n * with the benefit return a per-item error in `results.itemMetadata`, while new items are added successfully.\n * Check `bulkActionMetadata` for overall counts and results for per-item outcomes.\n * @param - Items to add to the benefit's item set.\n */\n (\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n AddItemsToBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n AddItemsToBenefitResponse,\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 __applicationErrorsType?: AddItemsToBenefitApplicationErrors;\n }\n >;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n AddItemsToBenefitOptions,\n AddItemsToBenefitRequest,\n AddItemsToBenefitResponse,\n ApplicationError,\n BenefitInfo,\n BulkActionMetadata,\n BulkAddItemResult,\n BulkRemoveItemResult,\n CreditConfiguration,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n IdentificationData,\n IdentificationDataIdOneOf,\n InvalidatePoolDefinitionItemsRequest,\n InvalidatePoolDefinitionItemsResponse,\n ItemInfo,\n ItemMetadata,\n ItemReference,\n MessageEnvelope,\n PoolDefinitionInfo,\n PoolDefinitionItem,\n PoolDefinitionItemQuerySpec,\n PoolDefinitionItemRemoved,\n PoolDefinitionItemsQueryBuilder,\n PoolDefinitionItemsQueryResult,\n ProgramDefinitionInfo,\n QueryPoolDefinitionItemsOptions,\n QueryPoolDefinitionItemsRequest,\n QueryPoolDefinitionItemsResponse,\n RemoveItemsFromBenefitOptions,\n RemoveItemsFromBenefitRequest,\n RemoveItemsFromBenefitResponse,\n RequestedFields,\n RestoreInfo,\n SortOrder,\n Sorting,\n WebhookIdentityType,\n utils,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\n","import {\n queryPoolDefinitionItems as publicQueryPoolDefinitionItems,\n typedQueryPoolDefinitionItems as publicTypedQueryPoolDefinitionItems,\n removeItemsFromBenefit as publicRemoveItemsFromBenefit,\n addItemsToBenefit as publicAddItemsToBenefit,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n PoolDefinitionItemQuery,\n PoolDefinitionItemsQueryBuilder,\n QueryPoolDefinitionItemsOptions,\n typedQueryPoolDefinitionItems as universalTypedQueryPoolDefinitionItems,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\n\nfunction customQueryPoolDefinitionItems(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: (options?: QueryPoolDefinitionItemsOptions) =>\n publicQueryPoolDefinitionItems(httpClient)(options),\n typedQueryFunction: (\n query: PoolDefinitionItemQuery,\n options?: QueryPoolDefinitionItemsOptions\n ) => publicTypedQueryPoolDefinitionItems(httpClient)(query, options),\n hasOptionsParameter: true,\n });\n\n function overloadedQuery(\n query: PoolDefinitionItemQuery,\n options?: QueryPoolDefinitionItemsOptions\n ): ReturnType<typeof universalTypedQueryPoolDefinitionItems>;\n function overloadedQuery(\n options?: QueryPoolDefinitionItemsOptions\n ): PoolDefinitionItemsQueryBuilder;\n function overloadedQuery(\n queryOrOptions?: PoolDefinitionItemQuery | QueryPoolDefinitionItemsOptions,\n options?: QueryPoolDefinitionItemsOptions\n ): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const removeItemsFromBenefit: MaybeContext<\n BuildRESTFunction<typeof publicRemoveItemsFromBenefit> &\n typeof publicRemoveItemsFromBenefit\n> = /*#__PURE__*/ createRESTModule(publicRemoveItemsFromBenefit);\nexport const addItemsToBenefit: MaybeContext<\n BuildRESTFunction<typeof publicAddItemsToBenefit> &\n typeof publicAddItemsToBenefit\n> = /*#__PURE__*/ createRESTModule(publicAddItemsToBenefit);\nexport const queryPoolDefinitionItems: MaybeContext<\n BuildRESTFunction<typeof customQueryPoolDefinitionItems> &\n typeof customQueryPoolDefinitionItems\n> = /*#__PURE__*/ createRESTModule(customQueryPoolDefinitionItems);\n\nexport {\n SortOrder,\n RequestedFields,\n WebhookIdentityType,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\nexport {\n PoolDefinitionItem,\n PoolDefinitionInfo,\n CreditConfiguration,\n ProgramDefinitionInfo,\n BenefitInfo,\n ItemInfo,\n PoolDefinitionItemRemoved,\n QueryPoolDefinitionItemsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryPoolDefinitionItemsResponse,\n CursorPagingMetadata,\n Cursors,\n InvalidatePoolDefinitionItemsRequest,\n InvalidatePoolDefinitionItemsResponse,\n RemoveItemsFromBenefitRequest,\n ItemReference,\n RemoveItemsFromBenefitResponse,\n BulkRemoveItemResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n AddItemsToBenefitRequest,\n AddItemsToBenefitResponse,\n BulkAddItemResult,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n QueryPoolDefinitionItemsOptions,\n PoolDefinitionItemsQueryResult,\n PoolDefinitionItemsQueryBuilder,\n PoolDefinitionItemQuerySpec,\n RemoveItemsFromBenefitOptions,\n AddItemsToBenefitOptions,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\nexport { utils } from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\nexport {\n SortOrderWithLiterals,\n RequestedFieldsWithLiterals,\n WebhookIdentityTypeWithLiterals,\n RemoveItemsFromBenefitApplicationErrors,\n AddItemsToBenefitApplicationErrors,\n CommonQueryWithEntityContext,\n PoolDefinitionItemQuery,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,gCAAAC;AAAA,EAAA,8BAAAC;AAAA,EAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,uBAAqD;AACrD,6BAA+B;AAC/B,0BAA2B;AAI3B,SAAS,0EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,gCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAad,SAAS,yBACd,SAC4B;AAC5B,WAAS,2BAA2B,EAAE,KAAK,GAAQ;AACjD,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK;AAAA,QACH,EAAE,WAAW,mCAAmC,MAAM,SAAS,KAAK;AAAA,MACtE;AAAA,MACA,MAAM;AAAA,MACN,mBAAmB,CAACC,iBAClB,uCAAeA,UAA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;AACJ;AAkCO,SAASC,mBACd,YAC4B;AAC5B,SAAO,CACL,gBACA,YAMAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACtJA,IAAAC,uBAAiC;AAGjC,iCAA0C;AAQ1C,SAAS,+BAA+B,YAAwB;AAC9D,QAAM,aAAS,sDAA0B;AAAA,IACvC,sBAAsB,CAAC,YACrBC,0BAA+B,UAAU,EAAE,OAAO;AAAA,IACpD,oBAAoB,CAClB,OACA,YACGC,+BAAoC,UAAU,EAAE,OAAO,OAAO;AAAA,IACnE,qBAAqB;AAAA,EACvB,CAAC;AASD,WAAS,gBACP,gBACA,SACK;AACL,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,0BAGK,2DAAiBA,uBAA4B;AACxD,IAAMC,qBAGK,2DAAiBA,kBAAuB;AACnD,IAAMH,4BAGK,2DAAiB,8BAA8B;","names":["addItemsToBenefit","queryPoolDefinitionItems","removeItemsFromBenefit","payload","import_transform_paths","SortOrder","RequestedFields","WebhookIdentityType","queryPoolDefinitionItems","sdkTransformError","removeItemsFromBenefit","addItemsToBenefit","queryPoolDefinitionItems","typedQueryPoolDefinitionItems","removeItemsFromBenefit","addItemsToBenefit","import_rest_modules","queryPoolDefinitionItems","typedQueryPoolDefinitionItems","removeItemsFromBenefit","addItemsToBenefit"]}
@@ -117,7 +117,7 @@ interface PoolDefinitionItem {
117
117
  */
118
118
  itemSearchKey?: string;
119
119
  /**
120
- * Indicates whether this pool definition item has been removed
120
+ * Whether this item has been removed from the pool definition.
121
121
  * @readonly
122
122
  */
123
123
  removed?: boolean | null;
@@ -199,11 +199,6 @@ interface ItemInfo {
199
199
  */
200
200
  displayName?: string | null;
201
201
  }
202
- /** Deprecated: use PoolDefinitionItemRemoved instead. Will be removed after clients are migrated. */
203
- interface PoolDefinitionItemDeactivated {
204
- /** The pool definition item that was deactivated. */
205
- poolDefinitionItem?: PoolDefinitionItem;
206
- }
207
202
  interface PoolDefinitionItemRemoved {
208
203
  /** The pool definition item that was removed from the benefit. */
209
204
  poolDefinitionItem?: PoolDefinitionItem;
@@ -848,4 +843,4 @@ interface AddItemsToBenefitOptions {
848
843
  benefitKey: string;
849
844
  }
850
845
 
851
- export { type AccountInfo, type ActionEvent, type AddItemsToBenefitApplicationErrors, type AddItemsToBenefitOptions, type AddItemsToBenefitRequest, type AddItemsToBenefitResponse, type ApplicationError, type BenefitInfo, type BulkActionMetadata, type BulkAddItemResult, type BulkRemoveItemResult, type CommonQueryWithEntityContext, type CreditConfiguration, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type IdentificationData, type IdentificationDataIdOneOf, type InvalidatePoolDefinitionItemsRequest, type InvalidatePoolDefinitionItemsResponse, type ItemInfo, type ItemMetadata, type ItemReference, type MessageEnvelope, type PoolDefinitionInfo, type PoolDefinitionItem, type PoolDefinitionItemDeactivated, type PoolDefinitionItemQuery, type PoolDefinitionItemQuerySpec, type PoolDefinitionItemRemoved, type PoolDefinitionItemsQueryBuilder, type PoolDefinitionItemsQueryResult, type ProgramDefinitionInfo, type QueryPoolDefinitionItemsOptions, type QueryPoolDefinitionItemsRequest, type QueryPoolDefinitionItemsResponse, type RemoveItemsFromBenefitApplicationErrors, type RemoveItemsFromBenefitOptions, type RemoveItemsFromBenefitRequest, type RemoveItemsFromBenefitResponse, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, addItemsToBenefit, queryPoolDefinitionItems, removeItemsFromBenefit, typedQueryPoolDefinitionItems, utils };
846
+ export { type AccountInfo, type ActionEvent, type AddItemsToBenefitApplicationErrors, type AddItemsToBenefitOptions, type AddItemsToBenefitRequest, type AddItemsToBenefitResponse, type ApplicationError, type BenefitInfo, type BulkActionMetadata, type BulkAddItemResult, type BulkRemoveItemResult, type CommonQueryWithEntityContext, type CreditConfiguration, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type IdentificationData, type IdentificationDataIdOneOf, type InvalidatePoolDefinitionItemsRequest, type InvalidatePoolDefinitionItemsResponse, type ItemInfo, type ItemMetadata, type ItemReference, type MessageEnvelope, type PoolDefinitionInfo, type PoolDefinitionItem, type PoolDefinitionItemQuery, type PoolDefinitionItemQuerySpec, type PoolDefinitionItemRemoved, type PoolDefinitionItemsQueryBuilder, type PoolDefinitionItemsQueryResult, type ProgramDefinitionInfo, type QueryPoolDefinitionItemsOptions, type QueryPoolDefinitionItemsRequest, type QueryPoolDefinitionItemsResponse, type RemoveItemsFromBenefitApplicationErrors, type RemoveItemsFromBenefitOptions, type RemoveItemsFromBenefitRequest, type RemoveItemsFromBenefitResponse, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, addItemsToBenefit, queryPoolDefinitionItems, removeItemsFromBenefit, typedQueryPoolDefinitionItems, utils };