@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.
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // index.typings.ts
@@ -209,494 +199,6 @@ function queryTransactions(payload) {
209
199
 
210
200
  // src/benefit-programs-v1-transaction-transactions.universal.ts
211
201
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
212
-
213
- // src/benefit-programs-v1-transaction-transactions.schemas.ts
214
- var z = __toESM(require("zod"));
215
- var GetTransactionRequest = z.object({
216
- transactionId: z.string().describe("ID of the transaction to retrieve.").regex(
217
- /^[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}$/,
218
- "Must be a valid GUID"
219
- )
220
- });
221
- var GetTransactionResponse = z.object({
222
- _id: z.string().describe("Transaction ID.").regex(
223
- /^[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}$/,
224
- "Must be a valid GUID"
225
- ).optional().nullable(),
226
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
227
- "Revision number, which increments by 1 each time the transaction is updated."
228
- ).optional().nullable(),
229
- _createdDate: z.date().describe("Date and time the transaction was created.").optional().nullable(),
230
- _updatedDate: z.date().describe("Date and time the transaction was updated.").optional().nullable(),
231
- pool: z.object({
232
- _id: z.string().describe("Pool ID.").regex(
233
- /^[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}$/,
234
- "Must be a valid GUID"
235
- ).optional(),
236
- poolDefinitionId: z.string().describe("ID of the pool definition the pool was created from.").regex(
237
- /^[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}$/,
238
- "Must be a valid GUID"
239
- ).optional().nullable(),
240
- programDefinitionId: z.string().describe(
241
- "ID of the program definition containing the pool definition the pool was created from."
242
- ).regex(
243
- /^[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}$/,
244
- "Must be a valid GUID"
245
- ).optional().nullable(),
246
- externalProgramDefinitionId: z.string().describe(
247
- "External ID of the program definition the pool was created from."
248
- ).regex(
249
- /^[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}$/,
250
- "Must be a valid GUID"
251
- ).optional().nullable(),
252
- programId: z.string().describe("ID of the program that contains the pool.").regex(
253
- /^[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}$/,
254
- "Must be a valid GUID"
255
- ).optional().nullable(),
256
- externalProgramId: z.string().describe("External ID of the program that contains the pool.").regex(
257
- /^[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}$/,
258
- "Must be a valid GUID"
259
- ).optional().nullable(),
260
- creditAmount: z.string().describe("Available credits.").optional().nullable(),
261
- namespace: z.string().describe(
262
- "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."
263
- ).min(1).max(20).optional().nullable(),
264
- displayName: z.string().describe("Pool name").max(64).optional().nullable(),
265
- benefitDisplayName: z.string().describe("Benefit name").max(40).optional().nullable()
266
- }).describe("Pool associated with this transaction.").optional(),
267
- amount: z.string().describe("Amount the balance was adjusted in this transaction.").optional(),
268
- source: z.enum(["AVAILABLE", "EXTERNAL"]).describe("Where the credits came from.").optional(),
269
- target: z.enum(["AVAILABLE", "EXTERNAL"]).describe("Where the credits went to.").optional(),
270
- idempotencyKey: z.string().describe(
271
- "Unique identifier, generated by the client.\nUsed to recognize repeated attempts to make the same request."
272
- ).max(200).optional(),
273
- relatedTransactionId: z.string().describe(
274
- "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."
275
- ).regex(
276
- /^[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}$/,
277
- "Must be a valid GUID"
278
- ).optional().nullable(),
279
- beneficiary: z.intersection(
280
- z.object({}),
281
- z.xor([
282
- z.object({
283
- anonymousVisitorId: z.never().optional(),
284
- memberId: z.never().optional(),
285
- wixUserId: z.never().optional()
286
- }),
287
- z.object({
288
- memberId: z.never().optional(),
289
- wixUserId: z.never().optional(),
290
- anonymousVisitorId: z.string().describe("ID of a site visitor that hasn't logged in to the site.").regex(
291
- /^[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}$/,
292
- "Must be a valid GUID"
293
- )
294
- }),
295
- z.object({
296
- anonymousVisitorId: z.never().optional(),
297
- wixUserId: z.never().optional(),
298
- memberId: z.string().describe("ID of a site member.").regex(
299
- /^[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}$/,
300
- "Must be a valid GUID"
301
- )
302
- }),
303
- z.object({
304
- anonymousVisitorId: z.never().optional(),
305
- memberId: z.never().optional(),
306
- wixUserId: z.string().describe("ID of a Wix user.").regex(
307
- /^[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}$/,
308
- "Must be a valid GUID"
309
- )
310
- })
311
- ])
312
- ).describe("Beneficiary of the pool associated with this transaction.").optional(),
313
- instructingParty: z.intersection(
314
- z.object({}),
315
- z.xor([
316
- z.object({
317
- anonymousVisitorId: z.never().optional(),
318
- memberId: z.never().optional(),
319
- wixUserId: z.never().optional()
320
- }),
321
- z.object({
322
- memberId: z.never().optional(),
323
- wixUserId: z.never().optional(),
324
- anonymousVisitorId: z.string().describe("ID of a site visitor that hasn't logged in to the site.").regex(
325
- /^[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}$/,
326
- "Must be a valid GUID"
327
- )
328
- }),
329
- z.object({
330
- anonymousVisitorId: z.never().optional(),
331
- wixUserId: z.never().optional(),
332
- memberId: z.string().describe("ID of a site member.").regex(
333
- /^[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}$/,
334
- "Must be a valid GUID"
335
- )
336
- }),
337
- z.object({
338
- anonymousVisitorId: z.never().optional(),
339
- memberId: z.never().optional(),
340
- wixUserId: z.string().describe("ID of a Wix user.").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
- )
344
- })
345
- ])
346
- ).describe("Identity that created the transaction.").optional(),
347
- status: z.enum(["PENDING", "COMPLETED", "FAILED"]).describe("Transaction status.").optional(),
348
- details: z.object({
349
- item: z.object({
350
- _id: z.string().describe("Item ID.").regex(
351
- /^[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}$/,
352
- "Must be a valid GUID"
353
- ).optional().nullable(),
354
- externalId: z.string().describe("Item external ID.").regex(
355
- /^[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}$/,
356
- "Must be a valid GUID"
357
- ).optional().nullable(),
358
- category: z.string().describe("Item category.").max(20).optional().nullable(),
359
- itemSetId: z.string().describe("Item set ID.").regex(
360
- /^[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}$/,
361
- "Must be a valid GUID"
362
- ).optional().nullable(),
363
- displayName: z.string().describe("Item name.").max(64).optional().nullable(),
364
- providerAppId: z.string().describe("Provider app id").regex(
365
- /^[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}$/,
366
- "Must be a valid GUID"
367
- ).optional().nullable()
368
- }).describe("Item associated with the transaction.").optional(),
369
- itemCount: z.number().int().describe("Amount of items associated with the transaction.").min(0).optional().nullable(),
370
- effectiveDate: z.date().describe("Date and time the transaction was created.").optional().nullable(),
371
- reason: z.string().describe("Reason for the transaction. For example, `Redemption`.").max(256).optional().nullable(),
372
- benefitKey: z.string().describe("Benefit key associated with the transaction.").max(64).optional().nullable()
373
- }).describe("Additional transaction details.").optional(),
374
- extendedFields: z.object({
375
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
376
- "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)."
377
- ).optional()
378
- }).describe(
379
- "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."
380
- ).optional(),
381
- externalId: z.string().describe("External transaction ID.").regex(
382
- /^[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}$/,
383
- "Must be a valid GUID"
384
- ).optional().nullable()
385
- });
386
- var QueryTransactionsRequest = z.object({
387
- query: z.object({
388
- filter: z.object({
389
- _id: z.object({
390
- $eq: z.string(),
391
- $exists: z.boolean(),
392
- $gt: z.string(),
393
- $gte: z.string(),
394
- $hasAll: z.array(z.string()),
395
- $hasSome: z.array(z.string()),
396
- $in: z.array(z.string()),
397
- $lt: z.string(),
398
- $lte: z.string(),
399
- $ne: z.string(),
400
- $nin: z.array(z.string()),
401
- $startsWith: z.string()
402
- }).partial().strict().optional(),
403
- relatedTransactionId: z.object({
404
- $eq: z.string(),
405
- $exists: z.boolean(),
406
- $gt: z.string(),
407
- $gte: z.string(),
408
- $hasAll: z.array(z.string()),
409
- $hasSome: z.array(z.string()),
410
- $in: z.array(z.string()),
411
- $lt: z.string(),
412
- $lte: z.string(),
413
- $ne: z.string(),
414
- $nin: z.array(z.string()),
415
- $startsWith: z.string()
416
- }).partial().strict().optional(),
417
- "pool._id": z.object({
418
- $eq: z.string(),
419
- $exists: z.boolean(),
420
- $gt: z.string(),
421
- $gte: z.string(),
422
- $hasAll: z.array(z.string()),
423
- $hasSome: z.array(z.string()),
424
- $in: z.array(z.string()),
425
- $lt: z.string(),
426
- $lte: z.string(),
427
- $ne: z.string(),
428
- $nin: z.array(z.string()),
429
- $startsWith: z.string()
430
- }).partial().strict().optional(),
431
- "beneficiary.memberId": z.object({
432
- $eq: z.any(),
433
- $exists: z.boolean(),
434
- $gt: z.any(),
435
- $gte: z.any(),
436
- $hasAll: z.array(z.any()),
437
- $hasSome: z.array(z.any()),
438
- $in: z.array(z.any()),
439
- $lt: z.any(),
440
- $lte: z.any(),
441
- $ne: z.any(),
442
- $nin: z.array(z.any()),
443
- $startsWith: z.string()
444
- }).partial().strict().optional(),
445
- "beneficiary.wixUserId": z.object({
446
- $eq: z.any(),
447
- $exists: z.boolean(),
448
- $gt: z.any(),
449
- $gte: z.any(),
450
- $hasAll: z.array(z.any()),
451
- $hasSome: z.array(z.any()),
452
- $in: z.array(z.any()),
453
- $lt: z.any(),
454
- $lte: z.any(),
455
- $ne: z.any(),
456
- $nin: z.array(z.any()),
457
- $startsWith: z.string()
458
- }).partial().strict().optional(),
459
- "details.item._id": z.object({
460
- $eq: z.string(),
461
- $exists: z.boolean(),
462
- $gt: z.string(),
463
- $gte: z.string(),
464
- $hasAll: z.array(z.string()),
465
- $hasSome: z.array(z.string()),
466
- $in: z.array(z.string()),
467
- $lt: z.string(),
468
- $lte: z.string(),
469
- $ne: z.string(),
470
- $nin: z.array(z.string()),
471
- $startsWith: z.string()
472
- }).partial().strict().optional(),
473
- _createdDate: z.object({
474
- $eq: z.string(),
475
- $exists: z.boolean(),
476
- $gt: z.string(),
477
- $gte: z.string(),
478
- $hasAll: z.array(z.string()),
479
- $hasSome: z.array(z.string()),
480
- $in: z.array(z.string()),
481
- $lt: z.string(),
482
- $lte: z.string(),
483
- $ne: z.string(),
484
- $nin: z.array(z.string()),
485
- $startsWith: z.string()
486
- }).partial().strict().optional(),
487
- $and: z.array(z.any()).optional(),
488
- $or: z.array(z.any()).optional(),
489
- $not: z.any().optional()
490
- }).strict().optional(),
491
- sort: z.array(
492
- z.object({
493
- fieldName: z.enum([
494
- "_id",
495
- "relatedTransactionId",
496
- "pool._id",
497
- "beneficiary.memberId",
498
- "beneficiary.wixUserId",
499
- "details.item._id",
500
- "_createdDate"
501
- ]).optional(),
502
- order: z.enum(["ASC", "DESC"]).optional()
503
- })
504
- ).optional()
505
- }).catchall(z.any()).describe("Filter, sort, and paging to apply to the query.")
506
- });
507
- var QueryTransactionsResponse = z.object({
508
- transactions: z.array(
509
- z.object({
510
- _id: z.string().describe("Transaction ID.").regex(
511
- /^[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}$/,
512
- "Must be a valid GUID"
513
- ).optional().nullable(),
514
- revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
515
- "Revision number, which increments by 1 each time the transaction is updated."
516
- ).optional().nullable(),
517
- _createdDate: z.date().describe("Date and time the transaction was created.").optional().nullable(),
518
- _updatedDate: z.date().describe("Date and time the transaction was updated.").optional().nullable(),
519
- pool: z.object({
520
- _id: z.string().describe("Pool ID.").regex(
521
- /^[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}$/,
522
- "Must be a valid GUID"
523
- ).optional(),
524
- poolDefinitionId: z.string().describe("ID of the pool definition the pool was created from.").regex(
525
- /^[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}$/,
526
- "Must be a valid GUID"
527
- ).optional().nullable(),
528
- programDefinitionId: z.string().describe(
529
- "ID of the program definition containing the pool definition the pool was created from."
530
- ).regex(
531
- /^[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}$/,
532
- "Must be a valid GUID"
533
- ).optional().nullable(),
534
- externalProgramDefinitionId: z.string().describe(
535
- "External ID of the program definition the pool was created from."
536
- ).regex(
537
- /^[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}$/,
538
- "Must be a valid GUID"
539
- ).optional().nullable(),
540
- programId: z.string().describe("ID of the program that contains the pool.").regex(
541
- /^[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}$/,
542
- "Must be a valid GUID"
543
- ).optional().nullable(),
544
- externalProgramId: z.string().describe("External ID of the program that contains the pool.").regex(
545
- /^[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}$/,
546
- "Must be a valid GUID"
547
- ).optional().nullable(),
548
- creditAmount: z.string().describe("Available credits.").optional().nullable(),
549
- namespace: z.string().describe(
550
- "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."
551
- ).min(1).max(20).optional().nullable(),
552
- displayName: z.string().describe("Pool name").max(64).optional().nullable(),
553
- benefitDisplayName: z.string().describe("Benefit name").max(40).optional().nullable()
554
- }).describe("Pool associated with this transaction.").optional(),
555
- amount: z.string().describe("Amount the balance was adjusted in this transaction.").optional(),
556
- source: z.enum(["AVAILABLE", "EXTERNAL"]).describe("Where the credits came from.").optional(),
557
- target: z.enum(["AVAILABLE", "EXTERNAL"]).describe("Where the credits went to.").optional(),
558
- idempotencyKey: z.string().describe(
559
- "Unique identifier, generated by the client.\nUsed to recognize repeated attempts to make the same request."
560
- ).max(200).optional(),
561
- relatedTransactionId: z.string().describe(
562
- "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."
563
- ).regex(
564
- /^[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}$/,
565
- "Must be a valid GUID"
566
- ).optional().nullable(),
567
- beneficiary: z.intersection(
568
- z.object({}),
569
- z.xor([
570
- z.object({
571
- anonymousVisitorId: z.never().optional(),
572
- memberId: z.never().optional(),
573
- wixUserId: z.never().optional()
574
- }),
575
- z.object({
576
- memberId: z.never().optional(),
577
- wixUserId: z.never().optional(),
578
- anonymousVisitorId: z.string().describe(
579
- "ID of a site visitor that hasn't logged in to the site."
580
- ).regex(
581
- /^[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}$/,
582
- "Must be a valid GUID"
583
- )
584
- }),
585
- z.object({
586
- anonymousVisitorId: z.never().optional(),
587
- wixUserId: z.never().optional(),
588
- memberId: z.string().describe("ID of a site member.").regex(
589
- /^[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}$/,
590
- "Must be a valid GUID"
591
- )
592
- }),
593
- z.object({
594
- anonymousVisitorId: z.never().optional(),
595
- memberId: z.never().optional(),
596
- wixUserId: z.string().describe("ID of a Wix user.").regex(
597
- /^[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}$/,
598
- "Must be a valid GUID"
599
- )
600
- })
601
- ])
602
- ).describe("Beneficiary of the pool associated with this transaction.").optional(),
603
- instructingParty: z.intersection(
604
- z.object({}),
605
- z.xor([
606
- z.object({
607
- anonymousVisitorId: z.never().optional(),
608
- memberId: z.never().optional(),
609
- wixUserId: z.never().optional()
610
- }),
611
- z.object({
612
- memberId: z.never().optional(),
613
- wixUserId: z.never().optional(),
614
- anonymousVisitorId: z.string().describe(
615
- "ID of a site visitor that hasn't logged in to the site."
616
- ).regex(
617
- /^[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}$/,
618
- "Must be a valid GUID"
619
- )
620
- }),
621
- z.object({
622
- anonymousVisitorId: z.never().optional(),
623
- wixUserId: z.never().optional(),
624
- memberId: z.string().describe("ID of a site member.").regex(
625
- /^[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}$/,
626
- "Must be a valid GUID"
627
- )
628
- }),
629
- z.object({
630
- anonymousVisitorId: z.never().optional(),
631
- memberId: z.never().optional(),
632
- wixUserId: z.string().describe("ID of a Wix user.").regex(
633
- /^[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}$/,
634
- "Must be a valid GUID"
635
- )
636
- })
637
- ])
638
- ).describe("Identity that created the transaction.").optional(),
639
- status: z.enum(["PENDING", "COMPLETED", "FAILED"]).describe("Transaction status.").optional(),
640
- details: z.object({
641
- item: z.object({
642
- _id: z.string().describe("Item ID.").regex(
643
- /^[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}$/,
644
- "Must be a valid GUID"
645
- ).optional().nullable(),
646
- externalId: z.string().describe("Item external ID.").regex(
647
- /^[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}$/,
648
- "Must be a valid GUID"
649
- ).optional().nullable(),
650
- category: z.string().describe("Item category.").max(20).optional().nullable(),
651
- itemSetId: z.string().describe("Item set ID.").regex(
652
- /^[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}$/,
653
- "Must be a valid GUID"
654
- ).optional().nullable(),
655
- displayName: z.string().describe("Item name.").max(64).optional().nullable(),
656
- providerAppId: z.string().describe("Provider app id").regex(
657
- /^[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}$/,
658
- "Must be a valid GUID"
659
- ).optional().nullable()
660
- }).describe("Item associated with the transaction.").optional(),
661
- itemCount: z.number().int().describe("Amount of items associated with the transaction.").min(0).optional().nullable(),
662
- effectiveDate: z.date().describe("Date and time the transaction was created.").optional().nullable(),
663
- reason: z.string().describe(
664
- "Reason for the transaction. For example, `Redemption`."
665
- ).max(256).optional().nullable(),
666
- benefitKey: z.string().describe("Benefit key associated with the transaction.").max(64).optional().nullable()
667
- }).describe("Additional transaction details.").optional(),
668
- extendedFields: z.object({
669
- namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
670
- "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)."
671
- ).optional()
672
- }).describe(
673
- "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."
674
- ).optional(),
675
- externalId: z.string().describe("External transaction ID.").regex(
676
- /^[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}$/,
677
- "Must be a valid GUID"
678
- ).optional().nullable()
679
- })
680
- ).optional(),
681
- metadata: z.object({
682
- count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
683
- cursors: z.object({
684
- next: z.string().describe(
685
- "Cursor string pointing to the next page in the list of results."
686
- ).max(16e3).optional().nullable(),
687
- prev: z.string().describe(
688
- "Cursor pointing to the previous page in the list of results."
689
- ).max(16e3).optional().nullable()
690
- }).describe(
691
- "Cursor strings that point to the next page, previous page, or both."
692
- ).optional(),
693
- hasNext: z.boolean().describe(
694
- "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."
695
- ).optional().nullable()
696
- }).describe("Metadata for paginated results.").optional()
697
- });
698
-
699
- // src/benefit-programs-v1-transaction-transactions.universal.ts
700
202
  var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
701
203
  var BalanceType = /* @__PURE__ */ ((BalanceType2) => {
702
204
  BalanceType2["AVAILABLE"] = "AVAILABLE";
@@ -730,10 +232,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
730
232
  return WebhookIdentityType2;
731
233
  })(WebhookIdentityType || {});
732
234
  async function getTransaction2(transactionId) {
733
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
734
- if (validateRequestSchema) {
735
- GetTransactionRequest.parse({ transactionId });
736
- }
235
+ const { httpClient, sideEffects } = arguments[1];
737
236
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
738
237
  transactionId
739
238
  });
@@ -803,10 +302,7 @@ function queryTransactions2() {
803
302
  });
804
303
  }
805
304
  async function typedQueryTransactions(query) {
806
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
807
- if (validateRequestSchema) {
808
- QueryTransactionsRequest.parse({ query });
809
- }
305
+ const { httpClient, sideEffects } = arguments[1];
810
306
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
811
307
  const reqOpts = queryTransactions(payload);
812
308
  sideEffects?.onSiteCall?.();