import * as _wix_sdk_types from '@wix/sdk-types'; import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types'; interface Pool { /** * Pool ID. * @format GUID * @immutable * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the pool is updated. * To prevent conflicting changes, the current revision must be passed when updating the pool. * * Ignored when creating a pool. * @readonly */ revision?: string | null; /** * Date and time the pool was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the pool was updated. * @readonly */ _updatedDate?: Date | null; /** * ID of the associated pool definition. * @format GUID * @readonly * @immutable */ poolDefinitionId?: string | null; /** * ID of the associated program definition. * @format GUID * @readonly * @immutable */ programDefinitionId?: string | null; /** * ID of the program that contains this pool. * @format GUID * @readonly * @immutable */ programId?: string | null; /** * Pool status. * @readonly */ status?: PoolStatusWithLiterals; /** * Pool beneficiary. * @readonly * @immutable */ beneficiary?: CommonIdentificationData; /** Pool benefits and settings. */ details?: Details; /** * Pool name. * * You may want to use the same name that's used in the associated pool definition. * @maxLength 64 */ displayName?: string; /** * 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. * @readonly * @immutable * @minLength 1 * @maxLength 20 */ namespace?: string | null; /** * Custom field data for the pool object. * * [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. */ extendedFields?: ExtendedFields; /** * Associated program definition information. * @readonly */ programDefinition?: ProgramDefinitionInfo; /** * Information about the program containing the pool. * @readonly */ program?: PoolProgramInfo; /** * Version of the pool definition that this pool was created from. * @readonly */ poolDefinitionRevision?: string | null; /** * Number of times this pool has been renewed. * @readonly */ renewalCount?: number | null; } declare enum PoolStatus { /** Pool is active. */ ACTIVE = "ACTIVE", /** Pool is paused. It can be resumed. */ PAUSED = "PAUSED", /** Pool is ended. It can't be resumed. */ ENDED = "ENDED", /** Pool provisioning is in progress. This status exists for a short time during processing. */ PROVISIONING = "PROVISIONING", /** Pool renewing is in progress. This status exists for a short time during processing. */ RENEWING = "RENEWING", /** Pool is pending */ PENDING = "PENDING" } /** @enumType */ type PoolStatusWithLiterals = PoolStatus | 'ACTIVE' | 'PAUSED' | 'ENDED' | 'PROVISIONING' | 'RENEWING' | 'PENDING'; interface CommonIdentificationData extends CommonIdentificationDataIdOneOf { /** * ID of a site visitor that hasn't logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site member. * @format GUID */ memberId?: string; /** * ID of a Wix user. * @format GUID */ wixUserId?: string; } /** @oneof */ interface CommonIdentificationDataIdOneOf { /** * ID of a site visitor that hasn't logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site member. * @format GUID */ memberId?: string; /** * ID of a Wix user. * @format GUID */ wixUserId?: string; } declare enum IdentityType { /** Unknown type. This value is not used. */ UNKNOWN = "UNKNOWN", /** A site visitor who has not logged in. */ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", /** A logged-in site member. */ MEMBER = "MEMBER", /** A Wix account holder, such as a site owner or contributor. */ WIX_USER = "WIX_USER" } /** @enumType */ type IdentityTypeWithLiterals = IdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER'; interface Details { /** * List of benefits. * @maxSize 10 */ benefits?: Benefit[]; /** * Credit settings. * * If this object is empty, you can't set a price for the benefit. */ creditConfiguration?: CreditConfiguration; /** Additional information relating to this object. */ additionalData?: Record | null; } interface Benefit { /** * Unique identifier for this benefit. * * This key is consistent across the pool definition and all associated pools that contain this benefit. * @maxLength 64 */ benefitKey?: string; /** * ID that is used to associated items with this benefit. * @format GUID * @immutable * @readonly */ itemSetId?: string | null; /** * Price of the benefit in credits. The price is the same for all of this benefit's items. * @decimalValue options { gte:0, maxScale:4 } */ price?: string | null; /** Additional information for this benefit. */ additionalData?: Record | null; /** * ID of the app providing the benefit items. * @format GUID * @immutable */ providerAppId?: string | null; /** * Benefit name. * @maxLength 40 */ displayName?: string | null; /** * Benefit description. * @maxLength 255 */ description?: string | null; } interface PolicyExpression extends PolicyExpressionExpressionOneOf { /** Benefits can be redeemed if the expression in this object is not fulfilled. */ operatorNotOptions?: PolicyExpressionNot; /** Benefits can be redeemed if all the expression in this object's array are fulfilled. */ operatorAndOptions?: PolicyExpressionAnd; /** Benefits can be redeemed if at least one of the expressions in this object's array is fulfilled. */ operatorOrOptions?: PolicyExpressionOr; /** Defines when benefits can be redeemed or how many benefits can be redeemed in a specific time period. */ policyOptions?: Policy; /** Policy expression type. */ type?: PolicyExpressionTypeWithLiterals; } /** @oneof */ interface PolicyExpressionExpressionOneOf { /** Benefits can be redeemed if the expression in this object is not fulfilled. */ operatorNotOptions?: PolicyExpressionNot; /** Benefits can be redeemed if all the expression in this object's array are fulfilled. */ operatorAndOptions?: PolicyExpressionAnd; /** Benefits can be redeemed if at least one of the expressions in this object's array is fulfilled. */ operatorOrOptions?: PolicyExpressionOr; /** Defines when benefits can be redeemed or how many benefits can be redeemed in a specific time period. */ policyOptions?: Policy; } declare enum PolicyExpressionType { /** Use with `operatorNotOptions`. */ OPERATOR_NOT = "OPERATOR_NOT", /** Use with `operatorAndOptions`. */ OPERATOR_AND = "OPERATOR_AND", /** Use with `operatorOrOptions`. */ OPERATOR_OR = "OPERATOR_OR", /** Use with `policyOptions`. */ POLICY = "POLICY" } /** @enumType */ type PolicyExpressionTypeWithLiterals = PolicyExpressionType | 'OPERATOR_NOT' | 'OPERATOR_AND' | 'OPERATOR_OR' | 'POLICY'; interface PolicyExpressionNot { /** Policy expression. If this expression is not fulfilled, benefits can be redeemed. */ expression?: PolicyExpression; } interface PolicyExpressionAnd { /** * Array of policy expressions. If all expressions are fulfilled, benefits can be redeemed. * @minSize 2 * @maxSize 10 */ expressions?: PolicyExpression[]; } interface PolicyExpressionOr { /** * Array of policy expressions. If at least one expression is fulfilled, benefits can be redeemed. * @minSize 2 * @maxSize 10 */ expressions?: PolicyExpression[]; } interface Policy extends PolicyPolicyOneOf { /** * Defines an interval during which the policy expression is fulfilled. * * If `fromWeekDay` and `toWeekDay` are defined, this interval applies weekly. Otherwise, it applies daily. */ fixedIntervalOptions?: FixedIntervalPolicy; /** Maximum amount of times a benefit can be redeemed during a specified time period. */ rateLimitedOptions?: RateLimitedPolicy; /** Custom policy defined by a different app. */ customOptions?: CustomPolicy; /** Policy type. */ type?: TypeWithLiterals; } /** @oneof */ interface PolicyPolicyOneOf { /** * Defines an interval during which the policy expression is fulfilled. * * If `fromWeekDay` and `toWeekDay` are defined, this interval applies weekly. Otherwise, it applies daily. */ fixedIntervalOptions?: FixedIntervalPolicy; /** Maximum amount of times a benefit can be redeemed during a specified time period. */ rateLimitedOptions?: RateLimitedPolicy; /** Custom policy defined by a different app. */ customOptions?: CustomPolicy; } declare enum Type { /** Use with `fixedIntervalOptions`. */ FIXED_INTERVAL = "FIXED_INTERVAL", /** Use with `rateLimitedOptions`. */ RATE_LIMITED = "RATE_LIMITED", /** Use with `customOptions`. */ CUSTOM = "CUSTOM" } /** @enumType */ type TypeWithLiterals = Type | 'FIXED_INTERVAL' | 'RATE_LIMITED' | 'CUSTOM'; interface FixedIntervalPolicy { /** Weekday that this interval starts from. If this field is defined, then `toWeekDay` is required. */ fromWeekDay?: WeekDayWithLiterals; /** Weekday that this interval ends at. If this field is defined, then `fromWeekDay` is required. */ toWeekDay?: WeekDayWithLiterals; /** * Hour that this interval starts from. If this field is defined, then `toHour` is required. * @max 23 */ fromHour?: number | null; /** * Hour that this interval ends at. If this field is defined, then `fromHour` is required. * @max 23 */ toHour?: number | null; /** * Minute that this interval starts from. If this field is defined, then `toMinute` is required. * @max 59 */ fromMinute?: number | null; /** * Minute that this interval ends at. If this field is defined, then `fromMinute` is required. * @max 59 */ toMinute?: number | null; } declare enum WeekDay { /** Unknown weekday. */ UNKNOWN = "UNKNOWN", /** Monday. */ MONDAY = "MONDAY", /** Tuesday. */ TUESDAY = "TUESDAY", /** Wednesday. */ WEDNESDAY = "WEDNESDAY", /** Thursday. */ THURSDAY = "THURSDAY", /** Friday. */ FRIDAY = "FRIDAY", /** Saturday. */ SATURDAY = "SATURDAY", /** Sunday. */ SUNDAY = "SUNDAY" } /** @enumType */ type WeekDayWithLiterals = WeekDay | 'UNKNOWN' | 'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY' | 'SUNDAY'; interface RateLimitedPolicy { /** Maximum number of times a benefit can be redeemed per specified time period. */ times?: number; /** Time period for the rate limit, resets at the start of each period. */ timePeriod?: TimePeriodWithLiterals; /** * Unique identifier for the quota resource. Set automatically when creating a policy. * Updating RateLimitedPolicy `time period` or `times` will result in a quota reset. * @immutable * @readonly * @format GUID */ quotaId?: string | null; } declare enum TimePeriod { /** Day, starting at midnight. */ DAY = "DAY", /** Calendar month, starting on the first day of the month. */ MONTH = "MONTH" } /** @enumType */ type TimePeriodWithLiterals = TimePeriod | 'DAY' | 'MONTH'; /** Custom policy as implemented by the Entitlement Policy Provider */ interface CustomPolicy { /** * Policy ID. * @format GUID */ _id?: string; /** * ID of the app providing the policy. * @format GUID */ appId?: string | null; /** Additional information for this custom policy. */ additionalData?: Record | null; } interface CreditConfiguration { /** * Initial available amount for associated balances. * @decimalValue options { gte:0, maxScale:4 } */ amount?: string; /** Rollover settings. */ rolloverConfiguration?: RolloverConfiguration; /** * Credit unit display name. * @maxLength 32 */ unitDisplayName?: string | null; /** * Credit unit type. * @maxLength 16 */ unitType?: string | null; } interface RolloverConfiguration { /** Whether unused credits roll over to a new cycle when a program renews. */ enabled?: boolean | null; /** * Maximum number of credits that can roll over to the next cycle when a program renews. * @decimalValue options { gte:0, maxScale:4 } */ balanceCap?: string | null; } interface ExtendedFields { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } interface ProgramDefinitionInfo { /** * Program definition ID. * @format GUID * @readonly */ _id?: string; /** * Program definition external ID. * @format GUID * @readonly */ externalId?: string | null; /** * Display name of the program definition. * @readonly * @maxLength 64 */ displayName?: string | null; /** * Description of the program definition. * @readonly * @maxLength 450 */ description?: string | null; } interface PoolProgramInfo { /** * Program ID. * @format GUID * @readonly */ _id?: string; /** * Program external ID. * @format GUID * @readonly */ externalId?: string | null; /** * Display name of the program. * @readonly * @maxLength 64 */ displayName?: string | null; } declare enum PoolOrigin { /** Benefit pool created by a program provision. */ PROVISION = "PROVISION", /** Benefit pool was created when pool definition was added to program definition. */ CASCADE = "CASCADE" } /** @enumType */ type PoolOriginWithLiterals = PoolOrigin | 'PROVISION' | 'CASCADE'; interface PoolRenewalAction extends PoolRenewalActionActionOneOf { /** * The pool's details (benefits and settings) will be updated to match the details of the specified pool definition revision. * @readonly */ updateOptions?: Update; /** * Version of the pool definition that will be used when the pool is renewed. * @readonly */ poolDefinitionRevision?: string | null; /** * The action that will be taken when the pool is renewed * @readonly */ type?: PoolRenewalActionTypeWithLiterals; } /** @oneof */ interface PoolRenewalActionActionOneOf { /** * The pool's details (benefits and settings) will be updated to match the details of the specified pool definition revision. * @readonly */ updateOptions?: Update; } declare enum PoolRenewalActionType { /** Pool will end on program renewal */ END = "END", /** Pool will be updated on program renewal */ UPDATE = "UPDATE" } /** @enumType */ type PoolRenewalActionTypeWithLiterals = PoolRenewalActionType | 'END' | 'UPDATE'; interface Update { /** * The pool's details will be updated to match the details of the specified pool definition revision. * @readonly */ details?: Details; /** * The pool's display name will be updated to match the display name of the specified pool definition revision. * @maxLength 64 */ displayName?: string; /** * The pool's description will be updated to match the description of the specified pool definition revision. * @maxLength 450 */ description?: string | null; } interface PoolProvisioned { /** Pool which has been provisioned */ pool?: Pool; } interface PoolRenewed { /** Pool which has been granted */ pool?: Pool; } interface BenefitRedeemed { /** Pool which has been redeemed */ pool?: Pool; /** Details of the redemption */ redemptionDetails?: RedemptionDetails; } interface RedemptionDetails { /** * Id of the redemption transaction * @format GUID */ transactionId?: string; /** Reference of the item that is being redeemed */ itemReference?: ItemReference; /** * Number of of items to redeem * @min 1 */ itemCount?: number; /** * Date at which the item will be used. Target date does not necessarily equal the redemption date. Credits are redeemed immediately. * This date is only used for validations that may be performed by entitlement providers */ targetDate?: Date | null; /** * Idempotency key * @maxLength 200 */ idempotencyKey?: string; /** Additional info provided during redemption */ additionalData?: Record | null; /** Beneficiary of the entitlement */ beneficiary?: CommonIdentificationData; } interface ItemReference { /** * External ID of the item. * @format GUID */ externalId?: string; /** * Item category. * @maxLength 20 */ category?: string; /** * ID of the app providing the item. * @format GUID */ providerAppId?: string; } interface BenefitReallocated { /** Pool which the reallocated benefit belongs to */ pool?: Pool; /** Details of the reallocation */ reallocationDetails?: ReallocationDetails; } interface ReallocationDetails { /** * Id of the reallocation transaction. This is the new latest transaction in the chain * @format GUID */ transactionId?: string; /** * Id of the transaction superseded by the reallocation * @format GUID */ previousTransactionId?: string; /** Reference of the item that is being reallocated */ itemReference?: ItemReference; /** * Number of items that were redeemed * @min 1 */ itemCount?: number; /** New date at which the item will be used */ targetDate?: Date | null; /** Date at which the item would have been used before this reallocation */ previousTargetDate?: Date | null; /** * Idempotency key of the reallocation request * @maxLength 200 */ idempotencyKey?: string; /** Beneficiary of the entitlement */ beneficiary?: CommonIdentificationData; } interface RedemptionCanceled { /** Pool which the canceled redemption belongs to */ pool?: Pool; /** Details of the cancellation */ cancellationDetails?: CancellationDetails; } interface CancellationDetails { /** * Id of the cancellation transaction. This is the terminal transaction of the chain * @format GUID */ transactionId?: string; /** * Id of the transaction superseded by the cancellation * @format GUID */ previousTransactionId?: string; /** Reference of the item whose redemption was canceled */ itemReference?: ItemReference; /** * Number of items that were redeemed * @min 1 */ itemCount?: number; /** * Idempotency key of the cancellation request * @maxLength 200 */ idempotencyKey?: string; /** Beneficiary of the entitlement */ beneficiary?: CommonIdentificationData; } interface PoolPaused { /** Pool which has been paused */ pool?: Pool; } interface PoolResumed { /** Pool which has been resumed */ pool?: Pool; } interface PoolEnded { /** Pool which has been ended */ pool?: Pool; } interface BenefitReserved { /** Pool which was used to perform this transaction */ pool?: Pool; /** Details of the redemption */ redemptionDetails?: RedemptionDetails; } interface BenefitReservationCanceled { /** Pool which was used to perform this transaction */ pool?: Pool; /** * Id of the canceled reservation transaction * @format GUID */ transactionId?: string; } interface BenefitReservationReleased { /** Pool which was used to perform this transaction */ pool?: Pool; /** * Id of the released reservation transaction * @format GUID */ transactionId?: string; } interface PoolProvisionJobFinished { /** * Program id * @format GUID */ programId?: string; /** Processed item count */ processedItemCount?: number; /** Origin of the pool */ origin?: PoolOriginWithLiterals; } interface PoolStatusUpdateJobFinished extends PoolStatusUpdateJobFinishedContextOneOf { /** The id of the pool definition that is being updated */ poolDefinitionAndProgramDefinition?: PoolDefinitionAndProgramDefinition; /** Update the status of all pools in the program */ programInfo?: ProgramInfo; /** Update the status of a specific pool */ poolInfo?: PoolStatusUpdateParamsPoolInfo; /** Target status of the pool */ targetStatus?: PoolStatusWithLiterals; /** The total number of items that were processed */ processedItemCount?: number; } /** @oneof */ interface PoolStatusUpdateJobFinishedContextOneOf { /** The id of the pool definition that is being updated */ poolDefinitionAndProgramDefinition?: PoolDefinitionAndProgramDefinition; /** Update the status of all pools in the program */ programInfo?: ProgramInfo; /** Update the status of a specific pool */ poolInfo?: PoolStatusUpdateParamsPoolInfo; } interface PoolDefinitionAndProgramDefinition { /** * The id of the pool definition that is being updated * @format GUID * @readonly */ poolDefinitionId?: string; /** * The key of the program that is being updated * @format GUID */ programDefinitionId?: string | null; } interface ProgramInfo { /** * The key of the program that is being updated * @format GUID */ programId?: string; /** Additional data that was provided when the job was submitted */ additionalData?: Record | null; } interface PoolStatusUpdateParamsPoolInfo { /** * The key of the program that is being updated * @format GUID */ poolId?: string; /** Additional data that was provided when the job was submitted */ additionalData?: Record | null; } interface CreatePoolRequest { /** Pool to be created. */ pool?: Pool; } interface CreatePoolResponse { /** Created pool. */ pool?: Pool; } interface GetPoolRequest { /** * ID of the pool to retrieve. * @format GUID */ poolId: string; } interface GetPoolResponse { /** Retrieved pool. */ pool?: Pool; } interface UpdatePoolRequest { /** Pool to update. */ pool: Pool; } interface UpdatePoolResponse { /** Updated pool. */ pool?: Pool; } interface DeletePoolRequest { /** * ID of the pool to delete. * @format GUID */ poolId?: string; } interface DeletePoolResponse { } interface QueryPoolsRequest { /** Filter, sort, and paging to apply to the query. */ query?: CursorQuery; } interface CursorQuery extends CursorQueryPagingMethodOneOf { /** 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`. */ cursorPaging?: CursorPaging; /** * Filter object. * See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) * for more information. */ filter?: Record | null; /** * List of sort objects. * @maxSize 5 */ sort?: Sorting[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf { /** 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`. */ cursorPaging?: CursorPaging; } interface Sorting { /** * Field to sort by. * @maxLength 512 */ fieldName?: string; /** * Sort order. Use `ASC` for ascending order or `DESC` for descending order. * * Default: `ASC` */ order?: SortOrderWithLiterals; } declare enum SortOrder { /** Ascending sort order. */ ASC = "ASC", /** Descending sort order. */ DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface CursorPaging { /** * Maximum number of items to return. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } interface QueryPoolsResponse { /** List of retrieved pools. */ pools?: Pool[]; /** Metadata for the paginated results. */ metadata?: CursorPagingMetadata; } interface CursorPagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to the previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface RedeemBenefitRequest { /** * ID of the pool that contains the benefit to redeem. * @format GUID */ poolId: string; /** Information about the item to redeem. */ itemReference: ItemReference; /** * Key of the benefit to redeem. * @maxLength 64 */ benefitKey: string; /** * Amount of items to redeem. * @min 1 */ count?: number; /** * Date that the item will be provided to the beneficiary. * * The pool's associated balance will update immediately. This parameter should be used to manage the logistics of providing the item. */ targetDate?: Date | null; /** * Unique identifier, generated by the client. * Used to recognize repeated attempts to make the same request. * @maxLength 200 */ idempotencyKey: string; /** Additional information. */ additionalData?: Record | null; /** Beneficiary of the pool containing the benefit to redeem. */ beneficiary?: CommonIdentificationData; /** * 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. * @minLength 1 * @maxLength 20 */ namespace: string; } interface RedeemBenefitResponse { /** * ID of the transaction recording the associated change in balance. * @format GUID */ transactionId?: string; } interface NotEnoughBalance { /** * Pool ID. * @format GUID */ poolId?: string; /** Item reference. */ itemReference?: ItemReference; /** * Pool's associated balance amount in credits. * @decimalValue options { maxScale:4 } */ availableBalance?: string; /** * Price of the item in credits. * @decimalValue options { maxScale:4 } */ requestedBalance?: string; /** Pool information. */ poolInfo?: PoolInfo; /** Program definition information. */ programDefinitionInfo?: ProgramDefinitionInfo; /** Program information. */ programInfo?: PoolProgramInfo; /** Benefit information. */ benefitInfo?: BenefitInfo; } interface PoolInfo { /** Current pool balance */ balance?: BalanceAmount; /** * Initial available amount for associated balances. * @decimalValue options { gte:0, maxScale:4 } */ creditAmount?: string | null; /** * Pool name * @maxLength 64 */ displayName?: string; /** * Pool description * @maxLength 450 */ description?: string | null; /** * Pool definition id * @format GUID */ poolDefinitionId?: string; /** * Credit unit type. * @maxLength 16 */ creditUnitType?: string | null; } interface BalanceAmount { /** * number of available credits. * @decimalValue options { maxScale:4 } * @readonly */ available?: string; /** * number of reserved credits. * @decimalValue options { maxScale:4 } * @readonly */ reserved?: string; } interface BenefitInfo { /** * Benefit name * @maxLength 64 */ displayName?: string | null; /** * Benefit description * @maxLength 256 */ description?: string | null; /** * Benefit key. * @maxLength 64 */ benefitKey?: string; /** * Price of the benefit in credits. * @decimalValue options { gte:0, maxScale:4 } */ price?: string | null; } interface PolicyExpressionEvaluatedToFalse { /** * Pool ID. * @format GUID */ poolId?: string; /** Item reference. */ itemReference?: ItemReference; /** * Failure details. * @maxSize 10 */ failureDetails?: FailureDetails[]; /** Pool information. */ poolInfo?: PoolInfo; /** Program definition information. */ programDefinitionInfo?: ProgramDefinitionInfo; /** Program information. */ programInfo?: PoolProgramInfo; /** Benefit information. */ benefitInfo?: BenefitInfo; } interface FailureDetails { /** * Failure code * @minLength 1 * @maxLength 64 */ code?: string; /** * Failure message * @maxLength 256 */ message?: string | null; /** * Policy id * @format GUID */ policyId?: string | null; /** * App that owns the policy * @format GUID */ appId?: string | null; /** Information provided by the policy */ errorData?: Record | null; } interface PoolNotActive { /** * Pool ID. * @format GUID */ poolId?: string; /** Pool status. */ poolStatus?: PoolStatusWithLiterals; /** Pool information. */ poolInfo?: PoolInfo; /** Program definition information. */ programDefinitionInfo?: ProgramDefinitionInfo; /** Program information. */ programInfo?: PoolProgramInfo; /** Benefit information. */ benefitInfo?: BenefitInfo; } interface PoolNotFound { /** * Pool ID. * @format GUID */ poolId?: string; } interface BenefitAlreadyRedeemed { /** * Pool ID * @format GUID */ poolId?: string; /** * Idempotency key of the request that failed * @maxLength 200 */ idempotencyKey?: string; } interface BenefitNotFound { /** * Pool ID. * @format GUID */ poolId?: string; /** * Specified benefit key. * @maxLength 64 */ benefitKey?: string | null; /** Pool information. */ poolInfo?: PoolInfo; /** Program definition information. */ programDefinitionInfo?: ProgramDefinitionInfo; /** Program information. */ programInfo?: PoolProgramInfo; } interface ReallocateBenefitRequest { /** * ID of the latest transaction in the redemption's transaction chain. * For a redemption that has never been reallocated, this is the redemption transaction ID. * @format GUID */ transactionId: string; /** New date that the item will be provided to the beneficiary. */ targetDate: Date | null; /** * Unique identifier, generated by the client. * Used to recognize repeated attempts to make the same request. * @maxLength 200 */ idempotencyKey: string; /** Beneficiary of the pool containing the benefit to reallocate. Must match the beneficiary of the original redemption. */ beneficiary: CommonIdentificationData; /** * 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. * @minLength 1 * @maxLength 20 */ namespace: string; } interface ReallocateBenefitResponse { /** * ID of the reallocation transaction. This is the new latest transaction in the chain. * @format GUID */ transactionId?: string; } interface TransactionNotFound { /** * ID of the transaction that wasn't found. * @format GUID */ transactionId?: string; } interface NotLatestTransaction { /** * ID of the latest transaction in the chain. * @format GUID */ latestTransactionId?: string; } interface RedemptionAlreadyCanceled { /** * ID of the transaction that canceled the redemption. * @format GUID */ cancellationTransactionId?: string; } interface ItemNotAvailableInPool { /** * Pool ID * @format GUID */ poolId?: string; /** Not found item reference in pool */ itemReference?: ItemReference; /** * Key of the referenced benefit, if provided * @maxLength 64 */ benefitKey?: string | null; } interface ChainOperationInProgress { /** * ID of the pending transaction that hasn't settled yet. * @format GUID */ pendingTransactionId?: string; } interface AlreadyExecuted { /** * Idempotency key of the original request. * @maxLength 200 */ idempotencyKey?: string; } interface CancelRedemptionRequest { /** * ID of the latest transaction in the redemption's transaction chain. * For a redemption that has never been reallocated, this is the redemption transaction ID. * @format GUID */ transactionId: string; /** * Unique identifier, generated by the client. * Used to recognize repeated attempts to make the same request. * @maxLength 200 */ idempotencyKey: string; } interface CancelRedemptionResponse { /** * ID of the cancellation transaction. This is the terminal transaction of the chain. * @format GUID */ transactionId?: string; } interface ReserveBenefitRequest { /** * Id of the pool that is being redeemed from * @format GUID */ poolId?: string; /** Reference of the item that is being redeemed. */ itemReference?: ItemReference; /** * Key of the benefit to be redeemed, associated with a particular benefit. * * This key must be specified to ensure the correct benefit is redeemed. * * Default: The first eligible benefit in the benefit pool will be redeemed. * @maxLength 64 */ benefitKey?: string | null; /** * Number of items to redeem. * @min 1 */ count?: number; /** * Date when the benefit item will be used. * * 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. * * Used for the app providing the benefit items to manage the logistics associated with the item. */ targetDate?: Date | null; /** * Idempotency key * @maxLength 200 */ idempotencyKey?: string; /** Additional info */ additionalData?: Record | null; /** Benefit pool owner. */ beneficiary?: CommonIdentificationData; /** * Module that is the source of the benefit pool creation. * * This value must correspond with the previously defined namespace established when creating the associated pool definition. * * It ensures efficient processing and management of pools and benefits. * @minLength 1 * @maxLength 20 */ namespace?: string; } interface ReserveBenefitResponse { /** * Id of the transaction that was created as a result of this request * @format GUID */ transactionId?: string; } interface CancelBenefitReservationRequest { /** * Id of the transaction that was created as a result of this request * @format GUID */ transactionId?: string; } interface CancelBenefitReservationResponse { /** * Id of the transaction that was created as a result of this request * @format GUID */ transactionId?: string; } interface ReleaseBenefitReservationRequest { /** * Id of the transaction that was created as a result of this request * @format GUID */ transactionId?: string; } interface ReleaseBenefitReservationResponse { /** * Id of the transaction that was created as a result of this request * @format GUID */ transactionId?: string; } interface CheckBenefitEligibilityRequest { /** * ID of the pool that the benefit to check belongs to. * @format GUID */ poolId: string; /** * Key of the benefit to check. * @maxLength 64 */ benefitKey?: string | null; /** Information about the item to check. */ itemReference: ItemReference; /** * Amount of items to check. * * Ensures the balance is high enough to redeem this many items. * @min 1 */ count?: number; /** * Date that the item will be provided to the beneficiary. * * This parameter should be used to manage the potential logistics of providing the item. */ targetDate?: Date | null; /** Additional information. */ additionalData?: Record | null; /** Beneficiary of the pool containing the benefit to check. */ beneficiary?: CommonIdentificationData; /** * 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. * @minLength 1 * @maxLength 20 */ namespace: string; /** * Intent of the eligibility check. * * If not provided, `REDEMPTION` is used by default. */ intent?: IntentWithLiterals; } declare enum Intent { /** Check whether the benefit can be redeemed. */ REDEMPTION = "REDEMPTION", /** * Check whether an already redeemed benefit can be reallocated to the target date. * The redeemed credits are kept, so the balance check is skipped. */ REALLOCATION = "REALLOCATION" } /** @enumType */ type IntentWithLiterals = Intent | 'REDEMPTION' | 'REALLOCATION'; interface CheckBenefitEligibilityResponse { /** Result of the eligibility check. */ result?: EligibilityCheckResult; } interface EligibilityCheckResult { /** * Eligibility status. * @maxSize 10 */ benefitResults?: BenefitResult[]; } declare enum BenefitResultType { /** Item is eligible to be redeemed. */ ELIGIBLE_BENEFIT = "ELIGIBLE_BENEFIT", /** Balance is lower than the cost of redeeming the items. */ NOT_ENOUGH_BALANCE = "NOT_ENOUGH_BALANCE", /** Pool isn't active. */ POOL_NOT_ACTIVE = "POOL_NOT_ACTIVE", /** Invalid benefit details provided. */ BENEFIT_NOT_FOUND = "BENEFIT_NOT_FOUND", /** Invalid pool details provided. */ POOL_NOT_FOUND = "POOL_NOT_FOUND" } /** @enumType */ type BenefitResultTypeWithLiterals = BenefitResultType | 'ELIGIBLE_BENEFIT' | 'NOT_ENOUGH_BALANCE' | 'POOL_NOT_ACTIVE' | 'BENEFIT_NOT_FOUND' | 'POOL_NOT_FOUND'; interface EligibleBenefit { /** * Pool ID. * @format GUID * @readonly */ poolId?: string; /** * Benefit key. * @maxLength 64 */ benefitKey?: string; /** Item reference. */ itemReference?: ItemReference; /** * Price of the benefit in credits. * @decimalValue options { gte:0, maxScale:4 } */ price?: string | null; /** Pool information. */ poolInfo?: PoolInfo; /** Benefit information. */ benefitInfo?: BenefitInfo; /** Program definition information. */ programDefinitionInfo?: ProgramDefinitionInfo; /** Program information. */ programInfo?: PoolProgramInfo; } interface BenefitResult extends BenefitResultResultOneOf { /** Returned when item is eligible to be redeemed. */ eligibleBenefitOptions?: EligibleBenefit; /** Returned when the pool's associated balance is lower than the cost of redeeming the items. */ notEnoughBalanceOptions?: NotEnoughBalance; /** Returned when the policy is false. */ policyExpressionEvaluatedToFalseOptions?: PolicyExpressionEvaluatedToFalse; /** Returned when the pool isn't active. */ poolNotActiveOptions?: PoolNotActive; /** Returned when invalid benefit details are provided. */ benefitNotFoundOptions?: BenefitNotFound; /** Returned when invalid pool details are provided. */ poolNotFoundOptions?: PoolNotFound; /** Eligibility status. */ type?: BenefitResultTypeWithLiterals; } /** @oneof */ interface BenefitResultResultOneOf { /** Returned when item is eligible to be redeemed. */ eligibleBenefitOptions?: EligibleBenefit; /** Returned when the pool's associated balance is lower than the cost of redeeming the items. */ notEnoughBalanceOptions?: NotEnoughBalance; /** Returned when the policy is false. */ policyExpressionEvaluatedToFalseOptions?: PolicyExpressionEvaluatedToFalse; /** Returned when the pool isn't active. */ poolNotActiveOptions?: PoolNotActive; /** Returned when invalid benefit details are provided. */ benefitNotFoundOptions?: BenefitNotFound; /** Returned when invalid pool details are provided. */ poolNotFoundOptions?: PoolNotFound; } interface BulkCheckBenefitEligibilityRequest { /** * List of benefits to check. * @minSize 1 * @maxSize 100 */ benefitSelectors?: BenefitSelector[]; /** * 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. * @minLength 1 * @maxLength 20 */ namespace: string; /** Pool beneficiary. */ beneficiary?: CommonIdentificationData; } interface BenefitSelector { /** * ID of the pool that the benefit to check belongs to. * @format GUID */ poolId?: string; /** * Key of the benefit to check. * @maxLength 64 */ benefitKey?: string | null; /** Information about the item to check. */ itemReference?: ItemReference; /** * Amount of items to check. * * Ensures the balance is high enough to redeem this many items. * @min 1 */ count?: number; /** * Date that the item will be provided to the beneficiary. * * This parameter should be used to manage the potential logistics of providing the item. */ targetDate?: Date | null; /** Additional information. */ additionalData?: Record | null; } interface BulkCheckBenefitEligibilityResponse { /** * List of results checking each benefit. * @minSize 1 * @maxSize 100 */ results?: BulkEligibilityCheckResult[]; } interface BulkEligibilityCheckResult { /** Benefit information specified in API call. */ benefitSelector?: BenefitSelector; /** Result of the eligibility check. */ result?: EligibilityCheckResult; } interface GetEligibleBenefitsRequest { /** Item reference. */ itemReference: ItemReference; /** * Amount of items to check. This ensures the balance is high enough to redeem this many items. * @min 1 */ count?: number; /** * Date that the item will be provided to the beneficiary. * * This parameter should be used to manage the potential logistics of providing the item. */ targetDate?: Date | null; /** Additional information. */ additionalData?: Record | null; /** Filter request by beneficiary. */ beneficiary?: CommonIdentificationData; /** * 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. * @minLength 1 * @maxLength 20 */ namespace: string; } interface GetEligibleBenefitsResponse { /** Retrieved benefits that can be redeemed. */ eligibleBenefits?: EligibleBenefit[]; } interface BulkUpdatePoolsRequest { /** * Pools to update. * @minSize 1 * @maxSize 100 */ pools?: MaskedPool[]; /** * Whether to return the full pool definition entities. * * Default: `false` */ returnEntity?: boolean; } interface MaskedPool { /** Pool to update. */ pool?: Pool; /** Explicit list of fields to update. */ fieldMask?: string[]; } interface BulkUpdatePoolsResponse { /** * List of updated pools and associated metadata. * @minSize 1 * @maxSize 100 */ results?: BulkPoolResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkPoolResult { /** Item metadata. */ itemMetadata?: ItemMetadata; /** Pool data. */ item?: Pool; } interface ItemMetadata { /** * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). * @format GUID */ _id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError; } interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface BulkActionMetadata { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface ProvisionPoolsForProgramRequest { /** Reference of the template that is used to provision the pools */ poolDefinitionLookupId?: PoolDefinitionLookupId; /** * Program that the provisioned pools are part of * @format GUID */ programId?: string; } interface PoolDefinitionLookupId extends PoolDefinitionLookupIdIdOneOf { /** * Pool definition ID. * @format GUID */ poolDefinitionId?: string; /** * Program definition ID. * @format GUID */ programDefinitionId?: string; } /** @oneof */ interface PoolDefinitionLookupIdIdOneOf { /** * Pool definition ID. * @format GUID */ poolDefinitionId?: string; /** * Program definition ID. * @format GUID */ programDefinitionId?: string; } interface ProvisionPoolsForProgramResponse extends ProvisionPoolsForProgramResponseResultOneOf { /** Sync result */ syncOptions?: SyncResult; /** Async result */ asyncOptions?: AsyncResult; /** * 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). * @format GUID */ jobId?: string; /** Type of the result */ type?: ProvisionPoolsForProgramResponseTypeWithLiterals; } /** @oneof */ interface ProvisionPoolsForProgramResponseResultOneOf { /** Sync result */ syncOptions?: SyncResult; /** Async result */ asyncOptions?: AsyncResult; } declare enum ProvisionPoolsForProgramResponseType { /** Sync result */ SYNC = "SYNC", /** Async result */ ASYNC = "ASYNC" } /** @enumType */ type ProvisionPoolsForProgramResponseTypeWithLiterals = ProvisionPoolsForProgramResponseType | 'SYNC' | 'ASYNC'; interface SyncResult { /** Indicates if the operation was successful */ success?: boolean; } interface AsyncResult { /** * 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). * @format GUID */ jobId?: string; } interface InvalidPoolDefinitionReference { /** Reference of the template that didn't find any pool definitions */ poolDefinitionLookupId?: PoolDefinitionLookupId; } interface RenewPoolsForProgramRequest { /** * Package of pools to grant. Package id should be the same that was used to provision programs. * @format GUID */ programId?: string; } interface RenewPoolsForProgramResponse { /** * Job id of the renewal job * @format GUID */ jobId?: string; } interface UpdatePoolStatusRequest extends UpdatePoolStatusRequestPoolSelectorOneOf { /** Pool selector by pool definition id and program definition id */ byPoolDefinitionIdAndProgramDefinitionIdOptions?: ByPoolDefinitionIdAndProgramDefinitionIdOptions; /** Pool selector by program id */ byProgramIdOptions?: ByProgramIdOptions; /** New pool status */ status?: PoolStatusWithLiterals; /** Pool selector type */ poolSelectorType?: PoolSelectorTypeWithLiterals; } /** @oneof */ interface UpdatePoolStatusRequestPoolSelectorOneOf { /** Pool selector by pool definition id and program definition id */ byPoolDefinitionIdAndProgramDefinitionIdOptions?: ByPoolDefinitionIdAndProgramDefinitionIdOptions; /** Pool selector by program id */ byProgramIdOptions?: ByProgramIdOptions; } declare enum PoolSelectorType { BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID = "BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID", BY_PROGRAM_ID = "BY_PROGRAM_ID" } /** @enumType */ type PoolSelectorTypeWithLiterals = PoolSelectorType | 'BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID' | 'BY_PROGRAM_ID'; interface ByPoolDefinitionIdAndProgramDefinitionIdOptions { /** * Pool definition id * @format GUID */ poolDefinitionId?: string; /** * Program definition id * @format GUID */ programDefinitionId?: string | null; } interface ByProgramIdOptions { /** * Program id * @format GUID */ programId?: string; /** Additional data that gets added to the event once the async job completes */ additionalData?: Record | null; } interface UpdatePoolStatusResponse { /** * 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). * @format GUID */ jobId?: string; } interface CountNumberOfPoolsInProvisioningStatusRequest { /** * Program id * @format GUID */ programId?: string; } interface CountNumberOfPoolsInProvisioningStatusResponse { /** Number of pools in provisioning status */ count?: number; } interface CheckBenefitEligibilityByFilterRequest { /** * 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. * @minLength 1 * @maxLength 20 */ namespace: string; /** Information about the item to check. */ itemReference: ItemReference; /** * Number of items to check. * * Ensures the balance is high enough to redeem this many items. * @min 1 */ count: number; /** * Date that the item will be provided to the beneficiary. * * This parameter should be used to manage the potential logistics of providing the item. */ targetDate?: Date | null; /** Pool beneficiary. Defaults to the calling identity. Only the beneficiary's pools that also match `pool_selector` are checked. */ beneficiary?: CommonIdentificationData; /** Additional information. */ additionalData?: Record | null; /** * Predefined attributes used to select the pools to check eligibility in. * * When omitted, pools in all statuses are checked. Combined with `beneficiary`, `namespace`, and `item_reference`, the selector further narrows which pools are checked. */ poolSelector?: PoolSelector; } /** * Predefined pool-selection attributes used to select the pools to check eligibility in. * * All provided attributes must match for a pool to be selected, while the values within each attribute are alternatives. * An empty selector selects all pools in the namespace that match the provided `beneficiary`. */ interface PoolSelector { /** * Only pools in these statuses are checked. When empty, pools in all statuses are checked. * @maxSize 10 */ poolStatuses?: PoolStatusWithLiterals[]; } interface CheckBenefitEligibilityByFilterResponse { /** * Results of the eligibility check for the benefits in the pools that match the request. A pool that contains multiple benefits for the requested item produces one result per benefit. * * Empty when no pools match. */ results?: EligibilityCheckResult[]; } interface HealPoolRequest { /** * ID of the pool whose enrichments should be re-materialized. * @format GUID */ poolId?: string; } interface HealPoolResponse { } interface HealPoolTenantRequest { } interface HealPoolTenantResponse { } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ _id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * 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. * 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. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entity?: string; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntity?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntity?: string | null; } interface ActionEvent { body?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } /** @docsIgnore */ type RedeemBenefitApplicationErrors = { code?: 'NOT_ENOUGH_BALANCE'; description?: string; data?: NotEnoughBalance; } | { code?: 'POLICY_EXPRESSION_EVALUATED_TO_FALSE'; description?: string; data?: PolicyExpressionEvaluatedToFalse; } | { code?: 'POOL_NOT_ACTIVE'; description?: string; data?: PoolNotActive; } | { code?: 'POOL_NOT_FOUND'; description?: string; data?: PoolNotFound; } | { code?: 'BENEFIT_ALREADY_REDEEMED'; description?: string; data?: BenefitAlreadyRedeemed; } | { code?: 'BENEFIT_NOT_FOUND'; description?: string; data?: BenefitNotFound; }; /** @docsIgnore */ type ReallocateBenefitApplicationErrors = { code?: 'TRANSACTION_NOT_FOUND'; description?: string; data?: TransactionNotFound; } | { code?: 'POOL_NOT_FOUND'; description?: string; data?: PoolNotFound; } | { code?: 'NOT_LATEST_TRANSACTION'; description?: string; data?: NotLatestTransaction; } | { code?: 'REDEMPTION_ALREADY_CANCELED'; description?: string; data?: RedemptionAlreadyCanceled; } | { code?: 'TRANSACTION_NOT_REALLOCATABLE'; description?: string; data?: Record; } | { code?: 'POOL_NOT_REALLOCATABLE'; description?: string; data?: PoolNotActive; } | { code?: 'ITEM_NOT_AVAILABLE_IN_POOL'; description?: string; data?: ItemNotAvailableInPool; } | { code?: 'POLICY_EXPRESSION_EVALUATED_TO_FALSE'; description?: string; data?: PolicyExpressionEvaluatedToFalse; } | { code?: 'CHAIN_OPERATION_IN_PROGRESS'; description?: string; data?: ChainOperationInProgress; } | { code?: 'ALREADY_EXECUTED'; description?: string; data?: AlreadyExecuted; }; /** @docsIgnore */ type CancelRedemptionApplicationErrors = { code?: 'TRANSACTION_NOT_FOUND'; description?: string; data?: TransactionNotFound; } | { code?: 'NOT_LATEST_TRANSACTION'; description?: string; data?: NotLatestTransaction; } | { code?: 'REDEMPTION_ALREADY_CANCELED'; description?: string; data?: RedemptionAlreadyCanceled; } | { code?: 'TRANSACTION_NOT_CANCELABLE'; description?: string; data?: Record; } | { code?: 'CHAIN_OPERATION_IN_PROGRESS'; description?: string; data?: ChainOperationInProgress; } | { code?: 'ALREADY_EXECUTED'; description?: string; data?: AlreadyExecuted; }; /** @docsIgnore */ type GetEligibleBenefitsApplicationErrors = { code?: 'INVALID_ITEM_REFERENCE'; description?: string; data?: Record; }; /** @docsIgnore */ type CheckBenefitEligibilityByFilterApplicationErrors = { code?: 'INVALID_ITEM_REFERENCE'; description?: string; data?: Record; }; /** * Retrieves a pool. * @param poolId - ID of the pool to retrieve. * @public * @requiredField poolId * @permissionId BENEFIT_PROGRAMS.POOL_READ * @applicableIdentity APP * @returns Retrieved pool. * @fqn wix.benefit_programs.v1.pool.PoolService.GetPool */ declare function getPool(poolId: string): Promise>; /** * Updates a pool. * * Each time the pool is updated, * `revision` increments by 1. * The current `revision` must be passed when updating the pool. * This ensures you're working with the latest pool * and prevents unintended overwrites. * @param _id - Pool ID. * @public * @requiredField _id * @requiredField pool * @requiredField pool.revision * @permissionId BENEFIT_PROGRAMS.POOL_UPDATE * @applicableIdentity APP * @returns Updated pool. * @fqn wix.benefit_programs.v1.pool.PoolService.UpdatePool */ declare function updatePool(_id: string, pool: NonNullablePaths): Promise>; interface UpdatePool { /** * Pool ID. * @format GUID * @immutable * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the pool is updated. * To prevent conflicting changes, the current revision must be passed when updating the pool. * * Ignored when creating a pool. * @readonly */ revision?: string | null; /** * Date and time the pool was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the pool was updated. * @readonly */ _updatedDate?: Date | null; /** * ID of the associated pool definition. * @format GUID * @readonly * @immutable */ poolDefinitionId?: string | null; /** * ID of the associated program definition. * @format GUID * @readonly * @immutable */ programDefinitionId?: string | null; /** * ID of the program that contains this pool. * @format GUID * @readonly * @immutable */ programId?: string | null; /** * Pool status. * @readonly */ status?: PoolStatusWithLiterals; /** * Pool beneficiary. * @readonly * @immutable */ beneficiary?: CommonIdentificationData; /** Pool benefits and settings. */ details?: Details; /** * Pool name. * * You may want to use the same name that's used in the associated pool definition. * @maxLength 64 */ displayName?: string; /** * 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. * @readonly * @immutable * @minLength 1 * @maxLength 20 */ namespace?: string | null; /** * Custom field data for the pool object. * * [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. */ extendedFields?: ExtendedFields; /** * Associated program definition information. * @readonly */ programDefinition?: ProgramDefinitionInfo; /** * Information about the program containing the pool. * @readonly */ program?: PoolProgramInfo; /** * Version of the pool definition that this pool was created from. * @readonly */ poolDefinitionRevision?: string | null; /** * Number of times this pool has been renewed. * @readonly */ renewalCount?: number | null; } /** * Creates a query to retrieve a list of pools. * * The Query Pools method builds a query to retrieve a list of pools and returns a `PoolsQueryBuilder` object. * * The returned object contains the query definition, which is used to run the query using the `find()` method. * * 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. * * Query Pools has a default paging limit of 50, which you can override. * * For a full description of the item object, see the object returned for the `items` property in `PoolsQueryResult`. * @public * @permissionId BENEFIT_PROGRAMS.POOL_READ * @applicableIdentity APP * @fqn wix.benefit_programs.v1.pool.PoolService.QueryPools */ declare function queryPools(options?: QueryPoolsOptions): PoolsQueryBuilder; interface QueryPoolsOptions { } interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface PoolsQueryResult extends QueryCursorResult { items: Pool[]; query: PoolsQueryBuilder; next: () => Promise; prev: () => Promise; } interface PoolsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ eq: (propertyName: '_id' | '_createdDate' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'status' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id', value: any) => PoolsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ne: (propertyName: '_id' | '_createdDate' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'status' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id', value: any) => PoolsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ge: (propertyName: '_id' | '_createdDate' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id', value: any) => PoolsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ gt: (propertyName: '_id' | '_createdDate' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id', value: any) => PoolsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ le: (propertyName: '_id' | '_createdDate' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id', value: any) => PoolsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ lt: (propertyName: '_id' | '_createdDate' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id', value: any) => PoolsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. */ startsWith: (propertyName: '_id' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id', value: string) => PoolsQueryBuilder; in: (propertyName: '_id' | '_createdDate' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'status' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id', value: any) => PoolsQueryBuilder; exists: (propertyName: '_id' | '_createdDate' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'status' | 'beneficiary' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id', value: boolean) => PoolsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ ascending: (...propertyNames: Array<'_id' | '_createdDate' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'status' | 'beneficiary' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id'>) => PoolsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ descending: (...propertyNames: Array<'_id' | '_createdDate' | 'poolDefinitionId' | 'programDefinitionId' | 'programId' | 'status' | 'beneficiary' | 'beneficiary.memberId' | 'beneficiary.wixUserId' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace' | 'programDefinition.id' | 'program.id'>) => PoolsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */ limit: (limit: number) => PoolsQueryBuilder; /** @param cursor - A pointer to specific record */ skipTo: (cursor: string) => PoolsQueryBuilder; find: () => Promise; } /** * @hidden * @fqn wix.benefit_programs.v1.pool.PoolService.QueryPools * @requiredField query */ declare function typedQueryPools(query: PoolQuery, options?: QueryPoolsOptions): Promise>; interface PoolQuerySpec extends QuerySpec { paging: 'cursor'; wql: [ { fields: ['details.benefits.itemSetId', 'details.benefits.providerAppId']; operators: ['$hasAll', '$hasSome']; sort: 'BOTH'; }, { fields: [ '_createdDate', '_id', 'beneficiary', 'beneficiary.memberId', 'beneficiary.wixUserId', 'namespace', 'poolDefinitionId', 'programDefinitionId', 'programId', 'status' ]; operators: '*'; sort: 'BOTH'; } ]; } type CommonQueryWithEntityContext = Query; type PoolQuery = { /** 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`. */ cursorPaging?: { /** Maximum number of items to return. @max: 100 */ limit?: NonNullable['limit'] | null; /** Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. @maxLength: 16000 */ cursor?: NonNullable['cursor'] | null; }; /** Filter object. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more information. */ filter?: CommonQueryWithEntityContext['filter'] | null; /** List of sort objects. @maxSize: 5 */ sort?: { /** Field to sort by. @maxLength: 512 */ fieldName?: NonNullable[number]['fieldName']; /** Sort order. Use `ASC` for ascending order or `DESC` for descending order. Default: `ASC` */ order?: NonNullable[number]['order']; }[]; }; declare const utils: { query: _wix_sdk_types.QueryHelpers; }; /** * Redeems a specified benefit. * * 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. * @param poolId - ID of the pool that contains the benefit to redeem. * @public * @requiredField options.benefitKey * @requiredField options.idempotencyKey * @requiredField options.itemReference * @requiredField options.itemReference.externalId * @requiredField options.itemReference.providerAppId * @requiredField options.namespace * @requiredField poolId * @permissionId BENEFIT_PROGRAMS.POOL_REDEEM * @applicableIdentity APP * @fqn wix.benefit_programs.v1.pool.PoolService.RedeemBenefit */ declare function redeemBenefit(poolId: string, options?: NonNullablePaths): Promise & { __applicationErrorsType?: RedeemBenefitApplicationErrors; }>; interface RedeemBenefitOptions { /** Information about the item to redeem. */ itemReference: ItemReference; /** * Key of the benefit to redeem. * @maxLength 64 */ benefitKey: string; /** * Amount of items to redeem. * @min 1 */ count?: number; /** * Date that the item will be provided to the beneficiary. * * The pool's associated balance will update immediately. This parameter should be used to manage the logistics of providing the item. */ targetDate?: Date | null; /** * Unique identifier, generated by the client. * Used to recognize repeated attempts to make the same request. * @maxLength 200 */ idempotencyKey: string; /** Additional information. */ additionalData?: Record | null; /** Beneficiary of the pool containing the benefit to redeem. */ beneficiary?: CommonIdentificationData; /** * 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. * @minLength 1 * @maxLength 20 */ namespace: string; } /** * Reallocates a redeemed benefit to a new target date. * * The reallocation is recorded as a new zero-amount transaction that supersedes the specified transaction in the redemption's transaction chain. * The specified transaction must be the latest transaction in the chain. The item, count and benefit key are carried over from the original redemption; only the target date changes. * @param transactionId - ID of the latest transaction in the redemption's transaction chain. * For a redemption that has never been reallocated, this is the redemption transaction ID. * @public * @documentationMaturity preview * @requiredField options * @requiredField options.beneficiary * @requiredField options.idempotencyKey * @requiredField options.namespace * @requiredField options.targetDate * @requiredField transactionId * @permissionId benefit_programs:v1:pool:reallocate_benefit * @permissionId benefit_programs:v1:pool:override_reallocation_eligibility * @applicableIdentity APP * @fqn wix.benefit_programs.v1.pool.PoolService.ReallocateBenefit */ declare function reallocateBenefit(transactionId: string, options: NonNullablePaths): Promise & { __applicationErrorsType?: ReallocateBenefitApplicationErrors; }>; interface ReallocateBenefitOptions { /** New date that the item will be provided to the beneficiary. */ targetDate: Date | null; /** * Unique identifier, generated by the client. * Used to recognize repeated attempts to make the same request. * @maxLength 200 */ idempotencyKey: string; /** Beneficiary of the pool containing the benefit to reallocate. Must match the beneficiary of the original redemption. */ beneficiary: CommonIdentificationData; /** * 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. * @minLength 1 * @maxLength 20 */ namespace: string; } /** * Cancels a redemption, crediting the redeemed amount back to the pool's available balance. * * The cancellation is recorded as a new transaction that supersedes the specified transaction and terminates the redemption's transaction chain. * The specified transaction must be the latest transaction in the chain. The credited amount is always the amount of the original redemption, regardless of any reallocations in between. * @param transactionId - ID of the latest transaction in the redemption's transaction chain. * For a redemption that has never been reallocated, this is the redemption transaction ID. * @public * @documentationMaturity preview * @requiredField options * @requiredField options.idempotencyKey * @requiredField transactionId * @permissionId benefit_programs:v1:pool:cancel_redemption * @applicableIdentity APP * @fqn wix.benefit_programs.v1.pool.PoolService.CancelRedemption */ declare function cancelRedemption(transactionId: string, options: NonNullablePaths): Promise & { __applicationErrorsType?: CancelRedemptionApplicationErrors; }>; interface CancelRedemptionOptions { /** * Unique identifier, generated by the client. * Used to recognize repeated attempts to make the same request. * @maxLength 200 */ idempotencyKey: string; } /** * Checks if a benefit can currently be redeemed. * * To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit. * @param poolId - ID of the pool that the benefit to check belongs to. * @public * @requiredField options.itemReference * @requiredField options.itemReference.externalId * @requiredField options.itemReference.providerAppId * @requiredField options.namespace * @requiredField poolId * @permissionId BENEFIT_PROGRAMS.POOL_REDEEM * @applicableIdentity APP * @fqn wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibility */ declare function checkBenefitEligibility(poolId: string, options?: NonNullablePaths): Promise>; interface CheckBenefitEligibilityOptions { /** * Key of the benefit to check. * @maxLength 64 */ benefitKey?: string | null; /** Information about the item to check. */ itemReference: ItemReference; /** * Amount of items to check. * * Ensures the balance is high enough to redeem this many items. * @min 1 */ count?: number; /** * Date that the item will be provided to the beneficiary. * * This parameter should be used to manage the potential logistics of providing the item. */ targetDate?: Date | null; /** Additional information. */ additionalData?: Record | null; /** Beneficiary of the pool containing the benefit to check. */ beneficiary?: CommonIdentificationData; /** * 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. * @minLength 1 * @maxLength 20 */ namespace: string; /** * Intent of the eligibility check. * * If not provided, `REDEMPTION` is used by default. */ intent?: IntentWithLiterals; } /** * Checks if benefits can currently be redeemed. * * To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit. * * 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. * @public * @requiredField options.benefitSelectors.itemReference * @requiredField options.benefitSelectors.itemReference.externalId * @requiredField options.benefitSelectors.itemReference.providerAppId * @requiredField options.benefitSelectors.poolId * @requiredField options.namespace * @permissionId BENEFIT_PROGRAMS.POOL_REDEEM * @applicableIdentity APP * @fqn wix.benefit_programs.v1.pool.PoolService.BulkCheckBenefitEligibility */ declare function bulkCheckBenefitEligibility(options?: NonNullablePaths): Promise>; interface BulkCheckBenefitEligibilityOptions { /** * List of benefits to check. * @minSize 1 * @maxSize 100 */ benefitSelectors?: BenefitSelector[]; /** * 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. * @minLength 1 * @maxLength 20 */ namespace: string; /** Pool beneficiary. */ beneficiary?: CommonIdentificationData; } /** * Retrieves benefits that can be redeemed for a specific benefit item. * * 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. * This method checks each pool containing a benefit with this benefit item, and returns the benefits that can be redeemed. * @param itemReference - Item reference. * @public * @requiredField itemReference * @requiredField itemReference.externalId * @requiredField itemReference.providerAppId * @requiredField options.namespace * @permissionId BENEFIT_PROGRAMS.POOL_READ * @applicableIdentity APP * @fqn wix.benefit_programs.v1.pool.PoolService.GetEligibleBenefits */ declare function getEligibleBenefits(itemReference: NonNullablePaths, options?: NonNullablePaths): Promise & { __applicationErrorsType?: GetEligibleBenefitsApplicationErrors; }>; interface GetEligibleBenefitsOptions { /** * Amount of items to check. This ensures the balance is high enough to redeem this many items. * @min 1 */ count?: number; /** * Date that the item will be provided to the beneficiary. * * This parameter should be used to manage the potential logistics of providing the item. */ targetDate?: Date | null; /** Additional information. */ additionalData?: Record | null; /** Filter request by beneficiary. */ beneficiary?: CommonIdentificationData; /** * 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. * @minLength 1 * @maxLength 20 */ namespace: string; } /** * Updates pools. * @public * @requiredField options.pools.pool * @requiredField options.pools.pool._id * @requiredField options.pools.pool.revision * @permissionId BENEFIT_PROGRAMS.POOL_UPDATE * @applicableIdentity APP * @fqn wix.benefit_programs.v1.pool.PoolService.BulkUpdatePools */ declare function bulkUpdatePools(options?: NonNullablePaths): Promise>; interface BulkUpdatePoolsOptions { /** * Pools to update. * @minSize 1 * @maxSize 100 */ pools?: MaskedPool[]; /** * Whether to return the full pool definition entities. * * Default: `false` */ returnEntity?: boolean; } /** * Checks benefit eligibility across the beneficiary's pools that contain a benefit for the given item. * * Pools are matched by `itemReference` within `namespace` and must belong to `beneficiary`, which defaults to the calling identity. `poolSelector` narrows the matched pools further. * * To be redeemed, a benefit's pool must be active and the associated balance must be greater than the cost of the benefit. * * 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. * @param namespace - Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created. * @public * @requiredField namespace * @requiredField options.count * @requiredField options.itemReference * @requiredField options.itemReference.externalId * @requiredField options.itemReference.providerAppId * @permissionId benefit_programs:v1:pool:check_benefit_eligibility_by_filter * @applicableIdentity APP * @fqn wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibilityByFilter */ declare function checkBenefitEligibilityByFilter(namespace: string, options?: NonNullablePaths): Promise & { __applicationErrorsType?: CheckBenefitEligibilityByFilterApplicationErrors; }>; interface CheckBenefitEligibilityByFilterOptions { /** Information about the item to check. */ itemReference: ItemReference; /** * Number of items to check. * * Ensures the balance is high enough to redeem this many items. * @min 1 */ count: number; /** * Date that the item will be provided to the beneficiary. * * This parameter should be used to manage the potential logistics of providing the item. */ targetDate?: Date | null; /** Pool beneficiary. Defaults to the calling identity. Only the beneficiary's pools that also match `pool_selector` are checked. */ beneficiary?: CommonIdentificationData; /** Additional information. */ additionalData?: Record | null; /** * Predefined attributes used to select the pools to check eligibility in. * * When omitted, pools in all statuses are checked. Combined with `beneficiary`, `namespace`, and `item_reference`, the selector further narrows which pools are checked. */ poolSelector?: PoolSelector; } export { type AccountInfo, type ActionEvent, type AlreadyExecuted, type ApplicationError, type AsyncResult, type BalanceAmount, type Benefit, type BenefitAlreadyRedeemed, type BenefitInfo, type BenefitNotFound, type BenefitReallocated, type BenefitRedeemed, type BenefitReservationCanceled, type BenefitReservationReleased, type BenefitReserved, type BenefitResult, type BenefitResultResultOneOf, BenefitResultType, type BenefitResultTypeWithLiterals, type BenefitSelector, type BulkActionMetadata, type BulkCheckBenefitEligibilityOptions, type BulkCheckBenefitEligibilityRequest, type BulkCheckBenefitEligibilityResponse, type BulkEligibilityCheckResult, type BulkPoolResult, type BulkUpdatePoolsOptions, type BulkUpdatePoolsRequest, type BulkUpdatePoolsResponse, type ByPoolDefinitionIdAndProgramDefinitionIdOptions, type ByProgramIdOptions, type CancelBenefitReservationRequest, type CancelBenefitReservationResponse, type CancelRedemptionApplicationErrors, type CancelRedemptionOptions, type CancelRedemptionRequest, type CancelRedemptionResponse, type CancellationDetails, type ChainOperationInProgress, type CheckBenefitEligibilityByFilterApplicationErrors, type CheckBenefitEligibilityByFilterOptions, type CheckBenefitEligibilityByFilterRequest, type CheckBenefitEligibilityByFilterResponse, type CheckBenefitEligibilityOptions, type CheckBenefitEligibilityRequest, type CheckBenefitEligibilityResponse, type CommonIdentificationData, type CommonIdentificationDataIdOneOf, type CommonQueryWithEntityContext, type CountNumberOfPoolsInProvisioningStatusRequest, type CountNumberOfPoolsInProvisioningStatusResponse, type CreatePoolRequest, type CreatePoolResponse, type CreditConfiguration, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomPolicy, type DeletePoolRequest, type DeletePoolResponse, type Details, type DomainEvent, type DomainEventBodyOneOf, type EligibilityCheckResult, type EligibleBenefit, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type FailureDetails, type FixedIntervalPolicy, type GetEligibleBenefitsApplicationErrors, type GetEligibleBenefitsOptions, type GetEligibleBenefitsRequest, type GetEligibleBenefitsResponse, type GetPoolRequest, type GetPoolResponse, type HealPoolRequest, type HealPoolResponse, type HealPoolTenantRequest, type HealPoolTenantResponse, type IdentificationData, type IdentificationDataIdOneOf, IdentityType, type IdentityTypeWithLiterals, Intent, type IntentWithLiterals, type InvalidPoolDefinitionReference, type ItemMetadata, type ItemNotAvailableInPool, type ItemReference, type MaskedPool, type MessageEnvelope, type NotEnoughBalance, type NotLatestTransaction, type Policy, type PolicyExpression, type PolicyExpressionAnd, type PolicyExpressionEvaluatedToFalse, type PolicyExpressionExpressionOneOf, type PolicyExpressionNot, type PolicyExpressionOr, PolicyExpressionType, type PolicyExpressionTypeWithLiterals, type PolicyPolicyOneOf, type Pool, type PoolDefinitionAndProgramDefinition, type PoolDefinitionLookupId, type PoolDefinitionLookupIdIdOneOf, type PoolEnded, type PoolInfo, type PoolNotActive, type PoolNotFound, PoolOrigin, type PoolOriginWithLiterals, type PoolPaused, type PoolProgramInfo, type PoolProvisionJobFinished, type PoolProvisioned, type PoolQuery, type PoolQuerySpec, type PoolRenewalAction, type PoolRenewalActionActionOneOf, PoolRenewalActionType, type PoolRenewalActionTypeWithLiterals, type PoolRenewed, type PoolResumed, type PoolSelector, PoolSelectorType, type PoolSelectorTypeWithLiterals, PoolStatus, type PoolStatusUpdateJobFinished, type PoolStatusUpdateJobFinishedContextOneOf, type PoolStatusUpdateParamsPoolInfo, type PoolStatusWithLiterals, type PoolsQueryBuilder, type PoolsQueryResult, type ProgramDefinitionInfo, type ProgramInfo, type ProvisionPoolsForProgramRequest, type ProvisionPoolsForProgramResponse, type ProvisionPoolsForProgramResponseResultOneOf, ProvisionPoolsForProgramResponseType, type ProvisionPoolsForProgramResponseTypeWithLiterals, type QueryPoolsOptions, type QueryPoolsRequest, type QueryPoolsResponse, type RateLimitedPolicy, type ReallocateBenefitApplicationErrors, type ReallocateBenefitOptions, type ReallocateBenefitRequest, type ReallocateBenefitResponse, type ReallocationDetails, type RedeemBenefitApplicationErrors, type RedeemBenefitOptions, type RedeemBenefitRequest, type RedeemBenefitResponse, type RedemptionAlreadyCanceled, type RedemptionCanceled, type RedemptionDetails, type ReleaseBenefitReservationRequest, type ReleaseBenefitReservationResponse, type RenewPoolsForProgramRequest, type RenewPoolsForProgramResponse, type ReserveBenefitRequest, type ReserveBenefitResponse, type RestoreInfo, type RolloverConfiguration, SortOrder, type SortOrderWithLiterals, type Sorting, type SyncResult, TimePeriod, type TimePeriodWithLiterals, type TransactionNotFound, Type, type TypeWithLiterals, type Update, type UpdatePool, type UpdatePoolRequest, type UpdatePoolResponse, type UpdatePoolStatusRequest, type UpdatePoolStatusRequestPoolSelectorOneOf, type UpdatePoolStatusResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeekDay, type WeekDayWithLiterals, bulkCheckBenefitEligibility, bulkUpdatePools, cancelRedemption, checkBenefitEligibility, checkBenefitEligibilityByFilter, getEligibleBenefits, getPool, queryPools, reallocateBenefit, redeemBenefit, typedQueryPools, updatePool, utils };