@wix/auto_sdk_benefit-programs_items 1.0.33 → 1.0.35
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 +8 -21
- package/build/cjs/index.js +43 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +11 -35
- package/build/cjs/index.typings.js +25 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +8 -21
- package/build/es/index.mjs +43 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +11 -35
- package/build/es/index.typings.mjs +24 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +8 -21
- package/build/internal/cjs/index.js +43 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +11 -35
- package/build/internal/cjs/index.typings.js +25 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +8 -21
- package/build/internal/es/index.mjs +43 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +11 -35
- package/build/internal/es/index.typings.mjs +24 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -664,7 +664,6 @@ type CountItemsApplicationErrors = {
|
|
|
664
664
|
* Creates a benefit item.
|
|
665
665
|
* @param item - Item to create.
|
|
666
666
|
* @public
|
|
667
|
-
* @documentationMaturity preview
|
|
668
667
|
* @requiredField item
|
|
669
668
|
* @requiredField item.externalId
|
|
670
669
|
* @requiredField item.itemSetId
|
|
@@ -680,7 +679,6 @@ declare function createItem(item: NonNullablePaths<Item, `externalId` | `itemSet
|
|
|
680
679
|
* Creates benefit items.
|
|
681
680
|
* @param items - Items to create.
|
|
682
681
|
* @public
|
|
683
|
-
* @documentationMaturity preview
|
|
684
682
|
* @requiredField items
|
|
685
683
|
* @requiredField items.externalId
|
|
686
684
|
* @requiredField items.itemSetId
|
|
@@ -709,7 +707,6 @@ interface BulkCreateItemsOptions {
|
|
|
709
707
|
* </blockquote>
|
|
710
708
|
* @param itemId - Item ID.
|
|
711
709
|
* @public
|
|
712
|
-
* @documentationMaturity preview
|
|
713
710
|
* @requiredField itemId
|
|
714
711
|
* @permissionId BENEFIT_PROGRAMS.ITEM_DELETE
|
|
715
712
|
* @applicableIdentity APP
|
|
@@ -726,7 +723,6 @@ declare function deleteItem(itemId: string): Promise<void>;
|
|
|
726
723
|
* </blockquote>
|
|
727
724
|
* @param itemIds - List of IDs of the items to delete.
|
|
728
725
|
* @public
|
|
729
|
-
* @documentationMaturity preview
|
|
730
726
|
* @requiredField itemIds
|
|
731
727
|
* @permissionId BENEFIT_PROGRAMS.ITEM_DELETE
|
|
732
728
|
* @applicableIdentity APP
|
|
@@ -745,7 +741,6 @@ declare function bulkDeleteItems(itemIds: string[]): Promise<NonNullablePaths<Bu
|
|
|
745
741
|
* </blockquote>
|
|
746
742
|
* @param namespace - Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.
|
|
747
743
|
* @public
|
|
748
|
-
* @documentationMaturity preview
|
|
749
744
|
* @requiredField namespace
|
|
750
745
|
* @permissionId BENEFIT_PROGRAMS.ITEM_DELETE
|
|
751
746
|
* @applicableIdentity APP
|
|
@@ -766,7 +761,6 @@ interface BulkDeleteItemsByFilterOptions {
|
|
|
766
761
|
* and prevents unintended overwrites.
|
|
767
762
|
* @param _id - Benefit item ID.
|
|
768
763
|
* @public
|
|
769
|
-
* @documentationMaturity preview
|
|
770
764
|
* @requiredField _id
|
|
771
765
|
* @requiredField item
|
|
772
766
|
* @requiredField item.revision
|
|
@@ -860,7 +854,6 @@ interface UpdateItem {
|
|
|
860
854
|
* This ensures you're working with the latest benefit item
|
|
861
855
|
* and prevents unintended overwrites.
|
|
862
856
|
* @public
|
|
863
|
-
* @documentationMaturity preview
|
|
864
857
|
* @requiredField options.items.item
|
|
865
858
|
* @requiredField options.items.item._id
|
|
866
859
|
* @requiredField options.items.item.revision
|
|
@@ -887,7 +880,6 @@ interface BulkUpdateItemsOptions {
|
|
|
887
880
|
* Retrieves a benefit item.
|
|
888
881
|
* @param itemId - ID of the item to retrieve.
|
|
889
882
|
* @public
|
|
890
|
-
* @documentationMaturity preview
|
|
891
883
|
* @requiredField itemId
|
|
892
884
|
* @permissionId BENEFIT_PROGRAMS.ITEM_READ
|
|
893
885
|
* @applicableIdentity APP
|
|
@@ -898,7 +890,6 @@ declare function getItem(itemId: string): Promise<Item>;
|
|
|
898
890
|
/**
|
|
899
891
|
* Retrieves a list of up to 1000 benefit items.
|
|
900
892
|
* @public
|
|
901
|
-
* @documentationMaturity preview
|
|
902
893
|
* @permissionId BENEFIT_PROGRAMS.ITEM_READ
|
|
903
894
|
* @applicableIdentity APP
|
|
904
895
|
* @fqn wix.benefit_programs.v1.item.ItemService.ListItems
|
|
@@ -923,7 +914,6 @@ interface ListItemsOptions {
|
|
|
923
914
|
*
|
|
924
915
|
* For a full description of the item object, see the object returned for the `items` property in `ItemsQueryResult`.
|
|
925
916
|
* @public
|
|
926
|
-
* @documentationMaturity preview
|
|
927
917
|
* @permissionId BENEFIT_PROGRAMS.ITEM_READ
|
|
928
918
|
* @applicableIdentity APP
|
|
929
919
|
* @fqn wix.benefit_programs.v1.item.ItemService.QueryItems
|
|
@@ -945,73 +935,59 @@ interface ItemsQueryResult extends QueryCursorResult {
|
|
|
945
935
|
interface ItemsQueryBuilder {
|
|
946
936
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
947
937
|
* @param value - Value to compare against.
|
|
948
|
-
* @documentationMaturity preview
|
|
949
938
|
*/
|
|
950
939
|
eq: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'itemSetId' | 'providerAppId' | 'namespace', value: any) => ItemsQueryBuilder;
|
|
951
940
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
952
941
|
* @param value - Value to compare against.
|
|
953
|
-
* @documentationMaturity preview
|
|
954
942
|
*/
|
|
955
943
|
ne: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'itemSetId' | 'providerAppId' | 'namespace', value: any) => ItemsQueryBuilder;
|
|
956
944
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
957
945
|
* @param value - Value to compare against.
|
|
958
|
-
* @documentationMaturity preview
|
|
959
946
|
*/
|
|
960
947
|
ge: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'itemSetId' | 'providerAppId' | 'namespace', value: any) => ItemsQueryBuilder;
|
|
961
948
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
962
949
|
* @param value - Value to compare against.
|
|
963
|
-
* @documentationMaturity preview
|
|
964
950
|
*/
|
|
965
951
|
gt: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'itemSetId' | 'providerAppId' | 'namespace', value: any) => ItemsQueryBuilder;
|
|
966
952
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
967
953
|
* @param value - Value to compare against.
|
|
968
|
-
* @documentationMaturity preview
|
|
969
954
|
*/
|
|
970
955
|
le: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'itemSetId' | 'providerAppId' | 'namespace', value: any) => ItemsQueryBuilder;
|
|
971
956
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
972
957
|
* @param value - Value to compare against.
|
|
973
|
-
* @documentationMaturity preview
|
|
974
958
|
*/
|
|
975
959
|
lt: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'itemSetId' | 'providerAppId' | 'namespace', value: any) => ItemsQueryBuilder;
|
|
976
960
|
/** @param propertyName - Property whose value is compared with `string`.
|
|
977
961
|
* @param string - String to compare against. Case-insensitive.
|
|
978
|
-
* @documentationMaturity preview
|
|
979
962
|
*/
|
|
980
963
|
startsWith: (propertyName: '_id' | 'externalId' | 'category' | 'itemSetId' | 'providerAppId' | 'namespace', value: string) => ItemsQueryBuilder;
|
|
981
964
|
/** @param propertyName - Property whose value is compared with `values`.
|
|
982
965
|
* @param values - List of values to compare against.
|
|
983
|
-
* @documentationMaturity preview
|
|
984
966
|
*/
|
|
985
967
|
hasSome: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'itemSetId' | 'providerAppId' | 'namespace', value: any[]) => ItemsQueryBuilder;
|
|
986
|
-
/** @documentationMaturity preview */
|
|
987
968
|
in: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'itemSetId' | 'providerAppId' | 'namespace', value: any) => ItemsQueryBuilder;
|
|
988
|
-
/** @documentationMaturity preview */
|
|
989
969
|
exists: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'itemSetId' | 'providerAppId' | 'namespace', value: boolean) => ItemsQueryBuilder;
|
|
990
|
-
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
991
|
-
* @documentationMaturity preview
|
|
992
|
-
*/
|
|
970
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
993
971
|
ascending: (...propertyNames: Array<'_id' | '_createdDate' | 'externalId' | 'category' | 'itemSetId' | 'providerAppId' | 'namespace'>) => ItemsQueryBuilder;
|
|
994
|
-
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
995
|
-
* @documentationMaturity preview
|
|
996
|
-
*/
|
|
972
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
997
973
|
descending: (...propertyNames: Array<'_id' | '_createdDate' | 'externalId' | 'category' | 'itemSetId' | 'providerAppId' | 'namespace'>) => ItemsQueryBuilder;
|
|
998
|
-
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
999
|
-
* @documentationMaturity preview
|
|
1000
|
-
*/
|
|
974
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
|
|
1001
975
|
limit: (limit: number) => ItemsQueryBuilder;
|
|
1002
|
-
/** @param cursor - A pointer to specific record
|
|
1003
|
-
* @documentationMaturity preview
|
|
1004
|
-
*/
|
|
976
|
+
/** @param cursor - A pointer to specific record */
|
|
1005
977
|
skipTo: (cursor: string) => ItemsQueryBuilder;
|
|
1006
|
-
/** @documentationMaturity preview */
|
|
1007
978
|
find: () => Promise<ItemsQueryResult>;
|
|
1008
979
|
}
|
|
980
|
+
/**
|
|
981
|
+
* @hidden
|
|
982
|
+
* @fqn wix.benefit_programs.v1.item.ItemService.QueryItems
|
|
983
|
+
* @requiredField query
|
|
984
|
+
*/
|
|
985
|
+
declare function typedQueryItems(query: CursorQuery): Promise<NonNullablePaths<QueryItemsResponse, `items`, 2>>;
|
|
1009
986
|
/**
|
|
1010
987
|
* Counts how many benefit items exist that fulfill the specified filtering conditions.
|
|
1011
988
|
*
|
|
1012
989
|
* For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).
|
|
1013
990
|
* @public
|
|
1014
|
-
* @documentationMaturity preview
|
|
1015
991
|
* @permissionId BENEFIT_PROGRAMS.ITEM_READ
|
|
1016
992
|
* @applicableIdentity APP
|
|
1017
993
|
* @fqn wix.benefit_programs.v1.item.ItemService.CountItems
|
|
@@ -1028,4 +1004,4 @@ interface CountItemsOptions {
|
|
|
1028
1004
|
filter?: Record<string, any> | null;
|
|
1029
1005
|
}
|
|
1030
1006
|
|
|
1031
|
-
export { type ActionEvent, type AllocateItemSetsRequest, type AllocateItemSetsResponse, type ApplicationError, type BulkActionMetadata, type BulkCloneItemSetsRequest, type BulkCloneItemSetsResponse, type BulkCloneItemSetsResult, type BulkCreateItemsOptions, type BulkCreateItemsRequest, type BulkCreateItemsResponse, type BulkDeleteItemsByFilterOptions, type BulkDeleteItemsByFilterRequest, type BulkDeleteItemsByFilterResponse, type BulkDeleteItemsRequest, type BulkDeleteItemsResponse, type BulkItemResult, type BulkUpdateItemsOptions, type BulkUpdateItemsRequest, type BulkUpdateItemsResponse, type ByItemSetIdAndReference, type ByItemSetIdAndReferenceFilter, type ByReference, type ByReferenceFilter, type CloneItemsRequest, type CloneItemsResponse, type CountItemsApplicationErrors, type CountItemsOptions, type CountItemsRequest, type CountItemsResponse, type CreateItemRequest, type CreateItemResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteItemRequest, type DeleteItemResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type Filter, type FilterFilterOneOf, type GetItemRequest, type GetItemResponse, type IdentificationData, type IdentificationDataIdOneOf, type Item, type ItemMetadata, type ItemsCloned, type ItemsQueryBuilder, type ItemsQueryResult, type ListItemsOptions, type ListItemsRequest, type ListItemsResponse, type MaskedItem, type MessageEnvelope, type QueryItemsRequest, type QueryItemsResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, Type, type TypeWithLiterals, type UpdateItem, type UpdateItemRequest, type UpdateItemResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateItems, bulkDeleteItems, bulkDeleteItemsByFilter, bulkUpdateItems, countItems, createItem, deleteItem, getItem, listItems, queryItems, updateItem };
|
|
1007
|
+
export { type ActionEvent, type AllocateItemSetsRequest, type AllocateItemSetsResponse, type ApplicationError, type BulkActionMetadata, type BulkCloneItemSetsRequest, type BulkCloneItemSetsResponse, type BulkCloneItemSetsResult, type BulkCreateItemsOptions, type BulkCreateItemsRequest, type BulkCreateItemsResponse, type BulkDeleteItemsByFilterOptions, type BulkDeleteItemsByFilterRequest, type BulkDeleteItemsByFilterResponse, type BulkDeleteItemsRequest, type BulkDeleteItemsResponse, type BulkItemResult, type BulkUpdateItemsOptions, type BulkUpdateItemsRequest, type BulkUpdateItemsResponse, type ByItemSetIdAndReference, type ByItemSetIdAndReferenceFilter, type ByReference, type ByReferenceFilter, type CloneItemsRequest, type CloneItemsResponse, type CountItemsApplicationErrors, type CountItemsOptions, type CountItemsRequest, type CountItemsResponse, type CreateItemRequest, type CreateItemResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteItemRequest, type DeleteItemResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type Filter, type FilterFilterOneOf, type GetItemRequest, type GetItemResponse, type IdentificationData, type IdentificationDataIdOneOf, type Item, type ItemMetadata, type ItemsCloned, type ItemsQueryBuilder, type ItemsQueryResult, type ListItemsOptions, type ListItemsRequest, type ListItemsResponse, type MaskedItem, type MessageEnvelope, type QueryItemsRequest, type QueryItemsResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, Type, type TypeWithLiterals, type UpdateItem, type UpdateItemRequest, type UpdateItemResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkCreateItems, bulkDeleteItems, bulkDeleteItemsByFilter, bulkUpdateItems, countItems, createItem, deleteItem, getItem, listItems, queryItems, typedQueryItems, updateItem };
|
|
@@ -766,6 +766,29 @@ function queryItems2() {
|
|
|
766
766
|
transformationPaths: {}
|
|
767
767
|
});
|
|
768
768
|
}
|
|
769
|
+
async function typedQueryItems(query) {
|
|
770
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
771
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ query });
|
|
772
|
+
const reqOpts = queryItems(payload);
|
|
773
|
+
sideEffects?.onSiteCall?.();
|
|
774
|
+
try {
|
|
775
|
+
const result = await httpClient.request(reqOpts);
|
|
776
|
+
sideEffects?.onSuccess?.(result);
|
|
777
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
778
|
+
} catch (err) {
|
|
779
|
+
const transformedError = sdkTransformError(
|
|
780
|
+
err,
|
|
781
|
+
{
|
|
782
|
+
spreadPathsToArguments: {},
|
|
783
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
784
|
+
singleArgumentUnchanged: false
|
|
785
|
+
},
|
|
786
|
+
["query"]
|
|
787
|
+
);
|
|
788
|
+
sideEffects?.onError?.(err);
|
|
789
|
+
throw transformedError;
|
|
790
|
+
}
|
|
791
|
+
}
|
|
769
792
|
async function countItems2(options) {
|
|
770
793
|
const { httpClient, sideEffects } = arguments[1];
|
|
771
794
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -805,6 +828,7 @@ export {
|
|
|
805
828
|
getItem2 as getItem,
|
|
806
829
|
listItems2 as listItems,
|
|
807
830
|
queryItems2 as queryItems,
|
|
831
|
+
typedQueryItems,
|
|
808
832
|
updateItem2 as updateItem
|
|
809
833
|
};
|
|
810
834
|
//# sourceMappingURL=index.typings.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/benefit-programs-v1-item-items.universal.ts","../../../src/benefit-programs-v1-item-items.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBenefitProgramsV1Item from './benefit-programs-v1-item-items.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface Item {\n /**\n * Benefit item ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n _id?: string | null;\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 benefit item.\n *\n * Ignored when creating a benefit 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 * ID of the item in the app providing it.\n *\n * For example, if the item is a product provided by Wix Stores, the `externalId` would be the Wix Stores `product Id`.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalId?: string | null;\n /**\n * Benefit item category.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string | null;\n /**\n * Item set ID of the benefit that this benefit item is a part of.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string | null;\n /**\n * Benefit item display name.\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * ID of the app ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/apps-created-by-wix) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/apps-created-by-wix)) that defines and provides the item. For example, if the item is a Wix Stores product, this field's value is `215238eb-22a5-4c36-9e7b-e7c08025e04e`.\n * @format GUID\n * @immutable\n * @readonly\n */\n providerAppId?: string | null;\n /**\n * Custom field data for the benefit item object.\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface ItemsCloned {\n /**\n * ID of the pool that had its items provisioned\n * @format GUID\n */\n itemSetId?: string;\n}\n\nexport interface CreateItemRequest {\n /** Item to create. */\n item: Item;\n}\n\nexport interface CreateItemResponse {\n /** Created item. */\n item?: Item;\n}\n\nexport interface BulkCreateItemsRequest {\n /**\n * Items to create.\n * @minSize 1\n * @maxSize 100\n */\n items: Item[];\n /**\n * Whether to return the full item entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkCreateItemsResponse {\n /**\n * List of created items and associated metadata.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkItemResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkItemResult {\n /** Item metadata. */\n itemMetadata?: ItemMetadata;\n /** Item. */\n item?: Item;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\n * @format GUID\n */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface DeleteItemRequest {\n /**\n * Item ID.\n * @format GUID\n */\n itemId: string;\n}\n\nexport interface DeleteItemResponse {}\n\nexport interface BulkDeleteItemsRequest {\n /**\n * List of IDs of the items to delete.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n itemIds: string[];\n}\n\nexport interface BulkDeleteItemsResponse {\n /**\n * List of deleted items and associated metadata.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkItemResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkDeleteItemsByFilterRequest {\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n /** Filter options. To learn more, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */\n filter?: Record<string, any> | null;\n}\n\nexport interface BulkDeleteItemsByFilterResponse {\n /**\n * Job ID for item deletion. Retrieve job details using the Async Job API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/async-jobs/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/async-job/introduction)).\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface UpdateItemRequest {\n /** Item to update. */\n item: Item;\n}\n\nexport interface UpdateItemResponse {\n /** Updated item. */\n item?: Item;\n}\n\nexport interface BulkUpdateItemsRequest {\n /**\n * Items to update.\n * @minSize 1\n * @maxSize 100\n */\n items?: MaskedItem[];\n /**\n * Whether to return the full item entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface MaskedItem {\n /** Item to update. */\n item?: Item;\n /** Explicit list of fields to update. */\n fieldMask?: string[];\n}\n\nexport interface BulkUpdateItemsResponse {\n /**\n * List of updated items and associated metadata.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkItemResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface GetItemRequest {\n /**\n * ID of the item to retrieve.\n * @format GUID\n */\n itemId: string;\n}\n\nexport interface GetItemResponse {\n /** Retrieved item. */\n item?: Item;\n}\n\nexport interface ListItemsRequest {\n /** Filter. */\n filter?: Filter;\n /** Cursor paging */\n cursorPaging?: CursorPaging;\n}\n\nexport enum Type {\n /** Unknown filter type. */\n UNKNOWN_FILTER = 'UNKNOWN_FILTER',\n /** Use with `filter.byItemSetIdAndReferenceOptions`. */\n BY_ITEM_SET_ID_AND_REFERENCE = 'BY_ITEM_SET_ID_AND_REFERENCE',\n /** Use with `filter.byReferenceOptions`. */\n BY_REFERENCE = 'BY_REFERENCE',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN_FILTER'\n | 'BY_ITEM_SET_ID_AND_REFERENCE'\n | 'BY_REFERENCE';\n\nexport interface ByItemSetIdAndReference {\n /**\n * Filter list.\n * @minSize 1\n * @maxSize 100\n */\n filters?: ByItemSetIdAndReferenceFilter[];\n}\n\nexport interface ByItemSetIdAndReferenceFilter {\n /**\n * ID set ID.\n * @format GUID\n */\n itemSetId?: string;\n /**\n * External item ID.\n * @format GUID\n */\n externalId?: string;\n /**\n * Item category.\n * @maxLength 20\n */\n category?: string;\n /**\n * *Required**. ID of the app providing the item.\n * @format GUID\n */\n providerAppId?: string;\n}\n\nexport interface ByReference {\n /**\n * Filter list.\n * @minSize 1\n * @maxSize 100\n */\n filters?: ByReferenceFilter[];\n}\n\nexport interface ByReferenceFilter {\n /**\n * External item ID.\n * @format GUID\n */\n externalId?: string;\n /**\n * Item category.\n * @maxLength 20\n */\n category?: string;\n /**\n * *Required**. ID of the app providing the item.\n * @format GUID\n */\n providerAppId?: string;\n}\n\nexport interface Filter extends FilterFilterOneOf {\n /** Filter the request by `itemSetId` and item reference. */\n byItemSetIdAndReferenceOptions?: ByItemSetIdAndReference;\n /** Filter the request item reference. */\n byReferenceOptions?: ByReference;\n /** Filter type. */\n type?: TypeWithLiterals;\n /**\n * Filter by namespace.\n * @minLength 1\n * @maxLength 20\n */\n namespace?: string;\n}\n\n/** @oneof */\nexport interface FilterFilterOneOf {\n /** Filter the request by `itemSetId` and item reference. */\n byItemSetIdAndReferenceOptions?: ByItemSetIdAndReference;\n /** Filter the request item reference. */\n byReferenceOptions?: ByReference;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return.\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 interface ListItemsResponse {\n /** Items. */\n items?: Item[];\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 QueryItemsRequest {\n /** Filter, sort, and paging to apply to the query. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object 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 * 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 QueryItemsResponse {\n /** List of retrieved items. */\n items?: Item[];\n /** Metadata for paginated results. */\n metadata?: CursorPagingMetadata;\n}\n\nexport interface CountItemsRequest {\n /**\n * Items to count.\n *\n * Filter options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language).\n */\n filter?: Record<string, any> | null;\n}\n\nexport interface CountItemsResponse {\n /** Number of items fulfilling the specified filter conditions. */\n count?: number;\n}\n\nexport interface CloneItemsRequest {\n /**\n * Id of the item set to be cloned\n * @format GUID\n */\n itemSetId?: string;\n}\n\nexport interface CloneItemsResponse {\n /**\n * Id of the item set that these items were added to\n * @format GUID\n */\n clonedItemSetId?: string;\n /**\n * Id of the job that is cloning the item set\n * @format GUID\n */\n cloneJobId?: string;\n}\n\nexport interface BulkCloneItemSetsRequest {\n /**\n * Id of the item sets to be cloned\n * @format GUID\n * @minSize 1\n * @maxSize 1000\n */\n itemSetIds?: string[];\n}\n\nexport interface BulkCloneItemSetsResponse {\n /**\n * Results\n * @minSize 1\n * @maxSize 1000\n */\n results?: BulkCloneItemSetsResult[];\n /** Bulk action metadata */\n bulkActionMetadata?: BulkActionMetadata;\n /**\n * Id of the job that is cloning the item set\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface BulkCloneItemSetsResult {\n /** Item metadata */\n itemMetadata?: ItemMetadata;\n /**\n * Id of the item set that these items were added to\n * @format GUID\n */\n clonedItemSetId?: string;\n}\n\nexport interface AllocateItemSetsRequest {\n /**\n * Number of sets to allocate\n * @min 1\n * @max 1000\n */\n numberOfSets?: number;\n}\n\nexport interface AllocateItemSetsResponse {\n /**\n * ID that is a shared reference between a benefit pool and a specific item.\n * @format GUID\n */\n itemSetIds?: string[];\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type CountItemsApplicationErrors = {\n code?: 'TOO_MANY_TO_COUNT';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Creates a benefit item.\n * @param item - Item to create.\n * @public\n * @documentationMaturity preview\n * @requiredField item\n * @requiredField item.externalId\n * @requiredField item.itemSetId\n * @requiredField item.namespace\n * @requiredField item.providerAppId\n * @permissionId BENEFIT_PROGRAMS.ITEM_CREATE\n * @applicableIdentity APP\n * @returns Created item.\n * @fqn wix.benefit_programs.v1.item.ItemService.CreateItem\n */\nexport async function createItem(\n item: NonNullablePaths<\n Item,\n `externalId` | `itemSetId` | `namespace` | `providerAppId`,\n 2\n >\n): Promise<Item> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ item: item });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.createItem(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.item!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { item: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['item']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates benefit items.\n * @param items - Items to create.\n * @public\n * @documentationMaturity preview\n * @requiredField items\n * @requiredField items.externalId\n * @requiredField items.itemSetId\n * @requiredField items.namespace\n * @requiredField items.providerAppId\n * @permissionId BENEFIT_PROGRAMS.ITEM_CREATE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.BulkCreateItems\n */\nexport async function bulkCreateItems(\n items: NonNullablePaths<\n Item,\n `externalId` | `itemSetId` | `namespace` | `providerAppId`,\n 2\n >[],\n options?: BulkCreateItemsOptions\n): Promise<\n NonNullablePaths<\n BulkCreateItemsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n items: items,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.bulkCreateItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n items: '$[0]',\n returnEntity: '$[1].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['items', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkCreateItemsOptions {\n /**\n * Whether to return the full item entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\n/**\n * Deletes a benefit item.\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n * @param itemId - Item ID.\n * @public\n * @documentationMaturity preview\n * @requiredField itemId\n * @permissionId BENEFIT_PROGRAMS.ITEM_DELETE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.DeleteItem\n */\nexport async function deleteItem(itemId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ itemId: itemId });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.deleteItem(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: { itemId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['itemId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes benefit items.\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n * @param itemIds - List of IDs of the items to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField itemIds\n * @permissionId BENEFIT_PROGRAMS.ITEM_DELETE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.BulkDeleteItems\n */\nexport async function bulkDeleteItems(\n itemIds: string[]\n): Promise<\n NonNullablePaths<\n BulkDeleteItemsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ itemIds: itemIds });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.bulkDeleteItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { itemIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['itemIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes benefit items that fulfill the specified filter conditions.\n *\n * For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n * @param namespace - Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @public\n * @documentationMaturity preview\n * @requiredField namespace\n * @permissionId BENEFIT_PROGRAMS.ITEM_DELETE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.BulkDeleteItemsByFilter\n */\nexport async function bulkDeleteItemsByFilter(\n namespace: string,\n options?: BulkDeleteItemsByFilterOptions\n): Promise<NonNullablePaths<BulkDeleteItemsByFilterResponse, `jobId`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n namespace: namespace,\n filter: options?.filter,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1Item.bulkDeleteItemsByFilter(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { namespace: '$[0]', filter: '$[1].filter' },\n singleArgumentUnchanged: false,\n },\n ['namespace', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkDeleteItemsByFilterOptions {\n /** Filter options. To learn more, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */\n filter?: Record<string, any> | null;\n}\n\n/**\n * Updates a benefit item.\n *\n * Each time the benefit item is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the benefit item.\n * This ensures you're working with the latest benefit item\n * and prevents unintended overwrites.\n * @param _id - Benefit item ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField item\n * @requiredField item.revision\n * @permissionId BENEFIT_PROGRAMS.ITEM_UPDATE\n * @applicableIdentity APP\n * @returns Updated item.\n * @fqn wix.benefit_programs.v1.item.ItemService.UpdateItem\n */\nexport async function updateItem(\n _id: string,\n item: NonNullablePaths<UpdateItem, `revision`, 2>\n): Promise<Item> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n item: { ...item, id: _id },\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.updateItem(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.item!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { item: '$[1]' },\n explicitPathsToArguments: { 'item.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'item']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateItem {\n /**\n * Benefit item ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n _id?: string | null;\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 benefit item.\n *\n * Ignored when creating a benefit 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 * ID of the item in the app providing it.\n *\n * For example, if the item is a product provided by Wix Stores, the `externalId` would be the Wix Stores `product Id`.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalId?: string | null;\n /**\n * Benefit item category.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string | null;\n /**\n * Item set ID of the benefit that this benefit item is a part of.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string | null;\n /**\n * Benefit item display name.\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * ID of the app ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/apps-created-by-wix) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/apps-created-by-wix)) that defines and provides the item. For example, if the item is a Wix Stores product, this field's value is `215238eb-22a5-4c36-9e7b-e7c08025e04e`.\n * @format GUID\n * @immutable\n * @readonly\n */\n providerAppId?: string | null;\n /**\n * Custom field data for the benefit item object.\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string | null;\n}\n\n/**\n * Updates benefit items.\n *\n * Each time the benefit item is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the benefit item.\n * This ensures you're working with the latest benefit item\n * and prevents unintended overwrites.\n * @public\n * @documentationMaturity preview\n * @requiredField options.items.item\n * @requiredField options.items.item._id\n * @requiredField options.items.item.revision\n * @permissionId BENEFIT_PROGRAMS.ITEM_UPDATE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.BulkUpdateItems\n */\nexport async function bulkUpdateItems(\n options?: NonNullablePaths<\n BulkUpdateItemsOptions,\n | `items.${number}.item`\n | `items.${number}.item._id`\n | `items.${number}.item.revision`,\n 5\n >\n): Promise<\n NonNullablePaths<\n BulkUpdateItemsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n items: options?.items,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.bulkUpdateItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n items: '$[0].items',\n returnEntity: '$[0].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateItemsOptions {\n /**\n * Items to update.\n * @minSize 1\n * @maxSize 100\n */\n items?: MaskedItem[];\n /**\n * Whether to return the full item entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\n/**\n * Retrieves a benefit item.\n * @param itemId - ID of the item to retrieve.\n * @public\n * @documentationMaturity preview\n * @requiredField itemId\n * @permissionId BENEFIT_PROGRAMS.ITEM_READ\n * @applicableIdentity APP\n * @returns Retrieved item.\n * @fqn wix.benefit_programs.v1.item.ItemService.GetItem\n */\nexport async function getItem(itemId: string): Promise<Item> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ itemId: itemId });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.getItem(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.item!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { itemId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['itemId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of up to 1000 benefit items.\n * @public\n * @documentationMaturity preview\n * @permissionId BENEFIT_PROGRAMS.ITEM_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.ListItems\n */\nexport async function listItems(\n options?: ListItemsOptions\n): Promise<NonNullablePaths<ListItemsResponse, `items`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n cursorPaging: options?.cursorPaging,\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.listItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0].filter',\n cursorPaging: '$[0].cursorPaging',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListItemsOptions {\n /** Filter. */\n filter?: Filter;\n /** Cursor paging */\n cursorPaging?: CursorPaging;\n}\n\n/**\n * Creates a query to retrieve a list of items.\n *\n * The Query Items method builds a query to retrieve a list of items and returns a `ItemsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `ItemsQueryBuilder` methods onto the query. `ItemsQueryBuilder` methods enable you to filter, sort, and control the results that Query Items returns.\n *\n * Query Items has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `ItemsQueryResult`.\n * @public\n * @documentationMaturity preview\n * @permissionId BENEFIT_PROGRAMS.ITEM_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.QueryItems\n */\nexport function queryItems(): ItemsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<Item, 'CURSOR', QueryItemsRequest, QueryItemsResponse>({\n func: async (payload: QueryItemsRequest) => {\n const reqOpts = ambassadorWixBenefitProgramsV1Item.queryItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryItemsRequest['query']) => {\n const args = [query, {}] as [QueryItemsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryItemsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.items,\n pagingMetadata: transformedData?.metadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface ItemsQueryResult extends QueryCursorResult {\n items: Item[];\n query: ItemsQueryBuilder;\n next: () => Promise<ItemsQueryResult>;\n prev: () => Promise<ItemsQueryResult>;\n}\n\nexport interface ItemsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (\n propertyName:\n | '_id'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: string\n ) => ItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n * @documentationMaturity preview\n */\n hasSome: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any[]\n ) => ItemsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: boolean\n ) => ItemsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace'\n >\n ) => ItemsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace'\n >\n ) => ItemsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => ItemsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => ItemsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<ItemsQueryResult>;\n}\n\n/**\n * Counts how many benefit items exist that fulfill the specified filtering conditions.\n *\n * For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).\n * @public\n * @documentationMaturity preview\n * @permissionId BENEFIT_PROGRAMS.ITEM_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.CountItems\n */\nexport async function countItems(options?: CountItemsOptions): Promise<\n NonNullablePaths<CountItemsResponse, `count`, 2> & {\n __applicationErrorsType?: CountItemsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.countItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { filter: '$[0].filter' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CountItemsOptions {\n /**\n * Items to count.\n *\n * Filter options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language).\n */\n filter?: Record<string, any> | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBenefitProgramsV1ItemItemServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/benefit-programs-items',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_items';\n\n/** Creates a benefit item. */\nexport function createItem(payload: object): RequestOptionsFactory<any> {\n function __createItem({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'item.createdDate' }, { path: 'item.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.CreateItem',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'item.createdDate' }, { path: 'item.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createItem;\n}\n\n/** Creates benefit items. */\nexport function bulkCreateItems(payload: object): RequestOptionsFactory<any> {\n function __bulkCreateItems({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'items.createdDate' }, { path: 'items.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.BulkCreateItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/bulk/items/create',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateItems;\n}\n\n/**\n * Deletes a benefit item.\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n */\nexport function deleteItem(payload: object): RequestOptionsFactory<any> {\n function __deleteItem({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.DeleteItem',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items/{itemId}/delete',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __deleteItem;\n}\n\n/**\n * Deletes benefit items.\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n */\nexport function bulkDeleteItems(payload: object): RequestOptionsFactory<any> {\n function __bulkDeleteItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.BulkDeleteItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/bulk/items/delete',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkDeleteItems;\n}\n\n/**\n * Deletes benefit items that fulfill the specified filter conditions.\n *\n * For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n */\nexport function bulkDeleteItemsByFilter(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeleteItemsByFilter({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.item.ItemService.BulkDeleteItemsByFilter',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/bulk/items/delete-by-filter',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteItemsByFilter;\n}\n\n/**\n * Updates a benefit item.\n *\n * Each time the benefit item is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the benefit item.\n * This ensures you're working with the latest benefit item\n * and prevents unintended overwrites.\n */\nexport function updateItem(payload: object): RequestOptionsFactory<any> {\n function __updateItem({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'item.createdDate' }, { path: 'item.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'PATCH' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.UpdateItem',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items/{item.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'item.createdDate' }, { path: 'item.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateItem;\n}\n\n/**\n * Updates benefit items.\n *\n * Each time the benefit item is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the benefit item.\n * This ensures you're working with the latest benefit item\n * and prevents unintended overwrites.\n */\nexport function bulkUpdateItems(payload: object): RequestOptionsFactory<any> {\n function __bulkUpdateItems({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'items.fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'items.item.createdDate' },\n { path: 'items.item.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.BulkUpdateItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/bulk/items/update',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpdateItems;\n}\n\n/** Retrieves a benefit item. */\nexport function getItem(payload: object): RequestOptionsFactory<any> {\n function __getItem({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'GET' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.GetItem',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items/{itemId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'item.createdDate' }, { path: 'item.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getItem;\n}\n\n/** Retrieves a list of up to 1000 benefit items. */\nexport function listItems(payload: object): RequestOptionsFactory<any> {\n function __listItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'GET' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.ListItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'items.createdDate' },\n { path: 'items.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listItems;\n}\n\n/**\n * Creates a query to retrieve a list of items.\n *\n * The Query Items method builds a query to retrieve a list of items and returns a `ItemsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `ItemsQueryBuilder` methods onto the query. `ItemsQueryBuilder` methods enable you to filter, sort, and control the results that Query Items returns.\n *\n * Query Items has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `ItemsQueryResult`.\n */\nexport function queryItems(payload: object): RequestOptionsFactory<any> {\n function __queryItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.QueryItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'items.createdDate' },\n { path: 'items.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryItems;\n}\n\n/**\n * Counts how many benefit items exist that fulfill the specified filtering conditions.\n *\n * For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).\n */\nexport function countItems(payload: object): RequestOptionsFactory<any> {\n function __countItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.CountItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items/count',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __countItems;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;A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AAA,QAClD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["payload","transformPaths","Type","SortOrder","WebhookIdentityType","createItem","bulkCreateItems","deleteItem","bulkDeleteItems","bulkDeleteItemsByFilter","updateItem","bulkUpdateItems","getItem","listItems","queryItems","countItems"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/benefit-programs-v1-item-items.universal.ts","../../../src/benefit-programs-v1-item-items.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, HttpResponse, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBenefitProgramsV1Item from './benefit-programs-v1-item-items.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface Item {\n /**\n * Benefit item ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n _id?: string | null;\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 benefit item.\n *\n * Ignored when creating a benefit 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 * ID of the item in the app providing it.\n *\n * For example, if the item is a product provided by Wix Stores, the `externalId` would be the Wix Stores `product Id`.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalId?: string | null;\n /**\n * Benefit item category.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string | null;\n /**\n * Item set ID of the benefit that this benefit item is a part of.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string | null;\n /**\n * Benefit item display name.\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * ID of the app ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/apps-created-by-wix) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/apps-created-by-wix)) that defines and provides the item. For example, if the item is a Wix Stores product, this field's value is `215238eb-22a5-4c36-9e7b-e7c08025e04e`.\n * @format GUID\n * @immutable\n * @readonly\n */\n providerAppId?: string | null;\n /**\n * Custom field data for the benefit item object.\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string | null;\n}\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface ItemsCloned {\n /**\n * ID of the pool that had its items provisioned\n * @format GUID\n */\n itemSetId?: string;\n}\n\nexport interface CreateItemRequest {\n /** Item to create. */\n item: Item;\n}\n\nexport interface CreateItemResponse {\n /** Created item. */\n item?: Item;\n}\n\nexport interface BulkCreateItemsRequest {\n /**\n * Items to create.\n * @minSize 1\n * @maxSize 100\n */\n items: Item[];\n /**\n * Whether to return the full item entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkCreateItemsResponse {\n /**\n * List of created items and associated metadata.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkItemResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkItemResult {\n /** Item metadata. */\n itemMetadata?: ItemMetadata;\n /** Item. */\n item?: Item;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\n * @format GUID\n */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface DeleteItemRequest {\n /**\n * Item ID.\n * @format GUID\n */\n itemId: string;\n}\n\nexport interface DeleteItemResponse {}\n\nexport interface BulkDeleteItemsRequest {\n /**\n * List of IDs of the items to delete.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n itemIds: string[];\n}\n\nexport interface BulkDeleteItemsResponse {\n /**\n * List of deleted items and associated metadata.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkItemResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkDeleteItemsByFilterRequest {\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n */\n namespace: string;\n /** Filter options. To learn more, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */\n filter?: Record<string, any> | null;\n}\n\nexport interface BulkDeleteItemsByFilterResponse {\n /**\n * Job ID for item deletion. Retrieve job details using the Async Job API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/async-jobs/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/async-job/introduction)).\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface UpdateItemRequest {\n /** Item to update. */\n item: Item;\n}\n\nexport interface UpdateItemResponse {\n /** Updated item. */\n item?: Item;\n}\n\nexport interface BulkUpdateItemsRequest {\n /**\n * Items to update.\n * @minSize 1\n * @maxSize 100\n */\n items?: MaskedItem[];\n /**\n * Whether to return the full item entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface MaskedItem {\n /** Item to update. */\n item?: Item;\n /** Explicit list of fields to update. */\n fieldMask?: string[];\n}\n\nexport interface BulkUpdateItemsResponse {\n /**\n * List of updated items and associated metadata.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkItemResult[];\n /** Bulk action metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface GetItemRequest {\n /**\n * ID of the item to retrieve.\n * @format GUID\n */\n itemId: string;\n}\n\nexport interface GetItemResponse {\n /** Retrieved item. */\n item?: Item;\n}\n\nexport interface ListItemsRequest {\n /** Filter. */\n filter?: Filter;\n /** Cursor paging */\n cursorPaging?: CursorPaging;\n}\n\nexport enum Type {\n /** Unknown filter type. */\n UNKNOWN_FILTER = 'UNKNOWN_FILTER',\n /** Use with `filter.byItemSetIdAndReferenceOptions`. */\n BY_ITEM_SET_ID_AND_REFERENCE = 'BY_ITEM_SET_ID_AND_REFERENCE',\n /** Use with `filter.byReferenceOptions`. */\n BY_REFERENCE = 'BY_REFERENCE',\n}\n\n/** @enumType */\nexport type TypeWithLiterals =\n | Type\n | 'UNKNOWN_FILTER'\n | 'BY_ITEM_SET_ID_AND_REFERENCE'\n | 'BY_REFERENCE';\n\nexport interface ByItemSetIdAndReference {\n /**\n * Filter list.\n * @minSize 1\n * @maxSize 100\n */\n filters?: ByItemSetIdAndReferenceFilter[];\n}\n\nexport interface ByItemSetIdAndReferenceFilter {\n /**\n * ID set ID.\n * @format GUID\n */\n itemSetId?: string;\n /**\n * External item ID.\n * @format GUID\n */\n externalId?: string;\n /**\n * Item category.\n * @maxLength 20\n */\n category?: string;\n /**\n * *Required**. ID of the app providing the item.\n * @format GUID\n */\n providerAppId?: string;\n}\n\nexport interface ByReference {\n /**\n * Filter list.\n * @minSize 1\n * @maxSize 100\n */\n filters?: ByReferenceFilter[];\n}\n\nexport interface ByReferenceFilter {\n /**\n * External item ID.\n * @format GUID\n */\n externalId?: string;\n /**\n * Item category.\n * @maxLength 20\n */\n category?: string;\n /**\n * *Required**. ID of the app providing the item.\n * @format GUID\n */\n providerAppId?: string;\n}\n\nexport interface Filter extends FilterFilterOneOf {\n /** Filter the request by `itemSetId` and item reference. */\n byItemSetIdAndReferenceOptions?: ByItemSetIdAndReference;\n /** Filter the request item reference. */\n byReferenceOptions?: ByReference;\n /** Filter type. */\n type?: TypeWithLiterals;\n /**\n * Filter by namespace.\n * @minLength 1\n * @maxLength 20\n */\n namespace?: string;\n}\n\n/** @oneof */\nexport interface FilterFilterOneOf {\n /** Filter the request by `itemSetId` and item reference. */\n byItemSetIdAndReferenceOptions?: ByItemSetIdAndReference;\n /** Filter the request item reference. */\n byReferenceOptions?: ByReference;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return.\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 interface ListItemsResponse {\n /** Items. */\n items?: Item[];\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 QueryItemsRequest {\n /** Filter, sort, and paging to apply to the query. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object 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 * 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 QueryItemsResponse {\n /** List of retrieved items. */\n items?: Item[];\n /** Metadata for paginated results. */\n metadata?: CursorPagingMetadata;\n}\n\nexport interface CountItemsRequest {\n /**\n * Items to count.\n *\n * Filter options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language).\n */\n filter?: Record<string, any> | null;\n}\n\nexport interface CountItemsResponse {\n /** Number of items fulfilling the specified filter conditions. */\n count?: number;\n}\n\nexport interface CloneItemsRequest {\n /**\n * Id of the item set to be cloned\n * @format GUID\n */\n itemSetId?: string;\n}\n\nexport interface CloneItemsResponse {\n /**\n * Id of the item set that these items were added to\n * @format GUID\n */\n clonedItemSetId?: string;\n /**\n * Id of the job that is cloning the item set\n * @format GUID\n */\n cloneJobId?: string;\n}\n\nexport interface BulkCloneItemSetsRequest {\n /**\n * Id of the item sets to be cloned\n * @format GUID\n * @minSize 1\n * @maxSize 1000\n */\n itemSetIds?: string[];\n}\n\nexport interface BulkCloneItemSetsResponse {\n /**\n * Results\n * @minSize 1\n * @maxSize 1000\n */\n results?: BulkCloneItemSetsResult[];\n /** Bulk action metadata */\n bulkActionMetadata?: BulkActionMetadata;\n /**\n * Id of the job that is cloning the item set\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface BulkCloneItemSetsResult {\n /** Item metadata */\n itemMetadata?: ItemMetadata;\n /**\n * Id of the item set that these items were added to\n * @format GUID\n */\n clonedItemSetId?: string;\n}\n\nexport interface AllocateItemSetsRequest {\n /**\n * Number of sets to allocate\n * @min 1\n * @max 1000\n */\n numberOfSets?: number;\n}\n\nexport interface AllocateItemSetsResponse {\n /**\n * ID that is a shared reference between a benefit pool and a specific item.\n * @format GUID\n */\n itemSetIds?: string[];\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n/** @docsIgnore */\nexport type CountItemsApplicationErrors = {\n code?: 'TOO_MANY_TO_COUNT';\n description?: string;\n data?: Record<string, any>;\n};\n\n/**\n * Creates a benefit item.\n * @param item - Item to create.\n * @public\n * @requiredField item\n * @requiredField item.externalId\n * @requiredField item.itemSetId\n * @requiredField item.namespace\n * @requiredField item.providerAppId\n * @permissionId BENEFIT_PROGRAMS.ITEM_CREATE\n * @applicableIdentity APP\n * @returns Created item.\n * @fqn wix.benefit_programs.v1.item.ItemService.CreateItem\n */\nexport async function createItem(\n item: NonNullablePaths<\n Item,\n `externalId` | `itemSetId` | `namespace` | `providerAppId`,\n 2\n >\n): Promise<Item> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ item: item });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.createItem(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.item!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { item: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['item']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Creates benefit items.\n * @param items - Items to create.\n * @public\n * @requiredField items\n * @requiredField items.externalId\n * @requiredField items.itemSetId\n * @requiredField items.namespace\n * @requiredField items.providerAppId\n * @permissionId BENEFIT_PROGRAMS.ITEM_CREATE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.BulkCreateItems\n */\nexport async function bulkCreateItems(\n items: NonNullablePaths<\n Item,\n `externalId` | `itemSetId` | `namespace` | `providerAppId`,\n 2\n >[],\n options?: BulkCreateItemsOptions\n): Promise<\n NonNullablePaths<\n BulkCreateItemsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n items: items,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.bulkCreateItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n items: '$[0]',\n returnEntity: '$[1].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['items', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkCreateItemsOptions {\n /**\n * Whether to return the full item entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\n/**\n * Deletes a benefit item.\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n * @param itemId - Item ID.\n * @public\n * @requiredField itemId\n * @permissionId BENEFIT_PROGRAMS.ITEM_DELETE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.DeleteItem\n */\nexport async function deleteItem(itemId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ itemId: itemId });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.deleteItem(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: { itemId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['itemId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes benefit items.\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n * @param itemIds - List of IDs of the items to delete.\n * @public\n * @requiredField itemIds\n * @permissionId BENEFIT_PROGRAMS.ITEM_DELETE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.BulkDeleteItems\n */\nexport async function bulkDeleteItems(\n itemIds: string[]\n): Promise<\n NonNullablePaths<\n BulkDeleteItemsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ itemIds: itemIds });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.bulkDeleteItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { itemIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['itemIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Deletes benefit items that fulfill the specified filter conditions.\n *\n * For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n * @param namespace - Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @public\n * @requiredField namespace\n * @permissionId BENEFIT_PROGRAMS.ITEM_DELETE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.BulkDeleteItemsByFilter\n */\nexport async function bulkDeleteItemsByFilter(\n namespace: string,\n options?: BulkDeleteItemsByFilterOptions\n): Promise<NonNullablePaths<BulkDeleteItemsByFilterResponse, `jobId`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n namespace: namespace,\n filter: options?.filter,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1Item.bulkDeleteItemsByFilter(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { namespace: '$[0]', filter: '$[1].filter' },\n singleArgumentUnchanged: false,\n },\n ['namespace', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkDeleteItemsByFilterOptions {\n /** Filter options. To learn more, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */\n filter?: Record<string, any> | null;\n}\n\n/**\n * Updates a benefit item.\n *\n * Each time the benefit item is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the benefit item.\n * This ensures you're working with the latest benefit item\n * and prevents unintended overwrites.\n * @param _id - Benefit item ID.\n * @public\n * @requiredField _id\n * @requiredField item\n * @requiredField item.revision\n * @permissionId BENEFIT_PROGRAMS.ITEM_UPDATE\n * @applicableIdentity APP\n * @returns Updated item.\n * @fqn wix.benefit_programs.v1.item.ItemService.UpdateItem\n */\nexport async function updateItem(\n _id: string,\n item: NonNullablePaths<UpdateItem, `revision`, 2>\n): Promise<Item> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n item: { ...item, id: _id },\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.updateItem(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.item!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { item: '$[1]' },\n explicitPathsToArguments: { 'item.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'item']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateItem {\n /**\n * Benefit item ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n _id?: string | null;\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 benefit item.\n *\n * Ignored when creating a benefit 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 * ID of the item in the app providing it.\n *\n * For example, if the item is a product provided by Wix Stores, the `externalId` would be the Wix Stores `product Id`.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalId?: string | null;\n /**\n * Benefit item category.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string | null;\n /**\n * Item set ID of the benefit that this benefit item is a part of.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string | null;\n /**\n * Benefit item display name.\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * ID of the app ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/apps-created-by-wix) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/apps-created-by-wix)) that defines and provides the item. For example, if the item is a Wix Stores product, this field's value is `215238eb-22a5-4c36-9e7b-e7c08025e04e`.\n * @format GUID\n * @immutable\n * @readonly\n */\n providerAppId?: string | null;\n /**\n * Custom field data for the benefit item object.\n * [Extended fields](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/schema-plugins/about-schema-plugin-extensions) must be configured in the app dashboard before they can be accessed with API calls.\n */\n extendedFields?: ExtendedFields;\n /**\n * Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string | null;\n}\n\n/**\n * Updates benefit items.\n *\n * Each time the benefit item is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the benefit item.\n * This ensures you're working with the latest benefit item\n * and prevents unintended overwrites.\n * @public\n * @requiredField options.items.item\n * @requiredField options.items.item._id\n * @requiredField options.items.item.revision\n * @permissionId BENEFIT_PROGRAMS.ITEM_UPDATE\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.BulkUpdateItems\n */\nexport async function bulkUpdateItems(\n options?: NonNullablePaths<\n BulkUpdateItemsOptions,\n | `items.${number}.item`\n | `items.${number}.item._id`\n | `items.${number}.item.revision`,\n 5\n >\n): Promise<\n NonNullablePaths<\n BulkUpdateItemsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n items: options?.items,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.bulkUpdateItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n items: '$[0].items',\n returnEntity: '$[0].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateItemsOptions {\n /**\n * Items to update.\n * @minSize 1\n * @maxSize 100\n */\n items?: MaskedItem[];\n /**\n * Whether to return the full item entities.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\n/**\n * Retrieves a benefit item.\n * @param itemId - ID of the item to retrieve.\n * @public\n * @requiredField itemId\n * @permissionId BENEFIT_PROGRAMS.ITEM_READ\n * @applicableIdentity APP\n * @returns Retrieved item.\n * @fqn wix.benefit_programs.v1.item.ItemService.GetItem\n */\nexport async function getItem(itemId: string): Promise<Item> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ itemId: itemId });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.getItem(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.item!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { itemId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['itemId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of up to 1000 benefit items.\n * @public\n * @permissionId BENEFIT_PROGRAMS.ITEM_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.ListItems\n */\nexport async function listItems(\n options?: ListItemsOptions\n): Promise<NonNullablePaths<ListItemsResponse, `items`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n cursorPaging: options?.cursorPaging,\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.listItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0].filter',\n cursorPaging: '$[0].cursorPaging',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListItemsOptions {\n /** Filter. */\n filter?: Filter;\n /** Cursor paging */\n cursorPaging?: CursorPaging;\n}\n\n/**\n * Creates a query to retrieve a list of items.\n *\n * The Query Items method builds a query to retrieve a list of items and returns a `ItemsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `ItemsQueryBuilder` methods onto the query. `ItemsQueryBuilder` methods enable you to filter, sort, and control the results that Query Items returns.\n *\n * Query Items has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `ItemsQueryResult`.\n * @public\n * @permissionId BENEFIT_PROGRAMS.ITEM_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.QueryItems\n */\nexport function queryItems(): ItemsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<Item, 'CURSOR', QueryItemsRequest, QueryItemsResponse>({\n func: async (payload: QueryItemsRequest) => {\n const reqOpts = ambassadorWixBenefitProgramsV1Item.queryItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryItemsRequest['query']) => {\n const args = [query, {}] as [QueryItemsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryItemsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.items,\n pagingMetadata: transformedData?.metadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface ItemsQueryResult extends QueryCursorResult {\n items: Item[];\n query: ItemsQueryBuilder;\n next: () => Promise<ItemsQueryResult>;\n prev: () => Promise<ItemsQueryResult>;\n}\n\nexport interface ItemsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n */\n startsWith: (\n propertyName:\n | '_id'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: string\n ) => ItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasSome: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any[]\n ) => ItemsQueryBuilder;\n in: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: any\n ) => ItemsQueryBuilder;\n exists: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace',\n value: boolean\n ) => ItemsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n ascending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace'\n >\n ) => ItemsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */\n descending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'itemSetId'\n | 'providerAppId'\n | 'namespace'\n >\n ) => ItemsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => ItemsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => ItemsQueryBuilder;\n find: () => Promise<ItemsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.benefit_programs.v1.item.ItemService.QueryItems\n * @requiredField query\n */\nexport async function typedQueryItems(\n query: CursorQuery\n): Promise<NonNullablePaths<QueryItemsResponse, `items`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.queryItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Counts how many benefit items exist that fulfill the specified filtering conditions.\n *\n * For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).\n * @public\n * @permissionId BENEFIT_PROGRAMS.ITEM_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.item.ItemService.CountItems\n */\nexport async function countItems(options?: CountItemsOptions): Promise<\n NonNullablePaths<CountItemsResponse, `count`, 2> & {\n __applicationErrorsType?: CountItemsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: options?.filter,\n });\n\n const reqOpts = ambassadorWixBenefitProgramsV1Item.countItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { filter: '$[0].filter' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CountItemsOptions {\n /**\n * Items to count.\n *\n * Filter options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language).\n */\n filter?: Record<string, any> | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBenefitProgramsV1ItemItemServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/benefit-programs-items',\n destPath: '',\n },\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n 'api._api_base_domain_': [\n {\n srcPath: '/benefit-programs-items',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/_api/benefit-programs/v1/bulk/items',\n destPath: '/v1/bulk/items',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_items';\n\n/** Creates a benefit item. */\nexport function createItem(payload: object): RequestOptionsFactory<any> {\n function __createItem({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'item.createdDate' }, { path: 'item.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.CreateItem',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'item.createdDate' }, { path: 'item.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createItem;\n}\n\n/** Creates benefit items. */\nexport function bulkCreateItems(payload: object): RequestOptionsFactory<any> {\n function __bulkCreateItems({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'items.createdDate' }, { path: 'items.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.BulkCreateItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/bulk/items/create',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateItems;\n}\n\n/**\n * Deletes a benefit item.\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n */\nexport function deleteItem(payload: object): RequestOptionsFactory<any> {\n function __deleteItem({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.DeleteItem',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items/{itemId}/delete',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __deleteItem;\n}\n\n/**\n * Deletes benefit items.\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n */\nexport function bulkDeleteItems(payload: object): RequestOptionsFactory<any> {\n function __bulkDeleteItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.BulkDeleteItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/bulk/items/delete',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkDeleteItems;\n}\n\n/**\n * Deletes benefit items that fulfill the specified filter conditions.\n *\n * For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).\n *\n * <blockquote class=\"caution\">\n * <strong>Caution:</strong>\n *\n * Deleting a benefit item removes the association between a benefit and the item with immediate effect. This may affect currently active pools.\n * </blockquote>\n */\nexport function bulkDeleteItemsByFilter(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkDeleteItemsByFilter({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.item.ItemService.BulkDeleteItemsByFilter',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/bulk/items/delete-by-filter',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteItemsByFilter;\n}\n\n/**\n * Updates a benefit item.\n *\n * Each time the benefit item is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the benefit item.\n * This ensures you're working with the latest benefit item\n * and prevents unintended overwrites.\n */\nexport function updateItem(payload: object): RequestOptionsFactory<any> {\n function __updateItem({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'item.createdDate' }, { path: 'item.updatedDate' }],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'PATCH' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.UpdateItem',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items/{item.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'item.createdDate' }, { path: 'item.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateItem;\n}\n\n/**\n * Updates benefit items.\n *\n * Each time the benefit item is updated,\n * `revision` increments by 1.\n * The current `revision` must be passed when updating the benefit item.\n * This ensures you're working with the latest benefit item\n * and prevents unintended overwrites.\n */\nexport function bulkUpdateItems(payload: object): RequestOptionsFactory<any> {\n function __bulkUpdateItems({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'items.fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'items.item.createdDate' },\n { path: 'items.item.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.BulkUpdateItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/bulk/items/update',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpdateItems;\n}\n\n/** Retrieves a benefit item. */\nexport function getItem(payload: object): RequestOptionsFactory<any> {\n function __getItem({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'GET' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.GetItem',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items/{itemId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'item.createdDate' }, { path: 'item.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getItem;\n}\n\n/** Retrieves a list of up to 1000 benefit items. */\nexport function listItems(payload: object): RequestOptionsFactory<any> {\n function __listItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'GET' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.ListItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'items.createdDate' },\n { path: 'items.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listItems;\n}\n\n/**\n * Creates a query to retrieve a list of items.\n *\n * The Query Items method builds a query to retrieve a list of items and returns a `ItemsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is used to run the query using the `find()` method.\n *\n * You can refine the query by chaining `ItemsQueryBuilder` methods onto the query. `ItemsQueryBuilder` methods enable you to filter, sort, and control the results that Query Items returns.\n *\n * Query Items has a default paging limit of 50, which you can override.\n *\n * For a full description of the item object, see the object returned for the `items` property in `ItemsQueryResult`.\n */\nexport function queryItems(payload: object): RequestOptionsFactory<any> {\n function __queryItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.QueryItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'items.createdDate' },\n { path: 'items.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryItems;\n}\n\n/**\n * Counts how many benefit items exist that fulfill the specified filtering conditions.\n *\n * For a list of supported filters, see [Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/items/filtering-and-sorting).\n */\nexport function countItems(payload: object): RequestOptionsFactory<any> {\n function __countItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.item',\n method: 'POST' as any,\n methodFqn: 'wix.benefit_programs.v1.item.ItemService.CountItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1ItemItemServiceUrl({\n protoPath: '/v1/items/count',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __countItems;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,kBAAkB;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A,MAC3B;AAAA,MACA,CAAC,OAAO;AAAA,IACV;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAWA,eAAsBc,YAAW,SAI/B;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD,QAAQ,SAAS;AAAA,EACnB,CAAC;AAED,QAAM,UAA6C,WAAW,OAAO;AAErE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,QAAQ,cAAc;AAAA,QAClD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["payload","transformPaths","Type","SortOrder","WebhookIdentityType","createItem","bulkCreateItems","deleteItem","bulkDeleteItems","bulkDeleteItemsByFilter","updateItem","bulkUpdateItems","getItem","listItems","queryItems","countItems"]}
|