@greensecurity/javascript-sdk 0.35.13 → 0.35.17

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 (56) hide show
  1. package/bin/mcp-server.js +126 -53
  2. package/bin/mcp-server.js.map +10 -9
  3. package/dist/commonjs/__tests__/zones.test.js +2 -5
  4. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  5. package/dist/commonjs/lib/config.d.ts +2 -2
  6. package/dist/commonjs/lib/config.js +2 -2
  7. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  8. package/dist/commonjs/mcp-server/server.js +1 -1
  9. package/dist/commonjs/models/components/index.d.ts +1 -0
  10. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  11. package/dist/commonjs/models/components/index.js +1 -0
  12. package/dist/commonjs/models/components/index.js.map +1 -1
  13. package/dist/commonjs/models/components/invoicetransaction.d.ts +24 -4
  14. package/dist/commonjs/models/components/invoicetransaction.d.ts.map +1 -1
  15. package/dist/commonjs/models/components/invoicetransaction.js +29 -7
  16. package/dist/commonjs/models/components/invoicetransaction.js.map +1 -1
  17. package/dist/commonjs/models/components/paymentprofile.d.ts +105 -0
  18. package/dist/commonjs/models/components/paymentprofile.d.ts.map +1 -0
  19. package/dist/commonjs/models/components/paymentprofile.js +172 -0
  20. package/dist/commonjs/models/components/paymentprofile.js.map +1 -0
  21. package/dist/commonjs/models/components/vendor.d.ts +56 -56
  22. package/dist/commonjs/models/components/vendor.d.ts.map +1 -1
  23. package/dist/commonjs/models/components/vendor.js +73 -74
  24. package/dist/commonjs/models/components/vendor.js.map +1 -1
  25. package/dist/esm/__tests__/zones.test.js +2 -5
  26. package/dist/esm/__tests__/zones.test.js.map +1 -1
  27. package/dist/esm/lib/config.d.ts +2 -2
  28. package/dist/esm/lib/config.js +2 -2
  29. package/dist/esm/mcp-server/mcp-server.js +1 -1
  30. package/dist/esm/mcp-server/server.js +1 -1
  31. package/dist/esm/models/components/index.d.ts +1 -0
  32. package/dist/esm/models/components/index.d.ts.map +1 -1
  33. package/dist/esm/models/components/index.js +1 -0
  34. package/dist/esm/models/components/index.js.map +1 -1
  35. package/dist/esm/models/components/invoicetransaction.d.ts +24 -4
  36. package/dist/esm/models/components/invoicetransaction.d.ts.map +1 -1
  37. package/dist/esm/models/components/invoicetransaction.js +26 -6
  38. package/dist/esm/models/components/invoicetransaction.js.map +1 -1
  39. package/dist/esm/models/components/paymentprofile.d.ts +105 -0
  40. package/dist/esm/models/components/paymentprofile.d.ts.map +1 -0
  41. package/dist/esm/models/components/paymentprofile.js +128 -0
  42. package/dist/esm/models/components/paymentprofile.js.map +1 -0
  43. package/dist/esm/models/components/vendor.d.ts +56 -56
  44. package/dist/esm/models/components/vendor.d.ts.map +1 -1
  45. package/dist/esm/models/components/vendor.js +64 -65
  46. package/dist/esm/models/components/vendor.js.map +1 -1
  47. package/jsr.json +1 -1
  48. package/package.json +1 -1
  49. package/src/__tests__/zones.test.ts +2 -5
  50. package/src/lib/config.ts +2 -2
  51. package/src/mcp-server/mcp-server.ts +1 -1
  52. package/src/mcp-server/server.ts +1 -1
  53. package/src/models/components/index.ts +1 -0
  54. package/src/models/components/invoicetransaction.ts +70 -10
  55. package/src/models/components/paymentprofile.ts +247 -0
  56. package/src/models/components/vendor.ts +130 -103
@@ -89,11 +89,11 @@ export type VendorJob = VendorJobTitle | number;
89
89
 
90
90
  export type VendorVendorType = VendorType | number;
91
91
 
92
- export type Two2 = {};
92
+ export type Vendor22 = {};
93
93
 
94
- export type PaymentProfile2 = Two2 | number;
94
+ export type VendorPaymentProfile2 = Vendor22 | number;
95
95
 
96
- export type PaymentProfile1 = {
96
+ export type VendorPaymentProfile1 = {
97
97
  id?: number | undefined;
98
98
  isValid?: boolean | null | undefined;
99
99
  cardType?: string | null | undefined;
@@ -105,9 +105,16 @@ export type PaymentProfile1 = {
105
105
  /**
106
106
  * Reduced list of attributes of the Payment Profile record
107
107
  */
108
- export type PaymentProfilePaymentProfile = PaymentProfile1 | Two2 | number;
108
+ export type PaymentProfilePaymentProfile =
109
+ | VendorPaymentProfile1
110
+ | Vendor22
111
+ | number;
109
112
 
110
- export type PaymentProfile = PaymentProfile1 | Two2 | number | number;
113
+ export type VendorPaymentProfile =
114
+ | VendorPaymentProfile1
115
+ | Vendor22
116
+ | number
117
+ | number;
111
118
 
112
119
  export type PaymentResponsibility = {
113
120
  id?: number | null | undefined;
@@ -158,7 +165,13 @@ export type Vendor = {
158
165
  * A set of images in different sizes
159
166
  */
160
167
  imageUrls?: ImageSet | null | undefined;
161
- paymentProfile?: PaymentProfile1 | Two2 | number | number | null | undefined;
168
+ paymentProfile?:
169
+ | VendorPaymentProfile1
170
+ | Vendor22
171
+ | number
172
+ | number
173
+ | null
174
+ | undefined;
162
175
  /**
163
176
  * Describes a facility which typically represents a physical building or logical grouping of offices which act as a single entity.
164
177
  */
@@ -415,92 +428,100 @@ export function vendorVendorTypeFromJSON(
415
428
  }
416
429
 
417
430
  /** @internal */
418
- export const Two2$inboundSchema: z.ZodType<Two2, z.ZodTypeDef, unknown> = z
419
- .object({});
431
+ export const Vendor22$inboundSchema: z.ZodType<
432
+ Vendor22,
433
+ z.ZodTypeDef,
434
+ unknown
435
+ > = z.object({});
420
436
 
421
437
  /** @internal */
422
- export type Two2$Outbound = {};
438
+ export type Vendor22$Outbound = {};
423
439
 
424
440
  /** @internal */
425
- export const Two2$outboundSchema: z.ZodType<Two2$Outbound, z.ZodTypeDef, Two2> =
426
- z.object({});
441
+ export const Vendor22$outboundSchema: z.ZodType<
442
+ Vendor22$Outbound,
443
+ z.ZodTypeDef,
444
+ Vendor22
445
+ > = z.object({});
427
446
 
428
447
  /**
429
448
  * @internal
430
449
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
431
450
  */
432
- export namespace Two2$ {
433
- /** @deprecated use `Two2$inboundSchema` instead. */
434
- export const inboundSchema = Two2$inboundSchema;
435
- /** @deprecated use `Two2$outboundSchema` instead. */
436
- export const outboundSchema = Two2$outboundSchema;
437
- /** @deprecated use `Two2$Outbound` instead. */
438
- export type Outbound = Two2$Outbound;
451
+ export namespace Vendor22$ {
452
+ /** @deprecated use `Vendor22$inboundSchema` instead. */
453
+ export const inboundSchema = Vendor22$inboundSchema;
454
+ /** @deprecated use `Vendor22$outboundSchema` instead. */
455
+ export const outboundSchema = Vendor22$outboundSchema;
456
+ /** @deprecated use `Vendor22$Outbound` instead. */
457
+ export type Outbound = Vendor22$Outbound;
439
458
  }
440
459
 
441
- export function two2ToJSON(two2: Two2): string {
442
- return JSON.stringify(Two2$outboundSchema.parse(two2));
460
+ export function vendor22ToJSON(vendor22: Vendor22): string {
461
+ return JSON.stringify(Vendor22$outboundSchema.parse(vendor22));
443
462
  }
444
463
 
445
- export function two2FromJSON(
464
+ export function vendor22FromJSON(
446
465
  jsonString: string,
447
- ): SafeParseResult<Two2, SDKValidationError> {
466
+ ): SafeParseResult<Vendor22, SDKValidationError> {
448
467
  return safeParse(
449
468
  jsonString,
450
- (x) => Two2$inboundSchema.parse(JSON.parse(x)),
451
- `Failed to parse 'Two2' from JSON`,
469
+ (x) => Vendor22$inboundSchema.parse(JSON.parse(x)),
470
+ `Failed to parse 'Vendor22' from JSON`,
452
471
  );
453
472
  }
454
473
 
455
474
  /** @internal */
456
- export const PaymentProfile2$inboundSchema: z.ZodType<
457
- PaymentProfile2,
475
+ export const VendorPaymentProfile2$inboundSchema: z.ZodType<
476
+ VendorPaymentProfile2,
458
477
  z.ZodTypeDef,
459
478
  unknown
460
- > = z.union([z.lazy(() => Two2$inboundSchema), z.number().int()]);
479
+ > = z.union([z.lazy(() => Vendor22$inboundSchema), z.number().int()]);
461
480
 
462
481
  /** @internal */
463
- export type PaymentProfile2$Outbound = Two2$Outbound | number;
482
+ export type VendorPaymentProfile2$Outbound = Vendor22$Outbound | number;
464
483
 
465
484
  /** @internal */
466
- export const PaymentProfile2$outboundSchema: z.ZodType<
467
- PaymentProfile2$Outbound,
485
+ export const VendorPaymentProfile2$outboundSchema: z.ZodType<
486
+ VendorPaymentProfile2$Outbound,
468
487
  z.ZodTypeDef,
469
- PaymentProfile2
470
- > = z.union([z.lazy(() => Two2$outboundSchema), z.number().int()]);
488
+ VendorPaymentProfile2
489
+ > = z.union([z.lazy(() => Vendor22$outboundSchema), z.number().int()]);
471
490
 
472
491
  /**
473
492
  * @internal
474
493
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
475
494
  */
476
- export namespace PaymentProfile2$ {
477
- /** @deprecated use `PaymentProfile2$inboundSchema` instead. */
478
- export const inboundSchema = PaymentProfile2$inboundSchema;
479
- /** @deprecated use `PaymentProfile2$outboundSchema` instead. */
480
- export const outboundSchema = PaymentProfile2$outboundSchema;
481
- /** @deprecated use `PaymentProfile2$Outbound` instead. */
482
- export type Outbound = PaymentProfile2$Outbound;
495
+ export namespace VendorPaymentProfile2$ {
496
+ /** @deprecated use `VendorPaymentProfile2$inboundSchema` instead. */
497
+ export const inboundSchema = VendorPaymentProfile2$inboundSchema;
498
+ /** @deprecated use `VendorPaymentProfile2$outboundSchema` instead. */
499
+ export const outboundSchema = VendorPaymentProfile2$outboundSchema;
500
+ /** @deprecated use `VendorPaymentProfile2$Outbound` instead. */
501
+ export type Outbound = VendorPaymentProfile2$Outbound;
483
502
  }
484
503
 
485
- export function paymentProfile2ToJSON(
486
- paymentProfile2: PaymentProfile2,
504
+ export function vendorPaymentProfile2ToJSON(
505
+ vendorPaymentProfile2: VendorPaymentProfile2,
487
506
  ): string {
488
- return JSON.stringify(PaymentProfile2$outboundSchema.parse(paymentProfile2));
507
+ return JSON.stringify(
508
+ VendorPaymentProfile2$outboundSchema.parse(vendorPaymentProfile2),
509
+ );
489
510
  }
490
511
 
491
- export function paymentProfile2FromJSON(
512
+ export function vendorPaymentProfile2FromJSON(
492
513
  jsonString: string,
493
- ): SafeParseResult<PaymentProfile2, SDKValidationError> {
514
+ ): SafeParseResult<VendorPaymentProfile2, SDKValidationError> {
494
515
  return safeParse(
495
516
  jsonString,
496
- (x) => PaymentProfile2$inboundSchema.parse(JSON.parse(x)),
497
- `Failed to parse 'PaymentProfile2' from JSON`,
517
+ (x) => VendorPaymentProfile2$inboundSchema.parse(JSON.parse(x)),
518
+ `Failed to parse 'VendorPaymentProfile2' from JSON`,
498
519
  );
499
520
  }
500
521
 
501
522
  /** @internal */
502
- export const PaymentProfile1$inboundSchema: z.ZodType<
503
- PaymentProfile1,
523
+ export const VendorPaymentProfile1$inboundSchema: z.ZodType<
524
+ VendorPaymentProfile1,
504
525
  z.ZodTypeDef,
505
526
  unknown
506
527
  > = z.object({
@@ -521,7 +542,7 @@ export const PaymentProfile1$inboundSchema: z.ZodType<
521
542
  });
522
543
 
523
544
  /** @internal */
524
- export type PaymentProfile1$Outbound = {
545
+ export type VendorPaymentProfile1$Outbound = {
525
546
  id?: number | undefined;
526
547
  is_valid?: boolean | null | undefined;
527
548
  card_type?: string | null | undefined;
@@ -531,10 +552,10 @@ export type PaymentProfile1$Outbound = {
531
552
  };
532
553
 
533
554
  /** @internal */
534
- export const PaymentProfile1$outboundSchema: z.ZodType<
535
- PaymentProfile1$Outbound,
555
+ export const VendorPaymentProfile1$outboundSchema: z.ZodType<
556
+ VendorPaymentProfile1$Outbound,
536
557
  z.ZodTypeDef,
537
- PaymentProfile1
558
+ VendorPaymentProfile1
538
559
  > = z.object({
539
560
  id: z.number().int().optional(),
540
561
  isValid: z.nullable(z.boolean()).optional(),
@@ -556,28 +577,30 @@ export const PaymentProfile1$outboundSchema: z.ZodType<
556
577
  * @internal
557
578
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
558
579
  */
559
- export namespace PaymentProfile1$ {
560
- /** @deprecated use `PaymentProfile1$inboundSchema` instead. */
561
- export const inboundSchema = PaymentProfile1$inboundSchema;
562
- /** @deprecated use `PaymentProfile1$outboundSchema` instead. */
563
- export const outboundSchema = PaymentProfile1$outboundSchema;
564
- /** @deprecated use `PaymentProfile1$Outbound` instead. */
565
- export type Outbound = PaymentProfile1$Outbound;
580
+ export namespace VendorPaymentProfile1$ {
581
+ /** @deprecated use `VendorPaymentProfile1$inboundSchema` instead. */
582
+ export const inboundSchema = VendorPaymentProfile1$inboundSchema;
583
+ /** @deprecated use `VendorPaymentProfile1$outboundSchema` instead. */
584
+ export const outboundSchema = VendorPaymentProfile1$outboundSchema;
585
+ /** @deprecated use `VendorPaymentProfile1$Outbound` instead. */
586
+ export type Outbound = VendorPaymentProfile1$Outbound;
566
587
  }
567
588
 
568
- export function paymentProfile1ToJSON(
569
- paymentProfile1: PaymentProfile1,
589
+ export function vendorPaymentProfile1ToJSON(
590
+ vendorPaymentProfile1: VendorPaymentProfile1,
570
591
  ): string {
571
- return JSON.stringify(PaymentProfile1$outboundSchema.parse(paymentProfile1));
592
+ return JSON.stringify(
593
+ VendorPaymentProfile1$outboundSchema.parse(vendorPaymentProfile1),
594
+ );
572
595
  }
573
596
 
574
- export function paymentProfile1FromJSON(
597
+ export function vendorPaymentProfile1FromJSON(
575
598
  jsonString: string,
576
- ): SafeParseResult<PaymentProfile1, SDKValidationError> {
599
+ ): SafeParseResult<VendorPaymentProfile1, SDKValidationError> {
577
600
  return safeParse(
578
601
  jsonString,
579
- (x) => PaymentProfile1$inboundSchema.parse(JSON.parse(x)),
580
- `Failed to parse 'PaymentProfile1' from JSON`,
602
+ (x) => VendorPaymentProfile1$inboundSchema.parse(JSON.parse(x)),
603
+ `Failed to parse 'VendorPaymentProfile1' from JSON`,
581
604
  );
582
605
  }
583
606
 
@@ -587,14 +610,14 @@ export const PaymentProfilePaymentProfile$inboundSchema: z.ZodType<
587
610
  z.ZodTypeDef,
588
611
  unknown
589
612
  > = z.union([
590
- z.lazy(() => PaymentProfile1$inboundSchema),
591
- z.union([z.lazy(() => Two2$inboundSchema), z.number().int()]),
613
+ z.lazy(() => VendorPaymentProfile1$inboundSchema),
614
+ z.union([z.lazy(() => Vendor22$inboundSchema), z.number().int()]),
592
615
  ]);
593
616
 
594
617
  /** @internal */
595
618
  export type PaymentProfilePaymentProfile$Outbound =
596
- | PaymentProfile1$Outbound
597
- | Two2$Outbound
619
+ | VendorPaymentProfile1$Outbound
620
+ | Vendor22$Outbound
598
621
  | number;
599
622
 
600
623
  /** @internal */
@@ -603,8 +626,8 @@ export const PaymentProfilePaymentProfile$outboundSchema: z.ZodType<
603
626
  z.ZodTypeDef,
604
627
  PaymentProfilePaymentProfile
605
628
  > = z.union([
606
- z.lazy(() => PaymentProfile1$outboundSchema),
607
- z.union([z.lazy(() => Two2$outboundSchema), z.number().int()]),
629
+ z.lazy(() => VendorPaymentProfile1$outboundSchema),
630
+ z.union([z.lazy(() => Vendor22$outboundSchema), z.number().int()]),
608
631
  ]);
609
632
 
610
633
  /**
@@ -641,34 +664,34 @@ export function paymentProfilePaymentProfileFromJSON(
641
664
  }
642
665
 
643
666
  /** @internal */
644
- export const PaymentProfile$inboundSchema: z.ZodType<
645
- PaymentProfile,
667
+ export const VendorPaymentProfile$inboundSchema: z.ZodType<
668
+ VendorPaymentProfile,
646
669
  z.ZodTypeDef,
647
670
  unknown
648
671
  > = z.union([
649
672
  z.union([
650
- z.lazy(() => PaymentProfile1$inboundSchema),
651
- z.union([z.lazy(() => Two2$inboundSchema), z.number().int()]),
673
+ z.lazy(() => VendorPaymentProfile1$inboundSchema),
674
+ z.union([z.lazy(() => Vendor22$inboundSchema), z.number().int()]),
652
675
  ]),
653
676
  z.number().int(),
654
677
  ]);
655
678
 
656
679
  /** @internal */
657
- export type PaymentProfile$Outbound =
658
- | PaymentProfile1$Outbound
659
- | Two2$Outbound
680
+ export type VendorPaymentProfile$Outbound =
681
+ | VendorPaymentProfile1$Outbound
682
+ | Vendor22$Outbound
660
683
  | number
661
684
  | number;
662
685
 
663
686
  /** @internal */
664
- export const PaymentProfile$outboundSchema: z.ZodType<
665
- PaymentProfile$Outbound,
687
+ export const VendorPaymentProfile$outboundSchema: z.ZodType<
688
+ VendorPaymentProfile$Outbound,
666
689
  z.ZodTypeDef,
667
- PaymentProfile
690
+ VendorPaymentProfile
668
691
  > = z.union([
669
692
  z.union([
670
- z.lazy(() => PaymentProfile1$outboundSchema),
671
- z.union([z.lazy(() => Two2$outboundSchema), z.number().int()]),
693
+ z.lazy(() => VendorPaymentProfile1$outboundSchema),
694
+ z.union([z.lazy(() => Vendor22$outboundSchema), z.number().int()]),
672
695
  ]),
673
696
  z.number().int(),
674
697
  ]);
@@ -677,26 +700,30 @@ export const PaymentProfile$outboundSchema: z.ZodType<
677
700
  * @internal
678
701
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
679
702
  */
680
- export namespace PaymentProfile$ {
681
- /** @deprecated use `PaymentProfile$inboundSchema` instead. */
682
- export const inboundSchema = PaymentProfile$inboundSchema;
683
- /** @deprecated use `PaymentProfile$outboundSchema` instead. */
684
- export const outboundSchema = PaymentProfile$outboundSchema;
685
- /** @deprecated use `PaymentProfile$Outbound` instead. */
686
- export type Outbound = PaymentProfile$Outbound;
703
+ export namespace VendorPaymentProfile$ {
704
+ /** @deprecated use `VendorPaymentProfile$inboundSchema` instead. */
705
+ export const inboundSchema = VendorPaymentProfile$inboundSchema;
706
+ /** @deprecated use `VendorPaymentProfile$outboundSchema` instead. */
707
+ export const outboundSchema = VendorPaymentProfile$outboundSchema;
708
+ /** @deprecated use `VendorPaymentProfile$Outbound` instead. */
709
+ export type Outbound = VendorPaymentProfile$Outbound;
687
710
  }
688
711
 
689
- export function paymentProfileToJSON(paymentProfile: PaymentProfile): string {
690
- return JSON.stringify(PaymentProfile$outboundSchema.parse(paymentProfile));
712
+ export function vendorPaymentProfileToJSON(
713
+ vendorPaymentProfile: VendorPaymentProfile,
714
+ ): string {
715
+ return JSON.stringify(
716
+ VendorPaymentProfile$outboundSchema.parse(vendorPaymentProfile),
717
+ );
691
718
  }
692
719
 
693
- export function paymentProfileFromJSON(
720
+ export function vendorPaymentProfileFromJSON(
694
721
  jsonString: string,
695
- ): SafeParseResult<PaymentProfile, SDKValidationError> {
722
+ ): SafeParseResult<VendorPaymentProfile, SDKValidationError> {
696
723
  return safeParse(
697
724
  jsonString,
698
- (x) => PaymentProfile$inboundSchema.parse(JSON.parse(x)),
699
- `Failed to parse 'PaymentProfile' from JSON`,
725
+ (x) => VendorPaymentProfile$inboundSchema.parse(JSON.parse(x)),
726
+ `Failed to parse 'VendorPaymentProfile' from JSON`,
700
727
  );
701
728
  }
702
729
 
@@ -860,8 +887,8 @@ export const Vendor$inboundSchema: z.ZodType<Vendor, z.ZodTypeDef, unknown> = z
860
887
  payment_profile: z.nullable(
861
888
  z.union([
862
889
  z.union([
863
- z.lazy(() => PaymentProfile1$inboundSchema),
864
- z.union([z.lazy(() => Two2$inboundSchema), z.number().int()]),
890
+ z.lazy(() => VendorPaymentProfile1$inboundSchema),
891
+ z.union([z.lazy(() => Vendor22$inboundSchema), z.number().int()]),
865
892
  ]),
866
893
  z.number().int(),
867
894
  ]),
@@ -915,8 +942,8 @@ export type Vendor$Outbound = {
915
942
  drivers_license?: ImageSet$Outbound | null | undefined;
916
943
  image_urls?: ImageSet$Outbound | null | undefined;
917
944
  payment_profile?:
918
- | PaymentProfile1$Outbound
919
- | Two2$Outbound
945
+ | VendorPaymentProfile1$Outbound
946
+ | Vendor22$Outbound
920
947
  | number
921
948
  | number
922
949
  | null
@@ -957,8 +984,8 @@ export const Vendor$outboundSchema: z.ZodType<
957
984
  paymentProfile: z.nullable(
958
985
  z.union([
959
986
  z.union([
960
- z.lazy(() => PaymentProfile1$outboundSchema),
961
- z.union([z.lazy(() => Two2$outboundSchema), z.number().int()]),
987
+ z.lazy(() => VendorPaymentProfile1$outboundSchema),
988
+ z.union([z.lazy(() => Vendor22$outboundSchema), z.number().int()]),
962
989
  ]),
963
990
  z.number().int(),
964
991
  ]),