@wix/auto_sdk_benefit-programs_program-definitions 1.0.50 → 1.0.52

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +5 -15
  2. package/build/cjs/index.js +20 -388
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +1 -1
  5. package/build/cjs/index.typings.js +6 -374
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +1 -1
  8. package/build/cjs/meta.js.map +1 -1
  9. package/build/cjs/schemas.d.ts +3 -3
  10. package/build/es/index.d.mts +5 -15
  11. package/build/es/index.mjs +20 -378
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +1 -1
  14. package/build/es/index.typings.mjs +6 -364
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +1 -1
  17. package/build/es/meta.mjs.map +1 -1
  18. package/build/es/schemas.d.mts +3 -3
  19. package/build/internal/cjs/index.d.ts +5 -15
  20. package/build/internal/cjs/index.js +20 -388
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +1 -1
  23. package/build/internal/cjs/index.typings.js +6 -374
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +1 -1
  26. package/build/internal/cjs/meta.js.map +1 -1
  27. package/build/internal/cjs/schemas.d.ts +3 -3
  28. package/build/internal/es/index.d.mts +5 -15
  29. package/build/internal/es/index.mjs +20 -378
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +1 -1
  32. package/build/internal/es/index.typings.mjs +6 -364
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +1 -1
  35. package/build/internal/es/meta.mjs.map +1 -1
  36. package/build/internal/es/schemas.d.mts +3 -3
  37. package/package.json +2 -2
@@ -2,9 +2,7 @@ import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@
2
2
  import { ProgramDefinition, UpdateProgramDefinition, DeleteProgramDefinitionOptions, GetProgramDefinitionByExternalIdAndNamespaceOptions, GetProgramDefinitionByExternalIdAndNamespaceResponse, ProgramDefinitionsQueryBuilder, ProgramDefinitionQuery, typedQueryProgramDefinitions } from './index.typings.js';
3
3
  export { AccountInfo, ActionEvent, Cascade, CascadeWithLiterals, CommonQueryWithEntityContext, CreateProgramDefinitionRequest, CreateProgramDefinitionResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteProgramDefinitionRequest, DeleteProgramDefinitionResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, GetOrCreateProgramDefinitionRequest, GetOrCreateProgramDefinitionResponse, GetProgramDefinitionByExternalIdAndNamespaceRequest, GetProgramDefinitionRequest, GetProgramDefinitionResponse, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, ProgramDefinitionQuerySpec, ProgramDefinitionTranslated, ProgramDefinitionTranslationDeleted, ProgramDefinitionsQueryResult, QueryProgramDefinitionsRequest, QueryProgramDefinitionsResponse, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, UpdateProgramDefinitionRequest, UpdateProgramDefinitionResponse, UpsertProgramDefinitionRequest, UpsertProgramDefinitionResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
4
4
 
5
- declare function createProgramDefinition$1(httpClient: HttpClient, __options?: {
6
- validateRequestSchema?: boolean;
7
- }): CreateProgramDefinitionSignature;
5
+ declare function createProgramDefinition$1(httpClient: HttpClient): CreateProgramDefinitionSignature;
8
6
  interface CreateProgramDefinitionSignature {
9
7
  /**
10
8
  * Creates a program definition.
@@ -13,9 +11,7 @@ interface CreateProgramDefinitionSignature {
13
11
  */
14
12
  (programDefinition: NonNullablePaths<ProgramDefinition, `externalId` | `namespace`, 2>): Promise<ProgramDefinition>;
15
13
  }
16
- declare function updateProgramDefinition$1(httpClient: HttpClient, __options?: {
17
- validateRequestSchema?: boolean;
18
- }): UpdateProgramDefinitionSignature;
14
+ declare function updateProgramDefinition$1(httpClient: HttpClient): UpdateProgramDefinitionSignature;
19
15
  interface UpdateProgramDefinitionSignature {
20
16
  /**
21
17
  * Updates a program definition.
@@ -30,9 +26,7 @@ interface UpdateProgramDefinitionSignature {
30
26
  */
31
27
  (_id: string, programDefinition: NonNullablePaths<UpdateProgramDefinition, `revision`, 2>): Promise<ProgramDefinition>;
32
28
  }
33
- declare function deleteProgramDefinition$1(httpClient: HttpClient, __options?: {
34
- validateRequestSchema?: boolean;
35
- }): DeleteProgramDefinitionSignature;
29
+ declare function deleteProgramDefinition$1(httpClient: HttpClient): DeleteProgramDefinitionSignature;
36
30
  interface DeleteProgramDefinitionSignature {
37
31
  /**
38
32
  * Deletes a program definition.
@@ -40,9 +34,7 @@ interface DeleteProgramDefinitionSignature {
40
34
  */
41
35
  (programDefinitionId: string, options?: DeleteProgramDefinitionOptions): Promise<void>;
42
36
  }
43
- declare function getProgramDefinition$1(httpClient: HttpClient, __options?: {
44
- validateRequestSchema?: boolean;
45
- }): GetProgramDefinitionSignature;
37
+ declare function getProgramDefinition$1(httpClient: HttpClient): GetProgramDefinitionSignature;
46
38
  interface GetProgramDefinitionSignature {
47
39
  /**
48
40
  * Retrieves a program definition.
@@ -51,9 +43,7 @@ interface GetProgramDefinitionSignature {
51
43
  */
52
44
  (programDefinitionId: string): Promise<ProgramDefinition>;
53
45
  }
54
- declare function getProgramDefinitionByExternalIdAndNamespace$1(httpClient: HttpClient, __options?: {
55
- validateRequestSchema?: boolean;
56
- }): GetProgramDefinitionByExternalIdAndNamespaceSignature;
46
+ declare function getProgramDefinitionByExternalIdAndNamespace$1(httpClient: HttpClient): GetProgramDefinitionByExternalIdAndNamespaceSignature;
57
47
  interface GetProgramDefinitionByExternalIdAndNamespaceSignature {
58
48
  /**
59
49
  * Retrieves a program definition with the specified external ID and namespace.
@@ -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.ts
@@ -355,340 +345,6 @@ function queryProgramDefinitions(payload) {
355
345
 
356
346
  // src/benefit-programs-v1-program-definition-program-definitions.universal.ts
357
347
  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
692
348
  var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
693
349
  var Cascade = /* @__PURE__ */ ((Cascade2) => {
694
350
  Cascade2["UNKNOWN_CASCADE"] = "UNKNOWN_CASCADE";
@@ -711,10 +367,7 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
711
367
  return WebhookIdentityType2;
712
368
  })(WebhookIdentityType || {});
713
369
  async function createProgramDefinition2(programDefinition) {
714
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
715
- if (validateRequestSchema) {
716
- CreateProgramDefinitionRequest.parse({ programDefinition });
717
- }
370
+ const { httpClient, sideEffects } = arguments[1];
718
371
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
719
372
  programDefinition
720
373
  });
@@ -741,10 +394,7 @@ async function createProgramDefinition2(programDefinition) {
741
394
  }
742
395
  }
743
396
  async function updateProgramDefinition2(_id, programDefinition) {
744
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
745
- if (validateRequestSchema) {
746
- UpdateProgramDefinitionRequest.parse({ _id, programDefinition });
747
- }
397
+ const { httpClient, sideEffects } = arguments[2];
748
398
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
749
399
  programDefinition: { ...programDefinition, id: _id }
750
400
  });
@@ -771,13 +421,7 @@ async function updateProgramDefinition2(_id, programDefinition) {
771
421
  }
772
422
  }
773
423
  async function deleteProgramDefinition2(programDefinitionId, options) {
774
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
775
- if (validateRequestSchema) {
776
- DeleteProgramDefinitionRequest.parse({
777
- programDefinitionId,
778
- options
779
- });
780
- }
424
+ const { httpClient, sideEffects } = arguments[2];
781
425
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
782
426
  programDefinitionId,
783
427
  cascadeType: options?.cascadeType
@@ -807,10 +451,7 @@ async function deleteProgramDefinition2(programDefinitionId, options) {
807
451
  }
808
452
  }
809
453
  async function getProgramDefinition2(programDefinitionId) {
810
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
811
- if (validateRequestSchema) {
812
- GetProgramDefinitionRequest.parse({ programDefinitionId });
813
- }
454
+ const { httpClient, sideEffects } = arguments[1];
814
455
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
815
456
  programDefinitionId
816
457
  });
@@ -837,13 +478,7 @@ async function getProgramDefinition2(programDefinitionId) {
837
478
  }
838
479
  }
839
480
  async function getProgramDefinitionByExternalIdAndNamespace2(namespace, options) {
840
- const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
841
- if (validateRequestSchema) {
842
- GetProgramDefinitionByExternalIdAndNamespaceRequest.parse({
843
- namespace,
844
- options
845
- });
846
- }
481
+ const { httpClient, sideEffects } = arguments[2];
847
482
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
848
483
  namespace,
849
484
  externalId: options?.externalId
@@ -921,10 +556,7 @@ function queryProgramDefinitions2() {
921
556
  });
922
557
  }
923
558
  async function typedQueryProgramDefinitions(query) {
924
- const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
925
- if (validateRequestSchema) {
926
- QueryProgramDefinitionsRequest.parse({ query });
927
- }
559
+ const { httpClient, sideEffects } = arguments[1];
928
560
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query });
929
561
  const reqOpts = queryProgramDefinitions(
930
562
  payload
@@ -955,55 +587,55 @@ var utils = {
955
587
  };
956
588
 
957
589
  // src/benefit-programs-v1-program-definition-program-definitions.public.ts
958
- function createProgramDefinition3(httpClient, __options) {
590
+ function createProgramDefinition3(httpClient) {
959
591
  return (programDefinition) => createProgramDefinition2(
960
592
  programDefinition,
961
593
  // @ts-ignore
962
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
594
+ { httpClient }
963
595
  );
964
596
  }
965
- function updateProgramDefinition3(httpClient, __options) {
597
+ function updateProgramDefinition3(httpClient) {
966
598
  return (_id, programDefinition) => updateProgramDefinition2(
967
599
  _id,
968
600
  programDefinition,
969
601
  // @ts-ignore
970
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
602
+ { httpClient }
971
603
  );
972
604
  }
973
- function deleteProgramDefinition3(httpClient, __options) {
605
+ function deleteProgramDefinition3(httpClient) {
974
606
  return (programDefinitionId, options) => deleteProgramDefinition2(
975
607
  programDefinitionId,
976
608
  options,
977
609
  // @ts-ignore
978
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
610
+ { httpClient }
979
611
  );
980
612
  }
981
- function getProgramDefinition3(httpClient, __options) {
613
+ function getProgramDefinition3(httpClient) {
982
614
  return (programDefinitionId) => getProgramDefinition2(
983
615
  programDefinitionId,
984
616
  // @ts-ignore
985
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
617
+ { httpClient }
986
618
  );
987
619
  }
988
- function getProgramDefinitionByExternalIdAndNamespace3(httpClient, __options) {
620
+ function getProgramDefinitionByExternalIdAndNamespace3(httpClient) {
989
621
  return (namespace, options) => getProgramDefinitionByExternalIdAndNamespace2(
990
622
  namespace,
991
623
  options,
992
624
  // @ts-ignore
993
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
625
+ { httpClient }
994
626
  );
995
627
  }
996
- function queryProgramDefinitions3(httpClient, __options) {
628
+ function queryProgramDefinitions3(httpClient) {
997
629
  return () => queryProgramDefinitions2(
998
630
  // @ts-ignore
999
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
631
+ { httpClient }
1000
632
  );
1001
633
  }
1002
- function typedQueryProgramDefinitions2(httpClient, __options) {
634
+ function typedQueryProgramDefinitions2(httpClient) {
1003
635
  return (query) => typedQueryProgramDefinitions(
1004
636
  query,
1005
637
  // @ts-ignore
1006
- { httpClient, validateRequestSchema: __options?.validateRequestSchema }
638
+ { httpClient }
1007
639
  );
1008
640
  }
1009
641