@wix/auto_sdk_benefit-programs_pool-definition-items 1.0.10 → 1.0.12

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 (45) hide show
  1. package/build/cjs/index.d.ts +16 -7
  2. package/build/cjs/index.js +2 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +150 -39
  5. package/build/cjs/index.typings.js +2 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +123 -22
  8. package/build/cjs/meta.js.map +1 -1
  9. package/build/cjs/schemas.d.ts +62 -2
  10. package/build/cjs/schemas.js +131 -11
  11. package/build/cjs/schemas.js.map +1 -1
  12. package/build/es/index.d.mts +16 -7
  13. package/build/es/index.mjs +2 -0
  14. package/build/es/index.mjs.map +1 -1
  15. package/build/es/index.typings.d.mts +150 -39
  16. package/build/es/index.typings.mjs +2 -0
  17. package/build/es/index.typings.mjs.map +1 -1
  18. package/build/es/meta.d.mts +123 -22
  19. package/build/es/meta.mjs.map +1 -1
  20. package/build/es/schemas.d.mts +62 -2
  21. package/build/es/schemas.mjs +131 -11
  22. package/build/es/schemas.mjs.map +1 -1
  23. package/build/internal/cjs/index.d.ts +16 -7
  24. package/build/internal/cjs/index.js +2 -0
  25. package/build/internal/cjs/index.js.map +1 -1
  26. package/build/internal/cjs/index.typings.d.ts +128 -48
  27. package/build/internal/cjs/index.typings.js +2 -0
  28. package/build/internal/cjs/index.typings.js.map +1 -1
  29. package/build/internal/cjs/meta.d.ts +123 -22
  30. package/build/internal/cjs/meta.js.map +1 -1
  31. package/build/internal/cjs/schemas.d.ts +62 -2
  32. package/build/internal/cjs/schemas.js +131 -11
  33. package/build/internal/cjs/schemas.js.map +1 -1
  34. package/build/internal/es/index.d.mts +16 -7
  35. package/build/internal/es/index.mjs +2 -0
  36. package/build/internal/es/index.mjs.map +1 -1
  37. package/build/internal/es/index.typings.d.mts +128 -48
  38. package/build/internal/es/index.typings.mjs +2 -0
  39. package/build/internal/es/index.typings.mjs.map +1 -1
  40. package/build/internal/es/meta.d.mts +123 -22
  41. package/build/internal/es/meta.mjs.map +1 -1
  42. package/build/internal/es/schemas.d.mts +62 -2
  43. package/build/internal/es/schemas.mjs +131 -11
  44. package/build/internal/es/schemas.mjs.map +1 -1
  45. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.http.ts","../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.types.ts","../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.meta.ts"],"sourcesContent":["import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n _: [\n {\n srcPath: '/_api/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_pool-definition-items';\n\n/**\n * Creates a query to retrieve a list of poolDefinitionItems.\n *\n * The `queryPoolDefinitionItems()` method builds a query to retrieve a list of poolDefinitionItems and returns a `PoolDefinitionItemsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the [`find()`](/poolDefinitionItems/poolDefinitionItems-query-builder/find) function.\n *\n * You can refine the query by chaining `PoolDefinitionItemsQueryBuilder` methods onto the query. `PoolDefinitionItemsQueryBuilder` methods enable you to filter, sort, and control the results that `queryPoolDefinitionItems()` returns.\n *\n * The following `PoolDefinitionItemsQueryBuilder` functions are supported for `queryPoolDefinitionItems()`. For a full description of the item object, see the object returned for the [`poolDefinitionItems`](/poolDefinitionItems/poolDefinitionItems-query-result/poolDefinitionItems) property in `PoolDefinitionItemsQueryResult`.\n */\nexport function queryPoolDefinitionItems(\n payload: object\n): RequestOptionsFactory<any> {\n function __queryPoolDefinitionItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_definition_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.QueryPoolDefinitionItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n { protoPath: '/v1/pool-definition-items/query', data: payload, host }\n ),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'poolDefinitionItems.createdDate' },\n { path: 'poolDefinitionItems.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryPoolDefinitionItems;\n}\n\n/** Removes items from a benefit's item set, resolved by pool definition ID and benefit key. */\nexport function removeItemsFromBenefit(\n payload: object\n): RequestOptionsFactory<any> {\n function __removeItemsFromBenefit({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_definition_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.RemoveItemsFromBenefit',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n {\n protoPath: '/v1/pool-definition-items/remove-items-from-benefit',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __removeItemsFromBenefit;\n}\n\n/** Adds items to a benefit's item set, resolved by pool definition ID and benefit key. */\nexport function addItemsToBenefit(payload: object): RequestOptionsFactory<any> {\n function __addItemsToBenefit({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_definition_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.AddItemsToBenefit',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n {\n protoPath: '/v1/pool-definition-items/add-items-to-benefit',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __addItemsToBenefit;\n}\n","export interface PoolDefinitionItem {\n /**\n * Benefit item ID.\n * @format GUID\n * @readonly\n */\n id?: string;\n /**\n * Revision number, which increments by 1 each time the benefit item is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the item.\n *\n * Ignored when creating an item.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the item was created.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the item was updated.\n * @readonly\n */\n updatedDate?: Date | null;\n /**\n * External item ID assigned by the provider of the items.\n *\n * For example, if the benefit items are products, this ID corresponds to the specific product ID in the supplier's system.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalId?: string;\n /**\n * Item category. Groups benefit items together for organization and management purposes. For example, classes, posts, groups.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string;\n /**\n * ID of the application providing the benefit item.\n *\n * ID of the external application supplying the items. Each item's external ID is unique to its respective provider's application.\n * @format GUID\n * @immutable\n * @readonly\n */\n providerAppId?: string;\n /**\n * Module name of the item provider's application that originated the items.\n *\n * For example, `store-inventory` or `fitness-resources`.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string;\n /**\n * Pool definition id\n * @format GUID\n * @immutable\n * @readonly\n */\n poolDefinitionId?: string;\n /**\n * Item set ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string;\n /**\n * Item set ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemId?: string;\n /**\n * Unique identifier for the benefit associated with this item.\n * @maxLength 64\n * @immutable\n * @readonly\n */\n benefitKey?: string;\n}\n\nexport interface PoolDefinitionInfo {\n /**\n * Pool definition name.\n * @maxLength 64\n */\n displayName?: string;\n /**\n * Pool definition description.\n * @maxLength 450\n */\n description?: string | null;\n /**\n * Credit settings.\n *\n * If this object is empty, you can't set a price for the benefit.\n */\n creditConfiguration?: CreditConfiguration;\n}\n\nexport interface CreditConfiguration {\n /**\n * Initial available amount for associated balances.\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\nexport interface ProgramDefinitionInfo {\n /**\n * Program definition id\n * @format GUID\n */\n id?: string;\n /**\n * Program definition external id\n * @format GUID\n */\n externalId?: string | null;\n /**\n * Program definition name\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * Program definition description.\n * @maxLength 450\n */\n description?: string | null;\n}\n\nexport interface BenefitInfo {\n /**\n * Price of the benefit in credits. The price is the same for all of this benefit's items.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n price?: string | null;\n /**\n * Benefit name.\n * @maxLength 40\n */\n displayName?: string | null;\n /**\n * Benefit description.\n * @maxLength 255\n */\n description?: string | null;\n}\n\nexport interface ItemInfo {\n /**\n * Item display name.\n * @maxLength 64\n */\n displayName?: string | null;\n}\n\nexport interface PoolDefinitionItemDeactivated {\n /** The pool definition item that was deactivated. */\n poolDefinitionItem?: PoolDefinitionItem;\n}\n\nexport interface QueryPoolDefinitionItemsRequest {\n /** Query to select benefit items. */\n query?: CursorQuery;\n /**\n * Fields to be included in the response.\n * @maxSize 4\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 1000\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport enum RequestedFields {\n POOL_DEFINITION = 'POOL_DEFINITION',\n PROGRAM_DEFINITION = 'PROGRAM_DEFINITION',\n BENEFIT = 'BENEFIT',\n ITEM = 'ITEM',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'POOL_DEFINITION'\n | 'PROGRAM_DEFINITION'\n | 'BENEFIT'\n | 'ITEM';\n\nexport interface QueryPoolDefinitionItemsResponse {\n /** List of items. */\n poolDefinitionItems?: PoolDefinitionItem[];\n /** Metadata for paginated results. */\n metadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface InvalidatePoolDefinitionItemsRequest {\n /**\n * The pool definition ID whose items are to be invalidated\n * @format GUID\n */\n poolDefinitionId?: string;\n /**\n * List of item set ids whose items are to be invalidated\n * @maxSize 10\n * @format GUID\n */\n itemSetIds?: string[];\n}\n\nexport interface InvalidatePoolDefinitionItemsResponse {}\n\nexport interface RemoveItemsFromBenefitRequest {\n /**\n * Items to remove from the benefit's item set.\n * @minSize 1\n * @maxSize 100\n */\n itemReferences: ItemReference[];\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit within the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\nexport interface ItemReference {\n /**\n * External item ID assigned by the provider.\n * @format GUID\n */\n externalId?: string;\n /**\n * Item category.\n * @maxLength 20\n */\n category?: string;\n}\n\nexport interface RemoveItemsFromBenefitResponse {}\n\nexport interface AddItemsToBenefitRequest {\n /**\n * Items to add to the benefit's item set.\n * @minSize 1\n * @maxSize 100\n */\n itemReferences: ItemReference[];\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit within the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\nexport interface AddItemsToBenefitResponse {}\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 entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\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 currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: 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","import * as ambassadorWixBenefitProgramsV1PoolDefinitionItem from './benefit-programs-v1-pool-definition-item-pool-definition-items.http.js';\nimport * as ambassadorWixBenefitProgramsV1PoolDefinitionItemTypes from './benefit-programs-v1-pool-definition-item-pool-definition-items.types.js';\nimport * as ambassadorWixBenefitProgramsV1PoolDefinitionItemUniversalTypes from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function queryPoolDefinitionItems(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBenefitProgramsV1PoolDefinitionItemUniversalTypes.QueryPoolDefinitionItemsRequest,\n ambassadorWixBenefitProgramsV1PoolDefinitionItemTypes.QueryPoolDefinitionItemsRequest,\n ambassadorWixBenefitProgramsV1PoolDefinitionItemUniversalTypes.QueryPoolDefinitionItemsResponse,\n ambassadorWixBenefitProgramsV1PoolDefinitionItemTypes.QueryPoolDefinitionItemsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.queryPoolDefinitionItems(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/pool-definition-items/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function removeItemsFromBenefit(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBenefitProgramsV1PoolDefinitionItemUniversalTypes.RemoveItemsFromBenefitRequest,\n ambassadorWixBenefitProgramsV1PoolDefinitionItemTypes.RemoveItemsFromBenefitRequest,\n ambassadorWixBenefitProgramsV1PoolDefinitionItemUniversalTypes.RemoveItemsFromBenefitResponse,\n ambassadorWixBenefitProgramsV1PoolDefinitionItemTypes.RemoveItemsFromBenefitResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.removeItemsFromBenefit(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/pool-definition-items/remove-items-from-benefit',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function addItemsToBenefit(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBenefitProgramsV1PoolDefinitionItemUniversalTypes.AddItemsToBenefitRequest,\n ambassadorWixBenefitProgramsV1PoolDefinitionItemTypes.AddItemsToBenefitRequest,\n ambassadorWixBenefitProgramsV1PoolDefinitionItemUniversalTypes.AddItemsToBenefitResponse,\n ambassadorWixBenefitProgramsV1PoolDefinitionItemTypes.AddItemsToBenefitResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.addItemsToBenefit(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/pool-definition-items/add-items-to-benefit',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n PoolDefinitionItem as PoolDefinitionItemOriginal,\n PoolDefinitionInfo as PoolDefinitionInfoOriginal,\n CreditConfiguration as CreditConfigurationOriginal,\n ProgramDefinitionInfo as ProgramDefinitionInfoOriginal,\n BenefitInfo as BenefitInfoOriginal,\n ItemInfo as ItemInfoOriginal,\n PoolDefinitionItemDeactivated as PoolDefinitionItemDeactivatedOriginal,\n QueryPoolDefinitionItemsRequest as QueryPoolDefinitionItemsRequestOriginal,\n CursorQuery as CursorQueryOriginal,\n CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal,\n Sorting as SortingOriginal,\n SortOrder as SortOrderOriginal,\n SortOrderWithLiterals as SortOrderWithLiteralsOriginal,\n CursorPaging as CursorPagingOriginal,\n RequestedFields as RequestedFieldsOriginal,\n RequestedFieldsWithLiterals as RequestedFieldsWithLiteralsOriginal,\n QueryPoolDefinitionItemsResponse as QueryPoolDefinitionItemsResponseOriginal,\n CursorPagingMetadata as CursorPagingMetadataOriginal,\n Cursors as CursorsOriginal,\n InvalidatePoolDefinitionItemsRequest as InvalidatePoolDefinitionItemsRequestOriginal,\n InvalidatePoolDefinitionItemsResponse as InvalidatePoolDefinitionItemsResponseOriginal,\n RemoveItemsFromBenefitRequest as RemoveItemsFromBenefitRequestOriginal,\n ItemReference as ItemReferenceOriginal,\n RemoveItemsFromBenefitResponse as RemoveItemsFromBenefitResponseOriginal,\n AddItemsToBenefitRequest as AddItemsToBenefitRequestOriginal,\n AddItemsToBenefitResponse as AddItemsToBenefitResponseOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountInfo as AccountInfoOriginal,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.types.js';\n"],"mappings":";AAAA,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,0EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAad,SAAS,yBACd,SAC4B;AAC5B,WAAS,2BAA2B,EAAE,KAAK,GAAQ;AACjD,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK;AAAA,QACH,EAAE,WAAW,mCAAmC,MAAM,SAAS,KAAK;AAAA,MACtE;AAAA,MACA,MAAM;AAAA,MACN,mBAAmB,CAACA,aAClB,eAAeA,UAAS;AAAA,QACtB;AAAA,UACE,aAAa;AAAA,UACb,OAAO;AAAA,YACL,EAAE,MAAM,kCAAkC;AAAA,YAC1C,EAAE,MAAM,kCAAkC;AAAA,UAC5C;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACL;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAGO,SAAS,uBACd,SAC4B;AAC5B,WAAS,yBAAyB,EAAE,KA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AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,0BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC6C;AAAA,IAC/C;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,qBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC6C,kBAAkB,OAAO;AAE5E,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["payload","SortOrder","RequestedFields","WebhookIdentityType","queryPoolDefinitionItems","removeItemsFromBenefit","addItemsToBenefit"]}
1
+ {"version":3,"sources":["../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.http.ts","../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.types.ts","../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.meta.ts"],"sourcesContent":["import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n _: [\n {\n srcPath: '/_api/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_pool-definition-items';\n\n/**\n * Creates a query to retrieve a list of poolDefinitionItems.\n *\n * The `queryPoolDefinitionItems()` method builds a query to retrieve a list of poolDefinitionItems and returns a `PoolDefinitionItemsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the [`find()`](/poolDefinitionItems/poolDefinitionItems-query-builder/find) function.\n *\n * You can refine the query by chaining `PoolDefinitionItemsQueryBuilder` methods onto the query. `PoolDefinitionItemsQueryBuilder` methods enable you to filter, sort, and control the results that `queryPoolDefinitionItems()` returns.\n *\n * The following `PoolDefinitionItemsQueryBuilder` functions are supported for `queryPoolDefinitionItems()`. For a full description of the item object, see the object returned for the [`poolDefinitionItems`](/poolDefinitionItems/poolDefinitionItems-query-result/poolDefinitionItems) property in `PoolDefinitionItemsQueryResult`.\n */\nexport function queryPoolDefinitionItems(\n payload: object\n): RequestOptionsFactory<any> {\n function __queryPoolDefinitionItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_definition_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.QueryPoolDefinitionItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n { protoPath: '/v1/pool-definition-items/query', data: payload, host }\n ),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'poolDefinitionItems.createdDate' },\n { path: 'poolDefinitionItems.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryPoolDefinitionItems;\n}\n\n/**\n * Removes items from a benefit. Items are removed asynchronously — they may briefly still appear in\n * QueryPoolDefinitionItems results after the call returns.\n * Item references not matching any registered item appear in results as per-item failures with `item_metadata.error.code` set to `NOT_FOUND`.\n */\nexport function removeItemsFromBenefit(\n payload: object\n): RequestOptionsFactory<any> {\n function __removeItemsFromBenefit({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_definition_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.RemoveItemsFromBenefit',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n {\n protoPath: '/v1/pool-definition-items/remove-items-from-benefit',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __removeItemsFromBenefit;\n}\n\n/**\n * Registers items with a benefit. This is an eventually consistent operation — items may take a short time to appear\n * in QueryPoolDefinitionItems results after the call returns. Uses a partial success model — items already registered\n * with the benefit return a per-item error in results.item_metadata while successfully added items are unaffected.\n * Check bulk_action_metadata for overall counts and results for per-item outcomes.\n */\nexport function addItemsToBenefit(payload: object): RequestOptionsFactory<any> {\n function __addItemsToBenefit({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_definition_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.AddItemsToBenefit',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n {\n protoPath: '/v1/pool-definition-items/add-items-to-benefit',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __addItemsToBenefit;\n}\n","export interface PoolDefinitionItem {\n /**\n * Benefit item ID. Deterministically generated from pool_definition_id and item_id — if you know both, you can compute the ID without querying.\n * @format GUID\n * @readonly\n */\n id?: string;\n /**\n * Revision number, which increments by 1 each time the benefit item is updated.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the item was created.\n * @readonly\n */\n createdDate?: Date | null;\n /**\n * Date and time the item was updated.\n * @readonly\n */\n updatedDate?: Date | null;\n /**\n * External item ID assigned by the provider of the items.\n *\n * For example, if the benefit items are products, this ID corresponds to the specific product ID in the provider's system.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalId?: string;\n /**\n * Item category. Groups benefit items together for organization and management purposes. For example, classes, posts, groups.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string;\n /**\n * ID of the application providing the benefit items. Each item's external_id is unique within its provider application.\n * @format GUID\n * @immutable\n * @readonly\n */\n providerAppId?: string;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you\n * created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string;\n /**\n * ID of the pool definition - the configuration that defines a set of benefits and which items are accessible within each benefit.\n * @format GUID\n * @immutable\n * @readonly\n */\n poolDefinitionId?: string;\n /**\n * Internal grouping identifier for this benefit's item set. Use pool_definition_id together with benefit_key\n * to identify a benefit — item_set_id is an implementation detail.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string;\n /**\n * Pool definition details including display name, description, and credit settings. Only populated when\n * POOL_DEFINITION is included in the fields request parameter.\n * @readonly\n */\n poolDefinition?: PoolDefinitionInfo;\n /**\n * Program definitions that include this item as an accessible benefit. Only id and external_id are\n * returned by default; request PROGRAM_DEFINITION to include display_name and description.\n * @maxSize 20\n * @readonly\n */\n programDefinitions?: ProgramDefinitionInfo[];\n /**\n * Item ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemId?: string;\n /**\n * Pricing and display information for the associated benefit, including credit price, name, and description.\n * Only populated when BENEFIT is included in the fields request parameter.\n * @readonly\n */\n benefitInfo?: BenefitInfo;\n /**\n * Display name for the catalog item. Only populated when ITEM is included in the fields request parameter.\n * @readonly\n */\n itemInfo?: ItemInfo;\n /**\n * Unique identifier for the benefit associated with this item.\n * @maxLength 64\n * @immutable\n * @readonly\n */\n benefitKey?: string;\n /**\n * Pre-computed search key for the item reference, built by concatenating provider_app_id, category, and external_id\n * separated by /. Use this field for efficient single-field filtering instead of composing three separate conditions.\n * @maxLength 94\n * @immutable\n * @readonly\n */\n itemReferenceSearchKey?: string;\n}\n\nexport interface PoolDefinitionInfo {\n /**\n * Pool definition name.\n * @maxLength 64\n */\n displayName?: string;\n /**\n * Pool definition description.\n * @maxLength 450\n */\n description?: string | null;\n /** Credit configuration for this pool definition. When absent, benefits in this pool do not support credit-based pricing. */\n creditConfiguration?: CreditConfiguration;\n}\n\nexport interface CreditConfiguration {\n /**\n * Number of credits initially granted to a subscriber when this pool definition's benefits are activated.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n amount?: string;\n /**\n * Credit unit display name.\n * @maxLength 32\n */\n unitDisplayName?: string | null;\n /**\n * Credit unit type.\n * @maxLength 16\n */\n unitType?: string | null;\n}\n\nexport interface ProgramDefinitionInfo {\n /**\n * Program definition id\n * @format GUID\n */\n id?: string;\n /**\n * Program definition external id\n * @format GUID\n */\n externalId?: string | null;\n /**\n * Program definition name\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * Program definition description.\n * @maxLength 450\n */\n description?: string | null;\n}\n\nexport interface BenefitInfo {\n /**\n * Price of the benefit in credits. The price is the same for all of this benefit's items.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n price?: string | null;\n /**\n * Benefit name.\n * @maxLength 40\n */\n displayName?: string | null;\n /**\n * Benefit description.\n * @maxLength 255\n */\n description?: string | null;\n}\n\nexport interface ItemInfo {\n /**\n * Item display name.\n * @maxLength 400\n */\n displayName?: string | null;\n}\n\n/** Deprecated: use PoolDefinitionItemRemoved instead. Will be removed after clients are migrated. */\nexport interface PoolDefinitionItemDeactivated {\n /** The pool definition item that was deactivated. */\n poolDefinitionItem?: PoolDefinitionItem;\n}\n\nexport interface PoolDefinitionItemRemoved {\n /** The pool definition item that was removed from the benefit. */\n poolDefinitionItem?: PoolDefinitionItem;\n}\n\nexport interface QueryPoolDefinitionItemsRequest {\n /** Query to select benefit items. */\n query?: CursorQuery;\n /**\n * Fields to be included in the response.\n * @maxSize 4\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 1000\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport enum RequestedFields {\n /** Populates the pool_definition field with display name, description, and credit configuration. */\n POOL_DEFINITION = 'POOL_DEFINITION',\n /** Populates the program_definitions field with display_name and description. */\n PROGRAM_DEFINITION = 'PROGRAM_DEFINITION',\n /** Populates the benefit_info field with credit price, name, and description. */\n BENEFIT = 'BENEFIT',\n /** Populates the item_info field with the catalog item's display name. */\n ITEM = 'ITEM',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'POOL_DEFINITION'\n | 'PROGRAM_DEFINITION'\n | 'BENEFIT'\n | 'ITEM';\n\nexport interface QueryPoolDefinitionItemsResponse {\n /** List of items. */\n poolDefinitionItems?: PoolDefinitionItem[];\n /** Metadata for paginated results. */\n metadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface InvalidatePoolDefinitionItemsRequest {\n /**\n * The pool definition ID whose items are to be invalidated\n * @format GUID\n */\n poolDefinitionId?: string;\n /**\n * List of item set ids whose items are to be invalidated\n * @maxSize 10\n * @format GUID\n */\n itemSetIds?: string[];\n}\n\nexport interface InvalidatePoolDefinitionItemsResponse {}\n\nexport interface RemoveItemsFromBenefitRequest {\n /**\n * Items to remove from the benefit's item set.\n * @minSize 1\n * @maxSize 100\n */\n itemReferences: ItemReference[];\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit within the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\nexport interface ItemReference {\n /**\n * External item ID assigned by the provider.\n * @format GUID\n */\n externalId?: string;\n /**\n * Item category.\n * @maxLength 20\n */\n category?: string;\n}\n\nexport interface RemoveItemsFromBenefitResponse {\n /**\n * Per-item results aligned 1:1 with `item_references` from the request — `item_metadata.original_index` always\n * refers to the position in the request. Item references that did not match any registered item appear here as\n * failures with `item_metadata.error.code` set to `NOT_FOUND`.\n */\n results?: BulkRemoveItemResult[];\n /** Aggregate counts (successes, failures) for the bulk operation. Unresolved item references are counted as failures. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkRemoveItemResult {\n /** Outcome metadata for a single item — includes the underlying item ID, success flag, and error details on failure. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\n * @format GUID\n */\n id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface AddItemsToBenefitRequest {\n /**\n * Items to add to the benefit's item set.\n * @minSize 1\n * @maxSize 100\n */\n itemReferences: ItemReference[];\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit within the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\nexport interface AddItemsToBenefitResponse {\n /** Per-item results — `item_metadata.original_index` corresponds to the order of `item_references` in the request. */\n results?: BulkAddItemResult[];\n /** Aggregate counts (successes, failures) for the bulk operation. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkAddItemResult {\n /**\n * Outcome metadata for the catalog item created in the underlying item service. The item ID here is the Item entity\n * ID — PoolDefinitionItem records are created asynchronously and their IDs are not returned in this response.\n */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\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 currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type RemoveItemsFromBenefitApplicationErrors = {\n code?: 'POOL_DEFINITION_BENEFIT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type AddItemsToBenefitApplicationErrors = {\n code?: 'POOL_DEFINITION_BENEFIT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n","import * as ambassadorWixBenefitProgramsV1PoolDefinitionItem from './benefit-programs-v1-pool-definition-item-pool-definition-items.http.js';\nimport * as ambassadorWixBenefitProgramsV1PoolDefinitionItemTypes from './benefit-programs-v1-pool-definition-item-pool-definition-items.types.js';\nimport * as ambassadorWixBenefitProgramsV1PoolDefinitionItemUniversalTypes from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function queryPoolDefinitionItems(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBenefitProgramsV1PoolDefinitionItemUniversalTypes.QueryPoolDefinitionItemsRequest,\n ambassadorWixBenefitProgramsV1PoolDefinitionItemTypes.QueryPoolDefinitionItemsRequest,\n ambassadorWixBenefitProgramsV1PoolDefinitionItemUniversalTypes.QueryPoolDefinitionItemsResponse,\n ambassadorWixBenefitProgramsV1PoolDefinitionItemTypes.QueryPoolDefinitionItemsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.queryPoolDefinitionItems(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/pool-definition-items/query',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function removeItemsFromBenefit(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBenefitProgramsV1PoolDefinitionItemUniversalTypes.RemoveItemsFromBenefitRequest,\n ambassadorWixBenefitProgramsV1PoolDefinitionItemTypes.RemoveItemsFromBenefitRequest,\n ambassadorWixBenefitProgramsV1PoolDefinitionItemUniversalTypes.RemoveItemsFromBenefitResponse,\n ambassadorWixBenefitProgramsV1PoolDefinitionItemTypes.RemoveItemsFromBenefitResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.removeItemsFromBenefit(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/pool-definition-items/remove-items-from-benefit',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function addItemsToBenefit(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixBenefitProgramsV1PoolDefinitionItemUniversalTypes.AddItemsToBenefitRequest,\n ambassadorWixBenefitProgramsV1PoolDefinitionItemTypes.AddItemsToBenefitRequest,\n ambassadorWixBenefitProgramsV1PoolDefinitionItemUniversalTypes.AddItemsToBenefitResponse,\n ambassadorWixBenefitProgramsV1PoolDefinitionItemTypes.AddItemsToBenefitResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.addItemsToBenefit(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/pool-definition-items/add-items-to-benefit',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n PoolDefinitionItem as PoolDefinitionItemOriginal,\n PoolDefinitionInfo as PoolDefinitionInfoOriginal,\n CreditConfiguration as CreditConfigurationOriginal,\n ProgramDefinitionInfo as ProgramDefinitionInfoOriginal,\n BenefitInfo as BenefitInfoOriginal,\n ItemInfo as ItemInfoOriginal,\n PoolDefinitionItemDeactivated as PoolDefinitionItemDeactivatedOriginal,\n PoolDefinitionItemRemoved as PoolDefinitionItemRemovedOriginal,\n QueryPoolDefinitionItemsRequest as QueryPoolDefinitionItemsRequestOriginal,\n CursorQuery as CursorQueryOriginal,\n CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOfOriginal,\n Sorting as SortingOriginal,\n SortOrder as SortOrderOriginal,\n SortOrderWithLiterals as SortOrderWithLiteralsOriginal,\n CursorPaging as CursorPagingOriginal,\n RequestedFields as RequestedFieldsOriginal,\n RequestedFieldsWithLiterals as RequestedFieldsWithLiteralsOriginal,\n QueryPoolDefinitionItemsResponse as QueryPoolDefinitionItemsResponseOriginal,\n CursorPagingMetadata as CursorPagingMetadataOriginal,\n Cursors as CursorsOriginal,\n InvalidatePoolDefinitionItemsRequest as InvalidatePoolDefinitionItemsRequestOriginal,\n InvalidatePoolDefinitionItemsResponse as InvalidatePoolDefinitionItemsResponseOriginal,\n RemoveItemsFromBenefitRequest as RemoveItemsFromBenefitRequestOriginal,\n ItemReference as ItemReferenceOriginal,\n RemoveItemsFromBenefitResponse as RemoveItemsFromBenefitResponseOriginal,\n BulkRemoveItemResult as BulkRemoveItemResultOriginal,\n ItemMetadata as ItemMetadataOriginal,\n ApplicationError as ApplicationErrorOriginal,\n BulkActionMetadata as BulkActionMetadataOriginal,\n AddItemsToBenefitRequest as AddItemsToBenefitRequestOriginal,\n AddItemsToBenefitResponse as AddItemsToBenefitResponseOriginal,\n BulkAddItemResult as BulkAddItemResultOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountInfo as AccountInfoOriginal,\n RemoveItemsFromBenefitApplicationErrors as RemoveItemsFromBenefitApplicationErrorsOriginal,\n AddItemsToBenefitApplicationErrors as AddItemsToBenefitApplicationErrorsOriginal,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.types.js';\n"],"mappings":";AAAA,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,0EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAad,SAAS,yBACd,SAC4B;AAC5B,WAAS,2BAA2B,EAAE,KAAK,GAAQ;AACjD,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK;AAAA,QACH,EAAE,WAAW,mCAAmC,MAAM,SAAS,KAAK;AAAA,MACtE;AAAA,MACA,MAAM;AAAA,MACN,mBAAmB,CAACA,aAClB,eAAeA,UAAS;AAAA,QACtB;AAAA,UACE,aAAa;AAAA,UACb,OAAO;AAAA,YACL,EAAE,MAAM,kCAAkC;AAAA,YAC1C,EAAE,MAAM,kCAAkC;AAAA,UAC5C;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACL;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAOO,SAAS,uBACd,SAC4B;AAC5B,WAAS,yBAAyB,EAAE,KAAK,GAAQ;AAC/C,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,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AA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,0BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC6C;AAAA,IAC/C;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,qBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC6C,kBAAkB,OAAO;AAE5E,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["payload","SortOrder","RequestedFields","WebhookIdentityType","queryPoolDefinitionItems","removeItemsFromBenefit","addItemsToBenefit"]}
@@ -39,8 +39,32 @@ declare const QueryPoolDefinitionItemsResponse: z.ZodObject<{
39
39
  namespace: z.ZodOptional<z.ZodString>;
40
40
  poolDefinitionId: z.ZodOptional<z.ZodString>;
41
41
  itemSetId: z.ZodOptional<z.ZodString>;
42
+ poolDefinition: z.ZodOptional<z.ZodObject<{
43
+ displayName: z.ZodOptional<z.ZodString>;
44
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
45
+ creditConfiguration: z.ZodOptional<z.ZodObject<{
46
+ amount: z.ZodOptional<z.ZodString>;
47
+ unitDisplayName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
48
+ unitType: z.ZodNullable<z.ZodOptional<z.ZodString>>;
49
+ }, z.core.$strip>>;
50
+ }, z.core.$strip>>;
51
+ programDefinitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
52
+ _id: z.ZodOptional<z.ZodString>;
53
+ externalId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
54
+ displayName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
55
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
56
+ }, z.core.$strip>>>;
42
57
  itemId: z.ZodOptional<z.ZodString>;
58
+ benefitInfo: z.ZodOptional<z.ZodObject<{
59
+ price: z.ZodNullable<z.ZodOptional<z.ZodString>>;
60
+ displayName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
61
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
62
+ }, z.core.$strip>>;
63
+ itemInfo: z.ZodOptional<z.ZodObject<{
64
+ displayName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
65
+ }, z.core.$strip>>;
43
66
  benefitKey: z.ZodOptional<z.ZodString>;
67
+ itemReferenceSearchKey: z.ZodOptional<z.ZodString>;
44
68
  }, z.core.$strip>>>;
45
69
  metadata: z.ZodOptional<z.ZodObject<{
46
70
  count: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
@@ -61,7 +85,25 @@ declare const RemoveItemsFromBenefitRequest: z.ZodObject<{
61
85
  benefitKey: z.ZodString;
62
86
  }, z.core.$strip>;
63
87
  }, z.core.$strip>;
64
- declare const RemoveItemsFromBenefitResponse: z.ZodObject<{}, z.core.$strip>;
88
+ declare const RemoveItemsFromBenefitResponse: z.ZodObject<{
89
+ results: z.ZodOptional<z.ZodArray<z.ZodObject<{
90
+ itemMetadata: z.ZodOptional<z.ZodObject<{
91
+ _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
92
+ originalIndex: z.ZodOptional<z.ZodNumber>;
93
+ success: z.ZodOptional<z.ZodBoolean>;
94
+ error: z.ZodOptional<z.ZodObject<{
95
+ code: z.ZodOptional<z.ZodString>;
96
+ description: z.ZodOptional<z.ZodString>;
97
+ data: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
98
+ }, z.core.$strip>>;
99
+ }, z.core.$strip>>;
100
+ }, z.core.$strip>>>;
101
+ bulkActionMetadata: z.ZodOptional<z.ZodObject<{
102
+ totalSuccesses: z.ZodOptional<z.ZodNumber>;
103
+ totalFailures: z.ZodOptional<z.ZodNumber>;
104
+ undetailedFailures: z.ZodOptional<z.ZodNumber>;
105
+ }, z.core.$strip>>;
106
+ }, z.core.$strip>;
65
107
  declare const AddItemsToBenefitRequest: z.ZodObject<{
66
108
  itemReferences: z.ZodArray<z.ZodObject<{
67
109
  externalId: z.ZodString;
@@ -72,6 +114,24 @@ declare const AddItemsToBenefitRequest: z.ZodObject<{
72
114
  benefitKey: z.ZodString;
73
115
  }, z.core.$strip>;
74
116
  }, z.core.$strip>;
75
- declare const AddItemsToBenefitResponse: z.ZodObject<{}, z.core.$strip>;
117
+ declare const AddItemsToBenefitResponse: z.ZodObject<{
118
+ results: z.ZodOptional<z.ZodArray<z.ZodObject<{
119
+ itemMetadata: z.ZodOptional<z.ZodObject<{
120
+ _id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
121
+ originalIndex: z.ZodOptional<z.ZodNumber>;
122
+ success: z.ZodOptional<z.ZodBoolean>;
123
+ error: z.ZodOptional<z.ZodObject<{
124
+ code: z.ZodOptional<z.ZodString>;
125
+ description: z.ZodOptional<z.ZodString>;
126
+ data: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
127
+ }, z.core.$strip>>;
128
+ }, z.core.$strip>>;
129
+ }, z.core.$strip>>>;
130
+ bulkActionMetadata: z.ZodOptional<z.ZodObject<{
131
+ totalSuccesses: z.ZodOptional<z.ZodNumber>;
132
+ totalFailures: z.ZodOptional<z.ZodNumber>;
133
+ undetailedFailures: z.ZodOptional<z.ZodNumber>;
134
+ }, z.core.$strip>>;
135
+ }, z.core.$strip>;
76
136
 
77
137
  export { AddItemsToBenefitRequest, AddItemsToBenefitResponse, QueryPoolDefinitionItemsRequest, QueryPoolDefinitionItemsResponse, RemoveItemsFromBenefitRequest, RemoveItemsFromBenefitResponse };
@@ -36,17 +36,19 @@ var QueryPoolDefinitionItemsRequest = z.object({
36
36
  var QueryPoolDefinitionItemsResponse = z.object({
37
37
  poolDefinitionItems: z.array(
38
38
  z.object({
39
- _id: z.string().describe("Benefit item ID.").regex(
39
+ _id: z.string().describe(
40
+ "Benefit item ID. Deterministically generated from pool_definition_id and item_id \u2014 if you know both, you can compute the ID without querying."
41
+ ).regex(
40
42
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
41
43
  "Must be a valid GUID"
42
44
  ).optional(),
43
45
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
44
- "Revision number, which increments by 1 each time the benefit item is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the item.\n\nIgnored when creating an item."
46
+ "Revision number, which increments by 1 each time the benefit item is updated."
45
47
  ).optional().nullable(),
46
48
  _createdDate: z.date().describe("Date and time the item was created.").optional().nullable(),
47
49
  _updatedDate: z.date().describe("Date and time the item was updated.").optional().nullable(),
48
50
  externalId: z.string().describe(
49
- "External item ID assigned by the provider of the items.\n\nFor example, if the benefit items are products, this ID corresponds to the specific product ID in the supplier's system."
51
+ "External item ID assigned by the provider of the items.\n\nFor example, if the benefit items are products, this ID corresponds to the specific product ID in the provider's system."
50
52
  ).regex(
51
53
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
52
54
  "Must be a valid GUID"
@@ -55,29 +57,79 @@ var QueryPoolDefinitionItemsResponse = z.object({
55
57
  "Item category. Groups benefit items together for organization and management purposes. For example, classes, posts, groups."
56
58
  ).max(20).optional(),
57
59
  providerAppId: z.string().describe(
58
- "ID of the application providing the benefit item.\n\nID of the external application supplying the items. Each item's external ID is unique to its respective provider's application."
60
+ "ID of the application providing the benefit items. Each item's external_id is unique within its provider application."
59
61
  ).regex(
60
62
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
61
63
  "Must be a valid GUID"
62
64
  ).optional(),
63
65
  namespace: z.string().describe(
64
- "Module name of the item provider's application that originated the items.\n\nFor example, `store-inventory` or `fitness-resources`."
66
+ "Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you\ncreated and entities that other apps created."
65
67
  ).min(1).max(20).optional(),
66
- poolDefinitionId: z.string().describe("Pool definition id").regex(
68
+ poolDefinitionId: z.string().describe(
69
+ "ID of the pool definition - the configuration that defines a set of benefits and which items are accessible within each benefit."
70
+ ).regex(
67
71
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
68
72
  "Must be a valid GUID"
69
73
  ).optional(),
70
- itemSetId: z.string().describe("Item set ID.").regex(
74
+ itemSetId: z.string().describe(
75
+ "Internal grouping identifier for this benefit's item set. Use pool_definition_id together with benefit_key\nto identify a benefit \u2014 item_set_id is an implementation detail."
76
+ ).regex(
71
77
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
72
78
  "Must be a valid GUID"
73
79
  ).optional(),
74
- itemId: z.string().describe("Item set ID.").regex(
80
+ poolDefinition: z.object({
81
+ displayName: z.string().describe("Pool definition name.").max(64).optional(),
82
+ description: z.string().describe("Pool definition description.").max(450).optional().nullable(),
83
+ creditConfiguration: z.object({
84
+ amount: z.string().describe(
85
+ "Number of credits initially granted to a subscriber when this pool definition's benefits are activated."
86
+ ).optional(),
87
+ unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable(),
88
+ unitType: z.string().describe("Credit unit type.").max(16).optional().nullable()
89
+ }).describe(
90
+ "Credit configuration for this pool definition. When absent, benefits in this pool do not support credit-based pricing."
91
+ ).optional()
92
+ }).describe(
93
+ "Pool definition details including display name, description, and credit settings. Only populated when\nPOOL_DEFINITION is included in the fields request parameter."
94
+ ).optional(),
95
+ programDefinitions: z.array(
96
+ z.object({
97
+ _id: z.string().describe("Program definition id").regex(
98
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
99
+ "Must be a valid GUID"
100
+ ).optional(),
101
+ externalId: z.string().describe("Program definition external id").regex(
102
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
103
+ "Must be a valid GUID"
104
+ ).optional().nullable(),
105
+ displayName: z.string().describe("Program definition name").max(64).optional().nullable(),
106
+ description: z.string().describe("Program definition description.").max(450).optional().nullable()
107
+ })
108
+ ).max(20).optional(),
109
+ itemId: z.string().describe("Item ID.").regex(
75
110
  /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
76
111
  "Must be a valid GUID"
77
112
  ).optional(),
113
+ benefitInfo: z.object({
114
+ price: z.string().describe(
115
+ "Price of the benefit in credits. The price is the same for all of this benefit's items."
116
+ ).optional().nullable(),
117
+ displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
118
+ description: z.string().describe("Benefit description.").max(255).optional().nullable()
119
+ }).describe(
120
+ "Pricing and display information for the associated benefit, including credit price, name, and description.\nOnly populated when BENEFIT is included in the fields request parameter."
121
+ ).optional(),
122
+ itemInfo: z.object({
123
+ displayName: z.string().describe("Item display name.").max(400).optional().nullable()
124
+ }).describe(
125
+ "Display name for the catalog item. Only populated when ITEM is included in the fields request parameter."
126
+ ).optional(),
78
127
  benefitKey: z.string().describe(
79
128
  "Unique identifier for the benefit associated with this item."
80
- ).max(64).optional()
129
+ ).max(64).optional(),
130
+ itemReferenceSearchKey: z.string().describe(
131
+ "Pre-computed search key for the item reference, built by concatenating provider_app_id, category, and external_id\nseparated by /. Use this field for efficient single-field filtering instead of composing three separate conditions."
132
+ ).max(94).optional()
81
133
  })
82
134
  ).optional(),
83
135
  metadata: z.object({
@@ -115,7 +167,42 @@ var RemoveItemsFromBenefitRequest = z.object({
115
167
  benefitKey: z.string().describe("Key identifying the benefit within the pool definition.").max(64)
116
168
  })
117
169
  });
118
- var RemoveItemsFromBenefitResponse = z.object({});
170
+ var RemoveItemsFromBenefitResponse = z.object({
171
+ results: z.array(
172
+ z.object({
173
+ itemMetadata: z.object({
174
+ _id: z.string().describe(
175
+ "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
176
+ ).regex(
177
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
178
+ "Must be a valid GUID"
179
+ ).optional().nullable(),
180
+ originalIndex: z.number().int().describe(
181
+ "Index of the item within the request array. Allows for correlation between request and response items."
182
+ ).optional(),
183
+ success: z.boolean().describe(
184
+ "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
185
+ ).optional(),
186
+ error: z.object({
187
+ code: z.string().describe("Error code.").optional(),
188
+ description: z.string().describe("Description of the error.").optional(),
189
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
190
+ }).describe("Details about the error in case of failure.").optional()
191
+ }).describe(
192
+ "Outcome metadata for a single item \u2014 includes the underlying item ID, success flag, and error details on failure."
193
+ ).optional()
194
+ })
195
+ ).optional(),
196
+ bulkActionMetadata: z.object({
197
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
198
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
199
+ undetailedFailures: z.number().int().describe(
200
+ "Number of failures without details because detailed failure threshold was exceeded."
201
+ ).optional()
202
+ }).describe(
203
+ "Aggregate counts (successes, failures) for the bulk operation. Unresolved item references are counted as failures."
204
+ ).optional()
205
+ });
119
206
  var AddItemsToBenefitRequest = z.object({
120
207
  itemReferences: z.array(
121
208
  z.object({
@@ -134,7 +221,40 @@ var AddItemsToBenefitRequest = z.object({
134
221
  benefitKey: z.string().describe("Key identifying the benefit within the pool definition.").max(64)
135
222
  })
136
223
  });
137
- var AddItemsToBenefitResponse = z.object({});
224
+ var AddItemsToBenefitResponse = z.object({
225
+ results: z.array(
226
+ z.object({
227
+ itemMetadata: z.object({
228
+ _id: z.string().describe(
229
+ "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
230
+ ).regex(
231
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
232
+ "Must be a valid GUID"
233
+ ).optional().nullable(),
234
+ originalIndex: z.number().int().describe(
235
+ "Index of the item within the request array. Allows for correlation between request and response items."
236
+ ).optional(),
237
+ success: z.boolean().describe(
238
+ "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
239
+ ).optional(),
240
+ error: z.object({
241
+ code: z.string().describe("Error code.").optional(),
242
+ description: z.string().describe("Description of the error.").optional(),
243
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
244
+ }).describe("Details about the error in case of failure.").optional()
245
+ }).describe(
246
+ "Outcome metadata for the catalog item created in the underlying item service. The item ID here is the Item entity\nID \u2014 PoolDefinitionItem records are created asynchronously and their IDs are not returned in this response."
247
+ ).optional()
248
+ })
249
+ ).optional(),
250
+ bulkActionMetadata: z.object({
251
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
252
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
253
+ undetailedFailures: z.number().int().describe(
254
+ "Number of failures without details because detailed failure threshold was exceeded."
255
+ ).optional()
256
+ }).describe("Aggregate counts (successes, failures) for the bulk operation.").optional()
257
+ });
138
258
  export {
139
259
  AddItemsToBenefitRequest,
140
260
  AddItemsToBenefitResponse,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.schemas.ts"],"sourcesContent":["import * as z from 'zod';\n\nexport const QueryPoolDefinitionItemsRequest = z.object({\n query: z\n .intersection(\n z.object({\n filter: z\n .record(z.string(), z.any())\n .describe(\n 'Filter object in the following format:\\n`\"filter\" : {\\n\"fieldName1\": \"value1\",\\n\"fieldName2\":{\"$operator\":\"value2\"}\\n}`\\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`'\n )\n .optional()\n .nullable(),\n sort: z\n .array(\n z.object({\n fieldName: z\n .string()\n .describe('Name of the field to sort by.')\n .max(512)\n .optional(),\n order: z.enum(['ASC', 'DESC']).optional(),\n })\n )\n .max(5)\n .optional(),\n }),\n z.xor([\n z.object({ cursorPaging: z.never().optional() }),\n z.object({\n cursorPaging: z\n .object({\n limit: z\n .number()\n .int()\n .describe('Maximum number of items to return in the results.')\n .min(0)\n .max(1000)\n .optional()\n .nullable(),\n cursor: z\n .string()\n .describe(\n \"Pointer to the next or previous page in the list of results.\\n\\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\\nNot relevant for the first request.\"\n )\n .max(16000)\n .optional()\n .nullable(),\n })\n .describe(\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 }),\n ])\n )\n .describe('Query to select benefit items.'),\n options: z\n .object({\n fields: z\n .array(\n z.enum(['POOL_DEFINITION', 'PROGRAM_DEFINITION', 'BENEFIT', 'ITEM'])\n )\n .max(4)\n .optional(),\n })\n .optional(),\n});\nexport const QueryPoolDefinitionItemsResponse = z.object({\n poolDefinitionItems: z\n .array(\n z.object({\n _id: z\n .string()\n .describe('Benefit item ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n revision: z\n .string()\n .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n .describe(\n 'Revision number, which increments by 1 each time the benefit item is updated.\\nTo prevent conflicting changes, the current revision must be passed when updating the item.\\n\\nIgnored when creating an item.'\n )\n .optional()\n .nullable(),\n _createdDate: z\n .date()\n .describe('Date and time the item was created.')\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe('Date and time the item was updated.')\n .optional()\n .nullable(),\n externalId: z\n .string()\n .describe(\n \"External item ID assigned by the provider of the items.\\n\\nFor example, if the benefit items are products, this ID corresponds to the specific product ID in the supplier's system.\"\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n category: z\n .string()\n .describe(\n 'Item category. Groups benefit items together for organization and management purposes. For example, classes, posts, groups.'\n )\n .max(20)\n .optional(),\n providerAppId: z\n .string()\n .describe(\n \"ID of the application providing the benefit item.\\n\\nID of the external application supplying the items. Each item's external ID is unique to its respective provider's application.\"\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n namespace: z\n .string()\n .describe(\n \"Module name of the item provider's application that originated the items.\\n\\nFor example, `store-inventory` or `fitness-resources`.\"\n )\n .min(1)\n .max(20)\n .optional(),\n poolDefinitionId: z\n .string()\n .describe('Pool definition id')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n itemSetId: z\n .string()\n .describe('Item set ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n itemId: z\n .string()\n .describe('Item set ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n benefitKey: z\n .string()\n .describe(\n 'Unique identifier for the benefit associated with this item.'\n )\n .max(64)\n .optional(),\n })\n )\n .optional(),\n metadata: z\n .object({\n count: z\n .number()\n .int()\n .describe('Number of items returned in the response.')\n .optional()\n .nullable(),\n cursors: z\n .object({\n next: z\n .string()\n .describe(\n 'Cursor string pointing to the next page in the list of results.'\n )\n .max(16000)\n .optional()\n .nullable(),\n prev: z\n .string()\n .describe(\n 'Cursor pointing to the previous page in the list of results.'\n )\n .max(16000)\n .optional()\n .nullable(),\n })\n .describe(\n 'Cursor strings that point to the next page, previous page, or both.'\n )\n .optional(),\n hasNext: z\n .boolean()\n .describe(\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 .optional()\n .nullable(),\n })\n .describe('Metadata for paginated results.')\n .optional(),\n});\nexport const RemoveItemsFromBenefitRequest = z.object({\n itemReferences: z\n .array(\n z.object({\n externalId: z\n .string()\n .describe('External item ID assigned by the provider.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n category: z.string().describe('Item category.').max(20).optional(),\n })\n )\n .min(1)\n .max(100),\n options: z.object({\n poolDefinitionId: z\n .string()\n .describe('ID of the pool definition associated with the benefit.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n benefitKey: z\n .string()\n .describe('Key identifying the benefit within the pool definition.')\n .max(64),\n }),\n});\nexport const RemoveItemsFromBenefitResponse = z.object({});\nexport const AddItemsToBenefitRequest = z.object({\n itemReferences: z\n .array(\n z.object({\n externalId: z\n .string()\n .describe('External item ID assigned by the provider.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n category: z.string().describe('Item category.').max(20).optional(),\n })\n )\n .min(1)\n .max(100),\n options: z.object({\n poolDefinitionId: z\n .string()\n .describe('ID of the pool definition associated with the benefit.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n benefitKey: z\n .string()\n .describe('Key identifying the benefit within the pool definition.')\n .max(64),\n }),\n});\nexport const AddItemsToBenefitResponse = z.object({});\n"],"mappings":";AAAA,YAAY,OAAO;AAEZ,IAAM,kCAAoC,SAAO;AAAA,EACtD,OACG;AAAA,IACG,SAAO;AAAA,MACP,QACG,SAAS,SAAO,GAAK,MAAI,CAAC,EAC1B;AAAA,QACC;AAAA,MACF,EACC,SAAS,EACT,SAAS;AAAA,MACZ,MACG;AAAA,QACG,SAAO;AAAA,UACP,WACG,SAAO,EACP,SAAS,+BAA+B,EACxC,IAAI,GAAG,EACP,SAAS;AAAA,UACZ,OAAS,OAAK,CAAC,OAAO,MAAM,CAAC,E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O,EAAE,SAAS,gBAAgB,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,IACnE,CAAC;AAAA,EACH,EACC,IAAI,CAAC,EACL,IAAI,GAAG;AAAA,EACV,SAAW,SAAO;AAAA,IAChB,kBACG,SAAO,EACP,SAAS,wDAAwD,EACjE;AAAA,MACC;AAAA,MACA;AAAA,IACF;AAAA,IACF,YACG,SAAO,EACP,SAAS,yDAAyD,EAClE,IAAI,EAAE;AAAA,EACX,CAAC;AACH,CAAC;AACM,IAAM,iCAAmC,SAAO,CAAC,CAAC;AAClD,IAAM,2BAA6B,SAAO;AAAA,EAC/C,gBACG;AAAA,IACG,SAAO;AAAA,MACP,YACG,SAAO,EACP,SAAS,4CAA4C,EACrD;AAAA,QACC;AAAA,QACA;AAAA,MACF;AAAA,MACF,UAAY,SAAO,EAAE,SAAS,gBAAgB,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,IACnE,CAAC;AAAA,EACH,EACC,IAAI,CAAC,EACL,IAAI,GAAG;AAAA,EACV,SAAW,SAAO;AAAA,IAChB,kBACG,SAAO,EACP,SAAS,wDAAwD,EACjE;AAAA,MACC;AAAA,MACA;AAAA,IACF;AAAA,IACF,YACG,SAAO,EACP,SAAS,yDAAyD,EAClE,IAAI,EAAE;AAAA,EACX,CAAC;AACH,CAAC;AACM,IAAM,4BAA8B,SAAO,CAAC,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.schemas.ts"],"sourcesContent":["import * as z from 'zod';\n\nexport const QueryPoolDefinitionItemsRequest = z.object({\n query: z\n .intersection(\n z.object({\n filter: z\n .record(z.string(), z.any())\n .describe(\n 'Filter object in the following format:\\n`\"filter\" : {\\n\"fieldName1\": \"value1\",\\n\"fieldName2\":{\"$operator\":\"value2\"}\\n}`\\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`'\n )\n .optional()\n .nullable(),\n sort: z\n .array(\n z.object({\n fieldName: z\n .string()\n .describe('Name of the field to sort by.')\n .max(512)\n .optional(),\n order: z.enum(['ASC', 'DESC']).optional(),\n })\n )\n .max(5)\n .optional(),\n }),\n z.xor([\n z.object({ cursorPaging: z.never().optional() }),\n z.object({\n cursorPaging: z\n .object({\n limit: z\n .number()\n .int()\n .describe('Maximum number of items to return in the results.')\n .min(0)\n .max(1000)\n .optional()\n .nullable(),\n cursor: z\n .string()\n .describe(\n \"Pointer to the next or previous page in the list of results.\\n\\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\\nNot relevant for the first request.\"\n )\n .max(16000)\n .optional()\n .nullable(),\n })\n .describe(\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 }),\n ])\n )\n .describe('Query to select benefit items.'),\n options: z\n .object({\n fields: z\n .array(\n z.enum(['POOL_DEFINITION', 'PROGRAM_DEFINITION', 'BENEFIT', 'ITEM'])\n )\n .max(4)\n .optional(),\n })\n .optional(),\n});\nexport const QueryPoolDefinitionItemsResponse = z.object({\n poolDefinitionItems: z\n .array(\n z.object({\n _id: z\n .string()\n .describe(\n 'Benefit item ID. Deterministically generated from pool_definition_id and item_id — if you know both, you can compute the ID without querying.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n revision: z\n .string()\n .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n .describe(\n 'Revision number, which increments by 1 each time the benefit item is updated.'\n )\n .optional()\n .nullable(),\n _createdDate: z\n .date()\n .describe('Date and time the item was created.')\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe('Date and time the item was updated.')\n .optional()\n .nullable(),\n externalId: z\n .string()\n .describe(\n \"External item ID assigned by the provider of the items.\\n\\nFor example, if the benefit items are products, this ID corresponds to the specific product ID in the provider's system.\"\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n category: z\n .string()\n .describe(\n 'Item category. Groups benefit items together for organization and management purposes. For example, classes, posts, groups.'\n )\n .max(20)\n .optional(),\n providerAppId: z\n .string()\n .describe(\n \"ID of the application providing the benefit items. Each item's external_id is unique within its provider application.\"\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n namespace: z\n .string()\n .describe(\n \"Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you\\ncreated and entities that other apps created.\"\n )\n .min(1)\n .max(20)\n .optional(),\n poolDefinitionId: z\n .string()\n .describe(\n 'ID of the pool definition - the configuration that defines a set of benefits and which items are accessible within each benefit.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n itemSetId: z\n .string()\n .describe(\n \"Internal grouping identifier for this benefit's item set. Use pool_definition_id together with benefit_key\\nto identify a benefit — item_set_id is an implementation detail.\"\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n poolDefinition: z\n .object({\n displayName: z\n .string()\n .describe('Pool definition name.')\n .max(64)\n .optional(),\n description: z\n .string()\n .describe('Pool definition description.')\n .max(450)\n .optional()\n .nullable(),\n creditConfiguration: z\n .object({\n amount: z\n .string()\n .describe(\n \"Number of credits initially granted to a subscriber when this pool definition's benefits are activated.\"\n )\n .optional(),\n unitDisplayName: z\n .string()\n .describe('Credit unit display name.')\n .max(32)\n .optional()\n .nullable(),\n unitType: z\n .string()\n .describe('Credit unit type.')\n .max(16)\n .optional()\n .nullable(),\n })\n .describe(\n 'Credit configuration for this pool definition. When absent, benefits in this pool do not support credit-based pricing.'\n )\n .optional(),\n })\n .describe(\n 'Pool definition details including display name, description, and credit settings. Only populated when\\nPOOL_DEFINITION is included in the fields request parameter.'\n )\n .optional(),\n programDefinitions: z\n .array(\n z.object({\n _id: z\n .string()\n .describe('Program definition id')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n externalId: z\n .string()\n .describe('Program definition external id')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n displayName: z\n .string()\n .describe('Program definition name')\n .max(64)\n .optional()\n .nullable(),\n description: z\n .string()\n .describe('Program definition description.')\n .max(450)\n .optional()\n .nullable(),\n })\n )\n .max(20)\n .optional(),\n itemId: z\n .string()\n .describe('Item ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n benefitInfo: z\n .object({\n price: z\n .string()\n .describe(\n \"Price of the benefit in credits. The price is the same for all of this benefit's items.\"\n )\n .optional()\n .nullable(),\n displayName: z\n .string()\n .describe('Benefit name.')\n .max(40)\n .optional()\n .nullable(),\n description: z\n .string()\n .describe('Benefit description.')\n .max(255)\n .optional()\n .nullable(),\n })\n .describe(\n 'Pricing and display information for the associated benefit, including credit price, name, and description.\\nOnly populated when BENEFIT is included in the fields request parameter.'\n )\n .optional(),\n itemInfo: z\n .object({\n displayName: z\n .string()\n .describe('Item display name.')\n .max(400)\n .optional()\n .nullable(),\n })\n .describe(\n 'Display name for the catalog item. Only populated when ITEM is included in the fields request parameter.'\n )\n .optional(),\n benefitKey: z\n .string()\n .describe(\n 'Unique identifier for the benefit associated with this item.'\n )\n .max(64)\n .optional(),\n itemReferenceSearchKey: z\n .string()\n .describe(\n 'Pre-computed search key for the item reference, built by concatenating provider_app_id, category, and external_id\\nseparated by /. Use this field for efficient single-field filtering instead of composing three separate conditions.'\n )\n .max(94)\n .optional(),\n })\n )\n .optional(),\n metadata: z\n .object({\n count: z\n .number()\n .int()\n .describe('Number of items returned in the response.')\n .optional()\n .nullable(),\n cursors: z\n .object({\n next: z\n .string()\n .describe(\n 'Cursor string pointing to the next page in the list of results.'\n )\n .max(16000)\n .optional()\n .nullable(),\n prev: z\n .string()\n .describe(\n 'Cursor pointing to the previous page in the list of results.'\n )\n .max(16000)\n .optional()\n .nullable(),\n })\n .describe(\n 'Cursor strings that point to the next page, previous page, or both.'\n )\n .optional(),\n hasNext: z\n .boolean()\n .describe(\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 .optional()\n .nullable(),\n })\n .describe('Metadata for paginated results.')\n .optional(),\n});\nexport const RemoveItemsFromBenefitRequest = z.object({\n itemReferences: z\n .array(\n z.object({\n externalId: z\n .string()\n .describe('External item ID assigned by the provider.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n category: z.string().describe('Item category.').max(20).optional(),\n })\n )\n .min(1)\n .max(100),\n options: z.object({\n poolDefinitionId: z\n .string()\n .describe('ID of the pool definition associated with the benefit.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n benefitKey: z\n .string()\n .describe('Key identifying the benefit within the pool definition.')\n .max(64),\n }),\n});\nexport const RemoveItemsFromBenefitResponse = z.object({\n results: z\n .array(\n z.object({\n itemMetadata: z\n .object({\n _id: z\n .string()\n .describe(\n \"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\"\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n originalIndex: z\n .number()\n .int()\n .describe(\n 'Index of the item within the request array. Allows for correlation between request and response items.'\n )\n .optional(),\n success: z\n .boolean()\n .describe(\n 'Whether the requested action was successful for this item. When `false`, the `error` field is populated.'\n )\n .optional(),\n error: z\n .object({\n code: z.string().describe('Error code.').optional(),\n description: z\n .string()\n .describe('Description of the error.')\n .optional(),\n data: z\n .record(z.string(), z.any())\n .describe('Data related to the error.')\n .optional()\n .nullable(),\n })\n .describe('Details about the error in case of failure.')\n .optional(),\n })\n .describe(\n 'Outcome metadata for a single item — includes the underlying item ID, success flag, and error details on failure.'\n )\n .optional(),\n })\n )\n .optional(),\n bulkActionMetadata: z\n .object({\n totalSuccesses: z\n .number()\n .int()\n .describe('Number of items that were successfully processed.')\n .optional(),\n totalFailures: z\n .number()\n .int()\n .describe(\"Number of items that couldn't be processed.\")\n .optional(),\n undetailedFailures: z\n .number()\n .int()\n .describe(\n 'Number of failures without details because detailed failure threshold was exceeded.'\n )\n .optional(),\n })\n .describe(\n 'Aggregate counts (successes, failures) for the bulk operation. Unresolved item references are counted as failures.'\n )\n .optional(),\n});\nexport const AddItemsToBenefitRequest = z.object({\n itemReferences: z\n .array(\n z.object({\n externalId: z\n .string()\n .describe('External item ID assigned by the provider.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n category: z.string().describe('Item category.').max(20).optional(),\n })\n )\n .min(1)\n .max(100),\n options: z.object({\n poolDefinitionId: z\n .string()\n .describe('ID of the pool definition associated with the benefit.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n benefitKey: z\n .string()\n .describe('Key identifying the benefit within the pool definition.')\n .max(64),\n }),\n});\nexport const AddItemsToBenefitResponse = z.object({\n results: z\n .array(\n z.object({\n itemMetadata: z\n .object({\n _id: z\n .string()\n .describe(\n \"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\"\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n originalIndex: z\n .number()\n .int()\n .describe(\n 'Index of the item within the request array. Allows for correlation between request and response items.'\n )\n .optional(),\n success: z\n .boolean()\n .describe(\n 'Whether the requested action was successful for this item. When `false`, the `error` field is populated.'\n )\n .optional(),\n error: z\n .object({\n code: z.string().describe('Error code.').optional(),\n description: z\n .string()\n .describe('Description of the error.')\n .optional(),\n data: z\n .record(z.string(), z.any())\n .describe('Data related to the error.')\n .optional()\n .nullable(),\n })\n .describe('Details about the error in case of failure.')\n .optional(),\n })\n .describe(\n 'Outcome metadata for the catalog item created in the underlying item service. The item ID here is the Item entity\\nID — PoolDefinitionItem records are created asynchronously and their IDs are not returned in this response.'\n )\n .optional(),\n })\n )\n .optional(),\n bulkActionMetadata: z\n .object({\n totalSuccesses: z\n .number()\n .int()\n .describe('Number of items that were successfully processed.')\n .optional(),\n totalFailures: z\n .number()\n .int()\n .describe(\"Number of items that couldn't be processed.\")\n .optional(),\n undetailedFailures: z\n .number()\n .int()\n .describe(\n 'Number of failures without details because detailed failure threshold was exceeded.'\n )\n .optional(),\n })\n .describe('Aggregate counts (successes, failures) for the bulk operation.')\n .optional(),\n});\n"],"mappings":";AAAA,YAAY,OAAO;AAEZ,IAAM,kCAAoC,SAAO;AAAA,EACtD,OACG;AAAA,IACG,SAAO;AAAA,MACP,QACG,SAAS,SAAO,GAAK,MAAI,CAAC,EAC1B;AAAA,QACC;AAAA,MACF,EACC,SAAS,EACT,SAAS;AAAA,MACZ,MACG;AAAA,QACG,SAAO;AAAA,UACP,WACG,SAAO,EACP,SAAS,+BAA+B,EACxC,IAAI,GAAG,EACP,SAAS;AAAA,UACZ,OAAS,OAAK,CAAC,OAAO,MAAM,CAAC,EAAE,SAAS;AAAA,QAC1C,CAAC;AAAA,MACH,EACC,IAAI,CAAC,EACL,SAAS;AAAA,IACd,CAAC;AAAA,IACC,MAAI;AAAA,MACF,SAAO,EAAE,cAAgB,QAAM,EAAE,SAAS,EAAE,CAAC;AAAA,MAC7C,SAAO;AAAA,QACP,cACG,SAAO;AAAA,UACN,OACG,SAAO,EACP,IAAI,EACJ,SAAS,mDAAmD,EAC5D,IAAI,CAAC,EACL,IAAI,GAAI,EACR,SAAS,EACT,SAAS;AAAA,UACZ,QACG,SAAO,EACP;AAAA,YACC;AAAA,UACF,EACC,IAAI,IAAK,EACT,SAAS,EACT,SAAS;AAAA,QACd,CAAC,EACA;AAAA,UACC;AAAA,QACF;AAAA,MACJ,CAAC;AAAA,IACH,CAAC;AAAA,EACH,EACC,SAAS,gCAAgC;AAAA,EAC5C,SACG,SAAO;AAAA,IACN,QACG;AAAA,MACG,OAAK,CAAC,mBAAmB,sBAAsB,WAAW,MAAM,CAAC;AAAA,IACrE,EACC,IAAI,CAAC,EACL,SAAS;AAAA,EACd,CAAC,EACA,SAAS;AACd,CAAC;AACM,IAAM,mCAAqC,SAAO;AAAA,EACvD,qBACG;AAAA,IACG,SAAO;AAAA,MACP,KACG,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC;AAAA,QACC;AAAA,QACA;AAA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;AACH,CAAC;AACM,IAAM,4BAA8B,SAAO;AAAA,EAChD,SACG;AAAA,IACG,SAAO;AAAA,MACP,cACG,SAAO;AAAA,QACN,KACG,SAAO,EACP;AAAA,UACC;AAAA,QACF,EACC;AAAA,UACC;AAAA,UACA;AAAA,QACF,EACC,SAAS,EACT,SAAS;AAAA,QACZ,eACG,SAAO,EACP,IAAI,EACJ;AAAA,UACC;AAAA,QACF,EACC,SAAS;AAAA,QACZ,SACG,UAAQ,EACR;AAAA,UACC;AAAA,QACF,EACC,SAAS;AAAA,QACZ,OACG,SAAO;AAAA,UACN,MAAQ,SAAO,EAAE,SAAS,aAAa,EAAE,SAAS;AAAA,UAClD,aACG,SAAO,EACP,SAAS,2BAA2B,EACpC,SAAS;AAAA,UACZ,MACG,SAAS,SAAO,GAAK,MAAI,CAAC,EAC1B,SAAS,4BAA4B,EACrC,SAAS,EACT,SAAS;AAAA,QACd,CAAC,EACA,SAAS,6CAA6C,EACtD,SAAS;AAAA,MACd,CAAC,EACA;AAAA,QACC;AAAA,MACF,EACC,SAAS;AAAA,IACd,CAAC;AAAA,EACH,EACC,SAAS;AAAA,EACZ,oBACG,SAAO;AAAA,IACN,gBACG,SAAO,EACP,IAAI,EACJ,SAAS,mDAAmD,EAC5D,SAAS;AAAA,IACZ,eACG,SAAO,EACP,IAAI,EACJ,SAAS,6CAA6C,EACtD,SAAS;AAAA,IACZ,oBACG,SAAO,EACP,IAAI,EACJ;AAAA,MACC;AAAA,IACF,EACC,SAAS;AAAA,EACd,CAAC,EACA,SAAS,gEAAgE,EACzE,SAAS;AACd,CAAC;","names":[]}
@@ -1,22 +1,31 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { ItemReference, RemoveItemsFromBenefitOptions, AddItemsToBenefitOptions, PoolDefinitionItemQuery, QueryPoolDefinitionItemsOptions, typedQueryPoolDefinitionItems, PoolDefinitionItemsQueryBuilder } from './index.typings.js';
3
- export { AccountInfo, ActionEvent, AddItemsToBenefitRequest, AddItemsToBenefitResponse, BenefitInfo, CommonQueryWithEntityContext, CreditConfiguration, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, IdentificationData, IdentificationDataIdOneOf, InvalidatePoolDefinitionItemsRequest, InvalidatePoolDefinitionItemsResponse, ItemInfo, MessageEnvelope, PoolDefinitionInfo, PoolDefinitionItem, PoolDefinitionItemDeactivated, PoolDefinitionItemQuerySpec, PoolDefinitionItemsQueryResult, ProgramDefinitionInfo, QueryPoolDefinitionItemsRequest, QueryPoolDefinitionItemsResponse, RemoveItemsFromBenefitRequest, RemoveItemsFromBenefitResponse, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
2
+ import { ItemReference, RemoveItemsFromBenefitOptions, RemoveItemsFromBenefitResponse, RemoveItemsFromBenefitApplicationErrors, AddItemsToBenefitOptions, AddItemsToBenefitResponse, AddItemsToBenefitApplicationErrors, PoolDefinitionItemQuery, QueryPoolDefinitionItemsOptions, typedQueryPoolDefinitionItems, PoolDefinitionItemsQueryBuilder } from './index.typings.js';
3
+ export { AccountInfo, ActionEvent, AddItemsToBenefitRequest, ApplicationError, BenefitInfo, BulkActionMetadata, BulkAddItemResult, BulkRemoveItemResult, CommonQueryWithEntityContext, CreditConfiguration, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, IdentificationData, IdentificationDataIdOneOf, InvalidatePoolDefinitionItemsRequest, InvalidatePoolDefinitionItemsResponse, ItemInfo, ItemMetadata, MessageEnvelope, PoolDefinitionInfo, PoolDefinitionItem, PoolDefinitionItemDeactivated, PoolDefinitionItemQuerySpec, PoolDefinitionItemRemoved, PoolDefinitionItemsQueryResult, ProgramDefinitionInfo, QueryPoolDefinitionItemsRequest, QueryPoolDefinitionItemsResponse, RemoveItemsFromBenefitRequest, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
4
4
 
5
5
  declare function removeItemsFromBenefit$1(httpClient: HttpClient): RemoveItemsFromBenefitSignature;
6
6
  interface RemoveItemsFromBenefitSignature {
7
7
  /**
8
- * Removes items from a benefit's item set, resolved by pool definition ID and benefit key.
8
+ * Removes items from a benefit. Items are removed asynchronously they may briefly still appear in
9
+ * QueryPoolDefinitionItems results after the call returns.
10
+ * Item references not matching any registered item appear in results as per-item failures with `item_metadata.error.code` set to `NOT_FOUND`.
9
11
  * @param - Items to remove from the benefit's item set.
10
12
  */
11
- (itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[], options: NonNullablePaths<RemoveItemsFromBenefitOptions, `benefitKey` | `poolDefinitionId`, 2>): Promise<void>;
13
+ (itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[], options: NonNullablePaths<RemoveItemsFromBenefitOptions, `benefitKey` | `poolDefinitionId`, 2>): Promise<NonNullablePaths<RemoveItemsFromBenefitResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6> & {
14
+ __applicationErrorsType?: RemoveItemsFromBenefitApplicationErrors;
15
+ }>;
12
16
  }
13
17
  declare function addItemsToBenefit$1(httpClient: HttpClient): AddItemsToBenefitSignature;
14
18
  interface AddItemsToBenefitSignature {
15
19
  /**
16
- * Adds items to a benefit's item set, resolved by pool definition ID and benefit key.
20
+ * Registers items with a benefit. This is an eventually consistent operation items may take a short time to appear
21
+ * in QueryPoolDefinitionItems results after the call returns. Uses a partial success model — items already registered
22
+ * with the benefit return a per-item error in results.item_metadata while successfully added items are unaffected.
23
+ * Check bulk_action_metadata for overall counts and results for per-item outcomes.
17
24
  * @param - Items to add to the benefit's item set.
18
25
  */
19
- (itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[], options: NonNullablePaths<AddItemsToBenefitOptions, `benefitKey` | `poolDefinitionId`, 2>): Promise<void>;
26
+ (itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[], options: NonNullablePaths<AddItemsToBenefitOptions, `benefitKey` | `poolDefinitionId`, 2>): Promise<NonNullablePaths<AddItemsToBenefitResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6> & {
27
+ __applicationErrorsType?: AddItemsToBenefitApplicationErrors;
28
+ }>;
20
29
  }
21
30
 
22
31
  declare function customQueryPoolDefinitionItems(httpClient: HttpClient): {
@@ -27,4 +36,4 @@ declare const removeItemsFromBenefit: MaybeContext<BuildRESTFunction<typeof remo
27
36
  declare const addItemsToBenefit: MaybeContext<BuildRESTFunction<typeof addItemsToBenefit$1> & typeof addItemsToBenefit$1>;
28
37
  declare const queryPoolDefinitionItems: MaybeContext<BuildRESTFunction<typeof customQueryPoolDefinitionItems> & typeof customQueryPoolDefinitionItems>;
29
38
 
30
- export { AddItemsToBenefitOptions, ItemReference, PoolDefinitionItemQuery, PoolDefinitionItemsQueryBuilder, QueryPoolDefinitionItemsOptions, RemoveItemsFromBenefitOptions, addItemsToBenefit, queryPoolDefinitionItems, removeItemsFromBenefit };
39
+ export { AddItemsToBenefitApplicationErrors, AddItemsToBenefitOptions, AddItemsToBenefitResponse, ItemReference, PoolDefinitionItemQuery, PoolDefinitionItemsQueryBuilder, QueryPoolDefinitionItemsOptions, RemoveItemsFromBenefitApplicationErrors, RemoveItemsFromBenefitOptions, RemoveItemsFromBenefitResponse, addItemsToBenefit, queryPoolDefinitionItems, removeItemsFromBenefit };
@@ -255,6 +255,7 @@ async function removeItemsFromBenefit2(itemReferences, options) {
255
255
  try {
256
256
  const result = await httpClient.request(reqOpts);
257
257
  sideEffects?.onSuccess?.(result);
258
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
258
259
  } catch (err) {
259
260
  const transformedError = (0, import_transform_error.transformError)(
260
261
  err,
@@ -285,6 +286,7 @@ async function addItemsToBenefit2(itemReferences, options) {
285
286
  try {
286
287
  const result = await httpClient.request(reqOpts);
287
288
  sideEffects?.onSuccess?.(result);
289
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
288
290
  } catch (err) {
289
291
  const transformedError = (0, import_transform_error.transformError)(
290
292
  err,