@wix/auto_sdk_benefit-programs_program-definitions 1.0.50 → 1.0.51
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 +5 -15
- package/build/cjs/index.js +20 -388
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +6 -374
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/schemas.d.ts +3 -3
- package/build/es/index.d.mts +5 -15
- package/build/es/index.mjs +20 -378
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +6 -364
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/schemas.d.mts +3 -3
- package/build/internal/cjs/index.d.ts +5 -15
- package/build/internal/cjs/index.js +20 -388
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +6 -374
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +3 -3
- package/build/internal/es/index.d.mts +5 -15
- package/build/internal/es/index.mjs +20 -378
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +6 -364
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +3 -3
- package/package.json +2 -2
|
@@ -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
|
|
@@ -356,340 +346,6 @@ function queryProgramDefinitions(payload) {
|
|
|
356
346
|
|
|
357
347
|
// src/benefit-programs-v1-program-definition-program-definitions.universal.ts
|
|
358
348
|
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
359
|
-
|
|
360
|
-
// src/benefit-programs-v1-program-definition-program-definitions.schemas.ts
|
|
361
|
-
var z = __toESM(require("zod"));
|
|
362
|
-
var CreateProgramDefinitionRequest = z.object({
|
|
363
|
-
programDefinition: z.object({
|
|
364
|
-
_id: z.string().describe("Program definition 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
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
369
|
-
"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."
|
|
370
|
-
).optional().nullable(),
|
|
371
|
-
_createdDate: z.date().describe("Date and time the program definition was created.").optional().nullable(),
|
|
372
|
-
_updatedDate: z.date().describe("Date and time the program definition was updated.").optional().nullable(),
|
|
373
|
-
displayName: z.string().describe("Program definition name.").max(64).optional().nullable(),
|
|
374
|
-
namespace: z.string().describe(
|
|
375
|
-
"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."
|
|
376
|
-
).min(1).max(20),
|
|
377
|
-
extendedFields: z.object({
|
|
378
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
379
|
-
"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)."
|
|
380
|
-
).optional()
|
|
381
|
-
}).describe(
|
|
382
|
-
"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."
|
|
383
|
-
).optional(),
|
|
384
|
-
externalId: z.string().describe(
|
|
385
|
-
"ID for the program definition defined by you. You can use `externalId` to filter queries."
|
|
386
|
-
).regex(
|
|
387
|
-
/^[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}$/,
|
|
388
|
-
"Must be a valid GUID"
|
|
389
|
-
)
|
|
390
|
-
}).describe("Program definition to create.")
|
|
391
|
-
});
|
|
392
|
-
var CreateProgramDefinitionResponse = z.object({
|
|
393
|
-
_id: z.string().describe("Program definition ID.").regex(
|
|
394
|
-
/^[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}$/,
|
|
395
|
-
"Must be a valid GUID"
|
|
396
|
-
).optional().nullable(),
|
|
397
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
398
|
-
"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."
|
|
399
|
-
).optional().nullable(),
|
|
400
|
-
_createdDate: z.date().describe("Date and time the program definition was created.").optional().nullable(),
|
|
401
|
-
_updatedDate: z.date().describe("Date and time the program definition was updated.").optional().nullable(),
|
|
402
|
-
displayName: z.string().describe("Program definition name.").max(64).optional().nullable(),
|
|
403
|
-
namespace: z.string().describe(
|
|
404
|
-
"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."
|
|
405
|
-
).min(1).max(20).optional().nullable(),
|
|
406
|
-
extendedFields: z.object({
|
|
407
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
408
|
-
"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)."
|
|
409
|
-
).optional()
|
|
410
|
-
}).describe(
|
|
411
|
-
"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."
|
|
412
|
-
).optional(),
|
|
413
|
-
externalId: z.string().describe(
|
|
414
|
-
"ID for the program definition defined by you. You can use `externalId` to filter queries."
|
|
415
|
-
).regex(
|
|
416
|
-
/^[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}$/,
|
|
417
|
-
"Must be a valid GUID"
|
|
418
|
-
).optional().nullable()
|
|
419
|
-
});
|
|
420
|
-
var UpdateProgramDefinitionRequest = z.object({
|
|
421
|
-
_id: z.string().describe("Program definition ID.").regex(
|
|
422
|
-
/^[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}$/,
|
|
423
|
-
"Must be a valid GUID"
|
|
424
|
-
),
|
|
425
|
-
programDefinition: z.object({
|
|
426
|
-
_id: z.string().describe("Program definition ID.").regex(
|
|
427
|
-
/^[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}$/,
|
|
428
|
-
"Must be a valid GUID"
|
|
429
|
-
).optional().nullable(),
|
|
430
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
431
|
-
"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."
|
|
432
|
-
),
|
|
433
|
-
_createdDate: z.date().describe("Date and time the program definition was created.").optional().nullable(),
|
|
434
|
-
_updatedDate: z.date().describe("Date and time the program definition was updated.").optional().nullable(),
|
|
435
|
-
displayName: z.string().describe("Program definition name.").max(64).optional().nullable(),
|
|
436
|
-
namespace: z.string().describe(
|
|
437
|
-
"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."
|
|
438
|
-
).min(1).max(20).optional().nullable(),
|
|
439
|
-
extendedFields: z.object({
|
|
440
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
441
|
-
"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)."
|
|
442
|
-
).optional()
|
|
443
|
-
}).describe(
|
|
444
|
-
"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."
|
|
445
|
-
).optional(),
|
|
446
|
-
externalId: z.string().describe(
|
|
447
|
-
"ID for the program definition defined by you. You can use `externalId` to filter queries."
|
|
448
|
-
).regex(
|
|
449
|
-
/^[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}$/,
|
|
450
|
-
"Must be a valid GUID"
|
|
451
|
-
).optional().nullable()
|
|
452
|
-
}).describe("Program definition to update.")
|
|
453
|
-
});
|
|
454
|
-
var UpdateProgramDefinitionResponse = z.object({
|
|
455
|
-
_id: z.string().describe("Program definition ID.").regex(
|
|
456
|
-
/^[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}$/,
|
|
457
|
-
"Must be a valid GUID"
|
|
458
|
-
).optional().nullable(),
|
|
459
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
460
|
-
"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."
|
|
461
|
-
).optional().nullable(),
|
|
462
|
-
_createdDate: z.date().describe("Date and time the program definition was created.").optional().nullable(),
|
|
463
|
-
_updatedDate: z.date().describe("Date and time the program definition was updated.").optional().nullable(),
|
|
464
|
-
displayName: z.string().describe("Program definition name.").max(64).optional().nullable(),
|
|
465
|
-
namespace: z.string().describe(
|
|
466
|
-
"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."
|
|
467
|
-
).min(1).max(20).optional().nullable(),
|
|
468
|
-
extendedFields: z.object({
|
|
469
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
470
|
-
"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)."
|
|
471
|
-
).optional()
|
|
472
|
-
}).describe(
|
|
473
|
-
"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."
|
|
474
|
-
).optional(),
|
|
475
|
-
externalId: z.string().describe(
|
|
476
|
-
"ID for the program definition defined by you. You can use `externalId` to filter queries."
|
|
477
|
-
).regex(
|
|
478
|
-
/^[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}$/,
|
|
479
|
-
"Must be a valid GUID"
|
|
480
|
-
).optional().nullable()
|
|
481
|
-
});
|
|
482
|
-
var DeleteProgramDefinitionRequest = z.object({
|
|
483
|
-
programDefinitionId: z.string().describe("ID of the program definition to delete.").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
|
-
),
|
|
487
|
-
options: z.object({
|
|
488
|
-
cascadeType: z.enum([
|
|
489
|
-
"UNKNOWN_CASCADE",
|
|
490
|
-
"IMMEDIATELY",
|
|
491
|
-
"NEXT_RENEWAL",
|
|
492
|
-
"FUTURE_PROVISIONS"
|
|
493
|
-
]).optional()
|
|
494
|
-
}).optional()
|
|
495
|
-
});
|
|
496
|
-
var DeleteProgramDefinitionResponse = z.object({});
|
|
497
|
-
var GetProgramDefinitionRequest = z.object({
|
|
498
|
-
programDefinitionId: z.string().describe("ID of the program definition to retrieve.").regex(
|
|
499
|
-
/^[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}$/,
|
|
500
|
-
"Must be a valid GUID"
|
|
501
|
-
)
|
|
502
|
-
});
|
|
503
|
-
var GetProgramDefinitionResponse = z.object({
|
|
504
|
-
_id: z.string().describe("Program definition ID.").regex(
|
|
505
|
-
/^[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}$/,
|
|
506
|
-
"Must be a valid GUID"
|
|
507
|
-
).optional().nullable(),
|
|
508
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
509
|
-
"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."
|
|
510
|
-
).optional().nullable(),
|
|
511
|
-
_createdDate: z.date().describe("Date and time the program definition was created.").optional().nullable(),
|
|
512
|
-
_updatedDate: z.date().describe("Date and time the program definition was updated.").optional().nullable(),
|
|
513
|
-
displayName: z.string().describe("Program definition name.").max(64).optional().nullable(),
|
|
514
|
-
namespace: z.string().describe(
|
|
515
|
-
"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."
|
|
516
|
-
).min(1).max(20).optional().nullable(),
|
|
517
|
-
extendedFields: z.object({
|
|
518
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
519
|
-
"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)."
|
|
520
|
-
).optional()
|
|
521
|
-
}).describe(
|
|
522
|
-
"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."
|
|
523
|
-
).optional(),
|
|
524
|
-
externalId: z.string().describe(
|
|
525
|
-
"ID for the program definition defined by you. You can use `externalId` to filter queries."
|
|
526
|
-
).regex(
|
|
527
|
-
/^[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}$/,
|
|
528
|
-
"Must be a valid GUID"
|
|
529
|
-
).optional().nullable()
|
|
530
|
-
});
|
|
531
|
-
var GetProgramDefinitionByExternalIdAndNamespaceRequest = z.object({
|
|
532
|
-
namespace: z.string().describe(
|
|
533
|
-
"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."
|
|
534
|
-
).min(1).max(20),
|
|
535
|
-
options: z.object({
|
|
536
|
-
externalId: z.string().describe("Program definition external ID.").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
|
-
)
|
|
540
|
-
})
|
|
541
|
-
});
|
|
542
|
-
var GetProgramDefinitionByExternalIdAndNamespaceResponse = z.object({
|
|
543
|
-
programDefinition: z.object({
|
|
544
|
-
_id: z.string().describe("Program definition ID.").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
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
549
|
-
"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."
|
|
550
|
-
).optional().nullable(),
|
|
551
|
-
_createdDate: z.date().describe("Date and time the program definition was created.").optional().nullable(),
|
|
552
|
-
_updatedDate: z.date().describe("Date and time the program definition was updated.").optional().nullable(),
|
|
553
|
-
displayName: z.string().describe("Program definition name.").max(64).optional().nullable(),
|
|
554
|
-
namespace: z.string().describe(
|
|
555
|
-
"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."
|
|
556
|
-
).min(1).max(20).optional().nullable(),
|
|
557
|
-
extendedFields: z.object({
|
|
558
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
559
|
-
"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)."
|
|
560
|
-
).optional()
|
|
561
|
-
}).describe(
|
|
562
|
-
"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."
|
|
563
|
-
).optional(),
|
|
564
|
-
externalId: z.string().describe(
|
|
565
|
-
"ID for the program definition defined by you. You can use `externalId` to filter queries."
|
|
566
|
-
).regex(
|
|
567
|
-
/^[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}$/,
|
|
568
|
-
"Must be a valid GUID"
|
|
569
|
-
).optional().nullable()
|
|
570
|
-
}).describe("Retrieved program definition.").optional()
|
|
571
|
-
});
|
|
572
|
-
var QueryProgramDefinitionsRequest = z.object({
|
|
573
|
-
query: z.object({
|
|
574
|
-
filter: z.object({
|
|
575
|
-
_id: z.object({
|
|
576
|
-
$eq: z.string(),
|
|
577
|
-
$exists: z.boolean(),
|
|
578
|
-
$gt: z.string(),
|
|
579
|
-
$gte: z.string(),
|
|
580
|
-
$hasAll: z.array(z.string()),
|
|
581
|
-
$hasSome: z.array(z.string()),
|
|
582
|
-
$in: z.array(z.string()),
|
|
583
|
-
$lt: z.string(),
|
|
584
|
-
$lte: z.string(),
|
|
585
|
-
$ne: z.string(),
|
|
586
|
-
$nin: z.array(z.string()),
|
|
587
|
-
$startsWith: z.string()
|
|
588
|
-
}).partial().strict().optional(),
|
|
589
|
-
namespace: z.object({
|
|
590
|
-
$eq: z.string(),
|
|
591
|
-
$exists: z.boolean(),
|
|
592
|
-
$gt: z.string(),
|
|
593
|
-
$gte: z.string(),
|
|
594
|
-
$hasAll: z.array(z.string()),
|
|
595
|
-
$hasSome: z.array(z.string()),
|
|
596
|
-
$in: z.array(z.string()),
|
|
597
|
-
$lt: z.string(),
|
|
598
|
-
$lte: z.string(),
|
|
599
|
-
$ne: z.string(),
|
|
600
|
-
$nin: z.array(z.string()),
|
|
601
|
-
$startsWith: z.string()
|
|
602
|
-
}).partial().strict().optional(),
|
|
603
|
-
externalId: z.object({
|
|
604
|
-
$eq: z.string(),
|
|
605
|
-
$exists: z.boolean(),
|
|
606
|
-
$gt: z.string(),
|
|
607
|
-
$gte: z.string(),
|
|
608
|
-
$hasAll: z.array(z.string()),
|
|
609
|
-
$hasSome: z.array(z.string()),
|
|
610
|
-
$in: z.array(z.string()),
|
|
611
|
-
$lt: z.string(),
|
|
612
|
-
$lte: z.string(),
|
|
613
|
-
$ne: z.string(),
|
|
614
|
-
$nin: z.array(z.string()),
|
|
615
|
-
$startsWith: z.string()
|
|
616
|
-
}).partial().strict().optional(),
|
|
617
|
-
_createdDate: z.object({
|
|
618
|
-
$eq: z.string(),
|
|
619
|
-
$exists: z.boolean(),
|
|
620
|
-
$gt: z.string(),
|
|
621
|
-
$gte: z.string(),
|
|
622
|
-
$hasAll: z.array(z.string()),
|
|
623
|
-
$hasSome: z.array(z.string()),
|
|
624
|
-
$in: z.array(z.string()),
|
|
625
|
-
$lt: z.string(),
|
|
626
|
-
$lte: z.string(),
|
|
627
|
-
$ne: z.string(),
|
|
628
|
-
$nin: z.array(z.string()),
|
|
629
|
-
$startsWith: z.string()
|
|
630
|
-
}).partial().strict().optional(),
|
|
631
|
-
$and: z.array(z.any()).optional(),
|
|
632
|
-
$or: z.array(z.any()).optional(),
|
|
633
|
-
$not: z.any().optional()
|
|
634
|
-
}).strict().optional(),
|
|
635
|
-
sort: z.array(
|
|
636
|
-
z.object({
|
|
637
|
-
fieldName: z.enum(["_id", "namespace", "externalId", "_createdDate"]).optional(),
|
|
638
|
-
order: z.enum(["ASC", "DESC"]).optional()
|
|
639
|
-
})
|
|
640
|
-
).optional()
|
|
641
|
-
}).catchall(z.any()).describe("Filter, sort, and paging to apply to the query.")
|
|
642
|
-
});
|
|
643
|
-
var QueryProgramDefinitionsResponse = z.object({
|
|
644
|
-
programDefinitions: z.array(
|
|
645
|
-
z.object({
|
|
646
|
-
_id: z.string().describe("Program definition 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
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
651
|
-
"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."
|
|
652
|
-
).optional().nullable(),
|
|
653
|
-
_createdDate: z.date().describe("Date and time the program definition was created.").optional().nullable(),
|
|
654
|
-
_updatedDate: z.date().describe("Date and time the program definition was updated.").optional().nullable(),
|
|
655
|
-
displayName: z.string().describe("Program definition name.").max(64).optional().nullable(),
|
|
656
|
-
namespace: z.string().describe(
|
|
657
|
-
"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."
|
|
658
|
-
).min(1).max(20).optional().nullable(),
|
|
659
|
-
extendedFields: z.object({
|
|
660
|
-
namespaces: z.record(z.string(), z.record(z.string(), z.any())).describe(
|
|
661
|
-
"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)."
|
|
662
|
-
).optional()
|
|
663
|
-
}).describe(
|
|
664
|
-
"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."
|
|
665
|
-
).optional(),
|
|
666
|
-
externalId: z.string().describe(
|
|
667
|
-
"ID for the program definition defined by you. You can use `externalId` to filter queries."
|
|
668
|
-
).regex(
|
|
669
|
-
/^[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}$/,
|
|
670
|
-
"Must be a valid GUID"
|
|
671
|
-
).optional().nullable()
|
|
672
|
-
})
|
|
673
|
-
).optional(),
|
|
674
|
-
metadata: z.object({
|
|
675
|
-
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
676
|
-
cursors: z.object({
|
|
677
|
-
next: z.string().describe(
|
|
678
|
-
"Cursor string pointing to the next page in the list of results."
|
|
679
|
-
).max(16e3).optional().nullable(),
|
|
680
|
-
prev: z.string().describe(
|
|
681
|
-
"Cursor pointing to the previous page in the list of results."
|
|
682
|
-
).max(16e3).optional().nullable()
|
|
683
|
-
}).describe(
|
|
684
|
-
"Cursor strings that point to the next page, previous page, or both."
|
|
685
|
-
).optional(),
|
|
686
|
-
hasNext: z.boolean().describe(
|
|
687
|
-
"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."
|
|
688
|
-
).optional().nullable()
|
|
689
|
-
}).describe("Metadata for the paginated results.").optional()
|
|
690
|
-
});
|
|
691
|
-
|
|
692
|
-
// src/benefit-programs-v1-program-definition-program-definitions.universal.ts
|
|
693
349
|
var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
|
|
694
350
|
var Cascade = /* @__PURE__ */ ((Cascade2) => {
|
|
695
351
|
Cascade2["UNKNOWN_CASCADE"] = "UNKNOWN_CASCADE";
|
|
@@ -712,10 +368,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
712
368
|
return WebhookIdentityType2;
|
|
713
369
|
})(WebhookIdentityType || {});
|
|
714
370
|
async function createProgramDefinition2(programDefinition) {
|
|
715
|
-
const { httpClient, sideEffects
|
|
716
|
-
if (validateRequestSchema) {
|
|
717
|
-
CreateProgramDefinitionRequest.parse({ programDefinition });
|
|
718
|
-
}
|
|
371
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
719
372
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
720
373
|
programDefinition
|
|
721
374
|
});
|
|
@@ -742,10 +395,7 @@ async function createProgramDefinition2(programDefinition) {
|
|
|
742
395
|
}
|
|
743
396
|
}
|
|
744
397
|
async function updateProgramDefinition2(_id, programDefinition) {
|
|
745
|
-
const { httpClient, sideEffects
|
|
746
|
-
if (validateRequestSchema) {
|
|
747
|
-
UpdateProgramDefinitionRequest.parse({ _id, programDefinition });
|
|
748
|
-
}
|
|
398
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
749
399
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
750
400
|
programDefinition: { ...programDefinition, id: _id }
|
|
751
401
|
});
|
|
@@ -772,13 +422,7 @@ async function updateProgramDefinition2(_id, programDefinition) {
|
|
|
772
422
|
}
|
|
773
423
|
}
|
|
774
424
|
async function deleteProgramDefinition2(programDefinitionId, options) {
|
|
775
|
-
const { httpClient, sideEffects
|
|
776
|
-
if (validateRequestSchema) {
|
|
777
|
-
DeleteProgramDefinitionRequest.parse({
|
|
778
|
-
programDefinitionId,
|
|
779
|
-
options
|
|
780
|
-
});
|
|
781
|
-
}
|
|
425
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
782
426
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
783
427
|
programDefinitionId,
|
|
784
428
|
cascadeType: options?.cascadeType
|
|
@@ -808,10 +452,7 @@ async function deleteProgramDefinition2(programDefinitionId, options) {
|
|
|
808
452
|
}
|
|
809
453
|
}
|
|
810
454
|
async function getProgramDefinition2(programDefinitionId) {
|
|
811
|
-
const { httpClient, sideEffects
|
|
812
|
-
if (validateRequestSchema) {
|
|
813
|
-
GetProgramDefinitionRequest.parse({ programDefinitionId });
|
|
814
|
-
}
|
|
455
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
815
456
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
816
457
|
programDefinitionId
|
|
817
458
|
});
|
|
@@ -838,13 +479,7 @@ async function getProgramDefinition2(programDefinitionId) {
|
|
|
838
479
|
}
|
|
839
480
|
}
|
|
840
481
|
async function getProgramDefinitionByExternalIdAndNamespace2(namespace, options) {
|
|
841
|
-
const { httpClient, sideEffects
|
|
842
|
-
if (validateRequestSchema) {
|
|
843
|
-
GetProgramDefinitionByExternalIdAndNamespaceRequest.parse({
|
|
844
|
-
namespace,
|
|
845
|
-
options
|
|
846
|
-
});
|
|
847
|
-
}
|
|
482
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
848
483
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
849
484
|
namespace,
|
|
850
485
|
externalId: options?.externalId
|
|
@@ -922,10 +557,7 @@ function queryProgramDefinitions2() {
|
|
|
922
557
|
});
|
|
923
558
|
}
|
|
924
559
|
async function typedQueryProgramDefinitions(query) {
|
|
925
|
-
const { httpClient, sideEffects
|
|
926
|
-
if (validateRequestSchema) {
|
|
927
|
-
QueryProgramDefinitionsRequest.parse({ query });
|
|
928
|
-
}
|
|
560
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
929
561
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
|
|
930
562
|
const reqOpts = queryProgramDefinitions(
|
|
931
563
|
payload
|