@usethrottle/api-client 5.16.0 → 5.18.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/__tests__/cart-customer-detach-types.test.d.ts +2 -0
- package/dist/__tests__/cart-customer-detach-types.test.d.ts.map +1 -0
- package/dist/__tests__/cart-customer-detach-types.test.js +17 -0
- package/dist/__tests__/cart-customer-detach-types.test.js.map +1 -0
- package/dist/generated/services/ApplicationsService.d.ts +35 -0
- package/dist/generated/services/ApplicationsService.d.ts.map +1 -1
- package/dist/generated/services/ApplicationsService.js +2 -0
- package/dist/generated/services/ApplicationsService.js.map +1 -1
- package/dist/generated/services/CartsService.d.ts +8 -2
- package/dist/generated/services/CartsService.d.ts.map +1 -1
- package/dist/generated/services/CartsService.js.map +1 -1
- package/dist/generated/services/ConnectorsService.d.ts +42 -0
- package/dist/generated/services/ConnectorsService.d.ts.map +1 -1
- package/dist/generated/services/ConnectorsService.js +12 -0
- package/dist/generated/services/ConnectorsService.js.map +1 -1
- package/dist/generated/services/CustomersService.d.ts +25 -25
- package/dist/generated/services/CustomersService.d.ts.map +1 -1
- package/dist/generated/services/CustomersService.js +41 -41
- package/dist/generated/services/CustomersService.js.map +1 -1
- package/dist/generated/services/DefaultService.d.ts +15 -0
- package/dist/generated/services/DefaultService.d.ts.map +1 -1
- package/dist/generated/services/DefaultService.js +22 -0
- package/dist/generated/services/DefaultService.js.map +1 -1
- package/dist/generated/services/DiscountsService.d.ts +71 -4
- package/dist/generated/services/DiscountsService.d.ts.map +1 -1
- package/dist/generated/services/DiscountsService.js.map +1 -1
- package/dist/generated/services/EmbedService.d.ts +1 -1
- package/dist/generated/services/EmbedService.d.ts.map +1 -1
- package/dist/generated/services/EmbedService.js +3 -2
- package/dist/generated/services/EmbedService.js.map +1 -1
- package/dist/generated/services/OrdersService.d.ts +227 -70
- package/dist/generated/services/OrdersService.d.ts.map +1 -1
- package/dist/generated/services/OrdersService.js +136 -24
- package/dist/generated/services/OrdersService.js.map +1 -1
- package/dist/generated/services/PaymentMethodsService.d.ts +5 -1
- package/dist/generated/services/PaymentMethodsService.d.ts.map +1 -1
- package/dist/generated/services/PaymentMethodsService.js +3 -1
- package/dist/generated/services/PaymentMethodsService.js.map +1 -1
- package/dist/generated/services/PaymentsService.d.ts +8 -2
- package/dist/generated/services/PaymentsService.d.ts.map +1 -1
- package/dist/generated/services/PaymentsService.js +3 -0
- package/dist/generated/services/PaymentsService.js.map +1 -1
- package/dist/generated/services/QuotesService.d.ts +210 -7
- package/dist/generated/services/QuotesService.d.ts.map +1 -1
- package/dist/generated/services/QuotesService.js +85 -1
- package/dist/generated/services/QuotesService.js.map +1 -1
- package/dist/generated/services/StoresService.d.ts.map +1 -1
- package/dist/generated/services/StoresService.js +3 -0
- package/dist/generated/services/StoresService.js.map +1 -1
- package/dist/generated/services/SubscriptionsService.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,115 @@
|
|
|
1
1
|
import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
2
2
|
export declare class OrdersService {
|
|
3
|
+
/**
|
|
4
|
+
* Internal notes on this order, newest first (at most 100). Only your team sees them: no buyer page, email or webhook payload includes a note.
|
|
5
|
+
* @param id
|
|
6
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
7
|
+
* @returns any Default Response
|
|
8
|
+
* @throws ApiError
|
|
9
|
+
*/
|
|
10
|
+
static getApiV1OrdersNotes(id: string, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
11
|
+
data?: Array<{
|
|
12
|
+
id: string;
|
|
13
|
+
body: string;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
/**
|
|
16
|
+
* The team member who wrote it; null when an API key wrote it or the member was removed.
|
|
17
|
+
*/
|
|
18
|
+
authorMemberId: string | null;
|
|
19
|
+
/**
|
|
20
|
+
* The author's workspace email, when `authorMemberId` is set.
|
|
21
|
+
*/
|
|
22
|
+
authorEmail: string | null;
|
|
23
|
+
}>;
|
|
24
|
+
meta?: {
|
|
25
|
+
/**
|
|
26
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
27
|
+
*/
|
|
28
|
+
requestId?: string;
|
|
29
|
+
pagination?: {
|
|
30
|
+
cursor?: string | null;
|
|
31
|
+
hasMore?: boolean;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
}>;
|
|
35
|
+
/**
|
|
36
|
+
* Add an internal note to this order. Notes cannot be edited or deleted.
|
|
37
|
+
* @param id
|
|
38
|
+
* @param requestBody
|
|
39
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
40
|
+
* @returns any Default Response
|
|
41
|
+
* @throws ApiError
|
|
42
|
+
*/
|
|
43
|
+
static postApiV1OrdersNotes(id: string, requestBody: {
|
|
44
|
+
/**
|
|
45
|
+
* The note, 1–5000 characters.
|
|
46
|
+
*/
|
|
47
|
+
body: string;
|
|
48
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
49
|
+
data?: {
|
|
50
|
+
id: string;
|
|
51
|
+
body: string;
|
|
52
|
+
createdAt: string;
|
|
53
|
+
/**
|
|
54
|
+
* The team member who wrote it; null when an API key wrote it or the member was removed.
|
|
55
|
+
*/
|
|
56
|
+
authorMemberId: string | null;
|
|
57
|
+
/**
|
|
58
|
+
* The author's workspace email, when `authorMemberId` is set.
|
|
59
|
+
*/
|
|
60
|
+
authorEmail: string | null;
|
|
61
|
+
};
|
|
62
|
+
meta?: {
|
|
63
|
+
/**
|
|
64
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
65
|
+
*/
|
|
66
|
+
requestId?: string;
|
|
67
|
+
pagination?: {
|
|
68
|
+
cursor?: string | null;
|
|
69
|
+
hasMore?: boolean;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
}>;
|
|
73
|
+
/**
|
|
74
|
+
* Convert a cart into a draft order (status=draft) stamped metadata.createdVia=dashboard. Requires the application:orders:write permission for dashboard members. Collect payment for the order afterwards.
|
|
75
|
+
* @param requestBody
|
|
76
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
77
|
+
* @returns any Default Response
|
|
78
|
+
* @throws ApiError
|
|
79
|
+
*/
|
|
80
|
+
static postApiV1OrdersFromCart(requestBody: {
|
|
81
|
+
cartId: string;
|
|
82
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
83
|
+
/**
|
|
84
|
+
* The created draft order
|
|
85
|
+
*/
|
|
86
|
+
data?: {
|
|
87
|
+
id?: string;
|
|
88
|
+
orderNumber?: string;
|
|
89
|
+
status?: 'draft';
|
|
90
|
+
currency?: string;
|
|
91
|
+
/**
|
|
92
|
+
* In cents
|
|
93
|
+
*/
|
|
94
|
+
subtotal?: number;
|
|
95
|
+
/**
|
|
96
|
+
* In cents
|
|
97
|
+
*/
|
|
98
|
+
total?: number;
|
|
99
|
+
cartId?: string;
|
|
100
|
+
createdAt?: string;
|
|
101
|
+
};
|
|
102
|
+
meta?: {
|
|
103
|
+
/**
|
|
104
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
105
|
+
*/
|
|
106
|
+
requestId?: string;
|
|
107
|
+
pagination?: {
|
|
108
|
+
cursor?: string | null;
|
|
109
|
+
hasMore?: boolean;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
}>;
|
|
3
113
|
/**
|
|
4
114
|
* Create a new order (draft)
|
|
5
115
|
* @param requestBody
|
|
@@ -9,6 +119,9 @@ export declare class OrdersService {
|
|
|
9
119
|
*/
|
|
10
120
|
static postApiV1Orders(requestBody: {
|
|
11
121
|
customerId?: string;
|
|
122
|
+
/**
|
|
123
|
+
* ISO currency code. Omit it to use the store's currency. Must be enabled for the store, else `422 currency_not_enabled`; in production a non-USD code is `422 currency_not_available_in_production`.
|
|
124
|
+
*/
|
|
12
125
|
currency?: string;
|
|
13
126
|
source?: 'web' | 'mobile' | 'pos' | 'api';
|
|
14
127
|
billingAddress?: {
|
|
@@ -3734,6 +3847,120 @@ export declare class OrdersService {
|
|
|
3734
3847
|
};
|
|
3735
3848
|
};
|
|
3736
3849
|
}>;
|
|
3850
|
+
/**
|
|
3851
|
+
* Create a 7-day payment link (a hosted checkout session) for a draft order built with `POST /orders/from-cart`, and email it to the customer unless `send` is false. Replaces, and cancels, any link the order already has. An API key needs both `orders:write` and `checkout_sessions:write`.
|
|
3852
|
+
* @param id
|
|
3853
|
+
* @param requestBody
|
|
3854
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
3855
|
+
* @returns any Default Response
|
|
3856
|
+
* @throws ApiError
|
|
3857
|
+
*/
|
|
3858
|
+
static postApiV1OrdersPaymentLink(id: string, requestBody: {
|
|
3859
|
+
/**
|
|
3860
|
+
* Email the link to the order's customer (default true). `false` creates and returns it only.
|
|
3861
|
+
*/
|
|
3862
|
+
send?: boolean;
|
|
3863
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
3864
|
+
data?: {
|
|
3865
|
+
sessionId?: string;
|
|
3866
|
+
/**
|
|
3867
|
+
* The hosted checkout URL the customer pays at.
|
|
3868
|
+
*/
|
|
3869
|
+
url?: string;
|
|
3870
|
+
sentAt?: string;
|
|
3871
|
+
expiresAt?: string;
|
|
3872
|
+
/**
|
|
3873
|
+
* The address the link was emailed to; null when it was not emailed.
|
|
3874
|
+
*/
|
|
3875
|
+
emailedTo?: string | null;
|
|
3876
|
+
};
|
|
3877
|
+
meta?: {
|
|
3878
|
+
/**
|
|
3879
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
3880
|
+
*/
|
|
3881
|
+
requestId?: string;
|
|
3882
|
+
pagination?: {
|
|
3883
|
+
cursor?: string | null;
|
|
3884
|
+
hasMore?: boolean;
|
|
3885
|
+
};
|
|
3886
|
+
};
|
|
3887
|
+
}>;
|
|
3888
|
+
/**
|
|
3889
|
+
* Cancel the payment link of an order so it can no longer be paid. An API key needs both `orders:write` and `checkout_sessions:write`.
|
|
3890
|
+
* @param id
|
|
3891
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
3892
|
+
* @returns void
|
|
3893
|
+
* @throws ApiError
|
|
3894
|
+
*/
|
|
3895
|
+
static deleteApiV1OrdersPaymentLink(id: string, xThrottleEnvironmentId?: string): CancelablePromise<void>;
|
|
3896
|
+
/**
|
|
3897
|
+
* Issue a Net-N invoice for a draft order built with `POST /orders/from-cart`, accepting the Invoice Terms on the buyer's behalf, and move the order to processing. Cancels any payment link first. Requires an active Invoice Terms connector. An API key needs both `payments:write` and `orders:write`.
|
|
3898
|
+
* @param id
|
|
3899
|
+
* @param requestBody
|
|
3900
|
+
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
3901
|
+
* @returns any Default Response
|
|
3902
|
+
* @throws ApiError
|
|
3903
|
+
*/
|
|
3904
|
+
static postApiV1OrdersInvoiceOnTerms(id: string, requestBody: {
|
|
3905
|
+
/**
|
|
3906
|
+
* Net-N days for this invoice (0 = due on issue). Omit to use the customer's terms, then the application default.
|
|
3907
|
+
*/
|
|
3908
|
+
netDays?: number;
|
|
3909
|
+
/**
|
|
3910
|
+
* Recorded as the accepting company on the terms acceptance.
|
|
3911
|
+
*/
|
|
3912
|
+
companyName: string;
|
|
3913
|
+
billingEmail: string;
|
|
3914
|
+
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
3915
|
+
data?: {
|
|
3916
|
+
id?: string;
|
|
3917
|
+
orderId?: string;
|
|
3918
|
+
processor?: string;
|
|
3919
|
+
processorTransactionId?: string | null;
|
|
3920
|
+
processorResponse?: any | null;
|
|
3921
|
+
/**
|
|
3922
|
+
* Amount in cents (e.g. 1999 = $19.99)
|
|
3923
|
+
*/
|
|
3924
|
+
amount?: number;
|
|
3925
|
+
/**
|
|
3926
|
+
* Amount actually captured. May be less than `amount` on a partial capture; null until captured.
|
|
3927
|
+
*/
|
|
3928
|
+
capturedAmount?: number | null;
|
|
3929
|
+
currency?: string;
|
|
3930
|
+
status?: 'pending' | 'authorized' | 'processing' | 'captured' | 'failed' | 'voided' | 'expired' | 'refunded' | 'partially_refunded';
|
|
3931
|
+
errorCode?: string | null;
|
|
3932
|
+
/**
|
|
3933
|
+
* Why the payment failed. For a manually-marked failure this is the reason the merchant gave.
|
|
3934
|
+
*/
|
|
3935
|
+
errorMessage?: string | null;
|
|
3936
|
+
method?: 'card' | 'bank_transfer' | 'wallet' | 'cash' | 'cheque' | 'external' | 'manual' | 'net30';
|
|
3937
|
+
netN?: number;
|
|
3938
|
+
netNSource?: 'customer_override' | 'cart_override' | 'global_default';
|
|
3939
|
+
authorizedAt?: string | null;
|
|
3940
|
+
capturedAt?: string | null;
|
|
3941
|
+
voidedAt?: string | null;
|
|
3942
|
+
disputed?: boolean;
|
|
3943
|
+
disputeReason?: string | null;
|
|
3944
|
+
disputeOpenedAt?: string | null;
|
|
3945
|
+
disputeOutcome?: 'won' | 'lost';
|
|
3946
|
+
disputeClosedAt?: string | null;
|
|
3947
|
+
/**
|
|
3948
|
+
* Arbitrary key-value metadata
|
|
3949
|
+
*/
|
|
3950
|
+
metadata?: Record<string, any>;
|
|
3951
|
+
createdAt?: string;
|
|
3952
|
+
};
|
|
3953
|
+
meta?: {
|
|
3954
|
+
/**
|
|
3955
|
+
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
3956
|
+
*/
|
|
3957
|
+
requestId?: string;
|
|
3958
|
+
pagination?: {
|
|
3959
|
+
cursor?: string | null;
|
|
3960
|
+
hasMore?: boolean;
|
|
3961
|
+
};
|
|
3962
|
+
};
|
|
3963
|
+
}>;
|
|
3737
3964
|
/**
|
|
3738
3965
|
* Add, update, or remove line items on an order. On a captured order the total delta is charged (increase) or refunded (decrease) automatically; on an order with an outstanding Net-N invoice, the invoice amount takes the delta instead.
|
|
3739
3966
|
* @param id
|
|
@@ -4050,75 +4277,5 @@ export declare class OrdersService {
|
|
|
4050
4277
|
}>;
|
|
4051
4278
|
};
|
|
4052
4279
|
}>;
|
|
4053
|
-
/**
|
|
4054
|
-
* Internal notes on this order, newest first (at most 100). Only your team sees them: no buyer page, email or webhook payload includes a note.
|
|
4055
|
-
* @param id
|
|
4056
|
-
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
4057
|
-
* @returns any Default Response
|
|
4058
|
-
* @throws ApiError
|
|
4059
|
-
*/
|
|
4060
|
-
static getApiV1OrdersNotes(id: string, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
4061
|
-
data?: Array<{
|
|
4062
|
-
id: string;
|
|
4063
|
-
body: string;
|
|
4064
|
-
createdAt: string;
|
|
4065
|
-
/**
|
|
4066
|
-
* The team member who wrote it; null when an API key wrote it or the member was removed.
|
|
4067
|
-
*/
|
|
4068
|
-
authorMemberId: string | null;
|
|
4069
|
-
/**
|
|
4070
|
-
* The author's workspace email, when `authorMemberId` is set.
|
|
4071
|
-
*/
|
|
4072
|
-
authorEmail: string | null;
|
|
4073
|
-
}>;
|
|
4074
|
-
meta?: {
|
|
4075
|
-
/**
|
|
4076
|
-
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
4077
|
-
*/
|
|
4078
|
-
requestId?: string;
|
|
4079
|
-
pagination?: {
|
|
4080
|
-
cursor?: string | null;
|
|
4081
|
-
hasMore?: boolean;
|
|
4082
|
-
};
|
|
4083
|
-
};
|
|
4084
|
-
}>;
|
|
4085
|
-
/**
|
|
4086
|
-
* Add an internal note to this order. Notes cannot be edited or deleted.
|
|
4087
|
-
* @param id
|
|
4088
|
-
* @param requestBody
|
|
4089
|
-
* @param xThrottleEnvironmentId Optional workspace environment id for dashboard-session, Clerk JWT, and extension-session requests. API keys are already pinned to one workspace environment.
|
|
4090
|
-
* @returns any Default Response
|
|
4091
|
-
* @throws ApiError
|
|
4092
|
-
*/
|
|
4093
|
-
static postApiV1OrdersNotes(id: string, requestBody: {
|
|
4094
|
-
/**
|
|
4095
|
-
* The note, 1–5000 characters.
|
|
4096
|
-
*/
|
|
4097
|
-
body: string;
|
|
4098
|
-
}, xThrottleEnvironmentId?: string): CancelablePromise<{
|
|
4099
|
-
data?: {
|
|
4100
|
-
id: string;
|
|
4101
|
-
body: string;
|
|
4102
|
-
createdAt: string;
|
|
4103
|
-
/**
|
|
4104
|
-
* The team member who wrote it; null when an API key wrote it or the member was removed.
|
|
4105
|
-
*/
|
|
4106
|
-
authorMemberId: string | null;
|
|
4107
|
-
/**
|
|
4108
|
-
* The author's workspace email, when `authorMemberId` is set.
|
|
4109
|
-
*/
|
|
4110
|
-
authorEmail: string | null;
|
|
4111
|
-
};
|
|
4112
|
-
meta?: {
|
|
4113
|
-
/**
|
|
4114
|
-
* `req_<uuid>`, or a client-supplied id matching `^[A-Za-z0-9_-]{8,128}$`.
|
|
4115
|
-
*/
|
|
4116
|
-
requestId?: string;
|
|
4117
|
-
pagination?: {
|
|
4118
|
-
cursor?: string | null;
|
|
4119
|
-
hasMore?: boolean;
|
|
4120
|
-
};
|
|
4121
|
-
};
|
|
4122
|
-
}>;
|
|
4123
4280
|
}
|
|
4124
4281
|
//# sourceMappingURL=OrdersService.d.ts.map
|