@wix/auto_sdk_benefit-programs_pools 1.0.39 → 1.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +1 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +1 -1
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +1 -1
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +1 -1
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +1 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/benefit-programs-v1-pool-pools.universal.ts","../../src/benefit-programs-v1-pool-pools.http.ts","../../src/benefit-programs-v1-pool-pools.public.ts","../../src/benefit-programs-v1-pool-pools.context.ts"],"sourcesContent":["export * from './src/benefit-programs-v1-pool-pools.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBenefitProgramsV1Pool from './benefit-programs-v1-pool-pools.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface Pool {\n /**\n * Pool ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the pool is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the pool.\n *\n * Ignored when creating a pool.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the pool was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the pool was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * ID of the associated pool definition.\n * @format GUID\n * @readonly\n * @immutable\n */\n poolDefinitionId?: string | null;\n /**\n * ID of the associated program definition.\n * @format GUID\n * @readonly\n * @immutable\n */\n programDefinitionId?: string | null;\n /**\n * ID of the program that contains this pool.\n * @format GUID\n * @readonly\n * @immutable\n */\n programId?: string | null;\n /**\n * Pool status.\n * @readonly\n */\n status?: PoolStatusWithLiterals;\n /**\n * Pool beneficiary.\n * @readonly\n * @immutable\n */\n beneficiary?: CommonIdentificationData;\n /** Pool benefits and settings. */\n details?: Details;\n /**\n * Pool name.\n *\n * You may want to use the same name that's used in the associated pool definition.\n * @maxLength 64\n */\n displayName?: string;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @readonly\n * @immutable\n * @minLength 1\n * @maxLength 20\n */\n namespace?: string | null;\n /**\n * Custom field data for the pool object.\n *\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * Associated program definition information.\n * @readonly\n */\n programDefinition?: ProgramDefinitionInfo;\n /**\n * Information about the program containing the pool.\n * @readonly\n */\n program?: PoolProgramInfo;\n /**\n * Version of the pool definition that this pool was created from.\n * @readonly\n */\n poolDefinitionRevision?: string | null;\n /**\n * Number of times this pool has been renewed.\n * @readonly\n */\n renewalCount?: number | null;\n}\n\nexport enum PoolStatus {\n /** Undefined pool status. */\n UNDEFINED = 'UNDEFINED',\n /** Pool is active. */\n ACTIVE = 'ACTIVE',\n /** Pool is paused. It can be resumed. */\n PAUSED = 'PAUSED',\n /** Pool is ended. It can't be resumed. */\n ENDED = 'ENDED',\n /** Pool provisioning is in progress. This status exists for a short time during processing. */\n PROVISIONING = 'PROVISIONING',\n /** Pool renewing is in progress. This status exists for a short time during processing. */\n RENEWING = 'RENEWING',\n /** Pool is pending */\n PENDING = 'PENDING',\n}\n\n/** @enumType */\nexport type PoolStatusWithLiterals =\n | PoolStatus\n | 'UNDEFINED'\n | 'ACTIVE'\n | 'PAUSED'\n | 'ENDED'\n | 'PROVISIONING'\n | 'RENEWING'\n | 'PENDING';\n\nexport interface CommonIdentificationData\n extends CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor that hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site member.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n}\n\n/** @oneof */\nexport interface CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor that hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site member.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n}\n\nexport enum IdentityType {\n /** Unknown type. This value is not used. */\n UNKNOWN = 'UNKNOWN',\n /** A site visitor who has not logged in. */\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n /** A logged-in site member. */\n MEMBER = 'MEMBER',\n /** A Wix account holder, such as a site owner or contributor. */\n WIX_USER = 'WIX_USER',\n}\n\n/** @enumType */\nexport type IdentityTypeWithLiterals =\n | IdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER';\n\nexport interface Details {\n /**\n * List of benefits.\n * @maxSize 10\n */\n benefits?: Benefit[];\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 /** Additional information relating to this object. */\n additionalData?: Record<string, any> | null;\n}\n\nexport interface Benefit {\n /**\n * Unique identifier for this benefit.\n *\n * This key is consistent across the pool definition and all associated pools that contain this benefit.\n * @maxLength 64\n */\n benefitKey?: string;\n /**\n * ID that is used to associated items with this benefit.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string | null;\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 /** Additional information for this benefit. */\n additionalData?: Record<string, any> | null;\n /**\n * ID of the app providing the benefit items.\n * @format GUID\n * @immutable\n */\n providerAppId?: 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 PolicyExpression extends PolicyExpressionExpressionOneOf {\n /** Benefits can be redeemed if the expression in this object is not fulfilled. */\n operatorNotOptions?: PolicyExpressionNot;\n /** Benefits can be redeemed if all the expression in this object's array are fulfilled. */\n operatorAndOptions?: PolicyExpressionAnd;\n /** Benefits can be redeemed if at least one of the expressions in this object's array is fulfilled. */\n operatorOrOptions?: PolicyExpressionOr;\n /** Defines when benefits can be redeemed or how many benefits can be redeemed in a specific time period. */\n policyOptions?: Policy;\n /** Policy expression type. */\n type?: PolicyExpressionTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface PolicyExpressionExpressionOneOf {\n /** Benefits can be redeemed if the expression in this object is not fulfilled. */\n operatorNotOptions?: PolicyExpressionNot;\n /** Benefits can be redeemed if all the expression in this object's array are fulfilled. */\n operatorAndOptions?: PolicyExpressionAnd;\n /** Benefits can be redeemed if at least one of the expressions in this object's array is fulfilled. */\n operatorOrOptions?: PolicyExpressionOr;\n /** Defines when benefits can be redeemed or how many benefits can be redeemed in a specific time period. */\n policyOptions?: Policy;\n}\n\nexport enum PolicyExpressionType {\n UNKNOWN = 'UNKNOWN',\n /** Use with `operatorNotOptions`. */\n OPERATOR_NOT = 'OPERATOR_NOT',\n /** Use with `operatorAndOptions`. */\n OPERATOR_AND = 'OPERATOR_AND',\n /** Use with `operatorOrOptions`. */\n OPERATOR_OR = 'OPERATOR_OR',\n /** Use with `policyOptions`. */\n POLICY = 'POLICY',\n}\n\n/** @enumType */\nexport type PolicyExpressionTypeWithLiterals =\n | PolicyExpressionType\n | 'UNKNOWN'\n | 'OPERATOR_NOT'\n | 'OPERATOR_AND'\n | 'OPERATOR_OR'\n | 'POLICY';\n\nexport interface PolicyExpressionNot {\n /** Policy expression. If this expression is not fulfilled, benefits can be redeemed. */\n expression?: PolicyExpression;\n}\n\nexport interface PolicyExpressionAnd {\n /**\n * Array of policy expressions. If all expressions are fulfilled, benefits can be redeemed.\n * @minSize 2\n * @maxSize 10\n */\n expressions?: PolicyExpression[];\n}\n\nexport interface PolicyExpressionOr {\n /**\n * Array of policy expressions. If at least one expression is fulfilled, benefits can be redeemed.\n * @minSize 2\n * @maxSize 10\n */\n expressions?: PolicyExpression[];\n}\n\nexport interface Policy extends PolicyPolicyOneOf {\n /**\n * Defines an interval during which the policy expression is fulfilled.\n *\n * If `fromWeekDay` and `toWeekDay` are defined, this interval applies weekly. Otherwise, it applies daily.\n */\n fixedIntervalOptions?: FixedIntervalPolicy;\n /** Maximum amount of times a benefit can be redeemed during a specified time period. */\n rateLimitedOptions?: RateLimitedPolicy;\n /** Custom policy defined by a different app. */\n customOptions?: CustomPolicy;\n /** Policy type. */\n type?: TypeWithLiterals;\n}\n\n/** @oneof */\nexport interface PolicyPolicyOneOf {\n /**\n * Defines an interval during which the policy expression is fulfilled.\n *\n * If `fromWeekDay` and `toWeekDay` are defined, this interval applies weekly. Otherwise, it applies daily.\n */\n fixedIntervalOptions?: FixedIntervalPolicy;\n /** Maximum amount of times a benefit can be redeemed during a specified time period. */\n rateLimitedOptions?: RateLimitedPolicy;\n /** Custom policy defined by a different app. */\n customOptions?: CustomPolicy;\n}\n\nexport enum Type {\n /** Unknown policy type. */\n UNKNOWN = 'UNKNOWN',\n /** Use with `fixedIntervalOptions`. */\n FIXED_INTERVAL = 'FIXED_INTERVAL',\n /** Use with `rateLimitedOptions`. */\n RATE_LIMITED = 'RATE_LIMITED',\n /** Use with `customOptions`. */\n CUSTOM = 'CUSTOM',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN'\n | 'FIXED_INTERVAL'\n | 'RATE_LIMITED'\n | 'CUSTOM';\n\nexport interface FixedIntervalPolicy {\n /** Weekday that this interval starts from. If this field is defined, then `toWeekDay` is required. */\n fromWeekDay?: WeekDayWithLiterals;\n /** Weekday that this interval ends at. If this field is defined, then `fromWeekDay` is required. */\n toWeekDay?: WeekDayWithLiterals;\n /**\n * Hour that this interval starts from. If this field is defined, then `toHour` is required.\n * @max 23\n */\n fromHour?: number | null;\n /**\n * Hour that this interval ends at. If this field is defined, then `fromHour` is required.\n * @max 23\n */\n toHour?: number | null;\n /**\n * Minute that this interval starts from. If this field is defined, then `toMinute` is required.\n * @max 59\n */\n fromMinute?: number | null;\n /**\n * Minute that this interval ends at. If this field is defined, then `fromMinute` is required.\n * @max 59\n */\n toMinute?: number | null;\n}\n\nexport enum WeekDay {\n /** Unknown weekday. */\n UNKNOWN = 'UNKNOWN',\n /** Monday. */\n MONDAY = 'MONDAY',\n /** Tuesday. */\n TUESDAY = 'TUESDAY',\n /** Wednesday. */\n WEDNESDAY = 'WEDNESDAY',\n /** Thursday. */\n THURSDAY = 'THURSDAY',\n /** Friday. */\n FRIDAY = 'FRIDAY',\n /** Saturday. */\n SATURDAY = 'SATURDAY',\n /** Sunday. */\n SUNDAY = 'SUNDAY',\n}\n\n/** @enumType */\nexport type WeekDayWithLiterals =\n | WeekDay\n | 'UNKNOWN'\n | 'MONDAY'\n | 'TUESDAY'\n | 'WEDNESDAY'\n | 'THURSDAY'\n | 'FRIDAY'\n | 'SATURDAY'\n | 'SUNDAY';\n\nexport interface RateLimitedPolicy extends RateLimitedPolicyPeriodOneOf {\n /** Fixed interval used to limit benefit redemption. */\n fixedIntervalOptions?: FixedIntervalPolicy;\n /** Maximum number of times a benefit can be redeemed per specified time period. */\n times?: number;\n /** Time period type. */\n type?: RateLimitedPolicyTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface RateLimitedPolicyPeriodOneOf {\n /** Fixed interval used to limit benefit redemption. */\n fixedIntervalOptions?: FixedIntervalPolicy;\n}\n\nexport enum RateLimitedPolicyType {\n /** Unknown rate limit method. */\n UNKNOWN = 'UNKNOWN',\n /** Time period is defined using `fixedIntervalOptions`. */\n FIXED_INTERVAL = 'FIXED_INTERVAL',\n /** Time period is from one program renewal to the next. */\n PER_CYCLE = 'PER_CYCLE',\n}\n\n/** @enumType */\nexport type RateLimitedPolicyTypeWithLiterals =\n | RateLimitedPolicyType\n | 'UNKNOWN'\n | 'FIXED_INTERVAL'\n | 'PER_CYCLE';\n\n/** Custom policy as implemented by the Entitlement Policy Provider */\nexport interface CustomPolicy {\n /**\n * Policy ID.\n * @format GUID\n */\n _id?: string;\n /**\n * ID of the app providing the policy.\n * @format GUID\n */\n appId?: string | null;\n /** Additional information for this custom policy. */\n additionalData?: Record<string, any> | null;\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 /** Rollover settings. */\n rolloverConfiguration?: RolloverConfiguration;\n /**\n * Credit unit display name.\n * @maxLength 32\n */\n unitDisplayName?: string | null;\n}\n\nexport interface RolloverConfiguration {\n /** Whether unused credits roll over to a new cycle when a program renews. */\n enabled?: boolean | null;\n /**\n * Maximum number of credits that can roll over to the next cycle when a program renews.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n balanceCap?: string | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface ProgramDefinitionInfo {\n /**\n * Program definition ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Program definition external ID.\n * @format GUID\n * @readonly\n */\n externalId?: string | null;\n}\n\nexport interface PoolProgramInfo {\n /**\n * Program ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Program external ID.\n * @format GUID\n * @readonly\n */\n externalId?: string | null;\n}\n\nexport enum PoolOrigin {\n /** Unknown pool origin. */\n UNKNOWN = 'UNKNOWN',\n /** Benefit pool created by a program provision. */\n PROVISION = 'PROVISION',\n /** Benefit pool was created when pool definition was added to program definition. */\n CASCADE = 'CASCADE',\n}\n\n/** @enumType */\nexport type PoolOriginWithLiterals =\n | PoolOrigin\n | 'UNKNOWN'\n | 'PROVISION'\n | 'CASCADE';\n\nexport interface PoolRenewalAction extends PoolRenewalActionActionOneOf {\n /**\n * The pool's details (benefits and settings) will be updated to match the details of the specified pool definition revision.\n * @readonly\n */\n updateOptions?: Update;\n /**\n * Version of the pool definition that will be used when the pool is renewed.\n * @readonly\n */\n poolDefinitionRevision?: string | null;\n /**\n * The action that will be taken when the pool is renewed\n * @readonly\n */\n type?: PoolRenewalActionTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface PoolRenewalActionActionOneOf {\n /**\n * The pool's details (benefits and settings) will be updated to match the details of the specified pool definition revision.\n * @readonly\n */\n updateOptions?: Update;\n}\n\nexport enum PoolRenewalActionType {\n /** Undefined action type. */\n UNDEFINED = 'UNDEFINED',\n /** Pool will end on program renewal */\n END = 'END',\n /** Pool will be updated on program renewal */\n UPDATE = 'UPDATE',\n}\n\n/** @enumType */\nexport type PoolRenewalActionTypeWithLiterals =\n | PoolRenewalActionType\n | 'UNDEFINED'\n | 'END'\n | 'UPDATE';\n\nexport interface Update {\n /**\n * The pool's details will be updated to match the details of the specified pool definition revision.\n * @readonly\n */\n details?: Details;\n /**\n * The pool's display name will be updated to match the display name of the specified pool definition revision.\n * @maxLength 64\n */\n displayName?: string;\n}\n\nexport interface PoolProvisioned {\n /** Pool which has been provisioned */\n pool?: Pool;\n}\n\nexport interface PoolRenewed {\n /** Pool which has been granted */\n pool?: Pool;\n}\n\nexport interface BenefitRedeemed {\n /** Pool which has been redeemed */\n pool?: Pool;\n /** Details of the redemption */\n redemptionDetails?: RedemptionDetails;\n}\n\nexport interface RedemptionDetails {\n /**\n * Id of the redemption transaction\n * @format GUID\n */\n transactionId?: string;\n /** Reference of the item that is being redeemed */\n itemReference?: ItemReference;\n /**\n * Number of of items to redeem\n * @min 1\n */\n itemCount?: number;\n /**\n * Date at which the item will be used. Target date does not necessarily equal the redemption date. Credits are redeemed immediately.\n * This date is only used for validations that may be performed by entitlement providers\n */\n targetDate?: Date | null;\n /**\n * Idempotency key\n * @maxLength 200\n */\n idempotencyKey?: string;\n /** Additional info provided during redemption */\n additionalData?: Record<string, any> | null;\n /** Beneficiary of the entitlement */\n beneficiary?: CommonIdentificationData;\n}\n\nexport interface ItemReference {\n /**\n * External ID of the item.\n * @format GUID\n */\n externalId?: string;\n /**\n * Item category.\n * @maxLength 20\n */\n category?: string;\n /**\n * ID of the app providing the item.\n * @format GUID\n */\n providerAppId?: string;\n}\n\nexport interface PoolPaused {\n /** Pool which has been paused */\n pool?: Pool;\n}\n\nexport interface PoolResumed {\n /** Pool which has been resumed */\n pool?: Pool;\n}\n\nexport interface PoolEnded {\n /** Pool which has been ended */\n pool?: Pool;\n}\n\nexport interface BenefitReserved {\n /** Pool which was used to perform this transaction */\n pool?: Pool;\n /** Details of the redemption */\n redemptionDetails?: RedemptionDetails;\n}\n\nexport interface BenefitReservationCanceled {\n /** Pool which was used to perform this transaction */\n pool?: Pool;\n /**\n * Id of the canceled reservation transaction\n * @format GUID\n */\n transactionId?: string;\n}\n\nexport interface BenefitReservationReleased {\n /** Pool which was used to perform this transaction */\n pool?: Pool;\n /**\n * Id of the released reservation transaction\n * @format GUID\n */\n transactionId?: string;\n}\n\nexport interface PoolProvisionJobFinished {\n /**\n * Program id\n * @format GUID\n */\n programId?: string;\n /** Processed item count */\n processedItemCount?: number;\n /** Origin of the pool */\n origin?: PoolOriginWithLiterals;\n}\n\nexport interface PoolStatusUpdateJobFinished\n extends PoolStatusUpdateJobFinishedContextOneOf {\n /** The id of the pool definition that is being updated */\n poolDefinitionAndProgramDefinition?: PoolDefinitionAndProgramDefinition;\n /** Update the status of all pools in the program */\n programInfo?: ProgramInfo;\n /** Update the status of a specific pool */\n poolInfo?: PoolStatusUpdateParamsPoolInfo;\n /** Target status of the pool */\n targetStatus?: PoolStatusWithLiterals;\n /** The total number of items that were processed */\n processedItemCount?: number;\n}\n\n/** @oneof */\nexport interface PoolStatusUpdateJobFinishedContextOneOf {\n /** The id of the pool definition that is being updated */\n poolDefinitionAndProgramDefinition?: PoolDefinitionAndProgramDefinition;\n /** Update the status of all pools in the program */\n programInfo?: ProgramInfo;\n /** Update the status of a specific pool */\n poolInfo?: PoolStatusUpdateParamsPoolInfo;\n}\n\nexport interface PoolDefinitionAndProgramDefinition {\n /**\n * The id of the pool definition that is being updated\n * @format GUID\n * @readonly\n */\n poolDefinitionId?: string;\n /**\n * The key of the program that is being updated\n * @format GUID\n */\n programDefinitionId?: string | null;\n}\n\nexport interface ProgramInfo {\n /**\n * The key of the program that is being updated\n * @format GUID\n */\n programId?: string;\n /** Additional data that was provided when the job was submitted */\n additionalData?: Record<string, any> | null;\n}\n\nexport interface PoolStatusUpdateParamsPoolInfo {\n /**\n * The key of the program that is being updated\n * @format GUID\n */\n poolId?: string;\n /** Additional data that was provided when the job was submitted */\n additionalData?: Record<string, any> | null;\n}\n\nexport interface CreatePoolRequest {\n /** Pool to be created. */\n pool?: Pool;\n}\n\nexport interface CreatePoolResponse {\n /** Created pool. */\n pool?: Pool;\n}\n\nexport interface GetPoolRequest {\n /**\n * ID of the pool to retrieve.\n * @format GUID\n */\n poolId: string;\n}\n\nexport interface GetPoolResponse {\n /** Retrieved pool. */\n pool?: Pool;\n}\n\nexport interface UpdatePoolRequest {\n /** Pool to update. */\n pool: Pool;\n}\n\nexport interface UpdatePoolResponse {\n /** Updated pool. */\n pool?: Pool;\n}\n\nexport interface DeletePoolRequest {\n /**\n * ID of the pool to delete.\n * @format GUID\n */\n poolId?: string;\n}\n\nexport interface DeletePoolResponse {}\n\nexport interface QueryPoolsRequest {\n /** Filter, sort, and paging to apply to the query. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n * See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)\n * for more information.\n */\n filter?: Record<string, any> | null;\n /**\n * List of sort objects.\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /**\n * Sort order. Use `ASC` for ascending order or `DESC` for descending order.\n *\n * Default: `ASC`\n */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n /** Ascending sort order. */\n ASC = 'ASC',\n /** Descending sort order. */\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.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryPoolsResponse {\n /** List of retrieved pools. */\n pools?: Pool[];\n /** Metadata for the 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 RedeemBenefitRequest {\n /**\n * ID of the pool that contains the benefit to redeem.\n * @format GUID\n */\n poolId: string;\n /** Information about the item to redeem. */\n itemReference: ItemReference;\n /**\n * Key of the benefit to redeem.\n * @maxLength 64\n */\n benefitKey: string;\n /**\n * Amount of items to redeem.\n * @min 1\n */\n count?: number;\n /**\n * Date that the item will be provided to the beneficiary.\n *\n * The pool's associated balance will update immediately. This parameter should be used to manage the logistics of providing the item.\n */\n targetDate?: Date | null;\n /**\n * Unique identifier, generated by the client.\n * Used to recognize repeated attempts to make the same request.\n * @maxLength 200\n */\n idempotencyKey: string;\n /** Additional information. */\n additionalData?: Record<string, any> | null;\n /** Beneficiary of the pool containing the benefit to redeem. */\n beneficiary?: CommonIdentificationData;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n}\n\nexport interface RedeemBenefitResponse {\n /**\n * ID of the transaction recording the associated change in balance.\n * @format GUID\n */\n transactionId?: string;\n}\n\nexport interface NotEnoughBalance {\n /**\n * Pool ID.\n * @format GUID\n */\n poolId?: string;\n /** Item reference. */\n itemReference?: ItemReference;\n /**\n * Pool's associated balance amount in credits.\n * @decimalValue options { maxScale:4 }\n */\n availableBalance?: string;\n /**\n * Price of the item in credits.\n * @decimalValue options { maxScale:4 }\n */\n requestedBalance?: string;\n}\n\nexport interface PoolInfo {\n /** Current pool balance */\n balance?: BalanceAmount;\n /**\n * Initial available amount for associated balances.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n creditAmount?: string | null;\n /**\n * Pool name\n * @maxLength 64\n */\n displayName?: string;\n /**\n * Pool description\n * @maxLength 256\n */\n description?: string | null;\n}\n\nexport interface BalanceAmount {\n /**\n * number of available credits.\n * @decimalValue options { maxScale:4 }\n * @readonly\n */\n available?: string;\n /**\n * number of reserved credits.\n * @decimalValue options { maxScale:4 }\n * @readonly\n */\n reserved?: string;\n}\n\nexport interface BenefitInfo {\n /**\n * Benefit name\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * Benefit description\n * @maxLength 256\n */\n description?: string | null;\n}\n\nexport interface PolicyExpressionEvaluatedToFalse {\n /**\n * Pool ID.\n * @format GUID\n */\n poolId?: string;\n /** Item reference. */\n itemReference?: ItemReference;\n /**\n * Failure details.\n * @maxSize 10\n */\n failureDetails?: FailureDetails[];\n}\n\nexport interface FailureDetails {\n /**\n * Failure code\n * @minLength 1\n * @maxLength 64\n */\n code?: string;\n /**\n * Failure message\n * @maxLength 256\n */\n message?: string | null;\n /**\n * Policy id\n * @format GUID\n */\n policyId?: string | null;\n /**\n * App that owns the policy\n * @format GUID\n */\n appId?: string | null;\n /** Information provided by the policy */\n errorData?: Record<string, any> | null;\n}\n\nexport interface PoolNotActive {\n /**\n * Pool ID.\n * @format GUID\n */\n poolId?: string;\n /** Pool status. */\n poolStatus?: PoolStatusWithLiterals;\n}\n\nexport interface PoolNotFound {\n /**\n * Pool ID.\n * @format GUID\n */\n poolId?: string;\n}\n\nexport interface BenefitAlreadyRedeemed {\n /**\n * Pool ID\n * @format GUID\n */\n poolId?: string;\n /**\n * Idempotency key of the request that failed\n * @maxLength 200\n */\n idempotencyKey?: string;\n}\n\nexport interface BenefitNotFound {\n /**\n * Pool ID.\n * @format GUID\n */\n poolId?: string;\n /**\n * Specified benefit key.\n * @format GUID\n */\n benefitKey?: string | null;\n}\n\nexport interface ReserveBenefitRequest {\n /**\n * Id of the pool that is being redeemed from\n * @format GUID\n */\n poolId?: string;\n /** Reference of the item that is being redeemed. */\n itemReference?: ItemReference;\n /**\n * Key of the benefit to be redeemed, associated with a particular benefit.\n *\n * This key must be specified to ensure the correct benefit is redeemed.\n *\n * Default: The first eligible benefit in the benefit pool will be redeemed.\n * @maxLength 64\n */\n benefitKey?: string | null;\n /**\n * Number of items to redeem.\n * @min 1\n */\n count?: number;\n /**\n * Date when the benefit item will be used.\n *\n * While the credit balance is adjusted immediately upon the redemption request, the target date may be set for a later time than the date of the request.\n *\n * Used for the app providing the benefit items to manage the logistics associated with the item.\n */\n targetDate?: Date | null;\n /**\n * Idempotency key\n * @maxLength 200\n */\n idempotencyKey?: string;\n /** Additional info */\n additionalData?: Record<string, any> | null;\n /** Benefit pool owner. */\n beneficiary?: CommonIdentificationData;\n /**\n * Module that is the source of the benefit pool creation.\n *\n * This value must correspond with the previously defined namespace established when creating the associated pool definition.\n *\n * It ensures efficient processing and management of pools and benefits.\n * @minLength 1\n * @maxLength 20\n */\n namespace?: string;\n}\n\nexport interface ReserveBenefitResponse {\n /**\n * Id of the transaction that was created as a result of this request\n * @format GUID\n */\n transactionId?: string;\n}\n\nexport interface CancelBenefitReservationRequest {\n /**\n * Id of the transaction that was created as a result of this request\n * @format GUID\n */\n transactionId?: string;\n}\n\nexport interface CancelBenefitReservationResponse {\n /**\n * Id of the transaction that was created as a result of this request\n * @format GUID\n */\n transactionId?: string;\n}\n\nexport interface ReleaseBenefitReservationRequest {\n /**\n * Id of the transaction that was created as a result of this request\n * @format GUID\n */\n transactionId?: string;\n}\n\nexport interface ReleaseBenefitReservationResponse {\n /**\n * Id of the transaction that was created as a result of this request\n * @format GUID\n */\n transactionId?: string;\n}\n\nexport interface CheckBenefitEligibilityRequest {\n /**\n * ID of the pool that the benefit to check belongs to.\n * @format GUID\n */\n poolId: string;\n /**\n * Key of the benefit to check.\n * @maxLength 64\n */\n benefitKey?: string | null;\n /** Information about the item to check. */\n itemReference: ItemReference;\n /**\n * Amount of items to check.\n *\n * Ensures the balance is high enough to redeem this many items.\n * @min 1\n */\n count?: number;\n /**\n * Date that the item will be provided to the beneficiary.\n *\n * This parameter should be used to manage the potential logistics of providing the item.\n */\n targetDate?: Date | null;\n /** Additional information. */\n additionalData?: Record<string, any> | null;\n /** Beneficiary of the pool containing the benefit to check. */\n beneficiary?: CommonIdentificationData;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n}\n\nexport interface CheckBenefitEligibilityResponse {\n /** Result of the eligibility check. */\n result?: EligibilityCheckResult;\n}\n\nexport interface EligibilityCheckResult\n extends EligibilityCheckResultResultOneOf {\n /** Returned when item is eligible to be redeemed. */\n eligibleOptions?: Eligible;\n /** Returned when the pool's associated balance is lower than the cost of redeeming the items. */\n notEnoughBalanceOptions?: NotEnoughBalance;\n /** Returned when the pool isn't active. */\n poolNotActiveOptions?: PoolNotActive;\n /** Returned when invalid benefit details are provided. */\n benefitNotFoundOptions?: BenefitNotFound;\n /** Returned when invalid pool details are provided. */\n poolNotFoundOptions?: PoolNotFound;\n /** Eligibility status. */\n type?: EligibilityCheckResultTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface EligibilityCheckResultResultOneOf {\n /** Returned when item is eligible to be redeemed. */\n eligibleOptions?: Eligible;\n /** Returned when the pool's associated balance is lower than the cost of redeeming the items. */\n notEnoughBalanceOptions?: NotEnoughBalance;\n /** Returned when the pool isn't active. */\n poolNotActiveOptions?: PoolNotActive;\n /** Returned when invalid benefit details are provided. */\n benefitNotFoundOptions?: BenefitNotFound;\n /** Returned when invalid pool details are provided. */\n poolNotFoundOptions?: PoolNotFound;\n}\n\nexport interface EligibleBenefit {\n /**\n * Pool ID.\n * @format GUID\n * @readonly\n */\n poolId?: string;\n /**\n * Benefit key.\n * @maxLength 64\n */\n benefitKey?: string;\n /** Item reference. */\n itemReference?: ItemReference;\n /**\n * Price of the benefit in credits.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n price?: string | null;\n}\n\nexport enum EligibilityCheckResultType {\n /** Unknown eligibility. */\n UNKNOWN = 'UNKNOWN',\n /** Item is eligible to be redeemed. */\n ELIGIBLE = 'ELIGIBLE',\n /** Balance is lower than the cost of redeeming the items. */\n NOT_ENOUGH_BALANCE = 'NOT_ENOUGH_BALANCE',\n /** Pool isn't active. */\n POOL_NOT_ACTIVE = 'POOL_NOT_ACTIVE',\n /** Invalid benefit details provided. */\n BENEFIT_NOT_FOUND = 'BENEFIT_NOT_FOUND',\n /** Invalid pool details provided. */\n POOL_NOT_FOUND = 'POOL_NOT_FOUND',\n}\n\n/** @enumType */\nexport type EligibilityCheckResultTypeWithLiterals =\n | EligibilityCheckResultType\n | 'UNKNOWN'\n | 'ELIGIBLE'\n | 'NOT_ENOUGH_BALANCE'\n | 'POOL_NOT_ACTIVE'\n | 'BENEFIT_NOT_FOUND'\n | 'POOL_NOT_FOUND';\n\nexport interface Eligible {\n /**\n * Benefits that are eligible to be redeemed.\n * @maxSize 100\n */\n eligibleBenefits?: EligibleBenefit[];\n}\n\nexport interface BulkCheckBenefitEligibilityRequest {\n /**\n * List of benefits to check.\n * @minSize 1\n * @maxSize 100\n */\n benefitSelectors?: BenefitSelector[];\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n /** Pool beneficiary. */\n beneficiary?: CommonIdentificationData;\n}\n\nexport interface BenefitSelector {\n /**\n * ID of the pool that the benefit to check belongs to.\n * @format GUID\n */\n poolId?: string;\n /**\n * Key of the benefit to check.\n * @maxLength 64\n */\n benefitKey?: string | null;\n /** Information about the item to check. */\n itemReference?: ItemReference;\n /**\n * Amount of items to check.\n *\n * Ensures the balance is high enough to redeem this many it\n * @min 1\n */\n count?: number;\n /**\n * Date that the item will be provided to the beneficiary.\n *\n * This parameter should be used to manage the potential logistics of providing the item.\n */\n targetDate?: Date | null;\n /** Additional information. */\n additionalData?: Record<string, any> | null;\n}\n\nexport interface BulkCheckBenefitEligibilityResponse {\n /**\n * List of results checking each benefit.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkEligibilityCheckResult[];\n}\n\nexport interface BulkEligibilityCheckResult {\n /** Benefit information specified in API call. */\n benefitSelector?: BenefitSelector;\n /** Result of the eligibility check. */\n result?: EligibilityCheckResult;\n}\n\nexport interface GetEligibleBenefitsRequest {\n /** Item reference. */\n itemReference: ItemReference;\n /**\n * Amount of items to check. This ensures the balance is high enough to redeem this many items.\n * @min 1\n */\n count?: number;\n /**\n * Date that the item will be provided to the beneficiary.\n *\n * This parameter should be used to manage the potential logistics of providing the item.\n */\n targetDate?: Date | null;\n /** Additional information. */\n additionalData?: Record<string, any> | null;\n /** Filter request by beneficiary. */\n beneficiary?: CommonIdentificationData;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n}\n\nexport interface GetEligibleBenefitsResponse {\n /** Retrieved benefits that can be redeemed. */\n eligibleBenefits?: EligibleBenefit[];\n}\n\nexport interface ListPoolsRequest {\n /** The filter */\n filter?: Filter;\n /** Cursor paging */\n cursorPaging?: CursorPaging;\n}\n\nexport enum ListPoolsRequestType {\n UNKNOWN_FILTER = 'UNKNOWN_FILTER',\n BY_ITEM_REFERENCE = 'BY_ITEM_REFERENCE',\n}\n\n/** @enumType */\nexport type ListPoolsRequestTypeWithLiterals =\n | ListPoolsRequestType\n | 'UNKNOWN_FILTER'\n | 'BY_ITEM_REFERENCE';\n\nexport interface ByItemReference {\n /**\n * A list of filters\n * @maxSize 100\n */\n filters?: ByItemReferenceFilter[];\n /** Beneficiary of the pool */\n beneficiary?: CommonIdentificationData;\n /**\n * Returns pools that are in the following statuses\n * @maxSize 10\n */\n poolStatuses?: PoolStatusWithLiterals[];\n}\n\nexport interface ByItemReferenceFilter {\n /** Reference of the item */\n itemReference?: ItemReference;\n}\n\nexport interface Filter extends FilterFilterOneOf {\n /** A list of filters by reference */\n byItemReferenceOptions?: ByItemReference;\n /** Type of the filter */\n type?: ListPoolsRequestTypeWithLiterals;\n /**\n * Module that is the source of the benefit pool creation.\n *\n * This value must correspond with the previously defined namespace established when creating the associated pool definition.\n *\n * It ensures efficient processing and management of pools and benefits.\n * @minLength 1\n * @maxLength 20\n */\n namespace?: string;\n}\n\n/** @oneof */\nexport interface FilterFilterOneOf {\n /** A list of filters by reference */\n byItemReferenceOptions?: ByItemReference;\n}\n\nexport interface ListPoolsResponse {\n /**\n * The retrieved pools\n * @maxSize 100\n */\n pools?: PoolWithItems[];\n /** Paging information */\n metadata?: CursorPagingMetadata;\n}\n\nexport interface PoolWithItems {\n /** The pool */\n pool?: Pool;\n /**\n * The items in the pool\n * @maxSize 100\n */\n itemReference?: ItemReference[];\n}\n\nexport interface BulkUpdatePoolsRequest {\n /**\n * Pools to update.\n * @minSize 1\n * @maxSize 100\n */\n pools?: MaskedPool[];\n /**\n * Whether to return the full pool definition entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface MaskedPool {\n /** Pool to update. */\n pool?: Pool;\n /** Explicit list of fields to update. */\n fieldMask?: string[];\n}\n\nexport interface BulkUpdatePoolsResponse {\n /**\n * List of updated pools and associated metadata.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkPoolResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkPoolResult {\n /** Pool metadata. */\n poolMetadata?: ItemMetadata;\n /** Pool data. */\n pool?: Pool;\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 ProvisionPoolsForProgramRequest {\n /** Reference of the template that is used to provision the pools */\n poolDefinitionLookupId?: PoolDefinitionLookupId;\n /**\n * Program that the provisioned pools are part of\n * @format GUID\n */\n programId?: string;\n}\n\nexport interface PoolDefinitionLookupId extends PoolDefinitionLookupIdIdOneOf {\n /**\n * Pool definition ID.\n * @format GUID\n */\n poolDefinitionId?: string;\n /**\n * Program definition ID.\n * @format GUID\n */\n programDefinitionId?: string;\n}\n\n/** @oneof */\nexport interface PoolDefinitionLookupIdIdOneOf {\n /**\n * Pool definition ID.\n * @format GUID\n */\n poolDefinitionId?: string;\n /**\n * Program definition ID.\n * @format GUID\n */\n programDefinitionId?: string;\n}\n\nexport interface ProvisionPoolsForProgramResponse\n extends ProvisionPoolsForProgramResponseResultOneOf {\n /** Sync result */\n syncOptions?: SyncResult;\n /** Async result */\n asyncOptions?: AsyncResult;\n /**\n * Job ID of the program provision associated with this pool. Retrieve job details using the [Async Job API](https://dev.wix.com/docs/rest/business-management/async-job/introduction).\n * @format GUID\n */\n jobId?: string;\n /** Type of the result */\n type?: ProvisionPoolsForProgramResponseTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface ProvisionPoolsForProgramResponseResultOneOf {\n /** Sync result */\n syncOptions?: SyncResult;\n /** Async result */\n asyncOptions?: AsyncResult;\n}\n\nexport enum ProvisionPoolsForProgramResponseType {\n /** Unknown result type */\n UNKNOWN = 'UNKNOWN',\n /** Sync result */\n SYNC = 'SYNC',\n /** Async result */\n ASYNC = 'ASYNC',\n}\n\n/** @enumType */\nexport type ProvisionPoolsForProgramResponseTypeWithLiterals =\n | ProvisionPoolsForProgramResponseType\n | 'UNKNOWN'\n | 'SYNC'\n | 'ASYNC';\n\nexport interface SyncResult {\n /** Indicates if the operation was successful */\n success?: boolean;\n}\n\nexport interface AsyncResult {\n /**\n * Job ID of the program provision associated with this pool. Retrieve job details using the [Async Job API](https://dev.wix.com/docs/rest/business-management/async-job/introduction).\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface InvalidPoolDefinitionReference {\n /** Reference of the template that didn't find any pool definitions */\n poolDefinitionLookupId?: PoolDefinitionLookupId;\n}\n\nexport interface RenewPoolsForProgramRequest {\n /**\n * Package of pools to grant. Package id should be the same that was used to provision programs.\n * @format GUID\n */\n programId?: string;\n}\n\nexport interface RenewPoolsForProgramResponse {\n /**\n * Job id of the renewal job\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface UpdatePoolStatusRequest\n extends UpdatePoolStatusRequestPoolSelectorOneOf {\n /** Pool selector by pool definition id and program definition id */\n byPoolDefinitionIdAndProgramDefinitionIdOptions?: ByPoolDefinitionIdAndProgramDefinitionIdOptions;\n /** Pool selector by program id */\n byProgramIdOptions?: ByProgramIdOptions;\n /** New pool status */\n status?: PoolStatusWithLiterals;\n /** Pool selector type */\n poolSelectorType?: PoolSelectorTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface UpdatePoolStatusRequestPoolSelectorOneOf {\n /** Pool selector by pool definition id and program definition id */\n byPoolDefinitionIdAndProgramDefinitionIdOptions?: ByPoolDefinitionIdAndProgramDefinitionIdOptions;\n /** Pool selector by program id */\n byProgramIdOptions?: ByProgramIdOptions;\n}\n\nexport enum PoolSelectorType {\n UNKNOWN_SELECTOR = 'UNKNOWN_SELECTOR',\n BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID = 'BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID',\n BY_PROGRAM_ID = 'BY_PROGRAM_ID',\n}\n\n/** @enumType */\nexport type PoolSelectorTypeWithLiterals =\n | PoolSelectorType\n | 'UNKNOWN_SELECTOR'\n | 'BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID'\n | 'BY_PROGRAM_ID';\n\nexport interface ByPoolDefinitionIdAndProgramDefinitionIdOptions {\n /**\n * Pool definition id\n * @format GUID\n */\n poolDefinitionId?: string;\n /**\n * Program definition id\n * @format GUID\n */\n programDefinitionId?: string | null;\n}\n\nexport interface ByProgramIdOptions {\n /**\n * Program id\n * @format GUID\n */\n programId?: string;\n /** Additional data that gets added to the event once the async job completes */\n additionalData?: Record<string, any> | null;\n}\n\nexport interface UpdatePoolStatusResponse {\n /**\n * Job ID of the program provision associated with this pool. Retrieve job details using the [Async Job API](https://dev.wix.com/docs/rest/business-management/async-job/introduction).\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface CountNumberOfPoolsInProvisioningStatusRequest {\n /**\n * Program id\n * @format GUID\n */\n programId?: string;\n}\n\nexport interface CountNumberOfPoolsInProvisioningStatusResponse {\n /** Number of pools in provisioning status */\n count?: number;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type RedeemBenefitApplicationErrors =\n | {\n code?: 'NOT_ENOUGH_BALANCE';\n description?: string;\n data?: NotEnoughBalance;\n }\n | {\n code?: 'POLICY_EXPRESSION_EVALUATED_TO_FALSE';\n description?: string;\n data?: PolicyExpressionEvaluatedToFalse;\n }\n | {\n code?: 'POOL_NOT_ACTIVE';\n description?: string;\n data?: PoolNotActive;\n }\n | {\n code?: 'POOL_NOT_FOUND';\n description?: string;\n data?: PoolNotFound;\n }\n | {\n code?: 'BENEFIT_ALREADY_REDEEMED';\n description?: string;\n data?: BenefitAlreadyRedeemed;\n }\n | {\n code?: 'BENEFIT_NOT_FOUND';\n description?: string;\n data?: BenefitNotFound;\n };\n/** @docsIgnore */\nexport type GetEligibleBenefitsApplicationErrors = {\n code?: 'INVALID_ITEM_REFERENCE';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Retrieves a pool.\n * @param poolId - ID of the pool to retrieve.\n * @public\n * @requiredField poolId\n * @permissionId BENEFIT_PROGRAMS.POOL_READ\n * @applicableIdentity APP\n * @returns Retrieved pool.\n * @fqn wix.benefit_programs.v1.pool.PoolService.GetPool\n */\nexport async function getPool(\n poolId: string\n): Promise<\n NonNullablePaths<\n Pool,\n | `status`\n | `beneficiary.anonymousVisitorId`\n | `beneficiary.memberId`\n | `beneficiary.wixUserId`\n | `details.benefits`\n | `details.benefits.${number}.benefitKey`\n | `details.creditConfiguration.amount`\n | `displayName`\n | `programDefinition._id`\n | `program._id`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ poolId: poolId });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Pool.getPool(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.pool!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { poolId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['poolId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a pool.\n *\n * Each time the pool is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the pool.\n * This ensures you're working with the latest pool\n * and prevents unintended overwrites.\n * @param _id - Pool ID.\n * @public\n * @requiredField _id\n * @requiredField pool\n * @requiredField pool.revision\n * @permissionId BENEFIT_PROGRAMS.POOL_UPDATE\n * @applicableIdentity APP\n * @returns Updated pool.\n * @fqn wix.benefit_programs.v1.pool.PoolService.UpdatePool\n */\nexport async function updatePool(\n _id: string,\n pool: NonNullablePaths<UpdatePool, `revision`, 2>\n): Promise<\n NonNullablePaths<\n Pool,\n | `status`\n | `beneficiary.anonymousVisitorId`\n | `beneficiary.memberId`\n | `beneficiary.wixUserId`\n | `details.benefits`\n | `details.benefits.${number}.benefitKey`\n | `details.creditConfiguration.amount`\n | `displayName`\n | `programDefinition._id`\n | `program._id`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n pool: { ...pool, id: _id },\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Pool.updatePool(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.pool!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { pool: '$[1]' },\n explicitPathsToArguments: { 'pool.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'pool']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdatePool {\n /**\n * Pool ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the pool is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the pool.\n *\n * Ignored when creating a pool.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the pool was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the pool was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * ID of the associated pool definition.\n * @format GUID\n * @readonly\n * @immutable\n */\n poolDefinitionId?: string | null;\n /**\n * ID of the associated program definition.\n * @format GUID\n * @readonly\n * @immutable\n */\n programDefinitionId?: string | null;\n /**\n * ID of the program that contains this pool.\n * @format GUID\n * @readonly\n * @immutable\n */\n programId?: string | null;\n /**\n * Pool status.\n * @readonly\n */\n status?: PoolStatusWithLiterals;\n /**\n * Pool beneficiary.\n * @readonly\n * @immutable\n */\n beneficiary?: CommonIdentificationData;\n /** Pool benefits and settings. */\n details?: Details;\n /**\n * Pool name.\n *\n * You may want to use the same name that's used in the associated pool definition.\n * @maxLength 64\n */\n displayName?: string;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @readonly\n * @immutable\n * @minLength 1\n * @maxLength 20\n */\n namespace?: string | null;\n /**\n * Custom field data for the pool object.\n *\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * Associated program definition information.\n * @readonly\n */\n programDefinition?: ProgramDefinitionInfo;\n /**\n * Information about the program containing the pool.\n * @readonly\n */\n program?: PoolProgramInfo;\n /**\n * Version of the pool definition that this pool was created from.\n * @readonly\n */\n poolDefinitionRevision?: string | null;\n /**\n * Number of times this pool has been renewed.\n * @readonly\n */\n renewalCount?: number | null;\n}\n\n/**\n * Creates a query to retrieve a list of pools.\n *\n * The Query Pools method builds a query to retrieve a list of pools and returns a `PoolsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `PoolsQueryBuilder` methods onto the query. `PoolsQueryBuilder` methods enable you to filter, sort, and control the results that Query Pools returns.\n *\n * Query Pools has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `PoolsQueryResult`.\n * @public\n * @permissionId BENEFIT_PROGRAMS.POOL_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool.PoolService.QueryPools\n */\nexport function queryPools(): PoolsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<Pool, 'CURSOR', QueryPoolsRequest, QueryPoolsResponse>({\n func: async (payload: QueryPoolsRequest) => {\n const reqOpts = ambassadorWixBenefitProgramsV1Pool.queryPools(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryPoolsRequest['query']) => {\n const args = [query, {}] as [QueryPoolsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryPoolsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.pools,\n pagingMetadata: transformedData?.metadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface PoolsQueryResult extends QueryCursorResult {\n items: Pool[];\n query: PoolsQueryBuilder;\n next: () => Promise<PoolsQueryResult>;\n prev: () => Promise<PoolsQueryResult>;\n}\n\nexport interface PoolsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'status'\n | 'beneficiary'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id',\n value: any\n ) => PoolsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'status'\n | 'beneficiary'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id',\n value: any\n ) => PoolsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id',\n value: any\n ) => PoolsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id',\n value: any\n ) => PoolsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id',\n value: any\n ) => PoolsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id',\n value: any\n ) => PoolsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n */\n startsWith: (\n propertyName:\n | '_id'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id',\n value: string\n ) => PoolsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasSome: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'status'\n | 'beneficiary'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id',\n value: any[]\n ) => PoolsQueryBuilder;\n in: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'status'\n | 'beneficiary'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id',\n value: any\n ) => PoolsQueryBuilder;\n exists: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'status'\n | 'beneficiary'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id',\n value: boolean\n ) => PoolsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'status'\n | 'beneficiary'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id'\n >\n ) => PoolsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n descending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'status'\n | 'beneficiary'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id'\n >\n ) => PoolsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => PoolsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => PoolsQueryBuilder;\n find: () => Promise<PoolsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.benefit_programs.v1.pool.PoolService.QueryPools\n * @requiredField query\n */\nexport async function typedQueryPools(\n query: CursorQuery\n): Promise<\n NonNullablePaths<\n QueryPoolsResponse,\n | `pools`\n | `pools.${number}.status`\n | `pools.${number}.beneficiary.anonymousVisitorId`\n | `pools.${number}.beneficiary.memberId`\n | `pools.${number}.beneficiary.wixUserId`\n | `pools.${number}.details.creditConfiguration.amount`\n | `pools.${number}.displayName`\n | `pools.${number}.programDefinition._id`\n | `pools.${number}.program._id`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Pool.queryPools(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Redeems a specified benefit.\n *\n * Calling this method records redemption of the benefit and adjusts the pool's associated balance. You still need to handle providing the beneficiary with the item.\n * @param poolId - ID of the pool that contains the benefit to redeem.\n * @public\n * @requiredField options.benefitKey\n * @requiredField options.idempotencyKey\n * @requiredField options.itemReference\n * @requiredField options.itemReference.externalId\n * @requiredField options.itemReference.providerAppId\n * @requiredField options.namespace\n * @requiredField poolId\n * @permissionId BENEFIT_PROGRAMS.POOL_REDEEM\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool.PoolService.RedeemBenefit\n */\nexport async function redeemBenefit(\n poolId: string,\n options?: NonNullablePaths<\n RedeemBenefitOptions,\n | `benefitKey`\n | `idempotencyKey`\n | `itemReference`\n | `itemReference.externalId`\n | `itemReference.providerAppId`\n | `namespace`,\n 3\n >\n): Promise<\n NonNullablePaths<RedeemBenefitResponse, `transactionId`, 2> & {\n __applicationErrorsType?: RedeemBenefitApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n poolId: poolId,\n itemReference: options?.itemReference,\n benefitKey: options?.benefitKey,\n count: options?.count,\n targetDate: options?.targetDate,\n idempotencyKey: options?.idempotencyKey,\n additionalData: options?.additionalData,\n beneficiary: options?.beneficiary,\n namespace: options?.namespace,\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Pool.redeemBenefit(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n poolId: '$[0]',\n itemReference: '$[1].itemReference',\n benefitKey: '$[1].benefitKey',\n count: '$[1].count',\n targetDate: '$[1].targetDate',\n idempotencyKey: '$[1].idempotencyKey',\n additionalData: '$[1].additionalData',\n beneficiary: '$[1].beneficiary',\n namespace: '$[1].namespace',\n },\n singleArgumentUnchanged: false,\n },\n ['poolId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface RedeemBenefitOptions {\n /** Information about the item to redeem. */\n itemReference: ItemReference;\n /**\n * Key of the benefit to redeem.\n * @maxLength 64\n */\n benefitKey: string;\n /**\n * Amount of items to redeem.\n * @min 1\n */\n count?: number;\n /**\n * Date that the item will be provided to the beneficiary.\n *\n * The pool's associated balance will update immediately. This parameter should be used to manage the logistics of providing the item.\n */\n targetDate?: Date | null;\n /**\n * Unique identifier, generated by the client.\n * Used to recognize repeated attempts to make the same request.\n * @maxLength 200\n */\n idempotencyKey: string;\n /** Additional information. */\n additionalData?: Record<string, any> | null;\n /** Beneficiary of the pool containing the benefit to redeem. */\n beneficiary?: CommonIdentificationData;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n}\n\n/**\n * Checks if a benefit can currently be redeemed.\n *\n * To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.\n * @param poolId - ID of the pool that the benefit to check belongs to.\n * @public\n * @requiredField options.itemReference\n * @requiredField options.itemReference.externalId\n * @requiredField options.itemReference.providerAppId\n * @requiredField options.namespace\n * @requiredField poolId\n * @permissionId BENEFIT_PROGRAMS.POOL_REDEEM\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibility\n */\nexport async function checkBenefitEligibility(\n poolId: string,\n options?: NonNullablePaths<\n CheckBenefitEligibilityOptions,\n | `itemReference`\n | `itemReference.externalId`\n | `itemReference.providerAppId`\n | `namespace`,\n 3\n >\n): Promise<\n NonNullablePaths<\n CheckBenefitEligibilityResponse,\n | `result.eligibleOptions.eligibleBenefits`\n | `result.eligibleOptions.eligibleBenefits.${number}.poolId`\n | `result.eligibleOptions.eligibleBenefits.${number}.benefitKey`\n | `result.eligibleOptions.eligibleBenefits.${number}.itemReference.externalId`\n | `result.eligibleOptions.eligibleBenefits.${number}.itemReference.category`\n | `result.eligibleOptions.eligibleBenefits.${number}.itemReference.providerAppId`\n | `result.notEnoughBalanceOptions.poolId`\n | `result.notEnoughBalanceOptions.availableBalance`\n | `result.notEnoughBalanceOptions.requestedBalance`\n | `result.poolNotActiveOptions.poolId`\n | `result.poolNotActiveOptions.poolStatus`\n | `result.benefitNotFoundOptions.poolId`\n | `result.poolNotFoundOptions.poolId`\n | `result.type`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n poolId: poolId,\n benefitKey: options?.benefitKey,\n itemReference: options?.itemReference,\n count: options?.count,\n targetDate: options?.targetDate,\n additionalData: options?.additionalData,\n beneficiary: options?.beneficiary,\n namespace: options?.namespace,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1Pool.checkBenefitEligibility(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n poolId: '$[0]',\n benefitKey: '$[1].benefitKey',\n itemReference: '$[1].itemReference',\n count: '$[1].count',\n targetDate: '$[1].targetDate',\n additionalData: '$[1].additionalData',\n beneficiary: '$[1].beneficiary',\n namespace: '$[1].namespace',\n },\n singleArgumentUnchanged: false,\n },\n ['poolId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CheckBenefitEligibilityOptions {\n /**\n * Key of the benefit to check.\n * @maxLength 64\n */\n benefitKey?: string | null;\n /** Information about the item to check. */\n itemReference: ItemReference;\n /**\n * Amount of items to check.\n *\n * Ensures the balance is high enough to redeem this many items.\n * @min 1\n */\n count?: number;\n /**\n * Date that the item will be provided to the beneficiary.\n *\n * This parameter should be used to manage the potential logistics of providing the item.\n */\n targetDate?: Date | null;\n /** Additional information. */\n additionalData?: Record<string, any> | null;\n /** Beneficiary of the pool containing the benefit to check. */\n beneficiary?: CommonIdentificationData;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n}\n\n/**\n * Checks if benefits can currently be redeemed.\n *\n * To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.\n *\n * Each benefit is checked independently. For example, if there is a benefit with a price of 3 credits and a benefit with a price of 4 credits, and there are 5 available credits, both benefits would be returned as eligible, but they can't both be redeemed.\n * @public\n * @requiredField options.benefitSelectors.itemReference\n * @requiredField options.benefitSelectors.itemReference.externalId\n * @requiredField options.benefitSelectors.itemReference.providerAppId\n * @requiredField options.benefitSelectors.poolId\n * @requiredField options.namespace\n * @permissionId BENEFIT_PROGRAMS.POOL_REDEEM\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool.PoolService.BulkCheckBenefitEligibility\n */\nexport async function bulkCheckBenefitEligibility(\n options?: NonNullablePaths<\n BulkCheckBenefitEligibilityOptions,\n | `benefitSelectors.${number}.itemReference`\n | `benefitSelectors.${number}.itemReference.externalId`\n | `benefitSelectors.${number}.itemReference.providerAppId`\n | `benefitSelectors.${number}.poolId`\n | `namespace`,\n 5\n >\n): Promise<\n NonNullablePaths<\n BulkCheckBenefitEligibilityResponse,\n | `results`\n | `results.${number}.benefitSelector.poolId`\n | `results.${number}.benefitSelector.itemReference.externalId`\n | `results.${number}.benefitSelector.itemReference.category`\n | `results.${number}.benefitSelector.itemReference.providerAppId`\n | `results.${number}.benefitSelector.count`\n | `results.${number}.result.notEnoughBalanceOptions.poolId`\n | `results.${number}.result.notEnoughBalanceOptions.availableBalance`\n | `results.${number}.result.notEnoughBalanceOptions.requestedBalance`\n | `results.${number}.result.poolNotActiveOptions.poolId`\n | `results.${number}.result.poolNotActiveOptions.poolStatus`\n | `results.${number}.result.benefitNotFoundOptions.poolId`\n | `results.${number}.result.poolNotFoundOptions.poolId`\n | `results.${number}.result.type`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n benefitSelectors: options?.benefitSelectors,\n namespace: options?.namespace,\n beneficiary: options?.beneficiary,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1Pool.bulkCheckBenefitEligibility(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n benefitSelectors: '$[0].benefitSelectors',\n namespace: '$[0].namespace',\n beneficiary: '$[0].beneficiary',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkCheckBenefitEligibilityOptions {\n /**\n * List of benefits to check.\n * @minSize 1\n * @maxSize 100\n */\n benefitSelectors?: BenefitSelector[];\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n /** Pool beneficiary. */\n beneficiary?: CommonIdentificationData;\n}\n\n/**\n * Retrieves benefits that can be redeemed for a specific benefit item.\n *\n * Each benefit item can only be linked to 1 benefit in 1 pool definition. However, each pool created from that pool definition contains the same benefits.\n * This method checks each pool containing a benefit with this benefit item, and returns the benefits that can be redeemed.\n * @param itemReference - Item reference.\n * @public\n * @requiredField itemReference\n * @requiredField itemReference.externalId\n * @requiredField itemReference.providerAppId\n * @requiredField options.namespace\n * @permissionId BENEFIT_PROGRAMS.POOL_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool.PoolService.GetEligibleBenefits\n */\nexport async function getEligibleBenefits(\n itemReference: NonNullablePaths<\n ItemReference,\n `externalId` | `providerAppId`,\n 2\n >,\n options?: NonNullablePaths<GetEligibleBenefitsOptions, `namespace`, 2>\n): Promise<\n NonNullablePaths<\n GetEligibleBenefitsResponse,\n | `eligibleBenefits`\n | `eligibleBenefits.${number}.poolId`\n | `eligibleBenefits.${number}.benefitKey`\n | `eligibleBenefits.${number}.itemReference.externalId`\n | `eligibleBenefits.${number}.itemReference.category`\n | `eligibleBenefits.${number}.itemReference.providerAppId`,\n 5\n > & {\n __applicationErrorsType?: GetEligibleBenefitsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n itemReference: itemReference,\n count: options?.count,\n targetDate: options?.targetDate,\n additionalData: options?.additionalData,\n beneficiary: options?.beneficiary,\n namespace: options?.namespace,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1Pool.getEligibleBenefits(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n itemReference: '$[0]',\n count: '$[1].count',\n targetDate: '$[1].targetDate',\n additionalData: '$[1].additionalData',\n beneficiary: '$[1].beneficiary',\n namespace: '$[1].namespace',\n },\n singleArgumentUnchanged: false,\n },\n ['itemReference', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetEligibleBenefitsOptions {\n /**\n * Amount of items to check. This ensures the balance is high enough to redeem this many items.\n * @min 1\n */\n count?: number;\n /**\n * Date that the item will be provided to the beneficiary.\n *\n * This parameter should be used to manage the potential logistics of providing the item.\n */\n targetDate?: Date | null;\n /** Additional information. */\n additionalData?: Record<string, any> | null;\n /** Filter request by beneficiary. */\n beneficiary?: CommonIdentificationData;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n}\n\n/**\n * Updates pools.\n * @public\n * @requiredField options.pools.pool\n * @requiredField options.pools.pool._id\n * @requiredField options.pools.pool.revision\n * @permissionId BENEFIT_PROGRAMS.POOL_UPDATE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool.PoolService.BulkUpdatePools\n */\nexport async function bulkUpdatePools(\n options?: NonNullablePaths<\n BulkUpdatePoolsOptions,\n | `pools.${number}.pool`\n | `pools.${number}.pool._id`\n | `pools.${number}.pool.revision`,\n 5\n >\n): Promise<\n NonNullablePaths<\n BulkUpdatePoolsResponse,\n | `results`\n | `results.${number}.poolMetadata.originalIndex`\n | `results.${number}.poolMetadata.success`\n | `results.${number}.poolMetadata.error.code`\n | `results.${number}.poolMetadata.error.description`\n | `results.${number}.pool.status`\n | `results.${number}.pool.beneficiary.anonymousVisitorId`\n | `results.${number}.pool.beneficiary.memberId`\n | `results.${number}.pool.beneficiary.wixUserId`\n | `results.${number}.pool.displayName`\n | `results.${number}.pool.programDefinition._id`\n | `results.${number}.pool.program._id`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n pools: options?.pools,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Pool.bulkUpdatePools(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n pools: '$[0].pools',\n returnEntity: '$[0].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdatePoolsOptions {\n /**\n * Pools to update.\n * @minSize 1\n * @maxSize 100\n */\n pools?: MaskedPool[];\n /**\n * Whether to return the full pool definition entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBenefitProgramsV1PoolPoolServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/pools',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/benefit-programs-pools',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/benefits',\n destPath: '/v1/bulk/benefits',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/pools',\n destPath: '/v1/bulk/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/pools',\n destPath: '/v1/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/benefits',\n destPath: '/v1/benefits',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-pools',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/benefits',\n destPath: '/v1/bulk/benefits',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/pools',\n destPath: '/v1/bulk/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/pools',\n destPath: '/v1/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/benefits',\n destPath: '/v1/benefits',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-pools',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/benefits',\n destPath: '/v1/bulk/benefits',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/pools',\n destPath: '/v1/bulk/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/pools',\n destPath: '/v1/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/benefits',\n destPath: '/v1/benefits',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/benefit-programs-pools',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/benefits',\n destPath: '/v1/bulk/benefits',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/pools',\n destPath: '/v1/bulk/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/pools',\n destPath: '/v1/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/benefits',\n destPath: '/v1/benefits',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/benefit-programs-pools',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/benefits',\n destPath: '/v1/bulk/benefits',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/pools',\n destPath: '/v1/bulk/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/pools',\n destPath: '/v1/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/benefits',\n destPath: '/v1/benefits',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-pools',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/benefits',\n destPath: '/v1/bulk/benefits',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/pools',\n destPath: '/v1/bulk/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/pools',\n destPath: '/v1/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/benefits',\n destPath: '/v1/benefits',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-pools',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/benefits',\n destPath: '/v1/benefits',\n },\n {\n srcPath: '/_api/benefit-programs/v1/pools',\n destPath: '/v1/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/benefits',\n destPath: '/v1/bulk/benefits',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/pools',\n destPath: '/v1/bulk/pools',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/bulk/benefits',\n destPath: '/v1/bulk/benefits',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/pools',\n destPath: '/v1/bulk/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/pools',\n destPath: '/v1/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/benefits',\n destPath: '/v1/benefits',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/bulk/benefits',\n destPath: '/v1/bulk/benefits',\n },\n {\n srcPath: '/benefit-programs/v1/bulk/pools',\n destPath: '/v1/bulk/pools',\n },\n {\n srcPath: '/benefit-programs/v1/pools',\n destPath: '/v1/pools',\n },\n {\n srcPath: '/benefit-programs/v1/benefits',\n destPath: '/v1/benefits',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_pools';\n\n/** Retrieves a pool. */\nexport function getPool(payload: object): RequestOptionsFactory<any> {\n function __getPool({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool',\n method: 'GET' as any,\n methodFqn: 'wix.benefit_programs.v1.pool.PoolService.GetPool',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({\n protoPath: '/v1/pools/{poolId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'pool.createdDate' }, { path: 'pool.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPool;\n}\n\n/**\n * Updates a pool.\n *\n * Each time the pool is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the pool.\n * This ensures you're working with the latest pool\n * and prevents unintended overwrites.\n */\nexport function updatePool(payload: object): RequestOptionsFactory<any> {\n function __updatePool({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'pool.createdDate' }, { path: 'pool.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool',\n method: 'PATCH' as any,\n methodFqn: 'wix.benefit_programs.v1.pool.PoolService.UpdatePool',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({\n protoPath: '/v1/pools/{pool.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'pool.createdDate' }, { path: 'pool.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updatePool;\n}\n\n/**\n * Creates a query to retrieve a list of pools.\n *\n * The Query Pools method builds a query to retrieve a list of pools and returns a `PoolsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `PoolsQueryBuilder` methods onto the query. `PoolsQueryBuilder` methods enable you to filter, sort, and control the results that Query Pools returns.\n *\n * Query Pools has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `PoolsQueryResult`.\n */\nexport function queryPools(payload: object): RequestOptionsFactory<any> {\n function __queryPools({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.pool.PoolService.QueryPools',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({\n protoPath: '/v1/pools/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'pools.createdDate' },\n { path: 'pools.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryPools;\n}\n\n/**\n * Redeems a specified benefit.\n *\n * Calling this method records redemption of the benefit and adjusts the pool's associated balance. You still need to handle providing the beneficiary with the item.\n */\nexport function redeemBenefit(payload: object): RequestOptionsFactory<any> {\n function __redeemBenefit({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'targetDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.pool.PoolService.RedeemBenefit',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({\n protoPath: '/v1/benefits/redeem',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __redeemBenefit;\n}\n\n/**\n * Checks if a benefit can currently be redeemed.\n *\n * To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.\n */\nexport function checkBenefitEligibility(\n payload: object\n): RequestOptionsFactory<any> {\n function __checkBenefitEligibility({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'targetDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibility',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({\n protoPath: '/v1/pools/check-eligibility',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __checkBenefitEligibility;\n}\n\n/**\n * Checks if benefits can currently be redeemed.\n *\n * To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.\n *\n * Each benefit is checked independently. For example, if there is a benefit with a price of 3 credits and a benefit with a price of 4 credits, and there are 5 available credits, both benefits would be returned as eligible, but they can't both be redeemed.\n */\nexport function bulkCheckBenefitEligibility(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkCheckBenefitEligibility({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'benefitSelectors.targetDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool.PoolService.BulkCheckBenefitEligibility',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({\n protoPath: '/v1/bulk/benefits/check-eligibility',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'results.benefitSelector.targetDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCheckBenefitEligibility;\n}\n\n/**\n * Retrieves benefits that can be redeemed for a specific benefit item.\n *\n * Each benefit item can only be linked to 1 benefit in 1 pool definition. However, each pool created from that pool definition contains the same benefits.\n * This method checks each pool containing a benefit with this benefit item, and returns the benefits that can be redeemed.\n */\nexport function getEligibleBenefits(\n payload: object\n): RequestOptionsFactory<any> {\n function __getEligibleBenefits({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'targetDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.pool.PoolService.GetEligibleBenefits',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({\n protoPath: '/v1/pools/eligible-pools',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __getEligibleBenefits;\n}\n\n/** Updates pools. */\nexport function bulkUpdatePools(payload: object): RequestOptionsFactory<any> {\n function __bulkUpdatePools({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'pools.fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'pools.pool.createdDate' },\n { path: 'pools.pool.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.pool.PoolService.BulkUpdatePools',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({\n protoPath: '/v1/bulk/pools',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.pool.createdDate' },\n { path: 'results.pool.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpdatePools;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkCheckBenefitEligibilityOptions,\n BulkCheckBenefitEligibilityResponse,\n BulkUpdatePoolsOptions,\n BulkUpdatePoolsResponse,\n CheckBenefitEligibilityOptions,\n CheckBenefitEligibilityResponse,\n CursorQuery,\n GetEligibleBenefitsApplicationErrors,\n GetEligibleBenefitsOptions,\n GetEligibleBenefitsResponse,\n ItemReference,\n Pool,\n PoolsQueryBuilder,\n QueryPoolsResponse,\n RedeemBenefitApplicationErrors,\n RedeemBenefitOptions,\n RedeemBenefitResponse,\n UpdatePool,\n bulkCheckBenefitEligibility as universalBulkCheckBenefitEligibility,\n bulkUpdatePools as universalBulkUpdatePools,\n checkBenefitEligibility as universalCheckBenefitEligibility,\n getEligibleBenefits as universalGetEligibleBenefits,\n getPool as universalGetPool,\n queryPools as universalQueryPools,\n redeemBenefit as universalRedeemBenefit,\n typedQueryPools as universalTypedQueryPools,\n updatePool as universalUpdatePool,\n} from './benefit-programs-v1-pool-pools.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/benefit-programs' };\n\nexport function getPool(httpClient: HttpClient): GetPoolSignature {\n return (poolId: string) =>\n universalGetPool(\n poolId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetPoolSignature {\n /**\n * Retrieves a pool.\n * @param - ID of the pool to retrieve.\n * @returns Retrieved pool.\n */\n (poolId: string): Promise<\n NonNullablePaths<\n Pool,\n | `status`\n | `beneficiary.anonymousVisitorId`\n | `beneficiary.memberId`\n | `beneficiary.wixUserId`\n | `details.benefits`\n | `details.benefits.${number}.benefitKey`\n | `details.creditConfiguration.amount`\n | `displayName`\n | `programDefinition._id`\n | `program._id`,\n 5\n >\n >;\n}\n\nexport function updatePool(httpClient: HttpClient): UpdatePoolSignature {\n return (_id: string, pool: NonNullablePaths<UpdatePool, `revision`, 2>) =>\n universalUpdatePool(\n _id,\n pool,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdatePoolSignature {\n /**\n * Updates a pool.\n *\n * Each time the pool is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the pool.\n * This ensures you're working with the latest pool\n * and prevents unintended overwrites.\n * @param - Pool ID.\n * @returns Updated pool.\n */\n (_id: string, pool: NonNullablePaths<UpdatePool, `revision`, 2>): Promise<\n NonNullablePaths<\n Pool,\n | `status`\n | `beneficiary.anonymousVisitorId`\n | `beneficiary.memberId`\n | `beneficiary.wixUserId`\n | `details.benefits`\n | `details.benefits.${number}.benefitKey`\n | `details.creditConfiguration.amount`\n | `displayName`\n | `programDefinition._id`\n | `program._id`,\n 5\n >\n >;\n}\n\nexport function queryPools(httpClient: HttpClient): QueryPoolsSignature {\n return () =>\n universalQueryPools(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryPoolsSignature {\n /**\n * Creates a query to retrieve a list of pools.\n *\n * The Query Pools method builds a query to retrieve a list of pools and returns a `PoolsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `PoolsQueryBuilder` methods onto the query. `PoolsQueryBuilder` methods enable you to filter, sort, and control the results that Query Pools returns.\n *\n * Query Pools has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `PoolsQueryResult`.\n */\n (): PoolsQueryBuilder;\n}\n\nexport function typedQueryPools(\n httpClient: HttpClient\n): TypedQueryPoolsSignature {\n return (query: CursorQuery) =>\n universalTypedQueryPools(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryPoolsSignature {\n /** */\n (query: CursorQuery): Promise<\n NonNullablePaths<\n QueryPoolsResponse,\n | `pools`\n | `pools.${number}.status`\n | `pools.${number}.beneficiary.anonymousVisitorId`\n | `pools.${number}.beneficiary.memberId`\n | `pools.${number}.beneficiary.wixUserId`\n | `pools.${number}.details.creditConfiguration.amount`\n | `pools.${number}.displayName`\n | `pools.${number}.programDefinition._id`\n | `pools.${number}.program._id`,\n 6\n >\n >;\n}\n\nexport function redeemBenefit(httpClient: HttpClient): RedeemBenefitSignature {\n return (\n poolId: string,\n options?: NonNullablePaths<\n RedeemBenefitOptions,\n | `benefitKey`\n | `idempotencyKey`\n | `itemReference`\n | `itemReference.externalId`\n | `itemReference.providerAppId`\n | `namespace`,\n 3\n >\n ) =>\n universalRedeemBenefit(\n poolId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RedeemBenefitSignature {\n /**\n * Redeems a specified benefit.\n *\n * Calling this method records redemption of the benefit and adjusts the pool's associated balance. You still need to handle providing the beneficiary with the item.\n * @param - ID of the pool that contains the benefit to redeem.\n */\n (\n poolId: string,\n options?: NonNullablePaths<\n RedeemBenefitOptions,\n | `benefitKey`\n | `idempotencyKey`\n | `itemReference`\n | `itemReference.externalId`\n | `itemReference.providerAppId`\n | `namespace`,\n 3\n >\n ): Promise<\n NonNullablePaths<RedeemBenefitResponse, `transactionId`, 2> & {\n __applicationErrorsType?: RedeemBenefitApplicationErrors;\n }\n >;\n}\n\nexport function checkBenefitEligibility(\n httpClient: HttpClient\n): CheckBenefitEligibilitySignature {\n return (\n poolId: string,\n options?: NonNullablePaths<\n CheckBenefitEligibilityOptions,\n | `itemReference`\n | `itemReference.externalId`\n | `itemReference.providerAppId`\n | `namespace`,\n 3\n >\n ) =>\n universalCheckBenefitEligibility(\n poolId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CheckBenefitEligibilitySignature {\n /**\n * Checks if a benefit can currently be redeemed.\n *\n * To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.\n * @param - ID of the pool that the benefit to check belongs to.\n */\n (\n poolId: string,\n options?: NonNullablePaths<\n CheckBenefitEligibilityOptions,\n | `itemReference`\n | `itemReference.externalId`\n | `itemReference.providerAppId`\n | `namespace`,\n 3\n >\n ): Promise<\n NonNullablePaths<\n CheckBenefitEligibilityResponse,\n | `result.eligibleOptions.eligibleBenefits`\n | `result.eligibleOptions.eligibleBenefits.${number}.poolId`\n | `result.eligibleOptions.eligibleBenefits.${number}.benefitKey`\n | `result.eligibleOptions.eligibleBenefits.${number}.itemReference.externalId`\n | `result.eligibleOptions.eligibleBenefits.${number}.itemReference.category`\n | `result.eligibleOptions.eligibleBenefits.${number}.itemReference.providerAppId`\n | `result.notEnoughBalanceOptions.poolId`\n | `result.notEnoughBalanceOptions.availableBalance`\n | `result.notEnoughBalanceOptions.requestedBalance`\n | `result.poolNotActiveOptions.poolId`\n | `result.poolNotActiveOptions.poolStatus`\n | `result.benefitNotFoundOptions.poolId`\n | `result.poolNotFoundOptions.poolId`\n | `result.type`,\n 7\n >\n >;\n}\n\nexport function bulkCheckBenefitEligibility(\n httpClient: HttpClient\n): BulkCheckBenefitEligibilitySignature {\n return (\n options?: NonNullablePaths<\n BulkCheckBenefitEligibilityOptions,\n | `benefitSelectors.${number}.itemReference`\n | `benefitSelectors.${number}.itemReference.externalId`\n | `benefitSelectors.${number}.itemReference.providerAppId`\n | `benefitSelectors.${number}.poolId`\n | `namespace`,\n 5\n >\n ) =>\n universalBulkCheckBenefitEligibility(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkCheckBenefitEligibilitySignature {\n /**\n * Checks if benefits can currently be redeemed.\n *\n * To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.\n *\n * Each benefit is checked independently. For example, if there is a benefit with a price of 3 credits and a benefit with a price of 4 credits, and there are 5 available credits, both benefits would be returned as eligible, but they can't both be redeemed.\n */\n (\n options?: NonNullablePaths<\n BulkCheckBenefitEligibilityOptions,\n | `benefitSelectors.${number}.itemReference`\n | `benefitSelectors.${number}.itemReference.externalId`\n | `benefitSelectors.${number}.itemReference.providerAppId`\n | `benefitSelectors.${number}.poolId`\n | `namespace`,\n 5\n >\n ): Promise<\n NonNullablePaths<\n BulkCheckBenefitEligibilityResponse,\n | `results`\n | `results.${number}.benefitSelector.poolId`\n | `results.${number}.benefitSelector.itemReference.externalId`\n | `results.${number}.benefitSelector.itemReference.category`\n | `results.${number}.benefitSelector.itemReference.providerAppId`\n | `results.${number}.benefitSelector.count`\n | `results.${number}.result.notEnoughBalanceOptions.poolId`\n | `results.${number}.result.notEnoughBalanceOptions.availableBalance`\n | `results.${number}.result.notEnoughBalanceOptions.requestedBalance`\n | `results.${number}.result.poolNotActiveOptions.poolId`\n | `results.${number}.result.poolNotActiveOptions.poolStatus`\n | `results.${number}.result.benefitNotFoundOptions.poolId`\n | `results.${number}.result.poolNotFoundOptions.poolId`\n | `results.${number}.result.type`,\n 6\n >\n >;\n}\n\nexport function getEligibleBenefits(\n httpClient: HttpClient\n): GetEligibleBenefitsSignature {\n return (\n itemReference: NonNullablePaths<\n ItemReference,\n `externalId` | `providerAppId`,\n 2\n >,\n options?: NonNullablePaths<GetEligibleBenefitsOptions, `namespace`, 2>\n ) =>\n universalGetEligibleBenefits(\n itemReference,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetEligibleBenefitsSignature {\n /**\n * Retrieves benefits that can be redeemed for a specific benefit item.\n *\n * Each benefit item can only be linked to 1 benefit in 1 pool definition. However, each pool created from that pool definition contains the same benefits.\n * This method checks each pool containing a benefit with this benefit item, and returns the benefits that can be redeemed.\n * @param - Item reference.\n */\n (\n itemReference: NonNullablePaths<\n ItemReference,\n `externalId` | `providerAppId`,\n 2\n >,\n options?: NonNullablePaths<GetEligibleBenefitsOptions, `namespace`, 2>\n ): Promise<\n NonNullablePaths<\n GetEligibleBenefitsResponse,\n | `eligibleBenefits`\n | `eligibleBenefits.${number}.poolId`\n | `eligibleBenefits.${number}.benefitKey`\n | `eligibleBenefits.${number}.itemReference.externalId`\n | `eligibleBenefits.${number}.itemReference.category`\n | `eligibleBenefits.${number}.itemReference.providerAppId`,\n 5\n > & {\n __applicationErrorsType?: GetEligibleBenefitsApplicationErrors;\n }\n >;\n}\n\nexport function bulkUpdatePools(\n httpClient: HttpClient\n): BulkUpdatePoolsSignature {\n return (\n options?: NonNullablePaths<\n BulkUpdatePoolsOptions,\n | `pools.${number}.pool`\n | `pools.${number}.pool._id`\n | `pools.${number}.pool.revision`,\n 5\n >\n ) =>\n universalBulkUpdatePools(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdatePoolsSignature {\n /**\n * Updates pools.\n */\n (\n options?: NonNullablePaths<\n BulkUpdatePoolsOptions,\n | `pools.${number}.pool`\n | `pools.${number}.pool._id`\n | `pools.${number}.pool.revision`,\n 5\n >\n ): Promise<\n NonNullablePaths<\n BulkUpdatePoolsResponse,\n | `results`\n | `results.${number}.poolMetadata.originalIndex`\n | `results.${number}.poolMetadata.success`\n | `results.${number}.poolMetadata.error.code`\n | `results.${number}.poolMetadata.error.description`\n | `results.${number}.pool.status`\n | `results.${number}.pool.beneficiary.anonymousVisitorId`\n | `results.${number}.pool.beneficiary.memberId`\n | `results.${number}.pool.beneficiary.wixUserId`\n | `results.${number}.pool.displayName`\n | `results.${number}.pool.programDefinition._id`\n | `results.${number}.pool.program._id`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\n}\n\nexport {\n ActionEvent,\n ApplicationError,\n AsyncResult,\n BalanceAmount,\n Benefit,\n BenefitAlreadyRedeemed,\n BenefitInfo,\n BenefitNotFound,\n BenefitRedeemed,\n BenefitReservationCanceled,\n BenefitReservationReleased,\n BenefitReserved,\n BenefitSelector,\n BulkActionMetadata,\n BulkCheckBenefitEligibilityOptions,\n BulkCheckBenefitEligibilityRequest,\n BulkCheckBenefitEligibilityResponse,\n BulkEligibilityCheckResult,\n BulkPoolResult,\n BulkUpdatePoolsOptions,\n BulkUpdatePoolsRequest,\n BulkUpdatePoolsResponse,\n ByItemReference,\n ByItemReferenceFilter,\n ByPoolDefinitionIdAndProgramDefinitionIdOptions,\n ByProgramIdOptions,\n CancelBenefitReservationRequest,\n CancelBenefitReservationResponse,\n CheckBenefitEligibilityOptions,\n CheckBenefitEligibilityRequest,\n CheckBenefitEligibilityResponse,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n CountNumberOfPoolsInProvisioningStatusRequest,\n CountNumberOfPoolsInProvisioningStatusResponse,\n CreatePoolRequest,\n CreatePoolResponse,\n CreditConfiguration,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n CustomPolicy,\n DeletePoolRequest,\n DeletePoolResponse,\n Details,\n DomainEvent,\n DomainEventBodyOneOf,\n EligibilityCheckResult,\n EligibilityCheckResultResultOneOf,\n EligibilityCheckResultType,\n Eligible,\n EligibleBenefit,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n ExtendedFields,\n FailureDetails,\n Filter,\n FilterFilterOneOf,\n FixedIntervalPolicy,\n GetEligibleBenefitsOptions,\n GetEligibleBenefitsRequest,\n GetEligibleBenefitsResponse,\n GetPoolRequest,\n GetPoolResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n IdentityType,\n InvalidPoolDefinitionReference,\n ItemMetadata,\n ItemReference,\n ListPoolsRequest,\n ListPoolsRequestType,\n ListPoolsResponse,\n MaskedPool,\n MessageEnvelope,\n NotEnoughBalance,\n Policy,\n PolicyExpression,\n PolicyExpressionAnd,\n PolicyExpressionEvaluatedToFalse,\n PolicyExpressionExpressionOneOf,\n PolicyExpressionNot,\n PolicyExpressionOr,\n PolicyExpressionType,\n PolicyPolicyOneOf,\n Pool,\n PoolDefinitionAndProgramDefinition,\n PoolDefinitionLookupId,\n PoolDefinitionLookupIdIdOneOf,\n PoolEnded,\n PoolInfo,\n PoolNotActive,\n PoolNotFound,\n PoolOrigin,\n PoolPaused,\n PoolProgramInfo,\n PoolProvisionJobFinished,\n PoolProvisioned,\n PoolRenewalAction,\n PoolRenewalActionActionOneOf,\n PoolRenewalActionType,\n PoolRenewed,\n PoolResumed,\n PoolSelectorType,\n PoolStatus,\n PoolStatusUpdateJobFinished,\n PoolStatusUpdateJobFinishedContextOneOf,\n PoolStatusUpdateParamsPoolInfo,\n PoolWithItems,\n PoolsQueryBuilder,\n PoolsQueryResult,\n ProgramDefinitionInfo,\n ProgramInfo,\n ProvisionPoolsForProgramRequest,\n ProvisionPoolsForProgramResponse,\n ProvisionPoolsForProgramResponseResultOneOf,\n ProvisionPoolsForProgramResponseType,\n QueryPoolsRequest,\n QueryPoolsResponse,\n RateLimitedPolicy,\n RateLimitedPolicyPeriodOneOf,\n RateLimitedPolicyType,\n RedeemBenefitOptions,\n RedeemBenefitRequest,\n RedeemBenefitResponse,\n RedemptionDetails,\n ReleaseBenefitReservationRequest,\n ReleaseBenefitReservationResponse,\n RenewPoolsForProgramRequest,\n RenewPoolsForProgramResponse,\n ReserveBenefitRequest,\n ReserveBenefitResponse,\n RestoreInfo,\n RolloverConfiguration,\n SortOrder,\n Sorting,\n SyncResult,\n Type,\n Update,\n UpdatePool,\n UpdatePoolRequest,\n UpdatePoolResponse,\n UpdatePoolStatusRequest,\n UpdatePoolStatusRequestPoolSelectorOneOf,\n UpdatePoolStatusResponse,\n WebhookIdentityType,\n WeekDay,\n} from './benefit-programs-v1-pool-pools.universal.js';\n","import {\n getPool as publicGetPool,\n updatePool as publicUpdatePool,\n queryPools as publicQueryPools,\n typedQueryPools as publicTypedQueryPools,\n redeemBenefit as publicRedeemBenefit,\n checkBenefitEligibility as publicCheckBenefitEligibility,\n bulkCheckBenefitEligibility as publicBulkCheckBenefitEligibility,\n getEligibleBenefits as publicGetEligibleBenefits,\n bulkUpdatePools as publicBulkUpdatePools,\n} from './benefit-programs-v1-pool-pools.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n CursorQuery,\n PoolsQueryBuilder,\n typedQueryPools as universalTypedQueryPools,\n} from './benefit-programs-v1-pool-pools.universal.js';\n\nfunction customQueryPools(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryPools(httpClient)(),\n typedQueryFunction: (query: CursorQuery) =>\n publicTypedQueryPools(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): PoolsQueryBuilder;\n function overloadedQuery(\n query: CursorQuery\n ): ReturnType<typeof universalTypedQueryPools>;\n function overloadedQuery(query?: CursorQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const getPool: MaybeContext<\n BuildRESTFunction<typeof publicGetPool> & typeof publicGetPool\n> = /*#__PURE__*/ createRESTModule(publicGetPool);\nexport const updatePool: MaybeContext<\n BuildRESTFunction<typeof publicUpdatePool> & typeof publicUpdatePool\n> = /*#__PURE__*/ createRESTModule(publicUpdatePool);\nexport const redeemBenefit: MaybeContext<\n BuildRESTFunction<typeof publicRedeemBenefit> & typeof publicRedeemBenefit\n> = /*#__PURE__*/ createRESTModule(publicRedeemBenefit);\nexport const checkBenefitEligibility: MaybeContext<\n BuildRESTFunction<typeof publicCheckBenefitEligibility> &\n typeof publicCheckBenefitEligibility\n> = /*#__PURE__*/ createRESTModule(publicCheckBenefitEligibility);\nexport const bulkCheckBenefitEligibility: MaybeContext<\n BuildRESTFunction<typeof publicBulkCheckBenefitEligibility> &\n typeof publicBulkCheckBenefitEligibility\n> = /*#__PURE__*/ createRESTModule(publicBulkCheckBenefitEligibility);\nexport const getEligibleBenefits: MaybeContext<\n BuildRESTFunction<typeof publicGetEligibleBenefits> &\n typeof publicGetEligibleBenefits\n> = /*#__PURE__*/ createRESTModule(publicGetEligibleBenefits);\nexport const bulkUpdatePools: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdatePools> & typeof publicBulkUpdatePools\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdatePools);\nexport const queryPools: MaybeContext<\n BuildRESTFunction<typeof customQueryPools> & typeof customQueryPools\n> = /*#__PURE__*/ createRESTModule(customQueryPools);\n\nexport {\n PoolStatus,\n IdentityType,\n PolicyExpressionType,\n Type,\n WeekDay,\n RateLimitedPolicyType,\n PoolOrigin,\n PoolRenewalActionType,\n SortOrder,\n EligibilityCheckResultType,\n ListPoolsRequestType,\n ProvisionPoolsForProgramResponseType,\n PoolSelectorType,\n WebhookIdentityType,\n} from './benefit-programs-v1-pool-pools.universal.js';\nexport {\n Pool,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n Details,\n Benefit,\n PolicyExpression,\n PolicyExpressionExpressionOneOf,\n PolicyExpressionNot,\n PolicyExpressionAnd,\n PolicyExpressionOr,\n Policy,\n PolicyPolicyOneOf,\n FixedIntervalPolicy,\n RateLimitedPolicy,\n RateLimitedPolicyPeriodOneOf,\n CustomPolicy,\n CreditConfiguration,\n RolloverConfiguration,\n ExtendedFields,\n ProgramDefinitionInfo,\n PoolProgramInfo,\n PoolRenewalAction,\n PoolRenewalActionActionOneOf,\n Update,\n PoolProvisioned,\n PoolRenewed,\n BenefitRedeemed,\n RedemptionDetails,\n ItemReference,\n PoolPaused,\n PoolResumed,\n PoolEnded,\n BenefitReserved,\n BenefitReservationCanceled,\n BenefitReservationReleased,\n PoolProvisionJobFinished,\n PoolStatusUpdateJobFinished,\n PoolStatusUpdateJobFinishedContextOneOf,\n PoolDefinitionAndProgramDefinition,\n ProgramInfo,\n PoolStatusUpdateParamsPoolInfo,\n CreatePoolRequest,\n CreatePoolResponse,\n GetPoolRequest,\n GetPoolResponse,\n UpdatePoolRequest,\n UpdatePoolResponse,\n DeletePoolRequest,\n DeletePoolResponse,\n QueryPoolsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryPoolsResponse,\n CursorPagingMetadata,\n Cursors,\n RedeemBenefitRequest,\n RedeemBenefitResponse,\n NotEnoughBalance,\n PoolInfo,\n BalanceAmount,\n BenefitInfo,\n PolicyExpressionEvaluatedToFalse,\n FailureDetails,\n PoolNotActive,\n PoolNotFound,\n BenefitAlreadyRedeemed,\n BenefitNotFound,\n ReserveBenefitRequest,\n ReserveBenefitResponse,\n CancelBenefitReservationRequest,\n CancelBenefitReservationResponse,\n ReleaseBenefitReservationRequest,\n ReleaseBenefitReservationResponse,\n CheckBenefitEligibilityRequest,\n CheckBenefitEligibilityResponse,\n EligibilityCheckResult,\n EligibilityCheckResultResultOneOf,\n EligibleBenefit,\n Eligible,\n BulkCheckBenefitEligibilityRequest,\n BenefitSelector,\n BulkCheckBenefitEligibilityResponse,\n BulkEligibilityCheckResult,\n GetEligibleBenefitsRequest,\n GetEligibleBenefitsResponse,\n ListPoolsRequest,\n ByItemReference,\n ByItemReferenceFilter,\n Filter,\n FilterFilterOneOf,\n ListPoolsResponse,\n PoolWithItems,\n BulkUpdatePoolsRequest,\n MaskedPool,\n BulkUpdatePoolsResponse,\n BulkPoolResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n ProvisionPoolsForProgramRequest,\n PoolDefinitionLookupId,\n PoolDefinitionLookupIdIdOneOf,\n ProvisionPoolsForProgramResponse,\n ProvisionPoolsForProgramResponseResultOneOf,\n SyncResult,\n AsyncResult,\n InvalidPoolDefinitionReference,\n RenewPoolsForProgramRequest,\n RenewPoolsForProgramResponse,\n UpdatePoolStatusRequest,\n UpdatePoolStatusRequestPoolSelectorOneOf,\n ByPoolDefinitionIdAndProgramDefinitionIdOptions,\n ByProgramIdOptions,\n UpdatePoolStatusResponse,\n CountNumberOfPoolsInProvisioningStatusRequest,\n CountNumberOfPoolsInProvisioningStatusResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n UpdatePool,\n PoolsQueryResult,\n PoolsQueryBuilder,\n RedeemBenefitOptions,\n CheckBenefitEligibilityOptions,\n BulkCheckBenefitEligibilityOptions,\n GetEligibleBenefitsOptions,\n BulkUpdatePoolsOptions,\n} from './benefit-programs-v1-pool-pools.universal.js';\nexport {\n PoolStatusWithLiterals,\n IdentityTypeWithLiterals,\n PolicyExpressionTypeWithLiterals,\n TypeWithLiterals,\n WeekDayWithLiterals,\n RateLimitedPolicyTypeWithLiterals,\n PoolOriginWithLiterals,\n PoolRenewalActionTypeWithLiterals,\n SortOrderWithLiterals,\n EligibilityCheckResultTypeWithLiterals,\n ListPoolsRequestTypeWithLiterals,\n ProvisionPoolsForProgramResponseTypeWithLiterals,\n PoolSelectorTypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n RedeemBenefitApplicationErrors,\n GetEligibleBenefitsApplicationErrors,\n} from './benefit-programs-v1-pool-pools.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qCAAAA;AAAA,EAAA,uBAAAC;AAAA,EAAA,+BAAAC;AAAA,EAAA,2BAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,kBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ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Eligibility","getEligibleBenefits","getPool","queryPools","redeemBenefit","updatePool","import_timestamp","import_rest_modules","payload","import_transform_paths","PoolStatus","IdentityType","PolicyExpressionType","Type","WeekDay","RateLimitedPolicyType","PoolOrigin","PoolRenewalActionType","SortOrder","EligibilityCheckResultType","ListPoolsRequestType","ProvisionPoolsForProgramResponseType","PoolSelectorType","WebhookIdentityType","getPool","sdkTransformError","updatePool","queryPools","redeemBenefit","checkBenefitEligibility","bulkCheckBenefitEligibility","getEligibleBenefits","bulkUpdatePools","getPool","updatePool","queryPools","typedQueryPools","redeemBenefit","checkBenefitEligibility","bulkCheckBenefitEligibility","getEligibleBenefits","bulkUpdatePools","import_rest_modules","queryPools","typedQueryPools","getPool","updatePool","redeemBenefit","checkBenefitEligibility","bulkCheckBenefitEligibility","getEligibleBenefits","bulkUpdatePools"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/benefit-programs-v1-pool-pools.universal.ts","../../src/benefit-programs-v1-pool-pools.http.ts","../../src/benefit-programs-v1-pool-pools.public.ts","../../src/benefit-programs-v1-pool-pools.context.ts"],"sourcesContent":["export * from './src/benefit-programs-v1-pool-pools.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBenefitProgramsV1Pool from './benefit-programs-v1-pool-pools.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface Pool {\n /**\n * Pool ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the pool is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the pool.\n *\n * Ignored when creating a pool.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the pool was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the pool was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * ID of the associated pool definition.\n * @format GUID\n * @readonly\n * @immutable\n */\n poolDefinitionId?: string | null;\n /**\n * ID of the associated program definition.\n * @format GUID\n * @readonly\n * @immutable\n */\n programDefinitionId?: string | null;\n /**\n * ID of the program that contains this pool.\n * @format GUID\n * @readonly\n * @immutable\n */\n programId?: string | null;\n /**\n * Pool status.\n * @readonly\n */\n status?: PoolStatusWithLiterals;\n /**\n * Pool beneficiary.\n * @readonly\n * @immutable\n */\n beneficiary?: CommonIdentificationData;\n /** Pool benefits and settings. */\n details?: Details;\n /**\n * Pool name.\n *\n * You may want to use the same name that's used in the associated pool definition.\n * @maxLength 64\n */\n displayName?: string;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @readonly\n * @immutable\n * @minLength 1\n * @maxLength 20\n */\n namespace?: string | null;\n /**\n * Custom field data for the pool object.\n *\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * Associated program definition information.\n * @readonly\n */\n programDefinition?: ProgramDefinitionInfo;\n /**\n * Information about the program containing the pool.\n * @readonly\n */\n program?: PoolProgramInfo;\n /**\n * Version of the pool definition that this pool was created from.\n * @readonly\n */\n poolDefinitionRevision?: string | null;\n /**\n * Number of times this pool has been renewed.\n * @readonly\n */\n renewalCount?: number | null;\n}\n\nexport enum PoolStatus {\n /** Undefined pool status. */\n UNDEFINED = 'UNDEFINED',\n /** Pool is active. */\n ACTIVE = 'ACTIVE',\n /** Pool is paused. It can be resumed. */\n PAUSED = 'PAUSED',\n /** Pool is ended. It can't be resumed. */\n ENDED = 'ENDED',\n /** Pool provisioning is in progress. This status exists for a short time during processing. */\n PROVISIONING = 'PROVISIONING',\n /** Pool renewing is in progress. This status exists for a short time during processing. */\n RENEWING = 'RENEWING',\n /** Pool is pending */\n PENDING = 'PENDING',\n}\n\n/** @enumType */\nexport type PoolStatusWithLiterals =\n | PoolStatus\n | 'UNDEFINED'\n | 'ACTIVE'\n | 'PAUSED'\n | 'ENDED'\n | 'PROVISIONING'\n | 'RENEWING'\n | 'PENDING';\n\nexport interface CommonIdentificationData\n extends CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor that hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site member.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n}\n\n/** @oneof */\nexport interface CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor that hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site member.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n}\n\nexport enum IdentityType {\n /** Unknown type. This value is not used. */\n UNKNOWN = 'UNKNOWN',\n /** A site visitor who has not logged in. */\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n /** A logged-in site member. */\n MEMBER = 'MEMBER',\n /** A Wix account holder, such as a site owner or contributor. */\n WIX_USER = 'WIX_USER',\n}\n\n/** @enumType */\nexport type IdentityTypeWithLiterals =\n | IdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER';\n\nexport interface Details {\n /**\n * List of benefits.\n * @maxSize 10\n */\n benefits?: Benefit[];\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 /** Additional information relating to this object. */\n additionalData?: Record<string, any> | null;\n}\n\nexport interface Benefit {\n /**\n * Unique identifier for this benefit.\n *\n * This key is consistent across the pool definition and all associated pools that contain this benefit.\n * @maxLength 64\n */\n benefitKey?: string;\n /**\n * ID that is used to associated items with this benefit.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string | null;\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 /** Additional information for this benefit. */\n additionalData?: Record<string, any> | null;\n /**\n * ID of the app providing the benefit items.\n * @format GUID\n * @immutable\n */\n providerAppId?: 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 PolicyExpression extends PolicyExpressionExpressionOneOf {\n /** Benefits can be redeemed if the expression in this object is not fulfilled. */\n operatorNotOptions?: PolicyExpressionNot;\n /** Benefits can be redeemed if all the expression in this object's array are fulfilled. */\n operatorAndOptions?: PolicyExpressionAnd;\n /** Benefits can be redeemed if at least one of the expressions in this object's array is fulfilled. */\n operatorOrOptions?: PolicyExpressionOr;\n /** Defines when benefits can be redeemed or how many benefits can be redeemed in a specific time period. */\n policyOptions?: Policy;\n /** Policy expression type. */\n type?: PolicyExpressionTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface PolicyExpressionExpressionOneOf {\n /** Benefits can be redeemed if the expression in this object is not fulfilled. */\n operatorNotOptions?: PolicyExpressionNot;\n /** Benefits can be redeemed if all the expression in this object's array are fulfilled. */\n operatorAndOptions?: PolicyExpressionAnd;\n /** Benefits can be redeemed if at least one of the expressions in this object's array is fulfilled. */\n operatorOrOptions?: PolicyExpressionOr;\n /** Defines when benefits can be redeemed or how many benefits can be redeemed in a specific time period. */\n policyOptions?: Policy;\n}\n\nexport enum PolicyExpressionType {\n UNKNOWN = 'UNKNOWN',\n /** Use with `operatorNotOptions`. */\n OPERATOR_NOT = 'OPERATOR_NOT',\n /** Use with `operatorAndOptions`. */\n OPERATOR_AND = 'OPERATOR_AND',\n /** Use with `operatorOrOptions`. */\n OPERATOR_OR = 'OPERATOR_OR',\n /** Use with `policyOptions`. */\n POLICY = 'POLICY',\n}\n\n/** @enumType */\nexport type PolicyExpressionTypeWithLiterals =\n | PolicyExpressionType\n | 'UNKNOWN'\n | 'OPERATOR_NOT'\n | 'OPERATOR_AND'\n | 'OPERATOR_OR'\n | 'POLICY';\n\nexport interface PolicyExpressionNot {\n /** Policy expression. If this expression is not fulfilled, benefits can be redeemed. */\n expression?: PolicyExpression;\n}\n\nexport interface PolicyExpressionAnd {\n /**\n * Array of policy expressions. If all expressions are fulfilled, benefits can be redeemed.\n * @minSize 2\n * @maxSize 10\n */\n expressions?: PolicyExpression[];\n}\n\nexport interface PolicyExpressionOr {\n /**\n * Array of policy expressions. If at least one expression is fulfilled, benefits can be redeemed.\n * @minSize 2\n * @maxSize 10\n */\n expressions?: PolicyExpression[];\n}\n\nexport interface Policy extends PolicyPolicyOneOf {\n /**\n * Defines an interval during which the policy expression is fulfilled.\n *\n * If `fromWeekDay` and `toWeekDay` are defined, this interval applies weekly. Otherwise, it applies daily.\n */\n fixedIntervalOptions?: FixedIntervalPolicy;\n /** Maximum amount of times a benefit can be redeemed during a specified time period. */\n rateLimitedOptions?: RateLimitedPolicy;\n /** Custom policy defined by a different app. */\n customOptions?: CustomPolicy;\n /** Policy type. */\n type?: TypeWithLiterals;\n}\n\n/** @oneof */\nexport interface PolicyPolicyOneOf {\n /**\n * Defines an interval during which the policy expression is fulfilled.\n *\n * If `fromWeekDay` and `toWeekDay` are defined, this interval applies weekly. Otherwise, it applies daily.\n */\n fixedIntervalOptions?: FixedIntervalPolicy;\n /** Maximum amount of times a benefit can be redeemed during a specified time period. */\n rateLimitedOptions?: RateLimitedPolicy;\n /** Custom policy defined by a different app. */\n customOptions?: CustomPolicy;\n}\n\nexport enum Type {\n /** Unknown policy type. */\n UNKNOWN = 'UNKNOWN',\n /** Use with `fixedIntervalOptions`. */\n FIXED_INTERVAL = 'FIXED_INTERVAL',\n /** Use with `rateLimitedOptions`. */\n RATE_LIMITED = 'RATE_LIMITED',\n /** Use with `customOptions`. */\n CUSTOM = 'CUSTOM',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN'\n | 'FIXED_INTERVAL'\n | 'RATE_LIMITED'\n | 'CUSTOM';\n\nexport interface FixedIntervalPolicy {\n /** Weekday that this interval starts from. If this field is defined, then `toWeekDay` is required. */\n fromWeekDay?: WeekDayWithLiterals;\n /** Weekday that this interval ends at. If this field is defined, then `fromWeekDay` is required. */\n toWeekDay?: WeekDayWithLiterals;\n /**\n * Hour that this interval starts from. If this field is defined, then `toHour` is required.\n * @max 23\n */\n fromHour?: number | null;\n /**\n * Hour that this interval ends at. If this field is defined, then `fromHour` is required.\n * @max 23\n */\n toHour?: number | null;\n /**\n * Minute that this interval starts from. If this field is defined, then `toMinute` is required.\n * @max 59\n */\n fromMinute?: number | null;\n /**\n * Minute that this interval ends at. If this field is defined, then `fromMinute` is required.\n * @max 59\n */\n toMinute?: number | null;\n}\n\nexport enum WeekDay {\n /** Unknown weekday. */\n UNKNOWN = 'UNKNOWN',\n /** Monday. */\n MONDAY = 'MONDAY',\n /** Tuesday. */\n TUESDAY = 'TUESDAY',\n /** Wednesday. */\n WEDNESDAY = 'WEDNESDAY',\n /** Thursday. */\n THURSDAY = 'THURSDAY',\n /** Friday. */\n FRIDAY = 'FRIDAY',\n /** Saturday. */\n SATURDAY = 'SATURDAY',\n /** Sunday. */\n SUNDAY = 'SUNDAY',\n}\n\n/** @enumType */\nexport type WeekDayWithLiterals =\n | WeekDay\n | 'UNKNOWN'\n | 'MONDAY'\n | 'TUESDAY'\n | 'WEDNESDAY'\n | 'THURSDAY'\n | 'FRIDAY'\n | 'SATURDAY'\n | 'SUNDAY';\n\nexport interface RateLimitedPolicy extends RateLimitedPolicyPeriodOneOf {\n /** Fixed interval used to limit benefit redemption. */\n fixedIntervalOptions?: FixedIntervalPolicy;\n /** Maximum number of times a benefit can be redeemed per specified time period. */\n times?: number;\n /** Time period type. */\n type?: RateLimitedPolicyTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface RateLimitedPolicyPeriodOneOf {\n /** Fixed interval used to limit benefit redemption. */\n fixedIntervalOptions?: FixedIntervalPolicy;\n}\n\nexport enum RateLimitedPolicyType {\n /** Unknown rate limit method. */\n UNKNOWN = 'UNKNOWN',\n /** Time period is defined using `fixedIntervalOptions`. */\n FIXED_INTERVAL = 'FIXED_INTERVAL',\n /** Time period is from one program renewal to the next. */\n PER_CYCLE = 'PER_CYCLE',\n}\n\n/** @enumType */\nexport type RateLimitedPolicyTypeWithLiterals =\n | RateLimitedPolicyType\n | 'UNKNOWN'\n | 'FIXED_INTERVAL'\n | 'PER_CYCLE';\n\n/** Custom policy as implemented by the Entitlement Policy Provider */\nexport interface CustomPolicy {\n /**\n * Policy ID.\n * @format GUID\n */\n _id?: string;\n /**\n * ID of the app providing the policy.\n * @format GUID\n */\n appId?: string | null;\n /** Additional information for this custom policy. */\n additionalData?: Record<string, any> | null;\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 /** Rollover settings. */\n rolloverConfiguration?: RolloverConfiguration;\n /**\n * Credit unit display name.\n * @maxLength 32\n */\n unitDisplayName?: string | null;\n}\n\nexport interface RolloverConfiguration {\n /** Whether unused credits roll over to a new cycle when a program renews. */\n enabled?: boolean | null;\n /**\n * Maximum number of credits that can roll over to the next cycle when a program renews.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n balanceCap?: string | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface ProgramDefinitionInfo {\n /**\n * Program definition ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Program definition external ID.\n * @format GUID\n * @readonly\n */\n externalId?: string | null;\n}\n\nexport interface PoolProgramInfo {\n /**\n * Program ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Program external ID.\n * @format GUID\n * @readonly\n */\n externalId?: string | null;\n}\n\nexport enum PoolOrigin {\n /** Unknown pool origin. */\n UNKNOWN = 'UNKNOWN',\n /** Benefit pool created by a program provision. */\n PROVISION = 'PROVISION',\n /** Benefit pool was created when pool definition was added to program definition. */\n CASCADE = 'CASCADE',\n}\n\n/** @enumType */\nexport type PoolOriginWithLiterals =\n | PoolOrigin\n | 'UNKNOWN'\n | 'PROVISION'\n | 'CASCADE';\n\nexport interface PoolRenewalAction extends PoolRenewalActionActionOneOf {\n /**\n * The pool's details (benefits and settings) will be updated to match the details of the specified pool definition revision.\n * @readonly\n */\n updateOptions?: Update;\n /**\n * Version of the pool definition that will be used when the pool is renewed.\n * @readonly\n */\n poolDefinitionRevision?: string | null;\n /**\n * The action that will be taken when the pool is renewed\n * @readonly\n */\n type?: PoolRenewalActionTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface PoolRenewalActionActionOneOf {\n /**\n * The pool's details (benefits and settings) will be updated to match the details of the specified pool definition revision.\n * @readonly\n */\n updateOptions?: Update;\n}\n\nexport enum PoolRenewalActionType {\n /** Undefined action type. */\n UNDEFINED = 'UNDEFINED',\n /** Pool will end on program renewal */\n END = 'END',\n /** Pool will be updated on program renewal */\n UPDATE = 'UPDATE',\n}\n\n/** @enumType */\nexport type PoolRenewalActionTypeWithLiterals =\n | PoolRenewalActionType\n | 'UNDEFINED'\n | 'END'\n | 'UPDATE';\n\nexport interface Update {\n /**\n * The pool's details will be updated to match the details of the specified pool definition revision.\n * @readonly\n */\n details?: Details;\n /**\n * The pool's display name will be updated to match the display name of the specified pool definition revision.\n * @maxLength 64\n */\n displayName?: string;\n}\n\nexport interface PoolProvisioned {\n /** Pool which has been provisioned */\n pool?: Pool;\n}\n\nexport interface PoolRenewed {\n /** Pool which has been granted */\n pool?: Pool;\n}\n\nexport interface BenefitRedeemed {\n /** Pool which has been redeemed */\n pool?: Pool;\n /** Details of the redemption */\n redemptionDetails?: RedemptionDetails;\n}\n\nexport interface RedemptionDetails {\n /**\n * Id of the redemption transaction\n * @format GUID\n */\n transactionId?: string;\n /** Reference of the item that is being redeemed */\n itemReference?: ItemReference;\n /**\n * Number of of items to redeem\n * @min 1\n */\n itemCount?: number;\n /**\n * Date at which the item will be used. Target date does not necessarily equal the redemption date. Credits are redeemed immediately.\n * This date is only used for validations that may be performed by entitlement providers\n */\n targetDate?: Date | null;\n /**\n * Idempotency key\n * @maxLength 200\n */\n idempotencyKey?: string;\n /** Additional info provided during redemption */\n additionalData?: Record<string, any> | null;\n /** Beneficiary of the entitlement */\n beneficiary?: CommonIdentificationData;\n}\n\nexport interface ItemReference {\n /**\n * External ID of the item.\n * @format GUID\n */\n externalId?: string;\n /**\n * Item category.\n * @maxLength 20\n */\n category?: string;\n /**\n * ID of the app providing the item.\n * @format GUID\n */\n providerAppId?: string;\n}\n\nexport interface PoolPaused {\n /** Pool which has been paused */\n pool?: Pool;\n}\n\nexport interface PoolResumed {\n /** Pool which has been resumed */\n pool?: Pool;\n}\n\nexport interface PoolEnded {\n /** Pool which has been ended */\n pool?: Pool;\n}\n\nexport interface BenefitReserved {\n /** Pool which was used to perform this transaction */\n pool?: Pool;\n /** Details of the redemption */\n redemptionDetails?: RedemptionDetails;\n}\n\nexport interface BenefitReservationCanceled {\n /** Pool which was used to perform this transaction */\n pool?: Pool;\n /**\n * Id of the canceled reservation transaction\n * @format GUID\n */\n transactionId?: string;\n}\n\nexport interface BenefitReservationReleased {\n /** Pool which was used to perform this transaction */\n pool?: Pool;\n /**\n * Id of the released reservation transaction\n * @format GUID\n */\n transactionId?: string;\n}\n\nexport interface PoolProvisionJobFinished {\n /**\n * Program id\n * @format GUID\n */\n programId?: string;\n /** Processed item count */\n processedItemCount?: number;\n /** Origin of the pool */\n origin?: PoolOriginWithLiterals;\n}\n\nexport interface PoolStatusUpdateJobFinished\n extends PoolStatusUpdateJobFinishedContextOneOf {\n /** The id of the pool definition that is being updated */\n poolDefinitionAndProgramDefinition?: PoolDefinitionAndProgramDefinition;\n /** Update the status of all pools in the program */\n programInfo?: ProgramInfo;\n /** Update the status of a specific pool */\n poolInfo?: PoolStatusUpdateParamsPoolInfo;\n /** Target status of the pool */\n targetStatus?: PoolStatusWithLiterals;\n /** The total number of items that were processed */\n processedItemCount?: number;\n}\n\n/** @oneof */\nexport interface PoolStatusUpdateJobFinishedContextOneOf {\n /** The id of the pool definition that is being updated */\n poolDefinitionAndProgramDefinition?: PoolDefinitionAndProgramDefinition;\n /** Update the status of all pools in the program */\n programInfo?: ProgramInfo;\n /** Update the status of a specific pool */\n poolInfo?: PoolStatusUpdateParamsPoolInfo;\n}\n\nexport interface PoolDefinitionAndProgramDefinition {\n /**\n * The id of the pool definition that is being updated\n * @format GUID\n * @readonly\n */\n poolDefinitionId?: string;\n /**\n * The key of the program that is being updated\n * @format GUID\n */\n programDefinitionId?: string | null;\n}\n\nexport interface ProgramInfo {\n /**\n * The key of the program that is being updated\n * @format GUID\n */\n programId?: string;\n /** Additional data that was provided when the job was submitted */\n additionalData?: Record<string, any> | null;\n}\n\nexport interface PoolStatusUpdateParamsPoolInfo {\n /**\n * The key of the program that is being updated\n * @format GUID\n */\n poolId?: string;\n /** Additional data that was provided when the job was submitted */\n additionalData?: Record<string, any> | null;\n}\n\nexport interface CreatePoolRequest {\n /** Pool to be created. */\n pool?: Pool;\n}\n\nexport interface CreatePoolResponse {\n /** Created pool. */\n pool?: Pool;\n}\n\nexport interface GetPoolRequest {\n /**\n * ID of the pool to retrieve.\n * @format GUID\n */\n poolId: string;\n}\n\nexport interface GetPoolResponse {\n /** Retrieved pool. */\n pool?: Pool;\n}\n\nexport interface UpdatePoolRequest {\n /** Pool to update. */\n pool: Pool;\n}\n\nexport interface UpdatePoolResponse {\n /** Updated pool. */\n pool?: Pool;\n}\n\nexport interface DeletePoolRequest {\n /**\n * ID of the pool to delete.\n * @format GUID\n */\n poolId?: string;\n}\n\nexport interface DeletePoolResponse {}\n\nexport interface QueryPoolsRequest {\n /** Filter, sort, and paging to apply to the query. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n * See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)\n * for more information.\n */\n filter?: Record<string, any> | null;\n /**\n * List of sort objects.\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /**\n * Sort order. Use `ASC` for ascending order or `DESC` for descending order.\n *\n * Default: `ASC`\n */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n /** Ascending sort order. */\n ASC = 'ASC',\n /** Descending sort order. */\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.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryPoolsResponse {\n /** List of retrieved pools. */\n pools?: Pool[];\n /** Metadata for the 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 RedeemBenefitRequest {\n /**\n * ID of the pool that contains the benefit to redeem.\n * @format GUID\n */\n poolId: string;\n /** Information about the item to redeem. */\n itemReference: ItemReference;\n /**\n * Key of the benefit to redeem.\n * @maxLength 64\n */\n benefitKey: string;\n /**\n * Amount of items to redeem.\n * @min 1\n */\n count?: number;\n /**\n * Date that the item will be provided to the beneficiary.\n *\n * The pool's associated balance will update immediately. This parameter should be used to manage the logistics of providing the item.\n */\n targetDate?: Date | null;\n /**\n * Unique identifier, generated by the client.\n * Used to recognize repeated attempts to make the same request.\n * @maxLength 200\n */\n idempotencyKey: string;\n /** Additional information. */\n additionalData?: Record<string, any> | null;\n /** Beneficiary of the pool containing the benefit to redeem. */\n beneficiary?: CommonIdentificationData;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n}\n\nexport interface RedeemBenefitResponse {\n /**\n * ID of the transaction recording the associated change in balance.\n * @format GUID\n */\n transactionId?: string;\n}\n\nexport interface NotEnoughBalance {\n /**\n * Pool ID.\n * @format GUID\n */\n poolId?: string;\n /** Item reference. */\n itemReference?: ItemReference;\n /**\n * Pool's associated balance amount in credits.\n * @decimalValue options { maxScale:4 }\n */\n availableBalance?: string;\n /**\n * Price of the item in credits.\n * @decimalValue options { maxScale:4 }\n */\n requestedBalance?: string;\n}\n\nexport interface PoolInfo {\n /** Current pool balance */\n balance?: BalanceAmount;\n /**\n * Initial available amount for associated balances.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n creditAmount?: string | null;\n /**\n * Pool name\n * @maxLength 64\n */\n displayName?: string;\n /**\n * Pool description\n * @maxLength 450\n */\n description?: string | null;\n}\n\nexport interface BalanceAmount {\n /**\n * number of available credits.\n * @decimalValue options { maxScale:4 }\n * @readonly\n */\n available?: string;\n /**\n * number of reserved credits.\n * @decimalValue options { maxScale:4 }\n * @readonly\n */\n reserved?: string;\n}\n\nexport interface BenefitInfo {\n /**\n * Benefit name\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * Benefit description\n * @maxLength 256\n */\n description?: string | null;\n}\n\nexport interface PolicyExpressionEvaluatedToFalse {\n /**\n * Pool ID.\n * @format GUID\n */\n poolId?: string;\n /** Item reference. */\n itemReference?: ItemReference;\n /**\n * Failure details.\n * @maxSize 10\n */\n failureDetails?: FailureDetails[];\n}\n\nexport interface FailureDetails {\n /**\n * Failure code\n * @minLength 1\n * @maxLength 64\n */\n code?: string;\n /**\n * Failure message\n * @maxLength 256\n */\n message?: string | null;\n /**\n * Policy id\n * @format GUID\n */\n policyId?: string | null;\n /**\n * App that owns the policy\n * @format GUID\n */\n appId?: string | null;\n /** Information provided by the policy */\n errorData?: Record<string, any> | null;\n}\n\nexport interface PoolNotActive {\n /**\n * Pool ID.\n * @format GUID\n */\n poolId?: string;\n /** Pool status. */\n poolStatus?: PoolStatusWithLiterals;\n}\n\nexport interface PoolNotFound {\n /**\n * Pool ID.\n * @format GUID\n */\n poolId?: string;\n}\n\nexport interface BenefitAlreadyRedeemed {\n /**\n * Pool ID\n * @format GUID\n */\n poolId?: string;\n /**\n * Idempotency key of the request that failed\n * @maxLength 200\n */\n idempotencyKey?: string;\n}\n\nexport interface BenefitNotFound {\n /**\n * Pool ID.\n * @format GUID\n */\n poolId?: string;\n /**\n * Specified benefit key.\n * @format GUID\n */\n benefitKey?: string | null;\n}\n\nexport interface ReserveBenefitRequest {\n /**\n * Id of the pool that is being redeemed from\n * @format GUID\n */\n poolId?: string;\n /** Reference of the item that is being redeemed. */\n itemReference?: ItemReference;\n /**\n * Key of the benefit to be redeemed, associated with a particular benefit.\n *\n * This key must be specified to ensure the correct benefit is redeemed.\n *\n * Default: The first eligible benefit in the benefit pool will be redeemed.\n * @maxLength 64\n */\n benefitKey?: string | null;\n /**\n * Number of items to redeem.\n * @min 1\n */\n count?: number;\n /**\n * Date when the benefit item will be used.\n *\n * While the credit balance is adjusted immediately upon the redemption request, the target date may be set for a later time than the date of the request.\n *\n * Used for the app providing the benefit items to manage the logistics associated with the item.\n */\n targetDate?: Date | null;\n /**\n * Idempotency key\n * @maxLength 200\n */\n idempotencyKey?: string;\n /** Additional info */\n additionalData?: Record<string, any> | null;\n /** Benefit pool owner. */\n beneficiary?: CommonIdentificationData;\n /**\n * Module that is the source of the benefit pool creation.\n *\n * This value must correspond with the previously defined namespace established when creating the associated pool definition.\n *\n * It ensures efficient processing and management of pools and benefits.\n * @minLength 1\n * @maxLength 20\n */\n namespace?: string;\n}\n\nexport interface ReserveBenefitResponse {\n /**\n * Id of the transaction that was created as a result of this request\n * @format GUID\n */\n transactionId?: string;\n}\n\nexport interface CancelBenefitReservationRequest {\n /**\n * Id of the transaction that was created as a result of this request\n * @format GUID\n */\n transactionId?: string;\n}\n\nexport interface CancelBenefitReservationResponse {\n /**\n * Id of the transaction that was created as a result of this request\n * @format GUID\n */\n transactionId?: string;\n}\n\nexport interface ReleaseBenefitReservationRequest {\n /**\n * Id of the transaction that was created as a result of this request\n * @format GUID\n */\n transactionId?: string;\n}\n\nexport interface ReleaseBenefitReservationResponse {\n /**\n * Id of the transaction that was created as a result of this request\n * @format GUID\n */\n transactionId?: string;\n}\n\nexport interface CheckBenefitEligibilityRequest {\n /**\n * ID of the pool that the benefit to check belongs to.\n * @format GUID\n */\n poolId: string;\n /**\n * Key of the benefit to check.\n * @maxLength 64\n */\n benefitKey?: string | null;\n /** Information about the item to check. */\n itemReference: ItemReference;\n /**\n * Amount of items to check.\n *\n * Ensures the balance is high enough to redeem this many items.\n * @min 1\n */\n count?: number;\n /**\n * Date that the item will be provided to the beneficiary.\n *\n * This parameter should be used to manage the potential logistics of providing the item.\n */\n targetDate?: Date | null;\n /** Additional information. */\n additionalData?: Record<string, any> | null;\n /** Beneficiary of the pool containing the benefit to check. */\n beneficiary?: CommonIdentificationData;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n}\n\nexport interface CheckBenefitEligibilityResponse {\n /** Result of the eligibility check. */\n result?: EligibilityCheckResult;\n}\n\nexport interface EligibilityCheckResult\n extends EligibilityCheckResultResultOneOf {\n /** Returned when item is eligible to be redeemed. */\n eligibleOptions?: Eligible;\n /** Returned when the pool's associated balance is lower than the cost of redeeming the items. */\n notEnoughBalanceOptions?: NotEnoughBalance;\n /** Returned when the pool isn't active. */\n poolNotActiveOptions?: PoolNotActive;\n /** Returned when invalid benefit details are provided. */\n benefitNotFoundOptions?: BenefitNotFound;\n /** Returned when invalid pool details are provided. */\n poolNotFoundOptions?: PoolNotFound;\n /** Eligibility status. */\n type?: EligibilityCheckResultTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface EligibilityCheckResultResultOneOf {\n /** Returned when item is eligible to be redeemed. */\n eligibleOptions?: Eligible;\n /** Returned when the pool's associated balance is lower than the cost of redeeming the items. */\n notEnoughBalanceOptions?: NotEnoughBalance;\n /** Returned when the pool isn't active. */\n poolNotActiveOptions?: PoolNotActive;\n /** Returned when invalid benefit details are provided. */\n benefitNotFoundOptions?: BenefitNotFound;\n /** Returned when invalid pool details are provided. */\n poolNotFoundOptions?: PoolNotFound;\n}\n\nexport interface EligibleBenefit {\n /**\n * Pool ID.\n * @format GUID\n * @readonly\n */\n poolId?: string;\n /**\n * Benefit key.\n * @maxLength 64\n */\n benefitKey?: string;\n /** Item reference. */\n itemReference?: ItemReference;\n /**\n * Price of the benefit in credits.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n price?: string | null;\n}\n\nexport enum EligibilityCheckResultType {\n /** Unknown eligibility. */\n UNKNOWN = 'UNKNOWN',\n /** Item is eligible to be redeemed. */\n ELIGIBLE = 'ELIGIBLE',\n /** Balance is lower than the cost of redeeming the items. */\n NOT_ENOUGH_BALANCE = 'NOT_ENOUGH_BALANCE',\n /** Pool isn't active. */\n POOL_NOT_ACTIVE = 'POOL_NOT_ACTIVE',\n /** Invalid benefit details provided. */\n BENEFIT_NOT_FOUND = 'BENEFIT_NOT_FOUND',\n /** Invalid pool details provided. */\n POOL_NOT_FOUND = 'POOL_NOT_FOUND',\n}\n\n/** @enumType */\nexport type EligibilityCheckResultTypeWithLiterals =\n | EligibilityCheckResultType\n | 'UNKNOWN'\n | 'ELIGIBLE'\n | 'NOT_ENOUGH_BALANCE'\n | 'POOL_NOT_ACTIVE'\n | 'BENEFIT_NOT_FOUND'\n | 'POOL_NOT_FOUND';\n\nexport interface Eligible {\n /**\n * Benefits that are eligible to be redeemed.\n * @maxSize 100\n */\n eligibleBenefits?: EligibleBenefit[];\n}\n\nexport interface BulkCheckBenefitEligibilityRequest {\n /**\n * List of benefits to check.\n * @minSize 1\n * @maxSize 100\n */\n benefitSelectors?: BenefitSelector[];\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n /** Pool beneficiary. */\n beneficiary?: CommonIdentificationData;\n}\n\nexport interface BenefitSelector {\n /**\n * ID of the pool that the benefit to check belongs to.\n * @format GUID\n */\n poolId?: string;\n /**\n * Key of the benefit to check.\n * @maxLength 64\n */\n benefitKey?: string | null;\n /** Information about the item to check. */\n itemReference?: ItemReference;\n /**\n * Amount of items to check.\n *\n * Ensures the balance is high enough to redeem this many it\n * @min 1\n */\n count?: number;\n /**\n * Date that the item will be provided to the beneficiary.\n *\n * This parameter should be used to manage the potential logistics of providing the item.\n */\n targetDate?: Date | null;\n /** Additional information. */\n additionalData?: Record<string, any> | null;\n}\n\nexport interface BulkCheckBenefitEligibilityResponse {\n /**\n * List of results checking each benefit.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkEligibilityCheckResult[];\n}\n\nexport interface BulkEligibilityCheckResult {\n /** Benefit information specified in API call. */\n benefitSelector?: BenefitSelector;\n /** Result of the eligibility check. */\n result?: EligibilityCheckResult;\n}\n\nexport interface GetEligibleBenefitsRequest {\n /** Item reference. */\n itemReference: ItemReference;\n /**\n * Amount of items to check. This ensures the balance is high enough to redeem this many items.\n * @min 1\n */\n count?: number;\n /**\n * Date that the item will be provided to the beneficiary.\n *\n * This parameter should be used to manage the potential logistics of providing the item.\n */\n targetDate?: Date | null;\n /** Additional information. */\n additionalData?: Record<string, any> | null;\n /** Filter request by beneficiary. */\n beneficiary?: CommonIdentificationData;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n}\n\nexport interface GetEligibleBenefitsResponse {\n /** Retrieved benefits that can be redeemed. */\n eligibleBenefits?: EligibleBenefit[];\n}\n\nexport interface ListPoolsRequest {\n /** The filter */\n filter?: Filter;\n /** Cursor paging */\n cursorPaging?: CursorPaging;\n}\n\nexport enum ListPoolsRequestType {\n UNKNOWN_FILTER = 'UNKNOWN_FILTER',\n BY_ITEM_REFERENCE = 'BY_ITEM_REFERENCE',\n}\n\n/** @enumType */\nexport type ListPoolsRequestTypeWithLiterals =\n | ListPoolsRequestType\n | 'UNKNOWN_FILTER'\n | 'BY_ITEM_REFERENCE';\n\nexport interface ByItemReference {\n /**\n * A list of filters\n * @maxSize 100\n */\n filters?: ByItemReferenceFilter[];\n /** Beneficiary of the pool */\n beneficiary?: CommonIdentificationData;\n /**\n * Returns pools that are in the following statuses\n * @maxSize 10\n */\n poolStatuses?: PoolStatusWithLiterals[];\n}\n\nexport interface ByItemReferenceFilter {\n /** Reference of the item */\n itemReference?: ItemReference;\n}\n\nexport interface Filter extends FilterFilterOneOf {\n /** A list of filters by reference */\n byItemReferenceOptions?: ByItemReference;\n /** Type of the filter */\n type?: ListPoolsRequestTypeWithLiterals;\n /**\n * Module that is the source of the benefit pool creation.\n *\n * This value must correspond with the previously defined namespace established when creating the associated pool definition.\n *\n * It ensures efficient processing and management of pools and benefits.\n * @minLength 1\n * @maxLength 20\n */\n namespace?: string;\n}\n\n/** @oneof */\nexport interface FilterFilterOneOf {\n /** A list of filters by reference */\n byItemReferenceOptions?: ByItemReference;\n}\n\nexport interface ListPoolsResponse {\n /**\n * The retrieved pools\n * @maxSize 100\n */\n pools?: PoolWithItems[];\n /** Paging information */\n metadata?: CursorPagingMetadata;\n}\n\nexport interface PoolWithItems {\n /** The pool */\n pool?: Pool;\n /**\n * The items in the pool\n * @maxSize 100\n */\n itemReference?: ItemReference[];\n}\n\nexport interface BulkUpdatePoolsRequest {\n /**\n * Pools to update.\n * @minSize 1\n * @maxSize 100\n */\n pools?: MaskedPool[];\n /**\n * Whether to return the full pool definition entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface MaskedPool {\n /** Pool to update. */\n pool?: Pool;\n /** Explicit list of fields to update. */\n fieldMask?: string[];\n}\n\nexport interface BulkUpdatePoolsResponse {\n /**\n * List of updated pools and associated metadata.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkPoolResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkPoolResult {\n /** Pool metadata. */\n poolMetadata?: ItemMetadata;\n /** Pool data. */\n pool?: Pool;\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 ProvisionPoolsForProgramRequest {\n /** Reference of the template that is used to provision the pools */\n poolDefinitionLookupId?: PoolDefinitionLookupId;\n /**\n * Program that the provisioned pools are part of\n * @format GUID\n */\n programId?: string;\n}\n\nexport interface PoolDefinitionLookupId extends PoolDefinitionLookupIdIdOneOf {\n /**\n * Pool definition ID.\n * @format GUID\n */\n poolDefinitionId?: string;\n /**\n * Program definition ID.\n * @format GUID\n */\n programDefinitionId?: string;\n}\n\n/** @oneof */\nexport interface PoolDefinitionLookupIdIdOneOf {\n /**\n * Pool definition ID.\n * @format GUID\n */\n poolDefinitionId?: string;\n /**\n * Program definition ID.\n * @format GUID\n */\n programDefinitionId?: string;\n}\n\nexport interface ProvisionPoolsForProgramResponse\n extends ProvisionPoolsForProgramResponseResultOneOf {\n /** Sync result */\n syncOptions?: SyncResult;\n /** Async result */\n asyncOptions?: AsyncResult;\n /**\n * Job ID of the program provision associated with this pool. Retrieve job details using the [Async Job API](https://dev.wix.com/docs/rest/business-management/async-job/introduction).\n * @format GUID\n */\n jobId?: string;\n /** Type of the result */\n type?: ProvisionPoolsForProgramResponseTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface ProvisionPoolsForProgramResponseResultOneOf {\n /** Sync result */\n syncOptions?: SyncResult;\n /** Async result */\n asyncOptions?: AsyncResult;\n}\n\nexport enum ProvisionPoolsForProgramResponseType {\n /** Unknown result type */\n UNKNOWN = 'UNKNOWN',\n /** Sync result */\n SYNC = 'SYNC',\n /** Async result */\n ASYNC = 'ASYNC',\n}\n\n/** @enumType */\nexport type ProvisionPoolsForProgramResponseTypeWithLiterals =\n | ProvisionPoolsForProgramResponseType\n | 'UNKNOWN'\n | 'SYNC'\n | 'ASYNC';\n\nexport interface SyncResult {\n /** Indicates if the operation was successful */\n success?: boolean;\n}\n\nexport interface AsyncResult {\n /**\n * Job ID of the program provision associated with this pool. Retrieve job details using the [Async Job API](https://dev.wix.com/docs/rest/business-management/async-job/introduction).\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface InvalidPoolDefinitionReference {\n /** Reference of the template that didn't find any pool definitions */\n poolDefinitionLookupId?: PoolDefinitionLookupId;\n}\n\nexport interface RenewPoolsForProgramRequest {\n /**\n * Package of pools to grant. Package id should be the same that was used to provision programs.\n * @format GUID\n */\n programId?: string;\n}\n\nexport interface RenewPoolsForProgramResponse {\n /**\n * Job id of the renewal job\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface UpdatePoolStatusRequest\n extends UpdatePoolStatusRequestPoolSelectorOneOf {\n /** Pool selector by pool definition id and program definition id */\n byPoolDefinitionIdAndProgramDefinitionIdOptions?: ByPoolDefinitionIdAndProgramDefinitionIdOptions;\n /** Pool selector by program id */\n byProgramIdOptions?: ByProgramIdOptions;\n /** New pool status */\n status?: PoolStatusWithLiterals;\n /** Pool selector type */\n poolSelectorType?: PoolSelectorTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface UpdatePoolStatusRequestPoolSelectorOneOf {\n /** Pool selector by pool definition id and program definition id */\n byPoolDefinitionIdAndProgramDefinitionIdOptions?: ByPoolDefinitionIdAndProgramDefinitionIdOptions;\n /** Pool selector by program id */\n byProgramIdOptions?: ByProgramIdOptions;\n}\n\nexport enum PoolSelectorType {\n UNKNOWN_SELECTOR = 'UNKNOWN_SELECTOR',\n BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID = 'BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID',\n BY_PROGRAM_ID = 'BY_PROGRAM_ID',\n}\n\n/** @enumType */\nexport type PoolSelectorTypeWithLiterals =\n | PoolSelectorType\n | 'UNKNOWN_SELECTOR'\n | 'BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID'\n | 'BY_PROGRAM_ID';\n\nexport interface ByPoolDefinitionIdAndProgramDefinitionIdOptions {\n /**\n * Pool definition id\n * @format GUID\n */\n poolDefinitionId?: string;\n /**\n * Program definition id\n * @format GUID\n */\n programDefinitionId?: string | null;\n}\n\nexport interface ByProgramIdOptions {\n /**\n * Program id\n * @format GUID\n */\n programId?: string;\n /** Additional data that gets added to the event once the async job completes */\n additionalData?: Record<string, any> | null;\n}\n\nexport interface UpdatePoolStatusResponse {\n /**\n * Job ID of the program provision associated with this pool. Retrieve job details using the [Async Job API](https://dev.wix.com/docs/rest/business-management/async-job/introduction).\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface CountNumberOfPoolsInProvisioningStatusRequest {\n /**\n * Program id\n * @format GUID\n */\n programId?: string;\n}\n\nexport interface CountNumberOfPoolsInProvisioningStatusResponse {\n /** Number of pools in provisioning status */\n count?: number;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type RedeemBenefitApplicationErrors =\n | {\n code?: 'NOT_ENOUGH_BALANCE';\n description?: string;\n data?: NotEnoughBalance;\n }\n | {\n code?: 'POLICY_EXPRESSION_EVALUATED_TO_FALSE';\n description?: string;\n data?: PolicyExpressionEvaluatedToFalse;\n }\n | {\n code?: 'POOL_NOT_ACTIVE';\n description?: string;\n data?: PoolNotActive;\n }\n | {\n code?: 'POOL_NOT_FOUND';\n description?: string;\n data?: PoolNotFound;\n }\n | {\n code?: 'BENEFIT_ALREADY_REDEEMED';\n description?: string;\n data?: BenefitAlreadyRedeemed;\n }\n | {\n code?: 'BENEFIT_NOT_FOUND';\n description?: string;\n data?: BenefitNotFound;\n };\n/** @docsIgnore */\nexport type GetEligibleBenefitsApplicationErrors = {\n code?: 'INVALID_ITEM_REFERENCE';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Retrieves a pool.\n * @param poolId - ID of the pool to retrieve.\n * @public\n * @requiredField poolId\n * @permissionId BENEFIT_PROGRAMS.POOL_READ\n * @applicableIdentity APP\n * @returns Retrieved pool.\n * @fqn wix.benefit_programs.v1.pool.PoolService.GetPool\n */\nexport async function getPool(\n poolId: string\n): Promise<\n NonNullablePaths<\n Pool,\n | `status`\n | `beneficiary.anonymousVisitorId`\n | `beneficiary.memberId`\n | `beneficiary.wixUserId`\n | `details.benefits`\n | `details.benefits.${number}.benefitKey`\n | `details.creditConfiguration.amount`\n | `displayName`\n | `programDefinition._id`\n | `program._id`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ poolId: poolId });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Pool.getPool(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.pool!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { poolId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['poolId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a pool.\n *\n * Each time the pool is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the pool.\n * This ensures you're working with the latest pool\n * and prevents unintended overwrites.\n * @param _id - Pool ID.\n * @public\n * @requiredField _id\n * @requiredField pool\n * @requiredField pool.revision\n * @permissionId BENEFIT_PROGRAMS.POOL_UPDATE\n * @applicableIdentity APP\n * @returns Updated pool.\n * @fqn wix.benefit_programs.v1.pool.PoolService.UpdatePool\n */\nexport async function updatePool(\n _id: string,\n pool: NonNullablePaths<UpdatePool, `revision`, 2>\n): Promise<\n NonNullablePaths<\n Pool,\n | `status`\n | `beneficiary.anonymousVisitorId`\n | `beneficiary.memberId`\n | `beneficiary.wixUserId`\n | `details.benefits`\n | `details.benefits.${number}.benefitKey`\n | `details.creditConfiguration.amount`\n | `displayName`\n | `programDefinition._id`\n | `program._id`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n pool: { ...pool, id: _id },\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Pool.updatePool(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.pool!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { pool: '$[1]' },\n explicitPathsToArguments: { 'pool.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'pool']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdatePool {\n /**\n * Pool ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the pool is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the pool.\n *\n * Ignored when creating a pool.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the pool was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the pool was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * ID of the associated pool definition.\n * @format GUID\n * @readonly\n * @immutable\n */\n poolDefinitionId?: string | null;\n /**\n * ID of the associated program definition.\n * @format GUID\n * @readonly\n * @immutable\n */\n programDefinitionId?: string | null;\n /**\n * ID of the program that contains this pool.\n * @format GUID\n * @readonly\n * @immutable\n */\n programId?: string | null;\n /**\n * Pool status.\n * @readonly\n */\n status?: PoolStatusWithLiterals;\n /**\n * Pool beneficiary.\n * @readonly\n * @immutable\n */\n beneficiary?: CommonIdentificationData;\n /** Pool benefits and settings. */\n details?: Details;\n /**\n * Pool name.\n *\n * You may want to use the same name that's used in the associated pool definition.\n * @maxLength 64\n */\n displayName?: string;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @readonly\n * @immutable\n * @minLength 1\n * @maxLength 20\n */\n namespace?: string | null;\n /**\n * Custom field data for the pool object.\n *\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * Associated program definition information.\n * @readonly\n */\n programDefinition?: ProgramDefinitionInfo;\n /**\n * Information about the program containing the pool.\n * @readonly\n */\n program?: PoolProgramInfo;\n /**\n * Version of the pool definition that this pool was created from.\n * @readonly\n */\n poolDefinitionRevision?: string | null;\n /**\n * Number of times this pool has been renewed.\n * @readonly\n */\n renewalCount?: number | null;\n}\n\n/**\n * Creates a query to retrieve a list of pools.\n *\n * The Query Pools method builds a query to retrieve a list of pools and returns a `PoolsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `PoolsQueryBuilder` methods onto the query. `PoolsQueryBuilder` methods enable you to filter, sort, and control the results that Query Pools returns.\n *\n * Query Pools has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `PoolsQueryResult`.\n * @public\n * @permissionId BENEFIT_PROGRAMS.POOL_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool.PoolService.QueryPools\n */\nexport function queryPools(): PoolsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<Pool, 'CURSOR', QueryPoolsRequest, QueryPoolsResponse>({\n func: async (payload: QueryPoolsRequest) => {\n const reqOpts = ambassadorWixBenefitProgramsV1Pool.queryPools(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryPoolsRequest['query']) => {\n const args = [query, {}] as [QueryPoolsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryPoolsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.pools,\n pagingMetadata: transformedData?.metadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface PoolsQueryResult extends QueryCursorResult {\n items: Pool[];\n query: PoolsQueryBuilder;\n next: () => Promise<PoolsQueryResult>;\n prev: () => Promise<PoolsQueryResult>;\n}\n\nexport interface PoolsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'status'\n | 'beneficiary'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id',\n value: any\n ) => PoolsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'status'\n | 'beneficiary'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id',\n value: any\n ) => PoolsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id',\n value: any\n ) => PoolsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id',\n value: any\n ) => PoolsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id',\n value: any\n ) => PoolsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id',\n value: any\n ) => PoolsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n */\n startsWith: (\n propertyName:\n | '_id'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id',\n value: string\n ) => PoolsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasSome: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'status'\n | 'beneficiary'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id',\n value: any[]\n ) => PoolsQueryBuilder;\n in: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'status'\n | 'beneficiary'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id',\n value: any\n ) => PoolsQueryBuilder;\n exists: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'status'\n | 'beneficiary'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id',\n value: boolean\n ) => PoolsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'status'\n | 'beneficiary'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id'\n >\n ) => PoolsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n descending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'poolDefinitionId'\n | 'programDefinitionId'\n | 'programId'\n | 'status'\n | 'beneficiary'\n | 'beneficiary.memberId'\n | 'beneficiary.wixUserId'\n | 'details.benefits.itemSetId'\n | 'details.benefits.providerAppId'\n | 'namespace'\n | 'programDefinition.id'\n | 'program.id'\n >\n ) => PoolsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => PoolsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => PoolsQueryBuilder;\n find: () => Promise<PoolsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.benefit_programs.v1.pool.PoolService.QueryPools\n * @requiredField query\n */\nexport async function typedQueryPools(\n query: CursorQuery\n): Promise<\n NonNullablePaths<\n QueryPoolsResponse,\n | `pools`\n | `pools.${number}.status`\n | `pools.${number}.beneficiary.anonymousVisitorId`\n | `pools.${number}.beneficiary.memberId`\n | `pools.${number}.beneficiary.wixUserId`\n | `pools.${number}.details.creditConfiguration.amount`\n | `pools.${number}.displayName`\n | `pools.${number}.programDefinition._id`\n | `pools.${number}.program._id`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Pool.queryPools(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Redeems a specified benefit.\n *\n * Calling this method records redemption of the benefit and adjusts the pool's associated balance. You still need to handle providing the beneficiary with the item.\n * @param poolId - ID of the pool that contains the benefit to redeem.\n * @public\n * @requiredField options.benefitKey\n * @requiredField options.idempotencyKey\n * @requiredField options.itemReference\n * @requiredField options.itemReference.externalId\n * @requiredField options.itemReference.providerAppId\n * @requiredField options.namespace\n * @requiredField poolId\n * @permissionId BENEFIT_PROGRAMS.POOL_REDEEM\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool.PoolService.RedeemBenefit\n */\nexport async function redeemBenefit(\n poolId: string,\n options?: NonNullablePaths<\n RedeemBenefitOptions,\n | `benefitKey`\n | `idempotencyKey`\n | `itemReference`\n | `itemReference.externalId`\n | `itemReference.providerAppId`\n | `namespace`,\n 3\n >\n): Promise<\n NonNullablePaths<RedeemBenefitResponse, `transactionId`, 2> & {\n __applicationErrorsType?: RedeemBenefitApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n poolId: poolId,\n itemReference: options?.itemReference,\n benefitKey: options?.benefitKey,\n count: options?.count,\n targetDate: options?.targetDate,\n idempotencyKey: options?.idempotencyKey,\n additionalData: options?.additionalData,\n beneficiary: options?.beneficiary,\n namespace: options?.namespace,\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Pool.redeemBenefit(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n poolId: '$[0]',\n itemReference: '$[1].itemReference',\n benefitKey: '$[1].benefitKey',\n count: '$[1].count',\n targetDate: '$[1].targetDate',\n idempotencyKey: '$[1].idempotencyKey',\n additionalData: '$[1].additionalData',\n beneficiary: '$[1].beneficiary',\n namespace: '$[1].namespace',\n },\n singleArgumentUnchanged: false,\n },\n ['poolId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface RedeemBenefitOptions {\n /** Information about the item to redeem. */\n itemReference: ItemReference;\n /**\n * Key of the benefit to redeem.\n * @maxLength 64\n */\n benefitKey: string;\n /**\n * Amount of items to redeem.\n * @min 1\n */\n count?: number;\n /**\n * Date that the item will be provided to the beneficiary.\n *\n * The pool's associated balance will update immediately. This parameter should be used to manage the logistics of providing the item.\n */\n targetDate?: Date | null;\n /**\n * Unique identifier, generated by the client.\n * Used to recognize repeated attempts to make the same request.\n * @maxLength 200\n */\n idempotencyKey: string;\n /** Additional information. */\n additionalData?: Record<string, any> | null;\n /** Beneficiary of the pool containing the benefit to redeem. */\n beneficiary?: CommonIdentificationData;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n}\n\n/**\n * Checks if a benefit can currently be redeemed.\n *\n * To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.\n * @param poolId - ID of the pool that the benefit to check belongs to.\n * @public\n * @requiredField options.itemReference\n * @requiredField options.itemReference.externalId\n * @requiredField options.itemReference.providerAppId\n * @requiredField options.namespace\n * @requiredField poolId\n * @permissionId BENEFIT_PROGRAMS.POOL_REDEEM\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibility\n */\nexport async function checkBenefitEligibility(\n poolId: string,\n options?: NonNullablePaths<\n CheckBenefitEligibilityOptions,\n | `itemReference`\n | `itemReference.externalId`\n | `itemReference.providerAppId`\n | `namespace`,\n 3\n >\n): Promise<\n NonNullablePaths<\n CheckBenefitEligibilityResponse,\n | `result.eligibleOptions.eligibleBenefits`\n | `result.eligibleOptions.eligibleBenefits.${number}.poolId`\n | `result.eligibleOptions.eligibleBenefits.${number}.benefitKey`\n | `result.eligibleOptions.eligibleBenefits.${number}.itemReference.externalId`\n | `result.eligibleOptions.eligibleBenefits.${number}.itemReference.category`\n | `result.eligibleOptions.eligibleBenefits.${number}.itemReference.providerAppId`\n | `result.notEnoughBalanceOptions.poolId`\n | `result.notEnoughBalanceOptions.availableBalance`\n | `result.notEnoughBalanceOptions.requestedBalance`\n | `result.poolNotActiveOptions.poolId`\n | `result.poolNotActiveOptions.poolStatus`\n | `result.benefitNotFoundOptions.poolId`\n | `result.poolNotFoundOptions.poolId`\n | `result.type`,\n 7\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n poolId: poolId,\n benefitKey: options?.benefitKey,\n itemReference: options?.itemReference,\n count: options?.count,\n targetDate: options?.targetDate,\n additionalData: options?.additionalData,\n beneficiary: options?.beneficiary,\n namespace: options?.namespace,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1Pool.checkBenefitEligibility(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n poolId: '$[0]',\n benefitKey: '$[1].benefitKey',\n itemReference: '$[1].itemReference',\n count: '$[1].count',\n targetDate: '$[1].targetDate',\n additionalData: '$[1].additionalData',\n beneficiary: '$[1].beneficiary',\n namespace: '$[1].namespace',\n },\n singleArgumentUnchanged: false,\n },\n ['poolId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CheckBenefitEligibilityOptions {\n /**\n * Key of the benefit to check.\n * @maxLength 64\n */\n benefitKey?: string | null;\n /** Information about the item to check. */\n itemReference: ItemReference;\n /**\n * Amount of items to check.\n *\n * Ensures the balance is high enough to redeem this many items.\n * @min 1\n */\n count?: number;\n /**\n * Date that the item will be provided to the beneficiary.\n *\n * This parameter should be used to manage the potential logistics of providing the item.\n */\n targetDate?: Date | null;\n /** Additional information. */\n additionalData?: Record<string, any> | null;\n /** Beneficiary of the pool containing the benefit to check. */\n beneficiary?: CommonIdentificationData;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n}\n\n/**\n * Checks if benefits can currently be redeemed.\n *\n * To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.\n *\n * Each benefit is checked independently. For example, if there is a benefit with a price of 3 credits and a benefit with a price of 4 credits, and there are 5 available credits, both benefits would be returned as eligible, but they can't both be redeemed.\n * @public\n * @requiredField options.benefitSelectors.itemReference\n * @requiredField options.benefitSelectors.itemReference.externalId\n * @requiredField options.benefitSelectors.itemReference.providerAppId\n * @requiredField options.benefitSelectors.poolId\n * @requiredField options.namespace\n * @permissionId BENEFIT_PROGRAMS.POOL_REDEEM\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool.PoolService.BulkCheckBenefitEligibility\n */\nexport async function bulkCheckBenefitEligibility(\n options?: NonNullablePaths<\n BulkCheckBenefitEligibilityOptions,\n | `benefitSelectors.${number}.itemReference`\n | `benefitSelectors.${number}.itemReference.externalId`\n | `benefitSelectors.${number}.itemReference.providerAppId`\n | `benefitSelectors.${number}.poolId`\n | `namespace`,\n 5\n >\n): Promise<\n NonNullablePaths<\n BulkCheckBenefitEligibilityResponse,\n | `results`\n | `results.${number}.benefitSelector.poolId`\n | `results.${number}.benefitSelector.itemReference.externalId`\n | `results.${number}.benefitSelector.itemReference.category`\n | `results.${number}.benefitSelector.itemReference.providerAppId`\n | `results.${number}.benefitSelector.count`\n | `results.${number}.result.notEnoughBalanceOptions.poolId`\n | `results.${number}.result.notEnoughBalanceOptions.availableBalance`\n | `results.${number}.result.notEnoughBalanceOptions.requestedBalance`\n | `results.${number}.result.poolNotActiveOptions.poolId`\n | `results.${number}.result.poolNotActiveOptions.poolStatus`\n | `results.${number}.result.benefitNotFoundOptions.poolId`\n | `results.${number}.result.poolNotFoundOptions.poolId`\n | `results.${number}.result.type`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n benefitSelectors: options?.benefitSelectors,\n namespace: options?.namespace,\n beneficiary: options?.beneficiary,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1Pool.bulkCheckBenefitEligibility(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n benefitSelectors: '$[0].benefitSelectors',\n namespace: '$[0].namespace',\n beneficiary: '$[0].beneficiary',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkCheckBenefitEligibilityOptions {\n /**\n * List of benefits to check.\n * @minSize 1\n * @maxSize 100\n */\n benefitSelectors?: BenefitSelector[];\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n /** Pool beneficiary. */\n beneficiary?: CommonIdentificationData;\n}\n\n/**\n * Retrieves benefits that can be redeemed for a specific benefit item.\n *\n * Each benefit item can only be linked to 1 benefit in 1 pool definition. However, each pool created from that pool definition contains the same benefits.\n * This method checks each pool containing a benefit with this benefit item, and returns the benefits that can be redeemed.\n * @param itemReference - Item reference.\n * @public\n * @requiredField itemReference\n * @requiredField itemReference.externalId\n * @requiredField itemReference.providerAppId\n * @requiredField options.namespace\n * @permissionId BENEFIT_PROGRAMS.POOL_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool.PoolService.GetEligibleBenefits\n */\nexport async function getEligibleBenefits(\n itemReference: NonNullablePaths<\n ItemReference,\n `externalId` | `providerAppId`,\n 2\n >,\n options?: NonNullablePaths<GetEligibleBenefitsOptions, `namespace`, 2>\n): Promise<\n NonNullablePaths<\n GetEligibleBenefitsResponse,\n | `eligibleBenefits`\n | `eligibleBenefits.${number}.poolId`\n | `eligibleBenefits.${number}.benefitKey`\n | `eligibleBenefits.${number}.itemReference.externalId`\n | `eligibleBenefits.${number}.itemReference.category`\n | `eligibleBenefits.${number}.itemReference.providerAppId`,\n 5\n > & {\n __applicationErrorsType?: GetEligibleBenefitsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n itemReference: itemReference,\n count: options?.count,\n targetDate: options?.targetDate,\n additionalData: options?.additionalData,\n beneficiary: options?.beneficiary,\n namespace: options?.namespace,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1Pool.getEligibleBenefits(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n itemReference: '$[0]',\n count: '$[1].count',\n targetDate: '$[1].targetDate',\n additionalData: '$[1].additionalData',\n beneficiary: '$[1].beneficiary',\n namespace: '$[1].namespace',\n },\n singleArgumentUnchanged: false,\n },\n ['itemReference', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetEligibleBenefitsOptions {\n /**\n * Amount of items to check. This ensures the balance is high enough to redeem this many items.\n * @min 1\n */\n count?: number;\n /**\n * Date that the item will be provided to the beneficiary.\n *\n * This parameter should be used to manage the potential logistics of providing the item.\n */\n targetDate?: Date | null;\n /** Additional information. */\n additionalData?: Record<string, any> | null;\n /** Filter request by beneficiary. */\n beneficiary?: CommonIdentificationData;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n}\n\n/**\n * Updates pools.\n * @public\n * @requiredField options.pools.pool\n * @requiredField options.pools.pool._id\n * @requiredField options.pools.pool.revision\n * @permissionId BENEFIT_PROGRAMS.POOL_UPDATE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool.PoolService.BulkUpdatePools\n */\nexport async function bulkUpdatePools(\n options?: NonNullablePaths<\n BulkUpdatePoolsOptions,\n | `pools.${number}.pool`\n | `pools.${number}.pool._id`\n | `pools.${number}.pool.revision`,\n 5\n >\n): Promise<\n NonNullablePaths<\n BulkUpdatePoolsResponse,\n | `results`\n | `results.${number}.poolMetadata.originalIndex`\n | `results.${number}.poolMetadata.success`\n | `results.${number}.poolMetadata.error.code`\n | `results.${number}.poolMetadata.error.description`\n | `results.${number}.pool.status`\n | `results.${number}.pool.beneficiary.anonymousVisitorId`\n | `results.${number}.pool.beneficiary.memberId`\n | `results.${number}.pool.beneficiary.wixUserId`\n | `results.${number}.pool.displayName`\n | `results.${number}.pool.programDefinition._id`\n | `results.${number}.pool.program._id`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n pools: options?.pools,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Pool.bulkUpdatePools(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n pools: '$[0].pools',\n returnEntity: '$[0].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdatePoolsOptions {\n /**\n * Pools to update.\n * @minSize 1\n * @maxSize 100\n */\n pools?: MaskedPool[];\n /**\n * Whether to return the full pool definition entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBenefitProgramsV1PoolPoolServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/pools',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/benefit-programs-pools',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/benefits',\n destPath: '/v1/bulk/benefits',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/pools',\n destPath: '/v1/bulk/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/pools',\n destPath: '/v1/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/benefits',\n destPath: '/v1/benefits',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-pools',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/benefits',\n destPath: '/v1/bulk/benefits',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/pools',\n destPath: '/v1/bulk/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/pools',\n destPath: '/v1/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/benefits',\n destPath: '/v1/benefits',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-pools',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/benefits',\n destPath: '/v1/bulk/benefits',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/pools',\n destPath: '/v1/bulk/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/pools',\n destPath: '/v1/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/benefits',\n destPath: '/v1/benefits',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/benefit-programs-pools',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/benefits',\n destPath: '/v1/bulk/benefits',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/pools',\n destPath: '/v1/bulk/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/pools',\n destPath: '/v1/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/benefits',\n destPath: '/v1/benefits',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/benefit-programs-pools',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/benefits',\n destPath: '/v1/bulk/benefits',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/pools',\n destPath: '/v1/bulk/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/pools',\n destPath: '/v1/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/benefits',\n destPath: '/v1/benefits',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-pools',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/benefits',\n destPath: '/v1/bulk/benefits',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/pools',\n destPath: '/v1/bulk/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/pools',\n destPath: '/v1/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/benefits',\n destPath: '/v1/benefits',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-pools',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/benefits',\n destPath: '/v1/benefits',\n },\n {\n srcPath: '/_api/benefit-programs/v1/pools',\n destPath: '/v1/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/benefits',\n destPath: '/v1/bulk/benefits',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/pools',\n destPath: '/v1/bulk/pools',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/bulk/benefits',\n destPath: '/v1/bulk/benefits',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/pools',\n destPath: '/v1/bulk/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/pools',\n destPath: '/v1/pools',\n },\n {\n srcPath: '/_api/benefit-programs/v1/benefits',\n destPath: '/v1/benefits',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/bulk/benefits',\n destPath: '/v1/bulk/benefits',\n },\n {\n srcPath: '/benefit-programs/v1/bulk/pools',\n destPath: '/v1/bulk/pools',\n },\n {\n srcPath: '/benefit-programs/v1/pools',\n destPath: '/v1/pools',\n },\n {\n srcPath: '/benefit-programs/v1/benefits',\n destPath: '/v1/benefits',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_pools';\n\n/** Retrieves a pool. */\nexport function getPool(payload: object): RequestOptionsFactory<any> {\n function __getPool({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool',\n method: 'GET' as any,\n methodFqn: 'wix.benefit_programs.v1.pool.PoolService.GetPool',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({\n protoPath: '/v1/pools/{poolId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'pool.createdDate' }, { path: 'pool.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPool;\n}\n\n/**\n * Updates a pool.\n *\n * Each time the pool is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the pool.\n * This ensures you're working with the latest pool\n * and prevents unintended overwrites.\n */\nexport function updatePool(payload: object): RequestOptionsFactory<any> {\n function __updatePool({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'pool.createdDate' }, { path: 'pool.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool',\n method: 'PATCH' as any,\n methodFqn: 'wix.benefit_programs.v1.pool.PoolService.UpdatePool',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({\n protoPath: '/v1/pools/{pool.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'pool.createdDate' }, { path: 'pool.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updatePool;\n}\n\n/**\n * Creates a query to retrieve a list of pools.\n *\n * The Query Pools method builds a query to retrieve a list of pools and returns a `PoolsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `PoolsQueryBuilder` methods onto the query. `PoolsQueryBuilder` methods enable you to filter, sort, and control the results that Query Pools returns.\n *\n * Query Pools has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `PoolsQueryResult`.\n */\nexport function queryPools(payload: object): RequestOptionsFactory<any> {\n function __queryPools({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.pool.PoolService.QueryPools',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({\n protoPath: '/v1/pools/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'pools.createdDate' },\n { path: 'pools.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryPools;\n}\n\n/**\n * Redeems a specified benefit.\n *\n * Calling this method records redemption of the benefit and adjusts the pool's associated balance. You still need to handle providing the beneficiary with the item.\n */\nexport function redeemBenefit(payload: object): RequestOptionsFactory<any> {\n function __redeemBenefit({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'targetDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.pool.PoolService.RedeemBenefit',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({\n protoPath: '/v1/benefits/redeem',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __redeemBenefit;\n}\n\n/**\n * Checks if a benefit can currently be redeemed.\n *\n * To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.\n */\nexport function checkBenefitEligibility(\n payload: object\n): RequestOptionsFactory<any> {\n function __checkBenefitEligibility({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'targetDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibility',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({\n protoPath: '/v1/pools/check-eligibility',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __checkBenefitEligibility;\n}\n\n/**\n * Checks if benefits can currently be redeemed.\n *\n * To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.\n *\n * Each benefit is checked independently. For example, if there is a benefit with a price of 3 credits and a benefit with a price of 4 credits, and there are 5 available credits, both benefits would be returned as eligible, but they can't both be redeemed.\n */\nexport function bulkCheckBenefitEligibility(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkCheckBenefitEligibility({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'benefitSelectors.targetDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool.PoolService.BulkCheckBenefitEligibility',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({\n protoPath: '/v1/bulk/benefits/check-eligibility',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'results.benefitSelector.targetDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCheckBenefitEligibility;\n}\n\n/**\n * Retrieves benefits that can be redeemed for a specific benefit item.\n *\n * Each benefit item can only be linked to 1 benefit in 1 pool definition. However, each pool created from that pool definition contains the same benefits.\n * This method checks each pool containing a benefit with this benefit item, and returns the benefits that can be redeemed.\n */\nexport function getEligibleBenefits(\n payload: object\n): RequestOptionsFactory<any> {\n function __getEligibleBenefits({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'targetDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.pool.PoolService.GetEligibleBenefits',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({\n protoPath: '/v1/pools/eligible-pools',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __getEligibleBenefits;\n}\n\n/** Updates pools. */\nexport function bulkUpdatePools(payload: object): RequestOptionsFactory<any> {\n function __bulkUpdatePools({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'pools.fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'pools.pool.createdDate' },\n { path: 'pools.pool.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.pool.PoolService.BulkUpdatePools',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({\n protoPath: '/v1/bulk/pools',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.pool.createdDate' },\n { path: 'results.pool.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpdatePools;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkCheckBenefitEligibilityOptions,\n BulkCheckBenefitEligibilityResponse,\n BulkUpdatePoolsOptions,\n BulkUpdatePoolsResponse,\n CheckBenefitEligibilityOptions,\n CheckBenefitEligibilityResponse,\n CursorQuery,\n GetEligibleBenefitsApplicationErrors,\n GetEligibleBenefitsOptions,\n GetEligibleBenefitsResponse,\n ItemReference,\n Pool,\n PoolsQueryBuilder,\n QueryPoolsResponse,\n RedeemBenefitApplicationErrors,\n RedeemBenefitOptions,\n RedeemBenefitResponse,\n UpdatePool,\n bulkCheckBenefitEligibility as universalBulkCheckBenefitEligibility,\n bulkUpdatePools as universalBulkUpdatePools,\n checkBenefitEligibility as universalCheckBenefitEligibility,\n getEligibleBenefits as universalGetEligibleBenefits,\n getPool as universalGetPool,\n queryPools as universalQueryPools,\n redeemBenefit as universalRedeemBenefit,\n typedQueryPools as universalTypedQueryPools,\n updatePool as universalUpdatePool,\n} from './benefit-programs-v1-pool-pools.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/benefit-programs' };\n\nexport function getPool(httpClient: HttpClient): GetPoolSignature {\n return (poolId: string) =>\n universalGetPool(\n poolId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetPoolSignature {\n /**\n * Retrieves a pool.\n * @param - ID of the pool to retrieve.\n * @returns Retrieved pool.\n */\n (poolId: string): Promise<\n NonNullablePaths<\n Pool,\n | `status`\n | `beneficiary.anonymousVisitorId`\n | `beneficiary.memberId`\n | `beneficiary.wixUserId`\n | `details.benefits`\n | `details.benefits.${number}.benefitKey`\n | `details.creditConfiguration.amount`\n | `displayName`\n | `programDefinition._id`\n | `program._id`,\n 5\n >\n >;\n}\n\nexport function updatePool(httpClient: HttpClient): UpdatePoolSignature {\n return (_id: string, pool: NonNullablePaths<UpdatePool, `revision`, 2>) =>\n universalUpdatePool(\n _id,\n pool,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdatePoolSignature {\n /**\n * Updates a pool.\n *\n * Each time the pool is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the pool.\n * This ensures you're working with the latest pool\n * and prevents unintended overwrites.\n * @param - Pool ID.\n * @returns Updated pool.\n */\n (_id: string, pool: NonNullablePaths<UpdatePool, `revision`, 2>): Promise<\n NonNullablePaths<\n Pool,\n | `status`\n | `beneficiary.anonymousVisitorId`\n | `beneficiary.memberId`\n | `beneficiary.wixUserId`\n | `details.benefits`\n | `details.benefits.${number}.benefitKey`\n | `details.creditConfiguration.amount`\n | `displayName`\n | `programDefinition._id`\n | `program._id`,\n 5\n >\n >;\n}\n\nexport function queryPools(httpClient: HttpClient): QueryPoolsSignature {\n return () =>\n universalQueryPools(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryPoolsSignature {\n /**\n * Creates a query to retrieve a list of pools.\n *\n * The Query Pools method builds a query to retrieve a list of pools and returns a `PoolsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `PoolsQueryBuilder` methods onto the query. `PoolsQueryBuilder` methods enable you to filter, sort, and control the results that Query Pools returns.\n *\n * Query Pools has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `PoolsQueryResult`.\n */\n (): PoolsQueryBuilder;\n}\n\nexport function typedQueryPools(\n httpClient: HttpClient\n): TypedQueryPoolsSignature {\n return (query: CursorQuery) =>\n universalTypedQueryPools(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryPoolsSignature {\n /** */\n (query: CursorQuery): Promise<\n NonNullablePaths<\n QueryPoolsResponse,\n | `pools`\n | `pools.${number}.status`\n | `pools.${number}.beneficiary.anonymousVisitorId`\n | `pools.${number}.beneficiary.memberId`\n | `pools.${number}.beneficiary.wixUserId`\n | `pools.${number}.details.creditConfiguration.amount`\n | `pools.${number}.displayName`\n | `pools.${number}.programDefinition._id`\n | `pools.${number}.program._id`,\n 6\n >\n >;\n}\n\nexport function redeemBenefit(httpClient: HttpClient): RedeemBenefitSignature {\n return (\n poolId: string,\n options?: NonNullablePaths<\n RedeemBenefitOptions,\n | `benefitKey`\n | `idempotencyKey`\n | `itemReference`\n | `itemReference.externalId`\n | `itemReference.providerAppId`\n | `namespace`,\n 3\n >\n ) =>\n universalRedeemBenefit(\n poolId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RedeemBenefitSignature {\n /**\n * Redeems a specified benefit.\n *\n * Calling this method records redemption of the benefit and adjusts the pool's associated balance. You still need to handle providing the beneficiary with the item.\n * @param - ID of the pool that contains the benefit to redeem.\n */\n (\n poolId: string,\n options?: NonNullablePaths<\n RedeemBenefitOptions,\n | `benefitKey`\n | `idempotencyKey`\n | `itemReference`\n | `itemReference.externalId`\n | `itemReference.providerAppId`\n | `namespace`,\n 3\n >\n ): Promise<\n NonNullablePaths<RedeemBenefitResponse, `transactionId`, 2> & {\n __applicationErrorsType?: RedeemBenefitApplicationErrors;\n }\n >;\n}\n\nexport function checkBenefitEligibility(\n httpClient: HttpClient\n): CheckBenefitEligibilitySignature {\n return (\n poolId: string,\n options?: NonNullablePaths<\n CheckBenefitEligibilityOptions,\n | `itemReference`\n | `itemReference.externalId`\n | `itemReference.providerAppId`\n | `namespace`,\n 3\n >\n ) =>\n universalCheckBenefitEligibility(\n poolId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CheckBenefitEligibilitySignature {\n /**\n * Checks if a benefit can currently be redeemed.\n *\n * To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.\n * @param - ID of the pool that the benefit to check belongs to.\n */\n (\n poolId: string,\n options?: NonNullablePaths<\n CheckBenefitEligibilityOptions,\n | `itemReference`\n | `itemReference.externalId`\n | `itemReference.providerAppId`\n | `namespace`,\n 3\n >\n ): Promise<\n NonNullablePaths<\n CheckBenefitEligibilityResponse,\n | `result.eligibleOptions.eligibleBenefits`\n | `result.eligibleOptions.eligibleBenefits.${number}.poolId`\n | `result.eligibleOptions.eligibleBenefits.${number}.benefitKey`\n | `result.eligibleOptions.eligibleBenefits.${number}.itemReference.externalId`\n | `result.eligibleOptions.eligibleBenefits.${number}.itemReference.category`\n | `result.eligibleOptions.eligibleBenefits.${number}.itemReference.providerAppId`\n | `result.notEnoughBalanceOptions.poolId`\n | `result.notEnoughBalanceOptions.availableBalance`\n | `result.notEnoughBalanceOptions.requestedBalance`\n | `result.poolNotActiveOptions.poolId`\n | `result.poolNotActiveOptions.poolStatus`\n | `result.benefitNotFoundOptions.poolId`\n | `result.poolNotFoundOptions.poolId`\n | `result.type`,\n 7\n >\n >;\n}\n\nexport function bulkCheckBenefitEligibility(\n httpClient: HttpClient\n): BulkCheckBenefitEligibilitySignature {\n return (\n options?: NonNullablePaths<\n BulkCheckBenefitEligibilityOptions,\n | `benefitSelectors.${number}.itemReference`\n | `benefitSelectors.${number}.itemReference.externalId`\n | `benefitSelectors.${number}.itemReference.providerAppId`\n | `benefitSelectors.${number}.poolId`\n | `namespace`,\n 5\n >\n ) =>\n universalBulkCheckBenefitEligibility(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkCheckBenefitEligibilitySignature {\n /**\n * Checks if benefits can currently be redeemed.\n *\n * To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit.\n *\n * Each benefit is checked independently. For example, if there is a benefit with a price of 3 credits and a benefit with a price of 4 credits, and there are 5 available credits, both benefits would be returned as eligible, but they can't both be redeemed.\n */\n (\n options?: NonNullablePaths<\n BulkCheckBenefitEligibilityOptions,\n | `benefitSelectors.${number}.itemReference`\n | `benefitSelectors.${number}.itemReference.externalId`\n | `benefitSelectors.${number}.itemReference.providerAppId`\n | `benefitSelectors.${number}.poolId`\n | `namespace`,\n 5\n >\n ): Promise<\n NonNullablePaths<\n BulkCheckBenefitEligibilityResponse,\n | `results`\n | `results.${number}.benefitSelector.poolId`\n | `results.${number}.benefitSelector.itemReference.externalId`\n | `results.${number}.benefitSelector.itemReference.category`\n | `results.${number}.benefitSelector.itemReference.providerAppId`\n | `results.${number}.benefitSelector.count`\n | `results.${number}.result.notEnoughBalanceOptions.poolId`\n | `results.${number}.result.notEnoughBalanceOptions.availableBalance`\n | `results.${number}.result.notEnoughBalanceOptions.requestedBalance`\n | `results.${number}.result.poolNotActiveOptions.poolId`\n | `results.${number}.result.poolNotActiveOptions.poolStatus`\n | `results.${number}.result.benefitNotFoundOptions.poolId`\n | `results.${number}.result.poolNotFoundOptions.poolId`\n | `results.${number}.result.type`,\n 6\n >\n >;\n}\n\nexport function getEligibleBenefits(\n httpClient: HttpClient\n): GetEligibleBenefitsSignature {\n return (\n itemReference: NonNullablePaths<\n ItemReference,\n `externalId` | `providerAppId`,\n 2\n >,\n options?: NonNullablePaths<GetEligibleBenefitsOptions, `namespace`, 2>\n ) =>\n universalGetEligibleBenefits(\n itemReference,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetEligibleBenefitsSignature {\n /**\n * Retrieves benefits that can be redeemed for a specific benefit item.\n *\n * Each benefit item can only be linked to 1 benefit in 1 pool definition. However, each pool created from that pool definition contains the same benefits.\n * This method checks each pool containing a benefit with this benefit item, and returns the benefits that can be redeemed.\n * @param - Item reference.\n */\n (\n itemReference: NonNullablePaths<\n ItemReference,\n `externalId` | `providerAppId`,\n 2\n >,\n options?: NonNullablePaths<GetEligibleBenefitsOptions, `namespace`, 2>\n ): Promise<\n NonNullablePaths<\n GetEligibleBenefitsResponse,\n | `eligibleBenefits`\n | `eligibleBenefits.${number}.poolId`\n | `eligibleBenefits.${number}.benefitKey`\n | `eligibleBenefits.${number}.itemReference.externalId`\n | `eligibleBenefits.${number}.itemReference.category`\n | `eligibleBenefits.${number}.itemReference.providerAppId`,\n 5\n > & {\n __applicationErrorsType?: GetEligibleBenefitsApplicationErrors;\n }\n >;\n}\n\nexport function bulkUpdatePools(\n httpClient: HttpClient\n): BulkUpdatePoolsSignature {\n return (\n options?: NonNullablePaths<\n BulkUpdatePoolsOptions,\n | `pools.${number}.pool`\n | `pools.${number}.pool._id`\n | `pools.${number}.pool.revision`,\n 5\n >\n ) =>\n universalBulkUpdatePools(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdatePoolsSignature {\n /**\n * Updates pools.\n */\n (\n options?: NonNullablePaths<\n BulkUpdatePoolsOptions,\n | `pools.${number}.pool`\n | `pools.${number}.pool._id`\n | `pools.${number}.pool.revision`,\n 5\n >\n ): Promise<\n NonNullablePaths<\n BulkUpdatePoolsResponse,\n | `results`\n | `results.${number}.poolMetadata.originalIndex`\n | `results.${number}.poolMetadata.success`\n | `results.${number}.poolMetadata.error.code`\n | `results.${number}.poolMetadata.error.description`\n | `results.${number}.pool.status`\n | `results.${number}.pool.beneficiary.anonymousVisitorId`\n | `results.${number}.pool.beneficiary.memberId`\n | `results.${number}.pool.beneficiary.wixUserId`\n | `results.${number}.pool.displayName`\n | `results.${number}.pool.programDefinition._id`\n | `results.${number}.pool.program._id`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n >;\n}\n\nexport {\n ActionEvent,\n ApplicationError,\n AsyncResult,\n BalanceAmount,\n Benefit,\n BenefitAlreadyRedeemed,\n BenefitInfo,\n BenefitNotFound,\n BenefitRedeemed,\n BenefitReservationCanceled,\n BenefitReservationReleased,\n BenefitReserved,\n BenefitSelector,\n BulkActionMetadata,\n BulkCheckBenefitEligibilityOptions,\n BulkCheckBenefitEligibilityRequest,\n BulkCheckBenefitEligibilityResponse,\n BulkEligibilityCheckResult,\n BulkPoolResult,\n BulkUpdatePoolsOptions,\n BulkUpdatePoolsRequest,\n BulkUpdatePoolsResponse,\n ByItemReference,\n ByItemReferenceFilter,\n ByPoolDefinitionIdAndProgramDefinitionIdOptions,\n ByProgramIdOptions,\n CancelBenefitReservationRequest,\n CancelBenefitReservationResponse,\n CheckBenefitEligibilityOptions,\n CheckBenefitEligibilityRequest,\n CheckBenefitEligibilityResponse,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n CountNumberOfPoolsInProvisioningStatusRequest,\n CountNumberOfPoolsInProvisioningStatusResponse,\n CreatePoolRequest,\n CreatePoolResponse,\n CreditConfiguration,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n CustomPolicy,\n DeletePoolRequest,\n DeletePoolResponse,\n Details,\n DomainEvent,\n DomainEventBodyOneOf,\n EligibilityCheckResult,\n EligibilityCheckResultResultOneOf,\n EligibilityCheckResultType,\n Eligible,\n EligibleBenefit,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n ExtendedFields,\n FailureDetails,\n Filter,\n FilterFilterOneOf,\n FixedIntervalPolicy,\n GetEligibleBenefitsOptions,\n GetEligibleBenefitsRequest,\n GetEligibleBenefitsResponse,\n GetPoolRequest,\n GetPoolResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n IdentityType,\n InvalidPoolDefinitionReference,\n ItemMetadata,\n ItemReference,\n ListPoolsRequest,\n ListPoolsRequestType,\n ListPoolsResponse,\n MaskedPool,\n MessageEnvelope,\n NotEnoughBalance,\n Policy,\n PolicyExpression,\n PolicyExpressionAnd,\n PolicyExpressionEvaluatedToFalse,\n PolicyExpressionExpressionOneOf,\n PolicyExpressionNot,\n PolicyExpressionOr,\n PolicyExpressionType,\n PolicyPolicyOneOf,\n Pool,\n PoolDefinitionAndProgramDefinition,\n PoolDefinitionLookupId,\n PoolDefinitionLookupIdIdOneOf,\n PoolEnded,\n PoolInfo,\n PoolNotActive,\n PoolNotFound,\n PoolOrigin,\n PoolPaused,\n PoolProgramInfo,\n PoolProvisionJobFinished,\n PoolProvisioned,\n PoolRenewalAction,\n PoolRenewalActionActionOneOf,\n PoolRenewalActionType,\n PoolRenewed,\n PoolResumed,\n PoolSelectorType,\n PoolStatus,\n PoolStatusUpdateJobFinished,\n PoolStatusUpdateJobFinishedContextOneOf,\n PoolStatusUpdateParamsPoolInfo,\n PoolWithItems,\n PoolsQueryBuilder,\n PoolsQueryResult,\n ProgramDefinitionInfo,\n ProgramInfo,\n ProvisionPoolsForProgramRequest,\n ProvisionPoolsForProgramResponse,\n ProvisionPoolsForProgramResponseResultOneOf,\n ProvisionPoolsForProgramResponseType,\n QueryPoolsRequest,\n QueryPoolsResponse,\n RateLimitedPolicy,\n RateLimitedPolicyPeriodOneOf,\n RateLimitedPolicyType,\n RedeemBenefitOptions,\n RedeemBenefitRequest,\n RedeemBenefitResponse,\n RedemptionDetails,\n ReleaseBenefitReservationRequest,\n ReleaseBenefitReservationResponse,\n RenewPoolsForProgramRequest,\n RenewPoolsForProgramResponse,\n ReserveBenefitRequest,\n ReserveBenefitResponse,\n RestoreInfo,\n RolloverConfiguration,\n SortOrder,\n Sorting,\n SyncResult,\n Type,\n Update,\n UpdatePool,\n UpdatePoolRequest,\n UpdatePoolResponse,\n UpdatePoolStatusRequest,\n UpdatePoolStatusRequestPoolSelectorOneOf,\n UpdatePoolStatusResponse,\n WebhookIdentityType,\n WeekDay,\n} from './benefit-programs-v1-pool-pools.universal.js';\n","import {\n getPool as publicGetPool,\n updatePool as publicUpdatePool,\n queryPools as publicQueryPools,\n typedQueryPools as publicTypedQueryPools,\n redeemBenefit as publicRedeemBenefit,\n checkBenefitEligibility as publicCheckBenefitEligibility,\n bulkCheckBenefitEligibility as publicBulkCheckBenefitEligibility,\n getEligibleBenefits as publicGetEligibleBenefits,\n bulkUpdatePools as publicBulkUpdatePools,\n} from './benefit-programs-v1-pool-pools.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n CursorQuery,\n PoolsQueryBuilder,\n typedQueryPools as universalTypedQueryPools,\n} from './benefit-programs-v1-pool-pools.universal.js';\n\nfunction customQueryPools(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryPools(httpClient)(),\n typedQueryFunction: (query: CursorQuery) =>\n publicTypedQueryPools(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): PoolsQueryBuilder;\n function overloadedQuery(\n query: CursorQuery\n ): ReturnType<typeof universalTypedQueryPools>;\n function overloadedQuery(query?: CursorQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const getPool: MaybeContext<\n BuildRESTFunction<typeof publicGetPool> & typeof publicGetPool\n> = /*#__PURE__*/ createRESTModule(publicGetPool);\nexport const updatePool: MaybeContext<\n BuildRESTFunction<typeof publicUpdatePool> & typeof publicUpdatePool\n> = /*#__PURE__*/ createRESTModule(publicUpdatePool);\nexport const redeemBenefit: MaybeContext<\n BuildRESTFunction<typeof publicRedeemBenefit> & typeof publicRedeemBenefit\n> = /*#__PURE__*/ createRESTModule(publicRedeemBenefit);\nexport const checkBenefitEligibility: MaybeContext<\n BuildRESTFunction<typeof publicCheckBenefitEligibility> &\n typeof publicCheckBenefitEligibility\n> = /*#__PURE__*/ createRESTModule(publicCheckBenefitEligibility);\nexport const bulkCheckBenefitEligibility: MaybeContext<\n BuildRESTFunction<typeof publicBulkCheckBenefitEligibility> &\n typeof publicBulkCheckBenefitEligibility\n> = /*#__PURE__*/ createRESTModule(publicBulkCheckBenefitEligibility);\nexport const getEligibleBenefits: MaybeContext<\n BuildRESTFunction<typeof publicGetEligibleBenefits> &\n typeof publicGetEligibleBenefits\n> = /*#__PURE__*/ createRESTModule(publicGetEligibleBenefits);\nexport const bulkUpdatePools: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdatePools> & typeof publicBulkUpdatePools\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdatePools);\nexport const queryPools: MaybeContext<\n BuildRESTFunction<typeof customQueryPools> & typeof customQueryPools\n> = /*#__PURE__*/ createRESTModule(customQueryPools);\n\nexport {\n PoolStatus,\n IdentityType,\n PolicyExpressionType,\n Type,\n WeekDay,\n RateLimitedPolicyType,\n PoolOrigin,\n PoolRenewalActionType,\n SortOrder,\n EligibilityCheckResultType,\n ListPoolsRequestType,\n ProvisionPoolsForProgramResponseType,\n PoolSelectorType,\n WebhookIdentityType,\n} from './benefit-programs-v1-pool-pools.universal.js';\nexport {\n Pool,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n Details,\n Benefit,\n PolicyExpression,\n PolicyExpressionExpressionOneOf,\n PolicyExpressionNot,\n PolicyExpressionAnd,\n PolicyExpressionOr,\n Policy,\n PolicyPolicyOneOf,\n FixedIntervalPolicy,\n RateLimitedPolicy,\n RateLimitedPolicyPeriodOneOf,\n CustomPolicy,\n CreditConfiguration,\n RolloverConfiguration,\n ExtendedFields,\n ProgramDefinitionInfo,\n PoolProgramInfo,\n PoolRenewalAction,\n PoolRenewalActionActionOneOf,\n Update,\n PoolProvisioned,\n PoolRenewed,\n BenefitRedeemed,\n RedemptionDetails,\n ItemReference,\n PoolPaused,\n PoolResumed,\n PoolEnded,\n BenefitReserved,\n BenefitReservationCanceled,\n BenefitReservationReleased,\n PoolProvisionJobFinished,\n PoolStatusUpdateJobFinished,\n PoolStatusUpdateJobFinishedContextOneOf,\n PoolDefinitionAndProgramDefinition,\n ProgramInfo,\n PoolStatusUpdateParamsPoolInfo,\n CreatePoolRequest,\n CreatePoolResponse,\n GetPoolRequest,\n GetPoolResponse,\n UpdatePoolRequest,\n UpdatePoolResponse,\n DeletePoolRequest,\n DeletePoolResponse,\n QueryPoolsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryPoolsResponse,\n CursorPagingMetadata,\n Cursors,\n RedeemBenefitRequest,\n RedeemBenefitResponse,\n NotEnoughBalance,\n PoolInfo,\n BalanceAmount,\n BenefitInfo,\n PolicyExpressionEvaluatedToFalse,\n FailureDetails,\n PoolNotActive,\n PoolNotFound,\n BenefitAlreadyRedeemed,\n BenefitNotFound,\n ReserveBenefitRequest,\n ReserveBenefitResponse,\n CancelBenefitReservationRequest,\n CancelBenefitReservationResponse,\n ReleaseBenefitReservationRequest,\n ReleaseBenefitReservationResponse,\n CheckBenefitEligibilityRequest,\n CheckBenefitEligibilityResponse,\n EligibilityCheckResult,\n EligibilityCheckResultResultOneOf,\n EligibleBenefit,\n Eligible,\n BulkCheckBenefitEligibilityRequest,\n BenefitSelector,\n BulkCheckBenefitEligibilityResponse,\n BulkEligibilityCheckResult,\n GetEligibleBenefitsRequest,\n GetEligibleBenefitsResponse,\n ListPoolsRequest,\n ByItemReference,\n ByItemReferenceFilter,\n Filter,\n FilterFilterOneOf,\n ListPoolsResponse,\n PoolWithItems,\n BulkUpdatePoolsRequest,\n MaskedPool,\n BulkUpdatePoolsResponse,\n BulkPoolResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n ProvisionPoolsForProgramRequest,\n PoolDefinitionLookupId,\n PoolDefinitionLookupIdIdOneOf,\n ProvisionPoolsForProgramResponse,\n ProvisionPoolsForProgramResponseResultOneOf,\n SyncResult,\n AsyncResult,\n InvalidPoolDefinitionReference,\n RenewPoolsForProgramRequest,\n RenewPoolsForProgramResponse,\n UpdatePoolStatusRequest,\n UpdatePoolStatusRequestPoolSelectorOneOf,\n ByPoolDefinitionIdAndProgramDefinitionIdOptions,\n ByProgramIdOptions,\n UpdatePoolStatusResponse,\n CountNumberOfPoolsInProvisioningStatusRequest,\n CountNumberOfPoolsInProvisioningStatusResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n UpdatePool,\n PoolsQueryResult,\n PoolsQueryBuilder,\n RedeemBenefitOptions,\n CheckBenefitEligibilityOptions,\n BulkCheckBenefitEligibilityOptions,\n GetEligibleBenefitsOptions,\n BulkUpdatePoolsOptions,\n} from './benefit-programs-v1-pool-pools.universal.js';\nexport {\n PoolStatusWithLiterals,\n IdentityTypeWithLiterals,\n PolicyExpressionTypeWithLiterals,\n TypeWithLiterals,\n WeekDayWithLiterals,\n RateLimitedPolicyTypeWithLiterals,\n PoolOriginWithLiterals,\n PoolRenewalActionTypeWithLiterals,\n SortOrderWithLiterals,\n EligibilityCheckResultTypeWithLiterals,\n ListPoolsRequestTypeWithLiterals,\n ProvisionPoolsForProgramResponseTypeWithLiterals,\n PoolSelectorTypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n RedeemBenefitApplicationErrors,\n GetEligibleBenefitsApplicationErrors,\n} from './benefit-programs-v1-pool-pools.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qCAAAA;AAAA,EAAA,uBAAAC;AAAA,EAAA,+BAAAC;AAAA,EAAA,2BAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,kBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE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O,SAASC,6BACd,YACsC;AACtC,SAAO,CACL,YAUAA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA0CO,SAASC,qBACd,YAC8B;AAC9B,SAAO,CACL,eAKA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAiCO,SAASC,iBACd,YAC0B;AAC1B,SAAO,CACL,YAQAA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACnYA,IAAAC,uBAAiC;AAGjC,iCAA0C;AAO1C,SAAS,iBAAiB,YAAwB;AAChD,QAAM,aAAS,sDAA0B;AAAA,IACvC,sBAAsB,MAAMC,YAAiB,UAAU,EAAE;AAAA,IACzD,oBAAoB,CAAC,UACnBC,iBAAsB,UAAU,EAAE,KAAK;AAAA,IACzC,qBAAqB;AAAA,EACvB,CAAC;AAMD,WAAS,gBAAgB,OAA0B;AACjD,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,WAEK,2DAAiBA,QAAa;AACzC,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,iBAEK,2DAAiBA,cAAmB;AAC/C,IAAMC,2BAGK,2DAAiBA,wBAA6B;AACzD,IAAMC,+BAGK,2DAAiBA,4BAAiC;AAC7D,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAMR,cAEK,2DAAiB,gBAAgB;","names":["bulkCheckBenefitEligibility","bulkUpdatePools","checkBenefitEligibility","getEligibleBenefits","getPool","queryPools","redeemBenefit","updatePool","import_timestamp","import_rest_modules","payload","import_transform_paths","PoolStatus","IdentityType","PolicyExpressionType","Type","WeekDay","RateLimitedPolicyType","PoolOrigin","PoolRenewalActionType","SortOrder","EligibilityCheckResultType","ListPoolsRequestType","ProvisionPoolsForProgramResponseType","PoolSelectorType","WebhookIdentityType","getPool","sdkTransformError","updatePool","queryPools","redeemBenefit","checkBenefitEligibility","bulkCheckBenefitEligibility","getEligibleBenefits","bulkUpdatePools","getPool","updatePool","queryPools","typedQueryPools","redeemBenefit","checkBenefitEligibility","bulkCheckBenefitEligibility","getEligibleBenefits","bulkUpdatePools","import_rest_modules","queryPools","typedQueryPools","getPool","updatePool","redeemBenefit","checkBenefitEligibility","bulkCheckBenefitEligibility","getEligibleBenefits","bulkUpdatePools"]}
|