@wix/auto_sdk_benefit-programs_pool-definition-items 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/build/cjs/index.d.ts +3 -8
  2. package/build/cjs/index.js +2 -147
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +2 -188
  5. package/build/cjs/index.typings.js +2 -121
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +2 -3
  8. package/build/cjs/meta.js +0 -52
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +1 -52
  11. package/build/cjs/schemas.js +0 -101
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +3 -8
  14. package/build/es/index.mjs +2 -148
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +2 -188
  17. package/build/es/index.typings.mjs +2 -121
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +2 -3
  20. package/build/es/meta.mjs +0 -51
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +1 -52
  23. package/build/es/schemas.mjs +0 -99
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +3 -8
  26. package/build/internal/cjs/index.js +2 -147
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +2 -188
  29. package/build/internal/cjs/index.typings.js +2 -121
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +2 -3
  32. package/build/internal/cjs/meta.js +0 -52
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +1 -52
  35. package/build/internal/cjs/schemas.js +0 -101
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +3 -8
  38. package/build/internal/es/index.mjs +2 -148
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +2 -188
  41. package/build/internal/es/index.typings.mjs +2 -121
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +2 -3
  44. package/build/internal/es/meta.mjs +0 -51
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +1 -52
  47. package/build/internal/es/schemas.mjs +0 -99
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +2 -2
@@ -1,56 +1,5 @@
1
1
  import * as z from 'zod';
2
2
 
3
- declare const QueryPoolDefinitionItemsRequest: z.ZodObject<{
4
- query: z.ZodIntersection<z.ZodObject<{
5
- filter: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
6
- sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
7
- fieldName: z.ZodOptional<z.ZodString>;
8
- order: z.ZodOptional<z.ZodEnum<{
9
- ASC: "ASC";
10
- DESC: "DESC";
11
- }>>;
12
- }, z.core.$strip>>>;
13
- }, z.core.$strip>, z.ZodXor<readonly [z.ZodObject<{
14
- cursorPaging: z.ZodOptional<z.ZodNever>;
15
- }, z.core.$strip>, z.ZodObject<{
16
- cursorPaging: z.ZodObject<{
17
- limit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
18
- cursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
19
- }, z.core.$strip>;
20
- }, z.core.$strip>]>>;
21
- options: z.ZodOptional<z.ZodObject<{
22
- fields: z.ZodOptional<z.ZodArray<z.ZodEnum<{
23
- POOL_DEFINITION: "POOL_DEFINITION";
24
- PROGRAM_DEFINITION: "PROGRAM_DEFINITION";
25
- BENEFIT: "BENEFIT";
26
- ITEM: "ITEM";
27
- }>>>;
28
- }, z.core.$strip>>;
29
- }, z.core.$strip>;
30
- declare const QueryPoolDefinitionItemsResponse: z.ZodObject<{
31
- poolDefinitionItems: z.ZodOptional<z.ZodArray<z.ZodObject<{
32
- _id: z.ZodOptional<z.ZodString>;
33
- revision: z.ZodNullable<z.ZodOptional<z.ZodString>>;
34
- _createdDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
35
- _updatedDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
36
- externalId: z.ZodOptional<z.ZodString>;
37
- category: z.ZodOptional<z.ZodString>;
38
- providerAppId: z.ZodOptional<z.ZodString>;
39
- namespace: z.ZodOptional<z.ZodString>;
40
- poolDefinitionId: z.ZodOptional<z.ZodString>;
41
- itemSetId: z.ZodOptional<z.ZodString>;
42
- itemId: z.ZodOptional<z.ZodString>;
43
- benefitKey: z.ZodOptional<z.ZodString>;
44
- }, z.core.$strip>>>;
45
- metadata: z.ZodOptional<z.ZodObject<{
46
- count: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
47
- cursors: z.ZodOptional<z.ZodObject<{
48
- next: z.ZodNullable<z.ZodOptional<z.ZodString>>;
49
- prev: z.ZodNullable<z.ZodOptional<z.ZodString>>;
50
- }, z.core.$strip>>;
51
- hasNext: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
52
- }, z.core.$strip>>;
53
- }, z.core.$strip>;
54
3
  declare const RemoveItemsFromBenefitRequest: z.ZodObject<{
55
4
  itemReferences: z.ZodArray<z.ZodObject<{
56
5
  externalId: z.ZodString;
@@ -74,4 +23,4 @@ declare const AddItemsToBenefitRequest: z.ZodObject<{
74
23
  }, z.core.$strip>;
75
24
  declare const AddItemsToBenefitResponse: z.ZodObject<{}, z.core.$strip>;
76
25
 
77
- export { AddItemsToBenefitRequest, AddItemsToBenefitResponse, QueryPoolDefinitionItemsRequest, QueryPoolDefinitionItemsResponse, RemoveItemsFromBenefitRequest, RemoveItemsFromBenefitResponse };
26
+ export { AddItemsToBenefitRequest, AddItemsToBenefitResponse, RemoveItemsFromBenefitRequest, RemoveItemsFromBenefitResponse };
@@ -1,102 +1,5 @@
1
1
  // src/benefit-programs-v1-pool-definition-item-pool-definition-items.schemas.ts
2
2
  import * as z from "zod";
3
- var QueryPoolDefinitionItemsRequest = z.object({
4
- query: z.intersection(
5
- z.object({
6
- filter: z.record(z.string(), z.any()).describe(
7
- 'Filter object in the following format:\n`"filter" : {\n"fieldName1": "value1",\n"fieldName2":{"$operator":"value2"}\n}`\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`'
8
- ).optional().nullable(),
9
- sort: z.array(
10
- z.object({
11
- fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
12
- order: z.enum(["ASC", "DESC"]).optional()
13
- })
14
- ).max(5).optional()
15
- }),
16
- z.xor([
17
- z.object({ cursorPaging: z.never().optional() }),
18
- z.object({
19
- cursorPaging: z.object({
20
- limit: z.number().int().describe("Maximum number of items to return in the results.").min(0).max(1e3).optional().nullable(),
21
- cursor: z.string().describe(
22
- "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request."
23
- ).max(16e3).optional().nullable()
24
- }).describe(
25
- "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`."
26
- )
27
- })
28
- ])
29
- ).describe("Query to select benefit items."),
30
- options: z.object({
31
- fields: z.array(
32
- z.enum(["POOL_DEFINITION", "PROGRAM_DEFINITION", "BENEFIT", "ITEM"])
33
- ).max(4).optional()
34
- }).optional()
35
- });
36
- var QueryPoolDefinitionItemsResponse = z.object({
37
- poolDefinitionItems: z.array(
38
- z.object({
39
- _id: z.string().describe("Benefit item ID.").regex(
40
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
41
- "Must be a valid GUID"
42
- ).optional(),
43
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
44
- "Revision number, which increments by 1 each time the benefit item is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the item.\n\nIgnored when creating an item."
45
- ).optional().nullable(),
46
- _createdDate: z.date().describe("Date and time the item was created.").optional().nullable(),
47
- _updatedDate: z.date().describe("Date and time the item was updated.").optional().nullable(),
48
- externalId: z.string().describe(
49
- "External item ID assigned by the provider of the items.\n\nFor example, if the benefit items are products, this ID corresponds to the specific product ID in the supplier's system."
50
- ).regex(
51
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
52
- "Must be a valid GUID"
53
- ).optional(),
54
- category: z.string().describe(
55
- "Item category. Groups benefit items together for organization and management purposes. For example, classes, posts, groups."
56
- ).max(20).optional(),
57
- providerAppId: z.string().describe(
58
- "ID of the application providing the benefit item.\n\nID of the external application supplying the items. Each item's external ID is unique to its respective provider's application."
59
- ).regex(
60
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
61
- "Must be a valid GUID"
62
- ).optional(),
63
- namespace: z.string().describe(
64
- "Module name of the item provider's application that originated the items.\n\nFor example, `store-inventory` or `fitness-resources`."
65
- ).min(1).max(20).optional(),
66
- poolDefinitionId: z.string().describe("Pool definition id").regex(
67
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
68
- "Must be a valid GUID"
69
- ).optional(),
70
- itemSetId: z.string().describe("Item set ID.").regex(
71
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
72
- "Must be a valid GUID"
73
- ).optional(),
74
- itemId: z.string().describe("Item set ID.").regex(
75
- /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
76
- "Must be a valid GUID"
77
- ).optional(),
78
- benefitKey: z.string().describe(
79
- "Unique identifier for the benefit associated with this item."
80
- ).max(64).optional()
81
- })
82
- ).optional(),
83
- metadata: z.object({
84
- count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
85
- cursors: z.object({
86
- next: z.string().describe(
87
- "Cursor string pointing to the next page in the list of results."
88
- ).max(16e3).optional().nullable(),
89
- prev: z.string().describe(
90
- "Cursor pointing to the previous page in the list of results."
91
- ).max(16e3).optional().nullable()
92
- }).describe(
93
- "Cursor strings that point to the next page, previous page, or both."
94
- ).optional(),
95
- hasNext: z.boolean().describe(
96
- "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."
97
- ).optional().nullable()
98
- }).describe("Metadata for paginated results.").optional()
99
- });
100
3
  var RemoveItemsFromBenefitRequest = z.object({
101
4
  itemReferences: z.array(
102
5
  z.object({
@@ -138,8 +41,6 @@ var AddItemsToBenefitResponse = z.object({});
138
41
  export {
139
42
  AddItemsToBenefitRequest,
140
43
  AddItemsToBenefitResponse,
141
- QueryPoolDefinitionItemsRequest,
142
- QueryPoolDefinitionItemsResponse,
143
44
  RemoveItemsFromBenefitRequest,
144
45
  RemoveItemsFromBenefitResponse
145
46
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.schemas.ts"],"sourcesContent":["import * as z from 'zod';\n\nexport const QueryPoolDefinitionItemsRequest = z.object({\n query: z\n .intersection(\n z.object({\n filter: z\n .record(z.string(), z.any())\n .describe(\n 'Filter object in the following format:\\n`\"filter\" : {\\n\"fieldName1\": \"value1\",\\n\"fieldName2\":{\"$operator\":\"value2\"}\\n}`\\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`'\n )\n .optional()\n .nullable(),\n sort: z\n .array(\n z.object({\n fieldName: z\n .string()\n .describe('Name of the field to sort by.')\n .max(512)\n .optional(),\n order: z.enum(['ASC', 'DESC']).optional(),\n })\n )\n .max(5)\n .optional(),\n }),\n z.xor([\n z.object({ cursorPaging: z.never().optional() }),\n z.object({\n cursorPaging: z\n .object({\n limit: z\n .number()\n .int()\n .describe('Maximum number of items to return in the results.')\n .min(0)\n .max(1000)\n .optional()\n .nullable(),\n cursor: z\n .string()\n .describe(\n \"Pointer to the next or previous page in the list of results.\\n\\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\\nNot relevant for the first request.\"\n )\n .max(16000)\n .optional()\n .nullable(),\n })\n .describe(\n 'Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.'\n ),\n }),\n ])\n )\n .describe('Query to select benefit items.'),\n options: z\n .object({\n fields: z\n .array(\n z.enum(['POOL_DEFINITION', 'PROGRAM_DEFINITION', 'BENEFIT', 'ITEM'])\n )\n .max(4)\n .optional(),\n })\n .optional(),\n});\nexport const QueryPoolDefinitionItemsResponse = z.object({\n poolDefinitionItems: z\n .array(\n z.object({\n _id: z\n .string()\n .describe('Benefit item ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n revision: z\n .string()\n .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n .describe(\n 'Revision number, which increments by 1 each time the benefit item is updated.\\nTo prevent conflicting changes, the current revision must be passed when updating the item.\\n\\nIgnored when creating an item.'\n )\n .optional()\n .nullable(),\n _createdDate: z\n .date()\n .describe('Date and time the item was created.')\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe('Date and time the item was updated.')\n .optional()\n .nullable(),\n externalId: z\n .string()\n .describe(\n \"External item ID assigned by the provider of the items.\\n\\nFor example, if the benefit items are products, this ID corresponds to the specific product ID in the supplier's system.\"\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n category: z\n .string()\n .describe(\n 'Item category. Groups benefit items together for organization and management purposes. For example, classes, posts, groups.'\n )\n .max(20)\n .optional(),\n providerAppId: z\n .string()\n .describe(\n \"ID of the application providing the benefit item.\\n\\nID of the external application supplying the items. Each item's external ID is unique to its respective provider's application.\"\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n namespace: z\n .string()\n .describe(\n \"Module name of the item provider's application that originated the items.\\n\\nFor example, `store-inventory` or `fitness-resources`.\"\n )\n .min(1)\n .max(20)\n .optional(),\n poolDefinitionId: z\n .string()\n .describe('Pool definition id')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n itemSetId: z\n .string()\n .describe('Item set ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n itemId: z\n .string()\n .describe('Item set ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n benefitKey: z\n .string()\n .describe(\n 'Unique identifier for the benefit associated with this item.'\n )\n .max(64)\n .optional(),\n })\n )\n .optional(),\n metadata: z\n .object({\n count: z\n .number()\n .int()\n .describe('Number of items returned in the response.')\n .optional()\n .nullable(),\n cursors: z\n .object({\n next: z\n .string()\n .describe(\n 'Cursor string pointing to the next page in the list of results.'\n )\n .max(16000)\n .optional()\n .nullable(),\n prev: z\n .string()\n .describe(\n 'Cursor pointing to the previous page in the list of results.'\n )\n .max(16000)\n .optional()\n .nullable(),\n })\n .describe(\n 'Cursor strings that point to the next page, previous page, or both.'\n )\n .optional(),\n hasNext: z\n .boolean()\n .describe(\n 'Whether there are more pages to retrieve following the current page.\\n\\n+ `true`: Another page of results can be retrieved.\\n+ `false`: This is the last page.'\n )\n .optional()\n .nullable(),\n })\n .describe('Metadata for paginated results.')\n .optional(),\n});\nexport const RemoveItemsFromBenefitRequest = z.object({\n itemReferences: z\n .array(\n z.object({\n externalId: z\n .string()\n .describe('External item ID assigned by the provider.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n category: z.string().describe('Item category.').max(20).optional(),\n })\n )\n .min(1)\n .max(100),\n options: z.object({\n poolDefinitionId: z\n .string()\n .describe('ID of the pool definition associated with the benefit.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n benefitKey: z\n .string()\n .describe('Key identifying the benefit within the pool definition.')\n .max(64),\n }),\n});\nexport const RemoveItemsFromBenefitResponse = z.object({});\nexport const AddItemsToBenefitRequest = z.object({\n itemReferences: z\n .array(\n z.object({\n externalId: z\n .string()\n .describe('External item ID assigned by the provider.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n category: z.string().describe('Item category.').max(20).optional(),\n })\n )\n .min(1)\n .max(100),\n options: z.object({\n poolDefinitionId: z\n .string()\n .describe('ID of the pool definition associated with the benefit.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n benefitKey: z\n .string()\n .describe('Key identifying the benefit within the pool definition.')\n .max(64),\n }),\n});\nexport const AddItemsToBenefitResponse = z.object({});\n"],"mappings":";AAAA,YAAY,OAAO;AAEZ,IAAM,kCAAoC,SAAO;AAAA,EACtD,OACG;AAAA,IACG,SAAO;AAAA,MACP,QACG,SAAS,SAAO,GAAK,MAAI,CAAC,EAC1B;AAAA,QACC;AAAA,MACF,EACC,SAAS,EACT,SAAS;AAAA,MACZ,MACG;AAAA,QACG,SAAO;AAAA,UACP,WACG,SAAO,EACP,SAAS,+BAA+B,EACxC,IAAI,GAAG,EACP,SAAS;AAAA,UACZ,OAAS,OAAK,CAAC,OAAO,MAAM,CAAC,EAAE,SAAS;AAAA,QAC1C,CAAC;AAAA,MACH,EACC,IAAI,CAAC,EACL,SAAS;AAAA,IACd,CAAC;AAAA,IACC,MAAI;AAAA,MACF,SAAO,EAAE,cAAgB,QAAM,EAAE,SAAS,EAAE,CAAC;AAAA,MAC7C,SAAO;AAAA,QACP,cACG,SAAO;AAAA,UACN,OACG,SAAO,EACP,IAAI,EACJ,SAAS,mDAAmD,EAC5D,IAAI,CAAC,EACL,IAAI,GAAI,EACR,SAAS,EACT,SAAS;AAAA,UACZ,QACG,SAAO,EACP;AAAA,YACC;AAAA,UACF,EACC,IAAI,IAAK,EACT,SAAS,EACT,SAAS;AAAA,QACd,CAAC,EACA;AAAA,UACC;AAAA,QACF;AAAA,MACJ,CAAC;AAAA,IACH,CAAC;AAAA,EACH,EACC,SAAS,gCAAgC;AAAA,EAC5C,SACG,SAAO;AAAA,IACN,QACG;AAAA,MACG,OAAK,CAAC,mBAAmB,sBAAsB,WAAW,MAAM,CAAC;AAAA,IACrE,EACC,IAAI,CAAC,EACL,SAAS;AAAA,EACd,CAAC,EACA,SAAS;AACd,CAAC;AACM,IAAM,mCAAqC,SAAO;AA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A;AAAA,IACF;AAAA,IACF,YACG,SAAO,EACP,SAAS,yDAAyD,EAClE,IAAI,EAAE;AAAA,EACX,CAAC;AACH,CAAC;AACM,IAAM,4BAA8B,SAAO,CAAC,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.schemas.ts"],"sourcesContent":["import * as z from 'zod';\n\nexport const RemoveItemsFromBenefitRequest = z.object({\n itemReferences: z\n .array(\n z.object({\n externalId: z\n .string()\n .describe('External item ID assigned by the provider.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n category: z.string().describe('Item category.').max(20).optional(),\n })\n )\n .min(1)\n .max(100),\n options: z.object({\n poolDefinitionId: z\n .string()\n .describe('ID of the pool definition associated with the benefit.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n benefitKey: z\n .string()\n .describe('Key identifying the benefit within the pool definition.')\n .max(64),\n }),\n});\nexport const RemoveItemsFromBenefitResponse = z.object({});\nexport const AddItemsToBenefitRequest = z.object({\n itemReferences: z\n .array(\n z.object({\n externalId: z\n .string()\n .describe('External item ID assigned by the provider.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n category: z.string().describe('Item category.').max(20).optional(),\n })\n )\n .min(1)\n .max(100),\n options: z.object({\n poolDefinitionId: z\n .string()\n .describe('ID of the pool definition associated with the benefit.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n benefitKey: z\n .string()\n .describe('Key identifying the benefit within the pool definition.')\n .max(64),\n }),\n});\nexport const AddItemsToBenefitResponse = z.object({});\n"],"mappings":";AAAA,YAAY,OAAO;AAEZ,IAAM,gCAAkC,SAAO;AAAA,EACpD,gBACG;AAAA,IACG,SAAO;AAAA,MACP,YACG,SAAO,EACP,SAAS,4CAA4C,EACrD;AAAA,QACC;AAAA,QACA;AAAA,MACF;AAAA,MACF,UAAY,SAAO,EAAE,SAAS,gBAAgB,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,IACnE,CAAC;AAAA,EACH,EACC,IAAI,CAAC,EACL,IAAI,GAAG;AAAA,EACV,SAAW,SAAO;AAAA,IAChB,kBACG,SAAO,EACP,SAAS,wDAAwD,EACjE;AAAA,MACC;AAAA,MACA;AAAA,IACF;AAAA,IACF,YACG,SAAO,EACP,SAAS,yDAAyD,EAClE,IAAI,EAAE;AAAA,EACX,CAAC;AACH,CAAC;AACM,IAAM,iCAAmC,SAAO,CAAC,CAAC;AAClD,IAAM,2BAA6B,SAAO;AAAA,EAC/C,gBACG;AAAA,IACG,SAAO;AAAA,MACP,YACG,SAAO,EACP,SAAS,4CAA4C,EACrD;AAAA,QACC;AAAA,QACA;AAAA,MACF;AAAA,MACF,UAAY,SAAO,EAAE,SAAS,gBAAgB,EAAE,IAAI,EAAE,EAAE,SAAS;AAAA,IACnE,CAAC;AAAA,EACH,EACC,IAAI,CAAC,EACL,IAAI,GAAG;AAAA,EACV,SAAW,SAAO;AAAA,IAChB,kBACG,SAAO,EACP,SAAS,wDAAwD,EACjE;AAAA,MACC;AAAA,MACA;AAAA,IACF;AAAA,IACF,YACG,SAAO,EACP,SAAS,yDAAyD,EAClE,IAAI,EAAE;AAAA,EACX,CAAC;AACH,CAAC;AACM,IAAM,4BAA8B,SAAO,CAAC,CAAC;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { ItemReference, RemoveItemsFromBenefitOptions, AddItemsToBenefitOptions, PoolDefinitionItemQuery, QueryPoolDefinitionItemsOptions, typedQueryPoolDefinitionItems, PoolDefinitionItemsQueryBuilder } from './index.typings.js';
3
- export { AccountInfo, ActionEvent, AddItemsToBenefitRequest, AddItemsToBenefitResponse, BenefitInfo, CommonQueryWithEntityContext, CreditConfiguration, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, IdentificationData, IdentificationDataIdOneOf, InvalidatePoolDefinitionItemsRequest, InvalidatePoolDefinitionItemsResponse, ItemInfo, MessageEnvelope, PoolDefinitionInfo, PoolDefinitionItem, PoolDefinitionItemDeactivated, PoolDefinitionItemQuerySpec, PoolDefinitionItemsQueryResult, ProgramDefinitionInfo, QueryPoolDefinitionItemsRequest, QueryPoolDefinitionItemsResponse, RemoveItemsFromBenefitRequest, RemoveItemsFromBenefitResponse, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
2
+ import { ItemReference, RemoveItemsFromBenefitOptions, AddItemsToBenefitOptions } from './index.typings.js';
3
+ export { AccountInfo, ActionEvent, AddItemsToBenefitRequest, AddItemsToBenefitResponse, BenefitInfo, CreditConfiguration, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, IdentificationData, IdentificationDataIdOneOf, InvalidatePoolDefinitionItemsRequest, InvalidatePoolDefinitionItemsResponse, ItemInfo, MessageEnvelope, PoolDefinitionInfo, PoolDefinitionItem, PoolDefinitionItemDeactivated, ProgramDefinitionInfo, QueryPoolDefinitionItemsRequest, QueryPoolDefinitionItemsResponse, RemoveItemsFromBenefitRequest, RemoveItemsFromBenefitResponse, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
4
4
 
5
5
  declare function removeItemsFromBenefit$1(httpClient: HttpClient): RemoveItemsFromBenefitSignature;
6
6
  interface RemoveItemsFromBenefitSignature {
@@ -19,12 +19,7 @@ interface AddItemsToBenefitSignature {
19
19
  (itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[], options: NonNullablePaths<AddItemsToBenefitOptions, `benefitKey` | `poolDefinitionId`, 2>): Promise<void>;
20
20
  }
21
21
 
22
- declare function customQueryPoolDefinitionItems(httpClient: HttpClient): {
23
- (query: PoolDefinitionItemQuery, options?: QueryPoolDefinitionItemsOptions): ReturnType<typeof typedQueryPoolDefinitionItems>;
24
- (options?: QueryPoolDefinitionItemsOptions): PoolDefinitionItemsQueryBuilder;
25
- };
26
22
  declare const removeItemsFromBenefit: MaybeContext<BuildRESTFunction<typeof removeItemsFromBenefit$1> & typeof removeItemsFromBenefit$1>;
27
23
  declare const addItemsToBenefit: MaybeContext<BuildRESTFunction<typeof addItemsToBenefit$1> & typeof addItemsToBenefit$1>;
28
- declare const queryPoolDefinitionItems: MaybeContext<BuildRESTFunction<typeof customQueryPoolDefinitionItems> & typeof customQueryPoolDefinitionItems>;
29
24
 
30
- export { AddItemsToBenefitOptions, ItemReference, PoolDefinitionItemQuery, PoolDefinitionItemsQueryBuilder, QueryPoolDefinitionItemsOptions, RemoveItemsFromBenefitOptions, addItemsToBenefit, queryPoolDefinitionItems, removeItemsFromBenefit };
25
+ export { AddItemsToBenefitOptions, ItemReference, RemoveItemsFromBenefitOptions, addItemsToBenefit, removeItemsFromBenefit };
@@ -24,20 +24,15 @@ __export(index_exports, {
24
24
  SortOrder: () => SortOrder,
25
25
  WebhookIdentityType: () => WebhookIdentityType,
26
26
  addItemsToBenefit: () => addItemsToBenefit4,
27
- queryPoolDefinitionItems: () => queryPoolDefinitionItems4,
28
- removeItemsFromBenefit: () => removeItemsFromBenefit4,
29
- utils: () => utils
27
+ removeItemsFromBenefit: () => removeItemsFromBenefit4
30
28
  });
31
29
  module.exports = __toCommonJS(index_exports);
32
30
 
33
31
  // src/benefit-programs-v1-pool-definition-item-pool-definition-items.universal.ts
34
32
  var import_transform_error = require("@wix/sdk-runtime/transform-error");
35
- var import_query_builder = require("@wix/sdk-runtime/query-builder");
36
33
  var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
37
34
 
38
35
  // src/benefit-programs-v1-pool-definition-item-pool-definition-items.http.ts
39
- var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
40
- var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
41
36
  var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
42
37
  function resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(opts) {
43
38
  const domainToMappings = {
@@ -63,34 +58,6 @@ function resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceU
63
58
  return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
64
59
  }
65
60
  var PACKAGE_NAME = "@wix/auto_sdk_benefit-programs_pool-definition-items";
66
- function queryPoolDefinitionItems(payload) {
67
- function __queryPoolDefinitionItems({ host }) {
68
- const metadata = {
69
- entityFqdn: "wix.benefit_programs.v1.pool_definition_item",
70
- method: "POST",
71
- methodFqn: "wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.QueryPoolDefinitionItems",
72
- packageName: PACKAGE_NAME,
73
- migrationOptions: {
74
- optInTransformResponse: true
75
- },
76
- url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(
77
- { protoPath: "/v1/pool-definition-items/query", data: payload, host }
78
- ),
79
- data: payload,
80
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
81
- {
82
- transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
83
- paths: [
84
- { path: "poolDefinitionItems.createdDate" },
85
- { path: "poolDefinitionItems.updatedDate" }
86
- ]
87
- }
88
- ])
89
- };
90
- return metadata;
91
- }
92
- return __queryPoolDefinitionItems;
93
- }
94
61
  function removeItemsFromBenefit(payload) {
95
62
  function __removeItemsFromBenefit({ host }) {
96
63
  const metadata = {
@@ -139,8 +106,6 @@ function addItemsToBenefit(payload) {
139
106
  }
140
107
 
141
108
  // src/benefit-programs-v1-pool-definition-item-pool-definition-items.universal.ts
142
- var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
143
- var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
144
109
  var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
145
110
  SortOrder2["ASC"] = "ASC";
146
111
  SortOrder2["DESC"] = "DESC";
@@ -161,86 +126,6 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
161
126
  WebhookIdentityType2["APP"] = "APP";
162
127
  return WebhookIdentityType2;
163
128
  })(WebhookIdentityType || {});
164
- function queryPoolDefinitionItems2(options) {
165
- const { httpClient, sideEffects } = arguments[1];
166
- return (0, import_query_builder.queryBuilder)({
167
- func: async (payload) => {
168
- const reqOpts = queryPoolDefinitionItems(
169
- { ...payload, ...options ?? {} }
170
- );
171
- sideEffects?.onSiteCall?.();
172
- try {
173
- const result = await httpClient.request(reqOpts);
174
- sideEffects?.onSuccess?.(result);
175
- return result;
176
- } catch (err) {
177
- sideEffects?.onError?.(err);
178
- throw err;
179
- }
180
- },
181
- requestTransformer: (query) => {
182
- const args = [query, options];
183
- return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
184
- ...args?.[1],
185
- query: args?.[0]
186
- });
187
- },
188
- responseTransformer: ({
189
- data
190
- }) => {
191
- const transformedData = (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
192
- (0, import_transform_paths2.transformPaths)(data, [])
193
- );
194
- return {
195
- items: transformedData?.poolDefinitionItems,
196
- pagingMetadata: transformedData?.metadata
197
- };
198
- },
199
- errorTransformer: (err) => {
200
- const transformedError = (0, import_transform_error.transformError)(err, {
201
- spreadPathsToArguments: {},
202
- explicitPathsToArguments: { query: "$[0]" },
203
- singleArgumentUnchanged: false
204
- });
205
- throw transformedError;
206
- },
207
- pagingMethod: "CURSOR",
208
- transformationPaths: {}
209
- });
210
- }
211
- async function typedQueryPoolDefinitionItems(query, options) {
212
- const { httpClient, sideEffects } = arguments[2];
213
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
214
- query,
215
- ...options
216
- });
217
- const reqOpts = queryPoolDefinitionItems(
218
- payload
219
- );
220
- sideEffects?.onSiteCall?.();
221
- try {
222
- const result = await httpClient.request(reqOpts);
223
- sideEffects?.onSuccess?.(result);
224
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
225
- } catch (err) {
226
- const transformedError = (0, import_transform_error.transformError)(
227
- err,
228
- {
229
- spreadPathsToArguments: {},
230
- explicitPathsToArguments: { query: "$[0]" },
231
- singleArgumentUnchanged: false
232
- },
233
- ["query", "options"]
234
- );
235
- sideEffects?.onError?.(err);
236
- throw transformedError;
237
- }
238
- }
239
- var utils = {
240
- query: {
241
- ...(0, import_query_builder_utils.createQueryUtils)()
242
- }
243
- };
244
129
  async function removeItemsFromBenefit2(itemReferences, options) {
245
130
  const { httpClient, sideEffects } = arguments[2];
246
131
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
@@ -305,21 +190,6 @@ async function addItemsToBenefit2(itemReferences, options) {
305
190
  }
306
191
 
307
192
  // src/benefit-programs-v1-pool-definition-item-pool-definition-items.public.ts
308
- function queryPoolDefinitionItems3(httpClient) {
309
- return (options) => queryPoolDefinitionItems2(
310
- options,
311
- // @ts-ignore
312
- { httpClient }
313
- );
314
- }
315
- function typedQueryPoolDefinitionItems2(httpClient) {
316
- return (query, options) => typedQueryPoolDefinitionItems(
317
- query,
318
- options,
319
- // @ts-ignore
320
- { httpClient }
321
- );
322
- }
323
193
  function removeItemsFromBenefit3(httpClient) {
324
194
  return (itemReferences, options) => removeItemsFromBenefit2(
325
195
  itemReferences,
@@ -339,29 +209,14 @@ function addItemsToBenefit3(httpClient) {
339
209
 
340
210
  // src/benefit-programs-v1-pool-definition-item-pool-definition-items.context.ts
341
211
  var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
342
- var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
343
- function customQueryPoolDefinitionItems(httpClient) {
344
- const router = (0, import_query_method_router.createQueryOverloadRouter)({
345
- builderQueryFunction: (options) => queryPoolDefinitionItems3(httpClient)(options),
346
- typedQueryFunction: (query, options) => typedQueryPoolDefinitionItems2(httpClient)(query, options),
347
- hasOptionsParameter: true
348
- });
349
- function overloadedQuery(queryOrOptions, options) {
350
- return router(...arguments);
351
- }
352
- return overloadedQuery;
353
- }
354
212
  var removeItemsFromBenefit4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(removeItemsFromBenefit3);
355
213
  var addItemsToBenefit4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(addItemsToBenefit3);
356
- var queryPoolDefinitionItems4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(customQueryPoolDefinitionItems);
357
214
  // Annotate the CommonJS export names for ESM import in node:
358
215
  0 && (module.exports = {
359
216
  RequestedFields,
360
217
  SortOrder,
361
218
  WebhookIdentityType,
362
219
  addItemsToBenefit,
363
- queryPoolDefinitionItems,
364
- removeItemsFromBenefit,
365
- utils
220
+ removeItemsFromBenefit
366
221
  });
367
222
  //# sourceMappingURL=index.js.map