@wix/auto_sdk_benefit-programs_pool-items 1.0.11 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/build/cjs/index.js +2 -4
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/index.typings.d.ts +1 -9
  4. package/build/cjs/index.typings.js +1 -3
  5. package/build/cjs/index.typings.js.map +1 -1
  6. package/build/cjs/meta.js.map +1 -1
  7. package/build/es/index.mjs +2 -4
  8. package/build/es/index.mjs.map +1 -1
  9. package/build/es/index.typings.d.mts +1 -9
  10. package/build/es/index.typings.mjs +1 -3
  11. package/build/es/index.typings.mjs.map +1 -1
  12. package/build/es/meta.mjs.map +1 -1
  13. package/build/internal/cjs/index.typings.d.ts +59 -9
  14. package/build/internal/cjs/meta.d.ts +86 -0
  15. package/build/internal/es/index.typings.d.mts +59 -9
  16. package/build/internal/es/meta.d.mts +86 -0
  17. package/package.json +5 -12
  18. package/build/cjs/schemas.d.ts +0 -121
  19. package/build/cjs/schemas.js +0 -299
  20. package/build/cjs/schemas.js.map +0 -1
  21. package/build/es/schemas.d.mts +0 -121
  22. package/build/es/schemas.mjs +0 -261
  23. package/build/es/schemas.mjs.map +0 -1
  24. package/build/internal/cjs/index.js +0 -258
  25. package/build/internal/cjs/index.js.map +0 -1
  26. package/build/internal/cjs/index.typings.js +0 -227
  27. package/build/internal/cjs/index.typings.js.map +0 -1
  28. package/build/internal/cjs/meta.js +0 -159
  29. package/build/internal/cjs/meta.js.map +0 -1
  30. package/build/internal/cjs/schemas.d.ts +0 -121
  31. package/build/internal/cjs/schemas.js +0 -299
  32. package/build/internal/cjs/schemas.js.map +0 -1
  33. package/build/internal/es/index.mjs +0 -228
  34. package/build/internal/es/index.mjs.map +0 -1
  35. package/build/internal/es/index.typings.mjs +0 -196
  36. package/build/internal/es/index.typings.mjs.map +0 -1
  37. package/build/internal/es/meta.mjs +0 -127
  38. package/build/internal/es/meta.mjs.map +0 -1
  39. package/build/internal/es/schemas.d.mts +0 -121
  40. package/build/internal/es/schemas.mjs +0 -261
  41. package/build/internal/es/schemas.mjs.map +0 -1
  42. package/schemas/package.json +0 -3
@@ -208,9 +208,7 @@ async function typedQueryPoolItems(query, options) {
208
208
  }
209
209
  }
210
210
  var utils = {
211
- query: {
212
- ...(0, import_query_builder_utils.createQueryUtils)()
213
- }
211
+ query: /* @__PURE__ */ (0, import_query_builder_utils.createQueryUtils)()
214
212
  };
215
213
 
216
214
  // src/benefit-programs-v1-pool-item-pool-items.public.ts
@@ -234,7 +232,7 @@ function typedQueryPoolItems2(httpClient) {
234
232
  var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
235
233
  var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
236
234
  function customQueryPoolItems(httpClient) {
237
- const router = (0, import_query_method_router.createQueryOverloadRouter)({
235
+ const router = /* @__PURE__ */ (0, import_query_method_router.createQueryOverloadRouter)({
238
236
  builderQueryFunction: (options) => queryPoolItems3(httpClient)(options),
239
237
  typedQueryFunction: (query, options) => typedQueryPoolItems2(httpClient)(query, options),
240
238
  hasOptionsParameter: true
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/benefit-programs-v1-pool-item-pool-items.universal.ts","../../src/benefit-programs-v1-pool-item-pool-items.http.ts","../../src/benefit-programs-v1-pool-item-pool-items.public.ts","../../src/benefit-programs-v1-pool-item-pool-items.context.ts"],"sourcesContent":["export * from './src/benefit-programs-v1-pool-item-pool-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 ambassadorWixBenefitProgramsV1PoolItem from './benefit-programs-v1-pool-item-pool-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\n/**\n * A pool item represents a specific catalog item that a beneficiary can access as part of a benefit in their pool. Pool items are created automatically when items become available to a beneficiary, and they're removed when the items are revoked.\n *\n * Each pool item links a beneficiary's pool to a single catalog item, surfacing pricing, display details, and references to the underlying pool, program, pool definition, and program definition.\n */\nexport interface PoolItem {\n /**\n * Pool item ID. Generated deterministically from `poolId` and `itemId`.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Revision number, which increments by 1 each time the pool item is updated.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the pool item was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the pool 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 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. For example, `classes`, `posts`, or `groups`.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string;\n /**\n * ID of the application that provides the benefit items. Each item's `externalId` 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 let you distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string;\n /**\n * ID of the pool that contains this item. A pool is the runtime container of benefits and items provisioned for a beneficiary.\n * @format GUID\n * @immutable\n * @readonly\n */\n poolId?: string;\n /**\n * ID of the program that contains this pool item. The program is the runtime instance of a program definition for a specific beneficiary.\n * @format GUID\n * @immutable\n * @readonly\n */\n programId?: string | null;\n /**\n * External program ID assigned by the provider.\n * @format GUID\n * @readonly\n */\n externalProgramId?: string | null;\n /**\n * ID of the program definition that's the template for this pool item's program.\n * @format GUID\n * @immutable\n * @readonly\n */\n programDefinitionId?: string | null;\n /**\n * External program definition ID assigned by the provider.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalProgramDefinitionId?: string | null;\n /**\n * ID of the pool definition that's the template for this pool item's pool.\n * @format GUID\n * @immutable\n * @readonly\n */\n poolDefinitionId?: string | null;\n /**\n * Internal grouping identifier for this benefit's item set. Use `poolId` together with `benefitKey` to identify a benefit - `itemSetId` is an implementation detail.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string;\n /**\n * Beneficiary of the pool - the member, contact, or visitor who holds this pool item.\n * @readonly\n * @immutable\n */\n beneficiary?: CommonIdentificationData;\n /**\n * Pool details, including display name and description.\n *\n * Returned only when `POOL` is included in the `fields` request parameter.\n * @readonly\n */\n pool?: PoolInfo;\n /**\n * Program details - `id`, `externalId`, and `displayName`.\n *\n * Returned only when `PROGRAM` is included in the `fields` request parameter.\n * @readonly\n */\n program?: ProgramInfo;\n /**\n * Program definition that includes this item as an accessible benefit.\n *\n * Returned only when `PROGRAM_DEFINITION` is included in the `fields` request parameter.\n * @readonly\n */\n programDefinition?: ProgramDefinitionInfo;\n /**\n * Item ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemId?: string;\n /**\n * Display name for the catalog item.\n *\n * Returned only when `ITEM` is included in the `fields` request parameter.\n * @readonly\n */\n itemInfo?: ItemInfo;\n /**\n * Pricing and display information for the associated benefit, including credit price, name, and description.\n *\n * Returned only when `BENEFIT` is included in the `fields` request parameter.\n * @readonly\n */\n benefitInfo?: BenefitInfo;\n /**\n * Credit balance of the pool that contains this item.\n *\n * Returned only when `BALANCE` is included in the `fields` request parameter.\n * @readonly\n */\n balance?: BalanceInfo;\n /**\n * Unique identifier for the benefit that grants access to 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 `providerAppId`, `category`, and `externalId` 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 item has been removed\n * @readonly\n */\n removed?: boolean | null;\n}\n\nexport interface CommonIdentificationData\n extends CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor that hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site member.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n}\n\n/** @oneof */\nexport interface CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor that hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site member.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n}\n\nexport enum IdentityType {\n /** Unknown type. This value is not used. */\n UNKNOWN = 'UNKNOWN',\n /** A site visitor who has not logged in. */\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n /** A logged-in site member. */\n MEMBER = 'MEMBER',\n /** A Wix account holder, such as a site owner or contributor. */\n WIX_USER = 'WIX_USER',\n}\n\n/** @enumType */\nexport type IdentityTypeWithLiterals =\n | IdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER';\n\n/** Pool's display details. */\nexport interface PoolInfo {\n /**\n * Pool's display name. Often matches the name on the associated pool definition.\n * @maxLength 64\n */\n displayName?: string;\n /**\n * Pool description.\n * @maxLength 450\n */\n description?: string | null;\n /**\n * Status of the pool that contains this item.\n * @readonly\n */\n status?: PoolStatusWithLiterals;\n /**\n * Credit configuration of the pool, when credit-based pricing is enabled.\n * @readonly\n */\n creditConfiguration?: CreditConfiguration;\n}\n\nexport enum PoolStatus {\n /** Pool is active. */\n ACTIVE = 'ACTIVE',\n /** Pool is paused. It can be resumed. */\n PAUSED = 'PAUSED',\n /** Pool is ended. It can't be resumed. */\n ENDED = 'ENDED',\n /** Pool provisioning is in progress. This status exists for a short time during processing. */\n PROVISIONING = 'PROVISIONING',\n /** Pool renewing is in progress. This status exists for a short time during processing. */\n RENEWING = 'RENEWING',\n /** Pool is pending */\n PENDING = 'PENDING',\n}\n\n/** @enumType */\nexport type PoolStatusWithLiterals =\n | PoolStatus\n | 'ACTIVE'\n | 'PAUSED'\n | 'ENDED'\n | 'PROVISIONING'\n | 'RENEWING'\n | 'PENDING';\n\n/** Credit settings for a pool. */\nexport interface CreditConfiguration {\n /**\n * Number of credits configured for the pool.\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\n/** Program's identifying details. */\nexport interface ProgramInfo {\n /**\n * Program ID.\n * @format GUID\n */\n _id?: string;\n /**\n * External program ID assigned by the provider.\n * @format GUID\n */\n externalId?: string | null;\n /**\n * Program's display name.\n * @maxLength 64\n */\n displayName?: string | null;\n}\n\n/** Program definition's display details. */\nexport interface ProgramDefinitionInfo {\n /**\n * Program definition ID.\n * @format GUID\n */\n _id?: string;\n /**\n * External program definition ID assigned by the provider.\n * @format GUID\n */\n externalId?: string | null;\n /**\n * Program definition's display name.\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * Program definition description.\n * @maxLength 450\n */\n description?: string | null;\n}\n\n/** Catalog item's display details. */\nexport interface ItemInfo {\n /**\n * Item's display name.\n * @maxLength 400\n */\n displayName?: string | null;\n}\n\n/** Pricing and display information for a benefit. */\nexport interface BenefitInfo {\n /**\n * Cost of the benefit in credits. The cost is the same for all items in this benefit.\n *\n * Credits are a configurable unit defined on the parent pool definition. The unit type is set in the pool definition's credit configuration. Absent when no credit-based pricing is configured for this benefit.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n price?: string | null;\n /**\n * Unique identifier for this benefit. Same value as `poolItem.benefitKey`.\n * @maxLength 64\n */\n benefitKey?: string;\n /**\n * Benefit's display name.\n * @maxLength 40\n */\n displayName?: string | null;\n /**\n * Benefit description.\n * @maxLength 255\n */\n description?: string | null;\n}\n\n/** Credit balance details for a pool. */\nexport interface BalanceInfo {\n /**\n * Number of available credits in the pool.\n *\n * Credits are a configurable unit defined on the parent pool definition. Absent when no credit-based pricing is configured for the pool.\n * @decimalValue options { gte:0, maxScale:4 }\n * @readonly\n */\n available?: string | null;\n}\n\n/** Payload for the `PoolItemRemoved` action event. */\nexport interface PoolItemRemoved {\n /** Pool item that was removed from its benefit. */\n poolItem?: PoolItem;\n}\n\nexport interface QueryPoolItemsRequest {\n /** Query options. */\n query?: CursorQuery;\n /**\n * Optional enrichments to include in the response.\n * @maxSize 6\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 `pool` field with the pool's display name and description. */\n POOL = 'POOL',\n /** Populates the `program` field with the program's display name. */\n PROGRAM = 'PROGRAM',\n /** Populates the `programDefinition` field with the program definition's display name and description. */\n PROGRAM_DEFINITION = 'PROGRAM_DEFINITION',\n /** Populates the `itemInfo` field with the catalog item's display name. */\n ITEM = 'ITEM',\n /** Populates the `benefitInfo` field with the benefit's credit price, name, and description. */\n BENEFIT = 'BENEFIT',\n /** Populates the `balance` field with the pool's available credit balance. */\n BALANCE = 'BALANCE',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'POOL'\n | 'PROGRAM'\n | 'PROGRAM_DEFINITION'\n | 'ITEM'\n | 'BENEFIT'\n | 'BALANCE';\n\nexport interface QueryPoolItemsResponse {\n /** List of retrieved pool items. */\n poolItems?: PoolItem[];\n /** Paging metadata. */\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 InvalidatePoolItemsRequest\n extends InvalidatePoolItemsRequestSourceOneOf {\n /** Invalidate pool items for one pool, optionally narrowed to specific item sets. */\n pool?: PoolScope;\n /** Invalidate pool items materialized from a specific item across every subscribing pool. */\n item?: ItemScope;\n}\n\n/** @oneof */\nexport interface InvalidatePoolItemsRequestSourceOneOf {\n /** Invalidate pool items for one pool, optionally narrowed to specific item sets. */\n pool?: PoolScope;\n /** Invalidate pool items materialized from a specific item across every subscribing pool. */\n item?: ItemScope;\n}\n\nexport interface PoolScope {\n /**\n * ID of the pool whose items are invalidated.\n * @format GUID\n */\n poolId?: string;\n /**\n * IDs of the item sets to invalidate. When empty, items for all benefits in the pool are invalidated.\n * @maxSize 10\n * @format GUID\n */\n itemSetIds?: string[];\n /**\n * When `true`, only the pool's items are invalidated and the pool's benefits are left untouched.\n * When `false` (default), the pool's benefits are invalidated first, then its items - the two are nested in a single call.\n */\n skipBenefitInvalidation?: boolean;\n}\n\nexport interface ItemScope {\n /**\n * ID of the item to invalidate across every pool that references its item set.\n * @format GUID\n */\n itemId?: string;\n}\n\nexport interface InvalidatePoolItemsResponse {}\n\nexport interface DeleteSoftDeletedPoolItemRequest {\n /**\n * ID of the soft-deleted pool item to hard-delete.\n * @format GUID\n */\n poolItemId?: string;\n}\n\nexport interface DeleteSoftDeletedPoolItemResponse {}\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/**\n * Retrieves a list of up to 1,000 pool items, based on the specified paging, filtering, and sorting.\n *\n * When called by a logged-in member without an explicit `beneficiary.memberId` filter, the response is automatically scoped to the calling member. App callers must include a `beneficiary.memberId` filter to scope the response to a specific beneficiary.\n *\n * Query Pool Items runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `cursorPaging.limit` is `50`\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n * @public\n * @permissionId benefit_programs:v1:pool_item:query_pool_items\n * @permissionId BENEFIT_PROGRAMS.POOL_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool_item.PoolItemService.QueryPoolItems\n */\nexport function queryPoolItems(\n options?: QueryPoolItemsOptions\n): PoolItemsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n PoolItem,\n 'CURSOR',\n QueryPoolItemsRequest,\n QueryPoolItemsResponse\n >({\n func: async (payload: QueryPoolItemsRequest) => {\n const reqOpts = ambassadorWixBenefitProgramsV1PoolItem.queryPoolItems({\n ...payload,\n ...(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: QueryPoolItemsRequest['query']) => {\n const args = [query, options] as [\n QueryPoolItemsRequest['query'],\n QueryPoolItemsOptions\n ];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryPoolItemsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.poolItems,\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 QueryPoolItemsOptions {\n /**\n * Optional enrichments to include in the response.\n * @maxSize 6\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 PoolItemsQueryResult extends QueryCursorResult {\n items: PoolItem[];\n query: PoolItemsQueryBuilder;\n next: () => Promise<PoolItemsQueryResult>;\n prev: () => Promise<PoolItemsQueryResult>;\n}\n\nexport interface PoolItemsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n */\n startsWith: (\n propertyName:\n | '_id'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: string\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasSome: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any[]\n ) => PoolItemsQueryBuilder;\n in: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n exists: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: boolean\n ) => PoolItemsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey'\n >\n ) => PoolItemsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n descending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey'\n >\n ) => PoolItemsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => PoolItemsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => PoolItemsQueryBuilder;\n find: () => Promise<PoolItemsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.benefit_programs.v1.pool_item.PoolItemService.QueryPoolItems\n * @requiredField query\n */\nexport async function typedQueryPoolItems(\n query: PoolItemQuery,\n options?: QueryPoolItemsOptions\n): Promise<\n NonNullablePaths<\n QueryPoolItemsResponse,\n | `poolItems`\n | `poolItems.${number}._id`\n | `poolItems.${number}.externalId`\n | `poolItems.${number}.category`\n | `poolItems.${number}.providerAppId`\n | `poolItems.${number}.namespace`\n | `poolItems.${number}.poolId`\n | `poolItems.${number}.itemSetId`\n | `poolItems.${number}.beneficiary.anonymousVisitorId`\n | `poolItems.${number}.beneficiary.memberId`\n | `poolItems.${number}.beneficiary.wixUserId`\n | `poolItems.${number}.pool.displayName`\n | `poolItems.${number}.pool.status`\n | `poolItems.${number}.pool.creditConfiguration.amount`\n | `poolItems.${number}.program._id`\n | `poolItems.${number}.programDefinition._id`\n | `poolItems.${number}.itemId`\n | `poolItems.${number}.benefitInfo.benefitKey`\n | `poolItems.${number}.benefitKey`\n | `poolItems.${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 ambassadorWixBenefitProgramsV1PoolItem.queryPoolItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PoolItemQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: [\n '_createdDate',\n '_id',\n 'beneficiary.memberId',\n 'benefitKey',\n 'category',\n 'externalId',\n 'externalProgramDefinitionId',\n 'externalProgramId',\n 'itemSearchKey',\n 'itemSetId',\n 'namespace',\n 'poolDefinitionId',\n 'poolId',\n 'programDefinitionId',\n 'programId',\n 'providerAppId'\n ];\n operators: '*';\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n PoolItem,\n PoolItemQuerySpec\n>;\nexport type PoolItemQuery = {\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<PoolItem, PoolItemQuerySpec, PoolItemQuery>(),\n },\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 resolveWixBenefitProgramsV1PoolItemPoolItemServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/benefit-programs/v1/pool-items',\n destPath: '/v1/pool-items',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/pool-items',\n destPath: '/v1/pool-items',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/pool-items',\n destPath: '/v1/pool-items',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_pool-items';\n\n/**\n * Retrieves a list of up to 1,000 pool items, based on the specified paging, filtering, and sorting.\n *\n * When called by a logged-in member without an explicit `beneficiary.memberId` filter, the response is automatically scoped to the calling member. App callers must include a `beneficiary.memberId` filter to scope the response to a specific beneficiary.\n *\n * Query Pool Items runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `cursorPaging.limit` is `50`\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n */\nexport function queryPoolItems(payload: object): RequestOptionsFactory<any> {\n function __queryPoolItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_item.PoolItemService.QueryPoolItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolItemPoolItemServiceUrl({\n protoPath: '/v1/pool-items/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'poolItems.createdDate' },\n { path: 'poolItems.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryPoolItems;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n PoolItemQuery,\n PoolItemsQueryBuilder,\n QueryPoolItemsOptions,\n QueryPoolItemsResponse,\n queryPoolItems as universalQueryPoolItems,\n typedQueryPoolItems as universalTypedQueryPoolItems,\n} from './benefit-programs-v1-pool-item-pool-items.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/benefit-programs' };\n\nexport function queryPoolItems(\n httpClient: HttpClient\n): QueryPoolItemsSignature {\n return (options?: QueryPoolItemsOptions) =>\n universalQueryPoolItems(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryPoolItemsSignature {\n /**\n * Retrieves a list of up to 1,000 pool items, based on the specified paging, filtering, and sorting.\n *\n * When called by a logged-in member without an explicit `beneficiary.memberId` filter, the response is automatically scoped to the calling member. App callers must include a `beneficiary.memberId` filter to scope the response to a specific beneficiary.\n *\n * Query Pool Items runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `cursorPaging.limit` is `50`\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n */\n (options?: QueryPoolItemsOptions): PoolItemsQueryBuilder;\n}\n\nexport function typedQueryPoolItems(\n httpClient: HttpClient\n): TypedQueryPoolItemsSignature {\n return (query: PoolItemQuery, options?: QueryPoolItemsOptions) =>\n universalTypedQueryPoolItems(\n query,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryPoolItemsSignature {\n /** */\n (query: PoolItemQuery, options?: QueryPoolItemsOptions): Promise<\n NonNullablePaths<\n QueryPoolItemsResponse,\n | `poolItems`\n | `poolItems.${number}._id`\n | `poolItems.${number}.externalId`\n | `poolItems.${number}.category`\n | `poolItems.${number}.providerAppId`\n | `poolItems.${number}.namespace`\n | `poolItems.${number}.poolId`\n | `poolItems.${number}.itemSetId`\n | `poolItems.${number}.beneficiary.anonymousVisitorId`\n | `poolItems.${number}.beneficiary.memberId`\n | `poolItems.${number}.beneficiary.wixUserId`\n | `poolItems.${number}.pool.displayName`\n | `poolItems.${number}.pool.status`\n | `poolItems.${number}.pool.creditConfiguration.amount`\n | `poolItems.${number}.program._id`\n | `poolItems.${number}.programDefinition._id`\n | `poolItems.${number}.itemId`\n | `poolItems.${number}.benefitInfo.benefitKey`\n | `poolItems.${number}.benefitKey`\n | `poolItems.${number}.itemSearchKey`,\n 6\n >\n >;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n BalanceInfo,\n BenefitInfo,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n CreditConfiguration,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteSoftDeletedPoolItemRequest,\n DeleteSoftDeletedPoolItemResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n IdentificationData,\n IdentificationDataIdOneOf,\n IdentityType,\n InvalidatePoolItemsRequest,\n InvalidatePoolItemsRequestSourceOneOf,\n InvalidatePoolItemsResponse,\n ItemInfo,\n ItemScope,\n MessageEnvelope,\n PoolInfo,\n PoolItem,\n PoolItemQuerySpec,\n PoolItemRemoved,\n PoolItemsQueryBuilder,\n PoolItemsQueryResult,\n PoolScope,\n PoolStatus,\n ProgramDefinitionInfo,\n ProgramInfo,\n QueryPoolItemsOptions,\n QueryPoolItemsRequest,\n QueryPoolItemsResponse,\n RequestedFields,\n RestoreInfo,\n SortOrder,\n Sorting,\n WebhookIdentityType,\n utils,\n} from './benefit-programs-v1-pool-item-pool-items.universal.js';\n","import {\n queryPoolItems as publicQueryPoolItems,\n typedQueryPoolItems as publicTypedQueryPoolItems,\n} from './benefit-programs-v1-pool-item-pool-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 PoolItemQuery,\n PoolItemsQueryBuilder,\n QueryPoolItemsOptions,\n typedQueryPoolItems as universalTypedQueryPoolItems,\n} from './benefit-programs-v1-pool-item-pool-items.universal.js';\n\nfunction customQueryPoolItems(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: (options?: QueryPoolItemsOptions) =>\n publicQueryPoolItems(httpClient)(options),\n typedQueryFunction: (\n query: PoolItemQuery,\n options?: QueryPoolItemsOptions\n ) => publicTypedQueryPoolItems(httpClient)(query, options),\n hasOptionsParameter: true,\n });\n\n function overloadedQuery(\n query: PoolItemQuery,\n options?: QueryPoolItemsOptions\n ): ReturnType<typeof universalTypedQueryPoolItems>;\n function overloadedQuery(\n options?: QueryPoolItemsOptions\n ): PoolItemsQueryBuilder;\n function overloadedQuery(\n queryOrOptions?: PoolItemQuery | QueryPoolItemsOptions,\n options?: QueryPoolItemsOptions\n ): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const queryPoolItems: MaybeContext<\n BuildRESTFunction<typeof customQueryPoolItems> & typeof customQueryPoolItems\n> = /*#__PURE__*/ createRESTModule(customQueryPoolItems);\n\nexport {\n IdentityType,\n PoolStatus,\n SortOrder,\n RequestedFields,\n WebhookIdentityType,\n} from './benefit-programs-v1-pool-item-pool-items.universal.js';\nexport {\n PoolItem,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n PoolInfo,\n CreditConfiguration,\n ProgramInfo,\n ProgramDefinitionInfo,\n ItemInfo,\n BenefitInfo,\n BalanceInfo,\n PoolItemRemoved,\n QueryPoolItemsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryPoolItemsResponse,\n CursorPagingMetadata,\n Cursors,\n InvalidatePoolItemsRequest,\n InvalidatePoolItemsRequestSourceOneOf,\n PoolScope,\n ItemScope,\n InvalidatePoolItemsResponse,\n DeleteSoftDeletedPoolItemRequest,\n DeleteSoftDeletedPoolItemResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n QueryPoolItemsOptions,\n PoolItemsQueryResult,\n PoolItemsQueryBuilder,\n PoolItemQuerySpec,\n} from './benefit-programs-v1-pool-item-pool-items.universal.js';\nexport { utils } from './benefit-programs-v1-pool-item-pool-items.universal.js';\nexport {\n IdentityTypeWithLiterals,\n PoolStatusWithLiterals,\n SortOrderWithLiterals,\n RequestedFieldsWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CommonQueryWithEntityContext,\n PoolItemQuery,\n} from './benefit-programs-v1-pool-item-pool-items.universal.js';\n"],"mappings":"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","names":["queryPoolItems","payload","import_transform_paths","IdentityType","PoolStatus","SortOrder","RequestedFields","WebhookIdentityType","queryPoolItems","sdkTransformError","queryPoolItems","typedQueryPoolItems","import_rest_modules","queryPoolItems","typedQueryPoolItems"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/benefit-programs-v1-pool-item-pool-items.universal.ts","../../src/benefit-programs-v1-pool-item-pool-items.http.ts","../../src/benefit-programs-v1-pool-item-pool-items.public.ts","../../src/benefit-programs-v1-pool-item-pool-items.context.ts"],"sourcesContent":["export * from './src/benefit-programs-v1-pool-item-pool-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 ambassadorWixBenefitProgramsV1PoolItem from './benefit-programs-v1-pool-item-pool-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\n/**\n * A pool item represents a specific catalog item that a beneficiary can access as part of a benefit in their pool. Pool items are created automatically when items become available to a beneficiary, and they're removed when the items are revoked.\n *\n * Each pool item links a beneficiary's pool to a single catalog item, surfacing pricing, display details, and references to the underlying pool, program, pool definition, and program definition.\n */\nexport interface PoolItem {\n /**\n * Pool item ID. Generated deterministically from `poolId` and `itemId`.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Revision number, which increments by 1 each time the pool item is updated.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the pool item was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the pool 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 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. For example, `classes`, `posts`, or `groups`.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string;\n /**\n * ID of the application that provides the benefit items. Each item's `externalId` 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 let you distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string;\n /**\n * ID of the pool that contains this item. A pool is the runtime container of benefits and items provisioned for a beneficiary.\n * @format GUID\n * @immutable\n * @readonly\n */\n poolId?: string;\n /**\n * ID of the program that contains this pool item. The program is the runtime instance of a program definition for a specific beneficiary.\n * @format GUID\n * @immutable\n * @readonly\n */\n programId?: string | null;\n /**\n * External program ID assigned by the provider.\n * @format GUID\n * @readonly\n */\n externalProgramId?: string | null;\n /**\n * ID of the program definition that's the template for this pool item's program.\n * @format GUID\n * @immutable\n * @readonly\n */\n programDefinitionId?: string | null;\n /**\n * External program definition ID assigned by the provider.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalProgramDefinitionId?: string | null;\n /**\n * ID of the pool definition that's the template for this pool item's pool.\n * @format GUID\n * @immutable\n * @readonly\n */\n poolDefinitionId?: string | null;\n /**\n * Internal grouping identifier for this benefit's item set. Use `poolId` together with `benefitKey` to identify a benefit - `itemSetId` is an implementation detail.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string;\n /**\n * Beneficiary of the pool - the member, contact, or visitor who holds this pool item.\n * @readonly\n * @immutable\n */\n beneficiary?: CommonIdentificationData;\n /**\n * Pool details, including display name and description.\n *\n * Returned only when `POOL` is included in the `fields` request parameter.\n * @readonly\n */\n pool?: PoolInfo;\n /**\n * Program details - `id`, `externalId`, and `displayName`.\n *\n * Returned only when `PROGRAM` is included in the `fields` request parameter.\n * @readonly\n */\n program?: ProgramInfo;\n /**\n * Program definition that includes this item as an accessible benefit.\n *\n * Returned only when `PROGRAM_DEFINITION` is included in the `fields` request parameter.\n * @readonly\n */\n programDefinition?: ProgramDefinitionInfo;\n /**\n * Item ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemId?: string;\n /**\n * Display name for the catalog item.\n *\n * Returned only when `ITEM` is included in the `fields` request parameter.\n * @readonly\n */\n itemInfo?: ItemInfo;\n /**\n * Pricing and display information for the associated benefit, including credit price, name, and description.\n *\n * Returned only when `BENEFIT` is included in the `fields` request parameter.\n * @readonly\n */\n benefitInfo?: BenefitInfo;\n /**\n * Credit balance of the pool that contains this item.\n *\n * Returned only when `BALANCE` is included in the `fields` request parameter.\n * @readonly\n */\n balance?: BalanceInfo;\n /**\n * Unique identifier for the benefit that grants access to 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 `providerAppId`, `category`, and `externalId` 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 item has been removed\n * @readonly\n */\n removed?: boolean | null;\n /**\n * Monotonic counter incremented on every change, including system/materialization updates that do not bump revision.\n * @internal\n * @readonly\n */\n poolChangesCounter?: string | null;\n /**\n * Last revision number of the corresponding pool definition that this entity was created from\n * @internal\n * @readonly\n */\n poolRevision?: string | null;\n /**\n * Monotonic counter incremented on every change, including system/materialization updates that do not bump revision.\n * @internal\n * @readonly\n */\n itemChangesCounter?: string | null;\n /**\n * Last revision number of the corresponding item that this entity was created from\n * @internal\n * @readonly\n */\n itemRevision?: string | null;\n}\n\nexport interface CommonIdentificationData\n extends CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor that hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site member.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n /**\n * Identity type.\n * @internal\n * @readonly\n */\n identityType?: IdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor that hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site member.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n}\n\nexport enum IdentityType {\n /** Unknown type. This value is not used. */\n UNKNOWN = 'UNKNOWN',\n /** A site visitor who has not logged in. */\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n /** A logged-in site member. */\n MEMBER = 'MEMBER',\n /** A Wix account holder, such as a site owner or contributor. */\n WIX_USER = 'WIX_USER',\n}\n\n/** @enumType */\nexport type IdentityTypeWithLiterals =\n | IdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER';\n\n/** Pool's display details. */\nexport interface PoolInfo {\n /**\n * Pool's display name. Often matches the name on the associated pool definition.\n * @maxLength 64\n */\n displayName?: string;\n /**\n * Pool description.\n * @maxLength 450\n */\n description?: string | null;\n /**\n * Status of the pool that contains this item.\n * @readonly\n */\n status?: PoolStatusWithLiterals;\n /**\n * Credit configuration of the pool, when credit-based pricing is enabled.\n * @readonly\n */\n creditConfiguration?: CreditConfiguration;\n}\n\nexport enum PoolStatus {\n /** Pool is active. */\n ACTIVE = 'ACTIVE',\n /** Pool is paused. It can be resumed. */\n PAUSED = 'PAUSED',\n /** Pool is ended. It can't be resumed. */\n ENDED = 'ENDED',\n /** Pool provisioning is in progress. This status exists for a short time during processing. */\n PROVISIONING = 'PROVISIONING',\n /** Pool renewing is in progress. This status exists for a short time during processing. */\n RENEWING = 'RENEWING',\n /** Pool is pending */\n PENDING = 'PENDING',\n}\n\n/** @enumType */\nexport type PoolStatusWithLiterals =\n | PoolStatus\n | 'ACTIVE'\n | 'PAUSED'\n | 'ENDED'\n | 'PROVISIONING'\n | 'RENEWING'\n | 'PENDING';\n\n/** Credit settings for a pool. */\nexport interface CreditConfiguration {\n /**\n * Number of credits configured for the pool.\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\n/** Program's identifying details. */\nexport interface ProgramInfo {\n /**\n * Program ID.\n * @format GUID\n */\n _id?: string;\n /**\n * External program ID assigned by the provider.\n * @format GUID\n */\n externalId?: string | null;\n /**\n * Program's display name.\n * @maxLength 64\n */\n displayName?: string | null;\n}\n\n/** Program definition's display details. */\nexport interface ProgramDefinitionInfo {\n /**\n * Program definition ID.\n * @format GUID\n */\n _id?: string;\n /**\n * External program definition ID assigned by the provider.\n * @format GUID\n */\n externalId?: string | null;\n /**\n * Program definition's display name.\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * Program definition description.\n * @maxLength 450\n */\n description?: string | null;\n}\n\n/** Catalog item's display details. */\nexport interface ItemInfo {\n /**\n * Item's display name.\n * @maxLength 400\n */\n displayName?: string | null;\n}\n\n/** Pricing and display information for a benefit. */\nexport interface BenefitInfo {\n /**\n * Cost of the benefit in credits. The cost is the same for all items in this benefit.\n *\n * Credits are a configurable unit defined on the parent pool definition. The unit type is set in the pool definition's credit configuration. Absent when no credit-based pricing is configured for this benefit.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n price?: string | null;\n /**\n * Unique identifier for this benefit. Same value as `poolItem.benefitKey`.\n * @maxLength 64\n */\n benefitKey?: string;\n /**\n * Benefit's display name.\n * @maxLength 40\n */\n displayName?: string | null;\n /**\n * Benefit description.\n * @maxLength 255\n */\n description?: string | null;\n}\n\n/** Credit balance details for a pool. */\nexport interface BalanceInfo {\n /**\n * Number of available credits in the pool.\n *\n * Credits are a configurable unit defined on the parent pool definition. Absent when no credit-based pricing is configured for the pool.\n * @decimalValue options { gte:0, maxScale:4 }\n * @readonly\n */\n available?: string | null;\n}\n\n/** Payload for the `PoolItemRemoved` action event. */\nexport interface PoolItemRemoved {\n /** Pool item that was removed from its benefit. */\n poolItem?: PoolItem;\n}\n\nexport interface QueryPoolItemsRequest {\n /** Query options. */\n query?: CursorQuery;\n /**\n * Optional enrichments to include in the response.\n * @maxSize 6\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 * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by\n * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.\n *\n * If multiple filters are provided, they are combined with AND operator.\n *\n * Example:\n * Given we have document like {\"id\": \"1\", \"nestedField\": [{\"price\": 10, \"region\": \"EU\"}, {\"price\": 20, \"region\": \"US\"}]}\n * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be\n * { fieldName: \"nestedField.price\", \"select_items_by\": [{\"nestedField.region\": \"US\"}] }\n * @internal\n * @maxSize 10\n */\n selectItemsBy?: Record<string, any>[] | null;\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 `pool` field with the pool's display name and description. */\n POOL = 'POOL',\n /** Populates the `program` field with the program's display name. */\n PROGRAM = 'PROGRAM',\n /** Populates the `programDefinition` field with the program definition's display name and description. */\n PROGRAM_DEFINITION = 'PROGRAM_DEFINITION',\n /** Populates the `itemInfo` field with the catalog item's display name. */\n ITEM = 'ITEM',\n /** Populates the `benefitInfo` field with the benefit's credit price, name, and description. */\n BENEFIT = 'BENEFIT',\n /** Populates the `balance` field with the pool's available credit balance. */\n BALANCE = 'BALANCE',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'POOL'\n | 'PROGRAM'\n | 'PROGRAM_DEFINITION'\n | 'ITEM'\n | 'BENEFIT'\n | 'BALANCE';\n\nexport interface QueryPoolItemsResponse {\n /** List of retrieved pool items. */\n poolItems?: PoolItem[];\n /** Paging metadata. */\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 InvalidatePoolItemsRequest\n extends InvalidatePoolItemsRequestSourceOneOf {\n /** Invalidate pool items for one pool, optionally narrowed to specific item sets. */\n pool?: PoolScope;\n /** Invalidate pool items materialized from a specific item across every subscribing pool. */\n item?: ItemScope;\n}\n\n/** @oneof */\nexport interface InvalidatePoolItemsRequestSourceOneOf {\n /** Invalidate pool items for one pool, optionally narrowed to specific item sets. */\n pool?: PoolScope;\n /** Invalidate pool items materialized from a specific item across every subscribing pool. */\n item?: ItemScope;\n}\n\nexport interface PoolScope {\n /**\n * ID of the pool whose items are invalidated.\n * @format GUID\n */\n poolId?: string;\n /**\n * IDs of the item sets to invalidate. When empty, items for all benefits in the pool are invalidated.\n * @maxSize 10\n * @format GUID\n */\n itemSetIds?: string[];\n /**\n * When `true`, only the pool's items are invalidated and the pool's benefits are left untouched.\n * When `false` (default), the pool's benefits are invalidated first, then its items - the two are nested in a single call.\n */\n skipBenefitInvalidation?: boolean;\n}\n\nexport interface ItemScope {\n /**\n * ID of the item to invalidate across every pool that references its item set.\n * @format GUID\n */\n itemId?: string;\n}\n\nexport interface InvalidatePoolItemsResponse {}\n\nexport interface DeleteSoftDeletedPoolItemRequest {\n /**\n * ID of the soft-deleted pool item to hard-delete.\n * @format GUID\n */\n poolItemId?: string;\n}\n\nexport interface DeleteSoftDeletedPoolItemResponse {}\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/**\n * Retrieves a list of up to 1,000 pool items, based on the specified paging, filtering, and sorting.\n *\n * When called by a logged-in member without an explicit `beneficiary.memberId` filter, the response is automatically scoped to the calling member. App callers must include a `beneficiary.memberId` filter to scope the response to a specific beneficiary.\n *\n * Query Pool Items runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `cursorPaging.limit` is `50`\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n * @public\n * @permissionId benefit_programs:v1:pool_item:query_pool_items\n * @permissionId BENEFIT_PROGRAMS.POOL_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool_item.PoolItemService.QueryPoolItems\n */\nexport function queryPoolItems(\n options?: QueryPoolItemsOptions\n): PoolItemsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n PoolItem,\n 'CURSOR',\n QueryPoolItemsRequest,\n QueryPoolItemsResponse\n >({\n func: async (payload: QueryPoolItemsRequest) => {\n const reqOpts = ambassadorWixBenefitProgramsV1PoolItem.queryPoolItems({\n ...payload,\n ...(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: QueryPoolItemsRequest['query']) => {\n const args = [query, options] as [\n QueryPoolItemsRequest['query'],\n QueryPoolItemsOptions\n ];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryPoolItemsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.poolItems,\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 QueryPoolItemsOptions {\n /**\n * Optional enrichments to include in the response.\n * @maxSize 6\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 PoolItemsQueryResult extends QueryCursorResult {\n items: PoolItem[];\n query: PoolItemsQueryBuilder;\n next: () => Promise<PoolItemsQueryResult>;\n prev: () => Promise<PoolItemsQueryResult>;\n}\n\nexport interface PoolItemsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n */\n startsWith: (\n propertyName:\n | '_id'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: string\n ) => PoolItemsQueryBuilder;\n in: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n exists: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: boolean\n ) => PoolItemsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey'\n >\n ) => PoolItemsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n descending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey'\n >\n ) => PoolItemsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => PoolItemsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => PoolItemsQueryBuilder;\n find: () => Promise<PoolItemsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.benefit_programs.v1.pool_item.PoolItemService.QueryPoolItems\n * @requiredField query\n */\nexport async function typedQueryPoolItems(\n query: PoolItemQuery,\n options?: QueryPoolItemsOptions\n): Promise<\n NonNullablePaths<\n QueryPoolItemsResponse,\n | `poolItems`\n | `poolItems.${number}._id`\n | `poolItems.${number}.externalId`\n | `poolItems.${number}.category`\n | `poolItems.${number}.providerAppId`\n | `poolItems.${number}.namespace`\n | `poolItems.${number}.poolId`\n | `poolItems.${number}.itemSetId`\n | `poolItems.${number}.beneficiary.anonymousVisitorId`\n | `poolItems.${number}.beneficiary.memberId`\n | `poolItems.${number}.beneficiary.wixUserId`\n | `poolItems.${number}.pool.displayName`\n | `poolItems.${number}.pool.status`\n | `poolItems.${number}.pool.creditConfiguration.amount`\n | `poolItems.${number}.program._id`\n | `poolItems.${number}.programDefinition._id`\n | `poolItems.${number}.itemId`\n | `poolItems.${number}.benefitInfo.benefitKey`\n | `poolItems.${number}.benefitKey`\n | `poolItems.${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 ambassadorWixBenefitProgramsV1PoolItem.queryPoolItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PoolItemQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: [\n '_createdDate',\n '_id',\n 'beneficiary.memberId',\n 'benefitKey',\n 'category',\n 'externalId',\n 'externalProgramDefinitionId',\n 'externalProgramId',\n 'itemSearchKey',\n 'itemSetId',\n 'namespace',\n 'poolDefinitionId',\n 'poolId',\n 'programDefinitionId',\n 'programId',\n 'providerAppId'\n ];\n operators: '*';\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n PoolItem,\n PoolItemQuerySpec\n>;\nexport type PoolItemQuery = {\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 When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by\n a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.\n\n If multiple filters are provided, they are combined with AND operator.\n\n Example:\n Given we have document like {\"id\": \"1\", \"nestedField\": [{\"price\": 10, \"region\": \"EU\"}, {\"price\": 20, \"region\": \"US\"}]}\n and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be\n { fieldName: \"nestedField.price\", \"select_items_by\": [{\"nestedField.region\": \"US\"}] } \n @internal: undefined,\n @maxSize: 10 \n */\n selectItemsBy?:\n | NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['selectItemsBy']\n | null;\n }[];\n};\n\nexport const utils = {\n query: /*#__PURE__*/ createQueryUtils<\n PoolItem,\n PoolItemQuerySpec,\n PoolItemQuery\n >(),\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 resolveWixBenefitProgramsV1PoolItemPoolItemServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/benefit-programs/v1/pool-items',\n destPath: '/v1/pool-items',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/pool-items',\n destPath: '/v1/pool-items',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/pool-items',\n destPath: '/v1/pool-items',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_pool-items';\n\n/**\n * Retrieves a list of up to 1,000 pool items, based on the specified paging, filtering, and sorting.\n *\n * When called by a logged-in member without an explicit `beneficiary.memberId` filter, the response is automatically scoped to the calling member. App callers must include a `beneficiary.memberId` filter to scope the response to a specific beneficiary.\n *\n * Query Pool Items runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `cursorPaging.limit` is `50`\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n */\nexport function queryPoolItems(payload: object): RequestOptionsFactory<any> {\n function __queryPoolItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_item.PoolItemService.QueryPoolItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolItemPoolItemServiceUrl({\n protoPath: '/v1/pool-items/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'poolItems.createdDate' },\n { path: 'poolItems.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryPoolItems;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n PoolItemQuery,\n PoolItemsQueryBuilder,\n QueryPoolItemsOptions,\n QueryPoolItemsResponse,\n queryPoolItems as universalQueryPoolItems,\n typedQueryPoolItems as universalTypedQueryPoolItems,\n} from './benefit-programs-v1-pool-item-pool-items.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/benefit-programs' };\n\nexport function queryPoolItems(\n httpClient: HttpClient\n): QueryPoolItemsSignature {\n return (options?: QueryPoolItemsOptions) =>\n universalQueryPoolItems(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryPoolItemsSignature {\n /**\n * Retrieves a list of up to 1,000 pool items, based on the specified paging, filtering, and sorting.\n *\n * When called by a logged-in member without an explicit `beneficiary.memberId` filter, the response is automatically scoped to the calling member. App callers must include a `beneficiary.memberId` filter to scope the response to a specific beneficiary.\n *\n * Query Pool Items runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `cursorPaging.limit` is `50`\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n */\n (options?: QueryPoolItemsOptions): PoolItemsQueryBuilder;\n}\n\nexport function typedQueryPoolItems(\n httpClient: HttpClient\n): TypedQueryPoolItemsSignature {\n return (query: PoolItemQuery, options?: QueryPoolItemsOptions) =>\n universalTypedQueryPoolItems(\n query,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryPoolItemsSignature {\n /** */\n (query: PoolItemQuery, options?: QueryPoolItemsOptions): Promise<\n NonNullablePaths<\n QueryPoolItemsResponse,\n | `poolItems`\n | `poolItems.${number}._id`\n | `poolItems.${number}.externalId`\n | `poolItems.${number}.category`\n | `poolItems.${number}.providerAppId`\n | `poolItems.${number}.namespace`\n | `poolItems.${number}.poolId`\n | `poolItems.${number}.itemSetId`\n | `poolItems.${number}.beneficiary.anonymousVisitorId`\n | `poolItems.${number}.beneficiary.memberId`\n | `poolItems.${number}.beneficiary.wixUserId`\n | `poolItems.${number}.pool.displayName`\n | `poolItems.${number}.pool.status`\n | `poolItems.${number}.pool.creditConfiguration.amount`\n | `poolItems.${number}.program._id`\n | `poolItems.${number}.programDefinition._id`\n | `poolItems.${number}.itemId`\n | `poolItems.${number}.benefitInfo.benefitKey`\n | `poolItems.${number}.benefitKey`\n | `poolItems.${number}.itemSearchKey`,\n 6\n >\n >;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n BalanceInfo,\n BenefitInfo,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n CreditConfiguration,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeleteSoftDeletedPoolItemRequest,\n DeleteSoftDeletedPoolItemResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n IdentificationData,\n IdentificationDataIdOneOf,\n IdentityType,\n InvalidatePoolItemsRequest,\n InvalidatePoolItemsRequestSourceOneOf,\n InvalidatePoolItemsResponse,\n ItemInfo,\n ItemScope,\n MessageEnvelope,\n PoolInfo,\n PoolItem,\n PoolItemQuerySpec,\n PoolItemRemoved,\n PoolItemsQueryBuilder,\n PoolItemsQueryResult,\n PoolScope,\n PoolStatus,\n ProgramDefinitionInfo,\n ProgramInfo,\n QueryPoolItemsOptions,\n QueryPoolItemsRequest,\n QueryPoolItemsResponse,\n RequestedFields,\n RestoreInfo,\n SortOrder,\n Sorting,\n WebhookIdentityType,\n utils,\n} from './benefit-programs-v1-pool-item-pool-items.universal.js';\n","import {\n queryPoolItems as publicQueryPoolItems,\n typedQueryPoolItems as publicTypedQueryPoolItems,\n} from './benefit-programs-v1-pool-item-pool-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 PoolItemQuery,\n PoolItemsQueryBuilder,\n QueryPoolItemsOptions,\n typedQueryPoolItems as universalTypedQueryPoolItems,\n} from './benefit-programs-v1-pool-item-pool-items.universal.js';\n\nfunction customQueryPoolItems(httpClient: HttpClient) {\n const router = /*#__PURE__*/ createQueryOverloadRouter({\n builderQueryFunction: (options?: QueryPoolItemsOptions) =>\n publicQueryPoolItems(httpClient)(options),\n typedQueryFunction: (\n query: PoolItemQuery,\n options?: QueryPoolItemsOptions\n ) => publicTypedQueryPoolItems(httpClient)(query, options),\n hasOptionsParameter: true,\n });\n\n function overloadedQuery(\n query: PoolItemQuery,\n options?: QueryPoolItemsOptions\n ): ReturnType<typeof universalTypedQueryPoolItems>;\n function overloadedQuery(\n options?: QueryPoolItemsOptions\n ): PoolItemsQueryBuilder;\n function overloadedQuery(\n queryOrOptions?: PoolItemQuery | QueryPoolItemsOptions,\n options?: QueryPoolItemsOptions\n ): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const queryPoolItems: MaybeContext<\n BuildRESTFunction<typeof customQueryPoolItems> & typeof customQueryPoolItems\n> = /*#__PURE__*/ createRESTModule(customQueryPoolItems);\n\nexport {\n IdentityType,\n PoolStatus,\n SortOrder,\n RequestedFields,\n WebhookIdentityType,\n} from './benefit-programs-v1-pool-item-pool-items.universal.js';\nexport {\n PoolItem,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n PoolInfo,\n CreditConfiguration,\n ProgramInfo,\n ProgramDefinitionInfo,\n ItemInfo,\n BenefitInfo,\n BalanceInfo,\n PoolItemRemoved,\n QueryPoolItemsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryPoolItemsResponse,\n CursorPagingMetadata,\n Cursors,\n InvalidatePoolItemsRequest,\n InvalidatePoolItemsRequestSourceOneOf,\n PoolScope,\n ItemScope,\n InvalidatePoolItemsResponse,\n DeleteSoftDeletedPoolItemRequest,\n DeleteSoftDeletedPoolItemResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n QueryPoolItemsOptions,\n PoolItemsQueryResult,\n PoolItemsQueryBuilder,\n PoolItemQuerySpec,\n} from './benefit-programs-v1-pool-item-pool-items.universal.js';\nexport { utils } from './benefit-programs-v1-pool-item-pool-items.universal.js';\nexport {\n IdentityTypeWithLiterals,\n PoolStatusWithLiterals,\n SortOrderWithLiterals,\n RequestedFieldsWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CommonQueryWithEntityContext,\n PoolItemQuery,\n} from './benefit-programs-v1-pool-item-pool-items.universal.js';\n"],"mappings":"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","names":["queryPoolItems","payload","import_transform_paths","IdentityType","PoolStatus","SortOrder","RequestedFields","WebhookIdentityType","queryPoolItems","sdkTransformError","queryPoolItems","typedQueryPoolItems","import_rest_modules","queryPoolItems","typedQueryPoolItems"]}
@@ -755,10 +755,6 @@ interface PoolItemsQueryBuilder {
755
755
  * @param string - String to compare against. Case-insensitive.
756
756
  */
757
757
  startsWith: (propertyName: '_id' | 'externalId' | 'category' | 'providerAppId' | 'namespace' | 'poolId' | 'programId' | 'externalProgramId' | 'programDefinitionId' | 'externalProgramDefinitionId' | 'poolDefinitionId' | 'itemSetId' | 'beneficiary.memberId' | 'program.id' | 'programDefinition.id' | 'benefitKey' | 'itemSearchKey', value: string) => PoolItemsQueryBuilder;
758
- /** @param propertyName - Property whose value is compared with `values`.
759
- * @param values - List of values to compare against.
760
- */
761
- hasSome: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'providerAppId' | 'namespace' | 'poolId' | 'programId' | 'externalProgramId' | 'programDefinitionId' | 'externalProgramDefinitionId' | 'poolDefinitionId' | 'itemSetId' | 'beneficiary.memberId' | 'program.id' | 'programDefinition.id' | 'benefitKey' | 'itemSearchKey', value: any[]) => PoolItemsQueryBuilder;
762
758
  in: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'providerAppId' | 'namespace' | 'poolId' | 'programId' | 'externalProgramId' | 'programDefinitionId' | 'externalProgramDefinitionId' | 'poolDefinitionId' | 'itemSetId' | 'beneficiary.memberId' | 'program.id' | 'programDefinition.id' | 'benefitKey' | 'itemSearchKey', value: any) => PoolItemsQueryBuilder;
763
759
  exists: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'providerAppId' | 'namespace' | 'poolId' | 'programId' | 'externalProgramId' | 'programDefinitionId' | 'externalProgramDefinitionId' | 'poolDefinitionId' | 'itemSetId' | 'beneficiary.memberId' | 'program.id' | 'programDefinition.id' | 'benefitKey' | 'itemSearchKey', value: boolean) => PoolItemsQueryBuilder;
764
760
  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
@@ -851,11 +847,7 @@ type PoolItemQuery = {
851
847
  }[];
852
848
  };
853
849
  declare const utils: {
854
- query: {
855
- QueryBuilder: () => _wix_sdk_types.QueryBuilder<PoolItem, PoolItemQuerySpec, PoolItemQuery>;
856
- Filter: _wix_sdk_types.FilterFactory<PoolItem, PoolItemQuerySpec>;
857
- Sort: _wix_sdk_types.SortFactory<PoolItemQuerySpec>;
858
- };
850
+ query: _wix_sdk_types.QueryHelpers<PoolItem, PoolItemQuerySpec, PoolItemQuery>;
859
851
  };
860
852
 
861
853
  export { type AccountInfo, type ActionEvent, type BalanceInfo, type BenefitInfo, type CommonIdentificationData, type CommonIdentificationDataIdOneOf, type CommonQueryWithEntityContext, type CreditConfiguration, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteSoftDeletedPoolItemRequest, type DeleteSoftDeletedPoolItemResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type IdentificationData, type IdentificationDataIdOneOf, IdentityType, type IdentityTypeWithLiterals, type InvalidatePoolItemsRequest, type InvalidatePoolItemsRequestSourceOneOf, type InvalidatePoolItemsResponse, type ItemInfo, type ItemScope, type MessageEnvelope, type PoolInfo, type PoolItem, type PoolItemQuery, type PoolItemQuerySpec, type PoolItemRemoved, type PoolItemsQueryBuilder, type PoolItemsQueryResult, type PoolScope, PoolStatus, type PoolStatusWithLiterals, type ProgramDefinitionInfo, type ProgramInfo, type QueryPoolItemsOptions, type QueryPoolItemsRequest, type QueryPoolItemsResponse, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, queryPoolItems, typedQueryPoolItems, utils };
@@ -209,9 +209,7 @@ async function typedQueryPoolItems(query, options) {
209
209
  }
210
210
  }
211
211
  var utils = {
212
- query: {
213
- ...(0, import_query_builder_utils.createQueryUtils)()
214
- }
212
+ query: /* @__PURE__ */ (0, import_query_builder_utils.createQueryUtils)()
215
213
  };
216
214
  // Annotate the CommonJS export names for ESM import in node:
217
215
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.typings.ts","../../src/benefit-programs-v1-pool-item-pool-items.universal.ts","../../src/benefit-programs-v1-pool-item-pool-items.http.ts"],"sourcesContent":["export * from './src/benefit-programs-v1-pool-item-pool-items.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixBenefitProgramsV1PoolItem from './benefit-programs-v1-pool-item-pool-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\n/**\n * A pool item represents a specific catalog item that a beneficiary can access as part of a benefit in their pool. Pool items are created automatically when items become available to a beneficiary, and they're removed when the items are revoked.\n *\n * Each pool item links a beneficiary's pool to a single catalog item, surfacing pricing, display details, and references to the underlying pool, program, pool definition, and program definition.\n */\nexport interface PoolItem {\n /**\n * Pool item ID. Generated deterministically from `poolId` and `itemId`.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Revision number, which increments by 1 each time the pool item is updated.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the pool item was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the pool 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 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. For example, `classes`, `posts`, or `groups`.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string;\n /**\n * ID of the application that provides the benefit items. Each item's `externalId` 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 let you distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string;\n /**\n * ID of the pool that contains this item. A pool is the runtime container of benefits and items provisioned for a beneficiary.\n * @format GUID\n * @immutable\n * @readonly\n */\n poolId?: string;\n /**\n * ID of the program that contains this pool item. The program is the runtime instance of a program definition for a specific beneficiary.\n * @format GUID\n * @immutable\n * @readonly\n */\n programId?: string | null;\n /**\n * External program ID assigned by the provider.\n * @format GUID\n * @readonly\n */\n externalProgramId?: string | null;\n /**\n * ID of the program definition that's the template for this pool item's program.\n * @format GUID\n * @immutable\n * @readonly\n */\n programDefinitionId?: string | null;\n /**\n * External program definition ID assigned by the provider.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalProgramDefinitionId?: string | null;\n /**\n * ID of the pool definition that's the template for this pool item's pool.\n * @format GUID\n * @immutable\n * @readonly\n */\n poolDefinitionId?: string | null;\n /**\n * Internal grouping identifier for this benefit's item set. Use `poolId` together with `benefitKey` to identify a benefit - `itemSetId` is an implementation detail.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string;\n /**\n * Beneficiary of the pool - the member, contact, or visitor who holds this pool item.\n * @readonly\n * @immutable\n */\n beneficiary?: CommonIdentificationData;\n /**\n * Pool details, including display name and description.\n *\n * Returned only when `POOL` is included in the `fields` request parameter.\n * @readonly\n */\n pool?: PoolInfo;\n /**\n * Program details - `id`, `externalId`, and `displayName`.\n *\n * Returned only when `PROGRAM` is included in the `fields` request parameter.\n * @readonly\n */\n program?: ProgramInfo;\n /**\n * Program definition that includes this item as an accessible benefit.\n *\n * Returned only when `PROGRAM_DEFINITION` is included in the `fields` request parameter.\n * @readonly\n */\n programDefinition?: ProgramDefinitionInfo;\n /**\n * Item ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemId?: string;\n /**\n * Display name for the catalog item.\n *\n * Returned only when `ITEM` is included in the `fields` request parameter.\n * @readonly\n */\n itemInfo?: ItemInfo;\n /**\n * Pricing and display information for the associated benefit, including credit price, name, and description.\n *\n * Returned only when `BENEFIT` is included in the `fields` request parameter.\n * @readonly\n */\n benefitInfo?: BenefitInfo;\n /**\n * Credit balance of the pool that contains this item.\n *\n * Returned only when `BALANCE` is included in the `fields` request parameter.\n * @readonly\n */\n balance?: BalanceInfo;\n /**\n * Unique identifier for the benefit that grants access to 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 `providerAppId`, `category`, and `externalId` 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 item has been removed\n * @readonly\n */\n removed?: boolean | null;\n}\n\nexport interface CommonIdentificationData\n extends CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor that hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site member.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n}\n\n/** @oneof */\nexport interface CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor that hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site member.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n}\n\nexport enum IdentityType {\n /** Unknown type. This value is not used. */\n UNKNOWN = 'UNKNOWN',\n /** A site visitor who has not logged in. */\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n /** A logged-in site member. */\n MEMBER = 'MEMBER',\n /** A Wix account holder, such as a site owner or contributor. */\n WIX_USER = 'WIX_USER',\n}\n\n/** @enumType */\nexport type IdentityTypeWithLiterals =\n | IdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER';\n\n/** Pool's display details. */\nexport interface PoolInfo {\n /**\n * Pool's display name. Often matches the name on the associated pool definition.\n * @maxLength 64\n */\n displayName?: string;\n /**\n * Pool description.\n * @maxLength 450\n */\n description?: string | null;\n /**\n * Status of the pool that contains this item.\n * @readonly\n */\n status?: PoolStatusWithLiterals;\n /**\n * Credit configuration of the pool, when credit-based pricing is enabled.\n * @readonly\n */\n creditConfiguration?: CreditConfiguration;\n}\n\nexport enum PoolStatus {\n /** Pool is active. */\n ACTIVE = 'ACTIVE',\n /** Pool is paused. It can be resumed. */\n PAUSED = 'PAUSED',\n /** Pool is ended. It can't be resumed. */\n ENDED = 'ENDED',\n /** Pool provisioning is in progress. This status exists for a short time during processing. */\n PROVISIONING = 'PROVISIONING',\n /** Pool renewing is in progress. This status exists for a short time during processing. */\n RENEWING = 'RENEWING',\n /** Pool is pending */\n PENDING = 'PENDING',\n}\n\n/** @enumType */\nexport type PoolStatusWithLiterals =\n | PoolStatus\n | 'ACTIVE'\n | 'PAUSED'\n | 'ENDED'\n | 'PROVISIONING'\n | 'RENEWING'\n | 'PENDING';\n\n/** Credit settings for a pool. */\nexport interface CreditConfiguration {\n /**\n * Number of credits configured for the pool.\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\n/** Program's identifying details. */\nexport interface ProgramInfo {\n /**\n * Program ID.\n * @format GUID\n */\n _id?: string;\n /**\n * External program ID assigned by the provider.\n * @format GUID\n */\n externalId?: string | null;\n /**\n * Program's display name.\n * @maxLength 64\n */\n displayName?: string | null;\n}\n\n/** Program definition's display details. */\nexport interface ProgramDefinitionInfo {\n /**\n * Program definition ID.\n * @format GUID\n */\n _id?: string;\n /**\n * External program definition ID assigned by the provider.\n * @format GUID\n */\n externalId?: string | null;\n /**\n * Program definition's display name.\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * Program definition description.\n * @maxLength 450\n */\n description?: string | null;\n}\n\n/** Catalog item's display details. */\nexport interface ItemInfo {\n /**\n * Item's display name.\n * @maxLength 400\n */\n displayName?: string | null;\n}\n\n/** Pricing and display information for a benefit. */\nexport interface BenefitInfo {\n /**\n * Cost of the benefit in credits. The cost is the same for all items in this benefit.\n *\n * Credits are a configurable unit defined on the parent pool definition. The unit type is set in the pool definition's credit configuration. Absent when no credit-based pricing is configured for this benefit.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n price?: string | null;\n /**\n * Unique identifier for this benefit. Same value as `poolItem.benefitKey`.\n * @maxLength 64\n */\n benefitKey?: string;\n /**\n * Benefit's display name.\n * @maxLength 40\n */\n displayName?: string | null;\n /**\n * Benefit description.\n * @maxLength 255\n */\n description?: string | null;\n}\n\n/** Credit balance details for a pool. */\nexport interface BalanceInfo {\n /**\n * Number of available credits in the pool.\n *\n * Credits are a configurable unit defined on the parent pool definition. Absent when no credit-based pricing is configured for the pool.\n * @decimalValue options { gte:0, maxScale:4 }\n * @readonly\n */\n available?: string | null;\n}\n\n/** Payload for the `PoolItemRemoved` action event. */\nexport interface PoolItemRemoved {\n /** Pool item that was removed from its benefit. */\n poolItem?: PoolItem;\n}\n\nexport interface QueryPoolItemsRequest {\n /** Query options. */\n query?: CursorQuery;\n /**\n * Optional enrichments to include in the response.\n * @maxSize 6\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 `pool` field with the pool's display name and description. */\n POOL = 'POOL',\n /** Populates the `program` field with the program's display name. */\n PROGRAM = 'PROGRAM',\n /** Populates the `programDefinition` field with the program definition's display name and description. */\n PROGRAM_DEFINITION = 'PROGRAM_DEFINITION',\n /** Populates the `itemInfo` field with the catalog item's display name. */\n ITEM = 'ITEM',\n /** Populates the `benefitInfo` field with the benefit's credit price, name, and description. */\n BENEFIT = 'BENEFIT',\n /** Populates the `balance` field with the pool's available credit balance. */\n BALANCE = 'BALANCE',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'POOL'\n | 'PROGRAM'\n | 'PROGRAM_DEFINITION'\n | 'ITEM'\n | 'BENEFIT'\n | 'BALANCE';\n\nexport interface QueryPoolItemsResponse {\n /** List of retrieved pool items. */\n poolItems?: PoolItem[];\n /** Paging metadata. */\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 InvalidatePoolItemsRequest\n extends InvalidatePoolItemsRequestSourceOneOf {\n /** Invalidate pool items for one pool, optionally narrowed to specific item sets. */\n pool?: PoolScope;\n /** Invalidate pool items materialized from a specific item across every subscribing pool. */\n item?: ItemScope;\n}\n\n/** @oneof */\nexport interface InvalidatePoolItemsRequestSourceOneOf {\n /** Invalidate pool items for one pool, optionally narrowed to specific item sets. */\n pool?: PoolScope;\n /** Invalidate pool items materialized from a specific item across every subscribing pool. */\n item?: ItemScope;\n}\n\nexport interface PoolScope {\n /**\n * ID of the pool whose items are invalidated.\n * @format GUID\n */\n poolId?: string;\n /**\n * IDs of the item sets to invalidate. When empty, items for all benefits in the pool are invalidated.\n * @maxSize 10\n * @format GUID\n */\n itemSetIds?: string[];\n /**\n * When `true`, only the pool's items are invalidated and the pool's benefits are left untouched.\n * When `false` (default), the pool's benefits are invalidated first, then its items - the two are nested in a single call.\n */\n skipBenefitInvalidation?: boolean;\n}\n\nexport interface ItemScope {\n /**\n * ID of the item to invalidate across every pool that references its item set.\n * @format GUID\n */\n itemId?: string;\n}\n\nexport interface InvalidatePoolItemsResponse {}\n\nexport interface DeleteSoftDeletedPoolItemRequest {\n /**\n * ID of the soft-deleted pool item to hard-delete.\n * @format GUID\n */\n poolItemId?: string;\n}\n\nexport interface DeleteSoftDeletedPoolItemResponse {}\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/**\n * Retrieves a list of up to 1,000 pool items, based on the specified paging, filtering, and sorting.\n *\n * When called by a logged-in member without an explicit `beneficiary.memberId` filter, the response is automatically scoped to the calling member. App callers must include a `beneficiary.memberId` filter to scope the response to a specific beneficiary.\n *\n * Query Pool Items runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `cursorPaging.limit` is `50`\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n * @public\n * @permissionId benefit_programs:v1:pool_item:query_pool_items\n * @permissionId BENEFIT_PROGRAMS.POOL_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool_item.PoolItemService.QueryPoolItems\n */\nexport function queryPoolItems(\n options?: QueryPoolItemsOptions\n): PoolItemsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n PoolItem,\n 'CURSOR',\n QueryPoolItemsRequest,\n QueryPoolItemsResponse\n >({\n func: async (payload: QueryPoolItemsRequest) => {\n const reqOpts = ambassadorWixBenefitProgramsV1PoolItem.queryPoolItems({\n ...payload,\n ...(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: QueryPoolItemsRequest['query']) => {\n const args = [query, options] as [\n QueryPoolItemsRequest['query'],\n QueryPoolItemsOptions\n ];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryPoolItemsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.poolItems,\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 QueryPoolItemsOptions {\n /**\n * Optional enrichments to include in the response.\n * @maxSize 6\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 PoolItemsQueryResult extends QueryCursorResult {\n items: PoolItem[];\n query: PoolItemsQueryBuilder;\n next: () => Promise<PoolItemsQueryResult>;\n prev: () => Promise<PoolItemsQueryResult>;\n}\n\nexport interface PoolItemsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n */\n startsWith: (\n propertyName:\n | '_id'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: string\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasSome: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any[]\n ) => PoolItemsQueryBuilder;\n in: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n exists: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: boolean\n ) => PoolItemsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey'\n >\n ) => PoolItemsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n descending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey'\n >\n ) => PoolItemsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => PoolItemsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => PoolItemsQueryBuilder;\n find: () => Promise<PoolItemsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.benefit_programs.v1.pool_item.PoolItemService.QueryPoolItems\n * @requiredField query\n */\nexport async function typedQueryPoolItems(\n query: PoolItemQuery,\n options?: QueryPoolItemsOptions\n): Promise<\n NonNullablePaths<\n QueryPoolItemsResponse,\n | `poolItems`\n | `poolItems.${number}._id`\n | `poolItems.${number}.externalId`\n | `poolItems.${number}.category`\n | `poolItems.${number}.providerAppId`\n | `poolItems.${number}.namespace`\n | `poolItems.${number}.poolId`\n | `poolItems.${number}.itemSetId`\n | `poolItems.${number}.beneficiary.anonymousVisitorId`\n | `poolItems.${number}.beneficiary.memberId`\n | `poolItems.${number}.beneficiary.wixUserId`\n | `poolItems.${number}.pool.displayName`\n | `poolItems.${number}.pool.status`\n | `poolItems.${number}.pool.creditConfiguration.amount`\n | `poolItems.${number}.program._id`\n | `poolItems.${number}.programDefinition._id`\n | `poolItems.${number}.itemId`\n | `poolItems.${number}.benefitInfo.benefitKey`\n | `poolItems.${number}.benefitKey`\n | `poolItems.${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 ambassadorWixBenefitProgramsV1PoolItem.queryPoolItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PoolItemQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: [\n '_createdDate',\n '_id',\n 'beneficiary.memberId',\n 'benefitKey',\n 'category',\n 'externalId',\n 'externalProgramDefinitionId',\n 'externalProgramId',\n 'itemSearchKey',\n 'itemSetId',\n 'namespace',\n 'poolDefinitionId',\n 'poolId',\n 'programDefinitionId',\n 'programId',\n 'providerAppId'\n ];\n operators: '*';\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n PoolItem,\n PoolItemQuerySpec\n>;\nexport type PoolItemQuery = {\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<PoolItem, PoolItemQuerySpec, PoolItemQuery>(),\n },\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 resolveWixBenefitProgramsV1PoolItemPoolItemServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/benefit-programs/v1/pool-items',\n destPath: '/v1/pool-items',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/pool-items',\n destPath: '/v1/pool-items',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/pool-items',\n destPath: '/v1/pool-items',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_pool-items';\n\n/**\n * Retrieves a list of up to 1,000 pool items, based on the specified paging, filtering, and sorting.\n *\n * When called by a logged-in member without an explicit `beneficiary.memberId` filter, the response is automatically scoped to the calling member. App callers must include a `beneficiary.memberId` filter to scope the response to a specific beneficiary.\n *\n * Query Pool Items runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `cursorPaging.limit` is `50`\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n */\nexport function queryPoolItems(payload: object): RequestOptionsFactory<any> {\n function __queryPoolItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_item.PoolItemService.QueryPoolItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolItemPoolItemServiceUrl({\n protoPath: '/v1/pool-items/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'poolItems.createdDate' },\n { path: 'poolItems.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryPoolItems;\n}\n"],"mappings":"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","names":["queryPoolItems","payload","import_transform_paths","IdentityType","PoolStatus","SortOrder","RequestedFields","WebhookIdentityType","queryPoolItems","sdkTransformError"]}
1
+ {"version":3,"sources":["../../index.typings.ts","../../src/benefit-programs-v1-pool-item-pool-items.universal.ts","../../src/benefit-programs-v1-pool-item-pool-items.http.ts"],"sourcesContent":["export * from './src/benefit-programs-v1-pool-item-pool-items.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixBenefitProgramsV1PoolItem from './benefit-programs-v1-pool-item-pool-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\n/**\n * A pool item represents a specific catalog item that a beneficiary can access as part of a benefit in their pool. Pool items are created automatically when items become available to a beneficiary, and they're removed when the items are revoked.\n *\n * Each pool item links a beneficiary's pool to a single catalog item, surfacing pricing, display details, and references to the underlying pool, program, pool definition, and program definition.\n */\nexport interface PoolItem {\n /**\n * Pool item ID. Generated deterministically from `poolId` and `itemId`.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Revision number, which increments by 1 each time the pool item is updated.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the pool item was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the pool 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 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. For example, `classes`, `posts`, or `groups`.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string;\n /**\n * ID of the application that provides the benefit items. Each item's `externalId` 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 let you distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string;\n /**\n * ID of the pool that contains this item. A pool is the runtime container of benefits and items provisioned for a beneficiary.\n * @format GUID\n * @immutable\n * @readonly\n */\n poolId?: string;\n /**\n * ID of the program that contains this pool item. The program is the runtime instance of a program definition for a specific beneficiary.\n * @format GUID\n * @immutable\n * @readonly\n */\n programId?: string | null;\n /**\n * External program ID assigned by the provider.\n * @format GUID\n * @readonly\n */\n externalProgramId?: string | null;\n /**\n * ID of the program definition that's the template for this pool item's program.\n * @format GUID\n * @immutable\n * @readonly\n */\n programDefinitionId?: string | null;\n /**\n * External program definition ID assigned by the provider.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalProgramDefinitionId?: string | null;\n /**\n * ID of the pool definition that's the template for this pool item's pool.\n * @format GUID\n * @immutable\n * @readonly\n */\n poolDefinitionId?: string | null;\n /**\n * Internal grouping identifier for this benefit's item set. Use `poolId` together with `benefitKey` to identify a benefit - `itemSetId` is an implementation detail.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string;\n /**\n * Beneficiary of the pool - the member, contact, or visitor who holds this pool item.\n * @readonly\n * @immutable\n */\n beneficiary?: CommonIdentificationData;\n /**\n * Pool details, including display name and description.\n *\n * Returned only when `POOL` is included in the `fields` request parameter.\n * @readonly\n */\n pool?: PoolInfo;\n /**\n * Program details - `id`, `externalId`, and `displayName`.\n *\n * Returned only when `PROGRAM` is included in the `fields` request parameter.\n * @readonly\n */\n program?: ProgramInfo;\n /**\n * Program definition that includes this item as an accessible benefit.\n *\n * Returned only when `PROGRAM_DEFINITION` is included in the `fields` request parameter.\n * @readonly\n */\n programDefinition?: ProgramDefinitionInfo;\n /**\n * Item ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemId?: string;\n /**\n * Display name for the catalog item.\n *\n * Returned only when `ITEM` is included in the `fields` request parameter.\n * @readonly\n */\n itemInfo?: ItemInfo;\n /**\n * Pricing and display information for the associated benefit, including credit price, name, and description.\n *\n * Returned only when `BENEFIT` is included in the `fields` request parameter.\n * @readonly\n */\n benefitInfo?: BenefitInfo;\n /**\n * Credit balance of the pool that contains this item.\n *\n * Returned only when `BALANCE` is included in the `fields` request parameter.\n * @readonly\n */\n balance?: BalanceInfo;\n /**\n * Unique identifier for the benefit that grants access to 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 `providerAppId`, `category`, and `externalId` 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 item has been removed\n * @readonly\n */\n removed?: boolean | null;\n /**\n * Monotonic counter incremented on every change, including system/materialization updates that do not bump revision.\n * @internal\n * @readonly\n */\n poolChangesCounter?: string | null;\n /**\n * Last revision number of the corresponding pool definition that this entity was created from\n * @internal\n * @readonly\n */\n poolRevision?: string | null;\n /**\n * Monotonic counter incremented on every change, including system/materialization updates that do not bump revision.\n * @internal\n * @readonly\n */\n itemChangesCounter?: string | null;\n /**\n * Last revision number of the corresponding item that this entity was created from\n * @internal\n * @readonly\n */\n itemRevision?: string | null;\n}\n\nexport interface CommonIdentificationData\n extends CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor that hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site member.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n /**\n * Identity type.\n * @internal\n * @readonly\n */\n identityType?: IdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor that hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site member.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n}\n\nexport enum IdentityType {\n /** Unknown type. This value is not used. */\n UNKNOWN = 'UNKNOWN',\n /** A site visitor who has not logged in. */\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n /** A logged-in site member. */\n MEMBER = 'MEMBER',\n /** A Wix account holder, such as a site owner or contributor. */\n WIX_USER = 'WIX_USER',\n}\n\n/** @enumType */\nexport type IdentityTypeWithLiterals =\n | IdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER';\n\n/** Pool's display details. */\nexport interface PoolInfo {\n /**\n * Pool's display name. Often matches the name on the associated pool definition.\n * @maxLength 64\n */\n displayName?: string;\n /**\n * Pool description.\n * @maxLength 450\n */\n description?: string | null;\n /**\n * Status of the pool that contains this item.\n * @readonly\n */\n status?: PoolStatusWithLiterals;\n /**\n * Credit configuration of the pool, when credit-based pricing is enabled.\n * @readonly\n */\n creditConfiguration?: CreditConfiguration;\n}\n\nexport enum PoolStatus {\n /** Pool is active. */\n ACTIVE = 'ACTIVE',\n /** Pool is paused. It can be resumed. */\n PAUSED = 'PAUSED',\n /** Pool is ended. It can't be resumed. */\n ENDED = 'ENDED',\n /** Pool provisioning is in progress. This status exists for a short time during processing. */\n PROVISIONING = 'PROVISIONING',\n /** Pool renewing is in progress. This status exists for a short time during processing. */\n RENEWING = 'RENEWING',\n /** Pool is pending */\n PENDING = 'PENDING',\n}\n\n/** @enumType */\nexport type PoolStatusWithLiterals =\n | PoolStatus\n | 'ACTIVE'\n | 'PAUSED'\n | 'ENDED'\n | 'PROVISIONING'\n | 'RENEWING'\n | 'PENDING';\n\n/** Credit settings for a pool. */\nexport interface CreditConfiguration {\n /**\n * Number of credits configured for the pool.\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\n/** Program's identifying details. */\nexport interface ProgramInfo {\n /**\n * Program ID.\n * @format GUID\n */\n _id?: string;\n /**\n * External program ID assigned by the provider.\n * @format GUID\n */\n externalId?: string | null;\n /**\n * Program's display name.\n * @maxLength 64\n */\n displayName?: string | null;\n}\n\n/** Program definition's display details. */\nexport interface ProgramDefinitionInfo {\n /**\n * Program definition ID.\n * @format GUID\n */\n _id?: string;\n /**\n * External program definition ID assigned by the provider.\n * @format GUID\n */\n externalId?: string | null;\n /**\n * Program definition's display name.\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * Program definition description.\n * @maxLength 450\n */\n description?: string | null;\n}\n\n/** Catalog item's display details. */\nexport interface ItemInfo {\n /**\n * Item's display name.\n * @maxLength 400\n */\n displayName?: string | null;\n}\n\n/** Pricing and display information for a benefit. */\nexport interface BenefitInfo {\n /**\n * Cost of the benefit in credits. The cost is the same for all items in this benefit.\n *\n * Credits are a configurable unit defined on the parent pool definition. The unit type is set in the pool definition's credit configuration. Absent when no credit-based pricing is configured for this benefit.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n price?: string | null;\n /**\n * Unique identifier for this benefit. Same value as `poolItem.benefitKey`.\n * @maxLength 64\n */\n benefitKey?: string;\n /**\n * Benefit's display name.\n * @maxLength 40\n */\n displayName?: string | null;\n /**\n * Benefit description.\n * @maxLength 255\n */\n description?: string | null;\n}\n\n/** Credit balance details for a pool. */\nexport interface BalanceInfo {\n /**\n * Number of available credits in the pool.\n *\n * Credits are a configurable unit defined on the parent pool definition. Absent when no credit-based pricing is configured for the pool.\n * @decimalValue options { gte:0, maxScale:4 }\n * @readonly\n */\n available?: string | null;\n}\n\n/** Payload for the `PoolItemRemoved` action event. */\nexport interface PoolItemRemoved {\n /** Pool item that was removed from its benefit. */\n poolItem?: PoolItem;\n}\n\nexport interface QueryPoolItemsRequest {\n /** Query options. */\n query?: CursorQuery;\n /**\n * Optional enrichments to include in the response.\n * @maxSize 6\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 * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by\n * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.\n *\n * If multiple filters are provided, they are combined with AND operator.\n *\n * Example:\n * Given we have document like {\"id\": \"1\", \"nestedField\": [{\"price\": 10, \"region\": \"EU\"}, {\"price\": 20, \"region\": \"US\"}]}\n * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be\n * { fieldName: \"nestedField.price\", \"select_items_by\": [{\"nestedField.region\": \"US\"}] }\n * @internal\n * @maxSize 10\n */\n selectItemsBy?: Record<string, any>[] | null;\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 `pool` field with the pool's display name and description. */\n POOL = 'POOL',\n /** Populates the `program` field with the program's display name. */\n PROGRAM = 'PROGRAM',\n /** Populates the `programDefinition` field with the program definition's display name and description. */\n PROGRAM_DEFINITION = 'PROGRAM_DEFINITION',\n /** Populates the `itemInfo` field with the catalog item's display name. */\n ITEM = 'ITEM',\n /** Populates the `benefitInfo` field with the benefit's credit price, name, and description. */\n BENEFIT = 'BENEFIT',\n /** Populates the `balance` field with the pool's available credit balance. */\n BALANCE = 'BALANCE',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'POOL'\n | 'PROGRAM'\n | 'PROGRAM_DEFINITION'\n | 'ITEM'\n | 'BENEFIT'\n | 'BALANCE';\n\nexport interface QueryPoolItemsResponse {\n /** List of retrieved pool items. */\n poolItems?: PoolItem[];\n /** Paging metadata. */\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 InvalidatePoolItemsRequest\n extends InvalidatePoolItemsRequestSourceOneOf {\n /** Invalidate pool items for one pool, optionally narrowed to specific item sets. */\n pool?: PoolScope;\n /** Invalidate pool items materialized from a specific item across every subscribing pool. */\n item?: ItemScope;\n}\n\n/** @oneof */\nexport interface InvalidatePoolItemsRequestSourceOneOf {\n /** Invalidate pool items for one pool, optionally narrowed to specific item sets. */\n pool?: PoolScope;\n /** Invalidate pool items materialized from a specific item across every subscribing pool. */\n item?: ItemScope;\n}\n\nexport interface PoolScope {\n /**\n * ID of the pool whose items are invalidated.\n * @format GUID\n */\n poolId?: string;\n /**\n * IDs of the item sets to invalidate. When empty, items for all benefits in the pool are invalidated.\n * @maxSize 10\n * @format GUID\n */\n itemSetIds?: string[];\n /**\n * When `true`, only the pool's items are invalidated and the pool's benefits are left untouched.\n * When `false` (default), the pool's benefits are invalidated first, then its items - the two are nested in a single call.\n */\n skipBenefitInvalidation?: boolean;\n}\n\nexport interface ItemScope {\n /**\n * ID of the item to invalidate across every pool that references its item set.\n * @format GUID\n */\n itemId?: string;\n}\n\nexport interface InvalidatePoolItemsResponse {}\n\nexport interface DeleteSoftDeletedPoolItemRequest {\n /**\n * ID of the soft-deleted pool item to hard-delete.\n * @format GUID\n */\n poolItemId?: string;\n}\n\nexport interface DeleteSoftDeletedPoolItemResponse {}\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/**\n * Retrieves a list of up to 1,000 pool items, based on the specified paging, filtering, and sorting.\n *\n * When called by a logged-in member without an explicit `beneficiary.memberId` filter, the response is automatically scoped to the calling member. App callers must include a `beneficiary.memberId` filter to scope the response to a specific beneficiary.\n *\n * Query Pool Items runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `cursorPaging.limit` is `50`\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n * @public\n * @permissionId benefit_programs:v1:pool_item:query_pool_items\n * @permissionId BENEFIT_PROGRAMS.POOL_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool_item.PoolItemService.QueryPoolItems\n */\nexport function queryPoolItems(\n options?: QueryPoolItemsOptions\n): PoolItemsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n PoolItem,\n 'CURSOR',\n QueryPoolItemsRequest,\n QueryPoolItemsResponse\n >({\n func: async (payload: QueryPoolItemsRequest) => {\n const reqOpts = ambassadorWixBenefitProgramsV1PoolItem.queryPoolItems({\n ...payload,\n ...(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: QueryPoolItemsRequest['query']) => {\n const args = [query, options] as [\n QueryPoolItemsRequest['query'],\n QueryPoolItemsOptions\n ];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryPoolItemsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.poolItems,\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 QueryPoolItemsOptions {\n /**\n * Optional enrichments to include in the response.\n * @maxSize 6\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 PoolItemsQueryResult extends QueryCursorResult {\n items: PoolItem[];\n query: PoolItemsQueryBuilder;\n next: () => Promise<PoolItemsQueryResult>;\n prev: () => Promise<PoolItemsQueryResult>;\n}\n\nexport interface PoolItemsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n */\n startsWith: (\n propertyName:\n | '_id'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: string\n ) => PoolItemsQueryBuilder;\n in: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n exists: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey',\n value: boolean\n ) => PoolItemsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey'\n >\n ) => PoolItemsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n descending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemSearchKey'\n >\n ) => PoolItemsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => PoolItemsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => PoolItemsQueryBuilder;\n find: () => Promise<PoolItemsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.benefit_programs.v1.pool_item.PoolItemService.QueryPoolItems\n * @requiredField query\n */\nexport async function typedQueryPoolItems(\n query: PoolItemQuery,\n options?: QueryPoolItemsOptions\n): Promise<\n NonNullablePaths<\n QueryPoolItemsResponse,\n | `poolItems`\n | `poolItems.${number}._id`\n | `poolItems.${number}.externalId`\n | `poolItems.${number}.category`\n | `poolItems.${number}.providerAppId`\n | `poolItems.${number}.namespace`\n | `poolItems.${number}.poolId`\n | `poolItems.${number}.itemSetId`\n | `poolItems.${number}.beneficiary.anonymousVisitorId`\n | `poolItems.${number}.beneficiary.memberId`\n | `poolItems.${number}.beneficiary.wixUserId`\n | `poolItems.${number}.pool.displayName`\n | `poolItems.${number}.pool.status`\n | `poolItems.${number}.pool.creditConfiguration.amount`\n | `poolItems.${number}.program._id`\n | `poolItems.${number}.programDefinition._id`\n | `poolItems.${number}.itemId`\n | `poolItems.${number}.benefitInfo.benefitKey`\n | `poolItems.${number}.benefitKey`\n | `poolItems.${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 ambassadorWixBenefitProgramsV1PoolItem.queryPoolItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PoolItemQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: [\n '_createdDate',\n '_id',\n 'beneficiary.memberId',\n 'benefitKey',\n 'category',\n 'externalId',\n 'externalProgramDefinitionId',\n 'externalProgramId',\n 'itemSearchKey',\n 'itemSetId',\n 'namespace',\n 'poolDefinitionId',\n 'poolId',\n 'programDefinitionId',\n 'programId',\n 'providerAppId'\n ];\n operators: '*';\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n PoolItem,\n PoolItemQuerySpec\n>;\nexport type PoolItemQuery = {\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 When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by\n a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.\n\n If multiple filters are provided, they are combined with AND operator.\n\n Example:\n Given we have document like {\"id\": \"1\", \"nestedField\": [{\"price\": 10, \"region\": \"EU\"}, {\"price\": 20, \"region\": \"US\"}]}\n and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be\n { fieldName: \"nestedField.price\", \"select_items_by\": [{\"nestedField.region\": \"US\"}] } \n @internal: undefined,\n @maxSize: 10 \n */\n selectItemsBy?:\n | NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['selectItemsBy']\n | null;\n }[];\n};\n\nexport const utils = {\n query: /*#__PURE__*/ createQueryUtils<\n PoolItem,\n PoolItemQuerySpec,\n PoolItemQuery\n >(),\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 resolveWixBenefitProgramsV1PoolItemPoolItemServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/benefit-programs/v1/pool-items',\n destPath: '/v1/pool-items',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/pool-items',\n destPath: '/v1/pool-items',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/pool-items',\n destPath: '/v1/pool-items',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_pool-items';\n\n/**\n * Retrieves a list of up to 1,000 pool items, based on the specified paging, filtering, and sorting.\n *\n * When called by a logged-in member without an explicit `beneficiary.memberId` filter, the response is automatically scoped to the calling member. App callers must include a `beneficiary.memberId` filter to scope the response to a specific beneficiary.\n *\n * Query Pool Items runs with these defaults, which you can override:\n *\n * - `createdDate` is sorted in `DESC` order\n * - `cursorPaging.limit` is `50`\n *\n * To learn about working with Query methods, see [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language), [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging), and [Field Projection](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-field-projection).\n */\nexport function queryPoolItems(payload: object): RequestOptionsFactory<any> {\n function __queryPoolItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_item.PoolItemService.QueryPoolItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolItemPoolItemServiceUrl({\n protoPath: '/v1/pool-items/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'poolItems.createdDate' },\n { path: 'poolItems.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryPoolItems;\n}\n"],"mappings":"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","names":["queryPoolItems","payload","import_transform_paths","IdentityType","PoolStatus","SortOrder","RequestedFields","WebhookIdentityType","queryPoolItems","sdkTransformError"]}