@wix/auto_sdk_benefit-programs_program-definitions 1.0.48 → 1.0.50
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 +15 -5
- package/build/cjs/index.js +388 -20
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +4 -2
- package/build/cjs/index.typings.js +374 -6
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +4 -2
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +3 -3
- package/build/es/index.d.mts +15 -5
- package/build/es/index.mjs +378 -20
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +4 -2
- package/build/es/index.typings.mjs +364 -6
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +4 -2
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +3 -3
- package/build/internal/cjs/index.d.ts +15 -5
- package/build/internal/cjs/index.js +388 -20
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +4 -2
- package/build/internal/cjs/index.typings.js +374 -6
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +4 -2
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +3 -3
- package/build/internal/es/index.d.mts +15 -5
- package/build/internal/es/index.mjs +378 -20
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +4 -2
- package/build/internal/es/index.typings.mjs +364 -6
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +4 -2
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +3 -3
- package/package.json +2 -2
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
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
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
30
|
// index.ts
|
|
@@ -345,6 +355,340 @@ function queryProgramDefinitions(payload) {
|
|
|
345
355
|
|
|
346
356
|
// src/benefit-programs-v1-program-definition-program-definitions.universal.ts
|
|
347
357
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
358
|
+
|
|
359
|
+
// src/benefit-programs-v1-program-definition-program-definitions.schemas.ts
|
|
360
|
+
var z = __toESM(require("zod"));
|
|
361
|
+
var CreateProgramDefinitionRequest = z.object({
|
|
362
|
+
programDefinition: z.object({
|
|
363
|
+
_id: z.string().describe("Program definition ID.").regex(
|
|
364
|
+
/^[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}$/,
|
|
365
|
+
"Must be a valid GUID"
|
|
366
|
+
).optional().nullable(),
|
|
367
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
368
|
+
"Revision number, which increments by 1 each time the program definition is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the program definition.\n\nIgnored when creating a program definition."
|
|
369
|
+
).optional().nullable(),
|
|
370
|
+
_createdDate: z.date().describe("Date and time the program definition was created.").optional().nullable(),
|
|
371
|
+
_updatedDate: z.date().describe("Date and time the program definition was updated.").optional().nullable(),
|
|
372
|
+
displayName: z.string().describe("Program definition name.").max(64).optional().nullable(),
|
|
373
|
+
namespace: z.string().describe(
|
|
374
|
+
"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."
|
|
375
|
+
).min(1).max(20),
|
|
376
|
+
extendedFields: z.object({
|
|
377
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
378
|
+
"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)."
|
|
379
|
+
).optional()
|
|
380
|
+
}).describe(
|
|
381
|
+
"Custom field data for the program definition 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."
|
|
382
|
+
).optional(),
|
|
383
|
+
externalId: z.string().describe(
|
|
384
|
+
"ID for the program definition defined by you. You can use `externalId` to filter queries."
|
|
385
|
+
).regex(
|
|
386
|
+
/^[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}$/,
|
|
387
|
+
"Must be a valid GUID"
|
|
388
|
+
)
|
|
389
|
+
}).describe("Program definition to create.")
|
|
390
|
+
});
|
|
391
|
+
var CreateProgramDefinitionResponse = z.object({
|
|
392
|
+
_id: z.string().describe("Program definition ID.").regex(
|
|
393
|
+
/^[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}$/,
|
|
394
|
+
"Must be a valid GUID"
|
|
395
|
+
).optional().nullable(),
|
|
396
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
397
|
+
"Revision number, which increments by 1 each time the program definition is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the program definition.\n\nIgnored when creating a program definition."
|
|
398
|
+
).optional().nullable(),
|
|
399
|
+
_createdDate: z.date().describe("Date and time the program definition was created.").optional().nullable(),
|
|
400
|
+
_updatedDate: z.date().describe("Date and time the program definition was updated.").optional().nullable(),
|
|
401
|
+
displayName: z.string().describe("Program definition name.").max(64).optional().nullable(),
|
|
402
|
+
namespace: z.string().describe(
|
|
403
|
+
"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."
|
|
404
|
+
).min(1).max(20).optional().nullable(),
|
|
405
|
+
extendedFields: z.object({
|
|
406
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
407
|
+
"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)."
|
|
408
|
+
).optional()
|
|
409
|
+
}).describe(
|
|
410
|
+
"Custom field data for the program definition 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."
|
|
411
|
+
).optional(),
|
|
412
|
+
externalId: z.string().describe(
|
|
413
|
+
"ID for the program definition defined by you. You can use `externalId` to filter queries."
|
|
414
|
+
).regex(
|
|
415
|
+
/^[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}$/,
|
|
416
|
+
"Must be a valid GUID"
|
|
417
|
+
).optional().nullable()
|
|
418
|
+
});
|
|
419
|
+
var UpdateProgramDefinitionRequest = z.object({
|
|
420
|
+
_id: z.string().describe("Program definition ID.").regex(
|
|
421
|
+
/^[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}$/,
|
|
422
|
+
"Must be a valid GUID"
|
|
423
|
+
),
|
|
424
|
+
programDefinition: z.object({
|
|
425
|
+
_id: z.string().describe("Program definition ID.").regex(
|
|
426
|
+
/^[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}$/,
|
|
427
|
+
"Must be a valid GUID"
|
|
428
|
+
).optional().nullable(),
|
|
429
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
430
|
+
"Revision number, which increments by 1 each time the program definition is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the program definition.\n\nIgnored when creating a program definition."
|
|
431
|
+
),
|
|
432
|
+
_createdDate: z.date().describe("Date and time the program definition was created.").optional().nullable(),
|
|
433
|
+
_updatedDate: z.date().describe("Date and time the program definition was updated.").optional().nullable(),
|
|
434
|
+
displayName: z.string().describe("Program definition name.").max(64).optional().nullable(),
|
|
435
|
+
namespace: z.string().describe(
|
|
436
|
+
"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."
|
|
437
|
+
).min(1).max(20).optional().nullable(),
|
|
438
|
+
extendedFields: z.object({
|
|
439
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
440
|
+
"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)."
|
|
441
|
+
).optional()
|
|
442
|
+
}).describe(
|
|
443
|
+
"Custom field data for the program definition 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."
|
|
444
|
+
).optional(),
|
|
445
|
+
externalId: z.string().describe(
|
|
446
|
+
"ID for the program definition defined by you. You can use `externalId` to filter queries."
|
|
447
|
+
).regex(
|
|
448
|
+
/^[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}$/,
|
|
449
|
+
"Must be a valid GUID"
|
|
450
|
+
).optional().nullable()
|
|
451
|
+
}).describe("Program definition to update.")
|
|
452
|
+
});
|
|
453
|
+
var UpdateProgramDefinitionResponse = z.object({
|
|
454
|
+
_id: z.string().describe("Program definition ID.").regex(
|
|
455
|
+
/^[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}$/,
|
|
456
|
+
"Must be a valid GUID"
|
|
457
|
+
).optional().nullable(),
|
|
458
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
459
|
+
"Revision number, which increments by 1 each time the program definition is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the program definition.\n\nIgnored when creating a program definition."
|
|
460
|
+
).optional().nullable(),
|
|
461
|
+
_createdDate: z.date().describe("Date and time the program definition was created.").optional().nullable(),
|
|
462
|
+
_updatedDate: z.date().describe("Date and time the program definition was updated.").optional().nullable(),
|
|
463
|
+
displayName: z.string().describe("Program definition name.").max(64).optional().nullable(),
|
|
464
|
+
namespace: z.string().describe(
|
|
465
|
+
"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."
|
|
466
|
+
).min(1).max(20).optional().nullable(),
|
|
467
|
+
extendedFields: z.object({
|
|
468
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
469
|
+
"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)."
|
|
470
|
+
).optional()
|
|
471
|
+
}).describe(
|
|
472
|
+
"Custom field data for the program definition 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."
|
|
473
|
+
).optional(),
|
|
474
|
+
externalId: z.string().describe(
|
|
475
|
+
"ID for the program definition defined by you. You can use `externalId` to filter queries."
|
|
476
|
+
).regex(
|
|
477
|
+
/^[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}$/,
|
|
478
|
+
"Must be a valid GUID"
|
|
479
|
+
).optional().nullable()
|
|
480
|
+
});
|
|
481
|
+
var DeleteProgramDefinitionRequest = z.object({
|
|
482
|
+
programDefinitionId: z.string().describe("ID of the program definition to delete.").regex(
|
|
483
|
+
/^[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}$/,
|
|
484
|
+
"Must be a valid GUID"
|
|
485
|
+
),
|
|
486
|
+
options: z.object({
|
|
487
|
+
cascadeType: z.enum([
|
|
488
|
+
"UNKNOWN_CASCADE",
|
|
489
|
+
"IMMEDIATELY",
|
|
490
|
+
"NEXT_RENEWAL",
|
|
491
|
+
"FUTURE_PROVISIONS"
|
|
492
|
+
]).optional()
|
|
493
|
+
}).optional()
|
|
494
|
+
});
|
|
495
|
+
var DeleteProgramDefinitionResponse = z.object({});
|
|
496
|
+
var GetProgramDefinitionRequest = z.object({
|
|
497
|
+
programDefinitionId: z.string().describe("ID of the program definition to retrieve.").regex(
|
|
498
|
+
/^[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}$/,
|
|
499
|
+
"Must be a valid GUID"
|
|
500
|
+
)
|
|
501
|
+
});
|
|
502
|
+
var GetProgramDefinitionResponse = z.object({
|
|
503
|
+
_id: z.string().describe("Program definition ID.").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
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
508
|
+
"Revision number, which increments by 1 each time the program definition is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the program definition.\n\nIgnored when creating a program definition."
|
|
509
|
+
).optional().nullable(),
|
|
510
|
+
_createdDate: z.date().describe("Date and time the program definition was created.").optional().nullable(),
|
|
511
|
+
_updatedDate: z.date().describe("Date and time the program definition was updated.").optional().nullable(),
|
|
512
|
+
displayName: z.string().describe("Program definition name.").max(64).optional().nullable(),
|
|
513
|
+
namespace: z.string().describe(
|
|
514
|
+
"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."
|
|
515
|
+
).min(1).max(20).optional().nullable(),
|
|
516
|
+
extendedFields: z.object({
|
|
517
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
518
|
+
"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)."
|
|
519
|
+
).optional()
|
|
520
|
+
}).describe(
|
|
521
|
+
"Custom field data for the program definition 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."
|
|
522
|
+
).optional(),
|
|
523
|
+
externalId: z.string().describe(
|
|
524
|
+
"ID for the program definition defined by you. You can use `externalId` to filter queries."
|
|
525
|
+
).regex(
|
|
526
|
+
/^[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}$/,
|
|
527
|
+
"Must be a valid GUID"
|
|
528
|
+
).optional().nullable()
|
|
529
|
+
});
|
|
530
|
+
var GetProgramDefinitionByExternalIdAndNamespaceRequest = z.object({
|
|
531
|
+
namespace: z.string().describe(
|
|
532
|
+
"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."
|
|
533
|
+
).min(1).max(20),
|
|
534
|
+
options: z.object({
|
|
535
|
+
externalId: z.string().describe("Program definition external ID.").regex(
|
|
536
|
+
/^[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}$/,
|
|
537
|
+
"Must be a valid GUID"
|
|
538
|
+
)
|
|
539
|
+
})
|
|
540
|
+
});
|
|
541
|
+
var GetProgramDefinitionByExternalIdAndNamespaceResponse = z.object({
|
|
542
|
+
programDefinition: z.object({
|
|
543
|
+
_id: z.string().describe("Program definition ID.").regex(
|
|
544
|
+
/^[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}$/,
|
|
545
|
+
"Must be a valid GUID"
|
|
546
|
+
).optional().nullable(),
|
|
547
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
548
|
+
"Revision number, which increments by 1 each time the program definition is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the program definition.\n\nIgnored when creating a program definition."
|
|
549
|
+
).optional().nullable(),
|
|
550
|
+
_createdDate: z.date().describe("Date and time the program definition was created.").optional().nullable(),
|
|
551
|
+
_updatedDate: z.date().describe("Date and time the program definition was updated.").optional().nullable(),
|
|
552
|
+
displayName: z.string().describe("Program definition name.").max(64).optional().nullable(),
|
|
553
|
+
namespace: z.string().describe(
|
|
554
|
+
"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."
|
|
555
|
+
).min(1).max(20).optional().nullable(),
|
|
556
|
+
extendedFields: z.object({
|
|
557
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
558
|
+
"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)."
|
|
559
|
+
).optional()
|
|
560
|
+
}).describe(
|
|
561
|
+
"Custom field data for the program definition 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."
|
|
562
|
+
).optional(),
|
|
563
|
+
externalId: z.string().describe(
|
|
564
|
+
"ID for the program definition defined by you. You can use `externalId` to filter queries."
|
|
565
|
+
).regex(
|
|
566
|
+
/^[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}$/,
|
|
567
|
+
"Must be a valid GUID"
|
|
568
|
+
).optional().nullable()
|
|
569
|
+
}).describe("Retrieved program definition.").optional()
|
|
570
|
+
});
|
|
571
|
+
var QueryProgramDefinitionsRequest = z.object({
|
|
572
|
+
query: z.object({
|
|
573
|
+
filter: z.object({
|
|
574
|
+
_id: z.object({
|
|
575
|
+
$eq: z.string(),
|
|
576
|
+
$exists: z.boolean(),
|
|
577
|
+
$gt: z.string(),
|
|
578
|
+
$gte: z.string(),
|
|
579
|
+
$hasAll: z.array(z.string()),
|
|
580
|
+
$hasSome: z.array(z.string()),
|
|
581
|
+
$in: z.array(z.string()),
|
|
582
|
+
$lt: z.string(),
|
|
583
|
+
$lte: z.string(),
|
|
584
|
+
$ne: z.string(),
|
|
585
|
+
$nin: z.array(z.string()),
|
|
586
|
+
$startsWith: z.string()
|
|
587
|
+
}).partial().strict().optional(),
|
|
588
|
+
namespace: z.object({
|
|
589
|
+
$eq: z.string(),
|
|
590
|
+
$exists: z.boolean(),
|
|
591
|
+
$gt: z.string(),
|
|
592
|
+
$gte: z.string(),
|
|
593
|
+
$hasAll: z.array(z.string()),
|
|
594
|
+
$hasSome: z.array(z.string()),
|
|
595
|
+
$in: z.array(z.string()),
|
|
596
|
+
$lt: z.string(),
|
|
597
|
+
$lte: z.string(),
|
|
598
|
+
$ne: z.string(),
|
|
599
|
+
$nin: z.array(z.string()),
|
|
600
|
+
$startsWith: z.string()
|
|
601
|
+
}).partial().strict().optional(),
|
|
602
|
+
externalId: z.object({
|
|
603
|
+
$eq: z.string(),
|
|
604
|
+
$exists: z.boolean(),
|
|
605
|
+
$gt: z.string(),
|
|
606
|
+
$gte: z.string(),
|
|
607
|
+
$hasAll: z.array(z.string()),
|
|
608
|
+
$hasSome: z.array(z.string()),
|
|
609
|
+
$in: z.array(z.string()),
|
|
610
|
+
$lt: z.string(),
|
|
611
|
+
$lte: z.string(),
|
|
612
|
+
$ne: z.string(),
|
|
613
|
+
$nin: z.array(z.string()),
|
|
614
|
+
$startsWith: z.string()
|
|
615
|
+
}).partial().strict().optional(),
|
|
616
|
+
_createdDate: z.object({
|
|
617
|
+
$eq: z.string(),
|
|
618
|
+
$exists: z.boolean(),
|
|
619
|
+
$gt: z.string(),
|
|
620
|
+
$gte: z.string(),
|
|
621
|
+
$hasAll: z.array(z.string()),
|
|
622
|
+
$hasSome: z.array(z.string()),
|
|
623
|
+
$in: z.array(z.string()),
|
|
624
|
+
$lt: z.string(),
|
|
625
|
+
$lte: z.string(),
|
|
626
|
+
$ne: z.string(),
|
|
627
|
+
$nin: z.array(z.string()),
|
|
628
|
+
$startsWith: z.string()
|
|
629
|
+
}).partial().strict().optional(),
|
|
630
|
+
$and: z.array(z.any()).optional(),
|
|
631
|
+
$or: z.array(z.any()).optional(),
|
|
632
|
+
$not: z.any().optional()
|
|
633
|
+
}).strict().optional(),
|
|
634
|
+
sort: z.array(
|
|
635
|
+
z.object({
|
|
636
|
+
fieldName: z.enum(["_id", "namespace", "externalId", "_createdDate"]).optional(),
|
|
637
|
+
order: z.enum(["ASC", "DESC"]).optional()
|
|
638
|
+
})
|
|
639
|
+
).optional()
|
|
640
|
+
}).catchall(z.any()).describe("Filter, sort, and paging to apply to the query.")
|
|
641
|
+
});
|
|
642
|
+
var QueryProgramDefinitionsResponse = z.object({
|
|
643
|
+
programDefinitions: z.array(
|
|
644
|
+
z.object({
|
|
645
|
+
_id: z.string().describe("Program definition ID.").regex(
|
|
646
|
+
/^[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}$/,
|
|
647
|
+
"Must be a valid GUID"
|
|
648
|
+
).optional().nullable(),
|
|
649
|
+
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
650
|
+
"Revision number, which increments by 1 each time the program definition is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the program definition.\n\nIgnored when creating a program definition."
|
|
651
|
+
).optional().nullable(),
|
|
652
|
+
_createdDate: z.date().describe("Date and time the program definition was created.").optional().nullable(),
|
|
653
|
+
_updatedDate: z.date().describe("Date and time the program definition was updated.").optional().nullable(),
|
|
654
|
+
displayName: z.string().describe("Program definition name.").max(64).optional().nullable(),
|
|
655
|
+
namespace: z.string().describe(
|
|
656
|
+
"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."
|
|
657
|
+
).min(1).max(20).optional().nullable(),
|
|
658
|
+
extendedFields: z.object({
|
|
659
|
+
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
660
|
+
"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)."
|
|
661
|
+
).optional()
|
|
662
|
+
}).describe(
|
|
663
|
+
"Custom field data for the program definition 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."
|
|
664
|
+
).optional(),
|
|
665
|
+
externalId: z.string().describe(
|
|
666
|
+
"ID for the program definition defined by you. You can use `externalId` to filter queries."
|
|
667
|
+
).regex(
|
|
668
|
+
/^[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}$/,
|
|
669
|
+
"Must be a valid GUID"
|
|
670
|
+
).optional().nullable()
|
|
671
|
+
})
|
|
672
|
+
).optional(),
|
|
673
|
+
metadata: z.object({
|
|
674
|
+
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
675
|
+
cursors: z.object({
|
|
676
|
+
next: z.string().describe(
|
|
677
|
+
"Cursor string pointing to the next page in the list of results."
|
|
678
|
+
).max(16e3).optional().nullable(),
|
|
679
|
+
prev: z.string().describe(
|
|
680
|
+
"Cursor pointing to the previous page in the list of results."
|
|
681
|
+
).max(16e3).optional().nullable()
|
|
682
|
+
}).describe(
|
|
683
|
+
"Cursor strings that point to the next page, previous page, or both."
|
|
684
|
+
).optional(),
|
|
685
|
+
hasNext: z.boolean().describe(
|
|
686
|
+
"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."
|
|
687
|
+
).optional().nullable()
|
|
688
|
+
}).describe("Metadata for the paginated results.").optional()
|
|
689
|
+
});
|
|
690
|
+
|
|
691
|
+
// src/benefit-programs-v1-program-definition-program-definitions.universal.ts
|
|
348
692
|
var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
|
|
349
693
|
var Cascade = /* @__PURE__ */ ((Cascade2) => {
|
|
350
694
|
Cascade2["UNKNOWN_CASCADE"] = "UNKNOWN_CASCADE";
|
|
@@ -367,7 +711,10 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
367
711
|
return WebhookIdentityType2;
|
|
368
712
|
})(WebhookIdentityType || {});
|
|
369
713
|
async function createProgramDefinition2(programDefinition) {
|
|
370
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
714
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
715
|
+
if (validateRequestSchema) {
|
|
716
|
+
CreateProgramDefinitionRequest.parse({ programDefinition });
|
|
717
|
+
}
|
|
371
718
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
372
719
|
programDefinition
|
|
373
720
|
});
|
|
@@ -394,7 +741,10 @@ async function createProgramDefinition2(programDefinition) {
|
|
|
394
741
|
}
|
|
395
742
|
}
|
|
396
743
|
async function updateProgramDefinition2(_id, programDefinition) {
|
|
397
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
744
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
745
|
+
if (validateRequestSchema) {
|
|
746
|
+
UpdateProgramDefinitionRequest.parse({ _id, programDefinition });
|
|
747
|
+
}
|
|
398
748
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
399
749
|
programDefinition: { ...programDefinition, id: _id }
|
|
400
750
|
});
|
|
@@ -421,7 +771,13 @@ async function updateProgramDefinition2(_id, programDefinition) {
|
|
|
421
771
|
}
|
|
422
772
|
}
|
|
423
773
|
async function deleteProgramDefinition2(programDefinitionId, options) {
|
|
424
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
774
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
775
|
+
if (validateRequestSchema) {
|
|
776
|
+
DeleteProgramDefinitionRequest.parse({
|
|
777
|
+
programDefinitionId,
|
|
778
|
+
options
|
|
779
|
+
});
|
|
780
|
+
}
|
|
425
781
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
426
782
|
programDefinitionId,
|
|
427
783
|
cascadeType: options?.cascadeType
|
|
@@ -451,7 +807,10 @@ async function deleteProgramDefinition2(programDefinitionId, options) {
|
|
|
451
807
|
}
|
|
452
808
|
}
|
|
453
809
|
async function getProgramDefinition2(programDefinitionId) {
|
|
454
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
810
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
811
|
+
if (validateRequestSchema) {
|
|
812
|
+
GetProgramDefinitionRequest.parse({ programDefinitionId });
|
|
813
|
+
}
|
|
455
814
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
456
815
|
programDefinitionId
|
|
457
816
|
});
|
|
@@ -478,7 +837,13 @@ async function getProgramDefinition2(programDefinitionId) {
|
|
|
478
837
|
}
|
|
479
838
|
}
|
|
480
839
|
async function getProgramDefinitionByExternalIdAndNamespace2(namespace, options) {
|
|
481
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
840
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
|
|
841
|
+
if (validateRequestSchema) {
|
|
842
|
+
GetProgramDefinitionByExternalIdAndNamespaceRequest.parse({
|
|
843
|
+
namespace,
|
|
844
|
+
options
|
|
845
|
+
});
|
|
846
|
+
}
|
|
482
847
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
483
848
|
namespace,
|
|
484
849
|
externalId: options?.externalId
|
|
@@ -556,7 +921,10 @@ function queryProgramDefinitions2() {
|
|
|
556
921
|
});
|
|
557
922
|
}
|
|
558
923
|
async function typedQueryProgramDefinitions(query) {
|
|
559
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
924
|
+
const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
|
|
925
|
+
if (validateRequestSchema) {
|
|
926
|
+
QueryProgramDefinitionsRequest.parse({ query });
|
|
927
|
+
}
|
|
560
928
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
|
|
561
929
|
const reqOpts = queryProgramDefinitions(
|
|
562
930
|
payload
|
|
@@ -587,55 +955,55 @@ var utils = {
|
|
|
587
955
|
};
|
|
588
956
|
|
|
589
957
|
// src/benefit-programs-v1-program-definition-program-definitions.public.ts
|
|
590
|
-
function createProgramDefinition3(httpClient) {
|
|
958
|
+
function createProgramDefinition3(httpClient, __options) {
|
|
591
959
|
return (programDefinition) => createProgramDefinition2(
|
|
592
960
|
programDefinition,
|
|
593
961
|
// @ts-ignore
|
|
594
|
-
{ httpClient }
|
|
962
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
595
963
|
);
|
|
596
964
|
}
|
|
597
|
-
function updateProgramDefinition3(httpClient) {
|
|
965
|
+
function updateProgramDefinition3(httpClient, __options) {
|
|
598
966
|
return (_id, programDefinition) => updateProgramDefinition2(
|
|
599
967
|
_id,
|
|
600
968
|
programDefinition,
|
|
601
969
|
// @ts-ignore
|
|
602
|
-
{ httpClient }
|
|
970
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
603
971
|
);
|
|
604
972
|
}
|
|
605
|
-
function deleteProgramDefinition3(httpClient) {
|
|
973
|
+
function deleteProgramDefinition3(httpClient, __options) {
|
|
606
974
|
return (programDefinitionId, options) => deleteProgramDefinition2(
|
|
607
975
|
programDefinitionId,
|
|
608
976
|
options,
|
|
609
977
|
// @ts-ignore
|
|
610
|
-
{ httpClient }
|
|
978
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
611
979
|
);
|
|
612
980
|
}
|
|
613
|
-
function getProgramDefinition3(httpClient) {
|
|
981
|
+
function getProgramDefinition3(httpClient, __options) {
|
|
614
982
|
return (programDefinitionId) => getProgramDefinition2(
|
|
615
983
|
programDefinitionId,
|
|
616
984
|
// @ts-ignore
|
|
617
|
-
{ httpClient }
|
|
985
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
618
986
|
);
|
|
619
987
|
}
|
|
620
|
-
function getProgramDefinitionByExternalIdAndNamespace3(httpClient) {
|
|
988
|
+
function getProgramDefinitionByExternalIdAndNamespace3(httpClient, __options) {
|
|
621
989
|
return (namespace, options) => getProgramDefinitionByExternalIdAndNamespace2(
|
|
622
990
|
namespace,
|
|
623
991
|
options,
|
|
624
992
|
// @ts-ignore
|
|
625
|
-
{ httpClient }
|
|
993
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
626
994
|
);
|
|
627
995
|
}
|
|
628
|
-
function queryProgramDefinitions3(httpClient) {
|
|
996
|
+
function queryProgramDefinitions3(httpClient, __options) {
|
|
629
997
|
return () => queryProgramDefinitions2(
|
|
630
998
|
// @ts-ignore
|
|
631
|
-
{ httpClient }
|
|
999
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
632
1000
|
);
|
|
633
1001
|
}
|
|
634
|
-
function typedQueryProgramDefinitions2(httpClient) {
|
|
1002
|
+
function typedQueryProgramDefinitions2(httpClient, __options) {
|
|
635
1003
|
return (query) => typedQueryProgramDefinitions(
|
|
636
1004
|
query,
|
|
637
1005
|
// @ts-ignore
|
|
638
|
-
{ httpClient }
|
|
1006
|
+
{ httpClient, validateRequestSchema: __options?.validateRequestSchema }
|
|
639
1007
|
);
|
|
640
1008
|
}
|
|
641
1009
|
|