@aifeatures/backend 0.2.0 → 0.3.1
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 +6 -1009
- package/dist/index.d.cts +3385 -94
- package/dist/index.d.ts +3385 -94
- package/dist/index.js +6 -964
- package/package.json +8 -8
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,1010 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
"use strict";var j=Object.defineProperty;var lr=Object.getOwnPropertyDescriptor;var hr=Object.getOwnPropertyNames;var mr=Object.prototype.hasOwnProperty;var yr=(e,r)=>{for(var t in r)j(e,t,{get:r[t],enumerable:!0})},Or=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of hr(r))!mr.call(e,n)&&n!==t&&j(e,n,{get:()=>r[n],enumerable:!(a=lr(r,n))||a.enumerable});return e};var fr=e=>Or(j({},"__esModule",{value:!0}),e);var xr={};yr(xr,{adjustVariantInventory:()=>Ee,attachProductFile:()=>pe,createCartCheckout:()=>sr,createCheckout:()=>tr,createClient:()=>G,createConfig:()=>D,createCustomer:()=>ge,createForm:()=>Je,createFormWithSiteToken:()=>Ae,createMultiItemTestOrder:()=>ue,createOption:()=>ye,createProduct:()=>oe,createProductWithSiteToken:()=>te,createSite:()=>qe,createTestOrder:()=>de,createVariant:()=>ce,deleteForm:()=>Qe,deleteOption:()=>Oe,deleteProduct:()=>ne,deleteSite:()=>We,deleteSubmission:()=>Ye,deleteVariant:()=>he,downloadAttachment:()=>er,downloadFile:()=>ar,getBusinessSummary:()=>Ge,getCartSummary:()=>or,getCustomer:()=>xe,getForm:()=>_e,getGeo:()=>ir,getNextPayout:()=>Ue,getOrder:()=>Ce,getOrderSession:()=>nr,getPaymentsStatus:()=>ee,getPerson:()=>ve,getProduct:()=>ae,getPublicProduct:()=>rr,getSalesSummary:()=>Fe,getSite:()=>ze,getSiteCheckoutPause:()=>Ne,getSubmission:()=>Ze,listCustomers:()=>Pe,listForms:()=>He,listFormsWithSiteToken:()=>je,listOrdersWithSiteToken:()=>Re,listPeople:()=>Ie,listProducts:()=>se,listProductsWithSiteToken:()=>re,listSites:()=>Ve,listSubmissions:()=>Xe,pauseSiteCheckout:()=>Me,refundOrder:()=>Te,resendOrderReceipt:()=>be,resetOrderDownloads:()=>De,resetWebhookEvent:()=>we,setOrderFulfillment:()=>Le,setProductVariants:()=>le,setVariantInventory:()=>Se,updateCustomer:()=>ke,updateForm:()=>Ke,updateOption:()=>fe,updateProduct:()=>ie,updateSite:()=>Be,updateSiteDomains:()=>$e,updateSitePayments:()=>Z,updateVariant:()=>me});module.exports=fr(xr);var A={bodySerializer:e=>JSON.stringify(e,(r,t)=>typeof t=="bigint"?t.toString():t)};var Sr={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},Fr=Object.entries(Sr);var $=({onRequest:e,onSseError:r,onSseEvent:t,responseTransformer:a,responseValidator:n,sseDefaultRetryDelay:u,sseMaxRetryAttempts:p,sseMaxRetryDelay:i,sseSleepFn:d,url:l,...o})=>{let y,P=d??(c=>new Promise(O=>setTimeout(O,c)));return{stream:async function*(){let c=u??3e3,O=0,C=o.signal??new AbortController().signal;for(;!C.aborted;){O++;let g=o.headers instanceof Headers?o.headers:new Headers(o.headers);y!==void 0&&g.set("Last-Event-ID",y);try{let T={redirect:"follow",...o,body:o.serializedBody,headers:g,signal:C},R=new Request(l,T);e&&(R=await e(l,T));let m=await(o.fetch??globalThis.fetch)(R);if(!m.ok)throw new Error(`SSE failed: ${m.status} ${m.statusText}`);if(!m.body)throw new Error("No body in SSE response");let f=m.body.pipeThrough(new TextDecoderStream).getReader(),x="",W=()=>{try{f.cancel()}catch{}};C.addEventListener("abort",W);try{for(;;){let{done:pr,value:dr}=await f.read();if(pr)break;x+=dr,x=x.replace(/\r\n/g,`
|
|
2
|
+
`).replace(/\r/g,`
|
|
3
|
+
`);let z=x.split(`
|
|
19
4
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
__export(index_exports, {
|
|
23
|
-
createClient: () => createClient,
|
|
24
|
-
createConfig: () => createConfig,
|
|
25
|
-
createForm: () => createForm,
|
|
26
|
-
createFormWithSiteToken: () => createFormWithSiteToken,
|
|
27
|
-
createSite: () => createSite,
|
|
28
|
-
deleteForm: () => deleteForm,
|
|
29
|
-
deleteSite: () => deleteSite,
|
|
30
|
-
deleteSubmission: () => deleteSubmission,
|
|
31
|
-
downloadAttachment: () => downloadAttachment,
|
|
32
|
-
getForm: () => getForm,
|
|
33
|
-
getSite: () => getSite,
|
|
34
|
-
getSubmission: () => getSubmission,
|
|
35
|
-
listForms: () => listForms,
|
|
36
|
-
listFormsWithSiteToken: () => listFormsWithSiteToken,
|
|
37
|
-
listSites: () => listSites,
|
|
38
|
-
listSubmissions: () => listSubmissions,
|
|
39
|
-
updateForm: () => updateForm,
|
|
40
|
-
updateSite: () => updateSite,
|
|
41
|
-
updateSiteDomains: () => updateSiteDomains
|
|
42
|
-
});
|
|
43
|
-
module.exports = __toCommonJS(index_exports);
|
|
44
|
-
|
|
45
|
-
// src/client/core/bodySerializer.gen.ts
|
|
46
|
-
var jsonBodySerializer = {
|
|
47
|
-
bodySerializer: (body) => JSON.stringify(
|
|
48
|
-
body,
|
|
49
|
-
(_key, value) => typeof value === "bigint" ? value.toString() : value
|
|
50
|
-
)
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
// src/client/core/params.gen.ts
|
|
54
|
-
var extraPrefixesMap = {
|
|
55
|
-
$body_: "body",
|
|
56
|
-
$headers_: "headers",
|
|
57
|
-
$path_: "path",
|
|
58
|
-
$query_: "query"
|
|
59
|
-
};
|
|
60
|
-
var extraPrefixes = Object.entries(extraPrefixesMap);
|
|
61
|
-
|
|
62
|
-
// src/client/core/serverSentEvents.gen.ts
|
|
63
|
-
var createSseClient = ({
|
|
64
|
-
onRequest,
|
|
65
|
-
onSseError,
|
|
66
|
-
onSseEvent,
|
|
67
|
-
responseTransformer,
|
|
68
|
-
responseValidator,
|
|
69
|
-
sseDefaultRetryDelay,
|
|
70
|
-
sseMaxRetryAttempts,
|
|
71
|
-
sseMaxRetryDelay,
|
|
72
|
-
sseSleepFn,
|
|
73
|
-
url,
|
|
74
|
-
...options
|
|
75
|
-
}) => {
|
|
76
|
-
let lastEventId;
|
|
77
|
-
const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
78
|
-
const createStream = async function* () {
|
|
79
|
-
let retryDelay = sseDefaultRetryDelay ?? 3e3;
|
|
80
|
-
let attempt = 0;
|
|
81
|
-
const signal = options.signal ?? new AbortController().signal;
|
|
82
|
-
while (true) {
|
|
83
|
-
if (signal.aborted) break;
|
|
84
|
-
attempt++;
|
|
85
|
-
const headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers);
|
|
86
|
-
if (lastEventId !== void 0) {
|
|
87
|
-
headers.set("Last-Event-ID", lastEventId);
|
|
88
|
-
}
|
|
89
|
-
try {
|
|
90
|
-
const requestInit = {
|
|
91
|
-
redirect: "follow",
|
|
92
|
-
...options,
|
|
93
|
-
body: options.serializedBody,
|
|
94
|
-
headers,
|
|
95
|
-
signal
|
|
96
|
-
};
|
|
97
|
-
let request = new Request(url, requestInit);
|
|
98
|
-
if (onRequest) {
|
|
99
|
-
request = await onRequest(url, requestInit);
|
|
100
|
-
}
|
|
101
|
-
const _fetch = options.fetch ?? globalThis.fetch;
|
|
102
|
-
const response = await _fetch(request);
|
|
103
|
-
if (!response.ok)
|
|
104
|
-
throw new Error(
|
|
105
|
-
`SSE failed: ${response.status} ${response.statusText}`
|
|
106
|
-
);
|
|
107
|
-
if (!response.body) throw new Error("No body in SSE response");
|
|
108
|
-
const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
|
|
109
|
-
let buffer = "";
|
|
110
|
-
const abortHandler = () => {
|
|
111
|
-
try {
|
|
112
|
-
reader.cancel();
|
|
113
|
-
} catch {
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
signal.addEventListener("abort", abortHandler);
|
|
117
|
-
try {
|
|
118
|
-
while (true) {
|
|
119
|
-
const { done, value } = await reader.read();
|
|
120
|
-
if (done) break;
|
|
121
|
-
buffer += value;
|
|
122
|
-
buffer = buffer.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
123
|
-
const chunks = buffer.split("\n\n");
|
|
124
|
-
buffer = chunks.pop() ?? "";
|
|
125
|
-
for (const chunk of chunks) {
|
|
126
|
-
const lines = chunk.split("\n");
|
|
127
|
-
const dataLines = [];
|
|
128
|
-
let eventName;
|
|
129
|
-
for (const line of lines) {
|
|
130
|
-
if (line.startsWith("data:")) {
|
|
131
|
-
dataLines.push(line.replace(/^data:\s*/, ""));
|
|
132
|
-
} else if (line.startsWith("event:")) {
|
|
133
|
-
eventName = line.replace(/^event:\s*/, "");
|
|
134
|
-
} else if (line.startsWith("id:")) {
|
|
135
|
-
lastEventId = line.replace(/^id:\s*/, "");
|
|
136
|
-
} else if (line.startsWith("retry:")) {
|
|
137
|
-
const parsed = Number.parseInt(
|
|
138
|
-
line.replace(/^retry:\s*/, ""),
|
|
139
|
-
10
|
|
140
|
-
);
|
|
141
|
-
if (!Number.isNaN(parsed)) {
|
|
142
|
-
retryDelay = parsed;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
let data;
|
|
147
|
-
let parsedJson = false;
|
|
148
|
-
if (dataLines.length) {
|
|
149
|
-
const rawData = dataLines.join("\n");
|
|
150
|
-
try {
|
|
151
|
-
data = JSON.parse(rawData);
|
|
152
|
-
parsedJson = true;
|
|
153
|
-
} catch {
|
|
154
|
-
data = rawData;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
if (parsedJson) {
|
|
158
|
-
if (responseValidator) {
|
|
159
|
-
await responseValidator(data);
|
|
160
|
-
}
|
|
161
|
-
if (responseTransformer) {
|
|
162
|
-
data = await responseTransformer(data);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
onSseEvent?.({
|
|
166
|
-
data,
|
|
167
|
-
event: eventName,
|
|
168
|
-
id: lastEventId,
|
|
169
|
-
retry: retryDelay
|
|
170
|
-
});
|
|
171
|
-
if (dataLines.length) {
|
|
172
|
-
yield data;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
} finally {
|
|
177
|
-
signal.removeEventListener("abort", abortHandler);
|
|
178
|
-
reader.releaseLock();
|
|
179
|
-
}
|
|
180
|
-
break;
|
|
181
|
-
} catch (error) {
|
|
182
|
-
onSseError?.(error);
|
|
183
|
-
if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) {
|
|
184
|
-
break;
|
|
185
|
-
}
|
|
186
|
-
const backoff = Math.min(
|
|
187
|
-
retryDelay * 2 ** (attempt - 1),
|
|
188
|
-
sseMaxRetryDelay ?? 3e4
|
|
189
|
-
);
|
|
190
|
-
await sleep(backoff);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
const stream = createStream();
|
|
195
|
-
return { stream };
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
// src/client/core/pathSerializer.gen.ts
|
|
199
|
-
var separatorArrayExplode = (style) => {
|
|
200
|
-
switch (style) {
|
|
201
|
-
case "label":
|
|
202
|
-
return ".";
|
|
203
|
-
case "matrix":
|
|
204
|
-
return ";";
|
|
205
|
-
case "simple":
|
|
206
|
-
return ",";
|
|
207
|
-
default:
|
|
208
|
-
return "&";
|
|
209
|
-
}
|
|
210
|
-
};
|
|
211
|
-
var separatorArrayNoExplode = (style) => {
|
|
212
|
-
switch (style) {
|
|
213
|
-
case "form":
|
|
214
|
-
return ",";
|
|
215
|
-
case "pipeDelimited":
|
|
216
|
-
return "|";
|
|
217
|
-
case "spaceDelimited":
|
|
218
|
-
return "%20";
|
|
219
|
-
default:
|
|
220
|
-
return ",";
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
var separatorObjectExplode = (style) => {
|
|
224
|
-
switch (style) {
|
|
225
|
-
case "label":
|
|
226
|
-
return ".";
|
|
227
|
-
case "matrix":
|
|
228
|
-
return ";";
|
|
229
|
-
case "simple":
|
|
230
|
-
return ",";
|
|
231
|
-
default:
|
|
232
|
-
return "&";
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
var serializeArrayParam = ({
|
|
236
|
-
allowReserved,
|
|
237
|
-
explode,
|
|
238
|
-
name,
|
|
239
|
-
style,
|
|
240
|
-
value
|
|
241
|
-
}) => {
|
|
242
|
-
if (!explode) {
|
|
243
|
-
const joinedValues2 = (allowReserved ? value : value.map((v) => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
|
|
244
|
-
switch (style) {
|
|
245
|
-
case "label":
|
|
246
|
-
return `.${joinedValues2}`;
|
|
247
|
-
case "matrix":
|
|
248
|
-
return `;${name}=${joinedValues2}`;
|
|
249
|
-
case "simple":
|
|
250
|
-
return joinedValues2;
|
|
251
|
-
default:
|
|
252
|
-
return `${name}=${joinedValues2}`;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
const separator = separatorArrayExplode(style);
|
|
256
|
-
const joinedValues = value.map((v) => {
|
|
257
|
-
if (style === "label" || style === "simple") {
|
|
258
|
-
return allowReserved ? v : encodeURIComponent(v);
|
|
259
|
-
}
|
|
260
|
-
return serializePrimitiveParam({
|
|
261
|
-
allowReserved,
|
|
262
|
-
name,
|
|
263
|
-
value: v
|
|
264
|
-
});
|
|
265
|
-
}).join(separator);
|
|
266
|
-
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
267
|
-
};
|
|
268
|
-
var serializePrimitiveParam = ({
|
|
269
|
-
allowReserved,
|
|
270
|
-
name,
|
|
271
|
-
value
|
|
272
|
-
}) => {
|
|
273
|
-
if (value === void 0 || value === null) {
|
|
274
|
-
return "";
|
|
275
|
-
}
|
|
276
|
-
if (typeof value === "object") {
|
|
277
|
-
throw new Error(
|
|
278
|
-
"Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these."
|
|
279
|
-
);
|
|
280
|
-
}
|
|
281
|
-
return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
|
|
282
|
-
};
|
|
283
|
-
var serializeObjectParam = ({
|
|
284
|
-
allowReserved,
|
|
285
|
-
explode,
|
|
286
|
-
name,
|
|
287
|
-
style,
|
|
288
|
-
value,
|
|
289
|
-
valueOnly
|
|
290
|
-
}) => {
|
|
291
|
-
if (value instanceof Date) {
|
|
292
|
-
return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
|
|
293
|
-
}
|
|
294
|
-
if (style !== "deepObject" && !explode) {
|
|
295
|
-
let values = [];
|
|
296
|
-
Object.entries(value).forEach(([key, v]) => {
|
|
297
|
-
values = [
|
|
298
|
-
...values,
|
|
299
|
-
key,
|
|
300
|
-
allowReserved ? v : encodeURIComponent(v)
|
|
301
|
-
];
|
|
302
|
-
});
|
|
303
|
-
const joinedValues2 = values.join(",");
|
|
304
|
-
switch (style) {
|
|
305
|
-
case "form":
|
|
306
|
-
return `${name}=${joinedValues2}`;
|
|
307
|
-
case "label":
|
|
308
|
-
return `.${joinedValues2}`;
|
|
309
|
-
case "matrix":
|
|
310
|
-
return `;${name}=${joinedValues2}`;
|
|
311
|
-
default:
|
|
312
|
-
return joinedValues2;
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
const separator = separatorObjectExplode(style);
|
|
316
|
-
const joinedValues = Object.entries(value).map(
|
|
317
|
-
([key, v]) => serializePrimitiveParam({
|
|
318
|
-
allowReserved,
|
|
319
|
-
name: style === "deepObject" ? `${name}[${key}]` : key,
|
|
320
|
-
value: v
|
|
321
|
-
})
|
|
322
|
-
).join(separator);
|
|
323
|
-
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
324
|
-
};
|
|
325
|
-
|
|
326
|
-
// src/client/core/utils.gen.ts
|
|
327
|
-
var PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
328
|
-
var defaultPathSerializer = ({ path, url: _url }) => {
|
|
329
|
-
let url = _url;
|
|
330
|
-
const matches = _url.match(PATH_PARAM_RE);
|
|
331
|
-
if (matches) {
|
|
332
|
-
for (const match of matches) {
|
|
333
|
-
let explode = false;
|
|
334
|
-
let name = match.substring(1, match.length - 1);
|
|
335
|
-
let style = "simple";
|
|
336
|
-
if (name.endsWith("*")) {
|
|
337
|
-
explode = true;
|
|
338
|
-
name = name.substring(0, name.length - 1);
|
|
339
|
-
}
|
|
340
|
-
if (name.startsWith(".")) {
|
|
341
|
-
name = name.substring(1);
|
|
342
|
-
style = "label";
|
|
343
|
-
} else if (name.startsWith(";")) {
|
|
344
|
-
name = name.substring(1);
|
|
345
|
-
style = "matrix";
|
|
346
|
-
}
|
|
347
|
-
const value = path[name];
|
|
348
|
-
if (value === void 0 || value === null) {
|
|
349
|
-
continue;
|
|
350
|
-
}
|
|
351
|
-
if (Array.isArray(value)) {
|
|
352
|
-
url = url.replace(
|
|
353
|
-
match,
|
|
354
|
-
serializeArrayParam({ explode, name, style, value })
|
|
355
|
-
);
|
|
356
|
-
continue;
|
|
357
|
-
}
|
|
358
|
-
if (typeof value === "object") {
|
|
359
|
-
url = url.replace(
|
|
360
|
-
match,
|
|
361
|
-
serializeObjectParam({
|
|
362
|
-
explode,
|
|
363
|
-
name,
|
|
364
|
-
style,
|
|
365
|
-
value,
|
|
366
|
-
valueOnly: true
|
|
367
|
-
})
|
|
368
|
-
);
|
|
369
|
-
continue;
|
|
370
|
-
}
|
|
371
|
-
if (style === "matrix") {
|
|
372
|
-
url = url.replace(
|
|
373
|
-
match,
|
|
374
|
-
`;${serializePrimitiveParam({
|
|
375
|
-
name,
|
|
376
|
-
value
|
|
377
|
-
})}`
|
|
378
|
-
);
|
|
379
|
-
continue;
|
|
380
|
-
}
|
|
381
|
-
const replaceValue = encodeURIComponent(
|
|
382
|
-
style === "label" ? `.${value}` : value
|
|
383
|
-
);
|
|
384
|
-
url = url.replace(match, replaceValue);
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
return url;
|
|
388
|
-
};
|
|
389
|
-
var getUrl = ({
|
|
390
|
-
baseUrl,
|
|
391
|
-
path,
|
|
392
|
-
query,
|
|
393
|
-
querySerializer,
|
|
394
|
-
url: _url
|
|
395
|
-
}) => {
|
|
396
|
-
const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
|
|
397
|
-
let url = (baseUrl ?? "") + pathUrl;
|
|
398
|
-
if (path) {
|
|
399
|
-
url = defaultPathSerializer({ path, url });
|
|
400
|
-
}
|
|
401
|
-
let search = query ? querySerializer(query) : "";
|
|
402
|
-
if (search.startsWith("?")) {
|
|
403
|
-
search = search.substring(1);
|
|
404
|
-
}
|
|
405
|
-
if (search) {
|
|
406
|
-
url += `?${search}`;
|
|
407
|
-
}
|
|
408
|
-
return url;
|
|
409
|
-
};
|
|
410
|
-
function getValidRequestBody(options) {
|
|
411
|
-
const hasBody = options.body !== void 0;
|
|
412
|
-
const isSerializedBody = hasBody && options.bodySerializer;
|
|
413
|
-
if (isSerializedBody) {
|
|
414
|
-
if ("serializedBody" in options) {
|
|
415
|
-
const hasSerializedBody = options.serializedBody !== void 0 && options.serializedBody !== "";
|
|
416
|
-
return hasSerializedBody ? options.serializedBody : null;
|
|
417
|
-
}
|
|
418
|
-
return options.body !== "" ? options.body : null;
|
|
419
|
-
}
|
|
420
|
-
if (hasBody) {
|
|
421
|
-
return options.body;
|
|
422
|
-
}
|
|
423
|
-
return void 0;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
// src/client/core/auth.gen.ts
|
|
427
|
-
var getAuthToken = async (auth, callback) => {
|
|
428
|
-
const token = typeof callback === "function" ? await callback(auth) : callback;
|
|
429
|
-
if (!token) {
|
|
430
|
-
return;
|
|
431
|
-
}
|
|
432
|
-
if (auth.scheme === "bearer") {
|
|
433
|
-
return `Bearer ${token}`;
|
|
434
|
-
}
|
|
435
|
-
if (auth.scheme === "basic") {
|
|
436
|
-
return `Basic ${btoa(token)}`;
|
|
437
|
-
}
|
|
438
|
-
return token;
|
|
439
|
-
};
|
|
440
|
-
|
|
441
|
-
// src/client/client/utils.gen.ts
|
|
442
|
-
var createQuerySerializer = ({
|
|
443
|
-
parameters = {},
|
|
444
|
-
...args
|
|
445
|
-
} = {}) => {
|
|
446
|
-
const querySerializer = (queryParams) => {
|
|
447
|
-
const search = [];
|
|
448
|
-
if (queryParams && typeof queryParams === "object") {
|
|
449
|
-
for (const name in queryParams) {
|
|
450
|
-
const value = queryParams[name];
|
|
451
|
-
if (value === void 0 || value === null) {
|
|
452
|
-
continue;
|
|
453
|
-
}
|
|
454
|
-
const options = parameters[name] || args;
|
|
455
|
-
if (Array.isArray(value)) {
|
|
456
|
-
const serializedArray = serializeArrayParam({
|
|
457
|
-
allowReserved: options.allowReserved,
|
|
458
|
-
explode: true,
|
|
459
|
-
name,
|
|
460
|
-
style: "form",
|
|
461
|
-
value,
|
|
462
|
-
...options.array
|
|
463
|
-
});
|
|
464
|
-
if (serializedArray) search.push(serializedArray);
|
|
465
|
-
} else if (typeof value === "object") {
|
|
466
|
-
const serializedObject = serializeObjectParam({
|
|
467
|
-
allowReserved: options.allowReserved,
|
|
468
|
-
explode: true,
|
|
469
|
-
name,
|
|
470
|
-
style: "deepObject",
|
|
471
|
-
value,
|
|
472
|
-
...options.object
|
|
473
|
-
});
|
|
474
|
-
if (serializedObject) search.push(serializedObject);
|
|
475
|
-
} else {
|
|
476
|
-
const serializedPrimitive = serializePrimitiveParam({
|
|
477
|
-
allowReserved: options.allowReserved,
|
|
478
|
-
name,
|
|
479
|
-
value
|
|
480
|
-
});
|
|
481
|
-
if (serializedPrimitive) search.push(serializedPrimitive);
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
return search.join("&");
|
|
486
|
-
};
|
|
487
|
-
return querySerializer;
|
|
488
|
-
};
|
|
489
|
-
var getParseAs = (contentType) => {
|
|
490
|
-
if (!contentType) {
|
|
491
|
-
return "stream";
|
|
492
|
-
}
|
|
493
|
-
const cleanContent = contentType.split(";")[0]?.trim();
|
|
494
|
-
if (!cleanContent) {
|
|
495
|
-
return;
|
|
496
|
-
}
|
|
497
|
-
if (cleanContent.startsWith("application/json") || cleanContent.endsWith("+json")) {
|
|
498
|
-
return "json";
|
|
499
|
-
}
|
|
500
|
-
if (cleanContent === "multipart/form-data") {
|
|
501
|
-
return "formData";
|
|
502
|
-
}
|
|
503
|
-
if (["application/", "audio/", "image/", "video/"].some(
|
|
504
|
-
(type) => cleanContent.startsWith(type)
|
|
505
|
-
)) {
|
|
506
|
-
return "blob";
|
|
507
|
-
}
|
|
508
|
-
if (cleanContent.startsWith("text/")) {
|
|
509
|
-
return "text";
|
|
510
|
-
}
|
|
511
|
-
return;
|
|
512
|
-
};
|
|
513
|
-
var checkForExistence = (options, name) => {
|
|
514
|
-
if (!name) {
|
|
515
|
-
return false;
|
|
516
|
-
}
|
|
517
|
-
if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) {
|
|
518
|
-
return true;
|
|
519
|
-
}
|
|
520
|
-
return false;
|
|
521
|
-
};
|
|
522
|
-
var setAuthParams = async ({
|
|
523
|
-
security,
|
|
524
|
-
...options
|
|
525
|
-
}) => {
|
|
526
|
-
for (const auth of security) {
|
|
527
|
-
if (checkForExistence(options, auth.name)) {
|
|
528
|
-
continue;
|
|
529
|
-
}
|
|
530
|
-
const token = await getAuthToken(auth, options.auth);
|
|
531
|
-
if (!token) {
|
|
532
|
-
continue;
|
|
533
|
-
}
|
|
534
|
-
const name = auth.name ?? "Authorization";
|
|
535
|
-
switch (auth.in) {
|
|
536
|
-
case "query":
|
|
537
|
-
if (!options.query) {
|
|
538
|
-
options.query = {};
|
|
539
|
-
}
|
|
540
|
-
options.query[name] = token;
|
|
541
|
-
break;
|
|
542
|
-
case "cookie":
|
|
543
|
-
options.headers.append("Cookie", `${name}=${token}`);
|
|
544
|
-
break;
|
|
545
|
-
case "header":
|
|
546
|
-
default:
|
|
547
|
-
options.headers.set(name, token);
|
|
548
|
-
break;
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
};
|
|
552
|
-
var buildUrl = (options) => getUrl({
|
|
553
|
-
baseUrl: options.baseUrl,
|
|
554
|
-
path: options.path,
|
|
555
|
-
query: options.query,
|
|
556
|
-
querySerializer: typeof options.querySerializer === "function" ? options.querySerializer : createQuerySerializer(options.querySerializer),
|
|
557
|
-
url: options.url
|
|
558
|
-
});
|
|
559
|
-
var mergeConfigs = (a, b) => {
|
|
560
|
-
const config = { ...a, ...b };
|
|
561
|
-
if (config.baseUrl?.endsWith("/")) {
|
|
562
|
-
config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);
|
|
563
|
-
}
|
|
564
|
-
config.headers = mergeHeaders(a.headers, b.headers);
|
|
565
|
-
return config;
|
|
566
|
-
};
|
|
567
|
-
var headersEntries = (headers) => {
|
|
568
|
-
const entries = [];
|
|
569
|
-
headers.forEach((value, key) => {
|
|
570
|
-
entries.push([key, value]);
|
|
571
|
-
});
|
|
572
|
-
return entries;
|
|
573
|
-
};
|
|
574
|
-
var mergeHeaders = (...headers) => {
|
|
575
|
-
const mergedHeaders = new Headers();
|
|
576
|
-
for (const header of headers) {
|
|
577
|
-
if (!header) {
|
|
578
|
-
continue;
|
|
579
|
-
}
|
|
580
|
-
const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);
|
|
581
|
-
for (const [key, value] of iterator) {
|
|
582
|
-
if (value === null) {
|
|
583
|
-
mergedHeaders.delete(key);
|
|
584
|
-
} else if (Array.isArray(value)) {
|
|
585
|
-
for (const v of value) {
|
|
586
|
-
mergedHeaders.append(key, v);
|
|
587
|
-
}
|
|
588
|
-
} else if (value !== void 0) {
|
|
589
|
-
mergedHeaders.set(
|
|
590
|
-
key,
|
|
591
|
-
typeof value === "object" ? JSON.stringify(value) : value
|
|
592
|
-
);
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
return mergedHeaders;
|
|
597
|
-
};
|
|
598
|
-
var Interceptors = class {
|
|
599
|
-
constructor() {
|
|
600
|
-
this.fns = [];
|
|
601
|
-
}
|
|
602
|
-
clear() {
|
|
603
|
-
this.fns = [];
|
|
604
|
-
}
|
|
605
|
-
eject(id) {
|
|
606
|
-
const index = this.getInterceptorIndex(id);
|
|
607
|
-
if (this.fns[index]) {
|
|
608
|
-
this.fns[index] = null;
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
exists(id) {
|
|
612
|
-
const index = this.getInterceptorIndex(id);
|
|
613
|
-
return Boolean(this.fns[index]);
|
|
614
|
-
}
|
|
615
|
-
getInterceptorIndex(id) {
|
|
616
|
-
if (typeof id === "number") {
|
|
617
|
-
return this.fns[id] ? id : -1;
|
|
618
|
-
}
|
|
619
|
-
return this.fns.indexOf(id);
|
|
620
|
-
}
|
|
621
|
-
update(id, fn) {
|
|
622
|
-
const index = this.getInterceptorIndex(id);
|
|
623
|
-
if (this.fns[index]) {
|
|
624
|
-
this.fns[index] = fn;
|
|
625
|
-
return id;
|
|
626
|
-
}
|
|
627
|
-
return false;
|
|
628
|
-
}
|
|
629
|
-
use(fn) {
|
|
630
|
-
this.fns.push(fn);
|
|
631
|
-
return this.fns.length - 1;
|
|
632
|
-
}
|
|
633
|
-
};
|
|
634
|
-
var createInterceptors = () => ({
|
|
635
|
-
error: new Interceptors(),
|
|
636
|
-
request: new Interceptors(),
|
|
637
|
-
response: new Interceptors()
|
|
638
|
-
});
|
|
639
|
-
var defaultQuerySerializer = createQuerySerializer({
|
|
640
|
-
allowReserved: false,
|
|
641
|
-
array: {
|
|
642
|
-
explode: true,
|
|
643
|
-
style: "form"
|
|
644
|
-
},
|
|
645
|
-
object: {
|
|
646
|
-
explode: true,
|
|
647
|
-
style: "deepObject"
|
|
648
|
-
}
|
|
649
|
-
});
|
|
650
|
-
var defaultHeaders = {
|
|
651
|
-
"Content-Type": "application/json"
|
|
652
|
-
};
|
|
653
|
-
var createConfig = (override = {}) => ({
|
|
654
|
-
...jsonBodySerializer,
|
|
655
|
-
headers: defaultHeaders,
|
|
656
|
-
parseAs: "auto",
|
|
657
|
-
querySerializer: defaultQuerySerializer,
|
|
658
|
-
...override
|
|
659
|
-
});
|
|
660
|
-
|
|
661
|
-
// src/client/client/client.gen.ts
|
|
662
|
-
var createClient = (config = {}) => {
|
|
663
|
-
let _config = mergeConfigs(createConfig(), config);
|
|
664
|
-
const getConfig = () => ({ ..._config });
|
|
665
|
-
const setConfig = (config2) => {
|
|
666
|
-
_config = mergeConfigs(_config, config2);
|
|
667
|
-
return getConfig();
|
|
668
|
-
};
|
|
669
|
-
const interceptors = createInterceptors();
|
|
670
|
-
const beforeRequest = async (options) => {
|
|
671
|
-
const opts = {
|
|
672
|
-
..._config,
|
|
673
|
-
...options,
|
|
674
|
-
fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,
|
|
675
|
-
headers: mergeHeaders(_config.headers, options.headers),
|
|
676
|
-
serializedBody: void 0
|
|
677
|
-
};
|
|
678
|
-
if (opts.security) {
|
|
679
|
-
await setAuthParams({
|
|
680
|
-
...opts,
|
|
681
|
-
security: opts.security
|
|
682
|
-
});
|
|
683
|
-
}
|
|
684
|
-
if (opts.requestValidator) {
|
|
685
|
-
await opts.requestValidator(opts);
|
|
686
|
-
}
|
|
687
|
-
if (opts.body !== void 0 && opts.bodySerializer) {
|
|
688
|
-
opts.serializedBody = opts.bodySerializer(opts.body);
|
|
689
|
-
}
|
|
690
|
-
if (opts.body === void 0 || opts.serializedBody === "") {
|
|
691
|
-
opts.headers.delete("Content-Type");
|
|
692
|
-
}
|
|
693
|
-
const url = buildUrl(opts);
|
|
694
|
-
return { opts, url };
|
|
695
|
-
};
|
|
696
|
-
const request = async (options) => {
|
|
697
|
-
const { opts, url } = await beforeRequest(options);
|
|
698
|
-
const requestInit = {
|
|
699
|
-
redirect: "follow",
|
|
700
|
-
...opts,
|
|
701
|
-
body: getValidRequestBody(opts)
|
|
702
|
-
};
|
|
703
|
-
let request2 = new Request(url, requestInit);
|
|
704
|
-
for (const fn of interceptors.request.fns) {
|
|
705
|
-
if (fn) {
|
|
706
|
-
request2 = await fn(request2, opts);
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
const _fetch = opts.fetch;
|
|
710
|
-
let response;
|
|
711
|
-
try {
|
|
712
|
-
response = await _fetch(request2);
|
|
713
|
-
} catch (error2) {
|
|
714
|
-
let finalError2 = error2;
|
|
715
|
-
for (const fn of interceptors.error.fns) {
|
|
716
|
-
if (fn) {
|
|
717
|
-
finalError2 = await fn(
|
|
718
|
-
error2,
|
|
719
|
-
void 0,
|
|
720
|
-
request2,
|
|
721
|
-
opts
|
|
722
|
-
);
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
finalError2 = finalError2 || {};
|
|
726
|
-
if (opts.throwOnError) {
|
|
727
|
-
throw finalError2;
|
|
728
|
-
}
|
|
729
|
-
return opts.responseStyle === "data" ? void 0 : {
|
|
730
|
-
error: finalError2,
|
|
731
|
-
request: request2,
|
|
732
|
-
response: void 0
|
|
733
|
-
};
|
|
734
|
-
}
|
|
735
|
-
for (const fn of interceptors.response.fns) {
|
|
736
|
-
if (fn) {
|
|
737
|
-
response = await fn(response, request2, opts);
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
const result = {
|
|
741
|
-
request: request2,
|
|
742
|
-
response
|
|
743
|
-
};
|
|
744
|
-
if (response.ok) {
|
|
745
|
-
const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
|
|
746
|
-
if (response.status === 204 || response.headers.get("Content-Length") === "0") {
|
|
747
|
-
let emptyData;
|
|
748
|
-
switch (parseAs) {
|
|
749
|
-
case "arrayBuffer":
|
|
750
|
-
case "blob":
|
|
751
|
-
case "text":
|
|
752
|
-
emptyData = await response[parseAs]();
|
|
753
|
-
break;
|
|
754
|
-
case "formData":
|
|
755
|
-
emptyData = new FormData();
|
|
756
|
-
break;
|
|
757
|
-
case "stream":
|
|
758
|
-
emptyData = response.body;
|
|
759
|
-
break;
|
|
760
|
-
case "json":
|
|
761
|
-
default:
|
|
762
|
-
emptyData = {};
|
|
763
|
-
break;
|
|
764
|
-
}
|
|
765
|
-
return opts.responseStyle === "data" ? emptyData : {
|
|
766
|
-
data: emptyData,
|
|
767
|
-
...result
|
|
768
|
-
};
|
|
769
|
-
}
|
|
770
|
-
let data;
|
|
771
|
-
switch (parseAs) {
|
|
772
|
-
case "arrayBuffer":
|
|
773
|
-
case "blob":
|
|
774
|
-
case "formData":
|
|
775
|
-
case "json":
|
|
776
|
-
case "text":
|
|
777
|
-
data = await response[parseAs]();
|
|
778
|
-
break;
|
|
779
|
-
case "stream":
|
|
780
|
-
return opts.responseStyle === "data" ? response.body : {
|
|
781
|
-
data: response.body,
|
|
782
|
-
...result
|
|
783
|
-
};
|
|
784
|
-
}
|
|
785
|
-
if (parseAs === "json") {
|
|
786
|
-
if (opts.responseValidator) {
|
|
787
|
-
await opts.responseValidator(data);
|
|
788
|
-
}
|
|
789
|
-
if (opts.responseTransformer) {
|
|
790
|
-
data = await opts.responseTransformer(data);
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
return opts.responseStyle === "data" ? data : {
|
|
794
|
-
data,
|
|
795
|
-
...result
|
|
796
|
-
};
|
|
797
|
-
}
|
|
798
|
-
const textError = await response.text();
|
|
799
|
-
let jsonError;
|
|
800
|
-
try {
|
|
801
|
-
jsonError = JSON.parse(textError);
|
|
802
|
-
} catch {
|
|
803
|
-
}
|
|
804
|
-
const error = jsonError ?? textError;
|
|
805
|
-
let finalError = error;
|
|
806
|
-
for (const fn of interceptors.error.fns) {
|
|
807
|
-
if (fn) {
|
|
808
|
-
finalError = await fn(error, response, request2, opts);
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
finalError = finalError || {};
|
|
812
|
-
if (opts.throwOnError) {
|
|
813
|
-
throw finalError;
|
|
814
|
-
}
|
|
815
|
-
return opts.responseStyle === "data" ? void 0 : {
|
|
816
|
-
error: finalError,
|
|
817
|
-
...result
|
|
818
|
-
};
|
|
819
|
-
};
|
|
820
|
-
const makeMethodFn = (method) => (options) => request({ ...options, method });
|
|
821
|
-
const makeSseFn = (method) => async (options) => {
|
|
822
|
-
const { opts, url } = await beforeRequest(options);
|
|
823
|
-
return createSseClient({
|
|
824
|
-
...opts,
|
|
825
|
-
body: opts.body,
|
|
826
|
-
headers: opts.headers,
|
|
827
|
-
method,
|
|
828
|
-
onRequest: async (url2, init) => {
|
|
829
|
-
let request2 = new Request(url2, init);
|
|
830
|
-
for (const fn of interceptors.request.fns) {
|
|
831
|
-
if (fn) {
|
|
832
|
-
request2 = await fn(request2, opts);
|
|
833
|
-
}
|
|
834
|
-
}
|
|
835
|
-
return request2;
|
|
836
|
-
},
|
|
837
|
-
url
|
|
838
|
-
});
|
|
839
|
-
};
|
|
840
|
-
return {
|
|
841
|
-
buildUrl,
|
|
842
|
-
connect: makeMethodFn("CONNECT"),
|
|
843
|
-
delete: makeMethodFn("DELETE"),
|
|
844
|
-
get: makeMethodFn("GET"),
|
|
845
|
-
getConfig,
|
|
846
|
-
head: makeMethodFn("HEAD"),
|
|
847
|
-
interceptors,
|
|
848
|
-
options: makeMethodFn("OPTIONS"),
|
|
849
|
-
patch: makeMethodFn("PATCH"),
|
|
850
|
-
post: makeMethodFn("POST"),
|
|
851
|
-
put: makeMethodFn("PUT"),
|
|
852
|
-
request,
|
|
853
|
-
setConfig,
|
|
854
|
-
sse: {
|
|
855
|
-
connect: makeSseFn("CONNECT"),
|
|
856
|
-
delete: makeSseFn("DELETE"),
|
|
857
|
-
get: makeSseFn("GET"),
|
|
858
|
-
head: makeSseFn("HEAD"),
|
|
859
|
-
options: makeSseFn("OPTIONS"),
|
|
860
|
-
patch: makeSseFn("PATCH"),
|
|
861
|
-
post: makeSseFn("POST"),
|
|
862
|
-
put: makeSseFn("PUT"),
|
|
863
|
-
trace: makeSseFn("TRACE")
|
|
864
|
-
},
|
|
865
|
-
trace: makeMethodFn("TRACE")
|
|
866
|
-
};
|
|
867
|
-
};
|
|
868
|
-
|
|
869
|
-
// src/client/client.gen.ts
|
|
870
|
-
var client = createClient(
|
|
871
|
-
createConfig({ baseUrl: "https://aifeatures.dev" })
|
|
872
|
-
);
|
|
873
|
-
|
|
874
|
-
// src/client/sdk.gen.ts
|
|
875
|
-
var listFormsWithSiteToken = (options) => (options?.client ?? client).get({
|
|
876
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
877
|
-
url: "/api/v1/forms",
|
|
878
|
-
...options
|
|
879
|
-
});
|
|
880
|
-
var createFormWithSiteToken = (options) => (options.client ?? client).post({
|
|
881
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
882
|
-
url: "/api/v1/forms",
|
|
883
|
-
...options,
|
|
884
|
-
headers: {
|
|
885
|
-
"Content-Type": "application/json",
|
|
886
|
-
...options.headers
|
|
887
|
-
}
|
|
888
|
-
});
|
|
889
|
-
var listSites = (options) => (options?.client ?? client).get({
|
|
890
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
891
|
-
url: "/api/v1/sites",
|
|
892
|
-
...options
|
|
893
|
-
});
|
|
894
|
-
var createSite = (options) => (options.client ?? client).post({
|
|
895
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
896
|
-
url: "/api/v1/sites",
|
|
897
|
-
...options,
|
|
898
|
-
headers: {
|
|
899
|
-
"Content-Type": "application/json",
|
|
900
|
-
...options.headers
|
|
901
|
-
}
|
|
902
|
-
});
|
|
903
|
-
var deleteSite = (options) => (options.client ?? client).delete({
|
|
904
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
905
|
-
url: "/api/v1/sites/{siteId}",
|
|
906
|
-
...options
|
|
907
|
-
});
|
|
908
|
-
var getSite = (options) => (options.client ?? client).get(
|
|
909
|
-
{
|
|
910
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
911
|
-
url: "/api/v1/sites/{siteId}",
|
|
912
|
-
...options
|
|
913
|
-
}
|
|
914
|
-
);
|
|
915
|
-
var updateSite = (options) => (options.client ?? client).patch({
|
|
916
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
917
|
-
url: "/api/v1/sites/{siteId}",
|
|
918
|
-
...options,
|
|
919
|
-
headers: {
|
|
920
|
-
"Content-Type": "application/json",
|
|
921
|
-
...options.headers
|
|
922
|
-
}
|
|
923
|
-
});
|
|
924
|
-
var updateSiteDomains = (options) => (options.client ?? client).patch({
|
|
925
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
926
|
-
url: "/api/v1/sites/{siteId}/domains",
|
|
927
|
-
...options,
|
|
928
|
-
headers: {
|
|
929
|
-
"Content-Type": "application/json",
|
|
930
|
-
...options.headers
|
|
931
|
-
}
|
|
932
|
-
});
|
|
933
|
-
var listForms = (options) => (options.client ?? client).get({
|
|
934
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
935
|
-
url: "/api/v1/sites/{siteId}/forms",
|
|
936
|
-
...options
|
|
937
|
-
});
|
|
938
|
-
var createForm = (options) => (options.client ?? client).post({
|
|
939
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
940
|
-
url: "/api/v1/sites/{siteId}/forms",
|
|
941
|
-
...options,
|
|
942
|
-
headers: {
|
|
943
|
-
"Content-Type": "application/json",
|
|
944
|
-
...options.headers
|
|
945
|
-
}
|
|
946
|
-
});
|
|
947
|
-
var deleteForm = (options) => (options.client ?? client).delete({
|
|
948
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
949
|
-
url: "/api/v1/forms/{formId}",
|
|
950
|
-
...options
|
|
951
|
-
});
|
|
952
|
-
var getForm = (options) => (options.client ?? client).get(
|
|
953
|
-
{
|
|
954
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
955
|
-
url: "/api/v1/forms/{formId}",
|
|
956
|
-
...options
|
|
957
|
-
}
|
|
958
|
-
);
|
|
959
|
-
var updateForm = (options) => (options.client ?? client).patch({
|
|
960
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
961
|
-
url: "/api/v1/forms/{formId}",
|
|
962
|
-
...options,
|
|
963
|
-
headers: {
|
|
964
|
-
"Content-Type": "application/json",
|
|
965
|
-
...options.headers
|
|
966
|
-
}
|
|
967
|
-
});
|
|
968
|
-
var listSubmissions = (options) => (options.client ?? client).get({
|
|
969
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
970
|
-
url: "/api/v1/forms/{formId}/submissions",
|
|
971
|
-
...options
|
|
972
|
-
});
|
|
973
|
-
var deleteSubmission = (options) => (options.client ?? client).delete({
|
|
974
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
975
|
-
url: "/api/v1/submissions/{submissionId}",
|
|
976
|
-
...options
|
|
977
|
-
});
|
|
978
|
-
var getSubmission = (options) => (options.client ?? client).get({
|
|
979
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
980
|
-
url: "/api/v1/submissions/{submissionId}",
|
|
981
|
-
...options
|
|
982
|
-
});
|
|
983
|
-
var downloadAttachment = (options) => (options.client ?? client).get({
|
|
984
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
985
|
-
url: "/api/v1/submissions/{submissionId}/attachments/{attachmentId}",
|
|
986
|
-
...options
|
|
987
|
-
});
|
|
988
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
989
|
-
0 && (module.exports = {
|
|
990
|
-
createClient,
|
|
991
|
-
createConfig,
|
|
992
|
-
createForm,
|
|
993
|
-
createFormWithSiteToken,
|
|
994
|
-
createSite,
|
|
995
|
-
deleteForm,
|
|
996
|
-
deleteSite,
|
|
997
|
-
deleteSubmission,
|
|
998
|
-
downloadAttachment,
|
|
999
|
-
getForm,
|
|
1000
|
-
getSite,
|
|
1001
|
-
getSubmission,
|
|
1002
|
-
listForms,
|
|
1003
|
-
listFormsWithSiteToken,
|
|
1004
|
-
listSites,
|
|
1005
|
-
listSubmissions,
|
|
1006
|
-
updateForm,
|
|
1007
|
-
updateSite,
|
|
1008
|
-
updateSiteDomains
|
|
1009
|
-
});
|
|
1010
|
-
//# sourceMappingURL=index.cjs.map
|
|
5
|
+
`);x=z.pop()??"";for(let ur of z){let cr=ur.split(`
|
|
6
|
+
`),I=[],B;for(let E of cr)if(E.startsWith("data:"))I.push(E.replace(/^data:\s*/,""));else if(E.startsWith("event:"))B=E.replace(/^event:\s*/,"");else if(E.startsWith("id:"))y=E.replace(/^id:\s*/,"");else if(E.startsWith("retry:")){let M=Number.parseInt(E.replace(/^retry:\s*/,""),10);Number.isNaN(M)||(c=M)}let b,N=!1;if(I.length){let E=I.join(`
|
|
7
|
+
`);try{b=JSON.parse(E),N=!0}catch{b=E}}N&&(n&&await n(b),a&&(b=await a(b))),t?.({data:b,event:B,id:y,retry:c}),I.length&&(yield b)}}}finally{C.removeEventListener("abort",W),f.releaseLock()}break}catch(T){if(r?.(T),p!==void 0&&O>=p)break;let R=Math.min(c*2**(O-1),i??3e4);await P(R)}}}()}};var Er=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Rr=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},Cr=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},v=({allowReserved:e,explode:r,name:t,style:a,value:n})=>{if(!r){let i=(e?n:n.map(d=>encodeURIComponent(d))).join(Rr(a));switch(a){case"label":return`.${i}`;case"matrix":return`;${t}=${i}`;case"simple":return i;default:return`${t}=${i}`}}let u=Er(a),p=n.map(i=>a==="label"||a==="simple"?e?i:encodeURIComponent(i):w({allowReserved:e,name:t,value:i})).join(u);return a==="label"||a==="matrix"?u+p:p},w=({allowReserved:e,name:r,value:t})=>{if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?t:encodeURIComponent(t)}`},U=({allowReserved:e,explode:r,name:t,style:a,value:n,valueOnly:u})=>{if(n instanceof Date)return u?n.toISOString():`${t}=${n.toISOString()}`;if(a!=="deepObject"&&!r){let d=[];Object.entries(n).forEach(([o,y])=>{d=[...d,o,e?y:encodeURIComponent(y)]});let l=d.join(",");switch(a){case"form":return`${t}=${l}`;case"label":return`.${l}`;case"matrix":return`;${t}=${l}`;default:return l}}let p=Cr(a),i=Object.entries(n).map(([d,l])=>w({allowReserved:e,name:a==="deepObject"?`${t}[${d}]`:d,value:l})).join(p);return a==="label"||a==="matrix"?p+i:i};var Tr=/\{[^{}]+\}/g,br=({path:e,url:r})=>{let t=r,a=r.match(Tr);if(a)for(let n of a){let u=!1,p=n.substring(1,n.length-1),i="simple";p.endsWith("*")&&(u=!0,p=p.substring(0,p.length-1)),p.startsWith(".")?(p=p.substring(1),i="label"):p.startsWith(";")&&(p=p.substring(1),i="matrix");let d=e[p];if(d==null)continue;if(Array.isArray(d)){t=t.replace(n,v({explode:u,name:p,style:i,value:d}));continue}if(typeof d=="object"){t=t.replace(n,U({explode:u,name:p,style:i,value:d,valueOnly:!0}));continue}if(i==="matrix"){t=t.replace(n,`;${w({name:p,value:d})}`);continue}let l=encodeURIComponent(i==="label"?`.${d}`:d);t=t.replace(n,l)}return t},H=({baseUrl:e,path:r,query:t,querySerializer:a,url:n})=>{let u=n.startsWith("/")?n:`/${n}`,p=(e??"")+u;r&&(p=br({path:r,url:p}));let i=t?a(t):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(p+=`?${i}`),p};function J(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}var Q=async(e,r)=>{let t=typeof r=="function"?await r(e):r;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t};var _=({parameters:e={},...r}={})=>a=>{let n=[];if(a&&typeof a=="object")for(let u in a){let p=a[u];if(p==null)continue;let i=e[u]||r;if(Array.isArray(p)){let d=v({allowReserved:i.allowReserved,explode:!0,name:u,style:"form",value:p,...i.array});d&&n.push(d)}else if(typeof p=="object"){let d=U({allowReserved:i.allowReserved,explode:!0,name:u,style:"deepObject",value:p,...i.object});d&&n.push(d)}else{let d=w({allowReserved:i.allowReserved,name:u,value:p});d&&n.push(d)}}return n.join("&")},K=e=>{if(!e)return"stream";let r=e.split(";")[0]?.trim();if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},Dr=(e,r)=>r?!!(e.headers.has(r)||e.query?.[r]||e.headers.get("Cookie")?.includes(`${r}=`)):!1,X=async({security:e,...r})=>{for(let t of e){if(Dr(r,t.name))continue;let a=await Q(t,r.auth);if(!a)continue;let n=t.name??"Authorization";switch(t.in){case"query":r.query||(r.query={}),r.query[n]=a;break;case"cookie":r.headers.append("Cookie",`${n}=${a}`);break;case"header":default:r.headers.set(n,a);break}}},V=e=>H({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:_(e.querySerializer),url:e.url}),q=(e,r)=>{let t={...e,...r};return t.baseUrl?.endsWith("/")&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=L(e.headers,r.headers),t},wr=e=>{let r=[];return e.forEach((t,a)=>{r.push([a,t])}),r},L=(...e)=>{let r=new Headers;for(let t of e){if(!t)continue;let a=t instanceof Headers?wr(t):Object.entries(t);for(let[n,u]of a)if(u===null)r.delete(n);else if(Array.isArray(u))for(let p of u)r.append(n,p);else u!==void 0&&r.set(n,typeof u=="object"?JSON.stringify(u):u)}return r},k=class{constructor(){this.fns=[]}clear(){this.fns=[]}eject(r){let t=this.getInterceptorIndex(r);this.fns[t]&&(this.fns[t]=null)}exists(r){let t=this.getInterceptorIndex(r);return!!this.fns[t]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,t){let a=this.getInterceptorIndex(r);return this.fns[a]?(this.fns[a]=t,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},Y=()=>({error:new k,request:new k,response:new k}),Pr=_({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),gr={"Content-Type":"application/json"},D=(e={})=>({...A,headers:gr,parseAs:"auto",querySerializer:Pr,...e});var G=(e={})=>{let r=q(D(),e),t=()=>({...r}),a=l=>(r=q(r,l),t()),n=Y(),u=async l=>{let o={...r,...l,fetch:l.fetch??r.fetch??globalThis.fetch,headers:L(r.headers,l.headers),serializedBody:void 0};o.security&&await X({...o,security:o.security}),o.requestValidator&&await o.requestValidator(o),o.body!==void 0&&o.bodySerializer&&(o.serializedBody=o.bodySerializer(o.body)),(o.body===void 0||o.serializedBody==="")&&o.headers.delete("Content-Type");let y=V(o);return{opts:o,url:y}},p=async l=>{let{opts:o,url:y}=await u(l),P={redirect:"follow",...o,body:J(o)},S=new Request(y,P);for(let h of n.request.fns)h&&(S=await h(S,o));let F=o.fetch,c;try{c=await F(S)}catch(h){let m=h;for(let f of n.error.fns)f&&(m=await f(h,void 0,S,o));if(m=m||{},o.throwOnError)throw m;return o.responseStyle==="data"?void 0:{error:m,request:S,response:void 0}}for(let h of n.response.fns)h&&(c=await h(c,S,o));let O={request:S,response:c};if(c.ok){let h=(o.parseAs==="auto"?K(c.headers.get("Content-Type")):o.parseAs)??"json";if(c.status===204||c.headers.get("Content-Length")==="0"){let f;switch(h){case"arrayBuffer":case"blob":case"text":f=await c[h]();break;case"formData":f=new FormData;break;case"stream":f=c.body;break;case"json":default:f={};break}return o.responseStyle==="data"?f:{data:f,...O}}let m;switch(h){case"arrayBuffer":case"blob":case"formData":case"json":case"text":m=await c[h]();break;case"stream":return o.responseStyle==="data"?c.body:{data:c.body,...O}}return h==="json"&&(o.responseValidator&&await o.responseValidator(m),o.responseTransformer&&(m=await o.responseTransformer(m))),o.responseStyle==="data"?m:{data:m,...O}}let C=await c.text(),g;try{g=JSON.parse(C)}catch{}let T=g??C,R=T;for(let h of n.error.fns)h&&(R=await h(T,c,S,o));if(R=R||{},o.throwOnError)throw R;return o.responseStyle==="data"?void 0:{error:R,...O}},i=l=>o=>p({...o,method:l}),d=l=>async o=>{let{opts:y,url:P}=await u(o);return $({...y,body:y.body,headers:y.headers,method:l,onRequest:async(S,F)=>{let c=new Request(S,F);for(let O of n.request.fns)O&&(c=await O(c,y));return c},url:P})};return{buildUrl:V,connect:i("CONNECT"),delete:i("DELETE"),get:i("GET"),getConfig:t,head:i("HEAD"),interceptors:n,options:i("OPTIONS"),patch:i("PATCH"),post:i("POST"),put:i("PUT"),request:p,setConfig:a,sse:{connect:d("CONNECT"),delete:d("DELETE"),get:d("GET"),head:d("HEAD"),options:d("OPTIONS"),patch:d("PATCH"),post:d("POST"),put:d("PUT"),trace:d("TRACE")},trace:i("TRACE")}};var s=G(D({baseUrl:"https://aifeatures.dev"}));var Z=e=>(e.client??s).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/payments",...e,headers:{"Content-Type":"application/json",...e.headers}}),ee=e=>(e?.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/payments/status",...e}),re=e=>(e?.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products",...e}),te=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products",...e,headers:{"Content-Type":"application/json",...e.headers}}),se=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/products",...e}),oe=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/products",...e,headers:{"Content-Type":"application/json",...e.headers}}),ne=e=>(e.client??s).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}",...e}),ae=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}",...e}),ie=e=>(e.client??s).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),pe=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}/file",...e,headers:{"Content-Type":"application/json",...e.headers}}),de=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}/test-order",...e,headers:{"Content-Type":"application/json",...e.headers}}),ue=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/test-orders",...e,headers:{"Content-Type":"application/json",...e.headers}}),ce=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}/variants",...e,headers:{"Content-Type":"application/json",...e.headers}}),le=e=>(e.client??s).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}/variants",...e,headers:{"Content-Type":"application/json",...e.headers}}),he=e=>(e.client??s).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/variants/{variantId}",...e}),me=e=>(e.client??s).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/variants/{variantId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),ye=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/products/{productId}/options",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(e.client??s).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/options/{optionId}",...e}),fe=e=>(e.client??s).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/options/{optionId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(e.client??s).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/variants/{variantId}/inventory",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ee=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/variants/{variantId}/inventory/adjust",...e,headers:{"Content-Type":"application/json",...e.headers}}),Re=e=>(e?.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/orders",...e}),Ce=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/orders/{orderId}",...e}),Te=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/orders/{orderId}/refund",...e,headers:{"Content-Type":"application/json",...e.headers}}),be=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/orders/{orderId}/resend-receipt",...e}),De=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/orders/{orderId}/reset-downloads",...e}),we=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/webhook-events/{eventId}/reset",...e}),Pe=e=>(e?.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/customers",...e}),ge=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/customers",...e,headers:{"Content-Type":"application/json",...e.headers}}),xe=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/customers/{customerId}",...e}),ke=e=>(e.client??s).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/customers/{customerId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ge=e=>(e?.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/summary",...e}),Fe=e=>(e?.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sales-summary",...e}),Ie=e=>(e?.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/people",...e}),ve=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/people/{email}",...e}),Ue=e=>(e?.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/payouts/next",...e}),Le=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/orders/{orderId}/fulfillment",...e,headers:{"Content-Type":"application/json",...e.headers}}),je=e=>(e?.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/forms",...e}),Ae=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/forms",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ve=e=>(e?.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites",...e}),qe=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites",...e,headers:{"Content-Type":"application/json",...e.headers}}),We=e=>(e.client??s).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}",...e}),ze=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}",...e}),Be=e=>(e.client??s).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ne=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/checkout-pause",...e}),Me=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/checkout-pause",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(e.client??s).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/domains",...e,headers:{"Content-Type":"application/json",...e.headers}}),He=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/forms",...e}),Je=e=>(e.client??s).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/sites/{siteId}/forms",...e,headers:{"Content-Type":"application/json",...e.headers}}),Qe=e=>(e.client??s).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/forms/{formId}",...e}),_e=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/forms/{formId}",...e}),Ke=e=>(e.client??s).patch({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/forms/{formId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Xe=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/forms/{formId}/submissions",...e}),Ye=e=>(e.client??s).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/submissions/{submissionId}",...e}),Ze=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/submissions/{submissionId}",...e}),er=e=>(e.client??s).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/submissions/{submissionId}/attachments/{attachmentId}",...e}),rr=e=>(e.client??s).get({url:"/v1/p/{productId}",...e}),tr=e=>(e.client??s).post({url:"/v1/p/{productId}/checkout",...e,headers:{"Content-Type":"application/json",...e.headers}}),sr=e=>(e.client??s).post({url:"/v1/p/checkout",...e,headers:{"Content-Type":"application/json",...e.headers}}),or=e=>(e.client??s).post({url:"/v1/p/checkout/summary",...e,headers:{"Content-Type":"application/json",...e.headers}}),nr=e=>(e.client??s).get({url:"/v1/o/session/{sessionId}",...e}),ar=e=>(e.client??s).get({url:"/v1/d/{token}",...e}),ir=e=>(e?.client??s).get({url:"/v1/geo",...e});0&&(module.exports={adjustVariantInventory,attachProductFile,createCartCheckout,createCheckout,createClient,createConfig,createCustomer,createForm,createFormWithSiteToken,createMultiItemTestOrder,createOption,createProduct,createProductWithSiteToken,createSite,createTestOrder,createVariant,deleteForm,deleteOption,deleteProduct,deleteSite,deleteSubmission,deleteVariant,downloadAttachment,downloadFile,getBusinessSummary,getCartSummary,getCustomer,getForm,getGeo,getNextPayout,getOrder,getOrderSession,getPaymentsStatus,getPerson,getProduct,getPublicProduct,getSalesSummary,getSite,getSiteCheckoutPause,getSubmission,listCustomers,listForms,listFormsWithSiteToken,listOrdersWithSiteToken,listPeople,listProducts,listProductsWithSiteToken,listSites,listSubmissions,pauseSiteCheckout,refundOrder,resendOrderReceipt,resetOrderDownloads,resetWebhookEvent,setOrderFulfillment,setProductVariants,setVariantInventory,updateCustomer,updateForm,updateOption,updateProduct,updateSite,updateSiteDomains,updateSitePayments,updateVariant});
|