@wix/auto_sdk_get-paid_receipts 1.0.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/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.context.d.ts +11 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.context.js +21 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.context.js.map +1 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.http.d.ts +28 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.http.js +286 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.http.js.map +1 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.meta.d.ts +27 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.meta.js +161 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.meta.js.map +1 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.public.d.ts +72 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.public.js +56 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.public.js.map +1 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.types.d.ts +915 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.types.js +60 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.types.js.map +1 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.universal.d.ts +1072 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.universal.js +446 -0
- package/build/cjs/src/receipts-v1-receipt-receipts.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/receipts-v1-receipt-receipts.context.d.ts +11 -0
- package/build/es/src/receipts-v1-receipt-receipts.context.js +11 -0
- package/build/es/src/receipts-v1-receipt-receipts.context.js.map +1 -0
- package/build/es/src/receipts-v1-receipt-receipts.http.d.ts +28 -0
- package/build/es/src/receipts-v1-receipt-receipts.http.js +276 -0
- package/build/es/src/receipts-v1-receipt-receipts.http.js.map +1 -0
- package/build/es/src/receipts-v1-receipt-receipts.meta.d.ts +27 -0
- package/build/es/src/receipts-v1-receipt-receipts.meta.js +128 -0
- package/build/es/src/receipts-v1-receipt-receipts.meta.js.map +1 -0
- package/build/es/src/receipts-v1-receipt-receipts.public.d.ts +72 -0
- package/build/es/src/receipts-v1-receipt-receipts.public.js +39 -0
- package/build/es/src/receipts-v1-receipt-receipts.public.js.map +1 -0
- package/build/es/src/receipts-v1-receipt-receipts.types.d.ts +915 -0
- package/build/es/src/receipts-v1-receipt-receipts.types.js +57 -0
- package/build/es/src/receipts-v1-receipt-receipts.types.js.map +1 -0
- package/build/es/src/receipts-v1-receipt-receipts.universal.d.ts +1072 -0
- package/build/es/src/receipts-v1-receipt-receipts.universal.js +413 -0
- package/build/es/src/receipts-v1-receipt-receipts.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.context.d.ts +11 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.context.js +21 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.context.js.map +1 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.http.d.ts +28 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.http.js +286 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.http.js.map +1 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.meta.d.ts +27 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.meta.js +161 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.meta.js.map +1 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.public.d.ts +72 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.public.js +56 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.public.js.map +1 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.types.d.ts +915 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.types.js +60 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.types.js.map +1 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.universal.d.ts +1072 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.universal.js +446 -0
- package/build/internal/cjs/src/receipts-v1-receipt-receipts.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.context.d.ts +11 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.context.js +11 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.context.js.map +1 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.http.d.ts +28 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.http.js +276 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.http.js.map +1 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.meta.d.ts +27 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.meta.js +128 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.meta.js.map +1 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.public.d.ts +72 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.public.js +39 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.public.js.map +1 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.types.d.ts +915 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.types.js +57 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.types.js.map +1 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.universal.d.ts +1072 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.universal.js +413 -0
- package/build/internal/es/src/receipts-v1-receipt-receipts.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';
|
|
2
|
+
import { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';
|
|
3
|
+
import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';
|
|
4
|
+
import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
|
|
5
|
+
import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
|
|
6
|
+
import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
|
|
7
|
+
import { resolveUrl } from '@wix/sdk-runtime/rest-modules';
|
|
8
|
+
function resolveWixReceiptsV1ReceiptsUrl(opts) {
|
|
9
|
+
const domainToMappings = {
|
|
10
|
+
'manage._base_domain_': [
|
|
11
|
+
{
|
|
12
|
+
srcPath: '/_api/receipts',
|
|
13
|
+
destPath: '',
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
};
|
|
17
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
18
|
+
}
|
|
19
|
+
const PACKAGE_NAME = '@wix/auto_sdk_get-paid_receipts';
|
|
20
|
+
/**
|
|
21
|
+
* Creates a Receipt.
|
|
22
|
+
*
|
|
23
|
+
* The request body must include: currency, source reference, line items, payment, totals.
|
|
24
|
+
* Receipt number will not be assigned on the create response. Number will be assigned eventually but before the
|
|
25
|
+
* document file is created.
|
|
26
|
+
*/
|
|
27
|
+
export function createReceipt(payload) {
|
|
28
|
+
function __createReceipt({ host }) {
|
|
29
|
+
const serializedData = transformPaths(payload, [
|
|
30
|
+
{
|
|
31
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
32
|
+
paths: [
|
|
33
|
+
{ path: 'receipt.createdDate' },
|
|
34
|
+
{ path: 'receipt.updatedDate' },
|
|
35
|
+
{ path: 'receipt.businessDetails.logo.urlExpirationDate' },
|
|
36
|
+
{ path: 'receipt.payment.transactionDate' },
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
41
|
+
paths: [
|
|
42
|
+
{ path: 'receipt.businessDetails.address.geocode.latitude' },
|
|
43
|
+
{ path: 'receipt.businessDetails.address.geocode.longitude' },
|
|
44
|
+
{ path: 'receipt.customer.billingAddress.geocode.latitude' },
|
|
45
|
+
{ path: 'receipt.customer.billingAddress.geocode.longitude' },
|
|
46
|
+
{ path: 'receipt.customer.shippingAddress.geocode.latitude' },
|
|
47
|
+
{ path: 'receipt.customer.shippingAddress.geocode.longitude' },
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
]);
|
|
51
|
+
const metadata = {
|
|
52
|
+
entityFqdn: 'wix.receipts.v1.receipt',
|
|
53
|
+
method: 'POST',
|
|
54
|
+
methodFqn: 'wix.receipts.v1.Receipts.CreateReceipt',
|
|
55
|
+
packageName: PACKAGE_NAME,
|
|
56
|
+
url: resolveWixReceiptsV1ReceiptsUrl({
|
|
57
|
+
protoPath: '/v1/receipts',
|
|
58
|
+
data: serializedData,
|
|
59
|
+
host,
|
|
60
|
+
}),
|
|
61
|
+
data: serializedData,
|
|
62
|
+
transformResponse: (payload) => transformPaths(payload, [
|
|
63
|
+
{
|
|
64
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
65
|
+
paths: [
|
|
66
|
+
{ path: 'receipt.createdDate' },
|
|
67
|
+
{ path: 'receipt.updatedDate' },
|
|
68
|
+
{ path: 'receipt.businessDetails.logo.urlExpirationDate' },
|
|
69
|
+
{ path: 'receipt.payment.transactionDate' },
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
74
|
+
paths: [
|
|
75
|
+
{ path: 'receipt.businessDetails.address.geocode.latitude' },
|
|
76
|
+
{ path: 'receipt.businessDetails.address.geocode.longitude' },
|
|
77
|
+
{ path: 'receipt.customer.billingAddress.geocode.latitude' },
|
|
78
|
+
{ path: 'receipt.customer.billingAddress.geocode.longitude' },
|
|
79
|
+
{ path: 'receipt.customer.shippingAddress.geocode.latitude' },
|
|
80
|
+
{ path: 'receipt.customer.shippingAddress.geocode.longitude' },
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
]),
|
|
84
|
+
};
|
|
85
|
+
return metadata;
|
|
86
|
+
}
|
|
87
|
+
return __createReceipt;
|
|
88
|
+
}
|
|
89
|
+
/** Retrieves a Receipt. */
|
|
90
|
+
export function getReceipt(payload) {
|
|
91
|
+
function __getReceipt({ host }) {
|
|
92
|
+
const metadata = {
|
|
93
|
+
entityFqdn: 'wix.receipts.v1.receipt',
|
|
94
|
+
method: 'GET',
|
|
95
|
+
methodFqn: 'wix.receipts.v1.Receipts.GetReceipt',
|
|
96
|
+
packageName: PACKAGE_NAME,
|
|
97
|
+
url: resolveWixReceiptsV1ReceiptsUrl({
|
|
98
|
+
protoPath: '/v1/receipts/{receiptId}',
|
|
99
|
+
data: payload,
|
|
100
|
+
host,
|
|
101
|
+
}),
|
|
102
|
+
params: toURLSearchParams(payload),
|
|
103
|
+
transformResponse: (payload) => transformPaths(payload, [
|
|
104
|
+
{
|
|
105
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
106
|
+
paths: [
|
|
107
|
+
{ path: 'receipt.createdDate' },
|
|
108
|
+
{ path: 'receipt.updatedDate' },
|
|
109
|
+
{ path: 'receipt.businessDetails.logo.urlExpirationDate' },
|
|
110
|
+
{ path: 'receipt.payment.transactionDate' },
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
115
|
+
paths: [
|
|
116
|
+
{ path: 'receipt.businessDetails.address.geocode.latitude' },
|
|
117
|
+
{ path: 'receipt.businessDetails.address.geocode.longitude' },
|
|
118
|
+
{ path: 'receipt.customer.billingAddress.geocode.latitude' },
|
|
119
|
+
{ path: 'receipt.customer.billingAddress.geocode.longitude' },
|
|
120
|
+
{ path: 'receipt.customer.shippingAddress.geocode.latitude' },
|
|
121
|
+
{ path: 'receipt.customer.shippingAddress.geocode.longitude' },
|
|
122
|
+
],
|
|
123
|
+
},
|
|
124
|
+
]),
|
|
125
|
+
};
|
|
126
|
+
return metadata;
|
|
127
|
+
}
|
|
128
|
+
return __getReceipt;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Retrieves a list of up to 100 Receipts, given the provided [paging, filtering, and sorting][1].
|
|
132
|
+
*
|
|
133
|
+
* Define queries using WQL - Wix Query Language. To learn how to query Receipts, see [API Query Language][2].
|
|
134
|
+
*
|
|
135
|
+
* [1]: https://dev.wix.com/api/rest/getting-started/sorting-and-paging
|
|
136
|
+
* [2]: https://dev.wix.com/api/rest/getting-started/api-query-language
|
|
137
|
+
*/
|
|
138
|
+
export function queryReceipts(payload) {
|
|
139
|
+
function __queryReceipts({ host }) {
|
|
140
|
+
const metadata = {
|
|
141
|
+
entityFqdn: 'wix.receipts.v1.receipt',
|
|
142
|
+
method: 'POST',
|
|
143
|
+
methodFqn: 'wix.receipts.v1.Receipts.QueryReceipts',
|
|
144
|
+
packageName: PACKAGE_NAME,
|
|
145
|
+
url: resolveWixReceiptsV1ReceiptsUrl({
|
|
146
|
+
protoPath: '/v1/receipts/query',
|
|
147
|
+
data: payload,
|
|
148
|
+
host,
|
|
149
|
+
}),
|
|
150
|
+
data: payload,
|
|
151
|
+
transformResponse: (payload) => transformPaths(payload, [
|
|
152
|
+
{
|
|
153
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
154
|
+
paths: [
|
|
155
|
+
{ path: 'receipts.createdDate' },
|
|
156
|
+
{ path: 'receipts.updatedDate' },
|
|
157
|
+
{ path: 'receipts.businessDetails.logo.urlExpirationDate' },
|
|
158
|
+
{ path: 'receipts.payment.transactionDate' },
|
|
159
|
+
],
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
163
|
+
paths: [
|
|
164
|
+
{ path: 'receipts.businessDetails.address.geocode.latitude' },
|
|
165
|
+
{ path: 'receipts.businessDetails.address.geocode.longitude' },
|
|
166
|
+
{ path: 'receipts.customer.billingAddress.geocode.latitude' },
|
|
167
|
+
{ path: 'receipts.customer.billingAddress.geocode.longitude' },
|
|
168
|
+
{ path: 'receipts.customer.shippingAddress.geocode.latitude' },
|
|
169
|
+
{ path: 'receipts.customer.shippingAddress.geocode.longitude' },
|
|
170
|
+
],
|
|
171
|
+
},
|
|
172
|
+
]),
|
|
173
|
+
};
|
|
174
|
+
return metadata;
|
|
175
|
+
}
|
|
176
|
+
return __queryReceipts;
|
|
177
|
+
}
|
|
178
|
+
/** Retries generating document if its status is FAILED. */
|
|
179
|
+
export function regenerateReceiptDocument(payload) {
|
|
180
|
+
function __regenerateReceiptDocument({ host }) {
|
|
181
|
+
const metadata = {
|
|
182
|
+
entityFqdn: 'wix.receipts.v1.receipt',
|
|
183
|
+
method: 'POST',
|
|
184
|
+
methodFqn: 'wix.receipts.v1.Receipts.RegenerateReceiptDocument',
|
|
185
|
+
packageName: PACKAGE_NAME,
|
|
186
|
+
url: resolveWixReceiptsV1ReceiptsUrl({
|
|
187
|
+
protoPath: '/v1/receipts/{receiptId}/regenerate-receipt-document',
|
|
188
|
+
data: payload,
|
|
189
|
+
host,
|
|
190
|
+
}),
|
|
191
|
+
data: payload,
|
|
192
|
+
};
|
|
193
|
+
return metadata;
|
|
194
|
+
}
|
|
195
|
+
return __regenerateReceiptDocument;
|
|
196
|
+
}
|
|
197
|
+
/** Sends email with Receipt. */
|
|
198
|
+
export function sendReceiptEmail(payload) {
|
|
199
|
+
function __sendReceiptEmail({ host }) {
|
|
200
|
+
const metadata = {
|
|
201
|
+
entityFqdn: 'wix.receipts.v1.receipt',
|
|
202
|
+
method: 'POST',
|
|
203
|
+
methodFqn: 'wix.receipts.v1.Receipts.SendReceiptEmail',
|
|
204
|
+
packageName: PACKAGE_NAME,
|
|
205
|
+
url: resolveWixReceiptsV1ReceiptsUrl({
|
|
206
|
+
protoPath: '/v1/receipts/{receiptId}/send-email',
|
|
207
|
+
data: payload,
|
|
208
|
+
host,
|
|
209
|
+
}),
|
|
210
|
+
data: payload,
|
|
211
|
+
};
|
|
212
|
+
return metadata;
|
|
213
|
+
}
|
|
214
|
+
return __sendReceiptEmail;
|
|
215
|
+
}
|
|
216
|
+
/** Returns latest number for a given prefix. */
|
|
217
|
+
export function getLatestReceiptNumber(payload) {
|
|
218
|
+
function __getLatestReceiptNumber({ host }) {
|
|
219
|
+
const metadata = {
|
|
220
|
+
entityFqdn: 'wix.receipts.v1.receipt',
|
|
221
|
+
method: 'GET',
|
|
222
|
+
methodFqn: 'wix.receipts.v1.Receipts.GetLatestReceiptNumber',
|
|
223
|
+
packageName: PACKAGE_NAME,
|
|
224
|
+
url: resolveWixReceiptsV1ReceiptsUrl({
|
|
225
|
+
protoPath: '/v1/receipts/get-latest-number',
|
|
226
|
+
data: payload,
|
|
227
|
+
host,
|
|
228
|
+
}),
|
|
229
|
+
params: toURLSearchParams(payload),
|
|
230
|
+
};
|
|
231
|
+
return metadata;
|
|
232
|
+
}
|
|
233
|
+
return __getLatestReceiptNumber;
|
|
234
|
+
}
|
|
235
|
+
/** Updates extended fields of a Receipt without incrementing revision. */
|
|
236
|
+
export function updateExtendedFields(payload) {
|
|
237
|
+
function __updateExtendedFields({ host }) {
|
|
238
|
+
const metadata = {
|
|
239
|
+
entityFqdn: 'wix.receipts.v1.receipt',
|
|
240
|
+
method: 'POST',
|
|
241
|
+
methodFqn: 'wix.receipts.v1.Receipts.UpdateExtendedFields',
|
|
242
|
+
packageName: PACKAGE_NAME,
|
|
243
|
+
url: resolveWixReceiptsV1ReceiptsUrl({
|
|
244
|
+
protoPath: '/v1/receipts/{id}/update-extended-fields',
|
|
245
|
+
data: payload,
|
|
246
|
+
host,
|
|
247
|
+
}),
|
|
248
|
+
data: payload,
|
|
249
|
+
transformResponse: (payload) => transformPaths(payload, [
|
|
250
|
+
{
|
|
251
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
252
|
+
paths: [
|
|
253
|
+
{ path: 'receipt.createdDate' },
|
|
254
|
+
{ path: 'receipt.updatedDate' },
|
|
255
|
+
{ path: 'receipt.businessDetails.logo.urlExpirationDate' },
|
|
256
|
+
{ path: 'receipt.payment.transactionDate' },
|
|
257
|
+
],
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
261
|
+
paths: [
|
|
262
|
+
{ path: 'receipt.businessDetails.address.geocode.latitude' },
|
|
263
|
+
{ path: 'receipt.businessDetails.address.geocode.longitude' },
|
|
264
|
+
{ path: 'receipt.customer.billingAddress.geocode.latitude' },
|
|
265
|
+
{ path: 'receipt.customer.billingAddress.geocode.longitude' },
|
|
266
|
+
{ path: 'receipt.customer.shippingAddress.geocode.latitude' },
|
|
267
|
+
{ path: 'receipt.customer.shippingAddress.geocode.longitude' },
|
|
268
|
+
],
|
|
269
|
+
},
|
|
270
|
+
]),
|
|
271
|
+
};
|
|
272
|
+
return metadata;
|
|
273
|
+
}
|
|
274
|
+
return __updateExtendedFields;
|
|
275
|
+
}
|
|
276
|
+
//# sourceMappingURL=receipts-v1-receipt-receipts.http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receipts-v1-receipt-receipts.http.js","sourceRoot":"","sources":["../../../src/receipts-v1-receipt-receipts.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D,SAAS,+BAA+B,CACtC,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,gBAAgB;gBACzB,QAAQ,EAAE,EAAE;aACb;SACF;KACF,CAAC;IAEF,OAAO,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,YAAY,GAAG,iCAAiC,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,SAAS,eAAe,CAAC,EAAE,IAAI,EAAO;QACpC,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,EAAE;YAC7C;gBACE,WAAW,EAAE,oCAAoC;gBACjD,KAAK,EAAE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CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,oBAAoB,CAClC,OAAe;IAEf,SAAS,sBAAsB,CAAC,EAAE,IAAI,EAAO;QAC3C,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,yBAAyB;YACrC,MAAM,EAAE,MAAa;YACrB,SAAS,EAAE,+CAA+C;YAC1D,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,+BAA+B,CAAC;gBACnC,SAAS,EAAE,0CAA0C;gBACrD,IAAI,EAAE,OAAO;gBACb,IAAI;aACL,CAAC;YACF,IAAI,EAAE,OAAO;YACb,iBAAiB,EAAE,CAAC,OAAY,EAAE,EAAE,CAClC,cAAc,CAAC,OAAO,EAAE;gBACtB;oBACE,WAAW,EAAE,oCAAoC;oBACjD,KAAK,EAAE;wBACL,EAAE,IAAI,EAAE,qBAAqB,EAAE;wBAC/B,EAAE,IAAI,EAAE,qBAAqB,EAAE;wBAC/B,EAAE,IAAI,EAAE,gDAAgD,EAAE;wBAC1D,EAAE,IAAI,EAAE,iCAAiC,EAAE;qBAC5C;iBACF;gBACD;oBACE,WAAW,EAAE,4BAA4B;oBACzC,KAAK,EAAE;wBACL,EAAE,IAAI,EAAE,kDAAkD,EAAE;wBAC5D,EAAE,IAAI,EAAE,mDAAmD,EAAE;wBAC7D,EAAE,IAAI,EAAE,kDAAkD,EAAE;wBAC5D,EAAE,IAAI,EAAE,mDAAmD,EAAE;wBAC7D,EAAE,IAAI,EAAE,mDAAmD,EAAE;wBAC7D,EAAE,IAAI,EAAE,oDAAoD,EAAE;qBAC/D;iBACF;aACF,CAAC;SACL,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,sBAAsB,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as ambassadorWixReceiptsV1ReceiptTypes from './receipts-v1-receipt-receipts.types.js';
|
|
2
|
+
import * as ambassadorWixReceiptsV1ReceiptUniversalTypes from './receipts-v1-receipt-receipts.universal.js';
|
|
3
|
+
export type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
4
|
+
getUrl: (context: any) => string;
|
|
5
|
+
httpMethod: K;
|
|
6
|
+
path: string;
|
|
7
|
+
pathParams: M;
|
|
8
|
+
__requestType: T;
|
|
9
|
+
__originalRequestType: S;
|
|
10
|
+
__responseType: Q;
|
|
11
|
+
__originalResponseType: R;
|
|
12
|
+
};
|
|
13
|
+
export declare function createReceipt(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixReceiptsV1ReceiptUniversalTypes.CreateReceiptRequest, ambassadorWixReceiptsV1ReceiptTypes.CreateReceiptRequest, ambassadorWixReceiptsV1ReceiptUniversalTypes.CreateReceiptResponse & ambassadorWixReceiptsV1ReceiptUniversalTypes.CreateReceiptResponseNonNullableFields, ambassadorWixReceiptsV1ReceiptTypes.CreateReceiptResponse & ambassadorWixReceiptsV1ReceiptTypes.CreateReceiptResponseNonNullableFields>;
|
|
14
|
+
export declare function getReceipt(): __PublicMethodMetaInfo<'GET', {
|
|
15
|
+
receiptId: string;
|
|
16
|
+
}, ambassadorWixReceiptsV1ReceiptUniversalTypes.GetReceiptRequest, ambassadorWixReceiptsV1ReceiptTypes.GetReceiptRequest, ambassadorWixReceiptsV1ReceiptUniversalTypes.GetReceiptResponse & ambassadorWixReceiptsV1ReceiptUniversalTypes.GetReceiptResponseNonNullableFields, ambassadorWixReceiptsV1ReceiptTypes.GetReceiptResponse & ambassadorWixReceiptsV1ReceiptTypes.GetReceiptResponseNonNullableFields>;
|
|
17
|
+
export declare function queryReceipts(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixReceiptsV1ReceiptUniversalTypes.QueryReceiptsRequest, ambassadorWixReceiptsV1ReceiptTypes.QueryReceiptsRequest, ambassadorWixReceiptsV1ReceiptUniversalTypes.QueryReceiptsResponse & ambassadorWixReceiptsV1ReceiptUniversalTypes.QueryReceiptsResponseNonNullableFields, ambassadorWixReceiptsV1ReceiptTypes.QueryReceiptsResponse & ambassadorWixReceiptsV1ReceiptTypes.QueryReceiptsResponseNonNullableFields>;
|
|
18
|
+
export declare function regenerateReceiptDocument(): __PublicMethodMetaInfo<'POST', {
|
|
19
|
+
receiptId: string;
|
|
20
|
+
}, ambassadorWixReceiptsV1ReceiptUniversalTypes.RegenerateReceiptDocumentRequest, ambassadorWixReceiptsV1ReceiptTypes.RegenerateReceiptDocumentRequest, ambassadorWixReceiptsV1ReceiptUniversalTypes.RegenerateReceiptDocumentResponse, ambassadorWixReceiptsV1ReceiptTypes.RegenerateReceiptDocumentResponse>;
|
|
21
|
+
export declare function sendReceiptEmail(): __PublicMethodMetaInfo<'POST', {
|
|
22
|
+
receiptId: string;
|
|
23
|
+
}, ambassadorWixReceiptsV1ReceiptUniversalTypes.SendReceiptEmailRequest, ambassadorWixReceiptsV1ReceiptTypes.SendReceiptEmailRequest, ambassadorWixReceiptsV1ReceiptUniversalTypes.SendReceiptEmailResponse, ambassadorWixReceiptsV1ReceiptTypes.SendReceiptEmailResponse>;
|
|
24
|
+
export declare function getLatestReceiptNumber(): __PublicMethodMetaInfo<'GET', {}, ambassadorWixReceiptsV1ReceiptUniversalTypes.GetLatestReceiptNumberRequest, ambassadorWixReceiptsV1ReceiptTypes.GetLatestReceiptNumberRequest, ambassadorWixReceiptsV1ReceiptUniversalTypes.GetLatestReceiptNumberResponse, ambassadorWixReceiptsV1ReceiptTypes.GetLatestReceiptNumberResponse>;
|
|
25
|
+
export declare function updateExtendedFields(): __PublicMethodMetaInfo<'POST', {
|
|
26
|
+
id: string;
|
|
27
|
+
}, ambassadorWixReceiptsV1ReceiptUniversalTypes.UpdateExtendedFieldsRequest, ambassadorWixReceiptsV1ReceiptTypes.UpdateExtendedFieldsRequest, ambassadorWixReceiptsV1ReceiptUniversalTypes.UpdateExtendedFieldsResponse & ambassadorWixReceiptsV1ReceiptUniversalTypes.UpdateExtendedFieldsResponseNonNullableFields, ambassadorWixReceiptsV1ReceiptTypes.UpdateExtendedFieldsResponse & ambassadorWixReceiptsV1ReceiptTypes.UpdateExtendedFieldsResponseNonNullableFields>;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import * as ambassadorWixReceiptsV1Receipt from './receipts-v1-receipt-receipts.http.js';
|
|
2
|
+
export function createReceipt() {
|
|
3
|
+
const payload = {};
|
|
4
|
+
const getRequestOptions = ambassadorWixReceiptsV1Receipt.createReceipt(payload);
|
|
5
|
+
const getUrl = (context) => {
|
|
6
|
+
const { url } = getRequestOptions(context);
|
|
7
|
+
return url;
|
|
8
|
+
};
|
|
9
|
+
return {
|
|
10
|
+
getUrl,
|
|
11
|
+
httpMethod: 'POST',
|
|
12
|
+
path: '/v1/receipts',
|
|
13
|
+
pathParams: {},
|
|
14
|
+
__requestType: null,
|
|
15
|
+
__originalRequestType: null,
|
|
16
|
+
__responseType: null,
|
|
17
|
+
__originalResponseType: null,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export function getReceipt() {
|
|
21
|
+
const payload = { receiptId: ':receiptId' };
|
|
22
|
+
const getRequestOptions = ambassadorWixReceiptsV1Receipt.getReceipt(payload);
|
|
23
|
+
const getUrl = (context) => {
|
|
24
|
+
const { url } = getRequestOptions(context);
|
|
25
|
+
return url;
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
getUrl,
|
|
29
|
+
httpMethod: 'GET',
|
|
30
|
+
path: '/v1/receipts/{receiptId}',
|
|
31
|
+
pathParams: { receiptId: 'receiptId' },
|
|
32
|
+
__requestType: null,
|
|
33
|
+
__originalRequestType: null,
|
|
34
|
+
__responseType: null,
|
|
35
|
+
__originalResponseType: null,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function queryReceipts() {
|
|
39
|
+
const payload = {};
|
|
40
|
+
const getRequestOptions = ambassadorWixReceiptsV1Receipt.queryReceipts(payload);
|
|
41
|
+
const getUrl = (context) => {
|
|
42
|
+
const { url } = getRequestOptions(context);
|
|
43
|
+
return url;
|
|
44
|
+
};
|
|
45
|
+
return {
|
|
46
|
+
getUrl,
|
|
47
|
+
httpMethod: 'POST',
|
|
48
|
+
path: '/v1/receipts/query',
|
|
49
|
+
pathParams: {},
|
|
50
|
+
__requestType: null,
|
|
51
|
+
__originalRequestType: null,
|
|
52
|
+
__responseType: null,
|
|
53
|
+
__originalResponseType: null,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export function regenerateReceiptDocument() {
|
|
57
|
+
const payload = { receiptId: ':receiptId' };
|
|
58
|
+
const getRequestOptions = ambassadorWixReceiptsV1Receipt.regenerateReceiptDocument(payload);
|
|
59
|
+
const getUrl = (context) => {
|
|
60
|
+
const { url } = getRequestOptions(context);
|
|
61
|
+
return url;
|
|
62
|
+
};
|
|
63
|
+
return {
|
|
64
|
+
getUrl,
|
|
65
|
+
httpMethod: 'POST',
|
|
66
|
+
path: '/v1/receipts/{receiptId}/regenerate-receipt-document',
|
|
67
|
+
pathParams: { receiptId: 'receiptId' },
|
|
68
|
+
__requestType: null,
|
|
69
|
+
__originalRequestType: null,
|
|
70
|
+
__responseType: null,
|
|
71
|
+
__originalResponseType: null,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
export function sendReceiptEmail() {
|
|
75
|
+
const payload = { receiptId: ':receiptId' };
|
|
76
|
+
const getRequestOptions = ambassadorWixReceiptsV1Receipt.sendReceiptEmail(payload);
|
|
77
|
+
const getUrl = (context) => {
|
|
78
|
+
const { url } = getRequestOptions(context);
|
|
79
|
+
return url;
|
|
80
|
+
};
|
|
81
|
+
return {
|
|
82
|
+
getUrl,
|
|
83
|
+
httpMethod: 'POST',
|
|
84
|
+
path: '/v1/receipts/{receiptId}/send-email',
|
|
85
|
+
pathParams: { receiptId: 'receiptId' },
|
|
86
|
+
__requestType: null,
|
|
87
|
+
__originalRequestType: null,
|
|
88
|
+
__responseType: null,
|
|
89
|
+
__originalResponseType: null,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
export function getLatestReceiptNumber() {
|
|
93
|
+
const payload = {};
|
|
94
|
+
const getRequestOptions = ambassadorWixReceiptsV1Receipt.getLatestReceiptNumber(payload);
|
|
95
|
+
const getUrl = (context) => {
|
|
96
|
+
const { url } = getRequestOptions(context);
|
|
97
|
+
return url;
|
|
98
|
+
};
|
|
99
|
+
return {
|
|
100
|
+
getUrl,
|
|
101
|
+
httpMethod: 'GET',
|
|
102
|
+
path: '/v1/receipts/get-latest-number',
|
|
103
|
+
pathParams: {},
|
|
104
|
+
__requestType: null,
|
|
105
|
+
__originalRequestType: null,
|
|
106
|
+
__responseType: null,
|
|
107
|
+
__originalResponseType: null,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
export function updateExtendedFields() {
|
|
111
|
+
const payload = { id: ':id' };
|
|
112
|
+
const getRequestOptions = ambassadorWixReceiptsV1Receipt.updateExtendedFields(payload);
|
|
113
|
+
const getUrl = (context) => {
|
|
114
|
+
const { url } = getRequestOptions(context);
|
|
115
|
+
return url;
|
|
116
|
+
};
|
|
117
|
+
return {
|
|
118
|
+
getUrl,
|
|
119
|
+
httpMethod: 'POST',
|
|
120
|
+
path: '/v1/receipts/{id}/update-extended-fields',
|
|
121
|
+
pathParams: { id: 'id' },
|
|
122
|
+
__requestType: null,
|
|
123
|
+
__originalRequestType: null,
|
|
124
|
+
__responseType: null,
|
|
125
|
+
__originalResponseType: null,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=receipts-v1-receipt-receipts.meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receipts-v1-receipt-receipts.meta.js","sourceRoot":"","sources":["../../../src/receipts-v1-receipt-receipts.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,8BAA8B,MAAM,wCAAwC,CAAC;AAsBzF,MAAM,UAAU,aAAa;IAU3B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,8BAA8B,CAAC,aAAa,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AC;AACJ,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
+
import { GetLatestReceiptNumberOptions, GetLatestReceiptNumberResponse, Receipt, ReceiptNonNullableFields, ReceiptsQueryBuilder, SendReceiptEmailOptions, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateExtendedFieldsResponseNonNullableFields } from './receipts-v1-receipt-receipts.universal.js';
|
|
3
|
+
export declare const __metadata: {
|
|
4
|
+
PACKAGE_NAME: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function createReceipt(httpClient: HttpClient): CreateReceiptSignature;
|
|
7
|
+
interface CreateReceiptSignature {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a Receipt.
|
|
10
|
+
*
|
|
11
|
+
* The request body must include: currency, source reference, line items, payment, totals.
|
|
12
|
+
* Receipt number will not be assigned on the create response. Number will be assigned eventually but before the
|
|
13
|
+
* document file is created.
|
|
14
|
+
* @param - Receipt to be created.
|
|
15
|
+
* @returns The created Receipt.
|
|
16
|
+
*/
|
|
17
|
+
(receipt: Receipt): Promise<Receipt & ReceiptNonNullableFields>;
|
|
18
|
+
}
|
|
19
|
+
export declare function getReceipt(httpClient: HttpClient): GetReceiptSignature;
|
|
20
|
+
interface GetReceiptSignature {
|
|
21
|
+
/**
|
|
22
|
+
* Retrieves a Receipt.
|
|
23
|
+
* @param - Id of the Receipt to retrieve.
|
|
24
|
+
* @returns The requested Receipt.
|
|
25
|
+
*/
|
|
26
|
+
(receiptId: string): Promise<Receipt & ReceiptNonNullableFields>;
|
|
27
|
+
}
|
|
28
|
+
export declare function queryReceipts(httpClient: HttpClient): QueryReceiptsSignature;
|
|
29
|
+
interface QueryReceiptsSignature {
|
|
30
|
+
/**
|
|
31
|
+
* Retrieves a list of up to 100 Receipts, given the provided [paging, filtering, and sorting][1].
|
|
32
|
+
*
|
|
33
|
+
* Define queries using WQL - Wix Query Language. To learn how to query Receipts, see [API Query Language][2].
|
|
34
|
+
*
|
|
35
|
+
* [1]: https://dev.wix.com/api/rest/getting-started/sorting-and-paging
|
|
36
|
+
* [2]: https://dev.wix.com/api/rest/getting-started/api-query-language
|
|
37
|
+
*/
|
|
38
|
+
(): ReceiptsQueryBuilder;
|
|
39
|
+
}
|
|
40
|
+
export declare function regenerateReceiptDocument(httpClient: HttpClient): RegenerateReceiptDocumentSignature;
|
|
41
|
+
interface RegenerateReceiptDocumentSignature {
|
|
42
|
+
/**
|
|
43
|
+
* Retries generating document if its status is FAILED.
|
|
44
|
+
* @param - Receipt id.
|
|
45
|
+
*/
|
|
46
|
+
(receiptId: string): Promise<void>;
|
|
47
|
+
}
|
|
48
|
+
export declare function sendReceiptEmail(httpClient: HttpClient): SendReceiptEmailSignature;
|
|
49
|
+
interface SendReceiptEmailSignature {
|
|
50
|
+
/**
|
|
51
|
+
* Sends email with Receipt.
|
|
52
|
+
* @param - Id of the receipt to send to recipients.
|
|
53
|
+
*/
|
|
54
|
+
(receiptId: string, options?: SendReceiptEmailOptions | undefined): Promise<void>;
|
|
55
|
+
}
|
|
56
|
+
export declare function getLatestReceiptNumber(httpClient: HttpClient): GetLatestReceiptNumberSignature;
|
|
57
|
+
interface GetLatestReceiptNumberSignature {
|
|
58
|
+
/**
|
|
59
|
+
* Returns latest number for a given prefix.
|
|
60
|
+
*/
|
|
61
|
+
(options?: GetLatestReceiptNumberOptions | undefined): Promise<GetLatestReceiptNumberResponse>;
|
|
62
|
+
}
|
|
63
|
+
export declare function updateExtendedFields(httpClient: HttpClient): UpdateExtendedFieldsSignature;
|
|
64
|
+
interface UpdateExtendedFieldsSignature {
|
|
65
|
+
/**
|
|
66
|
+
* Updates extended fields of a Receipt without incrementing revision.
|
|
67
|
+
* @param - ID of the entity to update.
|
|
68
|
+
* @param - Identifier for the app whose extended fields are being updated.
|
|
69
|
+
*/
|
|
70
|
+
(_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse & UpdateExtendedFieldsResponseNonNullableFields>;
|
|
71
|
+
}
|
|
72
|
+
export { ActionEvent, AdditionalFee, AdditionalFeeTax, Address, AddressLocation, AddressStreetOneOf, BusinessDetails, CreateReceiptRequest, CreateReceiptResponse, CreateReceiptResponseNonNullableFields, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, CustomField, CustomFields, Customer, Discount, Document, DocumentStatus, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, Failed, FooterCustomField, FullAddressContactDetails, GenerateReceiptDocument, GetLatestReceiptNumberOptions, GetLatestReceiptNumberRequest, GetLatestReceiptNumberResponse, GetReceiptRequest, GetReceiptResponse, GetReceiptResponseNonNullableFields, IdentificationData, IdentificationDataIdOneOf, LineItem, LineItemTax, LineItemTotals, Locale, MessageEnvelope, Numbering, Payment, QueryReceiptsRequest, QueryReceiptsResponse, QueryReceiptsResponseNonNullableFields, Receipt, ReceiptDocumentHandled, ReceiptDocumentHandledResultOneOf, ReceiptDocumentProcess, ReceiptNonNullableFields, ReceiptNumberingProcess, ReceiptOrderType, ReceiptsQueryBuilder, ReceiptsQueryResult, RegenerateReceiptDocumentRequest, RegenerateReceiptDocumentResponse, RegionalProperties, RequestOrigin, RestoreInfo, SendReceiptEmailOptions, SendReceiptEmailRequest, SendReceiptEmailResponse, Sent, ShippingInfo, ShippingTax, SortOrder, Sorting, SourceReference, SourceReferenceOrderOneOf, StandardDetails, StreetAddress, Subdivision, SubdivisionType, Succeeded, Tax, Totals, UpdateExtendedFieldsOptions, UpdateExtendedFieldsRequest, UpdateExtendedFieldsResponse, UpdateExtendedFieldsResponseNonNullableFields, VatId, VatType, WebhookIdentityType, WixEcom, WixPayment, } from './receipts-v1-receipt-receipts.universal.js';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { createReceipt as universalCreateReceipt, getLatestReceiptNumber as universalGetLatestReceiptNumber, getReceipt as universalGetReceipt, queryReceipts as universalQueryReceipts, regenerateReceiptDocument as universalRegenerateReceiptDocument, sendReceiptEmail as universalSendReceiptEmail, updateExtendedFields as universalUpdateExtendedFields, } from './receipts-v1-receipt-receipts.universal.js';
|
|
2
|
+
export const __metadata = { PACKAGE_NAME: '@wix/get-paid' };
|
|
3
|
+
export function createReceipt(httpClient) {
|
|
4
|
+
return (receipt) => universalCreateReceipt(receipt,
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
{ httpClient });
|
|
7
|
+
}
|
|
8
|
+
export function getReceipt(httpClient) {
|
|
9
|
+
return (receiptId) => universalGetReceipt(receiptId,
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
{ httpClient });
|
|
12
|
+
}
|
|
13
|
+
export function queryReceipts(httpClient) {
|
|
14
|
+
return () => universalQueryReceipts(
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
{ httpClient });
|
|
17
|
+
}
|
|
18
|
+
export function regenerateReceiptDocument(httpClient) {
|
|
19
|
+
return (receiptId) => universalRegenerateReceiptDocument(receiptId,
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
{ httpClient });
|
|
22
|
+
}
|
|
23
|
+
export function sendReceiptEmail(httpClient) {
|
|
24
|
+
return (receiptId, options) => universalSendReceiptEmail(receiptId, options,
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
{ httpClient });
|
|
27
|
+
}
|
|
28
|
+
export function getLatestReceiptNumber(httpClient) {
|
|
29
|
+
return (options) => universalGetLatestReceiptNumber(options,
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
{ httpClient });
|
|
32
|
+
}
|
|
33
|
+
export function updateExtendedFields(httpClient) {
|
|
34
|
+
return (_id, namespace, options) => universalUpdateExtendedFields(_id, namespace, options,
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
{ httpClient });
|
|
37
|
+
}
|
|
38
|
+
export { DocumentStatus, ReceiptOrderType, RequestOrigin, SortOrder, SubdivisionType, VatType, WebhookIdentityType, } from './receipts-v1-receipt-receipts.universal.js';
|
|
39
|
+
//# sourceMappingURL=receipts-v1-receipt-receipts.public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receipts-v1-receipt-receipts.public.js","sourceRoot":"","sources":["../../../src/receipts-v1-receipt-receipts.public.ts"],"names":[],"mappings":"AACA,OAAO,EAUL,aAAa,IAAI,sBAAsB,EACvC,sBAAsB,IAAI,+BAA+B,EACzD,UAAU,IAAI,mBAAmB,EACjC,aAAa,IAAI,sBAAsB,EACvC,yBAAyB,IAAI,kCAAkC,EAC/D,gBAAgB,IAAI,yBAAyB,EAC7C,oBAAoB,IAAI,6BAA6B,GACtD,MAAM,6CAA6C,CAAC;AAErD,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;AAE5D,MAAM,UAAU,aAAa,CAAC,UAAsB;IAClD,OAAO,CAAC,OAAgB,EAAE,EAAE,CAC1B,sBAAsB,CACpB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAeD,MAAM,UAAU,UAAU,CAAC,UAAsB;IAC/C,OAAO,CAAC,SAAiB,EAAE,EAAE,CAC3B,mBAAmB,CACjB,SAAS;IACT,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAWD,MAAM,UAAU,aAAa,CAAC,UAAsB;IAClD,OAAO,GAAG,EAAE,CACV,sBAAsB;IACpB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAcD,MAAM,UAAU,yBAAyB,CACvC,UAAsB;IAEtB,OAAO,CAAC,SAAiB,EAAE,EAAE,CAC3B,kCAAkC,CAChC,SAAS;IACT,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAUD,MAAM,UAAU,gBAAgB,CAC9B,UAAsB;IAEtB,OAAO,CAAC,SAAiB,EAAE,OAAiC,EAAE,EAAE,CAC9D,yBAAyB,CACvB,SAAS,EACT,OAAO;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