@wix/auto_sdk_benefit-programs_transactions 1.0.55 → 1.0.56

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.
@@ -168,494 +168,6 @@ function queryTransactions(payload) {
168
168
 
169
169
  // src/benefit-programs-v1-transaction-transactions.universal.ts
170
170
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
171
-
172
- // src/benefit-programs-v1-transaction-transactions.schemas.ts
173
- import * as z from "zod";
174
- var GetTransactionRequest = z.object({
175
- transactionId: z.string().describe("ID of the transaction to retrieve.").regex(
176
- /^[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}$/,
177
- "Must be a valid GUID"
178
- )
179
- });
180
- var GetTransactionResponse = z.object({
181
- _id: z.string().describe("Transaction ID.").regex(
182
- /^[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}$/,
183
- "Must be a valid GUID"
184
- ).optional().nullable(),
185
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
186
- "Revision number, which increments by 1 each time the transaction is updated."
187
- ).optional().nullable(),
188
- _createdDate: z.date().describe("Date and time the transaction was created.").optional().nullable(),
189
- _updatedDate: z.date().describe("Date and time the transaction was updated.").optional().nullable(),
190
- pool: z.object({
191
- _id: z.string().describe("Pool ID.").regex(
192
- /^[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}$/,
193
- "Must be a valid GUID"
194
- ).optional(),
195
- poolDefinitionId: z.string().describe("ID of the pool definition the pool was created from.").regex(
196
- /^[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}$/,
197
- "Must be a valid GUID"
198
- ).optional().nullable(),
199
- programDefinitionId: z.string().describe(
200
- "ID of the program definition containing the pool definition the pool was created from."
201
- ).regex(
202
- /^[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}$/,
203
- "Must be a valid GUID"
204
- ).optional().nullable(),
205
- externalProgramDefinitionId: z.string().describe(
206
- "External ID of the program definition the pool was created from."
207
- ).regex(
208
- /^[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}$/,
209
- "Must be a valid GUID"
210
- ).optional().nullable(),
211
- programId: z.string().describe("ID of the program that contains the pool.").regex(
212
- /^[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}$/,
213
- "Must be a valid GUID"
214
- ).optional().nullable(),
215
- externalProgramId: z.string().describe("External ID of the program that contains the pool.").regex(
216
- /^[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}$/,
217
- "Must be a valid GUID"
218
- ).optional().nullable(),
219
- creditAmount: z.string().describe("Available credits.").optional().nullable(),
220
- namespace: z.string().describe(
221
- "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."
222
- ).min(1).max(20).optional().nullable(),
223
- displayName: z.string().describe("Pool name").max(64).optional().nullable(),
224
- benefitDisplayName: z.string().describe("Benefit name").max(40).optional().nullable()
225
- }).describe("Pool associated with this transaction.").optional(),
226
- amount: z.string().describe("Amount the balance was adjusted in this transaction.").optional(),
227
- source: z.enum(["AVAILABLE", "EXTERNAL"]).describe("Where the credits came from.").optional(),
228
- target: z.enum(["AVAILABLE", "EXTERNAL"]).describe("Where the credits went to.").optional(),
229
- idempotencyKey: z.string().describe(
230
- "Unique identifier, generated by the client.\nUsed to recognize repeated attempts to make the same request."
231
- ).max(200).optional(),
232
- relatedTransactionId: z.string().describe(
233
- "ID of the related transaction. For example, if this transaction is a refund for a benefit redemption, the related transaction is the benefit redemption transaction."
234
- ).regex(
235
- /^[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}$/,
236
- "Must be a valid GUID"
237
- ).optional().nullable(),
238
- beneficiary: z.intersection(
239
- z.object({}),
240
- z.xor([
241
- z.object({
242
- anonymousVisitorId: z.never().optional(),
243
- memberId: z.never().optional(),
244
- wixUserId: z.never().optional()
245
- }),
246
- z.object({
247
- memberId: z.never().optional(),
248
- wixUserId: z.never().optional(),
249
- anonymousVisitorId: z.string().describe("ID of a site visitor that hasn't logged in to the site.").regex(
250
- /^[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}$/,
251
- "Must be a valid GUID"
252
- )
253
- }),
254
- z.object({
255
- anonymousVisitorId: z.never().optional(),
256
- wixUserId: z.never().optional(),
257
- memberId: z.string().describe("ID of a site member.").regex(
258
- /^[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}$/,
259
- "Must be a valid GUID"
260
- )
261
- }),
262
- z.object({
263
- anonymousVisitorId: z.never().optional(),
264
- memberId: z.never().optional(),
265
- wixUserId: z.string().describe("ID of a Wix user.").regex(
266
- /^[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}$/,
267
- "Must be a valid GUID"
268
- )
269
- })
270
- ])
271
- ).describe("Beneficiary of the pool associated with this transaction.").optional(),
272
- instructingParty: z.intersection(
273
- z.object({}),
274
- z.xor([
275
- z.object({
276
- anonymousVisitorId: z.never().optional(),
277
- memberId: z.never().optional(),
278
- wixUserId: z.never().optional()
279
- }),
280
- z.object({
281
- memberId: z.never().optional(),
282
- wixUserId: z.never().optional(),
283
- anonymousVisitorId: z.string().describe("ID of a site visitor that hasn't logged in to the site.").regex(
284
- /^[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}$/,
285
- "Must be a valid GUID"
286
- )
287
- }),
288
- z.object({
289
- anonymousVisitorId: z.never().optional(),
290
- wixUserId: z.never().optional(),
291
- memberId: z.string().describe("ID of a site member.").regex(
292
- /^[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}$/,
293
- "Must be a valid GUID"
294
- )
295
- }),
296
- z.object({
297
- anonymousVisitorId: z.never().optional(),
298
- memberId: z.never().optional(),
299
- wixUserId: z.string().describe("ID of a Wix user.").regex(
300
- /^[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}$/,
301
- "Must be a valid GUID"
302
- )
303
- })
304
- ])
305
- ).describe("Identity that created the transaction.").optional(),
306
- status: z.enum(["PENDING", "COMPLETED", "FAILED"]).describe("Transaction status.").optional(),
307
- details: z.object({
308
- item: z.object({
309
- _id: z.string().describe("Item ID.").regex(
310
- /^[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}$/,
311
- "Must be a valid GUID"
312
- ).optional().nullable(),
313
- externalId: z.string().describe("Item external ID.").regex(
314
- /^[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}$/,
315
- "Must be a valid GUID"
316
- ).optional().nullable(),
317
- category: z.string().describe("Item category.").max(20).optional().nullable(),
318
- itemSetId: z.string().describe("Item set ID.").regex(
319
- /^[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}$/,
320
- "Must be a valid GUID"
321
- ).optional().nullable(),
322
- displayName: z.string().describe("Item name.").max(64).optional().nullable(),
323
- providerAppId: z.string().describe("Provider app id").regex(
324
- /^[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}$/,
325
- "Must be a valid GUID"
326
- ).optional().nullable()
327
- }).describe("Item associated with the transaction.").optional(),
328
- itemCount: z.number().int().describe("Amount of items associated with the transaction.").min(0).optional().nullable(),
329
- effectiveDate: z.date().describe("Date and time the transaction was created.").optional().nullable(),
330
- reason: z.string().describe("Reason for the transaction. For example, `Redemption`.").max(256).optional().nullable(),
331
- benefitKey: z.string().describe("Benefit key associated with the transaction.").max(64).optional().nullable()
332
- }).describe("Additional transaction details.").optional(),
333
- extendedFields: z.object({
334
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
335
- "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
336
- ).optional()
337
- }).describe(
338
- "Custom field data for the transaction object.\n\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."
339
- ).optional(),
340
- externalId: z.string().describe("External transaction ID.").regex(
341
- /^[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}$/,
342
- "Must be a valid GUID"
343
- ).optional().nullable()
344
- });
345
- var QueryTransactionsRequest = z.object({
346
- query: z.object({
347
- filter: z.object({
348
- _id: z.object({
349
- $eq: z.string(),
350
- $exists: z.boolean(),
351
- $gt: z.string(),
352
- $gte: z.string(),
353
- $hasAll: z.array(z.string()),
354
- $hasSome: z.array(z.string()),
355
- $in: z.array(z.string()),
356
- $lt: z.string(),
357
- $lte: z.string(),
358
- $ne: z.string(),
359
- $nin: z.array(z.string()),
360
- $startsWith: z.string()
361
- }).partial().strict().optional(),
362
- relatedTransactionId: z.object({
363
- $eq: z.string(),
364
- $exists: z.boolean(),
365
- $gt: z.string(),
366
- $gte: z.string(),
367
- $hasAll: z.array(z.string()),
368
- $hasSome: z.array(z.string()),
369
- $in: z.array(z.string()),
370
- $lt: z.string(),
371
- $lte: z.string(),
372
- $ne: z.string(),
373
- $nin: z.array(z.string()),
374
- $startsWith: z.string()
375
- }).partial().strict().optional(),
376
- "pool._id": z.object({
377
- $eq: z.string(),
378
- $exists: z.boolean(),
379
- $gt: z.string(),
380
- $gte: z.string(),
381
- $hasAll: z.array(z.string()),
382
- $hasSome: z.array(z.string()),
383
- $in: z.array(z.string()),
384
- $lt: z.string(),
385
- $lte: z.string(),
386
- $ne: z.string(),
387
- $nin: z.array(z.string()),
388
- $startsWith: z.string()
389
- }).partial().strict().optional(),
390
- "beneficiary.memberId": z.object({
391
- $eq: z.any(),
392
- $exists: z.boolean(),
393
- $gt: z.any(),
394
- $gte: z.any(),
395
- $hasAll: z.array(z.any()),
396
- $hasSome: z.array(z.any()),
397
- $in: z.array(z.any()),
398
- $lt: z.any(),
399
- $lte: z.any(),
400
- $ne: z.any(),
401
- $nin: z.array(z.any()),
402
- $startsWith: z.string()
403
- }).partial().strict().optional(),
404
- "beneficiary.wixUserId": z.object({
405
- $eq: z.any(),
406
- $exists: z.boolean(),
407
- $gt: z.any(),
408
- $gte: z.any(),
409
- $hasAll: z.array(z.any()),
410
- $hasSome: z.array(z.any()),
411
- $in: z.array(z.any()),
412
- $lt: z.any(),
413
- $lte: z.any(),
414
- $ne: z.any(),
415
- $nin: z.array(z.any()),
416
- $startsWith: z.string()
417
- }).partial().strict().optional(),
418
- "details.item._id": z.object({
419
- $eq: z.string(),
420
- $exists: z.boolean(),
421
- $gt: z.string(),
422
- $gte: z.string(),
423
- $hasAll: z.array(z.string()),
424
- $hasSome: z.array(z.string()),
425
- $in: z.array(z.string()),
426
- $lt: z.string(),
427
- $lte: z.string(),
428
- $ne: z.string(),
429
- $nin: z.array(z.string()),
430
- $startsWith: z.string()
431
- }).partial().strict().optional(),
432
- _createdDate: z.object({
433
- $eq: z.string(),
434
- $exists: z.boolean(),
435
- $gt: z.string(),
436
- $gte: z.string(),
437
- $hasAll: z.array(z.string()),
438
- $hasSome: z.array(z.string()),
439
- $in: z.array(z.string()),
440
- $lt: z.string(),
441
- $lte: z.string(),
442
- $ne: z.string(),
443
- $nin: z.array(z.string()),
444
- $startsWith: z.string()
445
- }).partial().strict().optional(),
446
- $and: z.array(z.any()).optional(),
447
- $or: z.array(z.any()).optional(),
448
- $not: z.any().optional()
449
- }).strict().optional(),
450
- sort: z.array(
451
- z.object({
452
- fieldName: z.enum([
453
- "_id",
454
- "relatedTransactionId",
455
- "pool._id",
456
- "beneficiary.memberId",
457
- "beneficiary.wixUserId",
458
- "details.item._id",
459
- "_createdDate"
460
- ]).optional(),
461
- order: z.enum(["ASC", "DESC"]).optional()
462
- })
463
- ).optional()
464
- }).catchall(z.any()).describe("Filter, sort, and paging to apply to the query.")
465
- });
466
- var QueryTransactionsResponse = z.object({
467
- transactions: z.array(
468
- z.object({
469
- _id: z.string().describe("Transaction ID.").regex(
470
- /^[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}$/,
471
- "Must be a valid GUID"
472
- ).optional().nullable(),
473
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
474
- "Revision number, which increments by 1 each time the transaction is updated."
475
- ).optional().nullable(),
476
- _createdDate: z.date().describe("Date and time the transaction was created.").optional().nullable(),
477
- _updatedDate: z.date().describe("Date and time the transaction was updated.").optional().nullable(),
478
- pool: z.object({
479
- _id: z.string().describe("Pool ID.").regex(
480
- /^[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}$/,
481
- "Must be a valid GUID"
482
- ).optional(),
483
- poolDefinitionId: z.string().describe("ID of the pool definition the pool was created from.").regex(
484
- /^[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}$/,
485
- "Must be a valid GUID"
486
- ).optional().nullable(),
487
- programDefinitionId: z.string().describe(
488
- "ID of the program definition containing the pool definition the pool was created from."
489
- ).regex(
490
- /^[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}$/,
491
- "Must be a valid GUID"
492
- ).optional().nullable(),
493
- externalProgramDefinitionId: z.string().describe(
494
- "External ID of the program definition the pool was created from."
495
- ).regex(
496
- /^[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}$/,
497
- "Must be a valid GUID"
498
- ).optional().nullable(),
499
- programId: z.string().describe("ID of the program that contains the pool.").regex(
500
- /^[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}$/,
501
- "Must be a valid GUID"
502
- ).optional().nullable(),
503
- externalProgramId: z.string().describe("External ID of the program that contains the pool.").regex(
504
- /^[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}$/,
505
- "Must be a valid GUID"
506
- ).optional().nullable(),
507
- creditAmount: z.string().describe("Available credits.").optional().nullable(),
508
- namespace: z.string().describe(
509
- "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."
510
- ).min(1).max(20).optional().nullable(),
511
- displayName: z.string().describe("Pool name").max(64).optional().nullable(),
512
- benefitDisplayName: z.string().describe("Benefit name").max(40).optional().nullable()
513
- }).describe("Pool associated with this transaction.").optional(),
514
- amount: z.string().describe("Amount the balance was adjusted in this transaction.").optional(),
515
- source: z.enum(["AVAILABLE", "EXTERNAL"]).describe("Where the credits came from.").optional(),
516
- target: z.enum(["AVAILABLE", "EXTERNAL"]).describe("Where the credits went to.").optional(),
517
- idempotencyKey: z.string().describe(
518
- "Unique identifier, generated by the client.\nUsed to recognize repeated attempts to make the same request."
519
- ).max(200).optional(),
520
- relatedTransactionId: z.string().describe(
521
- "ID of the related transaction. For example, if this transaction is a refund for a benefit redemption, the related transaction is the benefit redemption transaction."
522
- ).regex(
523
- /^[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}$/,
524
- "Must be a valid GUID"
525
- ).optional().nullable(),
526
- beneficiary: z.intersection(
527
- z.object({}),
528
- z.xor([
529
- z.object({
530
- anonymousVisitorId: z.never().optional(),
531
- memberId: z.never().optional(),
532
- wixUserId: z.never().optional()
533
- }),
534
- z.object({
535
- memberId: z.never().optional(),
536
- wixUserId: z.never().optional(),
537
- anonymousVisitorId: z.string().describe(
538
- "ID of a site visitor that hasn't logged in to the site."
539
- ).regex(
540
- /^[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}$/,
541
- "Must be a valid GUID"
542
- )
543
- }),
544
- z.object({
545
- anonymousVisitorId: z.never().optional(),
546
- wixUserId: z.never().optional(),
547
- memberId: z.string().describe("ID of a site member.").regex(
548
- /^[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}$/,
549
- "Must be a valid GUID"
550
- )
551
- }),
552
- z.object({
553
- anonymousVisitorId: z.never().optional(),
554
- memberId: z.never().optional(),
555
- wixUserId: z.string().describe("ID of a Wix user.").regex(
556
- /^[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}$/,
557
- "Must be a valid GUID"
558
- )
559
- })
560
- ])
561
- ).describe("Beneficiary of the pool associated with this transaction.").optional(),
562
- instructingParty: z.intersection(
563
- z.object({}),
564
- z.xor([
565
- z.object({
566
- anonymousVisitorId: z.never().optional(),
567
- memberId: z.never().optional(),
568
- wixUserId: z.never().optional()
569
- }),
570
- z.object({
571
- memberId: z.never().optional(),
572
- wixUserId: z.never().optional(),
573
- anonymousVisitorId: z.string().describe(
574
- "ID of a site visitor that hasn't logged in to the site."
575
- ).regex(
576
- /^[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}$/,
577
- "Must be a valid GUID"
578
- )
579
- }),
580
- z.object({
581
- anonymousVisitorId: z.never().optional(),
582
- wixUserId: z.never().optional(),
583
- memberId: z.string().describe("ID of a site member.").regex(
584
- /^[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}$/,
585
- "Must be a valid GUID"
586
- )
587
- }),
588
- z.object({
589
- anonymousVisitorId: z.never().optional(),
590
- memberId: z.never().optional(),
591
- wixUserId: z.string().describe("ID of a Wix user.").regex(
592
- /^[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}$/,
593
- "Must be a valid GUID"
594
- )
595
- })
596
- ])
597
- ).describe("Identity that created the transaction.").optional(),
598
- status: z.enum(["PENDING", "COMPLETED", "FAILED"]).describe("Transaction status.").optional(),
599
- details: z.object({
600
- item: z.object({
601
- _id: z.string().describe("Item ID.").regex(
602
- /^[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}$/,
603
- "Must be a valid GUID"
604
- ).optional().nullable(),
605
- externalId: z.string().describe("Item external ID.").regex(
606
- /^[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}$/,
607
- "Must be a valid GUID"
608
- ).optional().nullable(),
609
- category: z.string().describe("Item category.").max(20).optional().nullable(),
610
- itemSetId: z.string().describe("Item set ID.").regex(
611
- /^[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}$/,
612
- "Must be a valid GUID"
613
- ).optional().nullable(),
614
- displayName: z.string().describe("Item name.").max(64).optional().nullable(),
615
- providerAppId: z.string().describe("Provider app id").regex(
616
- /^[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}$/,
617
- "Must be a valid GUID"
618
- ).optional().nullable()
619
- }).describe("Item associated with the transaction.").optional(),
620
- itemCount: z.number().int().describe("Amount of items associated with the transaction.").min(0).optional().nullable(),
621
- effectiveDate: z.date().describe("Date and time the transaction was created.").optional().nullable(),
622
- reason: z.string().describe(
623
- "Reason for the transaction. For example, `Redemption`."
624
- ).max(256).optional().nullable(),
625
- benefitKey: z.string().describe("Benefit key associated with the transaction.").max(64).optional().nullable()
626
- }).describe("Additional transaction details.").optional(),
627
- extendedFields: z.object({
628
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
629
- "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)."
630
- ).optional()
631
- }).describe(
632
- "Custom field data for the transaction object.\n\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."
633
- ).optional(),
634
- externalId: z.string().describe("External transaction ID.").regex(
635
- /^[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}$/,
636
- "Must be a valid GUID"
637
- ).optional().nullable()
638
- })
639
- ).optional(),
640
- metadata: z.object({
641
- count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
642
- cursors: z.object({
643
- next: z.string().describe(
644
- "Cursor string pointing to the next page in the list of results."
645
- ).max(16e3).optional().nullable(),
646
- prev: z.string().describe(
647
- "Cursor pointing to the previous page in the list of results."
648
- ).max(16e3).optional().nullable()
649
- }).describe(
650
- "Cursor strings that point to the next page, previous page, or both."
651
- ).optional(),
652
- hasNext: z.boolean().describe(
653
- "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."
654
- ).optional().nullable()
655
- }).describe("Metadata for paginated results.").optional()
656
- });
657
-
658
- // src/benefit-programs-v1-transaction-transactions.universal.ts
659
171
  import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
660
172
  var BalanceType = /* @__PURE__ */ ((BalanceType2) => {
661
173
  BalanceType2["AVAILABLE"] = "AVAILABLE";
@@ -689,10 +201,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
689
201
  return WebhookIdentityType2;
690
202
  })(WebhookIdentityType || {});
691
203
  async function getTransaction2(transactionId) {
692
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
693
- if (validateRequestSchema) {
694
- GetTransactionRequest.parse({ transactionId });
695
- }
204
+ const { httpClient, sideEffects } = arguments[1];
696
205
  const payload = renameKeysFromSDKRequestToRESTRequest({
697
206
  transactionId
698
207
  });
@@ -762,10 +271,7 @@ function queryTransactions2() {
762
271
  });
763
272
  }
764
273
  async function typedQueryTransactions(query) {
765
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
766
- if (validateRequestSchema) {
767
- QueryTransactionsRequest.parse({ query });
768
- }
274
+ const { httpClient, sideEffects } = arguments[1];
769
275
  const payload = renameKeysFromSDKRequestToRESTRequest({ query });
770
276
  const reqOpts = queryTransactions(payload);
771
277
  sideEffects?.onSiteCall?.();
@@ -794,24 +300,24 @@ var utils = {
794
300
  };
795
301
 
796
302
  // src/benefit-programs-v1-transaction-transactions.public.ts
797
- function getTransaction3(httpClient, __options) {
303
+ function getTransaction3(httpClient) {
798
304
  return (transactionId) => getTransaction2(
799
305
  transactionId,
800
306
  // @ts-ignore
801
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
307
+ { httpClient }
802
308
  );
803
309
  }
804
- function queryTransactions3(httpClient, __options) {
310
+ function queryTransactions3(httpClient) {
805
311
  return () => queryTransactions2(
806
312
  // @ts-ignore
807
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
313
+ { httpClient }
808
314
  );
809
315
  }
810
- function typedQueryTransactions2(httpClient, __options) {
316
+ function typedQueryTransactions2(httpClient) {
811
317
  return (query) => typedQueryTransactions(
812
318
  query,
813
319
  // @ts-ignore
814
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
320
+ { httpClient }
815
321
  );
816
322
  }
817
323