@izak0s/spacebring-api 1.11.1 → 1.12.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/dist/index.cjs +507 -140
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +106 -106
- package/dist/index.d.ts +106 -106
- package/dist/index.js +507 -140
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -572,14 +572,25 @@ function createAltcurrencies(client, defaults) {
|
|
|
572
572
|
);
|
|
573
573
|
},
|
|
574
574
|
/** Create an alternative currency */
|
|
575
|
-
async create(
|
|
576
|
-
return unwrapProp(await client.POST("/alt_currencies/v1", { body, signal: options?.signal }), "altCurrency", "POST /alt_currencies/v1");
|
|
575
|
+
async create(altCurrency, options) {
|
|
576
|
+
return unwrapProp(await client.POST("/alt_currencies/v1", { body: { altCurrency }, signal: options?.signal }), "altCurrency", "POST /alt_currencies/v1");
|
|
577
577
|
},
|
|
578
|
-
/**
|
|
579
|
-
|
|
580
|
-
|
|
578
|
+
/**
|
|
579
|
+
* Update an alternative currency
|
|
580
|
+
*
|
|
581
|
+
* @param id The id of the alternative currency
|
|
582
|
+
* @param altCurrency The `altCurrency` payload.
|
|
583
|
+
* @param options Request options (abort signal).
|
|
584
|
+
*/
|
|
585
|
+
async update(id, altCurrency, options) {
|
|
586
|
+
return unwrap(await client.PATCH("/alt_currencies/v1/{id}", { params: { path: { id } }, body: { altCurrency }, signal: options?.signal }), "PATCH /alt_currencies/v1/{id}");
|
|
581
587
|
},
|
|
582
|
-
/**
|
|
588
|
+
/**
|
|
589
|
+
* Delete an alternative currency
|
|
590
|
+
*
|
|
591
|
+
* @param id The id of the alternative currency
|
|
592
|
+
* @param options Request options (abort signal).
|
|
593
|
+
*/
|
|
583
594
|
async delete(id, options) {
|
|
584
595
|
return unwrap(await client.DELETE("/alt_currencies/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /alt_currencies/v1/{id}");
|
|
585
596
|
}
|
|
@@ -608,19 +619,35 @@ function createBenefits(client, defaults) {
|
|
|
608
619
|
"benefits"
|
|
609
620
|
);
|
|
610
621
|
},
|
|
611
|
-
/**
|
|
622
|
+
/**
|
|
623
|
+
* Retrieve a benefit
|
|
624
|
+
*
|
|
625
|
+
* @param benefitId The id of the benefit.
|
|
626
|
+
* @param options Request options (abort signal).
|
|
627
|
+
*/
|
|
612
628
|
async get(benefitId, options) {
|
|
613
629
|
return unwrapProp(await client.GET("/benefits/v1/{benefitId}", { params: { path: { benefitId } }, signal: options?.signal }), "benefit", "GET /benefits/v1/{benefitId}");
|
|
614
630
|
},
|
|
615
631
|
/** Create a benefit */
|
|
616
|
-
async create(
|
|
617
|
-
return unwrap(await client.POST("/benefits/v1", { body, signal: options?.signal }), "POST /benefits/v1");
|
|
632
|
+
async create(benefit, options) {
|
|
633
|
+
return unwrap(await client.POST("/benefits/v1", { body: { benefit }, signal: options?.signal }), "POST /benefits/v1");
|
|
618
634
|
},
|
|
619
|
-
/**
|
|
620
|
-
|
|
621
|
-
|
|
635
|
+
/**
|
|
636
|
+
* Update a benefit
|
|
637
|
+
*
|
|
638
|
+
* @param benefitId The id of the benefit
|
|
639
|
+
* @param benefit The `benefit` payload.
|
|
640
|
+
* @param options Request options (abort signal).
|
|
641
|
+
*/
|
|
642
|
+
async update(benefitId, benefit, options) {
|
|
643
|
+
return unwrapProp(await client.PUT("/benefits/v1/{benefitId}", { params: { path: { benefitId } }, body: { benefit }, signal: options?.signal }), "benefit", "PUT /benefits/v1/{benefitId}");
|
|
622
644
|
},
|
|
623
|
-
/**
|
|
645
|
+
/**
|
|
646
|
+
* Delete a benefit
|
|
647
|
+
*
|
|
648
|
+
* @param benefitId The id of the benefit
|
|
649
|
+
* @param options Request options (abort signal).
|
|
650
|
+
*/
|
|
624
651
|
async delete(benefitId, options) {
|
|
625
652
|
return unwrap(await client.DELETE("/benefits/v1/{benefitId}", { params: { path: { benefitId } }, signal: options?.signal }), "DELETE /benefits/v1/{benefitId}");
|
|
626
653
|
},
|
|
@@ -648,13 +675,16 @@ function createBenefits(client, defaults) {
|
|
|
648
675
|
* Retrieve an application
|
|
649
676
|
*
|
|
650
677
|
* Retrieve a benefit application by id.
|
|
678
|
+
*
|
|
679
|
+
* @param benefitApplicationId The id of the benefit application.
|
|
680
|
+
* @param options Request options (abort signal).
|
|
651
681
|
*/
|
|
652
682
|
async get(benefitApplicationId, options) {
|
|
653
683
|
return unwrapProp(await client.GET("/benefits/applications/v1/{benefitApplicationId}", { params: { path: { benefitApplicationId } }, signal: options?.signal }), "application", "GET /benefits/applications/v1/{benefitApplicationId}");
|
|
654
684
|
},
|
|
655
685
|
/** Apply for a benefit */
|
|
656
|
-
async create(
|
|
657
|
-
return unwrapProp(await client.POST("/benefits/applications/v1", { body, signal: options?.signal }), "application", "POST /benefits/applications/v1");
|
|
686
|
+
async create(application, options) {
|
|
687
|
+
return unwrapProp(await client.POST("/benefits/applications/v1", { body: { application }, signal: options?.signal }), "application", "POST /benefits/applications/v1");
|
|
658
688
|
}
|
|
659
689
|
},
|
|
660
690
|
categories: {
|
|
@@ -670,6 +700,9 @@ function createBenefits(client, defaults) {
|
|
|
670
700
|
* Get a category
|
|
671
701
|
*
|
|
672
702
|
* Get a benefit category.
|
|
703
|
+
*
|
|
704
|
+
* @param categoryId The id of the benefit category.
|
|
705
|
+
* @param options Request options (abort signal).
|
|
673
706
|
*/
|
|
674
707
|
async get(categoryId, options) {
|
|
675
708
|
return unwrapProp(await client.GET("/benefits/categories/v1/{categoryId}", { params: { path: { categoryId } }, signal: options?.signal }), "category", "GET /benefits/categories/v1/{categoryId}");
|
|
@@ -679,21 +712,28 @@ function createBenefits(client, defaults) {
|
|
|
679
712
|
*
|
|
680
713
|
* Create a benefit category.
|
|
681
714
|
*/
|
|
682
|
-
async create(
|
|
683
|
-
return unwrapProp(await client.POST("/benefits/categories/v1", { body, signal: options?.signal }), "category", "POST /benefits/categories/v1");
|
|
715
|
+
async create(category, options) {
|
|
716
|
+
return unwrapProp(await client.POST("/benefits/categories/v1", { body: { category }, signal: options?.signal }), "category", "POST /benefits/categories/v1");
|
|
684
717
|
},
|
|
685
718
|
/**
|
|
686
719
|
* Update a category
|
|
687
720
|
*
|
|
688
721
|
* Update a benefit category.
|
|
722
|
+
*
|
|
723
|
+
* @param categoryId The id of the benefit category
|
|
724
|
+
* @param category The `category` payload.
|
|
725
|
+
* @param options Request options (abort signal).
|
|
689
726
|
*/
|
|
690
|
-
async update(categoryId,
|
|
691
|
-
return unwrapProp(await client.PUT("/benefits/categories/v1/{categoryId}", { params: { path: { categoryId } }, body, signal: options?.signal }), "category", "PUT /benefits/categories/v1/{categoryId}");
|
|
727
|
+
async update(categoryId, category, options) {
|
|
728
|
+
return unwrapProp(await client.PUT("/benefits/categories/v1/{categoryId}", { params: { path: { categoryId } }, body: { category }, signal: options?.signal }), "category", "PUT /benefits/categories/v1/{categoryId}");
|
|
692
729
|
},
|
|
693
730
|
/**
|
|
694
731
|
* Delete a category
|
|
695
732
|
*
|
|
696
733
|
* Delete a benefit category.
|
|
734
|
+
*
|
|
735
|
+
* @param categoryId The id of the benefit category
|
|
736
|
+
* @param options Request options (abort signal).
|
|
697
737
|
*/
|
|
698
738
|
async delete(categoryId, options) {
|
|
699
739
|
return unwrap(await client.DELETE("/benefits/categories/v1/{categoryId}", { params: { path: { categoryId } }, signal: options?.signal }), "DELETE /benefits/categories/v1/{categoryId}");
|
|
@@ -729,6 +769,9 @@ function createBilling(client, defaults) {
|
|
|
729
769
|
* Retrieve a credit note
|
|
730
770
|
*
|
|
731
771
|
* Retrieve a specific credit note.
|
|
772
|
+
*
|
|
773
|
+
* @param id The id of the credit note
|
|
774
|
+
* @param options Request options (abort signal).
|
|
732
775
|
*/
|
|
733
776
|
async get(id, options) {
|
|
734
777
|
return unwrapProp(await client.GET("/billing/credit_notes/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "creditNote", "GET /billing/credit_notes/v1/{id}");
|
|
@@ -738,20 +781,26 @@ function createBilling(client, defaults) {
|
|
|
738
781
|
*
|
|
739
782
|
* Create a credit note for an invoice.
|
|
740
783
|
*/
|
|
741
|
-
async create(
|
|
742
|
-
return unwrapProp(await client.POST("/billing/credit_notes/v1", { body, signal: options?.signal }), "creditNote", "POST /billing/credit_notes/v1");
|
|
784
|
+
async create(creditNote, options) {
|
|
785
|
+
return unwrapProp(await client.POST("/billing/credit_notes/v1", { body: { creditNote }, signal: options?.signal }), "creditNote", "POST /billing/credit_notes/v1");
|
|
743
786
|
},
|
|
744
|
-
/**
|
|
745
|
-
|
|
746
|
-
|
|
787
|
+
/**
|
|
788
|
+
* Update a credit note
|
|
789
|
+
*
|
|
790
|
+
* @param id The id of the credit note
|
|
791
|
+
* @param creditNote The `creditNote` payload.
|
|
792
|
+
* @param options Request options (abort signal).
|
|
793
|
+
*/
|
|
794
|
+
async update(id, creditNote, options) {
|
|
795
|
+
return unwrap(await client.PATCH("/billing/credit_notes/v1/{id}", { params: { path: { id } }, body: { creditNote }, signal: options?.signal }), "PATCH /billing/credit_notes/v1/{id}");
|
|
747
796
|
},
|
|
748
797
|
/**
|
|
749
798
|
* Preview a credit note
|
|
750
799
|
*
|
|
751
800
|
* Preview a credit note for an invoice without creating it.
|
|
752
801
|
*/
|
|
753
|
-
async preview(
|
|
754
|
-
return unwrapProp(await client.POST("/billing/credit_notes/v1/preview", { body, signal: options?.signal }), "creditNote", "POST /billing/credit_notes/v1/preview");
|
|
802
|
+
async preview(creditNote, options) {
|
|
803
|
+
return unwrapProp(await client.POST("/billing/credit_notes/v1/preview", { body: { creditNote }, signal: options?.signal }), "creditNote", "POST /billing/credit_notes/v1/preview");
|
|
755
804
|
}
|
|
756
805
|
},
|
|
757
806
|
invoices: {
|
|
@@ -778,6 +827,9 @@ function createBilling(client, defaults) {
|
|
|
778
827
|
* Retrieve an invoice
|
|
779
828
|
*
|
|
780
829
|
* Retrieve a certain invoice.
|
|
830
|
+
*
|
|
831
|
+
* @param invoiceId The id of the invoice.
|
|
832
|
+
* @param options Request options (abort signal).
|
|
781
833
|
*/
|
|
782
834
|
async get(invoiceId, options) {
|
|
783
835
|
return unwrapProp(await client.GET("/billing/invoices/v1/{invoiceId}", { params: { path: { invoiceId } }, signal: options?.signal }), "invoice", "GET /billing/invoices/v1/{invoiceId}");
|
|
@@ -794,14 +846,21 @@ function createBilling(client, defaults) {
|
|
|
794
846
|
* Update an invoice
|
|
795
847
|
*
|
|
796
848
|
* Update a draft invoice.
|
|
849
|
+
*
|
|
850
|
+
* @param invoiceId The id of an invoice.
|
|
851
|
+
* @param invoice The `invoice` payload.
|
|
852
|
+
* @param options Request options (abort signal).
|
|
797
853
|
*/
|
|
798
|
-
async update(invoiceId,
|
|
799
|
-
return unwrap(await client.PATCH("/billing/invoices/v1/{invoiceId}", { params: { path: { invoiceId } }, body, signal: options?.signal }), "PATCH /billing/invoices/v1/{invoiceId}");
|
|
854
|
+
async update(invoiceId, invoice, options) {
|
|
855
|
+
return unwrap(await client.PATCH("/billing/invoices/v1/{invoiceId}", { params: { path: { invoiceId } }, body: { invoice }, signal: options?.signal }), "PATCH /billing/invoices/v1/{invoiceId}");
|
|
800
856
|
},
|
|
801
857
|
/**
|
|
802
858
|
* Delete an invoice
|
|
803
859
|
*
|
|
804
860
|
* Delete a draft invoice.
|
|
861
|
+
*
|
|
862
|
+
* @param invoiceId The id of an invoice.
|
|
863
|
+
* @param options Request options (abort signal).
|
|
805
864
|
*/
|
|
806
865
|
async delete(invoiceId, options) {
|
|
807
866
|
return unwrap(await client.DELETE("/billing/invoices/v1/{invoiceId}", { params: { path: { invoiceId } }, signal: options?.signal }), "DELETE /billing/invoices/v1/{invoiceId}");
|
|
@@ -810,6 +869,9 @@ function createBilling(client, defaults) {
|
|
|
810
869
|
* Cancel a payment
|
|
811
870
|
*
|
|
812
871
|
* Cancel a payment on an invoice.
|
|
872
|
+
*
|
|
873
|
+
* @param invoiceId The id of an invoice.
|
|
874
|
+
* @param options Request options (abort signal).
|
|
813
875
|
*/
|
|
814
876
|
async cancelPayment(invoiceId, options) {
|
|
815
877
|
return unwrap(await client.POST("/billing/invoices/v1/{invoiceId}/cancel_payment", { params: { path: { invoiceId } }, signal: options?.signal }), "POST /billing/invoices/v1/{invoiceId}/cancel_payment");
|
|
@@ -818,6 +880,9 @@ function createBilling(client, defaults) {
|
|
|
818
880
|
* Duplicate an invoice
|
|
819
881
|
*
|
|
820
882
|
* Duplicate an invoice, creating a new draft invoice with the same items.
|
|
883
|
+
*
|
|
884
|
+
* @param invoiceId The id of an invoice.
|
|
885
|
+
* @param options Request options (abort signal).
|
|
821
886
|
*/
|
|
822
887
|
async duplicate(invoiceId, options) {
|
|
823
888
|
return unwrapProp(await client.POST("/billing/invoices/v1/{invoiceId}/duplicate", { params: { path: { invoiceId } }, signal: options?.signal }), "invoice", "POST /billing/invoices/v1/{invoiceId}/duplicate");
|
|
@@ -826,6 +891,9 @@ function createBilling(client, defaults) {
|
|
|
826
891
|
* List invoice items
|
|
827
892
|
*
|
|
828
893
|
* List all items for a specific invoice.
|
|
894
|
+
*
|
|
895
|
+
* @param invoiceId The id of an invoice.
|
|
896
|
+
* @param options Request options (abort signal).
|
|
829
897
|
*/
|
|
830
898
|
async getItems(invoiceId, options) {
|
|
831
899
|
return unwrap(await client.GET("/billing/invoices/v1/{invoiceId}/items", { params: { path: { invoiceId } }, signal: options?.signal }), "GET /billing/invoices/v1/{invoiceId}/items");
|
|
@@ -842,14 +910,22 @@ function createBilling(client, defaults) {
|
|
|
842
910
|
* Issue an invoice
|
|
843
911
|
*
|
|
844
912
|
* Issue (finalize) a draft invoice, making it ready for payment.
|
|
913
|
+
*
|
|
914
|
+
* @param invoiceId The id of an invoice.
|
|
915
|
+
* @param skipAutoCharge The `skipAutoCharge` payload.
|
|
916
|
+
* @param options Request options (abort signal).
|
|
845
917
|
*/
|
|
846
|
-
async issue(invoiceId,
|
|
847
|
-
return unwrap(await client.POST("/billing/invoices/v1/{invoiceId}/issue", { params: { path: { invoiceId } }, body, signal: options?.signal }), "POST /billing/invoices/v1/{invoiceId}/issue");
|
|
918
|
+
async issue(invoiceId, skipAutoCharge, options) {
|
|
919
|
+
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");
|
|
848
920
|
},
|
|
849
921
|
/**
|
|
850
922
|
* Pay an invoice
|
|
851
923
|
*
|
|
852
924
|
* Mark an invoice as paid by `External Payment`.
|
|
925
|
+
*
|
|
926
|
+
* @param invoiceId The id of an invoice
|
|
927
|
+
* @param body Request body.
|
|
928
|
+
* @param options Request options (abort signal).
|
|
853
929
|
*/
|
|
854
930
|
async pay(invoiceId, body, options) {
|
|
855
931
|
return unwrap(await client.POST("/billing/invoices/v1/{invoiceId}/pay", { params: { path: { invoiceId } }, body, signal: options?.signal }), "POST /billing/invoices/v1/{invoiceId}/pay");
|
|
@@ -858,6 +934,9 @@ function createBilling(client, defaults) {
|
|
|
858
934
|
* Resend an invoice
|
|
859
935
|
*
|
|
860
936
|
* Resend an issued invoice notification to the customer.
|
|
937
|
+
*
|
|
938
|
+
* @param invoiceId The id of an invoice.
|
|
939
|
+
* @param options Request options (abort signal).
|
|
861
940
|
*/
|
|
862
941
|
async resend(invoiceId, options) {
|
|
863
942
|
return unwrap(await client.POST("/billing/invoices/v1/{invoiceId}/resend", { params: { path: { invoiceId } }, signal: options?.signal }), "POST /billing/invoices/v1/{invoiceId}/resend");
|
|
@@ -866,6 +945,9 @@ function createBilling(client, defaults) {
|
|
|
866
945
|
* Void an invoice
|
|
867
946
|
*
|
|
868
947
|
* Void an issued invoice.
|
|
948
|
+
*
|
|
949
|
+
* @param invoiceId The id of an invoice.
|
|
950
|
+
* @param options Request options (abort signal).
|
|
869
951
|
*/
|
|
870
952
|
async void(invoiceId, options) {
|
|
871
953
|
return unwrap(await client.PATCH("/billing/invoices/v1/{invoiceId}/void", { params: { path: { invoiceId } }, signal: options?.signal }), "PATCH /billing/invoices/v1/{invoiceId}/void");
|
|
@@ -894,6 +976,9 @@ function createBilling(client, defaults) {
|
|
|
894
976
|
* Retrieve an invoice item
|
|
895
977
|
*
|
|
896
978
|
* Retrieve a specific invoice item.
|
|
979
|
+
*
|
|
980
|
+
* @param id The id of an invoice item.
|
|
981
|
+
* @param options Request options (abort signal).
|
|
897
982
|
*/
|
|
898
983
|
async get(id, options) {
|
|
899
984
|
return unwrapProp(await client.GET("/billing/invoices/v1/items/{id}", { params: { path: { id } }, signal: options?.signal }), "invoiceItem", "GET /billing/invoices/v1/items/{id}");
|
|
@@ -903,21 +988,28 @@ function createBilling(client, defaults) {
|
|
|
903
988
|
*
|
|
904
989
|
* Create an item in an invoice.
|
|
905
990
|
*/
|
|
906
|
-
async create(
|
|
907
|
-
return unwrapProp(await client.POST("/billing/invoices/v1/items", { body, signal: options?.signal }), "invoiceItem", "POST /billing/invoices/v1/items");
|
|
991
|
+
async create(invoiceItem, options) {
|
|
992
|
+
return unwrapProp(await client.POST("/billing/invoices/v1/items", { body: { invoiceItem }, signal: options?.signal }), "invoiceItem", "POST /billing/invoices/v1/items");
|
|
908
993
|
},
|
|
909
994
|
/**
|
|
910
995
|
* Update an invoice item
|
|
911
996
|
*
|
|
912
997
|
* Update an invoice item on a draft invoice.
|
|
998
|
+
*
|
|
999
|
+
* @param id The id of an invoice item.
|
|
1000
|
+
* @param invoiceItem The `invoiceItem` payload.
|
|
1001
|
+
* @param options Request options (abort signal).
|
|
913
1002
|
*/
|
|
914
|
-
async update(id,
|
|
915
|
-
return unwrap(await client.PATCH("/billing/invoices/v1/items/{id}", { params: { path: { id } }, body, signal: options?.signal }), "PATCH /billing/invoices/v1/items/{id}");
|
|
1003
|
+
async update(id, invoiceItem, options) {
|
|
1004
|
+
return unwrap(await client.PATCH("/billing/invoices/v1/items/{id}", { params: { path: { id } }, body: { invoiceItem }, signal: options?.signal }), "PATCH /billing/invoices/v1/items/{id}");
|
|
916
1005
|
},
|
|
917
1006
|
/**
|
|
918
1007
|
* Delete an invoice item
|
|
919
1008
|
*
|
|
920
1009
|
* Delete an invoice item from a draft invoice.
|
|
1010
|
+
*
|
|
1011
|
+
* @param id The id of an invoice item.
|
|
1012
|
+
* @param options Request options (abort signal).
|
|
921
1013
|
*/
|
|
922
1014
|
async delete(id, options) {
|
|
923
1015
|
return unwrap(await client.DELETE("/billing/invoices/v1/items/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /billing/invoices/v1/items/{id}");
|
|
@@ -958,21 +1050,28 @@ function createCommunity(client, defaults) {
|
|
|
958
1050
|
* Retrieve a company
|
|
959
1051
|
*
|
|
960
1052
|
* Retrieve a certain company.
|
|
1053
|
+
*
|
|
1054
|
+
* @param id The id of company.
|
|
1055
|
+
* @param options Request options (abort signal).
|
|
961
1056
|
*/
|
|
962
1057
|
async get(id, options) {
|
|
963
1058
|
return unwrapProp(await client.GET("/community/companies/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "company", "GET /community/companies/v1/{id}");
|
|
964
1059
|
},
|
|
965
1060
|
/** Create a company */
|
|
966
|
-
async create(
|
|
967
|
-
return unwrapProp(await client.POST("/community/companies/v1", { body, signal: options?.signal }), "company", "POST /community/companies/v1");
|
|
1061
|
+
async create(company, options) {
|
|
1062
|
+
return unwrapProp(await client.POST("/community/companies/v1", { body: { company }, signal: options?.signal }), "company", "POST /community/companies/v1");
|
|
968
1063
|
},
|
|
969
1064
|
/**
|
|
970
1065
|
* Update a company
|
|
971
1066
|
*
|
|
972
1067
|
* Update a certain company.
|
|
1068
|
+
*
|
|
1069
|
+
* @param id The id of the company.
|
|
1070
|
+
* @param company The `company` payload.
|
|
1071
|
+
* @param options Request options (abort signal).
|
|
973
1072
|
*/
|
|
974
|
-
async update(id,
|
|
975
|
-
return unwrapProp(await client.PUT("/community/companies/v1/{id}", { params: { path: { id } }, body, signal: options?.signal }), "company", "PUT /community/companies/v1/{id}");
|
|
1073
|
+
async update(id, company, options) {
|
|
1074
|
+
return unwrapProp(await client.PUT("/community/companies/v1/{id}", { params: { path: { id } }, body: { company }, signal: options?.signal }), "company", "PUT /community/companies/v1/{id}");
|
|
976
1075
|
}
|
|
977
1076
|
},
|
|
978
1077
|
memberships: {
|
|
@@ -999,6 +1098,9 @@ function createCommunity(client, defaults) {
|
|
|
999
1098
|
* Retrieve a membership
|
|
1000
1099
|
*
|
|
1001
1100
|
* Retrieve a certain membership.
|
|
1101
|
+
*
|
|
1102
|
+
* @param id The id of membership.
|
|
1103
|
+
* @param options Request options (abort signal).
|
|
1002
1104
|
*/
|
|
1003
1105
|
async get(id, options) {
|
|
1004
1106
|
return unwrapProp(await client.GET("/community/memberships/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "membership", "GET /community/memberships/v1/{id}");
|
|
@@ -1015,14 +1117,21 @@ function createCommunity(client, defaults) {
|
|
|
1015
1117
|
* Update a membership
|
|
1016
1118
|
*
|
|
1017
1119
|
* Update a certain membership.
|
|
1120
|
+
*
|
|
1121
|
+
* @param id The id of the membership.
|
|
1122
|
+
* @param membership The `membership` payload.
|
|
1123
|
+
* @param options Request options (abort signal).
|
|
1018
1124
|
*/
|
|
1019
|
-
async update(id,
|
|
1020
|
-
return unwrapProp(await client.PUT("/community/memberships/v1/{id}", { params: { path: { id } }, body, signal: options?.signal }), "membership", "PUT /community/memberships/v1/{id}");
|
|
1125
|
+
async update(id, membership, options) {
|
|
1126
|
+
return unwrapProp(await client.PUT("/community/memberships/v1/{id}", { params: { path: { id } }, body: { membership }, signal: options?.signal }), "membership", "PUT /community/memberships/v1/{id}");
|
|
1021
1127
|
},
|
|
1022
1128
|
/**
|
|
1023
1129
|
* Delete a membership
|
|
1024
1130
|
*
|
|
1025
1131
|
* Delete a certain membership.
|
|
1132
|
+
*
|
|
1133
|
+
* @param id The id of the membership.
|
|
1134
|
+
* @param options Request options (abort signal).
|
|
1026
1135
|
*/
|
|
1027
1136
|
async delete(id, options) {
|
|
1028
1137
|
return unwrap(await client.DELETE("/community/memberships/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /community/memberships/v1/{id}");
|
|
@@ -1072,25 +1181,47 @@ function createContracts(client, defaults) {
|
|
|
1072
1181
|
"contracts"
|
|
1073
1182
|
);
|
|
1074
1183
|
},
|
|
1075
|
-
/**
|
|
1184
|
+
/**
|
|
1185
|
+
* Get a contract
|
|
1186
|
+
*
|
|
1187
|
+
* @param contractId The id of the contract.
|
|
1188
|
+
* @param options Request options (abort signal).
|
|
1189
|
+
*/
|
|
1076
1190
|
async get(contractId, options) {
|
|
1077
1191
|
return unwrapProp(await client.GET("/contracts/v1/{contractId}", { params: { path: { contractId } }, signal: options?.signal }), "contract", "GET /contracts/v1/{contractId}");
|
|
1078
1192
|
},
|
|
1079
1193
|
/** Create a contract */
|
|
1080
|
-
async create(
|
|
1081
|
-
return unwrapProp(await client.POST("/contracts/v1", { body, signal: options?.signal }), "contract", "POST /contracts/v1");
|
|
1194
|
+
async create(contract, options) {
|
|
1195
|
+
return unwrapProp(await client.POST("/contracts/v1", { body: { contract }, signal: options?.signal }), "contract", "POST /contracts/v1");
|
|
1082
1196
|
},
|
|
1083
|
-
/**
|
|
1197
|
+
/**
|
|
1198
|
+
* Delete a contract
|
|
1199
|
+
*
|
|
1200
|
+
* @param contractId The id of the contract.
|
|
1201
|
+
* @param options Request options (abort signal).
|
|
1202
|
+
*/
|
|
1084
1203
|
async delete(contractId, options) {
|
|
1085
1204
|
return unwrap(await client.DELETE("/contracts/v1/{contractId}", { params: { path: { contractId } }, signal: options?.signal }), "DELETE /contracts/v1/{contractId}");
|
|
1086
1205
|
},
|
|
1087
|
-
/**
|
|
1088
|
-
|
|
1089
|
-
|
|
1206
|
+
/**
|
|
1207
|
+
* Issue a contract
|
|
1208
|
+
*
|
|
1209
|
+
* @param contractId The id of the contract.
|
|
1210
|
+
* @param signatureMethod The `signatureMethod` payload.
|
|
1211
|
+
* @param options Request options (abort signal).
|
|
1212
|
+
*/
|
|
1213
|
+
async issue(contractId, signatureMethod, options) {
|
|
1214
|
+
return unwrapProp(await client.POST("/contracts/v1/{contractId}/issue", { params: { path: { contractId } }, body: { signatureMethod }, signal: options?.signal }), "contract", "POST /contracts/v1/{contractId}/issue");
|
|
1090
1215
|
},
|
|
1091
|
-
/**
|
|
1092
|
-
|
|
1093
|
-
|
|
1216
|
+
/**
|
|
1217
|
+
* Terminate a contract
|
|
1218
|
+
*
|
|
1219
|
+
* @param contractId The id of the contract.
|
|
1220
|
+
* @param reason The `reason` payload.
|
|
1221
|
+
* @param options Request options (abort signal).
|
|
1222
|
+
*/
|
|
1223
|
+
async terminate(contractId, reason, options) {
|
|
1224
|
+
return unwrap(await client.PATCH("/contracts/v1/{contractId}/terminate", { params: { path: { contractId } }, body: { reason }, signal: options?.signal }), "PATCH /contracts/v1/{contractId}/terminate");
|
|
1094
1225
|
}
|
|
1095
1226
|
};
|
|
1096
1227
|
}
|
|
@@ -1118,19 +1249,35 @@ function createDiscounts(client, defaults) {
|
|
|
1118
1249
|
"coupons"
|
|
1119
1250
|
);
|
|
1120
1251
|
},
|
|
1121
|
-
/**
|
|
1252
|
+
/**
|
|
1253
|
+
* Get a coupon
|
|
1254
|
+
*
|
|
1255
|
+
* @param id The id of the coupon
|
|
1256
|
+
* @param options Request options (abort signal).
|
|
1257
|
+
*/
|
|
1122
1258
|
async get(id, options) {
|
|
1123
1259
|
return unwrapProp(await client.GET("/discounts/coupons/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "coupon", "GET /discounts/coupons/v1/{id}");
|
|
1124
1260
|
},
|
|
1125
1261
|
/** Create a coupon */
|
|
1126
|
-
async create(
|
|
1127
|
-
return unwrapProp(await client.POST("/discounts/coupons/v1", { body, signal: options?.signal }), "coupon", "POST /discounts/coupons/v1");
|
|
1262
|
+
async create(coupon, options) {
|
|
1263
|
+
return unwrapProp(await client.POST("/discounts/coupons/v1", { body: { coupon }, signal: options?.signal }), "coupon", "POST /discounts/coupons/v1");
|
|
1128
1264
|
},
|
|
1129
|
-
/**
|
|
1130
|
-
|
|
1131
|
-
|
|
1265
|
+
/**
|
|
1266
|
+
* Update a coupon
|
|
1267
|
+
*
|
|
1268
|
+
* @param id The id of the coupon
|
|
1269
|
+
* @param coupon The `coupon` payload.
|
|
1270
|
+
* @param options Request options (abort signal).
|
|
1271
|
+
*/
|
|
1272
|
+
async update(id, coupon, options) {
|
|
1273
|
+
return unwrap(await client.PATCH("/discounts/coupons/v1/{id}", { params: { path: { id } }, body: { coupon }, signal: options?.signal }), "PATCH /discounts/coupons/v1/{id}");
|
|
1132
1274
|
},
|
|
1133
|
-
/**
|
|
1275
|
+
/**
|
|
1276
|
+
* Delete a coupon
|
|
1277
|
+
*
|
|
1278
|
+
* @param id The id of the coupon
|
|
1279
|
+
* @param options Request options (abort signal).
|
|
1280
|
+
*/
|
|
1134
1281
|
async delete(id, options) {
|
|
1135
1282
|
return unwrap(await client.DELETE("/discounts/coupons/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /discounts/coupons/v1/{id}");
|
|
1136
1283
|
}
|
|
@@ -1144,15 +1291,25 @@ function createDiscounts(client, defaults) {
|
|
|
1144
1291
|
async list(query, options) {
|
|
1145
1292
|
return unwrapProp(await client.GET("/discounts/promocodes/v1", { params: { query }, signal: options?.signal }), "promocodes", "GET /discounts/promocodes/v1");
|
|
1146
1293
|
},
|
|
1147
|
-
/**
|
|
1294
|
+
/**
|
|
1295
|
+
* Get a promocode
|
|
1296
|
+
*
|
|
1297
|
+
* @param id The id of the promocode
|
|
1298
|
+
* @param options Request options (abort signal).
|
|
1299
|
+
*/
|
|
1148
1300
|
async get(id, options) {
|
|
1149
1301
|
return unwrapProp(await client.GET("/discounts/promocodes/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "promocode", "GET /discounts/promocodes/v1/{id}");
|
|
1150
1302
|
},
|
|
1151
1303
|
/** Create a promocode */
|
|
1152
|
-
async create(
|
|
1153
|
-
return unwrapProp(await client.POST("/discounts/promocodes/v1", { body, signal: options?.signal }), "promocode", "POST /discounts/promocodes/v1");
|
|
1304
|
+
async create(promocode, options) {
|
|
1305
|
+
return unwrapProp(await client.POST("/discounts/promocodes/v1", { body: { promocode }, signal: options?.signal }), "promocode", "POST /discounts/promocodes/v1");
|
|
1154
1306
|
},
|
|
1155
|
-
/**
|
|
1307
|
+
/**
|
|
1308
|
+
* Archive a promocode
|
|
1309
|
+
*
|
|
1310
|
+
* @param id The id of the promocode
|
|
1311
|
+
* @param options Request options (abort signal).
|
|
1312
|
+
*/
|
|
1156
1313
|
async archive(id, options) {
|
|
1157
1314
|
return unwrapProp(await client.PUT("/discounts/promocodes/v1/{id}/archive", { params: { path: { id } }, signal: options?.signal }), "promocode", "PUT /discounts/promocodes/v1/{id}/archive");
|
|
1158
1315
|
}
|
|
@@ -1193,8 +1350,8 @@ function createEvents(client, defaults) {
|
|
|
1193
1350
|
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}");
|
|
1194
1351
|
},
|
|
1195
1352
|
/** Create an event */
|
|
1196
|
-
async create(
|
|
1197
|
-
return unwrapProp(await client.POST("/events/v1", { body, signal: options?.signal }), "event", "POST /events/v1");
|
|
1353
|
+
async create(event, options) {
|
|
1354
|
+
return unwrapProp(await client.POST("/events/v1", { body: { event }, signal: options?.signal }), "event", "POST /events/v1");
|
|
1198
1355
|
},
|
|
1199
1356
|
/** Delete an event */
|
|
1200
1357
|
async delete(id, options) {
|
|
@@ -1232,6 +1389,9 @@ function createEvents(client, defaults) {
|
|
|
1232
1389
|
* Retrieve a ticket
|
|
1233
1390
|
*
|
|
1234
1391
|
* Retrieve an event ticket.
|
|
1392
|
+
*
|
|
1393
|
+
* @param id The id of the event ticket.
|
|
1394
|
+
* @param options Request options (abort signal).
|
|
1235
1395
|
*/
|
|
1236
1396
|
async get(id, options) {
|
|
1237
1397
|
return unwrapProp(await client.GET("/events/tickets/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "ticket", "GET /events/tickets/v1/{id}");
|
|
@@ -1249,18 +1409,33 @@ function createFeed(client, defaults) {
|
|
|
1249
1409
|
*
|
|
1250
1410
|
* Create a feed post comment.
|
|
1251
1411
|
*/
|
|
1252
|
-
async create(
|
|
1253
|
-
return unwrapProp(await client.POST("/feed/comments/v1", { body, signal: options?.signal }), "comment", "POST /feed/comments/v1");
|
|
1412
|
+
async create(comment, options) {
|
|
1413
|
+
return unwrapProp(await client.POST("/feed/comments/v1", { body: { comment }, signal: options?.signal }), "comment", "POST /feed/comments/v1");
|
|
1254
1414
|
},
|
|
1255
|
-
/**
|
|
1415
|
+
/**
|
|
1416
|
+
* Delete a post comment
|
|
1417
|
+
*
|
|
1418
|
+
* @param id The id of the post comment.
|
|
1419
|
+
* @param options Request options (abort signal).
|
|
1420
|
+
*/
|
|
1256
1421
|
async delete(id, options) {
|
|
1257
1422
|
return unwrap(await client.DELETE("/feed/comments/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /feed/comments/v1/{id}");
|
|
1258
1423
|
},
|
|
1259
|
-
/**
|
|
1424
|
+
/**
|
|
1425
|
+
* Create a like for a post comment
|
|
1426
|
+
*
|
|
1427
|
+
* @param id The id of the post comment.
|
|
1428
|
+
* @param options Request options (abort signal).
|
|
1429
|
+
*/
|
|
1260
1430
|
async createLike(id, options) {
|
|
1261
1431
|
return unwrapProp(await client.POST("/feed/comments/v1/{id}/likes", { params: { path: { id } }, signal: options?.signal }), "like", "POST /feed/comments/v1/{id}/likes");
|
|
1262
1432
|
},
|
|
1263
|
-
/**
|
|
1433
|
+
/**
|
|
1434
|
+
* Delete a like for a post comment
|
|
1435
|
+
*
|
|
1436
|
+
* @param id The id of the post comment.
|
|
1437
|
+
* @param options Request options (abort signal).
|
|
1438
|
+
*/
|
|
1264
1439
|
async deleteLike(id, options) {
|
|
1265
1440
|
return unwrap(await client.DELETE("/feed/comments/v1/{id}/likes", { params: { path: { id } }, signal: options?.signal }), "DELETE /feed/comments/v1/{id}/likes");
|
|
1266
1441
|
}
|
|
@@ -1289,6 +1464,9 @@ function createFeed(client, defaults) {
|
|
|
1289
1464
|
* Get a post
|
|
1290
1465
|
*
|
|
1291
1466
|
* Get a feed post.
|
|
1467
|
+
*
|
|
1468
|
+
* @param id The id of the post.
|
|
1469
|
+
* @param options Request options (abort signal).
|
|
1292
1470
|
*/
|
|
1293
1471
|
async get(id, options) {
|
|
1294
1472
|
return unwrapProp(await client.GET("/feed/posts/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "post", "GET /feed/posts/v1/{id}");
|
|
@@ -1298,38 +1476,65 @@ function createFeed(client, defaults) {
|
|
|
1298
1476
|
*
|
|
1299
1477
|
* Create a feed post.
|
|
1300
1478
|
*/
|
|
1301
|
-
async create(
|
|
1302
|
-
return unwrapProp(await client.POST("/feed/posts/v1", { body, signal: options?.signal }), "post", "POST /feed/posts/v1");
|
|
1479
|
+
async create(post, options) {
|
|
1480
|
+
return unwrapProp(await client.POST("/feed/posts/v1", { body: { post }, signal: options?.signal }), "post", "POST /feed/posts/v1");
|
|
1303
1481
|
},
|
|
1304
1482
|
/**
|
|
1305
1483
|
* Update a post
|
|
1306
1484
|
*
|
|
1307
1485
|
* Update a feed post.
|
|
1486
|
+
*
|
|
1487
|
+
* @param id The id of the post.
|
|
1488
|
+
* @param post The `post` payload.
|
|
1489
|
+
* @param options Request options (abort signal).
|
|
1308
1490
|
*/
|
|
1309
|
-
async update(id,
|
|
1310
|
-
return unwrapProp(await client.PUT("/feed/posts/v1/{id}", { params: { path: { id } }, body, signal: options?.signal }), "post", "PUT /feed/posts/v1/{id}");
|
|
1491
|
+
async update(id, post, options) {
|
|
1492
|
+
return unwrapProp(await client.PUT("/feed/posts/v1/{id}", { params: { path: { id } }, body: { post }, signal: options?.signal }), "post", "PUT /feed/posts/v1/{id}");
|
|
1311
1493
|
},
|
|
1312
1494
|
/**
|
|
1313
1495
|
* Delete a post
|
|
1314
1496
|
*
|
|
1315
1497
|
* Delete a feed post.
|
|
1498
|
+
*
|
|
1499
|
+
* @param id The id of the post.
|
|
1500
|
+
* @param options Request options (abort signal).
|
|
1316
1501
|
*/
|
|
1317
1502
|
async delete(id, options) {
|
|
1318
1503
|
return unwrap(await client.DELETE("/feed/posts/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /feed/posts/v1/{id}");
|
|
1319
1504
|
},
|
|
1320
|
-
/**
|
|
1505
|
+
/**
|
|
1506
|
+
* Create a like for a post
|
|
1507
|
+
*
|
|
1508
|
+
* @param id The id of the post.
|
|
1509
|
+
* @param options Request options (abort signal).
|
|
1510
|
+
*/
|
|
1321
1511
|
async createLike(id, options) {
|
|
1322
1512
|
return unwrapProp(await client.POST("/feed/posts/v1/{id}/likes", { params: { path: { id } }, signal: options?.signal }), "like", "POST /feed/posts/v1/{id}/likes");
|
|
1323
1513
|
},
|
|
1324
|
-
/**
|
|
1514
|
+
/**
|
|
1515
|
+
* Delete a like for a post
|
|
1516
|
+
*
|
|
1517
|
+
* @param id The id of the post.
|
|
1518
|
+
* @param options Request options (abort signal).
|
|
1519
|
+
*/
|
|
1325
1520
|
async deleteLike(id, options) {
|
|
1326
1521
|
return unwrap(await client.DELETE("/feed/posts/v1/{id}/likes", { params: { path: { id } }, signal: options?.signal }), "DELETE /feed/posts/v1/{id}/likes");
|
|
1327
1522
|
},
|
|
1328
|
-
/**
|
|
1523
|
+
/**
|
|
1524
|
+
* Get comments for a post
|
|
1525
|
+
*
|
|
1526
|
+
* @param id The id of the post.
|
|
1527
|
+
* @param options Request options (abort signal).
|
|
1528
|
+
*/
|
|
1329
1529
|
async getComments(id, options) {
|
|
1330
1530
|
return unwrapProp(await client.GET("/feed/posts/v1/{id}/comments", { params: { path: { id } }, signal: options?.signal }), "comments", "GET /feed/posts/v1/{id}/comments");
|
|
1331
1531
|
},
|
|
1332
|
-
/**
|
|
1532
|
+
/**
|
|
1533
|
+
* Get likes for a post
|
|
1534
|
+
*
|
|
1535
|
+
* @param id The id of the post.
|
|
1536
|
+
* @param options Request options (abort signal).
|
|
1537
|
+
*/
|
|
1333
1538
|
async getLikes(id, options) {
|
|
1334
1539
|
return unwrapProp(await client.GET("/feed/posts/v1/{id}/likes", { params: { path: { id } }, signal: options?.signal }), "likes", "GET /feed/posts/v1/{id}/likes");
|
|
1335
1540
|
}
|
|
@@ -1344,7 +1549,12 @@ function createFloors(client, defaults) {
|
|
|
1344
1549
|
async list(query, options) {
|
|
1345
1550
|
return unwrap(await client.GET("/floors/v1", { params: { query }, signal: options?.signal }), "GET /floors/v1");
|
|
1346
1551
|
},
|
|
1347
|
-
/**
|
|
1552
|
+
/**
|
|
1553
|
+
* Delete a floor
|
|
1554
|
+
*
|
|
1555
|
+
* @param id The id of the floor.
|
|
1556
|
+
* @param options Request options (abort signal).
|
|
1557
|
+
*/
|
|
1348
1558
|
async delete(id, options) {
|
|
1349
1559
|
return unwrap(await client.DELETE("/floors/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /floors/v1/{id}");
|
|
1350
1560
|
}
|
|
@@ -1377,6 +1587,9 @@ function createGuides(client, defaults) {
|
|
|
1377
1587
|
* Retrieve a guide
|
|
1378
1588
|
*
|
|
1379
1589
|
* Retrieve a guide by id.
|
|
1590
|
+
*
|
|
1591
|
+
* @param guideId The id of the guide.
|
|
1592
|
+
* @param options Request options (abort signal).
|
|
1380
1593
|
*/
|
|
1381
1594
|
async get(guideId, options) {
|
|
1382
1595
|
return unwrapProp(await client.GET("/guides/v1/{guideId}", { params: { path: { guideId } }, signal: options?.signal }), "guide", "GET /guides/v1/{guideId}");
|
|
@@ -1386,18 +1599,27 @@ function createGuides(client, defaults) {
|
|
|
1386
1599
|
*
|
|
1387
1600
|
* Create a guide in an organization.
|
|
1388
1601
|
*/
|
|
1389
|
-
async create(
|
|
1390
|
-
return unwrapProp(await client.POST("/guides/v1", { body, signal: options?.signal }), "guide", "POST /guides/v1");
|
|
1602
|
+
async create(guide, options) {
|
|
1603
|
+
return unwrapProp(await client.POST("/guides/v1", { body: { guide }, signal: options?.signal }), "guide", "POST /guides/v1");
|
|
1391
1604
|
},
|
|
1392
1605
|
/**
|
|
1393
1606
|
* Update a guide
|
|
1394
1607
|
*
|
|
1395
1608
|
* Update a guide. At least one guide property must be provided.
|
|
1609
|
+
*
|
|
1610
|
+
* @param guideId The id of the guide
|
|
1611
|
+
* @param guide The `guide` payload.
|
|
1612
|
+
* @param options Request options (abort signal).
|
|
1396
1613
|
*/
|
|
1397
|
-
async update(guideId,
|
|
1398
|
-
return unwrapProp(await client.PATCH("/guides/v1/{guideId}", { params: { path: { guideId } }, body, signal: options?.signal }), "guide", "PATCH /guides/v1/{guideId}");
|
|
1614
|
+
async update(guideId, guide, options) {
|
|
1615
|
+
return unwrapProp(await client.PATCH("/guides/v1/{guideId}", { params: { path: { guideId } }, body: { guide }, signal: options?.signal }), "guide", "PATCH /guides/v1/{guideId}");
|
|
1399
1616
|
},
|
|
1400
|
-
/**
|
|
1617
|
+
/**
|
|
1618
|
+
* Delete a guide
|
|
1619
|
+
*
|
|
1620
|
+
* @param guideId The id of the guide
|
|
1621
|
+
* @param options Request options (abort signal).
|
|
1622
|
+
*/
|
|
1401
1623
|
async delete(guideId, options) {
|
|
1402
1624
|
return unwrap(await client.DELETE("/guides/v1/{guideId}", { params: { path: { guideId } }, signal: options?.signal }), "DELETE /guides/v1/{guideId}");
|
|
1403
1625
|
}
|
|
@@ -1411,7 +1633,12 @@ function createLocations(client, defaults) {
|
|
|
1411
1633
|
async list(options) {
|
|
1412
1634
|
return unwrapProp(await client.GET("/locations/v1", { signal: options?.signal }), "locations", "GET /locations/v1");
|
|
1413
1635
|
},
|
|
1414
|
-
/**
|
|
1636
|
+
/**
|
|
1637
|
+
* Get a location
|
|
1638
|
+
*
|
|
1639
|
+
* @param locationId The id of the location.
|
|
1640
|
+
* @param options Request options (abort signal).
|
|
1641
|
+
*/
|
|
1415
1642
|
async get(locationId, options) {
|
|
1416
1643
|
return unwrapProp(await client.GET("/locations/v1/{locationId}", { params: { path: { locationId } }, signal: options?.signal }), "location", "GET /locations/v1/{locationId}");
|
|
1417
1644
|
}
|
|
@@ -1458,26 +1685,36 @@ function createPlans(client, defaults) {
|
|
|
1458
1685
|
* Retrieve a plan
|
|
1459
1686
|
*
|
|
1460
1687
|
* Retrieve a certain plan.
|
|
1688
|
+
*
|
|
1689
|
+
* @param planId The id of the plan.
|
|
1690
|
+
* @param options Request options (abort signal).
|
|
1461
1691
|
*/
|
|
1462
1692
|
async get(planId, options) {
|
|
1463
1693
|
return unwrapProp(await client.GET("/plans/v1/{planId}", { params: { path: { planId } }, signal: options?.signal }), "plan", "GET /plans/v1/{planId}");
|
|
1464
1694
|
},
|
|
1465
1695
|
/** Create a plan */
|
|
1466
|
-
async create(
|
|
1467
|
-
return unwrapProp(await client.POST("/plans/v1", { body, signal: options?.signal }), "plan", "POST /plans/v1");
|
|
1696
|
+
async create(plan, options) {
|
|
1697
|
+
return unwrapProp(await client.POST("/plans/v1", { body: { plan }, signal: options?.signal }), "plan", "POST /plans/v1");
|
|
1468
1698
|
},
|
|
1469
1699
|
/**
|
|
1470
1700
|
* Update a plan
|
|
1471
1701
|
*
|
|
1472
1702
|
* Update a certain plan.
|
|
1703
|
+
*
|
|
1704
|
+
* @param planId The id of the plan.
|
|
1705
|
+
* @param plan The `plan` payload.
|
|
1706
|
+
* @param options Request options (abort signal).
|
|
1473
1707
|
*/
|
|
1474
|
-
async update(planId,
|
|
1475
|
-
return unwrap(await client.PATCH("/plans/v1/{planId}", { params: { path: { planId } }, body, signal: options?.signal }), "PATCH /plans/v1/{planId}");
|
|
1708
|
+
async update(planId, plan, options) {
|
|
1709
|
+
return unwrap(await client.PATCH("/plans/v1/{planId}", { params: { path: { planId } }, body: { plan }, signal: options?.signal }), "PATCH /plans/v1/{planId}");
|
|
1476
1710
|
},
|
|
1477
1711
|
/**
|
|
1478
1712
|
* Delete a plan
|
|
1479
1713
|
*
|
|
1480
1714
|
* Delete a certain plan.
|
|
1715
|
+
*
|
|
1716
|
+
* @param planId The id of the plan.
|
|
1717
|
+
* @param options Request options (abort signal).
|
|
1481
1718
|
*/
|
|
1482
1719
|
async delete(planId, options) {
|
|
1483
1720
|
return unwrap(await client.DELETE("/plans/v1/{planId}", { params: { path: { planId } }, signal: options?.signal }), "DELETE /plans/v1/{planId}");
|
|
@@ -1536,6 +1773,9 @@ function createResources(client, defaults) {
|
|
|
1536
1773
|
* Get a resource
|
|
1537
1774
|
*
|
|
1538
1775
|
* Get a certain resource.
|
|
1776
|
+
*
|
|
1777
|
+
* @param id The id of the resource.
|
|
1778
|
+
* @param options Request options (abort signal).
|
|
1539
1779
|
*/
|
|
1540
1780
|
async get(id, options) {
|
|
1541
1781
|
return unwrapProp(await client.GET("/resources/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "resource", "GET /resources/v1/{id}");
|
|
@@ -1545,16 +1785,20 @@ function createResources(client, defaults) {
|
|
|
1545
1785
|
*
|
|
1546
1786
|
* Create a new resource in a location. The request body must match the schema exactly—unknown properties are rejected.
|
|
1547
1787
|
*/
|
|
1548
|
-
async create(
|
|
1549
|
-
return unwrapProp(await client.POST("/resources/v1", { body, signal: options?.signal }), "resource", "POST /resources/v1");
|
|
1788
|
+
async create(resource, options) {
|
|
1789
|
+
return unwrapProp(await client.POST("/resources/v1", { body: { resource }, signal: options?.signal }), "resource", "POST /resources/v1");
|
|
1550
1790
|
},
|
|
1551
1791
|
/**
|
|
1552
1792
|
* Patch a resource
|
|
1553
1793
|
*
|
|
1554
1794
|
* Patch a certain resource.
|
|
1795
|
+
*
|
|
1796
|
+
* @param id The id of the resource.
|
|
1797
|
+
* @param resource The `resource` payload.
|
|
1798
|
+
* @param options Request options (abort signal).
|
|
1555
1799
|
*/
|
|
1556
|
-
async update(id,
|
|
1557
|
-
return unwrap(await client.PATCH("/resources/v1/{id}", { params: { path: { id } }, body, signal: options?.signal }), "PATCH /resources/v1/{id}");
|
|
1800
|
+
async update(id, resource, options) {
|
|
1801
|
+
return unwrap(await client.PATCH("/resources/v1/{id}", { params: { path: { id } }, body: { resource }, signal: options?.signal }), "PATCH /resources/v1/{id}");
|
|
1558
1802
|
},
|
|
1559
1803
|
bookings: {
|
|
1560
1804
|
/**
|
|
@@ -1576,15 +1820,25 @@ function createResources(client, defaults) {
|
|
|
1576
1820
|
"bookings"
|
|
1577
1821
|
);
|
|
1578
1822
|
},
|
|
1579
|
-
/**
|
|
1823
|
+
/**
|
|
1824
|
+
* Get a booking
|
|
1825
|
+
*
|
|
1826
|
+
* @param id The id of the booking.
|
|
1827
|
+
* @param options Request options (abort signal).
|
|
1828
|
+
*/
|
|
1580
1829
|
async get(id, options) {
|
|
1581
1830
|
return unwrapProp(await client.GET("/resources/bookings/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "booking", "GET /resources/bookings/v1/{id}");
|
|
1582
1831
|
},
|
|
1583
1832
|
/** Create a booking */
|
|
1584
|
-
async create(
|
|
1585
|
-
return unwrapProp(await client.POST("/resources/bookings/v1", { body, signal: options?.signal }), "booking", "POST /resources/bookings/v1");
|
|
1833
|
+
async create(booking, options) {
|
|
1834
|
+
return unwrapProp(await client.POST("/resources/bookings/v1", { body: { booking }, signal: options?.signal }), "booking", "POST /resources/bookings/v1");
|
|
1586
1835
|
},
|
|
1587
|
-
/**
|
|
1836
|
+
/**
|
|
1837
|
+
* Delete a booking
|
|
1838
|
+
*
|
|
1839
|
+
* @param id The id of the booking.
|
|
1840
|
+
* @param options Request options (abort signal).
|
|
1841
|
+
*/
|
|
1588
1842
|
async delete(id, options) {
|
|
1589
1843
|
return unwrap(await client.DELETE("/resources/bookings/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /resources/bookings/v1/{id}");
|
|
1590
1844
|
}
|
|
@@ -1608,6 +1862,9 @@ function createShop(client, defaults) {
|
|
|
1608
1862
|
* Get a category
|
|
1609
1863
|
*
|
|
1610
1864
|
* Get a shop category.
|
|
1865
|
+
*
|
|
1866
|
+
* @param categoryId The id of the shop category.
|
|
1867
|
+
* @param options Request options (abort signal).
|
|
1611
1868
|
*/
|
|
1612
1869
|
async get(categoryId, options) {
|
|
1613
1870
|
return unwrapProp(await client.GET("/shop/categories/v1/{categoryId}", { params: { path: { categoryId } }, signal: options?.signal }), "category", "GET /shop/categories/v1/{categoryId}");
|
|
@@ -1617,21 +1874,28 @@ function createShop(client, defaults) {
|
|
|
1617
1874
|
*
|
|
1618
1875
|
* Create a shop category.
|
|
1619
1876
|
*/
|
|
1620
|
-
async create(
|
|
1621
|
-
return unwrapProp(await client.POST("/shop/categories/v1", { body, signal: options?.signal }), "category", "POST /shop/categories/v1");
|
|
1877
|
+
async create(category, options) {
|
|
1878
|
+
return unwrapProp(await client.POST("/shop/categories/v1", { body: { category }, signal: options?.signal }), "category", "POST /shop/categories/v1");
|
|
1622
1879
|
},
|
|
1623
1880
|
/**
|
|
1624
1881
|
* Update a category
|
|
1625
1882
|
*
|
|
1626
1883
|
* Update a shop category.
|
|
1884
|
+
*
|
|
1885
|
+
* @param categoryId The id of the shop category
|
|
1886
|
+
* @param category The `category` payload.
|
|
1887
|
+
* @param options Request options (abort signal).
|
|
1627
1888
|
*/
|
|
1628
|
-
async update(categoryId,
|
|
1629
|
-
return unwrapProp(await client.PUT("/shop/categories/v1/{categoryId}", { params: { path: { categoryId } }, body, signal: options?.signal }), "category", "PUT /shop/categories/v1/{categoryId}");
|
|
1889
|
+
async update(categoryId, category, options) {
|
|
1890
|
+
return unwrapProp(await client.PUT("/shop/categories/v1/{categoryId}", { params: { path: { categoryId } }, body: { category }, signal: options?.signal }), "category", "PUT /shop/categories/v1/{categoryId}");
|
|
1630
1891
|
},
|
|
1631
1892
|
/**
|
|
1632
1893
|
* Delete a category
|
|
1633
1894
|
*
|
|
1634
1895
|
* Delete a shop category.
|
|
1896
|
+
*
|
|
1897
|
+
* @param categoryId The id of the shop category
|
|
1898
|
+
* @param options Request options (abort signal).
|
|
1635
1899
|
*/
|
|
1636
1900
|
async delete(categoryId, options) {
|
|
1637
1901
|
return unwrap(await client.DELETE("/shop/categories/v1/{categoryId}", { params: { path: { categoryId } }, signal: options?.signal }), "DELETE /shop/categories/v1/{categoryId}");
|
|
@@ -1661,6 +1925,9 @@ function createShop(client, defaults) {
|
|
|
1661
1925
|
* Get an order
|
|
1662
1926
|
*
|
|
1663
1927
|
* Get a certain order.
|
|
1928
|
+
*
|
|
1929
|
+
* @param orderId The id of the order.
|
|
1930
|
+
* @param options Request options (abort signal).
|
|
1664
1931
|
*/
|
|
1665
1932
|
async get(orderId, options) {
|
|
1666
1933
|
return unwrapProp(await client.GET("/shop/orders/v1/{orderId}", { params: { path: { orderId } }, signal: options?.signal }), "order", "GET /shop/orders/v1/{orderId}");
|
|
@@ -1690,6 +1957,9 @@ function createShop(client, defaults) {
|
|
|
1690
1957
|
* Get a product
|
|
1691
1958
|
*
|
|
1692
1959
|
* Get a certain product.
|
|
1960
|
+
*
|
|
1961
|
+
* @param productId The id of the product.
|
|
1962
|
+
* @param options Request options (abort signal).
|
|
1693
1963
|
*/
|
|
1694
1964
|
async get(productId, options) {
|
|
1695
1965
|
return unwrapProp(await client.GET("/shop/products/v1/{productId}", { params: { path: { productId } }, signal: options?.signal }), "product", "GET /shop/products/v1/{productId}");
|
|
@@ -1699,21 +1969,28 @@ function createShop(client, defaults) {
|
|
|
1699
1969
|
*
|
|
1700
1970
|
* Create a product in shop.
|
|
1701
1971
|
*/
|
|
1702
|
-
async create(
|
|
1703
|
-
return unwrapProp(await client.POST("/shop/products/v1", { body, signal: options?.signal }), "product", "POST /shop/products/v1");
|
|
1972
|
+
async create(product, options) {
|
|
1973
|
+
return unwrapProp(await client.POST("/shop/products/v1", { body: { product }, signal: options?.signal }), "product", "POST /shop/products/v1");
|
|
1704
1974
|
},
|
|
1705
1975
|
/**
|
|
1706
1976
|
* Update a product
|
|
1707
1977
|
*
|
|
1708
1978
|
* Update a certain product.
|
|
1979
|
+
*
|
|
1980
|
+
* @param productId The id of the product.
|
|
1981
|
+
* @param product The `product` payload.
|
|
1982
|
+
* @param options Request options (abort signal).
|
|
1709
1983
|
*/
|
|
1710
|
-
async update(productId,
|
|
1711
|
-
return unwrapProp(await client.PUT("/shop/products/v1/{productId}", { params: { path: { productId } }, body, signal: options?.signal }), "product", "PUT /shop/products/v1/{productId}");
|
|
1984
|
+
async update(productId, product, options) {
|
|
1985
|
+
return unwrapProp(await client.PUT("/shop/products/v1/{productId}", { params: { path: { productId } }, body: { product }, signal: options?.signal }), "product", "PUT /shop/products/v1/{productId}");
|
|
1712
1986
|
},
|
|
1713
1987
|
/**
|
|
1714
1988
|
* Delete a product
|
|
1715
1989
|
*
|
|
1716
1990
|
* Delete a certain product.
|
|
1991
|
+
*
|
|
1992
|
+
* @param productId The id of the product.
|
|
1993
|
+
* @param options Request options (abort signal).
|
|
1717
1994
|
*/
|
|
1718
1995
|
async delete(productId, options) {
|
|
1719
1996
|
return unwrap(await client.DELETE("/shop/products/v1/{productId}", { params: { path: { productId } }, signal: options?.signal }), "DELETE /shop/products/v1/{productId}");
|
|
@@ -1740,6 +2017,9 @@ function createSubscriptions(client, defaults) {
|
|
|
1740
2017
|
* Retrieve a subscription
|
|
1741
2018
|
*
|
|
1742
2019
|
* Retrieve a certain subscription.
|
|
2020
|
+
*
|
|
2021
|
+
* @param subscriptionId The id of the subscription.
|
|
2022
|
+
* @param options Request options (abort signal).
|
|
1743
2023
|
*/
|
|
1744
2024
|
async get(subscriptionId, options) {
|
|
1745
2025
|
return unwrapProp(await client.GET("/subscriptions/v1/{subscriptionId}", { params: { path: { subscriptionId } }, signal: options?.signal }), "subscription", "GET /subscriptions/v1/{subscriptionId}");
|
|
@@ -1756,29 +2036,55 @@ function createSubscriptions(client, defaults) {
|
|
|
1756
2036
|
* Update a subscription
|
|
1757
2037
|
*
|
|
1758
2038
|
* Update a certain subscription.
|
|
2039
|
+
*
|
|
2040
|
+
* @param subscriptionId The id of the subscription.
|
|
2041
|
+
* @param subscription The `subscription` payload.
|
|
2042
|
+
* @param options Request options (abort signal).
|
|
1759
2043
|
*/
|
|
1760
|
-
async update(subscriptionId,
|
|
1761
|
-
return unwrap(await client.PATCH("/subscriptions/v1/{subscriptionId}", { params: { path: { subscriptionId } }, body, signal: options?.signal }), "PATCH /subscriptions/v1/{subscriptionId}");
|
|
2044
|
+
async update(subscriptionId, subscription, options) {
|
|
2045
|
+
return unwrap(await client.PATCH("/subscriptions/v1/{subscriptionId}", { params: { path: { subscriptionId } }, body: { subscription }, signal: options?.signal }), "PATCH /subscriptions/v1/{subscriptionId}");
|
|
1762
2046
|
},
|
|
1763
2047
|
/**
|
|
1764
2048
|
* Delete a subscription
|
|
1765
2049
|
*
|
|
1766
2050
|
* Delete a certain subscription.
|
|
2051
|
+
*
|
|
2052
|
+
* @param subscriptionId The id of the subscription.
|
|
2053
|
+
* @param options Request options (abort signal).
|
|
1767
2054
|
*/
|
|
1768
2055
|
async delete(subscriptionId, options) {
|
|
1769
2056
|
return unwrap(await client.DELETE("/subscriptions/v1/{subscriptionId}", { params: { path: { subscriptionId } }, signal: options?.signal }), "DELETE /subscriptions/v1/{subscriptionId}");
|
|
1770
2057
|
},
|
|
1771
|
-
/**
|
|
1772
|
-
|
|
1773
|
-
|
|
2058
|
+
/**
|
|
2059
|
+
* Create a subscription item
|
|
2060
|
+
*
|
|
2061
|
+
* @param subscriptionId The id of the subscription.
|
|
2062
|
+
* @param item The `item` payload.
|
|
2063
|
+
* @param options Request options (abort signal).
|
|
2064
|
+
*/
|
|
2065
|
+
async createItem(subscriptionId, item, options) {
|
|
2066
|
+
return unwrapProp(await client.POST("/subscriptions/v1/{subscriptionId}/items", { params: { path: { subscriptionId } }, body: { item }, signal: options?.signal }), "subscription", "POST /subscriptions/v1/{subscriptionId}/items");
|
|
1774
2067
|
},
|
|
1775
|
-
/**
|
|
2068
|
+
/**
|
|
2069
|
+
* Delete a subscription item
|
|
2070
|
+
*
|
|
2071
|
+
* @param subscriptionId The id of the subscription.
|
|
2072
|
+
* @param itemId The id of the subscription item.
|
|
2073
|
+
* @param options Request options (abort signal).
|
|
2074
|
+
*/
|
|
1776
2075
|
async deleteItem(subscriptionId, itemId, options) {
|
|
1777
2076
|
return unwrap(await client.DELETE("/subscriptions/v1/{subscriptionId}/items/{itemId}", { params: { path: { subscriptionId, itemId } }, signal: options?.signal }), "DELETE /subscriptions/v1/{subscriptionId}/items/{itemId}");
|
|
1778
2077
|
},
|
|
1779
|
-
/**
|
|
1780
|
-
|
|
1781
|
-
|
|
2078
|
+
/**
|
|
2079
|
+
* Update a subscription item
|
|
2080
|
+
*
|
|
2081
|
+
* @param subscriptionId The id of the subscription.
|
|
2082
|
+
* @param itemId The id of the subscription item.
|
|
2083
|
+
* @param item The `item` payload.
|
|
2084
|
+
* @param options Request options (abort signal).
|
|
2085
|
+
*/
|
|
2086
|
+
async updateItem(subscriptionId, itemId, item, options) {
|
|
2087
|
+
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}");
|
|
1782
2088
|
}
|
|
1783
2089
|
};
|
|
1784
2090
|
}
|
|
@@ -1810,6 +2116,9 @@ function createSupport(client, defaults) {
|
|
|
1810
2116
|
* Retrieve a ticket
|
|
1811
2117
|
*
|
|
1812
2118
|
* Retrieve a support ticket.
|
|
2119
|
+
*
|
|
2120
|
+
* @param id The id of the ticket.
|
|
2121
|
+
* @param options Request options (abort signal).
|
|
1813
2122
|
*/
|
|
1814
2123
|
async get(id, options) {
|
|
1815
2124
|
return unwrap(await client.GET("/support/tickets/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "GET /support/tickets/v1/{id}");
|
|
@@ -1819,32 +2128,44 @@ function createSupport(client, defaults) {
|
|
|
1819
2128
|
*
|
|
1820
2129
|
* Create a support ticket.
|
|
1821
2130
|
*/
|
|
1822
|
-
async create(
|
|
1823
|
-
return unwrap(await client.POST("/support/tickets/v1", { body, signal: options?.signal }), "POST /support/tickets/v1");
|
|
2131
|
+
async create(ticket, options) {
|
|
2132
|
+
return unwrap(await client.POST("/support/tickets/v1", { body: { ticket }, signal: options?.signal }), "POST /support/tickets/v1");
|
|
1824
2133
|
},
|
|
1825
2134
|
/**
|
|
1826
2135
|
* Update a ticket's assignee
|
|
1827
2136
|
*
|
|
1828
2137
|
* Update support ticket assignee.
|
|
2138
|
+
*
|
|
2139
|
+
* @param id The id of the ticket.
|
|
2140
|
+
* @param ticket The `ticket` payload.
|
|
2141
|
+
* @param options Request options (abort signal).
|
|
1829
2142
|
*/
|
|
1830
|
-
async updateAssignee(id,
|
|
1831
|
-
return unwrap(await client.PUT("/support/tickets/v1/{id}/assignee", { params: { path: { id } }, body, signal: options?.signal }), "PUT /support/tickets/v1/{id}/assignee");
|
|
2143
|
+
async updateAssignee(id, ticket, options) {
|
|
2144
|
+
return unwrap(await client.PUT("/support/tickets/v1/{id}/assignee", { params: { path: { id } }, body: { ticket }, signal: options?.signal }), "PUT /support/tickets/v1/{id}/assignee");
|
|
1832
2145
|
},
|
|
1833
2146
|
/**
|
|
1834
2147
|
* Update a ticket's status
|
|
1835
2148
|
*
|
|
1836
2149
|
* Update support ticket status.
|
|
2150
|
+
*
|
|
2151
|
+
* @param id The id of the ticket.
|
|
2152
|
+
* @param ticket The `ticket` payload.
|
|
2153
|
+
* @param options Request options (abort signal).
|
|
1837
2154
|
*/
|
|
1838
|
-
async updateStatus(id,
|
|
1839
|
-
return unwrap(await client.PUT("/support/tickets/v1/{id}/status", { params: { path: { id } }, body, signal: options?.signal }), "PUT /support/tickets/v1/{id}/status");
|
|
2155
|
+
async updateStatus(id, ticket, options) {
|
|
2156
|
+
return unwrap(await client.PUT("/support/tickets/v1/{id}/status", { params: { path: { id } }, body: { ticket }, signal: options?.signal }), "PUT /support/tickets/v1/{id}/status");
|
|
1840
2157
|
},
|
|
1841
2158
|
/**
|
|
1842
2159
|
* Update a ticket's type
|
|
1843
2160
|
*
|
|
1844
2161
|
* Update a support ticket type.
|
|
2162
|
+
*
|
|
2163
|
+
* @param id The id of the ticket.
|
|
2164
|
+
* @param ticket The `ticket` payload.
|
|
2165
|
+
* @param options Request options (abort signal).
|
|
1845
2166
|
*/
|
|
1846
|
-
async updateType(id,
|
|
1847
|
-
return unwrap(await client.PATCH("/support/tickets/v1/{id}/type", { params: { path: { id } }, body, signal: options?.signal }), "PATCH /support/tickets/v1/{id}/type");
|
|
2167
|
+
async updateType(id, ticket, options) {
|
|
2168
|
+
return unwrap(await client.PATCH("/support/tickets/v1/{id}/type", { params: { path: { id } }, body: { ticket }, signal: options?.signal }), "PATCH /support/tickets/v1/{id}/type");
|
|
1848
2169
|
},
|
|
1849
2170
|
comment: {
|
|
1850
2171
|
/**
|
|
@@ -1852,13 +2173,16 @@ function createSupport(client, defaults) {
|
|
|
1852
2173
|
*
|
|
1853
2174
|
* Create a support ticket comment.
|
|
1854
2175
|
*/
|
|
1855
|
-
async create(
|
|
1856
|
-
return unwrapProp(await client.POST("/support/tickets/v1/comment", { body, signal: options?.signal }), "activity", "POST /support/tickets/v1/comment");
|
|
2176
|
+
async create(activity, options) {
|
|
2177
|
+
return unwrapProp(await client.POST("/support/tickets/v1/comment", { body: { activity }, signal: options?.signal }), "activity", "POST /support/tickets/v1/comment");
|
|
1857
2178
|
},
|
|
1858
2179
|
/**
|
|
1859
2180
|
* Delete a ticket comment
|
|
1860
2181
|
*
|
|
1861
2182
|
* Delete a support ticket comment.
|
|
2183
|
+
*
|
|
2184
|
+
* @param id The id of the ticket activity.
|
|
2185
|
+
* @param options Request options (abort signal).
|
|
1862
2186
|
*/
|
|
1863
2187
|
async delete(id, options) {
|
|
1864
2188
|
return unwrap(await client.DELETE("/support/tickets/v1/comment/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /support/tickets/v1/comment/{id}");
|
|
@@ -1876,11 +2200,19 @@ function createTransactions(client, defaults) {
|
|
|
1876
2200
|
* Retrieve credit balance
|
|
1877
2201
|
*
|
|
1878
2202
|
* Retrieve credits balance.
|
|
2203
|
+
*
|
|
2204
|
+
* @param id The id of the customer
|
|
2205
|
+
* @param options Request options (abort signal).
|
|
1879
2206
|
*/
|
|
1880
2207
|
async getCredits(id, options) {
|
|
1881
2208
|
return unwrapProp(await client.GET("/transactions/v1/balances/{id}/credits", { params: { path: { id } }, signal: options?.signal }), "balances", "GET /transactions/v1/balances/{id}/credits");
|
|
1882
2209
|
},
|
|
1883
|
-
/**
|
|
2210
|
+
/**
|
|
2211
|
+
* Retrieve day passes balance
|
|
2212
|
+
*
|
|
2213
|
+
* @param id The id of the customer
|
|
2214
|
+
* @param options Request options (abort signal).
|
|
2215
|
+
*/
|
|
1884
2216
|
async getDayPasses(id, options) {
|
|
1885
2217
|
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");
|
|
1886
2218
|
}
|
|
@@ -1910,8 +2242,8 @@ function createTransactions(client, defaults) {
|
|
|
1910
2242
|
*
|
|
1911
2243
|
* Create a credits transaction.
|
|
1912
2244
|
*/
|
|
1913
|
-
async create(
|
|
1914
|
-
return unwrapProp(await client.POST("/transactions/credits/v1", { body, signal: options?.signal }), "transaction", "POST /transactions/credits/v1");
|
|
2245
|
+
async create(transaction, options) {
|
|
2246
|
+
return unwrapProp(await client.POST("/transactions/credits/v1", { body: { transaction }, signal: options?.signal }), "transaction", "POST /transactions/credits/v1");
|
|
1915
2247
|
}
|
|
1916
2248
|
},
|
|
1917
2249
|
dayPasses: {
|
|
@@ -1939,8 +2271,8 @@ function createTransactions(client, defaults) {
|
|
|
1939
2271
|
*
|
|
1940
2272
|
* Create a day passes transaction.
|
|
1941
2273
|
*/
|
|
1942
|
-
async create(
|
|
1943
|
-
return unwrapProp(await client.POST("/transactions/day_passes/v1", { body, signal: options?.signal }), "transaction", "POST /transactions/day_passes/v1");
|
|
2274
|
+
async create(transaction, options) {
|
|
2275
|
+
return unwrapProp(await client.POST("/transactions/day_passes/v1", { body: { transaction }, signal: options?.signal }), "transaction", "POST /transactions/day_passes/v1");
|
|
1944
2276
|
}
|
|
1945
2277
|
},
|
|
1946
2278
|
money: {
|
|
@@ -1955,7 +2287,12 @@ function createTransactions(client, defaults) {
|
|
|
1955
2287
|
"transactions"
|
|
1956
2288
|
);
|
|
1957
2289
|
},
|
|
1958
|
-
/**
|
|
2290
|
+
/**
|
|
2291
|
+
* Retrieve a money transaction
|
|
2292
|
+
*
|
|
2293
|
+
* @param id The id of the transaction
|
|
2294
|
+
* @param options Request options (abort signal).
|
|
2295
|
+
*/
|
|
1959
2296
|
async get(id, options) {
|
|
1960
2297
|
return unwrapProp(await client.GET("/transactions/money/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "transaction", "GET /transactions/money/v1/{id}");
|
|
1961
2298
|
}
|
|
@@ -1978,13 +2315,18 @@ function createVisitors(client, defaults) {
|
|
|
1978
2315
|
"contacts"
|
|
1979
2316
|
);
|
|
1980
2317
|
},
|
|
1981
|
-
/**
|
|
2318
|
+
/**
|
|
2319
|
+
* Get a contact
|
|
2320
|
+
*
|
|
2321
|
+
* @param contactId The id of the contact.
|
|
2322
|
+
* @param options Request options (abort signal).
|
|
2323
|
+
*/
|
|
1982
2324
|
async get(contactId, options) {
|
|
1983
2325
|
return unwrapProp(await client.GET("/visitors/contacts/v1/{contactId}", { params: { path: { contactId } }, signal: options?.signal }), "contact", "GET /visitors/contacts/v1/{contactId}");
|
|
1984
2326
|
},
|
|
1985
2327
|
/** Create a contact */
|
|
1986
|
-
async create(
|
|
1987
|
-
return unwrapProp(await client.POST("/visitors/contacts/v1", { body, signal: options?.signal }), "contact", "POST /visitors/contacts/v1");
|
|
2328
|
+
async create(contact, options) {
|
|
2329
|
+
return unwrapProp(await client.POST("/visitors/contacts/v1", { body: { contact }, signal: options?.signal }), "contact", "POST /visitors/contacts/v1");
|
|
1988
2330
|
}
|
|
1989
2331
|
},
|
|
1990
2332
|
requests: {
|
|
@@ -1999,19 +2341,34 @@ function createVisitors(client, defaults) {
|
|
|
1999
2341
|
"requests"
|
|
2000
2342
|
);
|
|
2001
2343
|
},
|
|
2002
|
-
/**
|
|
2344
|
+
/**
|
|
2345
|
+
* Retrieve a request
|
|
2346
|
+
*
|
|
2347
|
+
* @param id The id of the request.
|
|
2348
|
+
* @param options Request options (abort signal).
|
|
2349
|
+
*/
|
|
2003
2350
|
async get(id, options) {
|
|
2004
2351
|
return unwrapProp(await client.GET("/visitors/requests/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "request", "GET /visitors/requests/v1/{id}");
|
|
2005
2352
|
},
|
|
2006
2353
|
/** Create a request */
|
|
2007
|
-
async create(
|
|
2008
|
-
return unwrapProp(await client.POST("/visitors/requests/v1", { body, signal: options?.signal }), "request", "POST /visitors/requests/v1");
|
|
2354
|
+
async create(request, options) {
|
|
2355
|
+
return unwrapProp(await client.POST("/visitors/requests/v1", { body: { request }, signal: options?.signal }), "request", "POST /visitors/requests/v1");
|
|
2009
2356
|
},
|
|
2010
|
-
/**
|
|
2357
|
+
/**
|
|
2358
|
+
* Approve a request
|
|
2359
|
+
*
|
|
2360
|
+
* @param id The id of the request
|
|
2361
|
+
* @param options Request options (abort signal).
|
|
2362
|
+
*/
|
|
2011
2363
|
async approve(id, options) {
|
|
2012
2364
|
return unwrapProp(await client.POST("/visitors/requests/v1/{id}/approve", { params: { path: { id } }, signal: options?.signal }), "visit", "POST /visitors/requests/v1/{id}/approve");
|
|
2013
2365
|
},
|
|
2014
|
-
/**
|
|
2366
|
+
/**
|
|
2367
|
+
* Reject a request
|
|
2368
|
+
*
|
|
2369
|
+
* @param id The id of the request
|
|
2370
|
+
* @param options Request options (abort signal).
|
|
2371
|
+
*/
|
|
2015
2372
|
async reject(id, options) {
|
|
2016
2373
|
return unwrap(await client.POST("/visitors/requests/v1/{id}/reject", { params: { path: { id } }, signal: options?.signal }), "POST /visitors/requests/v1/{id}/reject");
|
|
2017
2374
|
}
|
|
@@ -2032,26 +2389,36 @@ function createVisitors(client, defaults) {
|
|
|
2032
2389
|
* Retrieve a visit
|
|
2033
2390
|
*
|
|
2034
2391
|
* Retrieve a visit by id.
|
|
2392
|
+
*
|
|
2393
|
+
* @param id The id of the visit
|
|
2394
|
+
* @param options Request options (abort signal).
|
|
2035
2395
|
*/
|
|
2036
2396
|
async get(id, options) {
|
|
2037
2397
|
return unwrapProp(await client.GET("/visitors/visits/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "visit", "GET /visitors/visits/v1/{id}");
|
|
2038
2398
|
},
|
|
2039
2399
|
/** Create a visit */
|
|
2040
|
-
async create(
|
|
2041
|
-
return unwrapProp(await client.POST("/visitors/visits/v1", { body, signal: options?.signal }), "visit", "POST /visitors/visits/v1");
|
|
2400
|
+
async create(visit, options) {
|
|
2401
|
+
return unwrapProp(await client.POST("/visitors/visits/v1", { body: { visit }, signal: options?.signal }), "visit", "POST /visitors/visits/v1");
|
|
2042
2402
|
},
|
|
2043
2403
|
/**
|
|
2044
2404
|
* Update a visit
|
|
2045
2405
|
*
|
|
2046
2406
|
* Update a visit by id.
|
|
2407
|
+
*
|
|
2408
|
+
* @param id The id of the visit
|
|
2409
|
+
* @param visit The `visit` payload.
|
|
2410
|
+
* @param options Request options (abort signal).
|
|
2047
2411
|
*/
|
|
2048
|
-
async update(id,
|
|
2049
|
-
return unwrapProp(await client.PUT("/visitors/visits/v1/{id}", { params: { path: { id } }, body, signal: options?.signal }), "visit", "PUT /visitors/visits/v1/{id}");
|
|
2412
|
+
async update(id, visit, options) {
|
|
2413
|
+
return unwrapProp(await client.PUT("/visitors/visits/v1/{id}", { params: { path: { id } }, body: { visit }, signal: options?.signal }), "visit", "PUT /visitors/visits/v1/{id}");
|
|
2050
2414
|
},
|
|
2051
2415
|
/**
|
|
2052
2416
|
* Delete a visit
|
|
2053
2417
|
*
|
|
2054
2418
|
* Delete a visit by id.
|
|
2419
|
+
*
|
|
2420
|
+
* @param id The id of the visit
|
|
2421
|
+
* @param options Request options (abort signal).
|
|
2055
2422
|
*/
|
|
2056
2423
|
async delete(id, options) {
|
|
2057
2424
|
return unwrap(await client.DELETE("/visitors/visits/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /visitors/visits/v1/{id}");
|