@wix/auto_sdk_benefit-programs_pool-definition-items 1.0.7 → 1.0.9
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.d.ts +2 -6
- package/build/cjs/index.js +6 -63
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +2 -59
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +2 -6
- package/build/es/index.mjs +6 -53
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +2 -49
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +2 -6
- package/build/internal/cjs/index.js +6 -63
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +2 -59
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +2 -6
- package/build/internal/es/index.mjs +6 -53
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +2 -49
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.universal.ts","../../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.http.ts","../../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.schemas.ts","../../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.public.ts","../../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { renameKeysFromSDKRequestToRESTRequest } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBenefitProgramsV1PoolDefinitionItem from './benefit-programs-v1-pool-definition-item-pool-definition-items.http.js';\n// @ts-ignore\nimport {\n RemoveItemsFromBenefitRequest as RemoveItemsFromBenefitRequestSchema,\n AddItemsToBenefitRequest as AddItemsToBenefitRequestSchema,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.schemas.js';\n\nexport interface PoolDefinitionItem {\n /**\n * Benefit item ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Revision number, which increments by 1 each time the benefit item is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the item.\n *\n * Ignored when creating an item.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the item was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the item was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * External item ID assigned by the provider of the items.\n *\n * For example, if the benefit items are products, this ID corresponds to the specific product ID in the supplier's system.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalId?: string;\n /**\n * Item category. Groups benefit items together for organization and management purposes. For example, classes, posts, groups.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string;\n /**\n * ID of the application providing the benefit item.\n *\n * ID of the external application supplying the items. Each item's external ID is unique to its respective provider's application.\n * @format GUID\n * @immutable\n * @readonly\n */\n providerAppId?: string;\n /**\n * Module name of the item provider's application that originated the items.\n *\n * For example, `store-inventory` or `fitness-resources`.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string;\n /**\n * Pool definition id\n * @format GUID\n * @immutable\n * @readonly\n */\n poolDefinitionId?: string;\n /**\n * Item set ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string;\n /**\n * Additional data related to the benefit item.\n * @internal\n * @readonly\n */\n poolDefinition?: PoolDefinitionInfo;\n /**\n * Program definitions associated with the pool definition.\n * @internal\n * @maxSize 20\n * @readonly\n */\n programDefinitions?: ProgramDefinitionInfo[];\n /**\n * Item set ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemId?: string;\n /**\n * Benefit information\n * @internal\n * @readonly\n */\n benefitInfo?: BenefitInfo;\n /**\n * Additional item data related to the benefit item.\n * @internal\n * @readonly\n */\n itemInfo?: ItemInfo;\n /**\n * Unique identifier for the benefit associated with this item.\n * @maxLength 64\n * @immutable\n * @readonly\n */\n benefitKey?: string;\n}\n\nexport interface PoolDefinitionInfo {\n /**\n * Pool definition name.\n * @maxLength 64\n */\n displayName?: string;\n /**\n * Pool definition description.\n * @maxLength 450\n */\n description?: string | null;\n /**\n * Credit settings.\n *\n * If this object is empty, you can't set a price for the benefit.\n */\n creditConfiguration?: CreditConfiguration;\n}\n\nexport interface CreditConfiguration {\n /**\n * Initial available amount for associated balances.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n amount?: string;\n /**\n * Credit unit display name.\n * @maxLength 32\n */\n unitDisplayName?: string | null;\n /**\n * Credit unit type.\n * @internal\n * @maxLength 16\n */\n unitType?: string | null;\n}\n\nexport interface ProgramDefinitionInfo {\n /**\n * Program definition id\n * @format GUID\n */\n _id?: string;\n /**\n * Program definition external id\n * @format GUID\n */\n externalId?: string | null;\n /**\n * Program definition name\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * Program definition description.\n * @maxLength 450\n */\n description?: string | null;\n}\n\nexport interface BenefitInfo {\n /**\n * Price of the benefit in credits. The price is the same for all of this benefit's items.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n price?: string | null;\n /**\n * Benefit name.\n * @maxLength 40\n */\n displayName?: string | null;\n /**\n * Benefit description.\n * @maxLength 255\n */\n description?: string | null;\n}\n\nexport interface ItemInfo {\n /**\n * Item display name.\n * @maxLength 64\n */\n displayName?: string | null;\n}\n\nexport interface PoolDefinitionItemDeactivated {\n /** The pool definition item that was deactivated. */\n poolDefinitionItem?: PoolDefinitionItem;\n}\n\nexport interface QueryPoolDefinitionItemsRequest {\n /** Query to select benefit items. */\n query?: CursorQuery;\n /**\n * Fields to be included in the response.\n * @maxSize 4\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 1000\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport enum RequestedFields {\n POOL_DEFINITION = 'POOL_DEFINITION',\n PROGRAM_DEFINITION = 'PROGRAM_DEFINITION',\n BENEFIT = 'BENEFIT',\n ITEM = 'ITEM',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'POOL_DEFINITION'\n | 'PROGRAM_DEFINITION'\n | 'BENEFIT'\n | 'ITEM';\n\nexport interface QueryPoolDefinitionItemsResponse {\n /** List of items. */\n poolDefinitionItems?: PoolDefinitionItem[];\n /** Metadata for paginated results. */\n metadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface InvalidatePoolDefinitionItemsRequest {\n /**\n * The pool definition ID whose items are to be invalidated\n * @format GUID\n */\n poolDefinitionId?: string;\n /**\n * List of item set ids whose items are to be invalidated\n * @maxSize 10\n * @format GUID\n */\n itemSetIds?: string[];\n}\n\nexport interface InvalidatePoolDefinitionItemsResponse {}\n\nexport interface RemoveItemsFromBenefitRequest {\n /**\n * Items to remove from the benefit's item set.\n * @minSize 1\n * @maxSize 100\n */\n itemReferences: ItemReference[];\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit within the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\nexport interface ItemReference {\n /**\n * External item ID assigned by the provider.\n * @format GUID\n */\n externalId?: string;\n /**\n * Item category.\n * @maxLength 20\n */\n category?: string;\n}\n\nexport interface RemoveItemsFromBenefitResponse {}\n\nexport interface AddItemsToBenefitRequest {\n /**\n * Items to add to the benefit's item set.\n * @minSize 1\n * @maxSize 100\n */\n itemReferences: ItemReference[];\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit within the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\nexport interface AddItemsToBenefitResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/**\n * Removes items from a benefit's item set, resolved by pool definition ID and benefit key.\n * @param itemReferences - Items to remove from the benefit's item set.\n * @public\n * @documentationMaturity preview\n * @requiredField itemReferences\n * @requiredField itemReferences.externalId\n * @requiredField options\n * @requiredField options.benefitKey\n * @requiredField options.poolDefinitionId\n * @permissionId benefit_programs:v1:pool_definition_item:remove_items_from_benefit\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.RemoveItemsFromBenefit\n */\nexport async function removeItemsFromBenefit(\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n RemoveItemsFromBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects, validateRequestSchema } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n validateRequestSchema?: boolean;\n };\n\n if (validateRequestSchema) {\n RemoveItemsFromBenefitRequestSchema.parse({ itemReferences, options });\n }\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n itemReferences: itemReferences,\n poolDefinitionId: options?.poolDefinitionId,\n benefitKey: options?.benefitKey,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.removeItemsFromBenefit(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n itemReferences: '$[0]',\n poolDefinitionId: '$[1].poolDefinitionId',\n benefitKey: '$[1].benefitKey',\n },\n singleArgumentUnchanged: false,\n },\n ['itemReferences', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface RemoveItemsFromBenefitOptions {\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit within the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\n/**\n * Adds items to a benefit's item set, resolved by pool definition ID and benefit key.\n * @param itemReferences - Items to add to the benefit's item set.\n * @public\n * @documentationMaturity preview\n * @requiredField itemReferences\n * @requiredField itemReferences.externalId\n * @requiredField options\n * @requiredField options.benefitKey\n * @requiredField options.poolDefinitionId\n * @permissionId benefit_programs:v1:pool_definition_item:add_items_to_benefit\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.AddItemsToBenefit\n */\nexport async function addItemsToBenefit(\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n AddItemsToBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects, validateRequestSchema } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n validateRequestSchema?: boolean;\n };\n\n if (validateRequestSchema) {\n AddItemsToBenefitRequestSchema.parse({ itemReferences, options });\n }\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n itemReferences: itemReferences,\n poolDefinitionId: options?.poolDefinitionId,\n benefitKey: options?.benefitKey,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.addItemsToBenefit(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n itemReferences: '$[0]',\n poolDefinitionId: '$[1].poolDefinitionId',\n benefitKey: '$[1].benefitKey',\n },\n singleArgumentUnchanged: false,\n },\n ['itemReferences', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface AddItemsToBenefitOptions {\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit within the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n _: [\n {\n srcPath: '/_api/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_pool-definition-items';\n\n/** Removes items from a benefit's item set, resolved by pool definition ID and benefit key. */\nexport function removeItemsFromBenefit(\n payload: object\n): RequestOptionsFactory<any> {\n function __removeItemsFromBenefit({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_definition_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.RemoveItemsFromBenefit',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n {\n protoPath: '/v1/pool-definition-items/remove-items-from-benefit',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __removeItemsFromBenefit;\n}\n\n/** Adds items to a benefit's item set, resolved by pool definition ID and benefit key. */\nexport function addItemsToBenefit(payload: object): RequestOptionsFactory<any> {\n function __addItemsToBenefit({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_definition_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.AddItemsToBenefit',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n {\n protoPath: '/v1/pool-definition-items/add-items-to-benefit',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __addItemsToBenefit;\n}\n","import * as z from 'zod';\n\nexport const RemoveItemsFromBenefitRequest = z.object({\n itemReferences: z\n .array(\n z.object({\n externalId: z\n .string()\n .describe('External item ID assigned by the provider.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n category: z.string().describe('Item category.').max(20).optional(),\n })\n )\n .min(1)\n .max(100),\n options: z.object({\n poolDefinitionId: z\n .string()\n .describe('ID of the pool definition associated with the benefit.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n benefitKey: z\n .string()\n .describe('Key identifying the benefit within the pool definition.')\n .max(64),\n }),\n});\nexport const RemoveItemsFromBenefitResponse = z.object({});\nexport const AddItemsToBenefitRequest = z.object({\n itemReferences: z\n .array(\n z.object({\n externalId: z\n .string()\n .describe('External item ID assigned by the provider.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n category: z.string().describe('Item category.').max(20).optional(),\n })\n )\n .min(1)\n .max(100),\n options: z.object({\n poolDefinitionId: z\n .string()\n .describe('ID of the pool definition associated with the benefit.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n benefitKey: z\n .string()\n .describe('Key identifying the benefit within the pool definition.')\n .max(64),\n }),\n});\nexport const AddItemsToBenefitResponse = z.object({});\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n AddItemsToBenefitOptions,\n ItemReference,\n RemoveItemsFromBenefitOptions,\n addItemsToBenefit as universalAddItemsToBenefit,\n removeItemsFromBenefit as universalRemoveItemsFromBenefit,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/benefit-programs' };\n\nexport function removeItemsFromBenefit(\n httpClient: HttpClient,\n __options?: { validateRequestSchema?: boolean }\n): RemoveItemsFromBenefitSignature {\n return (\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n RemoveItemsFromBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n ) =>\n universalRemoveItemsFromBenefit(\n itemReferences,\n options,\n // @ts-ignore\n { httpClient, validateRequestSchema: __options?.validateRequestSchema }\n );\n}\n\ninterface RemoveItemsFromBenefitSignature {\n /**\n * Removes items from a benefit's item set, resolved by pool definition ID and benefit key.\n * @param - Items to remove from the benefit's item set.\n */\n (\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n RemoveItemsFromBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n ): Promise<void>;\n}\n\nexport function addItemsToBenefit(\n httpClient: HttpClient,\n __options?: { validateRequestSchema?: boolean }\n): AddItemsToBenefitSignature {\n return (\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n AddItemsToBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n ) =>\n universalAddItemsToBenefit(\n itemReferences,\n options,\n // @ts-ignore\n { httpClient, validateRequestSchema: __options?.validateRequestSchema }\n );\n}\n\ninterface AddItemsToBenefitSignature {\n /**\n * Adds items to a benefit's item set, resolved by pool definition ID and benefit key.\n * @param - Items to add to the benefit's item set.\n */\n (\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n AddItemsToBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n ): Promise<void>;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n AddItemsToBenefitOptions,\n AddItemsToBenefitRequest,\n AddItemsToBenefitResponse,\n BenefitInfo,\n CreditConfiguration,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n IdentificationData,\n IdentificationDataIdOneOf,\n InvalidatePoolDefinitionItemsRequest,\n InvalidatePoolDefinitionItemsResponse,\n ItemInfo,\n ItemReference,\n MessageEnvelope,\n PoolDefinitionInfo,\n PoolDefinitionItem,\n PoolDefinitionItemDeactivated,\n ProgramDefinitionInfo,\n QueryPoolDefinitionItemsRequest,\n QueryPoolDefinitionItemsResponse,\n RemoveItemsFromBenefitOptions,\n RemoveItemsFromBenefitRequest,\n RemoveItemsFromBenefitResponse,\n RequestedFields,\n RestoreInfo,\n SortOrder,\n Sorting,\n WebhookIdentityType,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\n","import {\n removeItemsFromBenefit as publicRemoveItemsFromBenefit,\n addItemsToBenefit as publicAddItemsToBenefit,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const removeItemsFromBenefit: MaybeContext<\n BuildRESTFunction<typeof publicRemoveItemsFromBenefit> &\n typeof publicRemoveItemsFromBenefit\n> = /*#__PURE__*/ createRESTModule(publicRemoveItemsFromBenefit);\nexport const addItemsToBenefit: MaybeContext<\n BuildRESTFunction<typeof publicAddItemsToBenefit> &\n typeof publicAddItemsToBenefit\n> = /*#__PURE__*/ createRESTModule(publicAddItemsToBenefit);\n\nexport {\n SortOrder,\n RequestedFields,\n WebhookIdentityType,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\nexport {\n PoolDefinitionItem,\n PoolDefinitionInfo,\n CreditConfiguration,\n ProgramDefinitionInfo,\n BenefitInfo,\n ItemInfo,\n PoolDefinitionItemDeactivated,\n QueryPoolDefinitionItemsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryPoolDefinitionItemsResponse,\n CursorPagingMetadata,\n Cursors,\n InvalidatePoolDefinitionItemsRequest,\n InvalidatePoolDefinitionItemsResponse,\n RemoveItemsFromBenefitRequest,\n ItemReference,\n RemoveItemsFromBenefitResponse,\n AddItemsToBenefitRequest,\n AddItemsToBenefitResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n RemoveItemsFromBenefitOptions,\n AddItemsToBenefitOptions,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\nexport {\n SortOrderWithLiterals,\n RequestedFieldsWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,6CAA6C;;;ACDtD,SAAS,kBAAkB;AAI3B,SAAS,0EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT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AC;AAAA,QACzB,0BAA0B;AAAA,UACxB,gBAAgB;AAAA,UAChB,kBAAkB;AAAA,UAClB,YAAY;AAAA,QACd;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,kBAAkB,SAAS;AAAA,IAC9B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AGzsBO,SAASC,wBACd,YACA,WACiC;AACjC,SAAO,CACL,gBACA,YAMAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,YAAY,uBAAuB,WAAW,sBAAsB;AAAA,EACxE;AACJ;AAiBO,SAASC,mBACd,YACA,WAC4B;AAC5B,SAAO,CACL,gBACA,YAMAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,YAAY,uBAAuB,WAAW,sBAAsB;AAAA,EACxE;AACJ;;;AC5DA,SAAS,wBAAwB;AAG1B,IAAMC,0BAGK,iCAAiBA,uBAA4B;AACxD,IAAMC,qBAGK,iCAAiBA,kBAAuB;","names":["SortOrder","RequestedFields","WebhookIdentityType","removeItemsFromBenefit","addItemsToBenefit","removeItemsFromBenefit","addItemsToBenefit","removeItemsFromBenefit","addItemsToBenefit"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.universal.ts","../../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.http.ts","../../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.public.ts","../../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { renameKeysFromSDKRequestToRESTRequest } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBenefitProgramsV1PoolDefinitionItem from './benefit-programs-v1-pool-definition-item-pool-definition-items.http.js';\n// @ts-ignore\n\nexport interface PoolDefinitionItem {\n /**\n * Benefit item ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Revision number, which increments by 1 each time the benefit item is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the item.\n *\n * Ignored when creating an item.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the item was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the item was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * External item ID assigned by the provider of the items.\n *\n * For example, if the benefit items are products, this ID corresponds to the specific product ID in the supplier's system.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalId?: string;\n /**\n * Item category. Groups benefit items together for organization and management purposes. For example, classes, posts, groups.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string;\n /**\n * ID of the application providing the benefit item.\n *\n * ID of the external application supplying the items. Each item's external ID is unique to its respective provider's application.\n * @format GUID\n * @immutable\n * @readonly\n */\n providerAppId?: string;\n /**\n * Module name of the item provider's application that originated the items.\n *\n * For example, `store-inventory` or `fitness-resources`.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string;\n /**\n * Pool definition id\n * @format GUID\n * @immutable\n * @readonly\n */\n poolDefinitionId?: string;\n /**\n * Item set ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string;\n /**\n * Additional data related to the benefit item.\n * @internal\n * @readonly\n */\n poolDefinition?: PoolDefinitionInfo;\n /**\n * Program definitions associated with the pool definition.\n * @internal\n * @maxSize 20\n * @readonly\n */\n programDefinitions?: ProgramDefinitionInfo[];\n /**\n * Item set ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemId?: string;\n /**\n * Benefit information\n * @internal\n * @readonly\n */\n benefitInfo?: BenefitInfo;\n /**\n * Additional item data related to the benefit item.\n * @internal\n * @readonly\n */\n itemInfo?: ItemInfo;\n /**\n * Unique identifier for the benefit associated with this item.\n * @maxLength 64\n * @immutable\n * @readonly\n */\n benefitKey?: string;\n}\n\nexport interface PoolDefinitionInfo {\n /**\n * Pool definition name.\n * @maxLength 64\n */\n displayName?: string;\n /**\n * Pool definition description.\n * @maxLength 450\n */\n description?: string | null;\n /**\n * Credit settings.\n *\n * If this object is empty, you can't set a price for the benefit.\n */\n creditConfiguration?: CreditConfiguration;\n}\n\nexport interface CreditConfiguration {\n /**\n * Initial available amount for associated balances.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n amount?: string;\n /**\n * Credit unit display name.\n * @maxLength 32\n */\n unitDisplayName?: string | null;\n /**\n * Credit unit type.\n * @internal\n * @maxLength 16\n */\n unitType?: string | null;\n}\n\nexport interface ProgramDefinitionInfo {\n /**\n * Program definition id\n * @format GUID\n */\n _id?: string;\n /**\n * Program definition external id\n * @format GUID\n */\n externalId?: string | null;\n /**\n * Program definition name\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * Program definition description.\n * @maxLength 450\n */\n description?: string | null;\n}\n\nexport interface BenefitInfo {\n /**\n * Price of the benefit in credits. The price is the same for all of this benefit's items.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n price?: string | null;\n /**\n * Benefit name.\n * @maxLength 40\n */\n displayName?: string | null;\n /**\n * Benefit description.\n * @maxLength 255\n */\n description?: string | null;\n}\n\nexport interface ItemInfo {\n /**\n * Item display name.\n * @maxLength 64\n */\n displayName?: string | null;\n}\n\nexport interface PoolDefinitionItemDeactivated {\n /** The pool definition item that was deactivated. */\n poolDefinitionItem?: PoolDefinitionItem;\n}\n\nexport interface QueryPoolDefinitionItemsRequest {\n /** Query to select benefit items. */\n query?: CursorQuery;\n /**\n * Fields to be included in the response.\n * @maxSize 4\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 1000\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport enum RequestedFields {\n POOL_DEFINITION = 'POOL_DEFINITION',\n PROGRAM_DEFINITION = 'PROGRAM_DEFINITION',\n BENEFIT = 'BENEFIT',\n ITEM = 'ITEM',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'POOL_DEFINITION'\n | 'PROGRAM_DEFINITION'\n | 'BENEFIT'\n | 'ITEM';\n\nexport interface QueryPoolDefinitionItemsResponse {\n /** List of items. */\n poolDefinitionItems?: PoolDefinitionItem[];\n /** Metadata for paginated results. */\n metadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface InvalidatePoolDefinitionItemsRequest {\n /**\n * The pool definition ID whose items are to be invalidated\n * @format GUID\n */\n poolDefinitionId?: string;\n /**\n * List of item set ids whose items are to be invalidated\n * @maxSize 10\n * @format GUID\n */\n itemSetIds?: string[];\n}\n\nexport interface InvalidatePoolDefinitionItemsResponse {}\n\nexport interface RemoveItemsFromBenefitRequest {\n /**\n * Items to remove from the benefit's item set.\n * @minSize 1\n * @maxSize 100\n */\n itemReferences: ItemReference[];\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit within the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\nexport interface ItemReference {\n /**\n * External item ID assigned by the provider.\n * @format GUID\n */\n externalId?: string;\n /**\n * Item category.\n * @maxLength 20\n */\n category?: string;\n}\n\nexport interface RemoveItemsFromBenefitResponse {}\n\nexport interface AddItemsToBenefitRequest {\n /**\n * Items to add to the benefit's item set.\n * @minSize 1\n * @maxSize 100\n */\n itemReferences: ItemReference[];\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit within the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\nexport interface AddItemsToBenefitResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/**\n * Removes items from a benefit's item set, resolved by pool definition ID and benefit key.\n * @param itemReferences - Items to remove from the benefit's item set.\n * @public\n * @documentationMaturity preview\n * @requiredField itemReferences\n * @requiredField itemReferences.externalId\n * @requiredField options\n * @requiredField options.benefitKey\n * @requiredField options.poolDefinitionId\n * @permissionId benefit_programs:v1:pool_definition_item:remove_items_from_benefit\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.RemoveItemsFromBenefit\n */\nexport async function removeItemsFromBenefit(\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n RemoveItemsFromBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n itemReferences: itemReferences,\n poolDefinitionId: options?.poolDefinitionId,\n benefitKey: options?.benefitKey,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.removeItemsFromBenefit(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n itemReferences: '$[0]',\n poolDefinitionId: '$[1].poolDefinitionId',\n benefitKey: '$[1].benefitKey',\n },\n singleArgumentUnchanged: false,\n },\n ['itemReferences', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface RemoveItemsFromBenefitOptions {\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit within the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\n/**\n * Adds items to a benefit's item set, resolved by pool definition ID and benefit key.\n * @param itemReferences - Items to add to the benefit's item set.\n * @public\n * @documentationMaturity preview\n * @requiredField itemReferences\n * @requiredField itemReferences.externalId\n * @requiredField options\n * @requiredField options.benefitKey\n * @requiredField options.poolDefinitionId\n * @permissionId benefit_programs:v1:pool_definition_item:add_items_to_benefit\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.AddItemsToBenefit\n */\nexport async function addItemsToBenefit(\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n AddItemsToBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n itemReferences: itemReferences,\n poolDefinitionId: options?.poolDefinitionId,\n benefitKey: options?.benefitKey,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.addItemsToBenefit(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n itemReferences: '$[0]',\n poolDefinitionId: '$[1].poolDefinitionId',\n benefitKey: '$[1].benefitKey',\n },\n singleArgumentUnchanged: false,\n },\n ['itemReferences', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface AddItemsToBenefitOptions {\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit within the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n _: [\n {\n srcPath: '/_api/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_pool-definition-items';\n\n/** Removes items from a benefit's item set, resolved by pool definition ID and benefit key. */\nexport function removeItemsFromBenefit(\n payload: object\n): RequestOptionsFactory<any> {\n function __removeItemsFromBenefit({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_definition_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.RemoveItemsFromBenefit',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n {\n protoPath: '/v1/pool-definition-items/remove-items-from-benefit',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __removeItemsFromBenefit;\n}\n\n/** Adds items to a benefit's item set, resolved by pool definition ID and benefit key. */\nexport function addItemsToBenefit(payload: object): RequestOptionsFactory<any> {\n function __addItemsToBenefit({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_definition_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.AddItemsToBenefit',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n {\n protoPath: '/v1/pool-definition-items/add-items-to-benefit',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __addItemsToBenefit;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n AddItemsToBenefitOptions,\n ItemReference,\n RemoveItemsFromBenefitOptions,\n addItemsToBenefit as universalAddItemsToBenefit,\n removeItemsFromBenefit as universalRemoveItemsFromBenefit,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/benefit-programs' };\n\nexport function removeItemsFromBenefit(\n httpClient: HttpClient\n): RemoveItemsFromBenefitSignature {\n return (\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n RemoveItemsFromBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n ) =>\n universalRemoveItemsFromBenefit(\n itemReferences,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RemoveItemsFromBenefitSignature {\n /**\n * Removes items from a benefit's item set, resolved by pool definition ID and benefit key.\n * @param - Items to remove from the benefit's item set.\n */\n (\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n RemoveItemsFromBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n ): Promise<void>;\n}\n\nexport function addItemsToBenefit(\n httpClient: HttpClient\n): AddItemsToBenefitSignature {\n return (\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n AddItemsToBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n ) =>\n universalAddItemsToBenefit(\n itemReferences,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface AddItemsToBenefitSignature {\n /**\n * Adds items to a benefit's item set, resolved by pool definition ID and benefit key.\n * @param - Items to add to the benefit's item set.\n */\n (\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n AddItemsToBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n ): Promise<void>;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n AddItemsToBenefitOptions,\n AddItemsToBenefitRequest,\n AddItemsToBenefitResponse,\n BenefitInfo,\n CreditConfiguration,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n IdentificationData,\n IdentificationDataIdOneOf,\n InvalidatePoolDefinitionItemsRequest,\n InvalidatePoolDefinitionItemsResponse,\n ItemInfo,\n ItemReference,\n MessageEnvelope,\n PoolDefinitionInfo,\n PoolDefinitionItem,\n PoolDefinitionItemDeactivated,\n ProgramDefinitionInfo,\n QueryPoolDefinitionItemsRequest,\n QueryPoolDefinitionItemsResponse,\n RemoveItemsFromBenefitOptions,\n RemoveItemsFromBenefitRequest,\n RemoveItemsFromBenefitResponse,\n RequestedFields,\n RestoreInfo,\n SortOrder,\n Sorting,\n WebhookIdentityType,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\n","import {\n removeItemsFromBenefit as publicRemoveItemsFromBenefit,\n addItemsToBenefit as publicAddItemsToBenefit,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const removeItemsFromBenefit: MaybeContext<\n BuildRESTFunction<typeof publicRemoveItemsFromBenefit> &\n typeof publicRemoveItemsFromBenefit\n> = /*#__PURE__*/ createRESTModule(publicRemoveItemsFromBenefit);\nexport const addItemsToBenefit: MaybeContext<\n BuildRESTFunction<typeof publicAddItemsToBenefit> &\n typeof publicAddItemsToBenefit\n> = /*#__PURE__*/ createRESTModule(publicAddItemsToBenefit);\n\nexport {\n SortOrder,\n RequestedFields,\n WebhookIdentityType,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\nexport {\n PoolDefinitionItem,\n PoolDefinitionInfo,\n CreditConfiguration,\n ProgramDefinitionInfo,\n BenefitInfo,\n ItemInfo,\n PoolDefinitionItemDeactivated,\n QueryPoolDefinitionItemsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryPoolDefinitionItemsResponse,\n CursorPagingMetadata,\n Cursors,\n InvalidatePoolDefinitionItemsRequest,\n InvalidatePoolDefinitionItemsResponse,\n RemoveItemsFromBenefitRequest,\n ItemReference,\n RemoveItemsFromBenefitResponse,\n AddItemsToBenefitRequest,\n AddItemsToBenefitResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n RemoveItemsFromBenefitOptions,\n AddItemsToBenefitOptions,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\nexport {\n SortOrderWithLiterals,\n RequestedFieldsWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,6CAA6C;;;ACDtD,SAAS,kBAAkB;AAI3B,SAAS,0EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,uBACd,SAC4B;AAC5B,WAAS,yBAAyB,EAAE,KAAK,GAAQ;AAC/C,UAA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ACA,YAMAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAiBO,SAASC,mBACd,YAC4B;AAC5B,SAAO,CACL,gBACA,YAMAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC1DA,SAAS,wBAAwB;AAG1B,IAAMC,0BAGK,iCAAiBA,uBAA4B;AACxD,IAAMC,qBAGK,iCAAiBA,kBAAuB;","names":["SortOrder","RequestedFields","WebhookIdentityType","removeItemsFromBenefit","addItemsToBenefit","removeItemsFromBenefit","addItemsToBenefit","removeItemsFromBenefit","addItemsToBenefit"]}
|
|
@@ -75,47 +75,6 @@ function addItemsToBenefit(payload) {
|
|
|
75
75
|
return __addItemsToBenefit;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
// src/benefit-programs-v1-pool-definition-item-pool-definition-items.schemas.ts
|
|
79
|
-
import * as z from "zod";
|
|
80
|
-
var RemoveItemsFromBenefitRequest = z.object({
|
|
81
|
-
itemReferences: z.array(
|
|
82
|
-
z.object({
|
|
83
|
-
externalId: z.string().describe("External item ID assigned by the provider.").regex(
|
|
84
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
85
|
-
"Must be a valid GUID"
|
|
86
|
-
),
|
|
87
|
-
category: z.string().describe("Item category.").max(20).optional()
|
|
88
|
-
})
|
|
89
|
-
).min(1).max(100),
|
|
90
|
-
options: z.object({
|
|
91
|
-
poolDefinitionId: z.string().describe("ID of the pool definition associated with the benefit.").regex(
|
|
92
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
93
|
-
"Must be a valid GUID"
|
|
94
|
-
),
|
|
95
|
-
benefitKey: z.string().describe("Key identifying the benefit within the pool definition.").max(64)
|
|
96
|
-
})
|
|
97
|
-
});
|
|
98
|
-
var RemoveItemsFromBenefitResponse = z.object({});
|
|
99
|
-
var AddItemsToBenefitRequest = z.object({
|
|
100
|
-
itemReferences: z.array(
|
|
101
|
-
z.object({
|
|
102
|
-
externalId: z.string().describe("External item ID assigned by the provider.").regex(
|
|
103
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
104
|
-
"Must be a valid GUID"
|
|
105
|
-
),
|
|
106
|
-
category: z.string().describe("Item category.").max(20).optional()
|
|
107
|
-
})
|
|
108
|
-
).min(1).max(100),
|
|
109
|
-
options: z.object({
|
|
110
|
-
poolDefinitionId: z.string().describe("ID of the pool definition associated with the benefit.").regex(
|
|
111
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
112
|
-
"Must be a valid GUID"
|
|
113
|
-
),
|
|
114
|
-
benefitKey: z.string().describe("Key identifying the benefit within the pool definition.").max(64)
|
|
115
|
-
})
|
|
116
|
-
});
|
|
117
|
-
var AddItemsToBenefitResponse = z.object({});
|
|
118
|
-
|
|
119
78
|
// src/benefit-programs-v1-pool-definition-item-pool-definition-items.universal.ts
|
|
120
79
|
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
121
80
|
SortOrder2["ASC"] = "ASC";
|
|
@@ -138,10 +97,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
138
97
|
return WebhookIdentityType2;
|
|
139
98
|
})(WebhookIdentityType || {});
|
|
140
99
|
async function removeItemsFromBenefit2(itemReferences, options) {
|
|
141
|
-
const { httpClient, sideEffects
|
|
142
|
-
if (validateRequestSchema) {
|
|
143
|
-
RemoveItemsFromBenefitRequest.parse({ itemReferences, options });
|
|
144
|
-
}
|
|
100
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
145
101
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
146
102
|
itemReferences,
|
|
147
103
|
poolDefinitionId: options?.poolDefinitionId,
|
|
@@ -173,10 +129,7 @@ async function removeItemsFromBenefit2(itemReferences, options) {
|
|
|
173
129
|
}
|
|
174
130
|
}
|
|
175
131
|
async function addItemsToBenefit2(itemReferences, options) {
|
|
176
|
-
const { httpClient, sideEffects
|
|
177
|
-
if (validateRequestSchema) {
|
|
178
|
-
AddItemsToBenefitRequest.parse({ itemReferences, options });
|
|
179
|
-
}
|
|
132
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
180
133
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
181
134
|
itemReferences,
|
|
182
135
|
poolDefinitionId: options?.poolDefinitionId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.universal.ts","../../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.http.ts","../../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.schemas.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { renameKeysFromSDKRequestToRESTRequest } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBenefitProgramsV1PoolDefinitionItem from './benefit-programs-v1-pool-definition-item-pool-definition-items.http.js';\n// @ts-ignore\nimport {\n RemoveItemsFromBenefitRequest as RemoveItemsFromBenefitRequestSchema,\n AddItemsToBenefitRequest as AddItemsToBenefitRequestSchema,\n} from './benefit-programs-v1-pool-definition-item-pool-definition-items.schemas.js';\n\nexport interface PoolDefinitionItem {\n /**\n * Benefit item ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Revision number, which increments by 1 each time the benefit item is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the item.\n *\n * Ignored when creating an item.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the item was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the item was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * External item ID assigned by the provider of the items.\n *\n * For example, if the benefit items are products, this ID corresponds to the specific product ID in the supplier's system.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalId?: string;\n /**\n * Item category. Groups benefit items together for organization and management purposes. For example, classes, posts, groups.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string;\n /**\n * ID of the application providing the benefit item.\n *\n * ID of the external application supplying the items. Each item's external ID is unique to its respective provider's application.\n * @format GUID\n * @immutable\n * @readonly\n */\n providerAppId?: string;\n /**\n * Module name of the item provider's application that originated the items.\n *\n * For example, `store-inventory` or `fitness-resources`.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string;\n /**\n * Pool definition id\n * @format GUID\n * @immutable\n * @readonly\n */\n poolDefinitionId?: string;\n /**\n * Item set ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string;\n /**\n * Additional data related to the benefit item.\n * @internal\n * @readonly\n */\n poolDefinition?: PoolDefinitionInfo;\n /**\n * Program definitions associated with the pool definition.\n * @internal\n * @maxSize 20\n * @readonly\n */\n programDefinitions?: ProgramDefinitionInfo[];\n /**\n * Item set ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemId?: string;\n /**\n * Benefit information\n * @internal\n * @readonly\n */\n benefitInfo?: BenefitInfo;\n /**\n * Additional item data related to the benefit item.\n * @internal\n * @readonly\n */\n itemInfo?: ItemInfo;\n /**\n * Unique identifier for the benefit associated with this item.\n * @maxLength 64\n * @immutable\n * @readonly\n */\n benefitKey?: string;\n}\n\nexport interface PoolDefinitionInfo {\n /**\n * Pool definition name.\n * @maxLength 64\n */\n displayName?: string;\n /**\n * Pool definition description.\n * @maxLength 450\n */\n description?: string | null;\n /**\n * Credit settings.\n *\n * If this object is empty, you can't set a price for the benefit.\n */\n creditConfiguration?: CreditConfiguration;\n}\n\nexport interface CreditConfiguration {\n /**\n * Initial available amount for associated balances.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n amount?: string;\n /**\n * Credit unit display name.\n * @maxLength 32\n */\n unitDisplayName?: string | null;\n /**\n * Credit unit type.\n * @internal\n * @maxLength 16\n */\n unitType?: string | null;\n}\n\nexport interface ProgramDefinitionInfo {\n /**\n * Program definition id\n * @format GUID\n */\n _id?: string;\n /**\n * Program definition external id\n * @format GUID\n */\n externalId?: string | null;\n /**\n * Program definition name\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * Program definition description.\n * @maxLength 450\n */\n description?: string | null;\n}\n\nexport interface BenefitInfo {\n /**\n * Price of the benefit in credits. The price is the same for all of this benefit's items.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n price?: string | null;\n /**\n * Benefit name.\n * @maxLength 40\n */\n displayName?: string | null;\n /**\n * Benefit description.\n * @maxLength 255\n */\n description?: string | null;\n}\n\nexport interface ItemInfo {\n /**\n * Item display name.\n * @maxLength 64\n */\n displayName?: string | null;\n}\n\nexport interface PoolDefinitionItemDeactivated {\n /** The pool definition item that was deactivated. */\n poolDefinitionItem?: PoolDefinitionItem;\n}\n\nexport interface QueryPoolDefinitionItemsRequest {\n /** Query to select benefit items. */\n query?: CursorQuery;\n /**\n * Fields to be included in the response.\n * @maxSize 4\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 1000\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport enum RequestedFields {\n POOL_DEFINITION = 'POOL_DEFINITION',\n PROGRAM_DEFINITION = 'PROGRAM_DEFINITION',\n BENEFIT = 'BENEFIT',\n ITEM = 'ITEM',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'POOL_DEFINITION'\n | 'PROGRAM_DEFINITION'\n | 'BENEFIT'\n | 'ITEM';\n\nexport interface QueryPoolDefinitionItemsResponse {\n /** List of items. */\n poolDefinitionItems?: PoolDefinitionItem[];\n /** Metadata for paginated results. */\n metadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface InvalidatePoolDefinitionItemsRequest {\n /**\n * The pool definition ID whose items are to be invalidated\n * @format GUID\n */\n poolDefinitionId?: string;\n /**\n * List of item set ids whose items are to be invalidated\n * @maxSize 10\n * @format GUID\n */\n itemSetIds?: string[];\n}\n\nexport interface InvalidatePoolDefinitionItemsResponse {}\n\nexport interface RemoveItemsFromBenefitRequest {\n /**\n * Items to remove from the benefit's item set.\n * @minSize 1\n * @maxSize 100\n */\n itemReferences: ItemReference[];\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit within the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\nexport interface ItemReference {\n /**\n * External item ID assigned by the provider.\n * @format GUID\n */\n externalId?: string;\n /**\n * Item category.\n * @maxLength 20\n */\n category?: string;\n}\n\nexport interface RemoveItemsFromBenefitResponse {}\n\nexport interface AddItemsToBenefitRequest {\n /**\n * Items to add to the benefit's item set.\n * @minSize 1\n * @maxSize 100\n */\n itemReferences: ItemReference[];\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit within the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\nexport interface AddItemsToBenefitResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/**\n * Removes items from a benefit's item set, resolved by pool definition ID and benefit key.\n * @param itemReferences - Items to remove from the benefit's item set.\n * @public\n * @documentationMaturity preview\n * @requiredField itemReferences\n * @requiredField itemReferences.externalId\n * @requiredField options\n * @requiredField options.benefitKey\n * @requiredField options.poolDefinitionId\n * @permissionId benefit_programs:v1:pool_definition_item:remove_items_from_benefit\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.RemoveItemsFromBenefit\n */\nexport async function removeItemsFromBenefit(\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n RemoveItemsFromBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects, validateRequestSchema } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n validateRequestSchema?: boolean;\n };\n\n if (validateRequestSchema) {\n RemoveItemsFromBenefitRequestSchema.parse({ itemReferences, options });\n }\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n itemReferences: itemReferences,\n poolDefinitionId: options?.poolDefinitionId,\n benefitKey: options?.benefitKey,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.removeItemsFromBenefit(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n itemReferences: '$[0]',\n poolDefinitionId: '$[1].poolDefinitionId',\n benefitKey: '$[1].benefitKey',\n },\n singleArgumentUnchanged: false,\n },\n ['itemReferences', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface RemoveItemsFromBenefitOptions {\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit within the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\n/**\n * Adds items to a benefit's item set, resolved by pool definition ID and benefit key.\n * @param itemReferences - Items to add to the benefit's item set.\n * @public\n * @documentationMaturity preview\n * @requiredField itemReferences\n * @requiredField itemReferences.externalId\n * @requiredField options\n * @requiredField options.benefitKey\n * @requiredField options.poolDefinitionId\n * @permissionId benefit_programs:v1:pool_definition_item:add_items_to_benefit\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.AddItemsToBenefit\n */\nexport async function addItemsToBenefit(\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n AddItemsToBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects, validateRequestSchema } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n validateRequestSchema?: boolean;\n };\n\n if (validateRequestSchema) {\n AddItemsToBenefitRequestSchema.parse({ itemReferences, options });\n }\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n itemReferences: itemReferences,\n poolDefinitionId: options?.poolDefinitionId,\n benefitKey: options?.benefitKey,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.addItemsToBenefit(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n itemReferences: '$[0]',\n poolDefinitionId: '$[1].poolDefinitionId',\n benefitKey: '$[1].benefitKey',\n },\n singleArgumentUnchanged: false,\n },\n ['itemReferences', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface AddItemsToBenefitOptions {\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit within the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n _: [\n {\n srcPath: '/_api/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_pool-definition-items';\n\n/** Removes items from a benefit's item set, resolved by pool definition ID and benefit key. */\nexport function removeItemsFromBenefit(\n payload: object\n): RequestOptionsFactory<any> {\n function __removeItemsFromBenefit({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_definition_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.RemoveItemsFromBenefit',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n {\n protoPath: '/v1/pool-definition-items/remove-items-from-benefit',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __removeItemsFromBenefit;\n}\n\n/** Adds items to a benefit's item set, resolved by pool definition ID and benefit key. */\nexport function addItemsToBenefit(payload: object): RequestOptionsFactory<any> {\n function __addItemsToBenefit({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_definition_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.AddItemsToBenefit',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n {\n protoPath: '/v1/pool-definition-items/add-items-to-benefit',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __addItemsToBenefit;\n}\n","import * as z from 'zod';\n\nexport const RemoveItemsFromBenefitRequest = z.object({\n itemReferences: z\n .array(\n z.object({\n externalId: z\n .string()\n .describe('External item ID assigned by the provider.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n category: z.string().describe('Item category.').max(20).optional(),\n })\n )\n .min(1)\n .max(100),\n options: z.object({\n poolDefinitionId: z\n .string()\n .describe('ID of the pool definition associated with the benefit.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n benefitKey: z\n .string()\n .describe('Key identifying the benefit within the pool definition.')\n .max(64),\n }),\n});\nexport const RemoveItemsFromBenefitResponse = z.object({});\nexport const AddItemsToBenefitRequest = z.object({\n itemReferences: z\n .array(\n z.object({\n externalId: z\n .string()\n .describe('External item ID assigned by the provider.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n category: z.string().describe('Item category.').max(20).optional(),\n })\n )\n .min(1)\n .max(100),\n options: z.object({\n poolDefinitionId: z\n .string()\n .describe('ID of the pool definition associated with the benefit.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n benefitKey: z\n .string()\n .describe('Key identifying the benefit within the pool definition.')\n .max(64),\n }),\n});\nexport const AddItemsToBenefitResponse = z.object({});\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,6CAA6C;;;ACDtD,SAAS,kBAAkB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;AAE5E,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAAA,EACjC,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,gBAAgB;AAAA,UAChB,kBAAkB;AAAA,UAClB,YAAY;AAAA,QACd;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,kBAAkB,SAAS;AAAA,IAC9B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["SortOrder","RequestedFields","WebhookIdentityType","removeItemsFromBenefit","addItemsToBenefit"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.universal.ts","../../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { renameKeysFromSDKRequestToRESTRequest } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBenefitProgramsV1PoolDefinitionItem from './benefit-programs-v1-pool-definition-item-pool-definition-items.http.js';\n// @ts-ignore\n\nexport interface PoolDefinitionItem {\n /**\n * Benefit item ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Revision number, which increments by 1 each time the benefit item is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the item.\n *\n * Ignored when creating an item.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the item was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the item was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * External item ID assigned by the provider of the items.\n *\n * For example, if the benefit items are products, this ID corresponds to the specific product ID in the supplier's system.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalId?: string;\n /**\n * Item category. Groups benefit items together for organization and management purposes. For example, classes, posts, groups.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string;\n /**\n * ID of the application providing the benefit item.\n *\n * ID of the external application supplying the items. Each item's external ID is unique to its respective provider's application.\n * @format GUID\n * @immutable\n * @readonly\n */\n providerAppId?: string;\n /**\n * Module name of the item provider's application that originated the items.\n *\n * For example, `store-inventory` or `fitness-resources`.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string;\n /**\n * Pool definition id\n * @format GUID\n * @immutable\n * @readonly\n */\n poolDefinitionId?: string;\n /**\n * Item set ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string;\n /**\n * Additional data related to the benefit item.\n * @internal\n * @readonly\n */\n poolDefinition?: PoolDefinitionInfo;\n /**\n * Program definitions associated with the pool definition.\n * @internal\n * @maxSize 20\n * @readonly\n */\n programDefinitions?: ProgramDefinitionInfo[];\n /**\n * Item set ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemId?: string;\n /**\n * Benefit information\n * @internal\n * @readonly\n */\n benefitInfo?: BenefitInfo;\n /**\n * Additional item data related to the benefit item.\n * @internal\n * @readonly\n */\n itemInfo?: ItemInfo;\n /**\n * Unique identifier for the benefit associated with this item.\n * @maxLength 64\n * @immutable\n * @readonly\n */\n benefitKey?: string;\n}\n\nexport interface PoolDefinitionInfo {\n /**\n * Pool definition name.\n * @maxLength 64\n */\n displayName?: string;\n /**\n * Pool definition description.\n * @maxLength 450\n */\n description?: string | null;\n /**\n * Credit settings.\n *\n * If this object is empty, you can't set a price for the benefit.\n */\n creditConfiguration?: CreditConfiguration;\n}\n\nexport interface CreditConfiguration {\n /**\n * Initial available amount for associated balances.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n amount?: string;\n /**\n * Credit unit display name.\n * @maxLength 32\n */\n unitDisplayName?: string | null;\n /**\n * Credit unit type.\n * @internal\n * @maxLength 16\n */\n unitType?: string | null;\n}\n\nexport interface ProgramDefinitionInfo {\n /**\n * Program definition id\n * @format GUID\n */\n _id?: string;\n /**\n * Program definition external id\n * @format GUID\n */\n externalId?: string | null;\n /**\n * Program definition name\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * Program definition description.\n * @maxLength 450\n */\n description?: string | null;\n}\n\nexport interface BenefitInfo {\n /**\n * Price of the benefit in credits. The price is the same for all of this benefit's items.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n price?: string | null;\n /**\n * Benefit name.\n * @maxLength 40\n */\n displayName?: string | null;\n /**\n * Benefit description.\n * @maxLength 255\n */\n description?: string | null;\n}\n\nexport interface ItemInfo {\n /**\n * Item display name.\n * @maxLength 64\n */\n displayName?: string | null;\n}\n\nexport interface PoolDefinitionItemDeactivated {\n /** The pool definition item that was deactivated. */\n poolDefinitionItem?: PoolDefinitionItem;\n}\n\nexport interface QueryPoolDefinitionItemsRequest {\n /** Query to select benefit items. */\n query?: CursorQuery;\n /**\n * Fields to be included in the response.\n * @maxSize 4\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 1000\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport enum RequestedFields {\n POOL_DEFINITION = 'POOL_DEFINITION',\n PROGRAM_DEFINITION = 'PROGRAM_DEFINITION',\n BENEFIT = 'BENEFIT',\n ITEM = 'ITEM',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'POOL_DEFINITION'\n | 'PROGRAM_DEFINITION'\n | 'BENEFIT'\n | 'ITEM';\n\nexport interface QueryPoolDefinitionItemsResponse {\n /** List of items. */\n poolDefinitionItems?: PoolDefinitionItem[];\n /** Metadata for paginated results. */\n metadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface InvalidatePoolDefinitionItemsRequest {\n /**\n * The pool definition ID whose items are to be invalidated\n * @format GUID\n */\n poolDefinitionId?: string;\n /**\n * List of item set ids whose items are to be invalidated\n * @maxSize 10\n * @format GUID\n */\n itemSetIds?: string[];\n}\n\nexport interface InvalidatePoolDefinitionItemsResponse {}\n\nexport interface RemoveItemsFromBenefitRequest {\n /**\n * Items to remove from the benefit's item set.\n * @minSize 1\n * @maxSize 100\n */\n itemReferences: ItemReference[];\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit within the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\nexport interface ItemReference {\n /**\n * External item ID assigned by the provider.\n * @format GUID\n */\n externalId?: string;\n /**\n * Item category.\n * @maxLength 20\n */\n category?: string;\n}\n\nexport interface RemoveItemsFromBenefitResponse {}\n\nexport interface AddItemsToBenefitRequest {\n /**\n * Items to add to the benefit's item set.\n * @minSize 1\n * @maxSize 100\n */\n itemReferences: ItemReference[];\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit within the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\nexport interface AddItemsToBenefitResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/**\n * Removes items from a benefit's item set, resolved by pool definition ID and benefit key.\n * @param itemReferences - Items to remove from the benefit's item set.\n * @public\n * @documentationMaturity preview\n * @requiredField itemReferences\n * @requiredField itemReferences.externalId\n * @requiredField options\n * @requiredField options.benefitKey\n * @requiredField options.poolDefinitionId\n * @permissionId benefit_programs:v1:pool_definition_item:remove_items_from_benefit\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.RemoveItemsFromBenefit\n */\nexport async function removeItemsFromBenefit(\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n RemoveItemsFromBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n itemReferences: itemReferences,\n poolDefinitionId: options?.poolDefinitionId,\n benefitKey: options?.benefitKey,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.removeItemsFromBenefit(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n itemReferences: '$[0]',\n poolDefinitionId: '$[1].poolDefinitionId',\n benefitKey: '$[1].benefitKey',\n },\n singleArgumentUnchanged: false,\n },\n ['itemReferences', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface RemoveItemsFromBenefitOptions {\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit within the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n\n/**\n * Adds items to a benefit's item set, resolved by pool definition ID and benefit key.\n * @param itemReferences - Items to add to the benefit's item set.\n * @public\n * @documentationMaturity preview\n * @requiredField itemReferences\n * @requiredField itemReferences.externalId\n * @requiredField options\n * @requiredField options.benefitKey\n * @requiredField options.poolDefinitionId\n * @permissionId benefit_programs:v1:pool_definition_item:add_items_to_benefit\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.AddItemsToBenefit\n */\nexport async function addItemsToBenefit(\n itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[],\n options: NonNullablePaths<\n AddItemsToBenefitOptions,\n `benefitKey` | `poolDefinitionId`,\n 2\n >\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n itemReferences: itemReferences,\n poolDefinitionId: options?.poolDefinitionId,\n benefitKey: options?.benefitKey,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1PoolDefinitionItem.addItemsToBenefit(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n itemReferences: '$[0]',\n poolDefinitionId: '$[1].poolDefinitionId',\n benefitKey: '$[1].benefitKey',\n },\n singleArgumentUnchanged: false,\n },\n ['itemReferences', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface AddItemsToBenefitOptions {\n /**\n * ID of the pool definition associated with the benefit.\n * @format GUID\n */\n poolDefinitionId: string;\n /**\n * Key identifying the benefit within the pool definition.\n * @maxLength 64\n */\n benefitKey: string;\n}\n","import { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n _: [\n {\n srcPath: '/_api/benefit-programs/v1/pool-definition-items',\n destPath: '/v1/pool-definition-items',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_pool-definition-items';\n\n/** Removes items from a benefit's item set, resolved by pool definition ID and benefit key. */\nexport function removeItemsFromBenefit(\n payload: object\n): RequestOptionsFactory<any> {\n function __removeItemsFromBenefit({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_definition_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.RemoveItemsFromBenefit',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n {\n protoPath: '/v1/pool-definition-items/remove-items-from-benefit',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __removeItemsFromBenefit;\n}\n\n/** Adds items to a benefit's item set, resolved by pool definition ID and benefit key. */\nexport function addItemsToBenefit(payload: object): RequestOptionsFactory<any> {\n function __addItemsToBenefit({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_definition_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.AddItemsToBenefit',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(\n {\n protoPath: '/v1/pool-definition-items/add-items-to-benefit',\n data: payload,\n host,\n }\n ),\n data: payload,\n };\n\n return metadata;\n }\n\n return __addItemsToBenefit;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,6CAA6C;;;ACDtD,SAAS,kBAAkB;AAI3B,SAAS,0EACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,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AY;AAAA,QACd;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,kBAAkB,SAAS;AAAA,IAC9B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["SortOrder","RequestedFields","WebhookIdentityType","removeItemsFromBenefit","addItemsToBenefit"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/auto_sdk_benefit-programs_pool-definition-items",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"fqdn": "wix.benefit_programs.v1.pool_definition_item"
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
|
-
"falconPackageHash": "
|
|
60
|
+
"falconPackageHash": "6ec5f5b840aa329ac36bbec61e5e11df80496d4dacfb96c7cb9e706c"
|
|
61
61
|
}
|