@izak0s/spacebring-api 1.11.1 → 1.13.0
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/README.md +10 -3
- package/dist/index.cjs +507 -140
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +178 -155
- package/dist/index.d.ts +178 -155
- package/dist/index.js +507 -140
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -599,14 +599,25 @@ function createAltcurrencies(client, defaults) {
|
|
|
599
599
|
);
|
|
600
600
|
},
|
|
601
601
|
/** Create an alternative currency */
|
|
602
|
-
async create(
|
|
603
|
-
return unwrapProp(await client.POST("/alt_currencies/v1", { body, signal: options?.signal }), "altCurrency", "POST /alt_currencies/v1");
|
|
602
|
+
async create(altCurrency, options) {
|
|
603
|
+
return unwrapProp(await client.POST("/alt_currencies/v1", { body: { altCurrency }, signal: options?.signal }), "altCurrency", "POST /alt_currencies/v1");
|
|
604
604
|
},
|
|
605
|
-
/**
|
|
606
|
-
|
|
607
|
-
|
|
605
|
+
/**
|
|
606
|
+
* Update an alternative currency
|
|
607
|
+
*
|
|
608
|
+
* @param id The id of the alternative currency
|
|
609
|
+
* @param altCurrency The `altCurrency` payload.
|
|
610
|
+
* @param options Request options (abort signal).
|
|
611
|
+
*/
|
|
612
|
+
async update(id, altCurrency, options) {
|
|
613
|
+
return unwrap(await client.PATCH("/alt_currencies/v1/{id}", { params: { path: { id } }, body: { altCurrency }, signal: options?.signal }), "PATCH /alt_currencies/v1/{id}");
|
|
608
614
|
},
|
|
609
|
-
/**
|
|
615
|
+
/**
|
|
616
|
+
* Delete an alternative currency
|
|
617
|
+
*
|
|
618
|
+
* @param id The id of the alternative currency
|
|
619
|
+
* @param options Request options (abort signal).
|
|
620
|
+
*/
|
|
610
621
|
async delete(id, options) {
|
|
611
622
|
return unwrap(await client.DELETE("/alt_currencies/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /alt_currencies/v1/{id}");
|
|
612
623
|
}
|
|
@@ -635,19 +646,35 @@ function createBenefits(client, defaults) {
|
|
|
635
646
|
"benefits"
|
|
636
647
|
);
|
|
637
648
|
},
|
|
638
|
-
/**
|
|
649
|
+
/**
|
|
650
|
+
* Retrieve a benefit
|
|
651
|
+
*
|
|
652
|
+
* @param benefitId The id of the benefit.
|
|
653
|
+
* @param options Request options (abort signal).
|
|
654
|
+
*/
|
|
639
655
|
async get(benefitId, options) {
|
|
640
656
|
return unwrapProp(await client.GET("/benefits/v1/{benefitId}", { params: { path: { benefitId } }, signal: options?.signal }), "benefit", "GET /benefits/v1/{benefitId}");
|
|
641
657
|
},
|
|
642
658
|
/** Create a benefit */
|
|
643
|
-
async create(
|
|
644
|
-
return unwrap(await client.POST("/benefits/v1", { body, signal: options?.signal }), "POST /benefits/v1");
|
|
659
|
+
async create(benefit, options) {
|
|
660
|
+
return unwrap(await client.POST("/benefits/v1", { body: { benefit }, signal: options?.signal }), "POST /benefits/v1");
|
|
645
661
|
},
|
|
646
|
-
/**
|
|
647
|
-
|
|
648
|
-
|
|
662
|
+
/**
|
|
663
|
+
* Update a benefit
|
|
664
|
+
*
|
|
665
|
+
* @param benefitId The id of the benefit
|
|
666
|
+
* @param benefit The `benefit` payload.
|
|
667
|
+
* @param options Request options (abort signal).
|
|
668
|
+
*/
|
|
669
|
+
async update(benefitId, benefit, options) {
|
|
670
|
+
return unwrapProp(await client.PUT("/benefits/v1/{benefitId}", { params: { path: { benefitId } }, body: { benefit }, signal: options?.signal }), "benefit", "PUT /benefits/v1/{benefitId}");
|
|
649
671
|
},
|
|
650
|
-
/**
|
|
672
|
+
/**
|
|
673
|
+
* Delete a benefit
|
|
674
|
+
*
|
|
675
|
+
* @param benefitId The id of the benefit
|
|
676
|
+
* @param options Request options (abort signal).
|
|
677
|
+
*/
|
|
651
678
|
async delete(benefitId, options) {
|
|
652
679
|
return unwrap(await client.DELETE("/benefits/v1/{benefitId}", { params: { path: { benefitId } }, signal: options?.signal }), "DELETE /benefits/v1/{benefitId}");
|
|
653
680
|
},
|
|
@@ -675,13 +702,16 @@ function createBenefits(client, defaults) {
|
|
|
675
702
|
* Retrieve an application
|
|
676
703
|
*
|
|
677
704
|
* Retrieve a benefit application by id.
|
|
705
|
+
*
|
|
706
|
+
* @param benefitApplicationId The id of the benefit application.
|
|
707
|
+
* @param options Request options (abort signal).
|
|
678
708
|
*/
|
|
679
709
|
async get(benefitApplicationId, options) {
|
|
680
710
|
return unwrapProp(await client.GET("/benefits/applications/v1/{benefitApplicationId}", { params: { path: { benefitApplicationId } }, signal: options?.signal }), "application", "GET /benefits/applications/v1/{benefitApplicationId}");
|
|
681
711
|
},
|
|
682
712
|
/** Apply for a benefit */
|
|
683
|
-
async create(
|
|
684
|
-
return unwrapProp(await client.POST("/benefits/applications/v1", { body, signal: options?.signal }), "application", "POST /benefits/applications/v1");
|
|
713
|
+
async create(application, options) {
|
|
714
|
+
return unwrapProp(await client.POST("/benefits/applications/v1", { body: { application }, signal: options?.signal }), "application", "POST /benefits/applications/v1");
|
|
685
715
|
}
|
|
686
716
|
},
|
|
687
717
|
categories: {
|
|
@@ -697,6 +727,9 @@ function createBenefits(client, defaults) {
|
|
|
697
727
|
* Get a category
|
|
698
728
|
*
|
|
699
729
|
* Get a benefit category.
|
|
730
|
+
*
|
|
731
|
+
* @param categoryId The id of the benefit category.
|
|
732
|
+
* @param options Request options (abort signal).
|
|
700
733
|
*/
|
|
701
734
|
async get(categoryId, options) {
|
|
702
735
|
return unwrapProp(await client.GET("/benefits/categories/v1/{categoryId}", { params: { path: { categoryId } }, signal: options?.signal }), "category", "GET /benefits/categories/v1/{categoryId}");
|
|
@@ -706,21 +739,28 @@ function createBenefits(client, defaults) {
|
|
|
706
739
|
*
|
|
707
740
|
* Create a benefit category.
|
|
708
741
|
*/
|
|
709
|
-
async create(
|
|
710
|
-
return unwrapProp(await client.POST("/benefits/categories/v1", { body, signal: options?.signal }), "category", "POST /benefits/categories/v1");
|
|
742
|
+
async create(category, options) {
|
|
743
|
+
return unwrapProp(await client.POST("/benefits/categories/v1", { body: { category }, signal: options?.signal }), "category", "POST /benefits/categories/v1");
|
|
711
744
|
},
|
|
712
745
|
/**
|
|
713
746
|
* Update a category
|
|
714
747
|
*
|
|
715
748
|
* Update a benefit category.
|
|
749
|
+
*
|
|
750
|
+
* @param categoryId The id of the benefit category
|
|
751
|
+
* @param category The `category` payload.
|
|
752
|
+
* @param options Request options (abort signal).
|
|
716
753
|
*/
|
|
717
|
-
async update(categoryId,
|
|
718
|
-
return unwrapProp(await client.PUT("/benefits/categories/v1/{categoryId}", { params: { path: { categoryId } }, body, signal: options?.signal }), "category", "PUT /benefits/categories/v1/{categoryId}");
|
|
754
|
+
async update(categoryId, category, options) {
|
|
755
|
+
return unwrapProp(await client.PUT("/benefits/categories/v1/{categoryId}", { params: { path: { categoryId } }, body: { category }, signal: options?.signal }), "category", "PUT /benefits/categories/v1/{categoryId}");
|
|
719
756
|
},
|
|
720
757
|
/**
|
|
721
758
|
* Delete a category
|
|
722
759
|
*
|
|
723
760
|
* Delete a benefit category.
|
|
761
|
+
*
|
|
762
|
+
* @param categoryId The id of the benefit category
|
|
763
|
+
* @param options Request options (abort signal).
|
|
724
764
|
*/
|
|
725
765
|
async delete(categoryId, options) {
|
|
726
766
|
return unwrap(await client.DELETE("/benefits/categories/v1/{categoryId}", { params: { path: { categoryId } }, signal: options?.signal }), "DELETE /benefits/categories/v1/{categoryId}");
|
|
@@ -756,6 +796,9 @@ function createBilling(client, defaults) {
|
|
|
756
796
|
* Retrieve a credit note
|
|
757
797
|
*
|
|
758
798
|
* Retrieve a specific credit note.
|
|
799
|
+
*
|
|
800
|
+
* @param id The id of the credit note
|
|
801
|
+
* @param options Request options (abort signal).
|
|
759
802
|
*/
|
|
760
803
|
async get(id, options) {
|
|
761
804
|
return unwrapProp(await client.GET("/billing/credit_notes/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "creditNote", "GET /billing/credit_notes/v1/{id}");
|
|
@@ -765,20 +808,26 @@ function createBilling(client, defaults) {
|
|
|
765
808
|
*
|
|
766
809
|
* Create a credit note for an invoice.
|
|
767
810
|
*/
|
|
768
|
-
async create(
|
|
769
|
-
return unwrapProp(await client.POST("/billing/credit_notes/v1", { body, signal: options?.signal }), "creditNote", "POST /billing/credit_notes/v1");
|
|
811
|
+
async create(creditNote, options) {
|
|
812
|
+
return unwrapProp(await client.POST("/billing/credit_notes/v1", { body: { creditNote }, signal: options?.signal }), "creditNote", "POST /billing/credit_notes/v1");
|
|
770
813
|
},
|
|
771
|
-
/**
|
|
772
|
-
|
|
773
|
-
|
|
814
|
+
/**
|
|
815
|
+
* Update a credit note
|
|
816
|
+
*
|
|
817
|
+
* @param id The id of the credit note
|
|
818
|
+
* @param creditNote The `creditNote` payload.
|
|
819
|
+
* @param options Request options (abort signal).
|
|
820
|
+
*/
|
|
821
|
+
async update(id, creditNote, options) {
|
|
822
|
+
return unwrap(await client.PATCH("/billing/credit_notes/v1/{id}", { params: { path: { id } }, body: { creditNote }, signal: options?.signal }), "PATCH /billing/credit_notes/v1/{id}");
|
|
774
823
|
},
|
|
775
824
|
/**
|
|
776
825
|
* Preview a credit note
|
|
777
826
|
*
|
|
778
827
|
* Preview a credit note for an invoice without creating it.
|
|
779
828
|
*/
|
|
780
|
-
async preview(
|
|
781
|
-
return unwrapProp(await client.POST("/billing/credit_notes/v1/preview", { body, signal: options?.signal }), "creditNote", "POST /billing/credit_notes/v1/preview");
|
|
829
|
+
async preview(creditNote, options) {
|
|
830
|
+
return unwrapProp(await client.POST("/billing/credit_notes/v1/preview", { body: { creditNote }, signal: options?.signal }), "creditNote", "POST /billing/credit_notes/v1/preview");
|
|
782
831
|
}
|
|
783
832
|
},
|
|
784
833
|
invoices: {
|
|
@@ -805,6 +854,9 @@ function createBilling(client, defaults) {
|
|
|
805
854
|
* Retrieve an invoice
|
|
806
855
|
*
|
|
807
856
|
* Retrieve a certain invoice.
|
|
857
|
+
*
|
|
858
|
+
* @param invoiceId The id of the invoice.
|
|
859
|
+
* @param options Request options (abort signal).
|
|
808
860
|
*/
|
|
809
861
|
async get(invoiceId, options) {
|
|
810
862
|
return unwrapProp(await client.GET("/billing/invoices/v1/{invoiceId}", { params: { path: { invoiceId } }, signal: options?.signal }), "invoice", "GET /billing/invoices/v1/{invoiceId}");
|
|
@@ -821,14 +873,21 @@ function createBilling(client, defaults) {
|
|
|
821
873
|
* Update an invoice
|
|
822
874
|
*
|
|
823
875
|
* Update a draft invoice.
|
|
876
|
+
*
|
|
877
|
+
* @param invoiceId The id of an invoice.
|
|
878
|
+
* @param invoice The `invoice` payload.
|
|
879
|
+
* @param options Request options (abort signal).
|
|
824
880
|
*/
|
|
825
|
-
async update(invoiceId,
|
|
826
|
-
return unwrap(await client.PATCH("/billing/invoices/v1/{invoiceId}", { params: { path: { invoiceId } }, body, signal: options?.signal }), "PATCH /billing/invoices/v1/{invoiceId}");
|
|
881
|
+
async update(invoiceId, invoice, options) {
|
|
882
|
+
return unwrap(await client.PATCH("/billing/invoices/v1/{invoiceId}", { params: { path: { invoiceId } }, body: { invoice }, signal: options?.signal }), "PATCH /billing/invoices/v1/{invoiceId}");
|
|
827
883
|
},
|
|
828
884
|
/**
|
|
829
885
|
* Delete an invoice
|
|
830
886
|
*
|
|
831
887
|
* Delete a draft invoice.
|
|
888
|
+
*
|
|
889
|
+
* @param invoiceId The id of an invoice.
|
|
890
|
+
* @param options Request options (abort signal).
|
|
832
891
|
*/
|
|
833
892
|
async delete(invoiceId, options) {
|
|
834
893
|
return unwrap(await client.DELETE("/billing/invoices/v1/{invoiceId}", { params: { path: { invoiceId } }, signal: options?.signal }), "DELETE /billing/invoices/v1/{invoiceId}");
|
|
@@ -837,6 +896,9 @@ function createBilling(client, defaults) {
|
|
|
837
896
|
* Cancel a payment
|
|
838
897
|
*
|
|
839
898
|
* Cancel a payment on an invoice.
|
|
899
|
+
*
|
|
900
|
+
* @param invoiceId The id of an invoice.
|
|
901
|
+
* @param options Request options (abort signal).
|
|
840
902
|
*/
|
|
841
903
|
async cancelPayment(invoiceId, options) {
|
|
842
904
|
return unwrap(await client.POST("/billing/invoices/v1/{invoiceId}/cancel_payment", { params: { path: { invoiceId } }, signal: options?.signal }), "POST /billing/invoices/v1/{invoiceId}/cancel_payment");
|
|
@@ -845,6 +907,9 @@ function createBilling(client, defaults) {
|
|
|
845
907
|
* Duplicate an invoice
|
|
846
908
|
*
|
|
847
909
|
* Duplicate an invoice, creating a new draft invoice with the same items.
|
|
910
|
+
*
|
|
911
|
+
* @param invoiceId The id of an invoice.
|
|
912
|
+
* @param options Request options (abort signal).
|
|
848
913
|
*/
|
|
849
914
|
async duplicate(invoiceId, options) {
|
|
850
915
|
return unwrapProp(await client.POST("/billing/invoices/v1/{invoiceId}/duplicate", { params: { path: { invoiceId } }, signal: options?.signal }), "invoice", "POST /billing/invoices/v1/{invoiceId}/duplicate");
|
|
@@ -853,6 +918,9 @@ function createBilling(client, defaults) {
|
|
|
853
918
|
* List invoice items
|
|
854
919
|
*
|
|
855
920
|
* List all items for a specific invoice.
|
|
921
|
+
*
|
|
922
|
+
* @param invoiceId The id of an invoice.
|
|
923
|
+
* @param options Request options (abort signal).
|
|
856
924
|
*/
|
|
857
925
|
async getItems(invoiceId, options) {
|
|
858
926
|
return unwrap(await client.GET("/billing/invoices/v1/{invoiceId}/items", { params: { path: { invoiceId } }, signal: options?.signal }), "GET /billing/invoices/v1/{invoiceId}/items");
|
|
@@ -869,14 +937,22 @@ function createBilling(client, defaults) {
|
|
|
869
937
|
* Issue an invoice
|
|
870
938
|
*
|
|
871
939
|
* Issue (finalize) a draft invoice, making it ready for payment.
|
|
940
|
+
*
|
|
941
|
+
* @param invoiceId The id of an invoice.
|
|
942
|
+
* @param skipAutoCharge The `skipAutoCharge` payload.
|
|
943
|
+
* @param options Request options (abort signal).
|
|
872
944
|
*/
|
|
873
|
-
async issue(invoiceId,
|
|
874
|
-
return unwrap(await client.POST("/billing/invoices/v1/{invoiceId}/issue", { params: { path: { invoiceId } }, body, signal: options?.signal }), "POST /billing/invoices/v1/{invoiceId}/issue");
|
|
945
|
+
async issue(invoiceId, skipAutoCharge, options) {
|
|
946
|
+
return unwrap(await client.POST("/billing/invoices/v1/{invoiceId}/issue", { params: { path: { invoiceId } }, body: skipAutoCharge === void 0 ? void 0 : { skipAutoCharge }, signal: options?.signal }), "POST /billing/invoices/v1/{invoiceId}/issue");
|
|
875
947
|
},
|
|
876
948
|
/**
|
|
877
949
|
* Pay an invoice
|
|
878
950
|
*
|
|
879
951
|
* Mark an invoice as paid by `External Payment`.
|
|
952
|
+
*
|
|
953
|
+
* @param invoiceId The id of an invoice
|
|
954
|
+
* @param body Request body.
|
|
955
|
+
* @param options Request options (abort signal).
|
|
880
956
|
*/
|
|
881
957
|
async pay(invoiceId, body, options) {
|
|
882
958
|
return unwrap(await client.POST("/billing/invoices/v1/{invoiceId}/pay", { params: { path: { invoiceId } }, body, signal: options?.signal }), "POST /billing/invoices/v1/{invoiceId}/pay");
|
|
@@ -885,6 +961,9 @@ function createBilling(client, defaults) {
|
|
|
885
961
|
* Resend an invoice
|
|
886
962
|
*
|
|
887
963
|
* Resend an issued invoice notification to the customer.
|
|
964
|
+
*
|
|
965
|
+
* @param invoiceId The id of an invoice.
|
|
966
|
+
* @param options Request options (abort signal).
|
|
888
967
|
*/
|
|
889
968
|
async resend(invoiceId, options) {
|
|
890
969
|
return unwrap(await client.POST("/billing/invoices/v1/{invoiceId}/resend", { params: { path: { invoiceId } }, signal: options?.signal }), "POST /billing/invoices/v1/{invoiceId}/resend");
|
|
@@ -893,6 +972,9 @@ function createBilling(client, defaults) {
|
|
|
893
972
|
* Void an invoice
|
|
894
973
|
*
|
|
895
974
|
* Void an issued invoice.
|
|
975
|
+
*
|
|
976
|
+
* @param invoiceId The id of an invoice.
|
|
977
|
+
* @param options Request options (abort signal).
|
|
896
978
|
*/
|
|
897
979
|
async void(invoiceId, options) {
|
|
898
980
|
return unwrap(await client.PATCH("/billing/invoices/v1/{invoiceId}/void", { params: { path: { invoiceId } }, signal: options?.signal }), "PATCH /billing/invoices/v1/{invoiceId}/void");
|
|
@@ -921,6 +1003,9 @@ function createBilling(client, defaults) {
|
|
|
921
1003
|
* Retrieve an invoice item
|
|
922
1004
|
*
|
|
923
1005
|
* Retrieve a specific invoice item.
|
|
1006
|
+
*
|
|
1007
|
+
* @param id The id of an invoice item.
|
|
1008
|
+
* @param options Request options (abort signal).
|
|
924
1009
|
*/
|
|
925
1010
|
async get(id, options) {
|
|
926
1011
|
return unwrapProp(await client.GET("/billing/invoices/v1/items/{id}", { params: { path: { id } }, signal: options?.signal }), "invoiceItem", "GET /billing/invoices/v1/items/{id}");
|
|
@@ -930,21 +1015,28 @@ function createBilling(client, defaults) {
|
|
|
930
1015
|
*
|
|
931
1016
|
* Create an item in an invoice.
|
|
932
1017
|
*/
|
|
933
|
-
async create(
|
|
934
|
-
return unwrapProp(await client.POST("/billing/invoices/v1/items", { body, signal: options?.signal }), "invoiceItem", "POST /billing/invoices/v1/items");
|
|
1018
|
+
async create(invoiceItem, options) {
|
|
1019
|
+
return unwrapProp(await client.POST("/billing/invoices/v1/items", { body: { invoiceItem }, signal: options?.signal }), "invoiceItem", "POST /billing/invoices/v1/items");
|
|
935
1020
|
},
|
|
936
1021
|
/**
|
|
937
1022
|
* Update an invoice item
|
|
938
1023
|
*
|
|
939
1024
|
* Update an invoice item on a draft invoice.
|
|
1025
|
+
*
|
|
1026
|
+
* @param id The id of an invoice item.
|
|
1027
|
+
* @param invoiceItem The `invoiceItem` payload.
|
|
1028
|
+
* @param options Request options (abort signal).
|
|
940
1029
|
*/
|
|
941
|
-
async update(id,
|
|
942
|
-
return unwrap(await client.PATCH("/billing/invoices/v1/items/{id}", { params: { path: { id } }, body, signal: options?.signal }), "PATCH /billing/invoices/v1/items/{id}");
|
|
1030
|
+
async update(id, invoiceItem, options) {
|
|
1031
|
+
return unwrap(await client.PATCH("/billing/invoices/v1/items/{id}", { params: { path: { id } }, body: { invoiceItem }, signal: options?.signal }), "PATCH /billing/invoices/v1/items/{id}");
|
|
943
1032
|
},
|
|
944
1033
|
/**
|
|
945
1034
|
* Delete an invoice item
|
|
946
1035
|
*
|
|
947
1036
|
* Delete an invoice item from a draft invoice.
|
|
1037
|
+
*
|
|
1038
|
+
* @param id The id of an invoice item.
|
|
1039
|
+
* @param options Request options (abort signal).
|
|
948
1040
|
*/
|
|
949
1041
|
async delete(id, options) {
|
|
950
1042
|
return unwrap(await client.DELETE("/billing/invoices/v1/items/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /billing/invoices/v1/items/{id}");
|
|
@@ -985,21 +1077,28 @@ function createCommunity(client, defaults) {
|
|
|
985
1077
|
* Retrieve a company
|
|
986
1078
|
*
|
|
987
1079
|
* Retrieve a certain company.
|
|
1080
|
+
*
|
|
1081
|
+
* @param id The id of company.
|
|
1082
|
+
* @param options Request options (abort signal).
|
|
988
1083
|
*/
|
|
989
1084
|
async get(id, options) {
|
|
990
1085
|
return unwrapProp(await client.GET("/community/companies/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "company", "GET /community/companies/v1/{id}");
|
|
991
1086
|
},
|
|
992
1087
|
/** Create a company */
|
|
993
|
-
async create(
|
|
994
|
-
return unwrapProp(await client.POST("/community/companies/v1", { body, signal: options?.signal }), "company", "POST /community/companies/v1");
|
|
1088
|
+
async create(company, options) {
|
|
1089
|
+
return unwrapProp(await client.POST("/community/companies/v1", { body: { company }, signal: options?.signal }), "company", "POST /community/companies/v1");
|
|
995
1090
|
},
|
|
996
1091
|
/**
|
|
997
1092
|
* Update a company
|
|
998
1093
|
*
|
|
999
1094
|
* Update a certain company.
|
|
1095
|
+
*
|
|
1096
|
+
* @param id The id of the company.
|
|
1097
|
+
* @param company The `company` payload.
|
|
1098
|
+
* @param options Request options (abort signal).
|
|
1000
1099
|
*/
|
|
1001
|
-
async update(id,
|
|
1002
|
-
return unwrapProp(await client.PUT("/community/companies/v1/{id}", { params: { path: { id } }, body, signal: options?.signal }), "company", "PUT /community/companies/v1/{id}");
|
|
1100
|
+
async update(id, company, options) {
|
|
1101
|
+
return unwrapProp(await client.PUT("/community/companies/v1/{id}", { params: { path: { id } }, body: { company }, signal: options?.signal }), "company", "PUT /community/companies/v1/{id}");
|
|
1003
1102
|
}
|
|
1004
1103
|
},
|
|
1005
1104
|
memberships: {
|
|
@@ -1026,6 +1125,9 @@ function createCommunity(client, defaults) {
|
|
|
1026
1125
|
* Retrieve a membership
|
|
1027
1126
|
*
|
|
1028
1127
|
* Retrieve a certain membership.
|
|
1128
|
+
*
|
|
1129
|
+
* @param id The id of membership.
|
|
1130
|
+
* @param options Request options (abort signal).
|
|
1029
1131
|
*/
|
|
1030
1132
|
async get(id, options) {
|
|
1031
1133
|
return unwrapProp(await client.GET("/community/memberships/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "membership", "GET /community/memberships/v1/{id}");
|
|
@@ -1042,14 +1144,21 @@ function createCommunity(client, defaults) {
|
|
|
1042
1144
|
* Update a membership
|
|
1043
1145
|
*
|
|
1044
1146
|
* Update a certain membership.
|
|
1147
|
+
*
|
|
1148
|
+
* @param id The id of the membership.
|
|
1149
|
+
* @param membership The `membership` payload.
|
|
1150
|
+
* @param options Request options (abort signal).
|
|
1045
1151
|
*/
|
|
1046
|
-
async update(id,
|
|
1047
|
-
return unwrapProp(await client.PUT("/community/memberships/v1/{id}", { params: { path: { id } }, body, signal: options?.signal }), "membership", "PUT /community/memberships/v1/{id}");
|
|
1152
|
+
async update(id, membership, options) {
|
|
1153
|
+
return unwrapProp(await client.PUT("/community/memberships/v1/{id}", { params: { path: { id } }, body: { membership }, signal: options?.signal }), "membership", "PUT /community/memberships/v1/{id}");
|
|
1048
1154
|
},
|
|
1049
1155
|
/**
|
|
1050
1156
|
* Delete a membership
|
|
1051
1157
|
*
|
|
1052
1158
|
* Delete a certain membership.
|
|
1159
|
+
*
|
|
1160
|
+
* @param id The id of the membership.
|
|
1161
|
+
* @param options Request options (abort signal).
|
|
1053
1162
|
*/
|
|
1054
1163
|
async delete(id, options) {
|
|
1055
1164
|
return unwrap(await client.DELETE("/community/memberships/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /community/memberships/v1/{id}");
|
|
@@ -1099,25 +1208,47 @@ function createContracts(client, defaults) {
|
|
|
1099
1208
|
"contracts"
|
|
1100
1209
|
);
|
|
1101
1210
|
},
|
|
1102
|
-
/**
|
|
1211
|
+
/**
|
|
1212
|
+
* Get a contract
|
|
1213
|
+
*
|
|
1214
|
+
* @param contractId The id of the contract.
|
|
1215
|
+
* @param options Request options (abort signal).
|
|
1216
|
+
*/
|
|
1103
1217
|
async get(contractId, options) {
|
|
1104
1218
|
return unwrapProp(await client.GET("/contracts/v1/{contractId}", { params: { path: { contractId } }, signal: options?.signal }), "contract", "GET /contracts/v1/{contractId}");
|
|
1105
1219
|
},
|
|
1106
1220
|
/** Create a contract */
|
|
1107
|
-
async create(
|
|
1108
|
-
return unwrapProp(await client.POST("/contracts/v1", { body, signal: options?.signal }), "contract", "POST /contracts/v1");
|
|
1221
|
+
async create(contract, options) {
|
|
1222
|
+
return unwrapProp(await client.POST("/contracts/v1", { body: { contract }, signal: options?.signal }), "contract", "POST /contracts/v1");
|
|
1109
1223
|
},
|
|
1110
|
-
/**
|
|
1224
|
+
/**
|
|
1225
|
+
* Delete a contract
|
|
1226
|
+
*
|
|
1227
|
+
* @param contractId The id of the contract.
|
|
1228
|
+
* @param options Request options (abort signal).
|
|
1229
|
+
*/
|
|
1111
1230
|
async delete(contractId, options) {
|
|
1112
1231
|
return unwrap(await client.DELETE("/contracts/v1/{contractId}", { params: { path: { contractId } }, signal: options?.signal }), "DELETE /contracts/v1/{contractId}");
|
|
1113
1232
|
},
|
|
1114
|
-
/**
|
|
1115
|
-
|
|
1116
|
-
|
|
1233
|
+
/**
|
|
1234
|
+
* Issue a contract
|
|
1235
|
+
*
|
|
1236
|
+
* @param contractId The id of the contract.
|
|
1237
|
+
* @param signatureMethod The `signatureMethod` payload.
|
|
1238
|
+
* @param options Request options (abort signal).
|
|
1239
|
+
*/
|
|
1240
|
+
async issue(contractId, signatureMethod, options) {
|
|
1241
|
+
return unwrapProp(await client.POST("/contracts/v1/{contractId}/issue", { params: { path: { contractId } }, body: { signatureMethod }, signal: options?.signal }), "contract", "POST /contracts/v1/{contractId}/issue");
|
|
1117
1242
|
},
|
|
1118
|
-
/**
|
|
1119
|
-
|
|
1120
|
-
|
|
1243
|
+
/**
|
|
1244
|
+
* Terminate a contract
|
|
1245
|
+
*
|
|
1246
|
+
* @param contractId The id of the contract.
|
|
1247
|
+
* @param reason The `reason` payload.
|
|
1248
|
+
* @param options Request options (abort signal).
|
|
1249
|
+
*/
|
|
1250
|
+
async terminate(contractId, reason, options) {
|
|
1251
|
+
return unwrap(await client.PATCH("/contracts/v1/{contractId}/terminate", { params: { path: { contractId } }, body: { reason }, signal: options?.signal }), "PATCH /contracts/v1/{contractId}/terminate");
|
|
1121
1252
|
}
|
|
1122
1253
|
};
|
|
1123
1254
|
}
|
|
@@ -1145,19 +1276,35 @@ function createDiscounts(client, defaults) {
|
|
|
1145
1276
|
"coupons"
|
|
1146
1277
|
);
|
|
1147
1278
|
},
|
|
1148
|
-
/**
|
|
1279
|
+
/**
|
|
1280
|
+
* Get a coupon
|
|
1281
|
+
*
|
|
1282
|
+
* @param id The id of the coupon
|
|
1283
|
+
* @param options Request options (abort signal).
|
|
1284
|
+
*/
|
|
1149
1285
|
async get(id, options) {
|
|
1150
1286
|
return unwrapProp(await client.GET("/discounts/coupons/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "coupon", "GET /discounts/coupons/v1/{id}");
|
|
1151
1287
|
},
|
|
1152
1288
|
/** Create a coupon */
|
|
1153
|
-
async create(
|
|
1154
|
-
return unwrapProp(await client.POST("/discounts/coupons/v1", { body, signal: options?.signal }), "coupon", "POST /discounts/coupons/v1");
|
|
1289
|
+
async create(coupon, options) {
|
|
1290
|
+
return unwrapProp(await client.POST("/discounts/coupons/v1", { body: { coupon }, signal: options?.signal }), "coupon", "POST /discounts/coupons/v1");
|
|
1155
1291
|
},
|
|
1156
|
-
/**
|
|
1157
|
-
|
|
1158
|
-
|
|
1292
|
+
/**
|
|
1293
|
+
* Update a coupon
|
|
1294
|
+
*
|
|
1295
|
+
* @param id The id of the coupon
|
|
1296
|
+
* @param coupon The `coupon` payload.
|
|
1297
|
+
* @param options Request options (abort signal).
|
|
1298
|
+
*/
|
|
1299
|
+
async update(id, coupon, options) {
|
|
1300
|
+
return unwrap(await client.PATCH("/discounts/coupons/v1/{id}", { params: { path: { id } }, body: { coupon }, signal: options?.signal }), "PATCH /discounts/coupons/v1/{id}");
|
|
1159
1301
|
},
|
|
1160
|
-
/**
|
|
1302
|
+
/**
|
|
1303
|
+
* Delete a coupon
|
|
1304
|
+
*
|
|
1305
|
+
* @param id The id of the coupon
|
|
1306
|
+
* @param options Request options (abort signal).
|
|
1307
|
+
*/
|
|
1161
1308
|
async delete(id, options) {
|
|
1162
1309
|
return unwrap(await client.DELETE("/discounts/coupons/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /discounts/coupons/v1/{id}");
|
|
1163
1310
|
}
|
|
@@ -1171,15 +1318,25 @@ function createDiscounts(client, defaults) {
|
|
|
1171
1318
|
async list(query, options) {
|
|
1172
1319
|
return unwrapProp(await client.GET("/discounts/promocodes/v1", { params: { query }, signal: options?.signal }), "promocodes", "GET /discounts/promocodes/v1");
|
|
1173
1320
|
},
|
|
1174
|
-
/**
|
|
1321
|
+
/**
|
|
1322
|
+
* Get a promocode
|
|
1323
|
+
*
|
|
1324
|
+
* @param id The id of the promocode
|
|
1325
|
+
* @param options Request options (abort signal).
|
|
1326
|
+
*/
|
|
1175
1327
|
async get(id, options) {
|
|
1176
1328
|
return unwrapProp(await client.GET("/discounts/promocodes/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "promocode", "GET /discounts/promocodes/v1/{id}");
|
|
1177
1329
|
},
|
|
1178
1330
|
/** Create a promocode */
|
|
1179
|
-
async create(
|
|
1180
|
-
return unwrapProp(await client.POST("/discounts/promocodes/v1", { body, signal: options?.signal }), "promocode", "POST /discounts/promocodes/v1");
|
|
1331
|
+
async create(promocode, options) {
|
|
1332
|
+
return unwrapProp(await client.POST("/discounts/promocodes/v1", { body: { promocode }, signal: options?.signal }), "promocode", "POST /discounts/promocodes/v1");
|
|
1181
1333
|
},
|
|
1182
|
-
/**
|
|
1334
|
+
/**
|
|
1335
|
+
* Archive a promocode
|
|
1336
|
+
*
|
|
1337
|
+
* @param id The id of the promocode
|
|
1338
|
+
* @param options Request options (abort signal).
|
|
1339
|
+
*/
|
|
1183
1340
|
async archive(id, options) {
|
|
1184
1341
|
return unwrapProp(await client.PUT("/discounts/promocodes/v1/{id}/archive", { params: { path: { id } }, signal: options?.signal }), "promocode", "PUT /discounts/promocodes/v1/{id}/archive");
|
|
1185
1342
|
}
|
|
@@ -1220,8 +1377,8 @@ function createEvents(client, defaults) {
|
|
|
1220
1377
|
return unwrapProp(await client.GET("/events/v1/{id}", { params: { header: { "spacebring-network-id": defaults.networkId }, path: { id } }, signal: options?.signal }), "event", "GET /events/v1/{id}");
|
|
1221
1378
|
},
|
|
1222
1379
|
/** Create an event */
|
|
1223
|
-
async create(
|
|
1224
|
-
return unwrapProp(await client.POST("/events/v1", { body, signal: options?.signal }), "event", "POST /events/v1");
|
|
1380
|
+
async create(event, options) {
|
|
1381
|
+
return unwrapProp(await client.POST("/events/v1", { body: { event }, signal: options?.signal }), "event", "POST /events/v1");
|
|
1225
1382
|
},
|
|
1226
1383
|
/** Delete an event */
|
|
1227
1384
|
async delete(id, options) {
|
|
@@ -1259,6 +1416,9 @@ function createEvents(client, defaults) {
|
|
|
1259
1416
|
* Retrieve a ticket
|
|
1260
1417
|
*
|
|
1261
1418
|
* Retrieve an event ticket.
|
|
1419
|
+
*
|
|
1420
|
+
* @param id The id of the event ticket.
|
|
1421
|
+
* @param options Request options (abort signal).
|
|
1262
1422
|
*/
|
|
1263
1423
|
async get(id, options) {
|
|
1264
1424
|
return unwrapProp(await client.GET("/events/tickets/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "ticket", "GET /events/tickets/v1/{id}");
|
|
@@ -1276,18 +1436,33 @@ function createFeed(client, defaults) {
|
|
|
1276
1436
|
*
|
|
1277
1437
|
* Create a feed post comment.
|
|
1278
1438
|
*/
|
|
1279
|
-
async create(
|
|
1280
|
-
return unwrapProp(await client.POST("/feed/comments/v1", { body, signal: options?.signal }), "comment", "POST /feed/comments/v1");
|
|
1439
|
+
async create(comment, options) {
|
|
1440
|
+
return unwrapProp(await client.POST("/feed/comments/v1", { body: { comment }, signal: options?.signal }), "comment", "POST /feed/comments/v1");
|
|
1281
1441
|
},
|
|
1282
|
-
/**
|
|
1442
|
+
/**
|
|
1443
|
+
* Delete a post comment
|
|
1444
|
+
*
|
|
1445
|
+
* @param id The id of the post comment.
|
|
1446
|
+
* @param options Request options (abort signal).
|
|
1447
|
+
*/
|
|
1283
1448
|
async delete(id, options) {
|
|
1284
1449
|
return unwrap(await client.DELETE("/feed/comments/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /feed/comments/v1/{id}");
|
|
1285
1450
|
},
|
|
1286
|
-
/**
|
|
1451
|
+
/**
|
|
1452
|
+
* Create a like for a post comment
|
|
1453
|
+
*
|
|
1454
|
+
* @param id The id of the post comment.
|
|
1455
|
+
* @param options Request options (abort signal).
|
|
1456
|
+
*/
|
|
1287
1457
|
async createLike(id, options) {
|
|
1288
1458
|
return unwrapProp(await client.POST("/feed/comments/v1/{id}/likes", { params: { path: { id } }, signal: options?.signal }), "like", "POST /feed/comments/v1/{id}/likes");
|
|
1289
1459
|
},
|
|
1290
|
-
/**
|
|
1460
|
+
/**
|
|
1461
|
+
* Delete a like for a post comment
|
|
1462
|
+
*
|
|
1463
|
+
* @param id The id of the post comment.
|
|
1464
|
+
* @param options Request options (abort signal).
|
|
1465
|
+
*/
|
|
1291
1466
|
async deleteLike(id, options) {
|
|
1292
1467
|
return unwrap(await client.DELETE("/feed/comments/v1/{id}/likes", { params: { path: { id } }, signal: options?.signal }), "DELETE /feed/comments/v1/{id}/likes");
|
|
1293
1468
|
}
|
|
@@ -1316,6 +1491,9 @@ function createFeed(client, defaults) {
|
|
|
1316
1491
|
* Get a post
|
|
1317
1492
|
*
|
|
1318
1493
|
* Get a feed post.
|
|
1494
|
+
*
|
|
1495
|
+
* @param id The id of the post.
|
|
1496
|
+
* @param options Request options (abort signal).
|
|
1319
1497
|
*/
|
|
1320
1498
|
async get(id, options) {
|
|
1321
1499
|
return unwrapProp(await client.GET("/feed/posts/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "post", "GET /feed/posts/v1/{id}");
|
|
@@ -1325,38 +1503,65 @@ function createFeed(client, defaults) {
|
|
|
1325
1503
|
*
|
|
1326
1504
|
* Create a feed post.
|
|
1327
1505
|
*/
|
|
1328
|
-
async create(
|
|
1329
|
-
return unwrapProp(await client.POST("/feed/posts/v1", { body, signal: options?.signal }), "post", "POST /feed/posts/v1");
|
|
1506
|
+
async create(post, options) {
|
|
1507
|
+
return unwrapProp(await client.POST("/feed/posts/v1", { body: { post }, signal: options?.signal }), "post", "POST /feed/posts/v1");
|
|
1330
1508
|
},
|
|
1331
1509
|
/**
|
|
1332
1510
|
* Update a post
|
|
1333
1511
|
*
|
|
1334
1512
|
* Update a feed post.
|
|
1513
|
+
*
|
|
1514
|
+
* @param id The id of the post.
|
|
1515
|
+
* @param post The `post` payload.
|
|
1516
|
+
* @param options Request options (abort signal).
|
|
1335
1517
|
*/
|
|
1336
|
-
async update(id,
|
|
1337
|
-
return unwrapProp(await client.PUT("/feed/posts/v1/{id}", { params: { path: { id } }, body, signal: options?.signal }), "post", "PUT /feed/posts/v1/{id}");
|
|
1518
|
+
async update(id, post, options) {
|
|
1519
|
+
return unwrapProp(await client.PUT("/feed/posts/v1/{id}", { params: { path: { id } }, body: { post }, signal: options?.signal }), "post", "PUT /feed/posts/v1/{id}");
|
|
1338
1520
|
},
|
|
1339
1521
|
/**
|
|
1340
1522
|
* Delete a post
|
|
1341
1523
|
*
|
|
1342
1524
|
* Delete a feed post.
|
|
1525
|
+
*
|
|
1526
|
+
* @param id The id of the post.
|
|
1527
|
+
* @param options Request options (abort signal).
|
|
1343
1528
|
*/
|
|
1344
1529
|
async delete(id, options) {
|
|
1345
1530
|
return unwrap(await client.DELETE("/feed/posts/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /feed/posts/v1/{id}");
|
|
1346
1531
|
},
|
|
1347
|
-
/**
|
|
1532
|
+
/**
|
|
1533
|
+
* Create a like for a post
|
|
1534
|
+
*
|
|
1535
|
+
* @param id The id of the post.
|
|
1536
|
+
* @param options Request options (abort signal).
|
|
1537
|
+
*/
|
|
1348
1538
|
async createLike(id, options) {
|
|
1349
1539
|
return unwrapProp(await client.POST("/feed/posts/v1/{id}/likes", { params: { path: { id } }, signal: options?.signal }), "like", "POST /feed/posts/v1/{id}/likes");
|
|
1350
1540
|
},
|
|
1351
|
-
/**
|
|
1541
|
+
/**
|
|
1542
|
+
* Delete a like for a post
|
|
1543
|
+
*
|
|
1544
|
+
* @param id The id of the post.
|
|
1545
|
+
* @param options Request options (abort signal).
|
|
1546
|
+
*/
|
|
1352
1547
|
async deleteLike(id, options) {
|
|
1353
1548
|
return unwrap(await client.DELETE("/feed/posts/v1/{id}/likes", { params: { path: { id } }, signal: options?.signal }), "DELETE /feed/posts/v1/{id}/likes");
|
|
1354
1549
|
},
|
|
1355
|
-
/**
|
|
1550
|
+
/**
|
|
1551
|
+
* Get comments for a post
|
|
1552
|
+
*
|
|
1553
|
+
* @param id The id of the post.
|
|
1554
|
+
* @param options Request options (abort signal).
|
|
1555
|
+
*/
|
|
1356
1556
|
async getComments(id, options) {
|
|
1357
1557
|
return unwrapProp(await client.GET("/feed/posts/v1/{id}/comments", { params: { path: { id } }, signal: options?.signal }), "comments", "GET /feed/posts/v1/{id}/comments");
|
|
1358
1558
|
},
|
|
1359
|
-
/**
|
|
1559
|
+
/**
|
|
1560
|
+
* Get likes for a post
|
|
1561
|
+
*
|
|
1562
|
+
* @param id The id of the post.
|
|
1563
|
+
* @param options Request options (abort signal).
|
|
1564
|
+
*/
|
|
1360
1565
|
async getLikes(id, options) {
|
|
1361
1566
|
return unwrapProp(await client.GET("/feed/posts/v1/{id}/likes", { params: { path: { id } }, signal: options?.signal }), "likes", "GET /feed/posts/v1/{id}/likes");
|
|
1362
1567
|
}
|
|
@@ -1371,7 +1576,12 @@ function createFloors(client, defaults) {
|
|
|
1371
1576
|
async list(query, options) {
|
|
1372
1577
|
return unwrap(await client.GET("/floors/v1", { params: { query }, signal: options?.signal }), "GET /floors/v1");
|
|
1373
1578
|
},
|
|
1374
|
-
/**
|
|
1579
|
+
/**
|
|
1580
|
+
* Delete a floor
|
|
1581
|
+
*
|
|
1582
|
+
* @param id The id of the floor.
|
|
1583
|
+
* @param options Request options (abort signal).
|
|
1584
|
+
*/
|
|
1375
1585
|
async delete(id, options) {
|
|
1376
1586
|
return unwrap(await client.DELETE("/floors/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /floors/v1/{id}");
|
|
1377
1587
|
}
|
|
@@ -1404,6 +1614,9 @@ function createGuides(client, defaults) {
|
|
|
1404
1614
|
* Retrieve a guide
|
|
1405
1615
|
*
|
|
1406
1616
|
* Retrieve a guide by id.
|
|
1617
|
+
*
|
|
1618
|
+
* @param guideId The id of the guide.
|
|
1619
|
+
* @param options Request options (abort signal).
|
|
1407
1620
|
*/
|
|
1408
1621
|
async get(guideId, options) {
|
|
1409
1622
|
return unwrapProp(await client.GET("/guides/v1/{guideId}", { params: { path: { guideId } }, signal: options?.signal }), "guide", "GET /guides/v1/{guideId}");
|
|
@@ -1413,18 +1626,27 @@ function createGuides(client, defaults) {
|
|
|
1413
1626
|
*
|
|
1414
1627
|
* Create a guide in an organization.
|
|
1415
1628
|
*/
|
|
1416
|
-
async create(
|
|
1417
|
-
return unwrapProp(await client.POST("/guides/v1", { body, signal: options?.signal }), "guide", "POST /guides/v1");
|
|
1629
|
+
async create(guide, options) {
|
|
1630
|
+
return unwrapProp(await client.POST("/guides/v1", { body: { guide }, signal: options?.signal }), "guide", "POST /guides/v1");
|
|
1418
1631
|
},
|
|
1419
1632
|
/**
|
|
1420
1633
|
* Update a guide
|
|
1421
1634
|
*
|
|
1422
1635
|
* Update a guide. At least one guide property must be provided.
|
|
1636
|
+
*
|
|
1637
|
+
* @param guideId The id of the guide
|
|
1638
|
+
* @param guide The `guide` payload.
|
|
1639
|
+
* @param options Request options (abort signal).
|
|
1423
1640
|
*/
|
|
1424
|
-
async update(guideId,
|
|
1425
|
-
return unwrapProp(await client.PATCH("/guides/v1/{guideId}", { params: { path: { guideId } }, body, signal: options?.signal }), "guide", "PATCH /guides/v1/{guideId}");
|
|
1641
|
+
async update(guideId, guide, options) {
|
|
1642
|
+
return unwrapProp(await client.PATCH("/guides/v1/{guideId}", { params: { path: { guideId } }, body: { guide }, signal: options?.signal }), "guide", "PATCH /guides/v1/{guideId}");
|
|
1426
1643
|
},
|
|
1427
|
-
/**
|
|
1644
|
+
/**
|
|
1645
|
+
* Delete a guide
|
|
1646
|
+
*
|
|
1647
|
+
* @param guideId The id of the guide
|
|
1648
|
+
* @param options Request options (abort signal).
|
|
1649
|
+
*/
|
|
1428
1650
|
async delete(guideId, options) {
|
|
1429
1651
|
return unwrap(await client.DELETE("/guides/v1/{guideId}", { params: { path: { guideId } }, signal: options?.signal }), "DELETE /guides/v1/{guideId}");
|
|
1430
1652
|
}
|
|
@@ -1438,7 +1660,12 @@ function createLocations(client, defaults) {
|
|
|
1438
1660
|
async list(options) {
|
|
1439
1661
|
return unwrapProp(await client.GET("/locations/v1", { signal: options?.signal }), "locations", "GET /locations/v1");
|
|
1440
1662
|
},
|
|
1441
|
-
/**
|
|
1663
|
+
/**
|
|
1664
|
+
* Get a location
|
|
1665
|
+
*
|
|
1666
|
+
* @param locationId The id of the location.
|
|
1667
|
+
* @param options Request options (abort signal).
|
|
1668
|
+
*/
|
|
1442
1669
|
async get(locationId, options) {
|
|
1443
1670
|
return unwrapProp(await client.GET("/locations/v1/{locationId}", { params: { path: { locationId } }, signal: options?.signal }), "location", "GET /locations/v1/{locationId}");
|
|
1444
1671
|
}
|
|
@@ -1485,26 +1712,36 @@ function createPlans(client, defaults) {
|
|
|
1485
1712
|
* Retrieve a plan
|
|
1486
1713
|
*
|
|
1487
1714
|
* Retrieve a certain plan.
|
|
1715
|
+
*
|
|
1716
|
+
* @param planId The id of the plan.
|
|
1717
|
+
* @param options Request options (abort signal).
|
|
1488
1718
|
*/
|
|
1489
1719
|
async get(planId, options) {
|
|
1490
1720
|
return unwrapProp(await client.GET("/plans/v1/{planId}", { params: { path: { planId } }, signal: options?.signal }), "plan", "GET /plans/v1/{planId}");
|
|
1491
1721
|
},
|
|
1492
1722
|
/** Create a plan */
|
|
1493
|
-
async create(
|
|
1494
|
-
return unwrapProp(await client.POST("/plans/v1", { body, signal: options?.signal }), "plan", "POST /plans/v1");
|
|
1723
|
+
async create(plan, options) {
|
|
1724
|
+
return unwrapProp(await client.POST("/plans/v1", { body: { plan }, signal: options?.signal }), "plan", "POST /plans/v1");
|
|
1495
1725
|
},
|
|
1496
1726
|
/**
|
|
1497
1727
|
* Update a plan
|
|
1498
1728
|
*
|
|
1499
1729
|
* Update a certain plan.
|
|
1730
|
+
*
|
|
1731
|
+
* @param planId The id of the plan.
|
|
1732
|
+
* @param plan The `plan` payload.
|
|
1733
|
+
* @param options Request options (abort signal).
|
|
1500
1734
|
*/
|
|
1501
|
-
async update(planId,
|
|
1502
|
-
return unwrap(await client.PATCH("/plans/v1/{planId}", { params: { path: { planId } }, body, signal: options?.signal }), "PATCH /plans/v1/{planId}");
|
|
1735
|
+
async update(planId, plan, options) {
|
|
1736
|
+
return unwrap(await client.PATCH("/plans/v1/{planId}", { params: { path: { planId } }, body: { plan }, signal: options?.signal }), "PATCH /plans/v1/{planId}");
|
|
1503
1737
|
},
|
|
1504
1738
|
/**
|
|
1505
1739
|
* Delete a plan
|
|
1506
1740
|
*
|
|
1507
1741
|
* Delete a certain plan.
|
|
1742
|
+
*
|
|
1743
|
+
* @param planId The id of the plan.
|
|
1744
|
+
* @param options Request options (abort signal).
|
|
1508
1745
|
*/
|
|
1509
1746
|
async delete(planId, options) {
|
|
1510
1747
|
return unwrap(await client.DELETE("/plans/v1/{planId}", { params: { path: { planId } }, signal: options?.signal }), "DELETE /plans/v1/{planId}");
|
|
@@ -1563,6 +1800,9 @@ function createResources(client, defaults) {
|
|
|
1563
1800
|
* Get a resource
|
|
1564
1801
|
*
|
|
1565
1802
|
* Get a certain resource.
|
|
1803
|
+
*
|
|
1804
|
+
* @param id The id of the resource.
|
|
1805
|
+
* @param options Request options (abort signal).
|
|
1566
1806
|
*/
|
|
1567
1807
|
async get(id, options) {
|
|
1568
1808
|
return unwrapProp(await client.GET("/resources/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "resource", "GET /resources/v1/{id}");
|
|
@@ -1572,16 +1812,20 @@ function createResources(client, defaults) {
|
|
|
1572
1812
|
*
|
|
1573
1813
|
* Create a new resource in a location. The request body must match the schema exactly—unknown properties are rejected.
|
|
1574
1814
|
*/
|
|
1575
|
-
async create(
|
|
1576
|
-
return unwrapProp(await client.POST("/resources/v1", { body, signal: options?.signal }), "resource", "POST /resources/v1");
|
|
1815
|
+
async create(resource, options) {
|
|
1816
|
+
return unwrapProp(await client.POST("/resources/v1", { body: { resource }, signal: options?.signal }), "resource", "POST /resources/v1");
|
|
1577
1817
|
},
|
|
1578
1818
|
/**
|
|
1579
1819
|
* Patch a resource
|
|
1580
1820
|
*
|
|
1581
1821
|
* Patch a certain resource.
|
|
1822
|
+
*
|
|
1823
|
+
* @param id The id of the resource.
|
|
1824
|
+
* @param resource The `resource` payload.
|
|
1825
|
+
* @param options Request options (abort signal).
|
|
1582
1826
|
*/
|
|
1583
|
-
async update(id,
|
|
1584
|
-
return unwrap(await client.PATCH("/resources/v1/{id}", { params: { path: { id } }, body, signal: options?.signal }), "PATCH /resources/v1/{id}");
|
|
1827
|
+
async update(id, resource, options) {
|
|
1828
|
+
return unwrap(await client.PATCH("/resources/v1/{id}", { params: { path: { id } }, body: { resource }, signal: options?.signal }), "PATCH /resources/v1/{id}");
|
|
1585
1829
|
},
|
|
1586
1830
|
bookings: {
|
|
1587
1831
|
/**
|
|
@@ -1603,15 +1847,25 @@ function createResources(client, defaults) {
|
|
|
1603
1847
|
"bookings"
|
|
1604
1848
|
);
|
|
1605
1849
|
},
|
|
1606
|
-
/**
|
|
1850
|
+
/**
|
|
1851
|
+
* Get a booking
|
|
1852
|
+
*
|
|
1853
|
+
* @param id The id of the booking.
|
|
1854
|
+
* @param options Request options (abort signal).
|
|
1855
|
+
*/
|
|
1607
1856
|
async get(id, options) {
|
|
1608
1857
|
return unwrapProp(await client.GET("/resources/bookings/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "booking", "GET /resources/bookings/v1/{id}");
|
|
1609
1858
|
},
|
|
1610
1859
|
/** Create a booking */
|
|
1611
|
-
async create(
|
|
1612
|
-
return unwrapProp(await client.POST("/resources/bookings/v1", { body, signal: options?.signal }), "booking", "POST /resources/bookings/v1");
|
|
1860
|
+
async create(booking, options) {
|
|
1861
|
+
return unwrapProp(await client.POST("/resources/bookings/v1", { body: { booking }, signal: options?.signal }), "booking", "POST /resources/bookings/v1");
|
|
1613
1862
|
},
|
|
1614
|
-
/**
|
|
1863
|
+
/**
|
|
1864
|
+
* Delete a booking
|
|
1865
|
+
*
|
|
1866
|
+
* @param id The id of the booking.
|
|
1867
|
+
* @param options Request options (abort signal).
|
|
1868
|
+
*/
|
|
1615
1869
|
async delete(id, options) {
|
|
1616
1870
|
return unwrap(await client.DELETE("/resources/bookings/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /resources/bookings/v1/{id}");
|
|
1617
1871
|
}
|
|
@@ -1635,6 +1889,9 @@ function createShop(client, defaults) {
|
|
|
1635
1889
|
* Get a category
|
|
1636
1890
|
*
|
|
1637
1891
|
* Get a shop category.
|
|
1892
|
+
*
|
|
1893
|
+
* @param categoryId The id of the shop category.
|
|
1894
|
+
* @param options Request options (abort signal).
|
|
1638
1895
|
*/
|
|
1639
1896
|
async get(categoryId, options) {
|
|
1640
1897
|
return unwrapProp(await client.GET("/shop/categories/v1/{categoryId}", { params: { path: { categoryId } }, signal: options?.signal }), "category", "GET /shop/categories/v1/{categoryId}");
|
|
@@ -1644,21 +1901,28 @@ function createShop(client, defaults) {
|
|
|
1644
1901
|
*
|
|
1645
1902
|
* Create a shop category.
|
|
1646
1903
|
*/
|
|
1647
|
-
async create(
|
|
1648
|
-
return unwrapProp(await client.POST("/shop/categories/v1", { body, signal: options?.signal }), "category", "POST /shop/categories/v1");
|
|
1904
|
+
async create(category, options) {
|
|
1905
|
+
return unwrapProp(await client.POST("/shop/categories/v1", { body: { category }, signal: options?.signal }), "category", "POST /shop/categories/v1");
|
|
1649
1906
|
},
|
|
1650
1907
|
/**
|
|
1651
1908
|
* Update a category
|
|
1652
1909
|
*
|
|
1653
1910
|
* Update a shop category.
|
|
1911
|
+
*
|
|
1912
|
+
* @param categoryId The id of the shop category
|
|
1913
|
+
* @param category The `category` payload.
|
|
1914
|
+
* @param options Request options (abort signal).
|
|
1654
1915
|
*/
|
|
1655
|
-
async update(categoryId,
|
|
1656
|
-
return unwrapProp(await client.PUT("/shop/categories/v1/{categoryId}", { params: { path: { categoryId } }, body, signal: options?.signal }), "category", "PUT /shop/categories/v1/{categoryId}");
|
|
1916
|
+
async update(categoryId, category, options) {
|
|
1917
|
+
return unwrapProp(await client.PUT("/shop/categories/v1/{categoryId}", { params: { path: { categoryId } }, body: { category }, signal: options?.signal }), "category", "PUT /shop/categories/v1/{categoryId}");
|
|
1657
1918
|
},
|
|
1658
1919
|
/**
|
|
1659
1920
|
* Delete a category
|
|
1660
1921
|
*
|
|
1661
1922
|
* Delete a shop category.
|
|
1923
|
+
*
|
|
1924
|
+
* @param categoryId The id of the shop category
|
|
1925
|
+
* @param options Request options (abort signal).
|
|
1662
1926
|
*/
|
|
1663
1927
|
async delete(categoryId, options) {
|
|
1664
1928
|
return unwrap(await client.DELETE("/shop/categories/v1/{categoryId}", { params: { path: { categoryId } }, signal: options?.signal }), "DELETE /shop/categories/v1/{categoryId}");
|
|
@@ -1688,6 +1952,9 @@ function createShop(client, defaults) {
|
|
|
1688
1952
|
* Get an order
|
|
1689
1953
|
*
|
|
1690
1954
|
* Get a certain order.
|
|
1955
|
+
*
|
|
1956
|
+
* @param orderId The id of the order.
|
|
1957
|
+
* @param options Request options (abort signal).
|
|
1691
1958
|
*/
|
|
1692
1959
|
async get(orderId, options) {
|
|
1693
1960
|
return unwrapProp(await client.GET("/shop/orders/v1/{orderId}", { params: { path: { orderId } }, signal: options?.signal }), "order", "GET /shop/orders/v1/{orderId}");
|
|
@@ -1717,6 +1984,9 @@ function createShop(client, defaults) {
|
|
|
1717
1984
|
* Get a product
|
|
1718
1985
|
*
|
|
1719
1986
|
* Get a certain product.
|
|
1987
|
+
*
|
|
1988
|
+
* @param productId The id of the product.
|
|
1989
|
+
* @param options Request options (abort signal).
|
|
1720
1990
|
*/
|
|
1721
1991
|
async get(productId, options) {
|
|
1722
1992
|
return unwrapProp(await client.GET("/shop/products/v1/{productId}", { params: { path: { productId } }, signal: options?.signal }), "product", "GET /shop/products/v1/{productId}");
|
|
@@ -1726,21 +1996,28 @@ function createShop(client, defaults) {
|
|
|
1726
1996
|
*
|
|
1727
1997
|
* Create a product in shop.
|
|
1728
1998
|
*/
|
|
1729
|
-
async create(
|
|
1730
|
-
return unwrapProp(await client.POST("/shop/products/v1", { body, signal: options?.signal }), "product", "POST /shop/products/v1");
|
|
1999
|
+
async create(product, options) {
|
|
2000
|
+
return unwrapProp(await client.POST("/shop/products/v1", { body: { product }, signal: options?.signal }), "product", "POST /shop/products/v1");
|
|
1731
2001
|
},
|
|
1732
2002
|
/**
|
|
1733
2003
|
* Update a product
|
|
1734
2004
|
*
|
|
1735
2005
|
* Update a certain product.
|
|
2006
|
+
*
|
|
2007
|
+
* @param productId The id of the product.
|
|
2008
|
+
* @param product The `product` payload.
|
|
2009
|
+
* @param options Request options (abort signal).
|
|
1736
2010
|
*/
|
|
1737
|
-
async update(productId,
|
|
1738
|
-
return unwrapProp(await client.PUT("/shop/products/v1/{productId}", { params: { path: { productId } }, body, signal: options?.signal }), "product", "PUT /shop/products/v1/{productId}");
|
|
2011
|
+
async update(productId, product, options) {
|
|
2012
|
+
return unwrapProp(await client.PUT("/shop/products/v1/{productId}", { params: { path: { productId } }, body: { product }, signal: options?.signal }), "product", "PUT /shop/products/v1/{productId}");
|
|
1739
2013
|
},
|
|
1740
2014
|
/**
|
|
1741
2015
|
* Delete a product
|
|
1742
2016
|
*
|
|
1743
2017
|
* Delete a certain product.
|
|
2018
|
+
*
|
|
2019
|
+
* @param productId The id of the product.
|
|
2020
|
+
* @param options Request options (abort signal).
|
|
1744
2021
|
*/
|
|
1745
2022
|
async delete(productId, options) {
|
|
1746
2023
|
return unwrap(await client.DELETE("/shop/products/v1/{productId}", { params: { path: { productId } }, signal: options?.signal }), "DELETE /shop/products/v1/{productId}");
|
|
@@ -1767,6 +2044,9 @@ function createSubscriptions(client, defaults) {
|
|
|
1767
2044
|
* Retrieve a subscription
|
|
1768
2045
|
*
|
|
1769
2046
|
* Retrieve a certain subscription.
|
|
2047
|
+
*
|
|
2048
|
+
* @param subscriptionId The id of the subscription.
|
|
2049
|
+
* @param options Request options (abort signal).
|
|
1770
2050
|
*/
|
|
1771
2051
|
async get(subscriptionId, options) {
|
|
1772
2052
|
return unwrapProp(await client.GET("/subscriptions/v1/{subscriptionId}", { params: { path: { subscriptionId } }, signal: options?.signal }), "subscription", "GET /subscriptions/v1/{subscriptionId}");
|
|
@@ -1783,29 +2063,55 @@ function createSubscriptions(client, defaults) {
|
|
|
1783
2063
|
* Update a subscription
|
|
1784
2064
|
*
|
|
1785
2065
|
* Update a certain subscription.
|
|
2066
|
+
*
|
|
2067
|
+
* @param subscriptionId The id of the subscription.
|
|
2068
|
+
* @param subscription The `subscription` payload.
|
|
2069
|
+
* @param options Request options (abort signal).
|
|
1786
2070
|
*/
|
|
1787
|
-
async update(subscriptionId,
|
|
1788
|
-
return unwrap(await client.PATCH("/subscriptions/v1/{subscriptionId}", { params: { path: { subscriptionId } }, body, signal: options?.signal }), "PATCH /subscriptions/v1/{subscriptionId}");
|
|
2071
|
+
async update(subscriptionId, subscription, options) {
|
|
2072
|
+
return unwrap(await client.PATCH("/subscriptions/v1/{subscriptionId}", { params: { path: { subscriptionId } }, body: { subscription }, signal: options?.signal }), "PATCH /subscriptions/v1/{subscriptionId}");
|
|
1789
2073
|
},
|
|
1790
2074
|
/**
|
|
1791
2075
|
* Delete a subscription
|
|
1792
2076
|
*
|
|
1793
2077
|
* Delete a certain subscription.
|
|
2078
|
+
*
|
|
2079
|
+
* @param subscriptionId The id of the subscription.
|
|
2080
|
+
* @param options Request options (abort signal).
|
|
1794
2081
|
*/
|
|
1795
2082
|
async delete(subscriptionId, options) {
|
|
1796
2083
|
return unwrap(await client.DELETE("/subscriptions/v1/{subscriptionId}", { params: { path: { subscriptionId } }, signal: options?.signal }), "DELETE /subscriptions/v1/{subscriptionId}");
|
|
1797
2084
|
},
|
|
1798
|
-
/**
|
|
1799
|
-
|
|
1800
|
-
|
|
2085
|
+
/**
|
|
2086
|
+
* Create a subscription item
|
|
2087
|
+
*
|
|
2088
|
+
* @param subscriptionId The id of the subscription.
|
|
2089
|
+
* @param item The `item` payload.
|
|
2090
|
+
* @param options Request options (abort signal).
|
|
2091
|
+
*/
|
|
2092
|
+
async createItem(subscriptionId, item, options) {
|
|
2093
|
+
return unwrapProp(await client.POST("/subscriptions/v1/{subscriptionId}/items", { params: { path: { subscriptionId } }, body: { item }, signal: options?.signal }), "subscription", "POST /subscriptions/v1/{subscriptionId}/items");
|
|
1801
2094
|
},
|
|
1802
|
-
/**
|
|
2095
|
+
/**
|
|
2096
|
+
* Delete a subscription item
|
|
2097
|
+
*
|
|
2098
|
+
* @param subscriptionId The id of the subscription.
|
|
2099
|
+
* @param itemId The id of the subscription item.
|
|
2100
|
+
* @param options Request options (abort signal).
|
|
2101
|
+
*/
|
|
1803
2102
|
async deleteItem(subscriptionId, itemId, options) {
|
|
1804
2103
|
return unwrap(await client.DELETE("/subscriptions/v1/{subscriptionId}/items/{itemId}", { params: { path: { subscriptionId, itemId } }, signal: options?.signal }), "DELETE /subscriptions/v1/{subscriptionId}/items/{itemId}");
|
|
1805
2104
|
},
|
|
1806
|
-
/**
|
|
1807
|
-
|
|
1808
|
-
|
|
2105
|
+
/**
|
|
2106
|
+
* Update a subscription item
|
|
2107
|
+
*
|
|
2108
|
+
* @param subscriptionId The id of the subscription.
|
|
2109
|
+
* @param itemId The id of the subscription item.
|
|
2110
|
+
* @param item The `item` payload.
|
|
2111
|
+
* @param options Request options (abort signal).
|
|
2112
|
+
*/
|
|
2113
|
+
async updateItem(subscriptionId, itemId, item, options) {
|
|
2114
|
+
return unwrap(await client.PATCH("/subscriptions/v1/{subscriptionId}/items/{itemId}", { params: { path: { subscriptionId, itemId } }, body: { item }, signal: options?.signal }), "PATCH /subscriptions/v1/{subscriptionId}/items/{itemId}");
|
|
1809
2115
|
}
|
|
1810
2116
|
};
|
|
1811
2117
|
}
|
|
@@ -1837,6 +2143,9 @@ function createSupport(client, defaults) {
|
|
|
1837
2143
|
* Retrieve a ticket
|
|
1838
2144
|
*
|
|
1839
2145
|
* Retrieve a support ticket.
|
|
2146
|
+
*
|
|
2147
|
+
* @param id The id of the ticket.
|
|
2148
|
+
* @param options Request options (abort signal).
|
|
1840
2149
|
*/
|
|
1841
2150
|
async get(id, options) {
|
|
1842
2151
|
return unwrap(await client.GET("/support/tickets/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "GET /support/tickets/v1/{id}");
|
|
@@ -1846,32 +2155,44 @@ function createSupport(client, defaults) {
|
|
|
1846
2155
|
*
|
|
1847
2156
|
* Create a support ticket.
|
|
1848
2157
|
*/
|
|
1849
|
-
async create(
|
|
1850
|
-
return unwrap(await client.POST("/support/tickets/v1", { body, signal: options?.signal }), "POST /support/tickets/v1");
|
|
2158
|
+
async create(ticket, options) {
|
|
2159
|
+
return unwrap(await client.POST("/support/tickets/v1", { body: { ticket }, signal: options?.signal }), "POST /support/tickets/v1");
|
|
1851
2160
|
},
|
|
1852
2161
|
/**
|
|
1853
2162
|
* Update a ticket's assignee
|
|
1854
2163
|
*
|
|
1855
2164
|
* Update support ticket assignee.
|
|
2165
|
+
*
|
|
2166
|
+
* @param id The id of the ticket.
|
|
2167
|
+
* @param ticket The `ticket` payload.
|
|
2168
|
+
* @param options Request options (abort signal).
|
|
1856
2169
|
*/
|
|
1857
|
-
async updateAssignee(id,
|
|
1858
|
-
return unwrap(await client.PUT("/support/tickets/v1/{id}/assignee", { params: { path: { id } }, body, signal: options?.signal }), "PUT /support/tickets/v1/{id}/assignee");
|
|
2170
|
+
async updateAssignee(id, ticket, options) {
|
|
2171
|
+
return unwrap(await client.PUT("/support/tickets/v1/{id}/assignee", { params: { path: { id } }, body: { ticket }, signal: options?.signal }), "PUT /support/tickets/v1/{id}/assignee");
|
|
1859
2172
|
},
|
|
1860
2173
|
/**
|
|
1861
2174
|
* Update a ticket's status
|
|
1862
2175
|
*
|
|
1863
2176
|
* Update support ticket status.
|
|
2177
|
+
*
|
|
2178
|
+
* @param id The id of the ticket.
|
|
2179
|
+
* @param ticket The `ticket` payload.
|
|
2180
|
+
* @param options Request options (abort signal).
|
|
1864
2181
|
*/
|
|
1865
|
-
async updateStatus(id,
|
|
1866
|
-
return unwrap(await client.PUT("/support/tickets/v1/{id}/status", { params: { path: { id } }, body, signal: options?.signal }), "PUT /support/tickets/v1/{id}/status");
|
|
2182
|
+
async updateStatus(id, ticket, options) {
|
|
2183
|
+
return unwrap(await client.PUT("/support/tickets/v1/{id}/status", { params: { path: { id } }, body: { ticket }, signal: options?.signal }), "PUT /support/tickets/v1/{id}/status");
|
|
1867
2184
|
},
|
|
1868
2185
|
/**
|
|
1869
2186
|
* Update a ticket's type
|
|
1870
2187
|
*
|
|
1871
2188
|
* Update a support ticket type.
|
|
2189
|
+
*
|
|
2190
|
+
* @param id The id of the ticket.
|
|
2191
|
+
* @param ticket The `ticket` payload.
|
|
2192
|
+
* @param options Request options (abort signal).
|
|
1872
2193
|
*/
|
|
1873
|
-
async updateType(id,
|
|
1874
|
-
return unwrap(await client.PATCH("/support/tickets/v1/{id}/type", { params: { path: { id } }, body, signal: options?.signal }), "PATCH /support/tickets/v1/{id}/type");
|
|
2194
|
+
async updateType(id, ticket, options) {
|
|
2195
|
+
return unwrap(await client.PATCH("/support/tickets/v1/{id}/type", { params: { path: { id } }, body: { ticket }, signal: options?.signal }), "PATCH /support/tickets/v1/{id}/type");
|
|
1875
2196
|
},
|
|
1876
2197
|
comment: {
|
|
1877
2198
|
/**
|
|
@@ -1879,13 +2200,16 @@ function createSupport(client, defaults) {
|
|
|
1879
2200
|
*
|
|
1880
2201
|
* Create a support ticket comment.
|
|
1881
2202
|
*/
|
|
1882
|
-
async create(
|
|
1883
|
-
return unwrapProp(await client.POST("/support/tickets/v1/comment", { body, signal: options?.signal }), "activity", "POST /support/tickets/v1/comment");
|
|
2203
|
+
async create(activity, options) {
|
|
2204
|
+
return unwrapProp(await client.POST("/support/tickets/v1/comment", { body: { activity }, signal: options?.signal }), "activity", "POST /support/tickets/v1/comment");
|
|
1884
2205
|
},
|
|
1885
2206
|
/**
|
|
1886
2207
|
* Delete a ticket comment
|
|
1887
2208
|
*
|
|
1888
2209
|
* Delete a support ticket comment.
|
|
2210
|
+
*
|
|
2211
|
+
* @param id The id of the ticket activity.
|
|
2212
|
+
* @param options Request options (abort signal).
|
|
1889
2213
|
*/
|
|
1890
2214
|
async delete(id, options) {
|
|
1891
2215
|
return unwrap(await client.DELETE("/support/tickets/v1/comment/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /support/tickets/v1/comment/{id}");
|
|
@@ -1903,11 +2227,19 @@ function createTransactions(client, defaults) {
|
|
|
1903
2227
|
* Retrieve credit balance
|
|
1904
2228
|
*
|
|
1905
2229
|
* Retrieve credits balance.
|
|
2230
|
+
*
|
|
2231
|
+
* @param id The id of the customer
|
|
2232
|
+
* @param options Request options (abort signal).
|
|
1906
2233
|
*/
|
|
1907
2234
|
async getCredits(id, options) {
|
|
1908
2235
|
return unwrapProp(await client.GET("/transactions/v1/balances/{id}/credits", { params: { path: { id } }, signal: options?.signal }), "balances", "GET /transactions/v1/balances/{id}/credits");
|
|
1909
2236
|
},
|
|
1910
|
-
/**
|
|
2237
|
+
/**
|
|
2238
|
+
* Retrieve day passes balance
|
|
2239
|
+
*
|
|
2240
|
+
* @param id The id of the customer
|
|
2241
|
+
* @param options Request options (abort signal).
|
|
2242
|
+
*/
|
|
1911
2243
|
async getDayPasses(id, options) {
|
|
1912
2244
|
return unwrapProp(await client.GET("/transactions/v1/balances/{id}/day_passes", { params: { path: { id } }, signal: options?.signal }), "balances", "GET /transactions/v1/balances/{id}/day_passes");
|
|
1913
2245
|
}
|
|
@@ -1937,8 +2269,8 @@ function createTransactions(client, defaults) {
|
|
|
1937
2269
|
*
|
|
1938
2270
|
* Create a credits transaction.
|
|
1939
2271
|
*/
|
|
1940
|
-
async create(
|
|
1941
|
-
return unwrapProp(await client.POST("/transactions/credits/v1", { body, signal: options?.signal }), "transaction", "POST /transactions/credits/v1");
|
|
2272
|
+
async create(transaction, options) {
|
|
2273
|
+
return unwrapProp(await client.POST("/transactions/credits/v1", { body: { transaction }, signal: options?.signal }), "transaction", "POST /transactions/credits/v1");
|
|
1942
2274
|
}
|
|
1943
2275
|
},
|
|
1944
2276
|
dayPasses: {
|
|
@@ -1966,8 +2298,8 @@ function createTransactions(client, defaults) {
|
|
|
1966
2298
|
*
|
|
1967
2299
|
* Create a day passes transaction.
|
|
1968
2300
|
*/
|
|
1969
|
-
async create(
|
|
1970
|
-
return unwrapProp(await client.POST("/transactions/day_passes/v1", { body, signal: options?.signal }), "transaction", "POST /transactions/day_passes/v1");
|
|
2301
|
+
async create(transaction, options) {
|
|
2302
|
+
return unwrapProp(await client.POST("/transactions/day_passes/v1", { body: { transaction }, signal: options?.signal }), "transaction", "POST /transactions/day_passes/v1");
|
|
1971
2303
|
}
|
|
1972
2304
|
},
|
|
1973
2305
|
money: {
|
|
@@ -1982,7 +2314,12 @@ function createTransactions(client, defaults) {
|
|
|
1982
2314
|
"transactions"
|
|
1983
2315
|
);
|
|
1984
2316
|
},
|
|
1985
|
-
/**
|
|
2317
|
+
/**
|
|
2318
|
+
* Retrieve a money transaction
|
|
2319
|
+
*
|
|
2320
|
+
* @param id The id of the transaction
|
|
2321
|
+
* @param options Request options (abort signal).
|
|
2322
|
+
*/
|
|
1986
2323
|
async get(id, options) {
|
|
1987
2324
|
return unwrapProp(await client.GET("/transactions/money/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "transaction", "GET /transactions/money/v1/{id}");
|
|
1988
2325
|
}
|
|
@@ -2005,13 +2342,18 @@ function createVisitors(client, defaults) {
|
|
|
2005
2342
|
"contacts"
|
|
2006
2343
|
);
|
|
2007
2344
|
},
|
|
2008
|
-
/**
|
|
2345
|
+
/**
|
|
2346
|
+
* Get a contact
|
|
2347
|
+
*
|
|
2348
|
+
* @param contactId The id of the contact.
|
|
2349
|
+
* @param options Request options (abort signal).
|
|
2350
|
+
*/
|
|
2009
2351
|
async get(contactId, options) {
|
|
2010
2352
|
return unwrapProp(await client.GET("/visitors/contacts/v1/{contactId}", { params: { path: { contactId } }, signal: options?.signal }), "contact", "GET /visitors/contacts/v1/{contactId}");
|
|
2011
2353
|
},
|
|
2012
2354
|
/** Create a contact */
|
|
2013
|
-
async create(
|
|
2014
|
-
return unwrapProp(await client.POST("/visitors/contacts/v1", { body, signal: options?.signal }), "contact", "POST /visitors/contacts/v1");
|
|
2355
|
+
async create(contact, options) {
|
|
2356
|
+
return unwrapProp(await client.POST("/visitors/contacts/v1", { body: { contact }, signal: options?.signal }), "contact", "POST /visitors/contacts/v1");
|
|
2015
2357
|
}
|
|
2016
2358
|
},
|
|
2017
2359
|
requests: {
|
|
@@ -2026,19 +2368,34 @@ function createVisitors(client, defaults) {
|
|
|
2026
2368
|
"requests"
|
|
2027
2369
|
);
|
|
2028
2370
|
},
|
|
2029
|
-
/**
|
|
2371
|
+
/**
|
|
2372
|
+
* Retrieve a request
|
|
2373
|
+
*
|
|
2374
|
+
* @param id The id of the request.
|
|
2375
|
+
* @param options Request options (abort signal).
|
|
2376
|
+
*/
|
|
2030
2377
|
async get(id, options) {
|
|
2031
2378
|
return unwrapProp(await client.GET("/visitors/requests/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "request", "GET /visitors/requests/v1/{id}");
|
|
2032
2379
|
},
|
|
2033
2380
|
/** Create a request */
|
|
2034
|
-
async create(
|
|
2035
|
-
return unwrapProp(await client.POST("/visitors/requests/v1", { body, signal: options?.signal }), "request", "POST /visitors/requests/v1");
|
|
2381
|
+
async create(request, options) {
|
|
2382
|
+
return unwrapProp(await client.POST("/visitors/requests/v1", { body: { request }, signal: options?.signal }), "request", "POST /visitors/requests/v1");
|
|
2036
2383
|
},
|
|
2037
|
-
/**
|
|
2384
|
+
/**
|
|
2385
|
+
* Approve a request
|
|
2386
|
+
*
|
|
2387
|
+
* @param id The id of the request
|
|
2388
|
+
* @param options Request options (abort signal).
|
|
2389
|
+
*/
|
|
2038
2390
|
async approve(id, options) {
|
|
2039
2391
|
return unwrapProp(await client.POST("/visitors/requests/v1/{id}/approve", { params: { path: { id } }, signal: options?.signal }), "visit", "POST /visitors/requests/v1/{id}/approve");
|
|
2040
2392
|
},
|
|
2041
|
-
/**
|
|
2393
|
+
/**
|
|
2394
|
+
* Reject a request
|
|
2395
|
+
*
|
|
2396
|
+
* @param id The id of the request
|
|
2397
|
+
* @param options Request options (abort signal).
|
|
2398
|
+
*/
|
|
2042
2399
|
async reject(id, options) {
|
|
2043
2400
|
return unwrap(await client.POST("/visitors/requests/v1/{id}/reject", { params: { path: { id } }, signal: options?.signal }), "POST /visitors/requests/v1/{id}/reject");
|
|
2044
2401
|
}
|
|
@@ -2059,26 +2416,36 @@ function createVisitors(client, defaults) {
|
|
|
2059
2416
|
* Retrieve a visit
|
|
2060
2417
|
*
|
|
2061
2418
|
* Retrieve a visit by id.
|
|
2419
|
+
*
|
|
2420
|
+
* @param id The id of the visit
|
|
2421
|
+
* @param options Request options (abort signal).
|
|
2062
2422
|
*/
|
|
2063
2423
|
async get(id, options) {
|
|
2064
2424
|
return unwrapProp(await client.GET("/visitors/visits/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "visit", "GET /visitors/visits/v1/{id}");
|
|
2065
2425
|
},
|
|
2066
2426
|
/** Create a visit */
|
|
2067
|
-
async create(
|
|
2068
|
-
return unwrapProp(await client.POST("/visitors/visits/v1", { body, signal: options?.signal }), "visit", "POST /visitors/visits/v1");
|
|
2427
|
+
async create(visit, options) {
|
|
2428
|
+
return unwrapProp(await client.POST("/visitors/visits/v1", { body: { visit }, signal: options?.signal }), "visit", "POST /visitors/visits/v1");
|
|
2069
2429
|
},
|
|
2070
2430
|
/**
|
|
2071
2431
|
* Update a visit
|
|
2072
2432
|
*
|
|
2073
2433
|
* Update a visit by id.
|
|
2434
|
+
*
|
|
2435
|
+
* @param id The id of the visit
|
|
2436
|
+
* @param visit The `visit` payload.
|
|
2437
|
+
* @param options Request options (abort signal).
|
|
2074
2438
|
*/
|
|
2075
|
-
async update(id,
|
|
2076
|
-
return unwrapProp(await client.PUT("/visitors/visits/v1/{id}", { params: { path: { id } }, body, signal: options?.signal }), "visit", "PUT /visitors/visits/v1/{id}");
|
|
2439
|
+
async update(id, visit, options) {
|
|
2440
|
+
return unwrapProp(await client.PUT("/visitors/visits/v1/{id}", { params: { path: { id } }, body: { visit }, signal: options?.signal }), "visit", "PUT /visitors/visits/v1/{id}");
|
|
2077
2441
|
},
|
|
2078
2442
|
/**
|
|
2079
2443
|
* Delete a visit
|
|
2080
2444
|
*
|
|
2081
2445
|
* Delete a visit by id.
|
|
2446
|
+
*
|
|
2447
|
+
* @param id The id of the visit
|
|
2448
|
+
* @param options Request options (abort signal).
|
|
2082
2449
|
*/
|
|
2083
2450
|
async delete(id, options) {
|
|
2084
2451
|
return unwrap(await client.DELETE("/visitors/visits/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /visitors/visits/v1/{id}");
|