@wix/auto_sdk_benefit-programs_pool-definition-items 1.0.9 → 1.0.11
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 +21 -7
- package/build/cjs/index.js +149 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +323 -26
- package/build/cjs/index.typings.js +123 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +124 -22
- package/build/cjs/meta.js +52 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +114 -3
- package/build/cjs/schemas.js +223 -2
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +21 -7
- package/build/es/index.mjs +150 -2
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +323 -26
- package/build/es/index.typings.mjs +123 -2
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +124 -22
- package/build/es/meta.mjs +51 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +114 -3
- package/build/es/schemas.mjs +221 -2
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +21 -7
- package/build/internal/cjs/index.js +149 -2
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +301 -35
- package/build/internal/cjs/index.typings.js +123 -2
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +124 -22
- package/build/internal/cjs/meta.js +52 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +114 -3
- package/build/internal/cjs/schemas.js +223 -2
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +21 -7
- package/build/internal/es/index.mjs +150 -2
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +301 -35
- package/build/internal/es/index.typings.mjs +123 -2
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +124 -22
- package/build/internal/es/meta.mjs +51 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +114 -3
- package/build/internal/es/schemas.mjs +221 -2
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/schemas.js
CHANGED
|
@@ -32,6 +32,8 @@ var schemas_exports = {};
|
|
|
32
32
|
__export(schemas_exports, {
|
|
33
33
|
AddItemsToBenefitRequest: () => AddItemsToBenefitRequest,
|
|
34
34
|
AddItemsToBenefitResponse: () => AddItemsToBenefitResponse,
|
|
35
|
+
QueryPoolDefinitionItemsRequest: () => QueryPoolDefinitionItemsRequest,
|
|
36
|
+
QueryPoolDefinitionItemsResponse: () => QueryPoolDefinitionItemsResponse,
|
|
35
37
|
RemoveItemsFromBenefitRequest: () => RemoveItemsFromBenefitRequest,
|
|
36
38
|
RemoveItemsFromBenefitResponse: () => RemoveItemsFromBenefitResponse
|
|
37
39
|
});
|
|
@@ -39,6 +41,155 @@ module.exports = __toCommonJS(schemas_exports);
|
|
|
39
41
|
|
|
40
42
|
// src/benefit-programs-v1-pool-definition-item-pool-definition-items.schemas.ts
|
|
41
43
|
var z = __toESM(require("zod"));
|
|
44
|
+
var QueryPoolDefinitionItemsRequest = z.object({
|
|
45
|
+
query: z.intersection(
|
|
46
|
+
z.object({
|
|
47
|
+
filter: z.record(z.string(), z.any()).describe(
|
|
48
|
+
'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`'
|
|
49
|
+
).optional().nullable(),
|
|
50
|
+
sort: z.array(
|
|
51
|
+
z.object({
|
|
52
|
+
fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
|
|
53
|
+
order: z.enum(["ASC", "DESC"]).optional()
|
|
54
|
+
})
|
|
55
|
+
).max(5).optional()
|
|
56
|
+
}),
|
|
57
|
+
z.xor([
|
|
58
|
+
z.object({ cursorPaging: z.never().optional() }),
|
|
59
|
+
z.object({
|
|
60
|
+
cursorPaging: z.object({
|
|
61
|
+
limit: z.number().int().describe("Maximum number of items to return in the results.").min(0).max(1e3).optional().nullable(),
|
|
62
|
+
cursor: z.string().describe(
|
|
63
|
+
"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."
|
|
64
|
+
).max(16e3).optional().nullable()
|
|
65
|
+
}).describe(
|
|
66
|
+
"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`."
|
|
67
|
+
)
|
|
68
|
+
})
|
|
69
|
+
])
|
|
70
|
+
).describe("Query to select benefit items."),
|
|
71
|
+
options: z.object({
|
|
72
|
+
fields: z.array(
|
|
73
|
+
z.enum(["POOL_DEFINITION", "PROGRAM_DEFINITION", "BENEFIT", "ITEM"])
|
|
74
|
+
).max(4).optional()
|
|
75
|
+
}).optional()
|
|
76
|
+
});
|
|
77
|
+
var QueryPoolDefinitionItemsResponse = z.object({
|
|
78
|
+
poolDefinitionItems: z.array(
|
|
79
|
+
z.object({
|
|
80
|
+
_id: z.string().describe(
|
|
81
|
+
"Benefit item ID. Deterministically generated from pool_definition_id and item_id \u2014 if you know both, you can compute the ID without querying."
|
|
82
|
+
).regex(
|
|
83
|
+
/^[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}$/,
|
|
84
|
+
"Must be a valid GUID"
|
|
85
|
+
).optional(),
|
|
86
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
87
|
+
"Revision number, which increments by 1 each time the benefit item is updated."
|
|
88
|
+
).optional().nullable(),
|
|
89
|
+
_createdDate: z.date().describe("Date and time the item was created.").optional().nullable(),
|
|
90
|
+
_updatedDate: z.date().describe("Date and time the item was updated.").optional().nullable(),
|
|
91
|
+
externalId: z.string().describe(
|
|
92
|
+
"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 provider's system."
|
|
93
|
+
).regex(
|
|
94
|
+
/^[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}$/,
|
|
95
|
+
"Must be a valid GUID"
|
|
96
|
+
).optional(),
|
|
97
|
+
category: z.string().describe(
|
|
98
|
+
"Item category. Groups benefit items together for organization and management purposes. For example, classes, posts, groups."
|
|
99
|
+
).max(20).optional(),
|
|
100
|
+
providerAppId: z.string().describe(
|
|
101
|
+
"ID of the application providing the benefit items. Each item's external_id is unique within its provider application."
|
|
102
|
+
).regex(
|
|
103
|
+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
104
|
+
"Must be a valid GUID"
|
|
105
|
+
).optional(),
|
|
106
|
+
namespace: z.string().describe(
|
|
107
|
+
"Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you\ncreated and entities that other apps created."
|
|
108
|
+
).min(1).max(20).optional(),
|
|
109
|
+
poolDefinitionId: z.string().describe(
|
|
110
|
+
"ID of the pool definition - the configuration that defines a set of benefits and which items are accessible within each benefit."
|
|
111
|
+
).regex(
|
|
112
|
+
/^[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}$/,
|
|
113
|
+
"Must be a valid GUID"
|
|
114
|
+
).optional(),
|
|
115
|
+
itemSetId: z.string().describe(
|
|
116
|
+
"Internal grouping identifier for this benefit's item set. Use pool_definition_id together with benefit_key\nto identify a benefit \u2014 item_set_id is an implementation detail."
|
|
117
|
+
).regex(
|
|
118
|
+
/^[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}$/,
|
|
119
|
+
"Must be a valid GUID"
|
|
120
|
+
).optional(),
|
|
121
|
+
poolDefinition: z.object({
|
|
122
|
+
displayName: z.string().describe("Pool definition name.").max(64).optional(),
|
|
123
|
+
description: z.string().describe("Pool definition description.").max(450).optional().nullable(),
|
|
124
|
+
creditConfiguration: z.object({
|
|
125
|
+
amount: z.string().describe(
|
|
126
|
+
"Number of credits initially granted to a subscriber when this pool definition's benefits are activated."
|
|
127
|
+
).optional(),
|
|
128
|
+
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable(),
|
|
129
|
+
unitType: z.string().describe("Credit unit type.").max(16).optional().nullable()
|
|
130
|
+
}).describe(
|
|
131
|
+
"Credit configuration for this pool definition. When absent, benefits in this pool do not support credit-based pricing."
|
|
132
|
+
).optional()
|
|
133
|
+
}).describe(
|
|
134
|
+
"Pool definition details including display name, description, and credit settings. Only populated when\nPOOL_DEFINITION is included in the fields request parameter."
|
|
135
|
+
).optional(),
|
|
136
|
+
programDefinitions: z.array(
|
|
137
|
+
z.object({
|
|
138
|
+
_id: z.string().describe("Program definition id").regex(
|
|
139
|
+
/^[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}$/,
|
|
140
|
+
"Must be a valid GUID"
|
|
141
|
+
).optional(),
|
|
142
|
+
externalId: z.string().describe("Program definition external id").regex(
|
|
143
|
+
/^[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}$/,
|
|
144
|
+
"Must be a valid GUID"
|
|
145
|
+
).optional().nullable(),
|
|
146
|
+
displayName: z.string().describe("Program definition name").max(64).optional().nullable(),
|
|
147
|
+
description: z.string().describe("Program definition description.").max(450).optional().nullable()
|
|
148
|
+
})
|
|
149
|
+
).max(20).optional(),
|
|
150
|
+
itemId: z.string().describe("Item ID.").regex(
|
|
151
|
+
/^[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}$/,
|
|
152
|
+
"Must be a valid GUID"
|
|
153
|
+
).optional(),
|
|
154
|
+
benefitInfo: z.object({
|
|
155
|
+
price: z.string().describe(
|
|
156
|
+
"Price of the benefit in credits. The price is the same for all of this benefit's items."
|
|
157
|
+
).optional().nullable(),
|
|
158
|
+
displayName: z.string().describe("Benefit name.").max(40).optional().nullable(),
|
|
159
|
+
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
160
|
+
}).describe(
|
|
161
|
+
"Pricing and display information for the associated benefit, including credit price, name, and description.\nOnly populated when BENEFIT is included in the fields request parameter."
|
|
162
|
+
).optional(),
|
|
163
|
+
itemInfo: z.object({
|
|
164
|
+
displayName: z.string().describe("Item display name.").max(64).optional().nullable()
|
|
165
|
+
}).describe(
|
|
166
|
+
"Display name for the catalog item. Only populated when ITEM is included in the fields request parameter."
|
|
167
|
+
).optional(),
|
|
168
|
+
benefitKey: z.string().describe(
|
|
169
|
+
"Unique identifier for the benefit associated with this item."
|
|
170
|
+
).max(64).optional(),
|
|
171
|
+
itemReferenceSearchKey: z.string().describe(
|
|
172
|
+
"Pre-computed search key for the item reference, built by concatenating provider_app_id, category, and external_id\nseparated by /. Use this field for efficient single-field filtering instead of composing three separate conditions."
|
|
173
|
+
).max(94).optional()
|
|
174
|
+
})
|
|
175
|
+
).optional(),
|
|
176
|
+
metadata: z.object({
|
|
177
|
+
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
178
|
+
cursors: z.object({
|
|
179
|
+
next: z.string().describe(
|
|
180
|
+
"Cursor string pointing to the next page in the list of results."
|
|
181
|
+
).max(16e3).optional().nullable(),
|
|
182
|
+
prev: z.string().describe(
|
|
183
|
+
"Cursor pointing to the previous page in the list of results."
|
|
184
|
+
).max(16e3).optional().nullable()
|
|
185
|
+
}).describe(
|
|
186
|
+
"Cursor strings that point to the next page, previous page, or both."
|
|
187
|
+
).optional(),
|
|
188
|
+
hasNext: z.boolean().describe(
|
|
189
|
+
"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."
|
|
190
|
+
).optional().nullable()
|
|
191
|
+
}).describe("Metadata for paginated results.").optional()
|
|
192
|
+
});
|
|
42
193
|
var RemoveItemsFromBenefitRequest = z.object({
|
|
43
194
|
itemReferences: z.array(
|
|
44
195
|
z.object({
|
|
@@ -57,7 +208,42 @@ var RemoveItemsFromBenefitRequest = z.object({
|
|
|
57
208
|
benefitKey: z.string().describe("Key identifying the benefit within the pool definition.").max(64)
|
|
58
209
|
})
|
|
59
210
|
});
|
|
60
|
-
var RemoveItemsFromBenefitResponse = z.object({
|
|
211
|
+
var RemoveItemsFromBenefitResponse = z.object({
|
|
212
|
+
results: z.array(
|
|
213
|
+
z.object({
|
|
214
|
+
itemMetadata: z.object({
|
|
215
|
+
_id: z.string().describe(
|
|
216
|
+
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
217
|
+
).regex(
|
|
218
|
+
/^[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}$/,
|
|
219
|
+
"Must be a valid GUID"
|
|
220
|
+
).optional().nullable(),
|
|
221
|
+
originalIndex: z.number().int().describe(
|
|
222
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
223
|
+
).optional(),
|
|
224
|
+
success: z.boolean().describe(
|
|
225
|
+
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
226
|
+
).optional(),
|
|
227
|
+
error: z.object({
|
|
228
|
+
code: z.string().describe("Error code.").optional(),
|
|
229
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
230
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
231
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
232
|
+
}).describe(
|
|
233
|
+
"Outcome metadata for a single item \u2014 includes the underlying item ID, success flag, and error details on failure."
|
|
234
|
+
).optional()
|
|
235
|
+
})
|
|
236
|
+
).optional(),
|
|
237
|
+
bulkActionMetadata: z.object({
|
|
238
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
239
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
240
|
+
undetailedFailures: z.number().int().describe(
|
|
241
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
242
|
+
).optional()
|
|
243
|
+
}).describe(
|
|
244
|
+
"Aggregate counts (successes, failures) for the bulk operation. Unresolved item references are counted as failures."
|
|
245
|
+
).optional()
|
|
246
|
+
});
|
|
61
247
|
var AddItemsToBenefitRequest = z.object({
|
|
62
248
|
itemReferences: z.array(
|
|
63
249
|
z.object({
|
|
@@ -76,11 +262,46 @@ var AddItemsToBenefitRequest = z.object({
|
|
|
76
262
|
benefitKey: z.string().describe("Key identifying the benefit within the pool definition.").max(64)
|
|
77
263
|
})
|
|
78
264
|
});
|
|
79
|
-
var AddItemsToBenefitResponse = z.object({
|
|
265
|
+
var AddItemsToBenefitResponse = z.object({
|
|
266
|
+
results: z.array(
|
|
267
|
+
z.object({
|
|
268
|
+
itemMetadata: z.object({
|
|
269
|
+
_id: z.string().describe(
|
|
270
|
+
"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
|
|
271
|
+
).regex(
|
|
272
|
+
/^[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}$/,
|
|
273
|
+
"Must be a valid GUID"
|
|
274
|
+
).optional().nullable(),
|
|
275
|
+
originalIndex: z.number().int().describe(
|
|
276
|
+
"Index of the item within the request array. Allows for correlation between request and response items."
|
|
277
|
+
).optional(),
|
|
278
|
+
success: z.boolean().describe(
|
|
279
|
+
"Whether the requested action was successful for this item. When `false`, the `error` field is populated."
|
|
280
|
+
).optional(),
|
|
281
|
+
error: z.object({
|
|
282
|
+
code: z.string().describe("Error code.").optional(),
|
|
283
|
+
description: z.string().describe("Description of the error.").optional(),
|
|
284
|
+
data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
|
|
285
|
+
}).describe("Details about the error in case of failure.").optional()
|
|
286
|
+
}).describe(
|
|
287
|
+
"Outcome metadata for the catalog item created in the underlying item service. The item ID here is the Item entity\nID \u2014 PoolDefinitionItem records are created asynchronously and their IDs are not returned in this response."
|
|
288
|
+
).optional()
|
|
289
|
+
})
|
|
290
|
+
).optional(),
|
|
291
|
+
bulkActionMetadata: z.object({
|
|
292
|
+
totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
|
|
293
|
+
totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
|
|
294
|
+
undetailedFailures: z.number().int().describe(
|
|
295
|
+
"Number of failures without details because detailed failure threshold was exceeded."
|
|
296
|
+
).optional()
|
|
297
|
+
}).describe("Aggregate counts (successes, failures) for the bulk operation.").optional()
|
|
298
|
+
});
|
|
80
299
|
// Annotate the CommonJS export names for ESM import in node:
|
|
81
300
|
0 && (module.exports = {
|
|
82
301
|
AddItemsToBenefitRequest,
|
|
83
302
|
AddItemsToBenefitResponse,
|
|
303
|
+
QueryPoolDefinitionItemsRequest,
|
|
304
|
+
QueryPoolDefinitionItemsResponse,
|
|
84
305
|
RemoveItemsFromBenefitRequest,
|
|
85
306
|
RemoveItemsFromBenefitResponse
|
|
86
307
|
});
|
package/build/cjs/schemas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../schemas.ts","../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.schemas.ts"],"sourcesContent":["export * from './src/benefit-programs-v1-pool-definition-item-pool-definition-items.schemas.js';\n","import * as z from 'zod';\n\nexport const RemoveItemsFromBenefitRequest = z.object({\n itemReferences: z\n .array(\n z.object({\n externalId: z\n .string()\n .describe('External item ID assigned by the provider.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n category: z.string().describe('Item category.').max(20).optional(),\n })\n )\n .min(1)\n .max(100),\n options: z.object({\n poolDefinitionId: z\n .string()\n .describe('ID of the pool definition associated with the benefit.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n benefitKey: z\n .string()\n .describe('Key identifying the benefit within the pool definition.')\n .max(64),\n }),\n});\nexport const RemoveItemsFromBenefitResponse = z.object({});\nexport const AddItemsToBenefitRequest = z.object({\n itemReferences: z\n .array(\n z.object({\n externalId: z\n .string()\n .describe('External item ID assigned by the provider.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n category: z.string().describe('Item category.').max(20).optional(),\n })\n )\n .min(1)\n .max(100),\n options: z.object({\n poolDefinitionId: z\n .string()\n .describe('ID of the pool definition associated with the benefit.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n benefitKey: z\n .string()\n .describe('Key identifying the benefit within the pool definition.')\n .max(64),\n }),\n});\nexport const AddItemsToBenefitResponse = z.object({});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,QAAmB;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
|
+
{"version":3,"sources":["../../schemas.ts","../../src/benefit-programs-v1-pool-definition-item-pool-definition-items.schemas.ts"],"sourcesContent":["export * from './src/benefit-programs-v1-pool-definition-item-pool-definition-items.schemas.js';\n","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(\n 'Benefit item ID. Deterministically generated from pool_definition_id and item_id — if you know both, you can compute the ID without querying.'\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 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.'\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 provider'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 items. Each item's external_id is unique within its provider 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 \"Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you\\ncreated and entities that other apps created.\"\n )\n .min(1)\n .max(20)\n .optional(),\n poolDefinitionId: z\n .string()\n .describe(\n 'ID of the pool definition - the configuration that defines a set of benefits and which items are accessible within each benefit.'\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 itemSetId: z\n .string()\n .describe(\n \"Internal grouping identifier for this benefit's item set. Use pool_definition_id together with benefit_key\\nto identify a benefit — item_set_id is an implementation detail.\"\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 poolDefinition: z\n .object({\n displayName: z\n .string()\n .describe('Pool definition name.')\n .max(64)\n .optional(),\n description: z\n .string()\n .describe('Pool definition description.')\n .max(450)\n .optional()\n .nullable(),\n creditConfiguration: z\n .object({\n amount: z\n .string()\n .describe(\n \"Number of credits initially granted to a subscriber when this pool definition's benefits are activated.\"\n )\n .optional(),\n unitDisplayName: z\n .string()\n .describe('Credit unit display name.')\n .max(32)\n .optional()\n .nullable(),\n unitType: z\n .string()\n .describe('Credit unit type.')\n .max(16)\n .optional()\n .nullable(),\n })\n .describe(\n 'Credit configuration for this pool definition. When absent, benefits in this pool do not support credit-based pricing.'\n )\n .optional(),\n })\n .describe(\n 'Pool definition details including display name, description, and credit settings. Only populated when\\nPOOL_DEFINITION is included in the fields request parameter.'\n )\n .optional(),\n programDefinitions: z\n .array(\n z.object({\n _id: z\n .string()\n .describe('Program 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 externalId: z\n .string()\n .describe('Program definition external 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 .nullable(),\n displayName: z\n .string()\n .describe('Program definition name')\n .max(64)\n .optional()\n .nullable(),\n description: z\n .string()\n .describe('Program definition description.')\n .max(450)\n .optional()\n .nullable(),\n })\n )\n .max(20)\n .optional(),\n itemId: z\n .string()\n .describe('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 benefitInfo: z\n .object({\n price: z\n .string()\n .describe(\n \"Price of the benefit in credits. The price is the same for all of this benefit's items.\"\n )\n .optional()\n .nullable(),\n displayName: z\n .string()\n .describe('Benefit name.')\n .max(40)\n .optional()\n .nullable(),\n description: z\n .string()\n .describe('Benefit description.')\n .max(255)\n .optional()\n .nullable(),\n })\n .describe(\n 'Pricing and display information for the associated benefit, including credit price, name, and description.\\nOnly populated when BENEFIT is included in the fields request parameter.'\n )\n .optional(),\n itemInfo: z\n .object({\n displayName: z\n .string()\n .describe('Item display name.')\n .max(64)\n .optional()\n .nullable(),\n })\n .describe(\n 'Display name for the catalog item. Only populated when ITEM is included in the fields request parameter.'\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 itemReferenceSearchKey: z\n .string()\n .describe(\n 'Pre-computed search key for the item reference, built by concatenating provider_app_id, category, and external_id\\nseparated by /. Use this field for efficient single-field filtering instead of composing three separate conditions.'\n )\n .max(94)\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({\n results: z\n .array(\n z.object({\n itemMetadata: z\n .object({\n _id: z\n .string()\n .describe(\n \"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\"\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 .nullable(),\n originalIndex: z\n .number()\n .int()\n .describe(\n 'Index of the item within the request array. Allows for correlation between request and response items.'\n )\n .optional(),\n success: z\n .boolean()\n .describe(\n 'Whether the requested action was successful for this item. When `false`, the `error` field is populated.'\n )\n .optional(),\n error: z\n .object({\n code: z.string().describe('Error code.').optional(),\n description: z\n .string()\n .describe('Description of the error.')\n .optional(),\n data: z\n .record(z.string(), z.any())\n .describe('Data related to the error.')\n .optional()\n .nullable(),\n })\n .describe('Details about the error in case of failure.')\n .optional(),\n })\n .describe(\n 'Outcome metadata for a single item — includes the underlying item ID, success flag, and error details on failure.'\n )\n .optional(),\n })\n )\n .optional(),\n bulkActionMetadata: z\n .object({\n totalSuccesses: z\n .number()\n .int()\n .describe('Number of items that were successfully processed.')\n .optional(),\n totalFailures: z\n .number()\n .int()\n .describe(\"Number of items that couldn't be processed.\")\n .optional(),\n undetailedFailures: z\n .number()\n .int()\n .describe(\n 'Number of failures without details because detailed failure threshold was exceeded.'\n )\n .optional(),\n })\n .describe(\n 'Aggregate counts (successes, failures) for the bulk operation. Unresolved item references are counted as failures.'\n )\n .optional(),\n});\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 results: z\n .array(\n z.object({\n itemMetadata: z\n .object({\n _id: z\n .string()\n .describe(\n \"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\"\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 .nullable(),\n originalIndex: z\n .number()\n .int()\n .describe(\n 'Index of the item within the request array. Allows for correlation between request and response items.'\n )\n .optional(),\n success: z\n .boolean()\n .describe(\n 'Whether the requested action was successful for this item. When `false`, the `error` field is populated.'\n )\n .optional(),\n error: z\n .object({\n code: z.string().describe('Error code.').optional(),\n description: z\n .string()\n .describe('Description of the error.')\n .optional(),\n data: z\n .record(z.string(), z.any())\n .describe('Data related to the error.')\n .optional()\n .nullable(),\n })\n .describe('Details about the error in case of failure.')\n .optional(),\n })\n .describe(\n 'Outcome metadata for the catalog item created in the underlying item service. The item ID here is the Item entity\\nID — PoolDefinitionItem records are created asynchronously and their IDs are not returned in this response.'\n )\n .optional(),\n })\n )\n .optional(),\n bulkActionMetadata: z\n .object({\n totalSuccesses: z\n .number()\n .int()\n .describe('Number of items that were successfully processed.')\n .optional(),\n totalFailures: z\n .number()\n .int()\n .describe(\"Number of items that couldn't be processed.\")\n .optional(),\n undetailedFailures: z\n .number()\n .int()\n .describe(\n 'Number of failures without details because detailed failure threshold was exceeded.'\n )\n .optional(),\n })\n .describe('Aggregate counts (successes, failures) for the bulk operation.')\n .optional(),\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,QAAmB;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,mBAAm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","names":[]}
|
package/build/es/index.d.mts
CHANGED
|
@@ -1,25 +1,39 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { ItemReference, RemoveItemsFromBenefitOptions, AddItemsToBenefitOptions } from './index.typings.mjs';
|
|
3
|
-
export { AccountInfo, ActionEvent, AddItemsToBenefitRequest,
|
|
2
|
+
import { ItemReference, RemoveItemsFromBenefitOptions, RemoveItemsFromBenefitResponse, RemoveItemsFromBenefitApplicationErrors, AddItemsToBenefitOptions, AddItemsToBenefitResponse, AddItemsToBenefitApplicationErrors, PoolDefinitionItemQuery, QueryPoolDefinitionItemsOptions, typedQueryPoolDefinitionItems, PoolDefinitionItemsQueryBuilder } from './index.typings.mjs';
|
|
3
|
+
export { AccountInfo, ActionEvent, AddItemsToBenefitRequest, ApplicationError, BenefitInfo, BulkActionMetadata, BulkAddItemResult, BulkRemoveItemResult, CommonQueryWithEntityContext, CreditConfiguration, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, IdentificationData, IdentificationDataIdOneOf, InvalidatePoolDefinitionItemsRequest, InvalidatePoolDefinitionItemsResponse, ItemInfo, ItemMetadata, MessageEnvelope, PoolDefinitionInfo, PoolDefinitionItem, PoolDefinitionItemDeactivated, PoolDefinitionItemQuerySpec, PoolDefinitionItemRemoved, PoolDefinitionItemsQueryResult, ProgramDefinitionInfo, QueryPoolDefinitionItemsRequest, QueryPoolDefinitionItemsResponse, RemoveItemsFromBenefitRequest, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.mjs';
|
|
4
4
|
|
|
5
5
|
declare function removeItemsFromBenefit$1(httpClient: HttpClient): RemoveItemsFromBenefitSignature;
|
|
6
6
|
interface RemoveItemsFromBenefitSignature {
|
|
7
7
|
/**
|
|
8
|
-
* Removes items from a benefit
|
|
8
|
+
* Removes items from a benefit. Items are removed asynchronously — they may briefly still appear in
|
|
9
|
+
* QueryPoolDefinitionItems results after the call returns.
|
|
10
|
+
* Item references not matching any registered item appear in results as per-item failures with `item_metadata.error.code` set to `NOT_FOUND`.
|
|
9
11
|
* @param - Items to remove from the benefit's item set.
|
|
10
12
|
*/
|
|
11
|
-
(itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[], options: NonNullablePaths<RemoveItemsFromBenefitOptions, `benefitKey` | `poolDefinitionId`, 2>): Promise<
|
|
13
|
+
(itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[], options: NonNullablePaths<RemoveItemsFromBenefitOptions, `benefitKey` | `poolDefinitionId`, 2>): Promise<NonNullablePaths<RemoveItemsFromBenefitResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6> & {
|
|
14
|
+
__applicationErrorsType?: RemoveItemsFromBenefitApplicationErrors;
|
|
15
|
+
}>;
|
|
12
16
|
}
|
|
13
17
|
declare function addItemsToBenefit$1(httpClient: HttpClient): AddItemsToBenefitSignature;
|
|
14
18
|
interface AddItemsToBenefitSignature {
|
|
15
19
|
/**
|
|
16
|
-
*
|
|
20
|
+
* Registers items with a benefit. This is an eventually consistent operation — items may take a short time to appear
|
|
21
|
+
* in QueryPoolDefinitionItems results after the call returns. Uses a partial success model — items already registered
|
|
22
|
+
* with the benefit return a per-item error in results.item_metadata while successfully added items are unaffected.
|
|
23
|
+
* Check bulk_action_metadata for overall counts and results for per-item outcomes.
|
|
17
24
|
* @param - Items to add to the benefit's item set.
|
|
18
25
|
*/
|
|
19
|
-
(itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[], options: NonNullablePaths<AddItemsToBenefitOptions, `benefitKey` | `poolDefinitionId`, 2>): Promise<
|
|
26
|
+
(itemReferences: NonNullablePaths<ItemReference, `externalId`, 2>[], options: NonNullablePaths<AddItemsToBenefitOptions, `benefitKey` | `poolDefinitionId`, 2>): Promise<NonNullablePaths<AddItemsToBenefitResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6> & {
|
|
27
|
+
__applicationErrorsType?: AddItemsToBenefitApplicationErrors;
|
|
28
|
+
}>;
|
|
20
29
|
}
|
|
21
30
|
|
|
31
|
+
declare function customQueryPoolDefinitionItems(httpClient: HttpClient): {
|
|
32
|
+
(query: PoolDefinitionItemQuery, options?: QueryPoolDefinitionItemsOptions): ReturnType<typeof typedQueryPoolDefinitionItems>;
|
|
33
|
+
(options?: QueryPoolDefinitionItemsOptions): PoolDefinitionItemsQueryBuilder;
|
|
34
|
+
};
|
|
22
35
|
declare const removeItemsFromBenefit: MaybeContext<BuildRESTFunction<typeof removeItemsFromBenefit$1> & typeof removeItemsFromBenefit$1>;
|
|
23
36
|
declare const addItemsToBenefit: MaybeContext<BuildRESTFunction<typeof addItemsToBenefit$1> & typeof addItemsToBenefit$1>;
|
|
37
|
+
declare const queryPoolDefinitionItems: MaybeContext<BuildRESTFunction<typeof customQueryPoolDefinitionItems> & typeof customQueryPoolDefinitionItems>;
|
|
24
38
|
|
|
25
|
-
export { AddItemsToBenefitOptions, ItemReference, RemoveItemsFromBenefitOptions, addItemsToBenefit, removeItemsFromBenefit };
|
|
39
|
+
export { AddItemsToBenefitApplicationErrors, AddItemsToBenefitOptions, AddItemsToBenefitResponse, ItemReference, PoolDefinitionItemQuery, PoolDefinitionItemsQueryBuilder, QueryPoolDefinitionItemsOptions, RemoveItemsFromBenefitApplicationErrors, RemoveItemsFromBenefitOptions, RemoveItemsFromBenefitResponse, addItemsToBenefit, queryPoolDefinitionItems, removeItemsFromBenefit };
|
package/build/es/index.mjs
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
// src/benefit-programs-v1-pool-definition-item-pool-definition-items.universal.ts
|
|
2
2
|
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
|
|
3
|
-
import {
|
|
3
|
+
import { queryBuilder } from "@wix/sdk-runtime/query-builder";
|
|
4
|
+
import {
|
|
5
|
+
renameKeysFromSDKRequestToRESTRequest,
|
|
6
|
+
renameKeysFromRESTResponseToSDKResponse
|
|
7
|
+
} from "@wix/sdk-runtime/rename-all-nested-keys";
|
|
4
8
|
|
|
5
9
|
// src/benefit-programs-v1-pool-definition-item-pool-definition-items.http.ts
|
|
10
|
+
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
11
|
+
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
6
12
|
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
7
13
|
function resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(opts) {
|
|
8
14
|
const domainToMappings = {
|
|
@@ -28,6 +34,34 @@ function resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceU
|
|
|
28
34
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
29
35
|
}
|
|
30
36
|
var PACKAGE_NAME = "@wix/auto_sdk_benefit-programs_pool-definition-items";
|
|
37
|
+
function queryPoolDefinitionItems(payload) {
|
|
38
|
+
function __queryPoolDefinitionItems({ host }) {
|
|
39
|
+
const metadata = {
|
|
40
|
+
entityFqdn: "wix.benefit_programs.v1.pool_definition_item",
|
|
41
|
+
method: "POST",
|
|
42
|
+
methodFqn: "wix.benefit_programs.v1.pool_definition_item.PoolDefinitionItemService.QueryPoolDefinitionItems",
|
|
43
|
+
packageName: PACKAGE_NAME,
|
|
44
|
+
migrationOptions: {
|
|
45
|
+
optInTransformResponse: true
|
|
46
|
+
},
|
|
47
|
+
url: resolveWixBenefitProgramsV1PoolDefinitionItemPoolDefinitionItemServiceUrl(
|
|
48
|
+
{ protoPath: "/v1/pool-definition-items/query", data: payload, host }
|
|
49
|
+
),
|
|
50
|
+
data: payload,
|
|
51
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
52
|
+
{
|
|
53
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
54
|
+
paths: [
|
|
55
|
+
{ path: "poolDefinitionItems.createdDate" },
|
|
56
|
+
{ path: "poolDefinitionItems.updatedDate" }
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
])
|
|
60
|
+
};
|
|
61
|
+
return metadata;
|
|
62
|
+
}
|
|
63
|
+
return __queryPoolDefinitionItems;
|
|
64
|
+
}
|
|
31
65
|
function removeItemsFromBenefit(payload) {
|
|
32
66
|
function __removeItemsFromBenefit({ host }) {
|
|
33
67
|
const metadata = {
|
|
@@ -76,6 +110,8 @@ function addItemsToBenefit(payload) {
|
|
|
76
110
|
}
|
|
77
111
|
|
|
78
112
|
// src/benefit-programs-v1-pool-definition-item-pool-definition-items.universal.ts
|
|
113
|
+
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
114
|
+
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
79
115
|
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
80
116
|
SortOrder2["ASC"] = "ASC";
|
|
81
117
|
SortOrder2["DESC"] = "DESC";
|
|
@@ -96,6 +132,86 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
96
132
|
WebhookIdentityType2["APP"] = "APP";
|
|
97
133
|
return WebhookIdentityType2;
|
|
98
134
|
})(WebhookIdentityType || {});
|
|
135
|
+
function queryPoolDefinitionItems2(options) {
|
|
136
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
137
|
+
return queryBuilder({
|
|
138
|
+
func: async (payload) => {
|
|
139
|
+
const reqOpts = queryPoolDefinitionItems(
|
|
140
|
+
{ ...payload, ...options ?? {} }
|
|
141
|
+
);
|
|
142
|
+
sideEffects?.onSiteCall?.();
|
|
143
|
+
try {
|
|
144
|
+
const result = await httpClient.request(reqOpts);
|
|
145
|
+
sideEffects?.onSuccess?.(result);
|
|
146
|
+
return result;
|
|
147
|
+
} catch (err) {
|
|
148
|
+
sideEffects?.onError?.(err);
|
|
149
|
+
throw err;
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
requestTransformer: (query) => {
|
|
153
|
+
const args = [query, options];
|
|
154
|
+
return renameKeysFromSDKRequestToRESTRequest({
|
|
155
|
+
...args?.[1],
|
|
156
|
+
query: args?.[0]
|
|
157
|
+
});
|
|
158
|
+
},
|
|
159
|
+
responseTransformer: ({
|
|
160
|
+
data
|
|
161
|
+
}) => {
|
|
162
|
+
const transformedData = renameKeysFromRESTResponseToSDKResponse(
|
|
163
|
+
transformPaths2(data, [])
|
|
164
|
+
);
|
|
165
|
+
return {
|
|
166
|
+
items: transformedData?.poolDefinitionItems,
|
|
167
|
+
pagingMetadata: transformedData?.metadata
|
|
168
|
+
};
|
|
169
|
+
},
|
|
170
|
+
errorTransformer: (err) => {
|
|
171
|
+
const transformedError = sdkTransformError(err, {
|
|
172
|
+
spreadPathsToArguments: {},
|
|
173
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
174
|
+
singleArgumentUnchanged: false
|
|
175
|
+
});
|
|
176
|
+
throw transformedError;
|
|
177
|
+
},
|
|
178
|
+
pagingMethod: "CURSOR",
|
|
179
|
+
transformationPaths: {}
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
async function typedQueryPoolDefinitionItems(query, options) {
|
|
183
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
184
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
185
|
+
query,
|
|
186
|
+
...options
|
|
187
|
+
});
|
|
188
|
+
const reqOpts = queryPoolDefinitionItems(
|
|
189
|
+
payload
|
|
190
|
+
);
|
|
191
|
+
sideEffects?.onSiteCall?.();
|
|
192
|
+
try {
|
|
193
|
+
const result = await httpClient.request(reqOpts);
|
|
194
|
+
sideEffects?.onSuccess?.(result);
|
|
195
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
196
|
+
} catch (err) {
|
|
197
|
+
const transformedError = sdkTransformError(
|
|
198
|
+
err,
|
|
199
|
+
{
|
|
200
|
+
spreadPathsToArguments: {},
|
|
201
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
202
|
+
singleArgumentUnchanged: false
|
|
203
|
+
},
|
|
204
|
+
["query", "options"]
|
|
205
|
+
);
|
|
206
|
+
sideEffects?.onError?.(err);
|
|
207
|
+
throw transformedError;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
var utils = {
|
|
211
|
+
query: {
|
|
212
|
+
...createQueryUtils()
|
|
213
|
+
}
|
|
214
|
+
};
|
|
99
215
|
async function removeItemsFromBenefit2(itemReferences, options) {
|
|
100
216
|
const { httpClient, sideEffects } = arguments[2];
|
|
101
217
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -110,6 +226,7 @@ async function removeItemsFromBenefit2(itemReferences, options) {
|
|
|
110
226
|
try {
|
|
111
227
|
const result = await httpClient.request(reqOpts);
|
|
112
228
|
sideEffects?.onSuccess?.(result);
|
|
229
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
113
230
|
} catch (err) {
|
|
114
231
|
const transformedError = sdkTransformError(
|
|
115
232
|
err,
|
|
@@ -140,6 +257,7 @@ async function addItemsToBenefit2(itemReferences, options) {
|
|
|
140
257
|
try {
|
|
141
258
|
const result = await httpClient.request(reqOpts);
|
|
142
259
|
sideEffects?.onSuccess?.(result);
|
|
260
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
143
261
|
} catch (err) {
|
|
144
262
|
const transformedError = sdkTransformError(
|
|
145
263
|
err,
|
|
@@ -160,6 +278,21 @@ async function addItemsToBenefit2(itemReferences, options) {
|
|
|
160
278
|
}
|
|
161
279
|
|
|
162
280
|
// src/benefit-programs-v1-pool-definition-item-pool-definition-items.public.ts
|
|
281
|
+
function queryPoolDefinitionItems3(httpClient) {
|
|
282
|
+
return (options) => queryPoolDefinitionItems2(
|
|
283
|
+
options,
|
|
284
|
+
// @ts-ignore
|
|
285
|
+
{ httpClient }
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
function typedQueryPoolDefinitionItems2(httpClient) {
|
|
289
|
+
return (query, options) => typedQueryPoolDefinitionItems(
|
|
290
|
+
query,
|
|
291
|
+
options,
|
|
292
|
+
// @ts-ignore
|
|
293
|
+
{ httpClient }
|
|
294
|
+
);
|
|
295
|
+
}
|
|
163
296
|
function removeItemsFromBenefit3(httpClient) {
|
|
164
297
|
return (itemReferences, options) => removeItemsFromBenefit2(
|
|
165
298
|
itemReferences,
|
|
@@ -179,13 +312,28 @@ function addItemsToBenefit3(httpClient) {
|
|
|
179
312
|
|
|
180
313
|
// src/benefit-programs-v1-pool-definition-item-pool-definition-items.context.ts
|
|
181
314
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
315
|
+
import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
|
|
316
|
+
function customQueryPoolDefinitionItems(httpClient) {
|
|
317
|
+
const router = createQueryOverloadRouter({
|
|
318
|
+
builderQueryFunction: (options) => queryPoolDefinitionItems3(httpClient)(options),
|
|
319
|
+
typedQueryFunction: (query, options) => typedQueryPoolDefinitionItems2(httpClient)(query, options),
|
|
320
|
+
hasOptionsParameter: true
|
|
321
|
+
});
|
|
322
|
+
function overloadedQuery(queryOrOptions, options) {
|
|
323
|
+
return router(...arguments);
|
|
324
|
+
}
|
|
325
|
+
return overloadedQuery;
|
|
326
|
+
}
|
|
182
327
|
var removeItemsFromBenefit4 = /* @__PURE__ */ createRESTModule(removeItemsFromBenefit3);
|
|
183
328
|
var addItemsToBenefit4 = /* @__PURE__ */ createRESTModule(addItemsToBenefit3);
|
|
329
|
+
var queryPoolDefinitionItems4 = /* @__PURE__ */ createRESTModule(customQueryPoolDefinitionItems);
|
|
184
330
|
export {
|
|
185
331
|
RequestedFields,
|
|
186
332
|
SortOrder,
|
|
187
333
|
WebhookIdentityType,
|
|
188
334
|
addItemsToBenefit4 as addItemsToBenefit,
|
|
189
|
-
|
|
335
|
+
queryPoolDefinitionItems4 as queryPoolDefinitionItems,
|
|
336
|
+
removeItemsFromBenefit4 as removeItemsFromBenefit,
|
|
337
|
+
utils
|
|
190
338
|
};
|
|
191
339
|
//# sourceMappingURL=index.mjs.map
|