@getyetty-sdk/pennylane 2026.1.16-4
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/LICENSE +21 -0
- package/README.md +100 -0
- package/dist/index.d.mts +30442 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +4486 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +53 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,4486 @@
|
|
|
1
|
+
//#region src/generated/core/bodySerializer.gen.ts
|
|
2
|
+
const serializeFormDataPair = (data, key, value) => {
|
|
3
|
+
if (typeof value === "string" || value instanceof Blob) data.append(key, value);
|
|
4
|
+
else if (value instanceof Date) data.append(key, value.toISOString());
|
|
5
|
+
else data.append(key, JSON.stringify(value));
|
|
6
|
+
};
|
|
7
|
+
const formDataBodySerializer = { bodySerializer: (body) => {
|
|
8
|
+
const data = new FormData();
|
|
9
|
+
Object.entries(body).forEach(([key, value]) => {
|
|
10
|
+
if (value === void 0 || value === null) return;
|
|
11
|
+
if (Array.isArray(value)) value.forEach((v) => serializeFormDataPair(data, key, v));
|
|
12
|
+
else serializeFormDataPair(data, key, value);
|
|
13
|
+
});
|
|
14
|
+
return data;
|
|
15
|
+
} };
|
|
16
|
+
const jsonBodySerializer = { bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value) };
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/generated/core/params.gen.ts
|
|
20
|
+
const extraPrefixes = Object.entries({
|
|
21
|
+
$body_: "body",
|
|
22
|
+
$headers_: "headers",
|
|
23
|
+
$path_: "path",
|
|
24
|
+
$query_: "query"
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/generated/core/serverSentEvents.gen.ts
|
|
29
|
+
const createSseClient = ({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }) => {
|
|
30
|
+
let lastEventId;
|
|
31
|
+
const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
32
|
+
const createStream = async function* () {
|
|
33
|
+
let retryDelay = sseDefaultRetryDelay ?? 3e3;
|
|
34
|
+
let attempt = 0;
|
|
35
|
+
const signal = options.signal ?? new AbortController().signal;
|
|
36
|
+
while (true) {
|
|
37
|
+
if (signal.aborted) break;
|
|
38
|
+
attempt++;
|
|
39
|
+
const headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers);
|
|
40
|
+
if (lastEventId !== void 0) headers.set("Last-Event-ID", lastEventId);
|
|
41
|
+
try {
|
|
42
|
+
const requestInit = {
|
|
43
|
+
redirect: "follow",
|
|
44
|
+
...options,
|
|
45
|
+
body: options.serializedBody,
|
|
46
|
+
headers,
|
|
47
|
+
signal
|
|
48
|
+
};
|
|
49
|
+
let request = new Request(url, requestInit);
|
|
50
|
+
if (onRequest) request = await onRequest(url, requestInit);
|
|
51
|
+
const response = await (options.fetch ?? globalThis.fetch)(request);
|
|
52
|
+
if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
|
|
53
|
+
if (!response.body) throw new Error("No body in SSE response");
|
|
54
|
+
const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
|
|
55
|
+
let buffer = "";
|
|
56
|
+
const abortHandler = () => {
|
|
57
|
+
try {
|
|
58
|
+
reader.cancel();
|
|
59
|
+
} catch {}
|
|
60
|
+
};
|
|
61
|
+
signal.addEventListener("abort", abortHandler);
|
|
62
|
+
try {
|
|
63
|
+
while (true) {
|
|
64
|
+
const { done, value } = await reader.read();
|
|
65
|
+
if (done) break;
|
|
66
|
+
buffer += value;
|
|
67
|
+
buffer = buffer.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
68
|
+
const chunks = buffer.split("\n\n");
|
|
69
|
+
buffer = chunks.pop() ?? "";
|
|
70
|
+
for (const chunk of chunks) {
|
|
71
|
+
const lines = chunk.split("\n");
|
|
72
|
+
const dataLines = [];
|
|
73
|
+
let eventName;
|
|
74
|
+
for (const line of lines) if (line.startsWith("data:")) dataLines.push(line.replace(/^data:\s*/, ""));
|
|
75
|
+
else if (line.startsWith("event:")) eventName = line.replace(/^event:\s*/, "");
|
|
76
|
+
else if (line.startsWith("id:")) lastEventId = line.replace(/^id:\s*/, "");
|
|
77
|
+
else if (line.startsWith("retry:")) {
|
|
78
|
+
const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
|
|
79
|
+
if (!Number.isNaN(parsed)) retryDelay = parsed;
|
|
80
|
+
}
|
|
81
|
+
let data;
|
|
82
|
+
let parsedJson = false;
|
|
83
|
+
if (dataLines.length) {
|
|
84
|
+
const rawData = dataLines.join("\n");
|
|
85
|
+
try {
|
|
86
|
+
data = JSON.parse(rawData);
|
|
87
|
+
parsedJson = true;
|
|
88
|
+
} catch {
|
|
89
|
+
data = rawData;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (parsedJson) {
|
|
93
|
+
if (responseValidator) await responseValidator(data);
|
|
94
|
+
if (responseTransformer) data = await responseTransformer(data);
|
|
95
|
+
}
|
|
96
|
+
onSseEvent?.({
|
|
97
|
+
data,
|
|
98
|
+
event: eventName,
|
|
99
|
+
id: lastEventId,
|
|
100
|
+
retry: retryDelay
|
|
101
|
+
});
|
|
102
|
+
if (dataLines.length) yield data;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
} finally {
|
|
106
|
+
signal.removeEventListener("abort", abortHandler);
|
|
107
|
+
reader.releaseLock();
|
|
108
|
+
}
|
|
109
|
+
break;
|
|
110
|
+
} catch (error) {
|
|
111
|
+
onSseError?.(error);
|
|
112
|
+
if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) break;
|
|
113
|
+
await sleep(Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
return { stream: createStream() };
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region src/generated/core/pathSerializer.gen.ts
|
|
122
|
+
const separatorArrayExplode = (style) => {
|
|
123
|
+
switch (style) {
|
|
124
|
+
case "label": return ".";
|
|
125
|
+
case "matrix": return ";";
|
|
126
|
+
case "simple": return ",";
|
|
127
|
+
default: return "&";
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
const separatorArrayNoExplode = (style) => {
|
|
131
|
+
switch (style) {
|
|
132
|
+
case "form": return ",";
|
|
133
|
+
case "pipeDelimited": return "|";
|
|
134
|
+
case "spaceDelimited": return "%20";
|
|
135
|
+
default: return ",";
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
const separatorObjectExplode = (style) => {
|
|
139
|
+
switch (style) {
|
|
140
|
+
case "label": return ".";
|
|
141
|
+
case "matrix": return ";";
|
|
142
|
+
case "simple": return ",";
|
|
143
|
+
default: return "&";
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
const serializeArrayParam = ({ allowReserved, explode, name, style, value }) => {
|
|
147
|
+
if (!explode) {
|
|
148
|
+
const joinedValues$1 = (allowReserved ? value : value.map((v) => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
|
|
149
|
+
switch (style) {
|
|
150
|
+
case "label": return `.${joinedValues$1}`;
|
|
151
|
+
case "matrix": return `;${name}=${joinedValues$1}`;
|
|
152
|
+
case "simple": return joinedValues$1;
|
|
153
|
+
default: return `${name}=${joinedValues$1}`;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
const separator = separatorArrayExplode(style);
|
|
157
|
+
const joinedValues = value.map((v) => {
|
|
158
|
+
if (style === "label" || style === "simple") return allowReserved ? v : encodeURIComponent(v);
|
|
159
|
+
return serializePrimitiveParam({
|
|
160
|
+
allowReserved,
|
|
161
|
+
name,
|
|
162
|
+
value: v
|
|
163
|
+
});
|
|
164
|
+
}).join(separator);
|
|
165
|
+
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
166
|
+
};
|
|
167
|
+
const serializePrimitiveParam = ({ allowReserved, name, value }) => {
|
|
168
|
+
if (value === void 0 || value === null) return "";
|
|
169
|
+
if (typeof value === "object") throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");
|
|
170
|
+
return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
|
|
171
|
+
};
|
|
172
|
+
const serializeObjectParam = ({ allowReserved, explode, name, style, value, valueOnly }) => {
|
|
173
|
+
if (value instanceof Date) return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
|
|
174
|
+
if (style !== "deepObject" && !explode) {
|
|
175
|
+
let values = [];
|
|
176
|
+
Object.entries(value).forEach(([key, v]) => {
|
|
177
|
+
values = [
|
|
178
|
+
...values,
|
|
179
|
+
key,
|
|
180
|
+
allowReserved ? v : encodeURIComponent(v)
|
|
181
|
+
];
|
|
182
|
+
});
|
|
183
|
+
const joinedValues$1 = values.join(",");
|
|
184
|
+
switch (style) {
|
|
185
|
+
case "form": return `${name}=${joinedValues$1}`;
|
|
186
|
+
case "label": return `.${joinedValues$1}`;
|
|
187
|
+
case "matrix": return `;${name}=${joinedValues$1}`;
|
|
188
|
+
default: return joinedValues$1;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
const separator = separatorObjectExplode(style);
|
|
192
|
+
const joinedValues = Object.entries(value).map(([key, v]) => serializePrimitiveParam({
|
|
193
|
+
allowReserved,
|
|
194
|
+
name: style === "deepObject" ? `${name}[${key}]` : key,
|
|
195
|
+
value: v
|
|
196
|
+
})).join(separator);
|
|
197
|
+
return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
//#endregion
|
|
201
|
+
//#region src/generated/core/utils.gen.ts
|
|
202
|
+
const PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
203
|
+
const defaultPathSerializer = ({ path, url: _url }) => {
|
|
204
|
+
let url = _url;
|
|
205
|
+
const matches = _url.match(PATH_PARAM_RE);
|
|
206
|
+
if (matches) for (const match of matches) {
|
|
207
|
+
let explode = false;
|
|
208
|
+
let name = match.substring(1, match.length - 1);
|
|
209
|
+
let style = "simple";
|
|
210
|
+
if (name.endsWith("*")) {
|
|
211
|
+
explode = true;
|
|
212
|
+
name = name.substring(0, name.length - 1);
|
|
213
|
+
}
|
|
214
|
+
if (name.startsWith(".")) {
|
|
215
|
+
name = name.substring(1);
|
|
216
|
+
style = "label";
|
|
217
|
+
} else if (name.startsWith(";")) {
|
|
218
|
+
name = name.substring(1);
|
|
219
|
+
style = "matrix";
|
|
220
|
+
}
|
|
221
|
+
const value = path[name];
|
|
222
|
+
if (value === void 0 || value === null) continue;
|
|
223
|
+
if (Array.isArray(value)) {
|
|
224
|
+
url = url.replace(match, serializeArrayParam({
|
|
225
|
+
explode,
|
|
226
|
+
name,
|
|
227
|
+
style,
|
|
228
|
+
value
|
|
229
|
+
}));
|
|
230
|
+
continue;
|
|
231
|
+
}
|
|
232
|
+
if (typeof value === "object") {
|
|
233
|
+
url = url.replace(match, serializeObjectParam({
|
|
234
|
+
explode,
|
|
235
|
+
name,
|
|
236
|
+
style,
|
|
237
|
+
value,
|
|
238
|
+
valueOnly: true
|
|
239
|
+
}));
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
if (style === "matrix") {
|
|
243
|
+
url = url.replace(match, `;${serializePrimitiveParam({
|
|
244
|
+
name,
|
|
245
|
+
value
|
|
246
|
+
})}`);
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
const replaceValue = encodeURIComponent(style === "label" ? `.${value}` : value);
|
|
250
|
+
url = url.replace(match, replaceValue);
|
|
251
|
+
}
|
|
252
|
+
return url;
|
|
253
|
+
};
|
|
254
|
+
const getUrl = ({ baseUrl, path, query, querySerializer, url: _url }) => {
|
|
255
|
+
const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
|
|
256
|
+
let url = (baseUrl ?? "") + pathUrl;
|
|
257
|
+
if (path) url = defaultPathSerializer({
|
|
258
|
+
path,
|
|
259
|
+
url
|
|
260
|
+
});
|
|
261
|
+
let search = query ? querySerializer(query) : "";
|
|
262
|
+
if (search.startsWith("?")) search = search.substring(1);
|
|
263
|
+
if (search) url += `?${search}`;
|
|
264
|
+
return url;
|
|
265
|
+
};
|
|
266
|
+
function getValidRequestBody(options) {
|
|
267
|
+
const hasBody = options.body !== void 0;
|
|
268
|
+
if (hasBody && options.bodySerializer) {
|
|
269
|
+
if ("serializedBody" in options) return options.serializedBody !== void 0 && options.serializedBody !== "" ? options.serializedBody : null;
|
|
270
|
+
return options.body !== "" ? options.body : null;
|
|
271
|
+
}
|
|
272
|
+
if (hasBody) return options.body;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
//#endregion
|
|
276
|
+
//#region src/generated/core/auth.gen.ts
|
|
277
|
+
const getAuthToken = async (auth, callback) => {
|
|
278
|
+
const token = typeof callback === "function" ? await callback(auth) : callback;
|
|
279
|
+
if (!token) return;
|
|
280
|
+
if (auth.scheme === "bearer") return `Bearer ${token}`;
|
|
281
|
+
if (auth.scheme === "basic") return `Basic ${btoa(token)}`;
|
|
282
|
+
return token;
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
//#endregion
|
|
286
|
+
//#region src/generated/client/utils.gen.ts
|
|
287
|
+
const createQuerySerializer = ({ parameters = {}, ...args } = {}) => {
|
|
288
|
+
const querySerializer = (queryParams) => {
|
|
289
|
+
const search = [];
|
|
290
|
+
if (queryParams && typeof queryParams === "object") for (const name in queryParams) {
|
|
291
|
+
const value = queryParams[name];
|
|
292
|
+
if (value === void 0 || value === null) continue;
|
|
293
|
+
const options = parameters[name] || args;
|
|
294
|
+
if (Array.isArray(value)) {
|
|
295
|
+
const serializedArray = serializeArrayParam({
|
|
296
|
+
allowReserved: options.allowReserved,
|
|
297
|
+
explode: true,
|
|
298
|
+
name,
|
|
299
|
+
style: "form",
|
|
300
|
+
value,
|
|
301
|
+
...options.array
|
|
302
|
+
});
|
|
303
|
+
if (serializedArray) search.push(serializedArray);
|
|
304
|
+
} else if (typeof value === "object") {
|
|
305
|
+
const serializedObject = serializeObjectParam({
|
|
306
|
+
allowReserved: options.allowReserved,
|
|
307
|
+
explode: true,
|
|
308
|
+
name,
|
|
309
|
+
style: "deepObject",
|
|
310
|
+
value,
|
|
311
|
+
...options.object
|
|
312
|
+
});
|
|
313
|
+
if (serializedObject) search.push(serializedObject);
|
|
314
|
+
} else {
|
|
315
|
+
const serializedPrimitive = serializePrimitiveParam({
|
|
316
|
+
allowReserved: options.allowReserved,
|
|
317
|
+
name,
|
|
318
|
+
value
|
|
319
|
+
});
|
|
320
|
+
if (serializedPrimitive) search.push(serializedPrimitive);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
return search.join("&");
|
|
324
|
+
};
|
|
325
|
+
return querySerializer;
|
|
326
|
+
};
|
|
327
|
+
/**
|
|
328
|
+
* Infers parseAs value from provided Content-Type header.
|
|
329
|
+
*/
|
|
330
|
+
const getParseAs = (contentType) => {
|
|
331
|
+
if (!contentType) return "stream";
|
|
332
|
+
const cleanContent = contentType.split(";")[0]?.trim();
|
|
333
|
+
if (!cleanContent) return;
|
|
334
|
+
if (cleanContent.startsWith("application/json") || cleanContent.endsWith("+json")) return "json";
|
|
335
|
+
if (cleanContent === "multipart/form-data") return "formData";
|
|
336
|
+
if ([
|
|
337
|
+
"application/",
|
|
338
|
+
"audio/",
|
|
339
|
+
"image/",
|
|
340
|
+
"video/"
|
|
341
|
+
].some((type) => cleanContent.startsWith(type))) return "blob";
|
|
342
|
+
if (cleanContent.startsWith("text/")) return "text";
|
|
343
|
+
};
|
|
344
|
+
const checkForExistence = (options, name) => {
|
|
345
|
+
if (!name) return false;
|
|
346
|
+
if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) return true;
|
|
347
|
+
return false;
|
|
348
|
+
};
|
|
349
|
+
const setAuthParams = async ({ security, ...options }) => {
|
|
350
|
+
for (const auth of security) {
|
|
351
|
+
if (checkForExistence(options, auth.name)) continue;
|
|
352
|
+
const token = await getAuthToken(auth, options.auth);
|
|
353
|
+
if (!token) continue;
|
|
354
|
+
const name = auth.name ?? "Authorization";
|
|
355
|
+
switch (auth.in) {
|
|
356
|
+
case "query":
|
|
357
|
+
if (!options.query) options.query = {};
|
|
358
|
+
options.query[name] = token;
|
|
359
|
+
break;
|
|
360
|
+
case "cookie":
|
|
361
|
+
options.headers.append("Cookie", `${name}=${token}`);
|
|
362
|
+
break;
|
|
363
|
+
case "header":
|
|
364
|
+
default:
|
|
365
|
+
options.headers.set(name, token);
|
|
366
|
+
break;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
const buildUrl = (options) => getUrl({
|
|
371
|
+
baseUrl: options.baseUrl,
|
|
372
|
+
path: options.path,
|
|
373
|
+
query: options.query,
|
|
374
|
+
querySerializer: typeof options.querySerializer === "function" ? options.querySerializer : createQuerySerializer(options.querySerializer),
|
|
375
|
+
url: options.url
|
|
376
|
+
});
|
|
377
|
+
const mergeConfigs = (a, b) => {
|
|
378
|
+
const config = {
|
|
379
|
+
...a,
|
|
380
|
+
...b
|
|
381
|
+
};
|
|
382
|
+
if (config.baseUrl?.endsWith("/")) config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);
|
|
383
|
+
config.headers = mergeHeaders(a.headers, b.headers);
|
|
384
|
+
return config;
|
|
385
|
+
};
|
|
386
|
+
const headersEntries = (headers) => {
|
|
387
|
+
const entries = [];
|
|
388
|
+
headers.forEach((value, key) => {
|
|
389
|
+
entries.push([key, value]);
|
|
390
|
+
});
|
|
391
|
+
return entries;
|
|
392
|
+
};
|
|
393
|
+
const mergeHeaders = (...headers) => {
|
|
394
|
+
const mergedHeaders = new Headers();
|
|
395
|
+
for (const header of headers) {
|
|
396
|
+
if (!header) continue;
|
|
397
|
+
const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);
|
|
398
|
+
for (const [key, value] of iterator) if (value === null) mergedHeaders.delete(key);
|
|
399
|
+
else if (Array.isArray(value)) for (const v of value) mergedHeaders.append(key, v);
|
|
400
|
+
else if (value !== void 0) mergedHeaders.set(key, typeof value === "object" ? JSON.stringify(value) : value);
|
|
401
|
+
}
|
|
402
|
+
return mergedHeaders;
|
|
403
|
+
};
|
|
404
|
+
var Interceptors = class {
|
|
405
|
+
fns = [];
|
|
406
|
+
clear() {
|
|
407
|
+
this.fns = [];
|
|
408
|
+
}
|
|
409
|
+
eject(id) {
|
|
410
|
+
const index = this.getInterceptorIndex(id);
|
|
411
|
+
if (this.fns[index]) this.fns[index] = null;
|
|
412
|
+
}
|
|
413
|
+
exists(id) {
|
|
414
|
+
const index = this.getInterceptorIndex(id);
|
|
415
|
+
return Boolean(this.fns[index]);
|
|
416
|
+
}
|
|
417
|
+
getInterceptorIndex(id) {
|
|
418
|
+
if (typeof id === "number") return this.fns[id] ? id : -1;
|
|
419
|
+
return this.fns.indexOf(id);
|
|
420
|
+
}
|
|
421
|
+
update(id, fn) {
|
|
422
|
+
const index = this.getInterceptorIndex(id);
|
|
423
|
+
if (this.fns[index]) {
|
|
424
|
+
this.fns[index] = fn;
|
|
425
|
+
return id;
|
|
426
|
+
}
|
|
427
|
+
return false;
|
|
428
|
+
}
|
|
429
|
+
use(fn) {
|
|
430
|
+
this.fns.push(fn);
|
|
431
|
+
return this.fns.length - 1;
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
const createInterceptors = () => ({
|
|
435
|
+
error: new Interceptors(),
|
|
436
|
+
request: new Interceptors(),
|
|
437
|
+
response: new Interceptors()
|
|
438
|
+
});
|
|
439
|
+
const defaultQuerySerializer = createQuerySerializer({
|
|
440
|
+
allowReserved: false,
|
|
441
|
+
array: {
|
|
442
|
+
explode: true,
|
|
443
|
+
style: "form"
|
|
444
|
+
},
|
|
445
|
+
object: {
|
|
446
|
+
explode: true,
|
|
447
|
+
style: "deepObject"
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
const defaultHeaders = { "Content-Type": "application/json" };
|
|
451
|
+
const createConfig = (override = {}) => ({
|
|
452
|
+
...jsonBodySerializer,
|
|
453
|
+
headers: defaultHeaders,
|
|
454
|
+
parseAs: "auto",
|
|
455
|
+
querySerializer: defaultQuerySerializer,
|
|
456
|
+
...override
|
|
457
|
+
});
|
|
458
|
+
|
|
459
|
+
//#endregion
|
|
460
|
+
//#region src/generated/client/client.gen.ts
|
|
461
|
+
const createClient = (config = {}) => {
|
|
462
|
+
let _config = mergeConfigs(createConfig(), config);
|
|
463
|
+
const getConfig = () => ({ ..._config });
|
|
464
|
+
const setConfig = (config$1) => {
|
|
465
|
+
_config = mergeConfigs(_config, config$1);
|
|
466
|
+
return getConfig();
|
|
467
|
+
};
|
|
468
|
+
const interceptors = createInterceptors();
|
|
469
|
+
const beforeRequest = async (options) => {
|
|
470
|
+
const opts = {
|
|
471
|
+
..._config,
|
|
472
|
+
...options,
|
|
473
|
+
fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,
|
|
474
|
+
headers: mergeHeaders(_config.headers, options.headers),
|
|
475
|
+
serializedBody: void 0
|
|
476
|
+
};
|
|
477
|
+
if (opts.security) await setAuthParams({
|
|
478
|
+
...opts,
|
|
479
|
+
security: opts.security
|
|
480
|
+
});
|
|
481
|
+
if (opts.requestValidator) await opts.requestValidator(opts);
|
|
482
|
+
if (opts.body !== void 0 && opts.bodySerializer) opts.serializedBody = opts.bodySerializer(opts.body);
|
|
483
|
+
if (opts.body === void 0 || opts.serializedBody === "") opts.headers.delete("Content-Type");
|
|
484
|
+
return {
|
|
485
|
+
opts,
|
|
486
|
+
url: buildUrl(opts)
|
|
487
|
+
};
|
|
488
|
+
};
|
|
489
|
+
const request = async (options) => {
|
|
490
|
+
const { opts, url } = await beforeRequest(options);
|
|
491
|
+
const requestInit = {
|
|
492
|
+
redirect: "follow",
|
|
493
|
+
...opts,
|
|
494
|
+
body: getValidRequestBody(opts)
|
|
495
|
+
};
|
|
496
|
+
let request$1 = new Request(url, requestInit);
|
|
497
|
+
for (const fn of interceptors.request.fns) if (fn) request$1 = await fn(request$1, opts);
|
|
498
|
+
const _fetch = opts.fetch;
|
|
499
|
+
let response;
|
|
500
|
+
try {
|
|
501
|
+
response = await _fetch(request$1);
|
|
502
|
+
} catch (error$1) {
|
|
503
|
+
let finalError$1 = error$1;
|
|
504
|
+
for (const fn of interceptors.error.fns) if (fn) finalError$1 = await fn(error$1, void 0, request$1, opts);
|
|
505
|
+
finalError$1 = finalError$1 || {};
|
|
506
|
+
if (opts.throwOnError) throw finalError$1;
|
|
507
|
+
return opts.responseStyle === "data" ? void 0 : {
|
|
508
|
+
error: finalError$1,
|
|
509
|
+
request: request$1,
|
|
510
|
+
response: void 0
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
for (const fn of interceptors.response.fns) if (fn) response = await fn(response, request$1, opts);
|
|
514
|
+
const result = {
|
|
515
|
+
request: request$1,
|
|
516
|
+
response
|
|
517
|
+
};
|
|
518
|
+
if (response.ok) {
|
|
519
|
+
const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
|
|
520
|
+
if (response.status === 204 || response.headers.get("Content-Length") === "0") {
|
|
521
|
+
let emptyData;
|
|
522
|
+
switch (parseAs) {
|
|
523
|
+
case "arrayBuffer":
|
|
524
|
+
case "blob":
|
|
525
|
+
case "text":
|
|
526
|
+
emptyData = await response[parseAs]();
|
|
527
|
+
break;
|
|
528
|
+
case "formData":
|
|
529
|
+
emptyData = new FormData();
|
|
530
|
+
break;
|
|
531
|
+
case "stream":
|
|
532
|
+
emptyData = response.body;
|
|
533
|
+
break;
|
|
534
|
+
case "json":
|
|
535
|
+
default:
|
|
536
|
+
emptyData = {};
|
|
537
|
+
break;
|
|
538
|
+
}
|
|
539
|
+
return opts.responseStyle === "data" ? emptyData : {
|
|
540
|
+
data: emptyData,
|
|
541
|
+
...result
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
let data;
|
|
545
|
+
switch (parseAs) {
|
|
546
|
+
case "arrayBuffer":
|
|
547
|
+
case "blob":
|
|
548
|
+
case "formData":
|
|
549
|
+
case "text":
|
|
550
|
+
data = await response[parseAs]();
|
|
551
|
+
break;
|
|
552
|
+
case "json": {
|
|
553
|
+
const text = await response.text();
|
|
554
|
+
data = text ? JSON.parse(text) : {};
|
|
555
|
+
break;
|
|
556
|
+
}
|
|
557
|
+
case "stream": return opts.responseStyle === "data" ? response.body : {
|
|
558
|
+
data: response.body,
|
|
559
|
+
...result
|
|
560
|
+
};
|
|
561
|
+
}
|
|
562
|
+
if (parseAs === "json") {
|
|
563
|
+
if (opts.responseValidator) await opts.responseValidator(data);
|
|
564
|
+
if (opts.responseTransformer) data = await opts.responseTransformer(data);
|
|
565
|
+
}
|
|
566
|
+
return opts.responseStyle === "data" ? data : {
|
|
567
|
+
data,
|
|
568
|
+
...result
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
const textError = await response.text();
|
|
572
|
+
let jsonError;
|
|
573
|
+
try {
|
|
574
|
+
jsonError = JSON.parse(textError);
|
|
575
|
+
} catch {}
|
|
576
|
+
const error = jsonError ?? textError;
|
|
577
|
+
let finalError = error;
|
|
578
|
+
for (const fn of interceptors.error.fns) if (fn) finalError = await fn(error, response, request$1, opts);
|
|
579
|
+
finalError = finalError || {};
|
|
580
|
+
if (opts.throwOnError) throw finalError;
|
|
581
|
+
return opts.responseStyle === "data" ? void 0 : {
|
|
582
|
+
error: finalError,
|
|
583
|
+
...result
|
|
584
|
+
};
|
|
585
|
+
};
|
|
586
|
+
const makeMethodFn = (method) => (options) => request({
|
|
587
|
+
...options,
|
|
588
|
+
method
|
|
589
|
+
});
|
|
590
|
+
const makeSseFn = (method) => async (options) => {
|
|
591
|
+
const { opts, url } = await beforeRequest(options);
|
|
592
|
+
return createSseClient({
|
|
593
|
+
...opts,
|
|
594
|
+
body: opts.body,
|
|
595
|
+
headers: opts.headers,
|
|
596
|
+
method,
|
|
597
|
+
onRequest: async (url$1, init) => {
|
|
598
|
+
let request$1 = new Request(url$1, init);
|
|
599
|
+
for (const fn of interceptors.request.fns) if (fn) request$1 = await fn(request$1, opts);
|
|
600
|
+
return request$1;
|
|
601
|
+
},
|
|
602
|
+
serializedBody: getValidRequestBody(opts),
|
|
603
|
+
url
|
|
604
|
+
});
|
|
605
|
+
};
|
|
606
|
+
return {
|
|
607
|
+
buildUrl,
|
|
608
|
+
connect: makeMethodFn("CONNECT"),
|
|
609
|
+
delete: makeMethodFn("DELETE"),
|
|
610
|
+
get: makeMethodFn("GET"),
|
|
611
|
+
getConfig,
|
|
612
|
+
head: makeMethodFn("HEAD"),
|
|
613
|
+
interceptors,
|
|
614
|
+
options: makeMethodFn("OPTIONS"),
|
|
615
|
+
patch: makeMethodFn("PATCH"),
|
|
616
|
+
post: makeMethodFn("POST"),
|
|
617
|
+
put: makeMethodFn("PUT"),
|
|
618
|
+
request,
|
|
619
|
+
setConfig,
|
|
620
|
+
sse: {
|
|
621
|
+
connect: makeSseFn("CONNECT"),
|
|
622
|
+
delete: makeSseFn("DELETE"),
|
|
623
|
+
get: makeSseFn("GET"),
|
|
624
|
+
head: makeSseFn("HEAD"),
|
|
625
|
+
options: makeSseFn("OPTIONS"),
|
|
626
|
+
patch: makeSseFn("PATCH"),
|
|
627
|
+
post: makeSseFn("POST"),
|
|
628
|
+
put: makeSseFn("PUT"),
|
|
629
|
+
trace: makeSseFn("TRACE")
|
|
630
|
+
},
|
|
631
|
+
trace: makeMethodFn("TRACE")
|
|
632
|
+
};
|
|
633
|
+
};
|
|
634
|
+
|
|
635
|
+
//#endregion
|
|
636
|
+
//#region src/generated/client.gen.ts
|
|
637
|
+
const client = createClient(createConfig({ baseUrl: "https://app.pennylane.com" }));
|
|
638
|
+
|
|
639
|
+
//#endregion
|
|
640
|
+
//#region src/generated/sdk.gen.ts
|
|
641
|
+
/**
|
|
642
|
+
* List journals
|
|
643
|
+
*
|
|
644
|
+
* List journals
|
|
645
|
+
*
|
|
646
|
+
* **DEPRECATED BEHAVIOR:**
|
|
647
|
+
* By default, returns journals ordered by ascending IDs
|
|
648
|
+
*
|
|
649
|
+
* **NEW BEHAVIOR:**
|
|
650
|
+
* By default, returns journals ordered by descending IDs
|
|
651
|
+
* The old `ledger` scope will only work on the old behavior system. As soon as you opt in to the new version, or when the sunset phase starts and you haven't explicitly opted out of the old behavior, the ledger scope will no longer work.
|
|
652
|
+
* For more details, see our API documentation https://pennylane.readme.io/docs/2026-api-changes-guide for migration instructions.
|
|
653
|
+
*
|
|
654
|
+
*
|
|
655
|
+
* > ℹ️
|
|
656
|
+
* > This endpoint requires one of the following scopes: `ledger (DEPRECATED)`, `journals:readonly`, `journals:all`
|
|
657
|
+
*/
|
|
658
|
+
const getJournals = (options) => (options?.client ?? client).get({
|
|
659
|
+
security: [{
|
|
660
|
+
scheme: "bearer",
|
|
661
|
+
type: "http"
|
|
662
|
+
}],
|
|
663
|
+
url: "/api/external/v2/journals",
|
|
664
|
+
...options
|
|
665
|
+
});
|
|
666
|
+
/**
|
|
667
|
+
* Create a journal
|
|
668
|
+
*
|
|
669
|
+
* Create a journal
|
|
670
|
+
*
|
|
671
|
+
* **NEW BEHAVIOR :**
|
|
672
|
+
* The old `ledger` scope will only work on the old behavior system. As soon as you opt in to the new version, or when the sunset phase starts and you haven't explicitly opted out of the old behavior, the ledger scope will no longer work.
|
|
673
|
+
* For more details, see our API documentation https://pennylane.readme.io/docs/2026-api-changes-guide for migration instructions.
|
|
674
|
+
*
|
|
675
|
+
*
|
|
676
|
+
* > ℹ️
|
|
677
|
+
* > This endpoint requires one of the following scopes: `ledger (DEPRECATED)`, `journals:all`
|
|
678
|
+
*/
|
|
679
|
+
const postJournals = (options) => (options.client ?? client).post({
|
|
680
|
+
security: [{
|
|
681
|
+
scheme: "bearer",
|
|
682
|
+
type: "http"
|
|
683
|
+
}],
|
|
684
|
+
url: "/api/external/v2/journals",
|
|
685
|
+
...options,
|
|
686
|
+
headers: {
|
|
687
|
+
"Content-Type": "application/json",
|
|
688
|
+
...options.headers
|
|
689
|
+
}
|
|
690
|
+
});
|
|
691
|
+
/**
|
|
692
|
+
* Retrieve a journal
|
|
693
|
+
*
|
|
694
|
+
* Retrieve a journal
|
|
695
|
+
*
|
|
696
|
+
* **NEW BEHAVIOR :**
|
|
697
|
+
* The old `ledger` scope will only work on the old behavior system. As soon as you opt in to the new version, or when the sunset phase starts and you haven't explicitly opted out of the old behavior, the ledger scope will no longer work.
|
|
698
|
+
* For more details, see our API documentation https://pennylane.readme.io/docs/2026-api-changes-guide for migration instructions.
|
|
699
|
+
*
|
|
700
|
+
*
|
|
701
|
+
* > ℹ️
|
|
702
|
+
* > This endpoint requires one of the following scopes: `ledger (DEPRECATED)`, `journals:readonly`, `journals:all`
|
|
703
|
+
*/
|
|
704
|
+
const getJournal = (options) => (options.client ?? client).get({
|
|
705
|
+
security: [{
|
|
706
|
+
scheme: "bearer",
|
|
707
|
+
type: "http"
|
|
708
|
+
}],
|
|
709
|
+
url: "/api/external/v2/journals/{id}",
|
|
710
|
+
...options
|
|
711
|
+
});
|
|
712
|
+
/**
|
|
713
|
+
* List Ledger Accounts
|
|
714
|
+
*
|
|
715
|
+
* List Ledger Accounts
|
|
716
|
+
*
|
|
717
|
+
* **DEPRECATED BEHAVIOR:**
|
|
718
|
+
* By default, returns ledger accounts ordered by ascending IDs
|
|
719
|
+
*
|
|
720
|
+
* **NEW BEHAVIOR:**
|
|
721
|
+
* By default, returns ledger accounts ordered by descending IDs
|
|
722
|
+
* The old `ledger` scope will only work on the old behavior system. As soon as you opt in to the new version, or when the sunset phase starts and you haven't explicitly opted out of the old behavior, the ledger scope will no longer work.
|
|
723
|
+
* For more details, see our API documentation https://pennylane.readme.io/docs/2026-api-changes-guide for migration instructions.
|
|
724
|
+
*
|
|
725
|
+
*
|
|
726
|
+
* > ℹ️
|
|
727
|
+
* > This endpoint requires one of the following scopes: `ledger (DEPRECATED)`, `ledger_accounts:readonly`, `ledger_accounts:all`
|
|
728
|
+
*/
|
|
729
|
+
const getLedgerAccounts = (options) => (options?.client ?? client).get({
|
|
730
|
+
security: [{
|
|
731
|
+
scheme: "bearer",
|
|
732
|
+
type: "http"
|
|
733
|
+
}],
|
|
734
|
+
url: "/api/external/v2/ledger_accounts",
|
|
735
|
+
...options
|
|
736
|
+
});
|
|
737
|
+
/**
|
|
738
|
+
* Create a ledger account
|
|
739
|
+
*
|
|
740
|
+
* Create a ledger account
|
|
741
|
+
*
|
|
742
|
+
* **NEW BEHAVIOR :**
|
|
743
|
+
* The old `ledger` scope will only work on the old behavior system. As soon as you opt in to the new version, or when the sunset phase starts and you haven't explicitly opted out of the old behavior, the ledger scope will no longer work.
|
|
744
|
+
* For more details, see our API documentation https://pennylane.readme.io/docs/2026-api-changes-guide for migration instructions.
|
|
745
|
+
*
|
|
746
|
+
*
|
|
747
|
+
* > ℹ️
|
|
748
|
+
* > This endpoint requires one of the following scopes: `ledger (DEPRECATED)`, `ledger_accounts:all`
|
|
749
|
+
*/
|
|
750
|
+
const postLedgerAccounts = (options) => (options?.client ?? client).post({
|
|
751
|
+
security: [{
|
|
752
|
+
scheme: "bearer",
|
|
753
|
+
type: "http"
|
|
754
|
+
}],
|
|
755
|
+
url: "/api/external/v2/ledger_accounts",
|
|
756
|
+
...options,
|
|
757
|
+
headers: {
|
|
758
|
+
"Content-Type": "application/json",
|
|
759
|
+
...options?.headers
|
|
760
|
+
}
|
|
761
|
+
});
|
|
762
|
+
/**
|
|
763
|
+
* Get a ledger account
|
|
764
|
+
*
|
|
765
|
+
* Get a ledger account
|
|
766
|
+
*
|
|
767
|
+
* **NEW BEHAVIOR :**
|
|
768
|
+
* The old `ledger` scope will only work on the old behavior system. As soon as you opt in to the new version, or when the sunset phase starts and you haven't explicitly opted out of the old behavior, the ledger scope will no longer work.
|
|
769
|
+
* For more details, see our API documentation https://pennylane.readme.io/docs/2026-api-changes-guide for migration instructions.
|
|
770
|
+
*
|
|
771
|
+
*
|
|
772
|
+
* > ℹ️
|
|
773
|
+
* > This endpoint requires one of the following scopes: `ledger (DEPRECATED)`, `ledger_accounts:readonly`, `ledger_accounts:all`
|
|
774
|
+
*/
|
|
775
|
+
const getLedgerAccount = (options) => (options.client ?? client).get({
|
|
776
|
+
security: [{
|
|
777
|
+
scheme: "bearer",
|
|
778
|
+
type: "http"
|
|
779
|
+
}],
|
|
780
|
+
url: "/api/external/v2/ledger_accounts/{id}",
|
|
781
|
+
...options
|
|
782
|
+
});
|
|
783
|
+
/**
|
|
784
|
+
* Update a ledger account
|
|
785
|
+
*
|
|
786
|
+
* Update a ledger account
|
|
787
|
+
*
|
|
788
|
+
* > ℹ️
|
|
789
|
+
* > This endpoint requires one of the following scopes: `ledger_accounts:all`
|
|
790
|
+
*/
|
|
791
|
+
const updateLedgerAccount = (options) => (options.client ?? client).put({
|
|
792
|
+
security: [{
|
|
793
|
+
scheme: "bearer",
|
|
794
|
+
type: "http"
|
|
795
|
+
}],
|
|
796
|
+
url: "/api/external/v2/ledger_accounts/{id}",
|
|
797
|
+
...options,
|
|
798
|
+
headers: {
|
|
799
|
+
"Content-Type": "application/json",
|
|
800
|
+
...options.headers
|
|
801
|
+
}
|
|
802
|
+
});
|
|
803
|
+
/**
|
|
804
|
+
* List attachments
|
|
805
|
+
*
|
|
806
|
+
* List attachments
|
|
807
|
+
*
|
|
808
|
+
* > ‼️
|
|
809
|
+
* > This endpoint is **DEPRECATED**
|
|
810
|
+
* > As soon as you opt in to the new version, or when the sunset phase starts and you haven't explicitly opted out of the old behavior, this endpoint will no longer work.
|
|
811
|
+
* For more details, see our API documentation https://pennylane.readme.io/docs/2026-api-changes-guide for migration instructions.
|
|
812
|
+
*
|
|
813
|
+
* > ℹ️
|
|
814
|
+
* > This endpoint requires one of the following scopes: `ledger`
|
|
815
|
+
*
|
|
816
|
+
* @deprecated
|
|
817
|
+
*/
|
|
818
|
+
const getLedgerAttachments = (options) => (options?.client ?? client).get({
|
|
819
|
+
security: [{
|
|
820
|
+
scheme: "bearer",
|
|
821
|
+
type: "http"
|
|
822
|
+
}],
|
|
823
|
+
url: "/api/external/v2/ledger_attachments",
|
|
824
|
+
...options
|
|
825
|
+
});
|
|
826
|
+
/**
|
|
827
|
+
* Upload a file
|
|
828
|
+
*
|
|
829
|
+
* Upload a file to attach to a ledger entry. The maximum allowed file size is 100MB.
|
|
830
|
+
* Note that this will not upload a file into the DMS (GED).
|
|
831
|
+
*
|
|
832
|
+
* > ‼️
|
|
833
|
+
* > This endpoint is **DEPRECATED**
|
|
834
|
+
* > As an alternative, please use the [File Attachments: Upload a file](https://pennylane.readme.io/reference/postfileattachments#/) endpoint.
|
|
835
|
+
*
|
|
836
|
+
* > ℹ️
|
|
837
|
+
* > This endpoint requires one of the following scopes: `ledger`
|
|
838
|
+
*
|
|
839
|
+
* @deprecated
|
|
840
|
+
*/
|
|
841
|
+
const postLedgerAttachments = (options) => (options?.client ?? client).post({
|
|
842
|
+
...formDataBodySerializer,
|
|
843
|
+
security: [{
|
|
844
|
+
scheme: "bearer",
|
|
845
|
+
type: "http"
|
|
846
|
+
}],
|
|
847
|
+
url: "/api/external/v2/ledger_attachments",
|
|
848
|
+
...options,
|
|
849
|
+
headers: {
|
|
850
|
+
"Content-Type": null,
|
|
851
|
+
...options?.headers
|
|
852
|
+
}
|
|
853
|
+
});
|
|
854
|
+
/**
|
|
855
|
+
* List Ledger Entries
|
|
856
|
+
*
|
|
857
|
+
* Returns a list of ledger entries.
|
|
858
|
+
* **DEPRECATED BEHAVIOR:**
|
|
859
|
+
* Draft entries are filtered out.
|
|
860
|
+
* By default, entries from fiscal periods that are closed or frozen are excluded.
|
|
861
|
+
* However, if a 'date' filter is provided, it will return all entries within the specified date range, even if they fall within a closed or frozen fiscal period.
|
|
862
|
+
*
|
|
863
|
+
*
|
|
864
|
+
* **NEW BEHAVIOR :**
|
|
865
|
+
* By default, all entries (including draft ones) are rendered regardless of their fiscal year status (open, closed, or frozen).
|
|
866
|
+
* The old `ledger` scope will only work on the old behavior system. As soon as you opt in to the new version, or when the sunset phase starts and you haven't explicitly opted out of the old behavior, the ledger scope will no longer work.
|
|
867
|
+
* For more details, see our API documentation https://pennylane.readme.io/docs/2026-api-changes-guide for migration instructions.
|
|
868
|
+
*
|
|
869
|
+
* > ℹ️
|
|
870
|
+
* > This endpoint requires one of the following scopes: `ledger (DEPRECATED)`, `ledger_entries:readonly`, `ledger_entries:all`
|
|
871
|
+
*/
|
|
872
|
+
const getLedgerEntries = (options) => (options?.client ?? client).get({
|
|
873
|
+
security: [{
|
|
874
|
+
scheme: "bearer",
|
|
875
|
+
type: "http"
|
|
876
|
+
}],
|
|
877
|
+
url: "/api/external/v2/ledger_entries",
|
|
878
|
+
...options
|
|
879
|
+
});
|
|
880
|
+
/**
|
|
881
|
+
* Create a ledger entry
|
|
882
|
+
*
|
|
883
|
+
* Create a ledger entry
|
|
884
|
+
*
|
|
885
|
+
* **DEPRECATED BEHAVIOR:**
|
|
886
|
+
* The old `ledger` scope will only work on the old behavior system. As soon as you opt in to the new version, or when the sunset phase starts and you haven't explicitly opted out of the old behavior, the ledger scope will no longer work.
|
|
887
|
+
* For more details, see our API documentation https://pennylane.readme.io/docs/2026-api-changes-guide for migration instructions.
|
|
888
|
+
*
|
|
889
|
+
*
|
|
890
|
+
* > ℹ️
|
|
891
|
+
* > This endpoint requires one of the following scopes: `ledger (DEPRECATED)`, `ledger_entries:all`
|
|
892
|
+
*/
|
|
893
|
+
const postLedgerEntries = (options) => (options.client ?? client).post({
|
|
894
|
+
security: [{
|
|
895
|
+
scheme: "bearer",
|
|
896
|
+
type: "http"
|
|
897
|
+
}],
|
|
898
|
+
url: "/api/external/v2/ledger_entries",
|
|
899
|
+
...options,
|
|
900
|
+
headers: {
|
|
901
|
+
"Content-Type": "application/json",
|
|
902
|
+
...options.headers
|
|
903
|
+
}
|
|
904
|
+
});
|
|
905
|
+
/**
|
|
906
|
+
* Retrieve a Ledger entry
|
|
907
|
+
*
|
|
908
|
+
* Retrieve a ledger entry
|
|
909
|
+
*
|
|
910
|
+
* **NEW BEHAVIOR :**
|
|
911
|
+
* The old `ledger` scope will only work on the old behavior system. As soon as you opt in to the new version, or when the sunset phase starts and you haven't explicitly opted out of the old behavior, the ledger scope will no longer work.
|
|
912
|
+
* For more details, see our API documentation https://pennylane.readme.io/docs/2026-api-changes-guide for migration instructions.
|
|
913
|
+
*
|
|
914
|
+
*
|
|
915
|
+
* > ℹ️
|
|
916
|
+
* > This endpoint requires one of the following scopes: `ledger (DEPRECATED)`, `ledger_entries:readonly`, `ledger_entries:all`
|
|
917
|
+
*/
|
|
918
|
+
const getLedgerEntry = (options) => (options.client ?? client).get({
|
|
919
|
+
security: [{
|
|
920
|
+
scheme: "bearer",
|
|
921
|
+
type: "http"
|
|
922
|
+
}],
|
|
923
|
+
url: "/api/external/v2/ledger_entries/{id}",
|
|
924
|
+
...options
|
|
925
|
+
});
|
|
926
|
+
/**
|
|
927
|
+
* Update a ledger entry
|
|
928
|
+
*
|
|
929
|
+
* Update a ledger entry
|
|
930
|
+
*
|
|
931
|
+
* **NEW BEHAVIOR :**
|
|
932
|
+
* The old `ledger` scope will only work on the old behavior system. As soon as you opt in to the new version, or when the sunset phase starts and you haven't explicitly opted out of the old behavior, the ledger scope will no longer work.
|
|
933
|
+
* For more details, see our API documentation https://pennylane.readme.io/docs/2026-api-changes-guide for migration instructions.
|
|
934
|
+
*
|
|
935
|
+
*
|
|
936
|
+
* > ℹ️
|
|
937
|
+
* > This endpoint requires one of the following scopes: `ledger (DEPRECATED)`, `ledger_entries:all`
|
|
938
|
+
*/
|
|
939
|
+
const putLedgerEntries = (options) => (options.client ?? client).put({
|
|
940
|
+
security: [{
|
|
941
|
+
scheme: "bearer",
|
|
942
|
+
type: "http"
|
|
943
|
+
}],
|
|
944
|
+
url: "/api/external/v2/ledger_entries/{id}",
|
|
945
|
+
...options,
|
|
946
|
+
headers: {
|
|
947
|
+
"Content-Type": "application/json",
|
|
948
|
+
...options.headers
|
|
949
|
+
}
|
|
950
|
+
});
|
|
951
|
+
/**
|
|
952
|
+
* List ledger entry lines of a Ledger Entry
|
|
953
|
+
*
|
|
954
|
+
* List ledger entry lines of a Ledger Entry
|
|
955
|
+
*
|
|
956
|
+
* **DEPRECATED BEHAVIOR:**
|
|
957
|
+
* By default, returns ledger entry lines ordered by ascending IDs
|
|
958
|
+
*
|
|
959
|
+
* **NEW BEHAVIOR:**
|
|
960
|
+
* By default, returns ledger entry lines ordered by descending IDs
|
|
961
|
+
* The old `ledger` scope will only work on the old behavior system. As soon as you opt in to the new version, or when the sunset phase starts and you haven't explicitly opted out of the old behavior, the ledger scope will no longer work.
|
|
962
|
+
* For more details, see our API documentation https://pennylane.readme.io/docs/2026-api-changes-guide for migration instructions.
|
|
963
|
+
*
|
|
964
|
+
*
|
|
965
|
+
* > ℹ️
|
|
966
|
+
* > This endpoint requires one of the following scopes: `ledger (DEPRECATED)`, `ledger_entries:readonly`, `ledger_entries:all`
|
|
967
|
+
*/
|
|
968
|
+
const getLedgerEntriesLedgerEntryLines = (options) => (options.client ?? client).get({
|
|
969
|
+
security: [{
|
|
970
|
+
scheme: "bearer",
|
|
971
|
+
type: "http"
|
|
972
|
+
}],
|
|
973
|
+
url: "/api/external/v2/ledger_entries/{ledger_entry_id}/ledger_entry_lines",
|
|
974
|
+
...options
|
|
975
|
+
});
|
|
976
|
+
/**
|
|
977
|
+
* List ledger entry lines
|
|
978
|
+
*
|
|
979
|
+
* List ledger entry lines
|
|
980
|
+
*
|
|
981
|
+
* > ℹ️
|
|
982
|
+
* > This endpoint requires one of the following scopes: `ledger (DEPRECATED)`, `ledger_entries:readonly`, `ledger_entries:all`
|
|
983
|
+
*/
|
|
984
|
+
const getLedgerEntryLines = (options) => (options?.client ?? client).get({
|
|
985
|
+
security: [{
|
|
986
|
+
scheme: "bearer",
|
|
987
|
+
type: "http"
|
|
988
|
+
}],
|
|
989
|
+
url: "/api/external/v2/ledger_entry_lines",
|
|
990
|
+
...options
|
|
991
|
+
});
|
|
992
|
+
/**
|
|
993
|
+
* Retrieve a Ledger entry line
|
|
994
|
+
*
|
|
995
|
+
* Retrieve a ledger entry line
|
|
996
|
+
*
|
|
997
|
+
* > ℹ️
|
|
998
|
+
* > This endpoint requires one of the following scopes: `ledger (DEPRECATED)`, `ledger_entries:readonly`, `ledger_entries:all`
|
|
999
|
+
*/
|
|
1000
|
+
const getLedgerEntryLine = (options) => (options.client ?? client).get({
|
|
1001
|
+
security: [{
|
|
1002
|
+
scheme: "bearer",
|
|
1003
|
+
type: "http"
|
|
1004
|
+
}],
|
|
1005
|
+
url: "/api/external/v2/ledger_entry_lines/{id}",
|
|
1006
|
+
...options
|
|
1007
|
+
});
|
|
1008
|
+
/**
|
|
1009
|
+
* Unletter ledger entry lines
|
|
1010
|
+
*
|
|
1011
|
+
* This endpoint lets you unletter ledger entry lines.
|
|
1012
|
+
*
|
|
1013
|
+
* > ℹ️
|
|
1014
|
+
* > This endpoint requires one of the following scopes: `ledger (DEPRECATED)`, `ledger_entries:all`
|
|
1015
|
+
*/
|
|
1016
|
+
const deleteLedgerEntryLinesUnletter = (options) => (options?.client ?? client).delete({
|
|
1017
|
+
security: [{
|
|
1018
|
+
scheme: "bearer",
|
|
1019
|
+
type: "http"
|
|
1020
|
+
}],
|
|
1021
|
+
url: "/api/external/v2/ledger_entry_lines/lettering",
|
|
1022
|
+
...options,
|
|
1023
|
+
headers: {
|
|
1024
|
+
"Content-Type": "application/json",
|
|
1025
|
+
...options?.headers
|
|
1026
|
+
}
|
|
1027
|
+
});
|
|
1028
|
+
/**
|
|
1029
|
+
* Letter ledger entry lines
|
|
1030
|
+
*
|
|
1031
|
+
* This endpoint lets you letter ledger entry lines together. All
|
|
1032
|
+
* received entry lines will be lettered together. If a passed entry line is
|
|
1033
|
+
* already lettered, then the lettering will be applied to its associated lettered
|
|
1034
|
+
* entry lines as well.
|
|
1035
|
+
*
|
|
1036
|
+
* > ℹ️
|
|
1037
|
+
* > This endpoint requires one of the following scopes: `ledger (DEPRECATED)`, `ledger_entries:all`
|
|
1038
|
+
*/
|
|
1039
|
+
const postLedgerEntryLinesLetter = (options) => (options?.client ?? client).post({
|
|
1040
|
+
security: [{
|
|
1041
|
+
scheme: "bearer",
|
|
1042
|
+
type: "http"
|
|
1043
|
+
}],
|
|
1044
|
+
url: "/api/external/v2/ledger_entry_lines/lettering",
|
|
1045
|
+
...options,
|
|
1046
|
+
headers: {
|
|
1047
|
+
"Content-Type": "application/json",
|
|
1048
|
+
...options?.headers
|
|
1049
|
+
}
|
|
1050
|
+
});
|
|
1051
|
+
/**
|
|
1052
|
+
* List ledger entry lines lettered to a given ledger entry line
|
|
1053
|
+
*
|
|
1054
|
+
* List ledger entry lines lettered to a given ledger entry line
|
|
1055
|
+
*
|
|
1056
|
+
* **DEPRECATED BEHAVIOR:**
|
|
1057
|
+
* The items rendered are sorted ordered by ascending `id`.
|
|
1058
|
+
*
|
|
1059
|
+
* **NEW BEHAVIOR:**
|
|
1060
|
+
* The items rendered are sorted ordered by descending `id` by default.
|
|
1061
|
+
* A new sort param is available to customize the sorting behavior (see "sort" query parameter description).
|
|
1062
|
+
* The old `ledger` scope will only work on the old behavior system. As soon as you opt in to the new version, or when the sunset phase starts and you haven't explicitly opted out of the old behavior, the ledger scope will no longer work.
|
|
1063
|
+
* For more details, see our API documentation https://pennylane.readme.io/docs/2026-api-changes-guide for migration instructions.
|
|
1064
|
+
*
|
|
1065
|
+
*
|
|
1066
|
+
* > ℹ️
|
|
1067
|
+
* > This endpoint requires one of the following scopes: `ledger (DEPRECATED)`, `ledger_entries:readonly`, `ledger_entries:all`
|
|
1068
|
+
*/
|
|
1069
|
+
const getLedgerEntryLinesLetteredLedgerEntryLines = (options) => (options.client ?? client).get({
|
|
1070
|
+
security: [{
|
|
1071
|
+
scheme: "bearer",
|
|
1072
|
+
type: "http"
|
|
1073
|
+
}],
|
|
1074
|
+
url: "/api/external/v2/ledger_entry_lines/{ledger_entry_line_id}/lettered_ledger_entry_lines",
|
|
1075
|
+
...options
|
|
1076
|
+
});
|
|
1077
|
+
/**
|
|
1078
|
+
* List categories of a Ledger Entry line
|
|
1079
|
+
*
|
|
1080
|
+
* List categories of a Ledger Entry line
|
|
1081
|
+
*
|
|
1082
|
+
* **NEW BEHAVIOR :**
|
|
1083
|
+
* The old `ledger` scope will only work on the old behavior system. As soon as you opt in to the new version, or when the sunset phase starts and you haven't explicitly opted out of the old behavior, the ledger scope will no longer work.
|
|
1084
|
+
* For more details, see our API documentation https://pennylane.readme.io/docs/2026-api-changes-guide for migration instructions.
|
|
1085
|
+
*
|
|
1086
|
+
*
|
|
1087
|
+
* > ℹ️
|
|
1088
|
+
* > This endpoint requires one of the following scopes: `ledger (DEPRECATED)`, `ledger_entries:readonly`, `ledger_entries:all`
|
|
1089
|
+
*/
|
|
1090
|
+
const getLedgerEntryLinesCategories = (options) => (options.client ?? client).get({
|
|
1091
|
+
security: [{
|
|
1092
|
+
scheme: "bearer",
|
|
1093
|
+
type: "http"
|
|
1094
|
+
}],
|
|
1095
|
+
url: "/api/external/v2/ledger_entry_lines/{ledger_entry_line_id}/categories",
|
|
1096
|
+
...options
|
|
1097
|
+
});
|
|
1098
|
+
/**
|
|
1099
|
+
* Link Analytical Categories to a Ledger Entry line
|
|
1100
|
+
*
|
|
1101
|
+
* This endpoint replaces already existing categories on the Ledger Entry line with new values.
|
|
1102
|
+
* If an empty array of categories_ids is provided, it will remove all categories from the Ledger Entry line.
|
|
1103
|
+
*
|
|
1104
|
+
* **NEW BEHAVIOR :**
|
|
1105
|
+
* The old `ledger` scope will only work on the old behavior system. As soon as you opt in to the new version, or when the sunset phase starts and you haven't explicitly opted out of the old behavior, the ledger scope will no longer work.
|
|
1106
|
+
* For more details, see our API documentation https://pennylane.readme.io/docs/2026-api-changes-guide for migration instructions.
|
|
1107
|
+
*
|
|
1108
|
+
*
|
|
1109
|
+
* > ℹ️
|
|
1110
|
+
* > This endpoint requires one of the following scopes: `ledger (DEPRECATED)`, `ledger_entries:all`
|
|
1111
|
+
*/
|
|
1112
|
+
const putLedgerEntryLinesCategories = (options) => (options.client ?? client).put({
|
|
1113
|
+
security: [{
|
|
1114
|
+
scheme: "bearer",
|
|
1115
|
+
type: "http"
|
|
1116
|
+
}],
|
|
1117
|
+
url: "/api/external/v2/ledger_entry_lines/{ledger_entry_line_id}/categories",
|
|
1118
|
+
...options,
|
|
1119
|
+
headers: {
|
|
1120
|
+
"Content-Type": "application/json",
|
|
1121
|
+
...options.headers
|
|
1122
|
+
}
|
|
1123
|
+
});
|
|
1124
|
+
/**
|
|
1125
|
+
* List customer invoices
|
|
1126
|
+
*
|
|
1127
|
+
* List customer invoices and credit notes
|
|
1128
|
+
*
|
|
1129
|
+
* > ℹ️
|
|
1130
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`, `customer_invoices:readonly`
|
|
1131
|
+
*/
|
|
1132
|
+
const getCustomerInvoices = (options) => (options?.client ?? client).get({
|
|
1133
|
+
security: [{
|
|
1134
|
+
scheme: "bearer",
|
|
1135
|
+
type: "http"
|
|
1136
|
+
}],
|
|
1137
|
+
url: "/api/external/v2/customer_invoices",
|
|
1138
|
+
...options
|
|
1139
|
+
});
|
|
1140
|
+
/**
|
|
1141
|
+
* Create a customer invoice
|
|
1142
|
+
*
|
|
1143
|
+
* This endpoint allows you to create a draft or finalized customer
|
|
1144
|
+
* invoice or credit note
|
|
1145
|
+
*
|
|
1146
|
+
*
|
|
1147
|
+
* > ℹ️
|
|
1148
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`
|
|
1149
|
+
*/
|
|
1150
|
+
const postCustomerInvoices = (options) => (options.client ?? client).post({
|
|
1151
|
+
security: [{
|
|
1152
|
+
scheme: "bearer",
|
|
1153
|
+
type: "http"
|
|
1154
|
+
}],
|
|
1155
|
+
url: "/api/external/v2/customer_invoices",
|
|
1156
|
+
...options,
|
|
1157
|
+
headers: {
|
|
1158
|
+
"Content-Type": "application/json",
|
|
1159
|
+
...options.headers
|
|
1160
|
+
}
|
|
1161
|
+
});
|
|
1162
|
+
/**
|
|
1163
|
+
* Import an invoice with file attached
|
|
1164
|
+
*
|
|
1165
|
+
* This endpoint allows you to import an invoice.
|
|
1166
|
+
*
|
|
1167
|
+
* ℹ️ To ensure consistency, **we will apply validations on amounts in accordance with our rounding policy**. We allow a difference of up to 1 euro between total amounts and the sum of invoice lines. For further details, please refer to our [article](https://help.pennylane.com/fr/articles/61575-comprendre-l-arrondi-de-tva-d-un-produit) on rounding policy.
|
|
1168
|
+
*
|
|
1169
|
+
*
|
|
1170
|
+
* > ℹ️
|
|
1171
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`
|
|
1172
|
+
*/
|
|
1173
|
+
const importCustomerInvoices = (options) => (options.client ?? client).post({
|
|
1174
|
+
security: [{
|
|
1175
|
+
scheme: "bearer",
|
|
1176
|
+
type: "http"
|
|
1177
|
+
}],
|
|
1178
|
+
url: "/api/external/v2/customer_invoices/import",
|
|
1179
|
+
...options,
|
|
1180
|
+
headers: {
|
|
1181
|
+
"Content-Type": "application/json",
|
|
1182
|
+
...options.headers
|
|
1183
|
+
}
|
|
1184
|
+
});
|
|
1185
|
+
/**
|
|
1186
|
+
* Create a customer invoice from a quote
|
|
1187
|
+
*
|
|
1188
|
+
* This endpoint allows you to create a customer invoice from an existing quote.
|
|
1189
|
+
* The invoice will inherit the quote's data (customer, lines, etc.).
|
|
1190
|
+
*
|
|
1191
|
+
*
|
|
1192
|
+
* > ℹ️
|
|
1193
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`
|
|
1194
|
+
*/
|
|
1195
|
+
const createCustomerInvoiceFromQuote = (options) => (options.client ?? client).post({
|
|
1196
|
+
security: [{
|
|
1197
|
+
scheme: "bearer",
|
|
1198
|
+
type: "http"
|
|
1199
|
+
}],
|
|
1200
|
+
url: "/api/external/v2/customer_invoices/create_from_quote",
|
|
1201
|
+
...options,
|
|
1202
|
+
headers: {
|
|
1203
|
+
"Content-Type": "application/json",
|
|
1204
|
+
...options.headers
|
|
1205
|
+
}
|
|
1206
|
+
});
|
|
1207
|
+
/**
|
|
1208
|
+
* List billing subscriptions
|
|
1209
|
+
*
|
|
1210
|
+
* This endpoint returns a list of subscriptions.
|
|
1211
|
+
*
|
|
1212
|
+
* > ℹ️
|
|
1213
|
+
* > This endpoint requires one of the following scopes: `billing_subscriptions:all`, `billing_subscriptions:readonly`
|
|
1214
|
+
*/
|
|
1215
|
+
const getBillingSubscriptions = (options) => (options?.client ?? client).get({
|
|
1216
|
+
security: [{
|
|
1217
|
+
scheme: "bearer",
|
|
1218
|
+
type: "http"
|
|
1219
|
+
}],
|
|
1220
|
+
url: "/api/external/v2/billing_subscriptions",
|
|
1221
|
+
...options
|
|
1222
|
+
});
|
|
1223
|
+
/**
|
|
1224
|
+
* Create a billing subscription
|
|
1225
|
+
*
|
|
1226
|
+
* This endpoint allows you to create a subscription. Pennylane will generate the customer invoice each month.
|
|
1227
|
+
* You can also link the subscription to a GoCardless mandate.
|
|
1228
|
+
*
|
|
1229
|
+
*
|
|
1230
|
+
* > ℹ️
|
|
1231
|
+
* > This endpoint requires one of the following scopes: `billing_subscriptions:all`
|
|
1232
|
+
*/
|
|
1233
|
+
const postBillingSubscriptions = (options) => (options.client ?? client).post({
|
|
1234
|
+
security: [{
|
|
1235
|
+
scheme: "bearer",
|
|
1236
|
+
type: "http"
|
|
1237
|
+
}],
|
|
1238
|
+
url: "/api/external/v2/billing_subscriptions",
|
|
1239
|
+
...options,
|
|
1240
|
+
headers: {
|
|
1241
|
+
"Content-Type": "application/json",
|
|
1242
|
+
...options.headers
|
|
1243
|
+
}
|
|
1244
|
+
});
|
|
1245
|
+
/**
|
|
1246
|
+
* Get a billing subscription
|
|
1247
|
+
*
|
|
1248
|
+
* This endpoint returns a specific billing subscription.
|
|
1249
|
+
*
|
|
1250
|
+
* > ℹ️
|
|
1251
|
+
* > This endpoint requires one of the following scopes: `billing_subscriptions:all`, `billing_subscriptions:readonly`
|
|
1252
|
+
*/
|
|
1253
|
+
const getBillingSubscription = (options) => (options.client ?? client).get({
|
|
1254
|
+
security: [{
|
|
1255
|
+
scheme: "bearer",
|
|
1256
|
+
type: "http"
|
|
1257
|
+
}],
|
|
1258
|
+
url: "/api/external/v2/billing_subscriptions/{id}",
|
|
1259
|
+
...options
|
|
1260
|
+
});
|
|
1261
|
+
/**
|
|
1262
|
+
* Update a billing subscription
|
|
1263
|
+
*
|
|
1264
|
+
* Update a billing subscription
|
|
1265
|
+
*
|
|
1266
|
+
* > ℹ️
|
|
1267
|
+
* > This endpoint requires one of the following scopes: `billing_subscriptions:all`
|
|
1268
|
+
*/
|
|
1269
|
+
const putBillingSubscriptions = (options) => (options.client ?? client).put({
|
|
1270
|
+
security: [{
|
|
1271
|
+
scheme: "bearer",
|
|
1272
|
+
type: "http"
|
|
1273
|
+
}],
|
|
1274
|
+
url: "/api/external/v2/billing_subscriptions/{id}",
|
|
1275
|
+
...options,
|
|
1276
|
+
headers: {
|
|
1277
|
+
"Content-Type": "application/json",
|
|
1278
|
+
...options.headers
|
|
1279
|
+
}
|
|
1280
|
+
});
|
|
1281
|
+
/**
|
|
1282
|
+
* List the invoice line sections of a billing subscription
|
|
1283
|
+
*
|
|
1284
|
+
* List the invoice line sections of a billing subscription
|
|
1285
|
+
*
|
|
1286
|
+
* > ℹ️
|
|
1287
|
+
* > This endpoint requires one of the following scopes: `billing_subscriptions:all`, `billing_subscriptions:readonly`
|
|
1288
|
+
*/
|
|
1289
|
+
const getBillingSubscriptionInvoiceLineSections = (options) => (options.client ?? client).get({
|
|
1290
|
+
security: [{
|
|
1291
|
+
scheme: "bearer",
|
|
1292
|
+
type: "http"
|
|
1293
|
+
}],
|
|
1294
|
+
url: "/api/external/v2/billing_subscriptions/{billing_subscription_id}/invoice_line_sections",
|
|
1295
|
+
...options
|
|
1296
|
+
});
|
|
1297
|
+
/**
|
|
1298
|
+
* List invoice lines for a billing subscription
|
|
1299
|
+
*
|
|
1300
|
+
* List invoice lines for a billing subscription
|
|
1301
|
+
*
|
|
1302
|
+
* > ℹ️
|
|
1303
|
+
* > This endpoint requires one of the following scopes: `billing_subscriptions:all`, `billing_subscriptions:readonly`
|
|
1304
|
+
*/
|
|
1305
|
+
const getBillingSubscriptionInvoiceLines = (options) => (options.client ?? client).get({
|
|
1306
|
+
security: [{
|
|
1307
|
+
scheme: "bearer",
|
|
1308
|
+
type: "http"
|
|
1309
|
+
}],
|
|
1310
|
+
url: "/api/external/v2/billing_subscriptions/{billing_subscription_id}/invoice_lines",
|
|
1311
|
+
...options
|
|
1312
|
+
});
|
|
1313
|
+
/**
|
|
1314
|
+
* List products
|
|
1315
|
+
*
|
|
1316
|
+
* List products
|
|
1317
|
+
*
|
|
1318
|
+
* > ℹ️
|
|
1319
|
+
* > This endpoint requires one of the following scopes: `products:all`, `products:readonly`
|
|
1320
|
+
*/
|
|
1321
|
+
const getProducts = (options) => (options?.client ?? client).get({
|
|
1322
|
+
security: [{
|
|
1323
|
+
scheme: "bearer",
|
|
1324
|
+
type: "http"
|
|
1325
|
+
}],
|
|
1326
|
+
url: "/api/external/v2/products",
|
|
1327
|
+
...options
|
|
1328
|
+
});
|
|
1329
|
+
/**
|
|
1330
|
+
* Create a product
|
|
1331
|
+
*
|
|
1332
|
+
* Create a product
|
|
1333
|
+
*
|
|
1334
|
+
* > ℹ️
|
|
1335
|
+
* > This endpoint requires one of the following scopes: `products:all`
|
|
1336
|
+
*/
|
|
1337
|
+
const postProducts = (options) => (options.client ?? client).post({
|
|
1338
|
+
security: [{
|
|
1339
|
+
scheme: "bearer",
|
|
1340
|
+
type: "http"
|
|
1341
|
+
}],
|
|
1342
|
+
url: "/api/external/v2/products",
|
|
1343
|
+
...options,
|
|
1344
|
+
headers: {
|
|
1345
|
+
"Content-Type": "application/json",
|
|
1346
|
+
...options.headers
|
|
1347
|
+
}
|
|
1348
|
+
});
|
|
1349
|
+
/**
|
|
1350
|
+
* Retrieve a product
|
|
1351
|
+
*
|
|
1352
|
+
* Retrieve a product
|
|
1353
|
+
*
|
|
1354
|
+
* > ℹ️
|
|
1355
|
+
* > This endpoint requires one of the following scopes: `products:all`, `products:readonly`
|
|
1356
|
+
*/
|
|
1357
|
+
const getProduct = (options) => (options.client ?? client).get({
|
|
1358
|
+
security: [{
|
|
1359
|
+
scheme: "bearer",
|
|
1360
|
+
type: "http"
|
|
1361
|
+
}],
|
|
1362
|
+
url: "/api/external/v2/products/{id}",
|
|
1363
|
+
...options
|
|
1364
|
+
});
|
|
1365
|
+
/**
|
|
1366
|
+
* Update a product
|
|
1367
|
+
*
|
|
1368
|
+
* Update a product
|
|
1369
|
+
*
|
|
1370
|
+
* > ℹ️
|
|
1371
|
+
* > This endpoint requires one of the following scopes: `products:all`
|
|
1372
|
+
*/
|
|
1373
|
+
const putProduct = (options) => (options.client ?? client).put({
|
|
1374
|
+
security: [{
|
|
1375
|
+
scheme: "bearer",
|
|
1376
|
+
type: "http"
|
|
1377
|
+
}],
|
|
1378
|
+
url: "/api/external/v2/products/{id}",
|
|
1379
|
+
...options,
|
|
1380
|
+
headers: {
|
|
1381
|
+
"Content-Type": "application/json",
|
|
1382
|
+
...options.headers
|
|
1383
|
+
}
|
|
1384
|
+
});
|
|
1385
|
+
/**
|
|
1386
|
+
* List attachments
|
|
1387
|
+
*
|
|
1388
|
+
* List attachments
|
|
1389
|
+
*
|
|
1390
|
+
* > ‼️
|
|
1391
|
+
* > This endpoint is **DEPRECATED**
|
|
1392
|
+
*
|
|
1393
|
+
* > ℹ️
|
|
1394
|
+
* > This endpoint requires one of the following scopes: `file_attachments:all`, `file_attachments:readonly`
|
|
1395
|
+
*
|
|
1396
|
+
* @deprecated
|
|
1397
|
+
*/
|
|
1398
|
+
const getFileAttachments = (options) => (options?.client ?? client).get({
|
|
1399
|
+
security: [{
|
|
1400
|
+
scheme: "bearer",
|
|
1401
|
+
type: "http"
|
|
1402
|
+
}],
|
|
1403
|
+
url: "/api/external/v2/file_attachments",
|
|
1404
|
+
...options
|
|
1405
|
+
});
|
|
1406
|
+
/**
|
|
1407
|
+
* Upload a file
|
|
1408
|
+
*
|
|
1409
|
+
* Upload a file to attach to any resource that provides a `file_attachment_id`.
|
|
1410
|
+
*
|
|
1411
|
+
* The maximum allowed file size is 100MB.
|
|
1412
|
+
* Note that this will not upload a file into the DMS (GED).
|
|
1413
|
+
*
|
|
1414
|
+
*
|
|
1415
|
+
* > ℹ️
|
|
1416
|
+
* > This endpoint requires one of the following scopes: `file_attachments:all`
|
|
1417
|
+
*/
|
|
1418
|
+
const postFileAttachments = (options) => (options.client ?? client).post({
|
|
1419
|
+
...formDataBodySerializer,
|
|
1420
|
+
security: [{
|
|
1421
|
+
scheme: "bearer",
|
|
1422
|
+
type: "http"
|
|
1423
|
+
}],
|
|
1424
|
+
url: "/api/external/v2/file_attachments",
|
|
1425
|
+
...options,
|
|
1426
|
+
headers: {
|
|
1427
|
+
"Content-Type": null,
|
|
1428
|
+
...options.headers
|
|
1429
|
+
}
|
|
1430
|
+
});
|
|
1431
|
+
/**
|
|
1432
|
+
* List customer invoice templates
|
|
1433
|
+
*
|
|
1434
|
+
* List customer invoice templates
|
|
1435
|
+
*
|
|
1436
|
+
* > ℹ️
|
|
1437
|
+
* > This endpoint requires one of the following scopes: `customer_invoice_templates:readonly`
|
|
1438
|
+
*/
|
|
1439
|
+
const getCustomerInvoiceTemplates = (options) => (options?.client ?? client).get({
|
|
1440
|
+
security: [{
|
|
1441
|
+
scheme: "bearer",
|
|
1442
|
+
type: "http"
|
|
1443
|
+
}],
|
|
1444
|
+
url: "/api/external/v2/customer_invoice_templates",
|
|
1445
|
+
...options
|
|
1446
|
+
});
|
|
1447
|
+
/**
|
|
1448
|
+
* Create an Analytical General Ledger export
|
|
1449
|
+
*
|
|
1450
|
+
* This endpoint allows you to create an Analytical General Ledger export. The generated export file is an xlsx file, using the in-line analytical mode by default.
|
|
1451
|
+
*
|
|
1452
|
+
* > ℹ️
|
|
1453
|
+
* > This endpoint requires one of the following scopes: `exports:agl`
|
|
1454
|
+
*/
|
|
1455
|
+
const exportAnalyticalGeneralLedger = (options) => (options.client ?? client).post({
|
|
1456
|
+
security: [{
|
|
1457
|
+
scheme: "bearer",
|
|
1458
|
+
type: "http"
|
|
1459
|
+
}],
|
|
1460
|
+
url: "/api/external/v2/exports/analytical_general_ledgers",
|
|
1461
|
+
...options,
|
|
1462
|
+
headers: {
|
|
1463
|
+
"Content-Type": "application/json",
|
|
1464
|
+
...options.headers
|
|
1465
|
+
}
|
|
1466
|
+
});
|
|
1467
|
+
/**
|
|
1468
|
+
* Retrieve an Analytical General Ledger export
|
|
1469
|
+
*
|
|
1470
|
+
* The endpoint returns a specific Analytical General Ledger export. The export file is an xlsx file, using the in-line analytical mode.
|
|
1471
|
+
*
|
|
1472
|
+
* > ℹ️
|
|
1473
|
+
* > This endpoint requires one of the following scopes: `exports:agl`
|
|
1474
|
+
*/
|
|
1475
|
+
const getAnalyticalGeneralLedgerExport = (options) => (options.client ?? client).get({
|
|
1476
|
+
security: [{
|
|
1477
|
+
scheme: "bearer",
|
|
1478
|
+
type: "http"
|
|
1479
|
+
}],
|
|
1480
|
+
url: "/api/external/v2/exports/analytical_general_ledgers/{id}",
|
|
1481
|
+
...options
|
|
1482
|
+
});
|
|
1483
|
+
/**
|
|
1484
|
+
* Create a FEC export
|
|
1485
|
+
*
|
|
1486
|
+
* This endpoint allows you to create a FEC export
|
|
1487
|
+
*
|
|
1488
|
+
* > ℹ️
|
|
1489
|
+
* > This endpoint requires one of the following scopes: `exports:fec`
|
|
1490
|
+
*/
|
|
1491
|
+
const exportFec = (options) => (options.client ?? client).post({
|
|
1492
|
+
security: [{
|
|
1493
|
+
scheme: "bearer",
|
|
1494
|
+
type: "http"
|
|
1495
|
+
}],
|
|
1496
|
+
url: "/api/external/v2/exports/fecs",
|
|
1497
|
+
...options,
|
|
1498
|
+
headers: {
|
|
1499
|
+
"Content-Type": "application/json",
|
|
1500
|
+
...options.headers
|
|
1501
|
+
}
|
|
1502
|
+
});
|
|
1503
|
+
/**
|
|
1504
|
+
* Retrieve a FEC export
|
|
1505
|
+
*
|
|
1506
|
+
* The endpoint returns a specific FEC export
|
|
1507
|
+
*
|
|
1508
|
+
* > ℹ️
|
|
1509
|
+
* > This endpoint requires one of the following scopes: `exports:fec`
|
|
1510
|
+
*/
|
|
1511
|
+
const getFecExport = (options) => (options.client ?? client).get({
|
|
1512
|
+
security: [{
|
|
1513
|
+
scheme: "bearer",
|
|
1514
|
+
type: "http"
|
|
1515
|
+
}],
|
|
1516
|
+
url: "/api/external/v2/exports/fecs/{id}",
|
|
1517
|
+
...options
|
|
1518
|
+
});
|
|
1519
|
+
/**
|
|
1520
|
+
* Create a company customer
|
|
1521
|
+
*
|
|
1522
|
+
* This endpoint returns the created company customer.
|
|
1523
|
+
*
|
|
1524
|
+
* > ℹ️
|
|
1525
|
+
* > This endpoint requires one of the following scopes: `customers:all`
|
|
1526
|
+
*/
|
|
1527
|
+
const postCompanyCustomer = (options) => (options.client ?? client).post({
|
|
1528
|
+
security: [{
|
|
1529
|
+
scheme: "bearer",
|
|
1530
|
+
type: "http"
|
|
1531
|
+
}],
|
|
1532
|
+
url: "/api/external/v2/company_customers",
|
|
1533
|
+
...options,
|
|
1534
|
+
headers: {
|
|
1535
|
+
"Content-Type": "application/json",
|
|
1536
|
+
...options.headers
|
|
1537
|
+
}
|
|
1538
|
+
});
|
|
1539
|
+
/**
|
|
1540
|
+
* Retrieve a company customer
|
|
1541
|
+
*
|
|
1542
|
+
* This endpoint returns a company customer.
|
|
1543
|
+
*
|
|
1544
|
+
* > ℹ️
|
|
1545
|
+
* > This endpoint requires one of the following scopes: `customers:all`, `customers:readonly`
|
|
1546
|
+
*/
|
|
1547
|
+
const getCompanyCustomer = (options) => (options.client ?? client).get({
|
|
1548
|
+
security: [{
|
|
1549
|
+
scheme: "bearer",
|
|
1550
|
+
type: "http"
|
|
1551
|
+
}],
|
|
1552
|
+
url: "/api/external/v2/company_customers/{id}",
|
|
1553
|
+
...options
|
|
1554
|
+
});
|
|
1555
|
+
/**
|
|
1556
|
+
* Update a company customer
|
|
1557
|
+
*
|
|
1558
|
+
* This endpoint returns the updated company customer.
|
|
1559
|
+
*
|
|
1560
|
+
* > ℹ️
|
|
1561
|
+
* > This endpoint requires one of the following scopes: `customers:all`
|
|
1562
|
+
*/
|
|
1563
|
+
const putCompanyCustomer = (options) => (options.client ?? client).put({
|
|
1564
|
+
security: [{
|
|
1565
|
+
scheme: "bearer",
|
|
1566
|
+
type: "http"
|
|
1567
|
+
}],
|
|
1568
|
+
url: "/api/external/v2/company_customers/{id}",
|
|
1569
|
+
...options,
|
|
1570
|
+
headers: {
|
|
1571
|
+
"Content-Type": "application/json",
|
|
1572
|
+
...options.headers
|
|
1573
|
+
}
|
|
1574
|
+
});
|
|
1575
|
+
/**
|
|
1576
|
+
* Create an individual customer
|
|
1577
|
+
*
|
|
1578
|
+
* This endpoint returns the created individual customer.
|
|
1579
|
+
*
|
|
1580
|
+
* > ℹ️
|
|
1581
|
+
* > This endpoint requires one of the following scopes: `customers:all`
|
|
1582
|
+
*/
|
|
1583
|
+
const postIndividualCustomer = (options) => (options.client ?? client).post({
|
|
1584
|
+
security: [{
|
|
1585
|
+
scheme: "bearer",
|
|
1586
|
+
type: "http"
|
|
1587
|
+
}],
|
|
1588
|
+
url: "/api/external/v2/individual_customers",
|
|
1589
|
+
...options,
|
|
1590
|
+
headers: {
|
|
1591
|
+
"Content-Type": "application/json",
|
|
1592
|
+
...options.headers
|
|
1593
|
+
}
|
|
1594
|
+
});
|
|
1595
|
+
/**
|
|
1596
|
+
* Retrieve an individual customer
|
|
1597
|
+
*
|
|
1598
|
+
* This endpoint returns an individual customer.
|
|
1599
|
+
*
|
|
1600
|
+
* > ℹ️
|
|
1601
|
+
* > This endpoint requires one of the following scopes: `customers:all`, `customers:readonly`
|
|
1602
|
+
*/
|
|
1603
|
+
const getIndividualCustomer = (options) => (options.client ?? client).get({
|
|
1604
|
+
security: [{
|
|
1605
|
+
scheme: "bearer",
|
|
1606
|
+
type: "http"
|
|
1607
|
+
}],
|
|
1608
|
+
url: "/api/external/v2/individual_customers/{id}",
|
|
1609
|
+
...options
|
|
1610
|
+
});
|
|
1611
|
+
/**
|
|
1612
|
+
* Update an individual customer
|
|
1613
|
+
*
|
|
1614
|
+
* This endpoint returns the updated individual customer.
|
|
1615
|
+
*
|
|
1616
|
+
* > ℹ️
|
|
1617
|
+
* > This endpoint requires one of the following scopes: `customers:all`
|
|
1618
|
+
*/
|
|
1619
|
+
const putIndividualCustomer = (options) => (options.client ?? client).put({
|
|
1620
|
+
security: [{
|
|
1621
|
+
scheme: "bearer",
|
|
1622
|
+
type: "http"
|
|
1623
|
+
}],
|
|
1624
|
+
url: "/api/external/v2/individual_customers/{id}",
|
|
1625
|
+
...options,
|
|
1626
|
+
headers: {
|
|
1627
|
+
"Content-Type": "application/json",
|
|
1628
|
+
...options.headers
|
|
1629
|
+
}
|
|
1630
|
+
});
|
|
1631
|
+
/**
|
|
1632
|
+
* List customers (company and individual)
|
|
1633
|
+
*
|
|
1634
|
+
* This endpoint returns a list of both company and individual customers
|
|
1635
|
+
*
|
|
1636
|
+
* > ℹ️
|
|
1637
|
+
* > This endpoint requires one of the following scopes: `customers:all`, `customers:readonly`
|
|
1638
|
+
*/
|
|
1639
|
+
const getCustomers = (options) => (options?.client ?? client).get({
|
|
1640
|
+
security: [{
|
|
1641
|
+
scheme: "bearer",
|
|
1642
|
+
type: "http"
|
|
1643
|
+
}],
|
|
1644
|
+
url: "/api/external/v2/customers",
|
|
1645
|
+
...options
|
|
1646
|
+
});
|
|
1647
|
+
/**
|
|
1648
|
+
* Retrieve a customer
|
|
1649
|
+
*
|
|
1650
|
+
* This endpoint returns a customer.
|
|
1651
|
+
*
|
|
1652
|
+
* > ℹ️
|
|
1653
|
+
* > This endpoint requires one of the following scopes: `customers:all`, `customers:readonly`
|
|
1654
|
+
*/
|
|
1655
|
+
const getCustomer = (options) => (options.client ?? client).get({
|
|
1656
|
+
security: [{
|
|
1657
|
+
scheme: "bearer",
|
|
1658
|
+
type: "http"
|
|
1659
|
+
}],
|
|
1660
|
+
url: "/api/external/v2/customers/{id}",
|
|
1661
|
+
...options
|
|
1662
|
+
});
|
|
1663
|
+
/**
|
|
1664
|
+
* List contacts of a customer
|
|
1665
|
+
*
|
|
1666
|
+
* List contacts of a customer
|
|
1667
|
+
*
|
|
1668
|
+
* > ℹ️
|
|
1669
|
+
* > This endpoint requires one of the following scopes: `customers:all`, `customers:readonly`
|
|
1670
|
+
*/
|
|
1671
|
+
const getCustomerContacts = (options) => (options.client ?? client).get({
|
|
1672
|
+
security: [{
|
|
1673
|
+
scheme: "bearer",
|
|
1674
|
+
type: "http"
|
|
1675
|
+
}],
|
|
1676
|
+
url: "/api/external/v2/customers/{customer_id}/contacts",
|
|
1677
|
+
...options
|
|
1678
|
+
});
|
|
1679
|
+
/**
|
|
1680
|
+
* List suppliers
|
|
1681
|
+
*
|
|
1682
|
+
* List suppliers
|
|
1683
|
+
*
|
|
1684
|
+
* > ℹ️
|
|
1685
|
+
* > This endpoint requires one of the following scopes: `suppliers:all`, `suppliers:readonly`
|
|
1686
|
+
*/
|
|
1687
|
+
const getSuppliers = (options) => (options?.client ?? client).get({
|
|
1688
|
+
security: [{
|
|
1689
|
+
scheme: "bearer",
|
|
1690
|
+
type: "http"
|
|
1691
|
+
}],
|
|
1692
|
+
url: "/api/external/v2/suppliers",
|
|
1693
|
+
...options
|
|
1694
|
+
});
|
|
1695
|
+
/**
|
|
1696
|
+
* Create a Supplier
|
|
1697
|
+
*
|
|
1698
|
+
* This endpoint returns the created supplier.
|
|
1699
|
+
*
|
|
1700
|
+
* > ℹ️
|
|
1701
|
+
* > This endpoint requires one of the following scopes: `suppliers:all`
|
|
1702
|
+
*/
|
|
1703
|
+
const postSupplier = (options) => (options.client ?? client).post({
|
|
1704
|
+
security: [{
|
|
1705
|
+
scheme: "bearer",
|
|
1706
|
+
type: "http"
|
|
1707
|
+
}],
|
|
1708
|
+
url: "/api/external/v2/suppliers",
|
|
1709
|
+
...options,
|
|
1710
|
+
headers: {
|
|
1711
|
+
"Content-Type": "application/json",
|
|
1712
|
+
...options.headers
|
|
1713
|
+
}
|
|
1714
|
+
});
|
|
1715
|
+
/**
|
|
1716
|
+
* Retrieve a supplier
|
|
1717
|
+
*
|
|
1718
|
+
* This endpoint returns a supplier.
|
|
1719
|
+
*
|
|
1720
|
+
* > ℹ️
|
|
1721
|
+
* > This endpoint requires one of the following scopes: `suppliers:all`, `suppliers:readonly`
|
|
1722
|
+
*/
|
|
1723
|
+
const getSupplier = (options) => (options.client ?? client).get({
|
|
1724
|
+
security: [{
|
|
1725
|
+
scheme: "bearer",
|
|
1726
|
+
type: "http"
|
|
1727
|
+
}],
|
|
1728
|
+
url: "/api/external/v2/suppliers/{id}",
|
|
1729
|
+
...options
|
|
1730
|
+
});
|
|
1731
|
+
/**
|
|
1732
|
+
* Update a supplier
|
|
1733
|
+
*
|
|
1734
|
+
* This endpoint returns the updated supplier.
|
|
1735
|
+
*
|
|
1736
|
+
* > ℹ️
|
|
1737
|
+
* > This endpoint requires one of the following scopes: `suppliers:all`
|
|
1738
|
+
*/
|
|
1739
|
+
const putSupplier = (options) => (options.client ?? client).put({
|
|
1740
|
+
security: [{
|
|
1741
|
+
scheme: "bearer",
|
|
1742
|
+
type: "http"
|
|
1743
|
+
}],
|
|
1744
|
+
url: "/api/external/v2/suppliers/{id}",
|
|
1745
|
+
...options,
|
|
1746
|
+
headers: {
|
|
1747
|
+
"Content-Type": "application/json",
|
|
1748
|
+
...options.headers
|
|
1749
|
+
}
|
|
1750
|
+
});
|
|
1751
|
+
/**
|
|
1752
|
+
* Create a new user
|
|
1753
|
+
*
|
|
1754
|
+
* Creates a new user. In order to authenticate the request, a valid
|
|
1755
|
+
* OAuth2 token must be provided. The token must be generated
|
|
1756
|
+
* with `client_credentials` grant type.
|
|
1757
|
+
* The token must have the following scopes:
|
|
1758
|
+
* - `users`
|
|
1759
|
+
* - `capital_deposits` OR `companies:all`
|
|
1760
|
+
*
|
|
1761
|
+
*
|
|
1762
|
+
* > ℹ️
|
|
1763
|
+
* > This endpoint requires one of the following scopes: `users`, `capital_deposits`, `companies:all`
|
|
1764
|
+
*/
|
|
1765
|
+
const postUsers = (options) => (options?.client ?? client).post({
|
|
1766
|
+
security: [{
|
|
1767
|
+
scheme: "bearer",
|
|
1768
|
+
type: "http"
|
|
1769
|
+
}],
|
|
1770
|
+
url: "/api/external/v2/users",
|
|
1771
|
+
...options,
|
|
1772
|
+
headers: {
|
|
1773
|
+
"Content-Type": "application/json",
|
|
1774
|
+
...options?.headers
|
|
1775
|
+
}
|
|
1776
|
+
});
|
|
1777
|
+
/**
|
|
1778
|
+
* Find user
|
|
1779
|
+
*
|
|
1780
|
+
* Find a user using its email address. In order to authenticate the request, a valid
|
|
1781
|
+
* OAuth2 token must be provided. The token must be generated
|
|
1782
|
+
* with `client_credentials` grant type.
|
|
1783
|
+
* The token must have the following scopes:
|
|
1784
|
+
* - `users`
|
|
1785
|
+
* - `capital_deposits` OR `companies:all`
|
|
1786
|
+
*
|
|
1787
|
+
*
|
|
1788
|
+
* > ℹ️
|
|
1789
|
+
* > This endpoint requires one of the following scopes: `users`, `capital_deposits`, `companies:all`
|
|
1790
|
+
*/
|
|
1791
|
+
const findUser = (options) => (options.client ?? client).get({
|
|
1792
|
+
security: [{
|
|
1793
|
+
scheme: "bearer",
|
|
1794
|
+
type: "http"
|
|
1795
|
+
}],
|
|
1796
|
+
url: "/api/external/v2/users/find",
|
|
1797
|
+
...options
|
|
1798
|
+
});
|
|
1799
|
+
/**
|
|
1800
|
+
* Update an existing user
|
|
1801
|
+
*
|
|
1802
|
+
* Updates an existing user. In order to authenticate the request, a valid OAuth2 token must be provided. The token must have the `users:update_email` scope and be generated by a user via the `authorization_code` grant type.
|
|
1803
|
+
*
|
|
1804
|
+
* > ℹ️
|
|
1805
|
+
* > This endpoint requires one of the following scopes: `users`, `users:update_email`
|
|
1806
|
+
*/
|
|
1807
|
+
const putUsers = (options) => (options.client ?? client).put({
|
|
1808
|
+
security: [{
|
|
1809
|
+
scheme: "bearer",
|
|
1810
|
+
type: "http"
|
|
1811
|
+
}],
|
|
1812
|
+
url: "/api/external/v2/users/{id}",
|
|
1813
|
+
...options,
|
|
1814
|
+
headers: {
|
|
1815
|
+
"Content-Type": "application/json",
|
|
1816
|
+
...options.headers
|
|
1817
|
+
}
|
|
1818
|
+
});
|
|
1819
|
+
/**
|
|
1820
|
+
* User Profile
|
|
1821
|
+
*
|
|
1822
|
+
* This endpoint returns information about the company and the user associated to the token.
|
|
1823
|
+
*/
|
|
1824
|
+
const getMe = (options) => (options?.client ?? client).get({
|
|
1825
|
+
security: [{
|
|
1826
|
+
scheme: "bearer",
|
|
1827
|
+
type: "http"
|
|
1828
|
+
}],
|
|
1829
|
+
url: "/api/external/v2/me",
|
|
1830
|
+
...options
|
|
1831
|
+
});
|
|
1832
|
+
/**
|
|
1833
|
+
* List invoice line sections for a customer invoice
|
|
1834
|
+
*
|
|
1835
|
+
* List invoice line sections for a customer invoice
|
|
1836
|
+
*
|
|
1837
|
+
* > ℹ️
|
|
1838
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`, `customer_invoices:readonly`
|
|
1839
|
+
*/
|
|
1840
|
+
const getCustomerInvoiceInvoiceLineSections = (options) => (options.client ?? client).get({
|
|
1841
|
+
security: [{
|
|
1842
|
+
scheme: "bearer",
|
|
1843
|
+
type: "http"
|
|
1844
|
+
}],
|
|
1845
|
+
url: "/api/external/v2/customer_invoices/{customer_invoice_id}/invoice_line_sections",
|
|
1846
|
+
...options
|
|
1847
|
+
});
|
|
1848
|
+
/**
|
|
1849
|
+
* List invoice lines for a customer invoice
|
|
1850
|
+
*
|
|
1851
|
+
* List invoice lines for a customer invoice
|
|
1852
|
+
*
|
|
1853
|
+
* > ℹ️
|
|
1854
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`, `customer_invoices:readonly`
|
|
1855
|
+
*/
|
|
1856
|
+
const getCustomerInvoiceInvoiceLines = (options) => (options.client ?? client).get({
|
|
1857
|
+
security: [{
|
|
1858
|
+
scheme: "bearer",
|
|
1859
|
+
type: "http"
|
|
1860
|
+
}],
|
|
1861
|
+
url: "/api/external/v2/customer_invoices/{customer_invoice_id}/invoice_lines",
|
|
1862
|
+
...options
|
|
1863
|
+
});
|
|
1864
|
+
/**
|
|
1865
|
+
* List payments for a customer invoice
|
|
1866
|
+
*
|
|
1867
|
+
* List payments for a customer invoice
|
|
1868
|
+
*
|
|
1869
|
+
* > ℹ️
|
|
1870
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`, `customer_invoices:readonly`
|
|
1871
|
+
*/
|
|
1872
|
+
const getCustomerInvoicePayments = (options) => (options.client ?? client).get({
|
|
1873
|
+
security: [{
|
|
1874
|
+
scheme: "bearer",
|
|
1875
|
+
type: "http"
|
|
1876
|
+
}],
|
|
1877
|
+
url: "/api/external/v2/customer_invoices/{customer_invoice_id}/payments",
|
|
1878
|
+
...options
|
|
1879
|
+
});
|
|
1880
|
+
/**
|
|
1881
|
+
* List matched transactions for a customer invoice
|
|
1882
|
+
*
|
|
1883
|
+
* List matched transactions for a customer invoice
|
|
1884
|
+
*
|
|
1885
|
+
* > ℹ️
|
|
1886
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`, `customer_invoices:readonly`
|
|
1887
|
+
*/
|
|
1888
|
+
const getCustomerInvoiceMatchedTransactions = (options) => (options.client ?? client).get({
|
|
1889
|
+
security: [{
|
|
1890
|
+
scheme: "bearer",
|
|
1891
|
+
type: "http"
|
|
1892
|
+
}],
|
|
1893
|
+
url: "/api/external/v2/customer_invoices/{customer_invoice_id}/matched_transactions",
|
|
1894
|
+
...options
|
|
1895
|
+
});
|
|
1896
|
+
/**
|
|
1897
|
+
* Match a transaction to a customer invoice
|
|
1898
|
+
*
|
|
1899
|
+
* This endpoint allows you to match a transaction to a customer invoice. It is not applicable for draft invoices.
|
|
1900
|
+
*
|
|
1901
|
+
* You can match one transaction with one customer invoice at a time. To match multiple transactions to a customer invoice, you need to call this endpoint multiple times.
|
|
1902
|
+
* It's possible to match a transaction to multiple customer invoices too.
|
|
1903
|
+
*
|
|
1904
|
+
*
|
|
1905
|
+
* > ℹ️
|
|
1906
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`
|
|
1907
|
+
*/
|
|
1908
|
+
const postCustomerInvoiceMatchedTransactions = (options) => (options.client ?? client).post({
|
|
1909
|
+
security: [{
|
|
1910
|
+
scheme: "bearer",
|
|
1911
|
+
type: "http"
|
|
1912
|
+
}],
|
|
1913
|
+
url: "/api/external/v2/customer_invoices/{customer_invoice_id}/matched_transactions",
|
|
1914
|
+
...options,
|
|
1915
|
+
headers: {
|
|
1916
|
+
"Content-Type": "application/json",
|
|
1917
|
+
...options.headers
|
|
1918
|
+
}
|
|
1919
|
+
});
|
|
1920
|
+
/**
|
|
1921
|
+
* Unmatch a transaction to a customer invoice
|
|
1922
|
+
*
|
|
1923
|
+
* This endpoint allows you to unmatch a transaction to a customer invoice. It is not applicable for draft invoices.
|
|
1924
|
+
*
|
|
1925
|
+
*
|
|
1926
|
+
* > ℹ️
|
|
1927
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`
|
|
1928
|
+
*/
|
|
1929
|
+
const deleteCustomerInvoiceMatchedTransactions = (options) => (options.client ?? client).delete({
|
|
1930
|
+
security: [{
|
|
1931
|
+
scheme: "bearer",
|
|
1932
|
+
type: "http"
|
|
1933
|
+
}],
|
|
1934
|
+
url: "/api/external/v2/customer_invoices/{customer_invoice_id}/matched_transactions/{id}",
|
|
1935
|
+
...options
|
|
1936
|
+
});
|
|
1937
|
+
/**
|
|
1938
|
+
* List appendices of a customer invoice
|
|
1939
|
+
*
|
|
1940
|
+
* List appendices of a customer invoice
|
|
1941
|
+
*
|
|
1942
|
+
* > ℹ️
|
|
1943
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`, `customer_invoices:readonly`
|
|
1944
|
+
*/
|
|
1945
|
+
const getCustomerInvoiceAppendices = (options) => (options.client ?? client).get({
|
|
1946
|
+
security: [{
|
|
1947
|
+
scheme: "bearer",
|
|
1948
|
+
type: "http"
|
|
1949
|
+
}],
|
|
1950
|
+
url: "/api/external/v2/customer_invoices/{customer_invoice_id}/appendices",
|
|
1951
|
+
...options
|
|
1952
|
+
});
|
|
1953
|
+
/**
|
|
1954
|
+
* Upload an appendix for a customer invoice
|
|
1955
|
+
*
|
|
1956
|
+
* Upload a file that will be an appendix attached to a customer invoice.
|
|
1957
|
+
*
|
|
1958
|
+
* Note that this will not upload a file into the DMS (GED).
|
|
1959
|
+
*
|
|
1960
|
+
*
|
|
1961
|
+
* > ℹ️
|
|
1962
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`
|
|
1963
|
+
*/
|
|
1964
|
+
const postCustomerInvoiceAppendices = (options) => (options.client ?? client).post({
|
|
1965
|
+
...formDataBodySerializer,
|
|
1966
|
+
security: [{
|
|
1967
|
+
scheme: "bearer",
|
|
1968
|
+
type: "http"
|
|
1969
|
+
}],
|
|
1970
|
+
url: "/api/external/v2/customer_invoices/{customer_invoice_id}/appendices",
|
|
1971
|
+
...options,
|
|
1972
|
+
headers: {
|
|
1973
|
+
"Content-Type": null,
|
|
1974
|
+
...options.headers
|
|
1975
|
+
}
|
|
1976
|
+
});
|
|
1977
|
+
/**
|
|
1978
|
+
* Delete draft invoice
|
|
1979
|
+
*
|
|
1980
|
+
* Delete a draft customer invoice or draft credit note
|
|
1981
|
+
*
|
|
1982
|
+
* > ℹ️
|
|
1983
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`
|
|
1984
|
+
*/
|
|
1985
|
+
const deleteCustomerInvoices = (options) => (options.client ?? client).delete({
|
|
1986
|
+
security: [{
|
|
1987
|
+
scheme: "bearer",
|
|
1988
|
+
type: "http"
|
|
1989
|
+
}],
|
|
1990
|
+
url: "/api/external/v2/customer_invoices/{id}",
|
|
1991
|
+
...options
|
|
1992
|
+
});
|
|
1993
|
+
/**
|
|
1994
|
+
* Retrieve a customer invoice
|
|
1995
|
+
*
|
|
1996
|
+
* Retrieve a customer invoice or a credit note
|
|
1997
|
+
*
|
|
1998
|
+
* > ℹ️
|
|
1999
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`, `customer_invoices:readonly`
|
|
2000
|
+
*/
|
|
2001
|
+
const getCustomerInvoice = (options) => (options.client ?? client).get({
|
|
2002
|
+
security: [{
|
|
2003
|
+
scheme: "bearer",
|
|
2004
|
+
type: "http"
|
|
2005
|
+
}],
|
|
2006
|
+
url: "/api/external/v2/customer_invoices/{id}",
|
|
2007
|
+
...options
|
|
2008
|
+
});
|
|
2009
|
+
/**
|
|
2010
|
+
* Update a customer invoice
|
|
2011
|
+
*
|
|
2012
|
+
* Update a customer invoice
|
|
2013
|
+
*
|
|
2014
|
+
* > ℹ️
|
|
2015
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`
|
|
2016
|
+
*/
|
|
2017
|
+
const updateCustomerInvoice = (options) => (options.client ?? client).put({
|
|
2018
|
+
security: [{
|
|
2019
|
+
scheme: "bearer",
|
|
2020
|
+
type: "http"
|
|
2021
|
+
}],
|
|
2022
|
+
url: "/api/external/v2/customer_invoices/{id}",
|
|
2023
|
+
...options,
|
|
2024
|
+
headers: {
|
|
2025
|
+
"Content-Type": "application/json",
|
|
2026
|
+
...options.headers
|
|
2027
|
+
}
|
|
2028
|
+
});
|
|
2029
|
+
/**
|
|
2030
|
+
* Mark a customer invoice as paid
|
|
2031
|
+
*
|
|
2032
|
+
* Mark a customer invoice as paid. No automatic reconciliation will
|
|
2033
|
+
* be done once the invoice is marked as paid
|
|
2034
|
+
*
|
|
2035
|
+
*
|
|
2036
|
+
* > ℹ️
|
|
2037
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`
|
|
2038
|
+
*/
|
|
2039
|
+
const markAsPaidCustomerInvoice = (options) => (options.client ?? client).put({
|
|
2040
|
+
security: [{
|
|
2041
|
+
scheme: "bearer",
|
|
2042
|
+
type: "http"
|
|
2043
|
+
}],
|
|
2044
|
+
url: "/api/external/v2/customer_invoices/{id}/mark_as_paid",
|
|
2045
|
+
...options
|
|
2046
|
+
});
|
|
2047
|
+
/**
|
|
2048
|
+
* Send a customer invoice by email
|
|
2049
|
+
*
|
|
2050
|
+
* This endpoint allows you to send a finalized, imported customer invoice or credit note
|
|
2051
|
+
* by email to your customer. This requires that the PDF file for that document
|
|
2052
|
+
* has been generated (this process can take a few minutes), so if you just created
|
|
2053
|
+
* the invoice in our system, we may return a 409 error. You should
|
|
2054
|
+
* retry the request in a few minutes - if you receive a 204 response, that means
|
|
2055
|
+
* that the email is on its way. For more information about email sending, please
|
|
2056
|
+
* read [this guide](https://pennylane.readme.io/v2.0/docs/sending-documents-by-email).
|
|
2057
|
+
*
|
|
2058
|
+
*
|
|
2059
|
+
* > ℹ️
|
|
2060
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`
|
|
2061
|
+
*/
|
|
2062
|
+
const sendByEmailCustomerInvoice = (options) => (options.client ?? client).post({
|
|
2063
|
+
security: [{
|
|
2064
|
+
scheme: "bearer",
|
|
2065
|
+
type: "http"
|
|
2066
|
+
}],
|
|
2067
|
+
url: "/api/external/v2/customer_invoices/{id}/send_by_email",
|
|
2068
|
+
...options,
|
|
2069
|
+
headers: {
|
|
2070
|
+
"Content-Type": "application/json",
|
|
2071
|
+
...options.headers
|
|
2072
|
+
}
|
|
2073
|
+
});
|
|
2074
|
+
/**
|
|
2075
|
+
* List categories of a customer invoice
|
|
2076
|
+
*
|
|
2077
|
+
* List categories of a customer invoice
|
|
2078
|
+
*
|
|
2079
|
+
* > ℹ️
|
|
2080
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`, `customer_invoices:readonly`
|
|
2081
|
+
*/
|
|
2082
|
+
const getCustomerInvoiceCategories = (options) => (options.client ?? client).get({
|
|
2083
|
+
security: [{
|
|
2084
|
+
scheme: "bearer",
|
|
2085
|
+
type: "http"
|
|
2086
|
+
}],
|
|
2087
|
+
url: "/api/external/v2/customer_invoices/{customer_invoice_id}/categories",
|
|
2088
|
+
...options
|
|
2089
|
+
});
|
|
2090
|
+
/**
|
|
2091
|
+
* Categorize a customer invoice
|
|
2092
|
+
*
|
|
2093
|
+
* This endpoint is not applicable for draft invoices.
|
|
2094
|
+
* Update the categories of a customer invoice. You can pass categories that don't belong to the same category group. The sum of categories of a same group must equal `1`. In the following example, the two first categories belong to the same category group A, the sum of the weights is `1`. The third category belongs to a category group B, its weight is `1`.
|
|
2095
|
+
* ```
|
|
2096
|
+
* [
|
|
2097
|
+
* { "id": 59, "weight": "0.5" }, // category group A
|
|
2098
|
+
* { "id": 33, "weight": "0.5" }, // category group A
|
|
2099
|
+
* { "id": 65, "weight": "1" } // category group B
|
|
2100
|
+
* ]
|
|
2101
|
+
* ```
|
|
2102
|
+
*
|
|
2103
|
+
*
|
|
2104
|
+
* > ℹ️
|
|
2105
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`
|
|
2106
|
+
*/
|
|
2107
|
+
const putCustomerInvoiceCategories = (options) => (options.client ?? client).put({
|
|
2108
|
+
security: [{
|
|
2109
|
+
scheme: "bearer",
|
|
2110
|
+
type: "http"
|
|
2111
|
+
}],
|
|
2112
|
+
url: "/api/external/v2/customer_invoices/{customer_invoice_id}/categories",
|
|
2113
|
+
...options,
|
|
2114
|
+
headers: {
|
|
2115
|
+
"Content-Type": "application/json",
|
|
2116
|
+
...options.headers
|
|
2117
|
+
}
|
|
2118
|
+
});
|
|
2119
|
+
/**
|
|
2120
|
+
* Update an Imported customer invoice
|
|
2121
|
+
*
|
|
2122
|
+
* Update an imported customer invoice or credit note. It is not
|
|
2123
|
+
* applicable for draft invoices.
|
|
2124
|
+
*
|
|
2125
|
+
*
|
|
2126
|
+
* > ℹ️
|
|
2127
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`
|
|
2128
|
+
*/
|
|
2129
|
+
const updateImportedCustomerInvoice = (options) => (options.client ?? client).put({
|
|
2130
|
+
security: [{
|
|
2131
|
+
scheme: "bearer",
|
|
2132
|
+
type: "http"
|
|
2133
|
+
}],
|
|
2134
|
+
url: "/api/external/v2/customer_invoices/{id}/update_imported",
|
|
2135
|
+
...options,
|
|
2136
|
+
headers: {
|
|
2137
|
+
"Content-Type": "application/json",
|
|
2138
|
+
...options.headers
|
|
2139
|
+
}
|
|
2140
|
+
});
|
|
2141
|
+
/**
|
|
2142
|
+
* Turn the draft invoice into a finalized invoice.
|
|
2143
|
+
*
|
|
2144
|
+
* Convert the draft customer invoice or credit note into a finalized
|
|
2145
|
+
* one. Once finalized, the resource can no longer be edited.
|
|
2146
|
+
*
|
|
2147
|
+
*
|
|
2148
|
+
* > ℹ️
|
|
2149
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`
|
|
2150
|
+
*/
|
|
2151
|
+
const finalizeCustomerInvoice = (options) => (options.client ?? client).put({
|
|
2152
|
+
security: [{
|
|
2153
|
+
scheme: "bearer",
|
|
2154
|
+
type: "http"
|
|
2155
|
+
}],
|
|
2156
|
+
url: "/api/external/v2/customer_invoices/{id}/finalize",
|
|
2157
|
+
...options
|
|
2158
|
+
});
|
|
2159
|
+
/**
|
|
2160
|
+
* Link a credit note to a customer invoice
|
|
2161
|
+
*
|
|
2162
|
+
* Link a credit note to a customer invoice
|
|
2163
|
+
*
|
|
2164
|
+
* > ℹ️
|
|
2165
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`
|
|
2166
|
+
*/
|
|
2167
|
+
const linkCreditNote = (options) => (options.client ?? client).post({
|
|
2168
|
+
security: [{
|
|
2169
|
+
scheme: "bearer",
|
|
2170
|
+
type: "http"
|
|
2171
|
+
}],
|
|
2172
|
+
url: "/api/external/v2/customer_invoices/{id}/link_credit_note",
|
|
2173
|
+
...options,
|
|
2174
|
+
headers: {
|
|
2175
|
+
"Content-Type": "application/json",
|
|
2176
|
+
...options.headers
|
|
2177
|
+
}
|
|
2178
|
+
});
|
|
2179
|
+
/**
|
|
2180
|
+
* List invoice lines for a supplier invoice
|
|
2181
|
+
*
|
|
2182
|
+
* List invoice lines for a supplier invoice
|
|
2183
|
+
*
|
|
2184
|
+
* > ℹ️
|
|
2185
|
+
* > This endpoint requires one of the following scopes: `supplier_invoices:all`, `supplier_invoices:readonly`
|
|
2186
|
+
*/
|
|
2187
|
+
const getSupplierInvoiceLines = (options) => (options.client ?? client).get({
|
|
2188
|
+
security: [{
|
|
2189
|
+
scheme: "bearer",
|
|
2190
|
+
type: "http"
|
|
2191
|
+
}],
|
|
2192
|
+
url: "/api/external/v2/supplier_invoices/{supplier_invoice_id}/invoice_lines",
|
|
2193
|
+
...options
|
|
2194
|
+
});
|
|
2195
|
+
/**
|
|
2196
|
+
* List supplier invoices
|
|
2197
|
+
*
|
|
2198
|
+
* This endpoint returns a list of supplier invoices.
|
|
2199
|
+
*
|
|
2200
|
+
* > ℹ️
|
|
2201
|
+
* > This endpoint requires one of the following scopes: `supplier_invoices:all`, `supplier_invoices:readonly`
|
|
2202
|
+
*/
|
|
2203
|
+
const getSupplierInvoices = (options) => (options?.client ?? client).get({
|
|
2204
|
+
security: [{
|
|
2205
|
+
scheme: "bearer",
|
|
2206
|
+
type: "http"
|
|
2207
|
+
}],
|
|
2208
|
+
url: "/api/external/v2/supplier_invoices",
|
|
2209
|
+
...options
|
|
2210
|
+
});
|
|
2211
|
+
/**
|
|
2212
|
+
* Retrieve a supplier invoice
|
|
2213
|
+
*
|
|
2214
|
+
* This endpoint returns a supplier invoice.
|
|
2215
|
+
*
|
|
2216
|
+
* > ℹ️
|
|
2217
|
+
* > This endpoint requires one of the following scopes: `supplier_invoices:all`, `supplier_invoices:readonly`
|
|
2218
|
+
*/
|
|
2219
|
+
const getSupplierInvoice = (options) => (options.client ?? client).get({
|
|
2220
|
+
security: [{
|
|
2221
|
+
scheme: "bearer",
|
|
2222
|
+
type: "http"
|
|
2223
|
+
}],
|
|
2224
|
+
url: "/api/external/v2/supplier_invoices/{id}",
|
|
2225
|
+
...options
|
|
2226
|
+
});
|
|
2227
|
+
/**
|
|
2228
|
+
* Update a supplier invoice
|
|
2229
|
+
*
|
|
2230
|
+
* This endpoint allows you to update a supplier invoice.
|
|
2231
|
+
*
|
|
2232
|
+
* > ℹ️
|
|
2233
|
+
* > This endpoint requires one of the following scopes: `supplier_invoices:all`
|
|
2234
|
+
*/
|
|
2235
|
+
const putSupplierInvoice = (options) => (options.client ?? client).put({
|
|
2236
|
+
security: [{
|
|
2237
|
+
scheme: "bearer",
|
|
2238
|
+
type: "http"
|
|
2239
|
+
}],
|
|
2240
|
+
url: "/api/external/v2/supplier_invoices/{id}",
|
|
2241
|
+
...options,
|
|
2242
|
+
headers: {
|
|
2243
|
+
"Content-Type": "application/json",
|
|
2244
|
+
...options.headers
|
|
2245
|
+
}
|
|
2246
|
+
});
|
|
2247
|
+
/**
|
|
2248
|
+
* List categories of a supplier invoice
|
|
2249
|
+
*
|
|
2250
|
+
* List categories of a supplier invoice
|
|
2251
|
+
*
|
|
2252
|
+
* > ℹ️
|
|
2253
|
+
* > This endpoint requires one of the following scopes: `supplier_invoices:all`, `supplier_invoices:readonly`
|
|
2254
|
+
*/
|
|
2255
|
+
const getSupplierInvoiceCategories = (options) => (options.client ?? client).get({
|
|
2256
|
+
security: [{
|
|
2257
|
+
scheme: "bearer",
|
|
2258
|
+
type: "http"
|
|
2259
|
+
}],
|
|
2260
|
+
url: "/api/external/v2/supplier_invoices/{supplier_invoice_id}/categories",
|
|
2261
|
+
...options
|
|
2262
|
+
});
|
|
2263
|
+
/**
|
|
2264
|
+
* Categorize a supplier invoice
|
|
2265
|
+
*
|
|
2266
|
+
* Update the categories of a supplier invoice. You can pass categories that don't belong to the same category group. The sum of categories of a same group must equal `1`. In the following example, the two first categories belong to the same category group A, the sum of the weights is `1`. The third category belongs to a category group B, its weight is `1`.
|
|
2267
|
+
* ```
|
|
2268
|
+
* [
|
|
2269
|
+
* { "id": 59, "weight": "0.5" }, // category group A
|
|
2270
|
+
* { "id": 33, "weight": "0.5" }, // category group A
|
|
2271
|
+
* { "id": 65, "weight": "1" } // category group B
|
|
2272
|
+
* ]
|
|
2273
|
+
* ```
|
|
2274
|
+
*
|
|
2275
|
+
*
|
|
2276
|
+
* > ℹ️
|
|
2277
|
+
* > This endpoint requires one of the following scopes: `supplier_invoices:all`
|
|
2278
|
+
*/
|
|
2279
|
+
const putSupplierInvoiceCategories = (options) => (options.client ?? client).put({
|
|
2280
|
+
security: [{
|
|
2281
|
+
scheme: "bearer",
|
|
2282
|
+
type: "http"
|
|
2283
|
+
}],
|
|
2284
|
+
url: "/api/external/v2/supplier_invoices/{supplier_invoice_id}/categories",
|
|
2285
|
+
...options,
|
|
2286
|
+
headers: {
|
|
2287
|
+
"Content-Type": "application/json",
|
|
2288
|
+
...options.headers
|
|
2289
|
+
}
|
|
2290
|
+
});
|
|
2291
|
+
/**
|
|
2292
|
+
* List payments for a supplier invoice
|
|
2293
|
+
*
|
|
2294
|
+
* List payments for a supplier invoice
|
|
2295
|
+
*
|
|
2296
|
+
* > ℹ️
|
|
2297
|
+
* > This endpoint requires one of the following scopes: `supplier_invoices:all`, `supplier_invoices:readonly`
|
|
2298
|
+
*/
|
|
2299
|
+
const getSupplierInvoicePayments = (options) => (options.client ?? client).get({
|
|
2300
|
+
security: [{
|
|
2301
|
+
scheme: "bearer",
|
|
2302
|
+
type: "http"
|
|
2303
|
+
}],
|
|
2304
|
+
url: "/api/external/v2/supplier_invoices/{supplier_invoice_id}/payments",
|
|
2305
|
+
...options
|
|
2306
|
+
});
|
|
2307
|
+
/**
|
|
2308
|
+
* Update a supplier invoice payment status
|
|
2309
|
+
*
|
|
2310
|
+
* This endpoint allows you to update the payment status of a supplier
|
|
2311
|
+
* invoice.
|
|
2312
|
+
*
|
|
2313
|
+
*
|
|
2314
|
+
* > ℹ️
|
|
2315
|
+
* > This endpoint requires one of the following scopes: `supplier_invoices:all`
|
|
2316
|
+
*/
|
|
2317
|
+
const updateSupplierInvoicePaymentStatus = (options) => (options.client ?? client).put({
|
|
2318
|
+
security: [{
|
|
2319
|
+
scheme: "bearer",
|
|
2320
|
+
type: "http"
|
|
2321
|
+
}],
|
|
2322
|
+
url: "/api/external/v2/supplier_invoices/{supplier_invoice_id}/payment_status",
|
|
2323
|
+
...options,
|
|
2324
|
+
headers: {
|
|
2325
|
+
"Content-Type": "application/json",
|
|
2326
|
+
...options.headers
|
|
2327
|
+
}
|
|
2328
|
+
});
|
|
2329
|
+
/**
|
|
2330
|
+
* List matched transactions for a supplier invoice
|
|
2331
|
+
*
|
|
2332
|
+
* List matched transactions for a supplier invoice
|
|
2333
|
+
*
|
|
2334
|
+
* > ℹ️
|
|
2335
|
+
* > This endpoint requires one of the following scopes: `supplier_invoices:all`, `supplier_invoices:readonly`
|
|
2336
|
+
*/
|
|
2337
|
+
const getSupplierInvoiceMatchedTransactions = (options) => (options.client ?? client).get({
|
|
2338
|
+
security: [{
|
|
2339
|
+
scheme: "bearer",
|
|
2340
|
+
type: "http"
|
|
2341
|
+
}],
|
|
2342
|
+
url: "/api/external/v2/supplier_invoices/{supplier_invoice_id}/matched_transactions",
|
|
2343
|
+
...options
|
|
2344
|
+
});
|
|
2345
|
+
/**
|
|
2346
|
+
* Match a transaction to a supplier invoice
|
|
2347
|
+
*
|
|
2348
|
+
* This endpoint allows you to match a transaction to a supplier invoice.
|
|
2349
|
+
*
|
|
2350
|
+
* You can match one transaction with one supplier invoice at a time. To match multiple transactions to a supplier invoice, you need to call this endpoint multiple times.
|
|
2351
|
+
* It's possible to match a transaction to multiple supplier invoices too.
|
|
2352
|
+
*
|
|
2353
|
+
*
|
|
2354
|
+
* > ℹ️
|
|
2355
|
+
* > This endpoint requires one of the following scopes: `supplier_invoices:all`
|
|
2356
|
+
*/
|
|
2357
|
+
const postSupplierInvoiceMatchedTransactions = (options) => (options.client ?? client).post({
|
|
2358
|
+
security: [{
|
|
2359
|
+
scheme: "bearer",
|
|
2360
|
+
type: "http"
|
|
2361
|
+
}],
|
|
2362
|
+
url: "/api/external/v2/supplier_invoices/{supplier_invoice_id}/matched_transactions",
|
|
2363
|
+
...options,
|
|
2364
|
+
headers: {
|
|
2365
|
+
"Content-Type": "application/json",
|
|
2366
|
+
...options.headers
|
|
2367
|
+
}
|
|
2368
|
+
});
|
|
2369
|
+
/**
|
|
2370
|
+
* Unmatch a transaction to a supplier invoice
|
|
2371
|
+
*
|
|
2372
|
+
* This endpoint allows you to unmatch a transaction to a supplier
|
|
2373
|
+
* invoice.
|
|
2374
|
+
*
|
|
2375
|
+
*
|
|
2376
|
+
* > ℹ️
|
|
2377
|
+
* > This endpoint requires one of the following scopes: `supplier_invoices:all`
|
|
2378
|
+
*/
|
|
2379
|
+
const deleteSupplierInvoiceMatchedTransactions = (options) => (options.client ?? client).delete({
|
|
2380
|
+
security: [{
|
|
2381
|
+
scheme: "bearer",
|
|
2382
|
+
type: "http"
|
|
2383
|
+
}],
|
|
2384
|
+
url: "/api/external/v2/supplier_invoices/{supplier_invoice_id}/matched_transactions/{id}",
|
|
2385
|
+
...options
|
|
2386
|
+
});
|
|
2387
|
+
/**
|
|
2388
|
+
* Link a purchase request to a supplier invoice
|
|
2389
|
+
*
|
|
2390
|
+
* This endpoint allows you to link a purchase request to a supplier invoice.
|
|
2391
|
+
*
|
|
2392
|
+
* You can link one purchase request with one supplier invoice at a time. To link multiple purchase request to a supplier invoice, you need to call this endpoint multiple times.
|
|
2393
|
+
* It's possible to link a purchase request to multiple supplier invoices too.
|
|
2394
|
+
*
|
|
2395
|
+
*
|
|
2396
|
+
* > ℹ️
|
|
2397
|
+
* > This endpoint requires one of the following scopes: `supplier_invoices:all`
|
|
2398
|
+
*/
|
|
2399
|
+
const postSupplierInvoiceLinkedPurchaseRequests = (options) => (options.client ?? client).post({
|
|
2400
|
+
security: [{
|
|
2401
|
+
scheme: "bearer",
|
|
2402
|
+
type: "http"
|
|
2403
|
+
}],
|
|
2404
|
+
url: "/api/external/v2/supplier_invoices/{supplier_invoice_id}/linked_purchase_requests",
|
|
2405
|
+
...options,
|
|
2406
|
+
headers: {
|
|
2407
|
+
"Content-Type": "application/json",
|
|
2408
|
+
...options.headers
|
|
2409
|
+
}
|
|
2410
|
+
});
|
|
2411
|
+
/**
|
|
2412
|
+
* Import a supplier invoice with a file attached
|
|
2413
|
+
*
|
|
2414
|
+
* This endpoint allows you to import a supplier invoice with a file
|
|
2415
|
+
* attached.
|
|
2416
|
+
*
|
|
2417
|
+
*
|
|
2418
|
+
* > ℹ️
|
|
2419
|
+
* > This endpoint requires one of the following scopes: `supplier_invoices:all`
|
|
2420
|
+
*/
|
|
2421
|
+
const importSupplierInvoice = (options) => (options.client ?? client).post({
|
|
2422
|
+
security: [{
|
|
2423
|
+
scheme: "bearer",
|
|
2424
|
+
type: "http"
|
|
2425
|
+
}],
|
|
2426
|
+
url: "/api/external/v2/supplier_invoices/import",
|
|
2427
|
+
...options,
|
|
2428
|
+
headers: {
|
|
2429
|
+
"Content-Type": "application/json",
|
|
2430
|
+
...options.headers
|
|
2431
|
+
}
|
|
2432
|
+
});
|
|
2433
|
+
/**
|
|
2434
|
+
* Validate the accounting of a supplier invoice
|
|
2435
|
+
*
|
|
2436
|
+
* Turn the supplier invoice into a Complete state.
|
|
2437
|
+
*
|
|
2438
|
+
* > ℹ️
|
|
2439
|
+
* > This endpoint requires one of the following scopes: `supplier_invoices:all`
|
|
2440
|
+
*/
|
|
2441
|
+
const validateAccountingSupplierInvoice = (options) => (options.client ?? client).put({
|
|
2442
|
+
security: [{
|
|
2443
|
+
scheme: "bearer",
|
|
2444
|
+
type: "http"
|
|
2445
|
+
}],
|
|
2446
|
+
url: "/api/external/v2/supplier_invoices/{id}/validate_accounting",
|
|
2447
|
+
...options
|
|
2448
|
+
});
|
|
2449
|
+
/**
|
|
2450
|
+
* Create a company
|
|
2451
|
+
*
|
|
2452
|
+
* This endpoint is used to create a new company. In order to authenticate the request, a valid OAuth2 token must be provided. The token must have the `companies:all` scope and be generated with `client_credentials` grant type.
|
|
2453
|
+
*/
|
|
2454
|
+
const companyCreate = (options) => (options?.client ?? client).post({
|
|
2455
|
+
url: "/api/external/v2/companies",
|
|
2456
|
+
...options,
|
|
2457
|
+
headers: {
|
|
2458
|
+
"Content-Type": "application/json",
|
|
2459
|
+
...options?.headers
|
|
2460
|
+
}
|
|
2461
|
+
});
|
|
2462
|
+
/**
|
|
2463
|
+
* Complete registration for a company
|
|
2464
|
+
*
|
|
2465
|
+
* This endpoint is used to complete the registration of a company. In order to authenticate the request, a valid OAuth2 token must be provided. The token must have the `capital_deposits` scope and be generated with `authorization_code` grant type.
|
|
2466
|
+
*/
|
|
2467
|
+
const companyCompleteRegistration = (options) => (options.client ?? client).put({
|
|
2468
|
+
url: "/api/external/v2/companies/{id}/complete_registration",
|
|
2469
|
+
...options,
|
|
2470
|
+
headers: {
|
|
2471
|
+
"Content-Type": "application/json",
|
|
2472
|
+
...options.headers
|
|
2473
|
+
}
|
|
2474
|
+
});
|
|
2475
|
+
/**
|
|
2476
|
+
* List category groups
|
|
2477
|
+
*
|
|
2478
|
+
* This endpoint returns a list of category groups
|
|
2479
|
+
*
|
|
2480
|
+
* > ℹ️
|
|
2481
|
+
* > This endpoint requires one of the following scopes: `categories:all`, `categories:readonly`
|
|
2482
|
+
*/
|
|
2483
|
+
const getCategoryGroups = (options) => (options?.client ?? client).get({
|
|
2484
|
+
security: [{
|
|
2485
|
+
scheme: "bearer",
|
|
2486
|
+
type: "http"
|
|
2487
|
+
}],
|
|
2488
|
+
url: "/api/external/v2/category_groups",
|
|
2489
|
+
...options
|
|
2490
|
+
});
|
|
2491
|
+
/**
|
|
2492
|
+
* Retrieve a category group
|
|
2493
|
+
*
|
|
2494
|
+
* This endpoint returns a specific category group.
|
|
2495
|
+
*
|
|
2496
|
+
* > ℹ️
|
|
2497
|
+
* > This endpoint requires one of the following scopes: `categories:all`, `categories:readonly`
|
|
2498
|
+
*/
|
|
2499
|
+
const getCategoryGroup = (options) => (options.client ?? client).get({
|
|
2500
|
+
security: [{
|
|
2501
|
+
scheme: "bearer",
|
|
2502
|
+
type: "http"
|
|
2503
|
+
}],
|
|
2504
|
+
url: "/api/external/v2/category_groups/{id}",
|
|
2505
|
+
...options
|
|
2506
|
+
});
|
|
2507
|
+
/**
|
|
2508
|
+
* List categories of a category group
|
|
2509
|
+
*
|
|
2510
|
+
* List categories of a category group
|
|
2511
|
+
*
|
|
2512
|
+
* > ℹ️
|
|
2513
|
+
* > This endpoint requires one of the following scopes: `categories:all`, `categories:readonly`
|
|
2514
|
+
*/
|
|
2515
|
+
const getCategoryGroupCategories = (options) => (options.client ?? client).get({
|
|
2516
|
+
security: [{
|
|
2517
|
+
scheme: "bearer",
|
|
2518
|
+
type: "http"
|
|
2519
|
+
}],
|
|
2520
|
+
url: "/api/external/v2/category_groups/{category_group_id}/categories",
|
|
2521
|
+
...options
|
|
2522
|
+
});
|
|
2523
|
+
/**
|
|
2524
|
+
* List categories
|
|
2525
|
+
*
|
|
2526
|
+
* List categories
|
|
2527
|
+
*
|
|
2528
|
+
* > ℹ️
|
|
2529
|
+
* > This endpoint requires one of the following scopes: `categories:all`, `categories:readonly`
|
|
2530
|
+
*/
|
|
2531
|
+
const getCategories = (options) => (options?.client ?? client).get({
|
|
2532
|
+
security: [{
|
|
2533
|
+
scheme: "bearer",
|
|
2534
|
+
type: "http"
|
|
2535
|
+
}],
|
|
2536
|
+
url: "/api/external/v2/categories",
|
|
2537
|
+
...options
|
|
2538
|
+
});
|
|
2539
|
+
/**
|
|
2540
|
+
* Create a category
|
|
2541
|
+
*
|
|
2542
|
+
* Create a category
|
|
2543
|
+
*
|
|
2544
|
+
* > ℹ️
|
|
2545
|
+
* > This endpoint requires one of the following scopes: `categories:all`
|
|
2546
|
+
*/
|
|
2547
|
+
const postCategories = (options) => (options.client ?? client).post({
|
|
2548
|
+
security: [{
|
|
2549
|
+
scheme: "bearer",
|
|
2550
|
+
type: "http"
|
|
2551
|
+
}],
|
|
2552
|
+
url: "/api/external/v2/categories",
|
|
2553
|
+
...options,
|
|
2554
|
+
headers: {
|
|
2555
|
+
"Content-Type": "application/json",
|
|
2556
|
+
...options.headers
|
|
2557
|
+
}
|
|
2558
|
+
});
|
|
2559
|
+
/**
|
|
2560
|
+
* Retrieve a category
|
|
2561
|
+
*
|
|
2562
|
+
* This endpoint returns a specific category.
|
|
2563
|
+
*
|
|
2564
|
+
* > ℹ️
|
|
2565
|
+
* > This endpoint requires one of the following scopes: `categories:all`, `categories:readonly`
|
|
2566
|
+
*/
|
|
2567
|
+
const getCategory = (options) => (options.client ?? client).get({
|
|
2568
|
+
security: [{
|
|
2569
|
+
scheme: "bearer",
|
|
2570
|
+
type: "http"
|
|
2571
|
+
}],
|
|
2572
|
+
url: "/api/external/v2/categories/{id}",
|
|
2573
|
+
...options
|
|
2574
|
+
});
|
|
2575
|
+
/**
|
|
2576
|
+
* Update a category
|
|
2577
|
+
*
|
|
2578
|
+
* This endpoint updates a category.
|
|
2579
|
+
*
|
|
2580
|
+
* > ℹ️
|
|
2581
|
+
* > This endpoint requires one of the following scopes: `categories:all`
|
|
2582
|
+
*/
|
|
2583
|
+
const updateCategory = (options) => (options.client ?? client).put({
|
|
2584
|
+
security: [{
|
|
2585
|
+
scheme: "bearer",
|
|
2586
|
+
type: "http"
|
|
2587
|
+
}],
|
|
2588
|
+
url: "/api/external/v2/categories/{id}",
|
|
2589
|
+
...options,
|
|
2590
|
+
headers: {
|
|
2591
|
+
"Content-Type": "application/json",
|
|
2592
|
+
...options.headers
|
|
2593
|
+
}
|
|
2594
|
+
});
|
|
2595
|
+
/**
|
|
2596
|
+
* Get the trial balance
|
|
2597
|
+
*
|
|
2598
|
+
* This endpoint returns the trial balance of the current company for the given period.
|
|
2599
|
+
*
|
|
2600
|
+
* > ℹ️
|
|
2601
|
+
* > This endpoint requires one of the following scopes: `trial_balance:readonly`
|
|
2602
|
+
*/
|
|
2603
|
+
const getTrialBalance = (options) => (options.client ?? client).get({
|
|
2604
|
+
security: [{
|
|
2605
|
+
scheme: "bearer",
|
|
2606
|
+
type: "http"
|
|
2607
|
+
}],
|
|
2608
|
+
url: "/api/external/v2/trial_balance",
|
|
2609
|
+
...options
|
|
2610
|
+
});
|
|
2611
|
+
/**
|
|
2612
|
+
* List Company's Fiscal Years
|
|
2613
|
+
*
|
|
2614
|
+
* This endpoint returns a list of fiscal years of the company.
|
|
2615
|
+
*
|
|
2616
|
+
* **DEPRECATED BEHAVIOR:**
|
|
2617
|
+
* By default, returns fiscal years ordered by ascending `start` date.
|
|
2618
|
+
*
|
|
2619
|
+
* **NEW BEHAVIOR:**
|
|
2620
|
+
* By default, returns fiscal years ordered by descending IDs
|
|
2621
|
+
* A new `sort` query parameter is now available allowing to sort by `id` or `start` attributes.
|
|
2622
|
+
* For more details, see our API documentation https://pennylane.readme.io/docs/2026-api-changes-guide for migration instructions.
|
|
2623
|
+
*
|
|
2624
|
+
*
|
|
2625
|
+
* > ℹ️
|
|
2626
|
+
* > This endpoint requires one of the following scopes: `fiscal_years:readonly`
|
|
2627
|
+
*/
|
|
2628
|
+
const companyFiscalYears = (options) => (options?.client ?? client).get({
|
|
2629
|
+
security: [{
|
|
2630
|
+
scheme: "bearer",
|
|
2631
|
+
type: "http"
|
|
2632
|
+
}],
|
|
2633
|
+
url: "/api/external/v2/fiscal_years",
|
|
2634
|
+
...options
|
|
2635
|
+
});
|
|
2636
|
+
/**
|
|
2637
|
+
* Get customer invoices changes events
|
|
2638
|
+
*
|
|
2639
|
+
* Returns the list of changes based on the provided `start_date`.
|
|
2640
|
+
* If no `start_date` is provided it returns the oldest set of recorded changes.
|
|
2641
|
+
* Changes for the last 4 weeks are retained. The items will be returned using
|
|
2642
|
+
* `processed_at` in ASC order (oldest first).
|
|
2643
|
+
*
|
|
2644
|
+
*
|
|
2645
|
+
* > ℹ️
|
|
2646
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`, `customer_invoices:readonly`
|
|
2647
|
+
*/
|
|
2648
|
+
const getCustomerInvoicesChanges = (options) => (options?.client ?? client).get({
|
|
2649
|
+
security: [{
|
|
2650
|
+
scheme: "bearer",
|
|
2651
|
+
type: "http"
|
|
2652
|
+
}],
|
|
2653
|
+
url: "/api/external/v2/changelogs/customer_invoices",
|
|
2654
|
+
...options
|
|
2655
|
+
});
|
|
2656
|
+
/**
|
|
2657
|
+
* Get supplier invoices changes events
|
|
2658
|
+
*
|
|
2659
|
+
* Returns the list of changes based on the provided `start_date`.
|
|
2660
|
+
* If no `start_date` is provided it returns the oldest set of recorded changes.
|
|
2661
|
+
* Changes for the last 4 weeks are retained. The items will be returned using
|
|
2662
|
+
* `processed_at` in ASC order (oldest first).
|
|
2663
|
+
*
|
|
2664
|
+
*
|
|
2665
|
+
* > ℹ️
|
|
2666
|
+
* > This endpoint requires one of the following scopes: `supplier_invoices:all`, `supplier_invoices:readonly`
|
|
2667
|
+
*/
|
|
2668
|
+
const getSupplierInvoicesChanges = (options) => (options?.client ?? client).get({
|
|
2669
|
+
security: [{
|
|
2670
|
+
scheme: "bearer",
|
|
2671
|
+
type: "http"
|
|
2672
|
+
}],
|
|
2673
|
+
url: "/api/external/v2/changelogs/supplier_invoices",
|
|
2674
|
+
...options
|
|
2675
|
+
});
|
|
2676
|
+
/**
|
|
2677
|
+
* Get customer changes events
|
|
2678
|
+
*
|
|
2679
|
+
* Returns the list of changes based on the provided `start_date`.
|
|
2680
|
+
* If no `start_date` is provided it returns the oldest set of recorded changes.
|
|
2681
|
+
* Changes for the last 4 weeks are retained. The items will be returned using
|
|
2682
|
+
* `processed_at` in ASC order (oldest first).
|
|
2683
|
+
*
|
|
2684
|
+
*
|
|
2685
|
+
* > ℹ️
|
|
2686
|
+
* > This endpoint requires one of the following scopes: `customers:all`, `customers:readonly`
|
|
2687
|
+
*/
|
|
2688
|
+
const getCustomerChanges = (options) => (options?.client ?? client).get({
|
|
2689
|
+
security: [{
|
|
2690
|
+
scheme: "bearer",
|
|
2691
|
+
type: "http"
|
|
2692
|
+
}],
|
|
2693
|
+
url: "/api/external/v2/changelogs/customers",
|
|
2694
|
+
...options
|
|
2695
|
+
});
|
|
2696
|
+
/**
|
|
2697
|
+
* Get supplier changes events
|
|
2698
|
+
*
|
|
2699
|
+
* Returns the list of changes based on the provided `start_date`.
|
|
2700
|
+
* If no `start_date` is provided it returns the oldest set of recorded changes.
|
|
2701
|
+
* Changes for the last 4 weeks are retained. The items will be returned using
|
|
2702
|
+
* `processed_at` in ASC order (oldest first).
|
|
2703
|
+
*
|
|
2704
|
+
*
|
|
2705
|
+
* > ℹ️
|
|
2706
|
+
* > This endpoint requires one of the following scopes: `suppliers:all`, `suppliers:readonly`
|
|
2707
|
+
*/
|
|
2708
|
+
const getSupplierChanges = (options) => (options?.client ?? client).get({
|
|
2709
|
+
security: [{
|
|
2710
|
+
scheme: "bearer",
|
|
2711
|
+
type: "http"
|
|
2712
|
+
}],
|
|
2713
|
+
url: "/api/external/v2/changelogs/suppliers",
|
|
2714
|
+
...options
|
|
2715
|
+
});
|
|
2716
|
+
/**
|
|
2717
|
+
* Get product change events
|
|
2718
|
+
*
|
|
2719
|
+
* Returns the list of changes based on the provided `start_date`.
|
|
2720
|
+
* If no `start_date` is provided it returns the oldest set of recorded changes.
|
|
2721
|
+
* Changes for the last 4 weeks are retained. The items will be returned using
|
|
2722
|
+
* `processed_at` in ASC order (oldest first).
|
|
2723
|
+
*
|
|
2724
|
+
*
|
|
2725
|
+
* > ℹ️
|
|
2726
|
+
* > This endpoint requires one of the following scopes: `products:all`, `products:readonly`
|
|
2727
|
+
*/
|
|
2728
|
+
const getProductChanges = (options) => (options?.client ?? client).get({
|
|
2729
|
+
security: [{
|
|
2730
|
+
scheme: "bearer",
|
|
2731
|
+
type: "http"
|
|
2732
|
+
}],
|
|
2733
|
+
url: "/api/external/v2/changelogs/products",
|
|
2734
|
+
...options
|
|
2735
|
+
});
|
|
2736
|
+
/**
|
|
2737
|
+
* Get ledger entry line change events
|
|
2738
|
+
*
|
|
2739
|
+
* Returns the list of changes based on the provided `start_date`.
|
|
2740
|
+
* If no `start_date` is provided it returns the oldest set of recorded changes.
|
|
2741
|
+
* Changes for the last 4 weeks are retained. The items will be returned using
|
|
2742
|
+
* `processed_at` in ASC order (oldest first).
|
|
2743
|
+
*
|
|
2744
|
+
* **NEW BEHAVIOR :**
|
|
2745
|
+
* The old `ledger` scope will only work on the old behavior system. As soon as you opt in to the new version, or when the sunset phase starts and you haven't explicitly opted out of the old behavior, the ledger scope will no longer work.
|
|
2746
|
+
* For more details, see our API documentation https://pennylane.readme.io/docs/2026-api-changes-guide for migration instructions.
|
|
2747
|
+
*
|
|
2748
|
+
*
|
|
2749
|
+
* > ℹ️
|
|
2750
|
+
* > This endpoint requires one of the following scopes: `ledger (DEPRECATED)`, `ledger_entries:readonly`, `ledger_entries:all`
|
|
2751
|
+
*/
|
|
2752
|
+
const getLedgerEntryLineChanges = (options) => (options?.client ?? client).get({
|
|
2753
|
+
security: [{
|
|
2754
|
+
scheme: "bearer",
|
|
2755
|
+
type: "http"
|
|
2756
|
+
}],
|
|
2757
|
+
url: "/api/external/v2/changelogs/ledger_entry_lines",
|
|
2758
|
+
...options
|
|
2759
|
+
});
|
|
2760
|
+
/**
|
|
2761
|
+
* Get transaction change events
|
|
2762
|
+
*
|
|
2763
|
+
* Returns the list of changes based on the provided `start_date`.
|
|
2764
|
+
* If no `start_date` is provided it returns the oldest set of recorded changes.
|
|
2765
|
+
* Changes for the last 4 weeks are retained. The items will be returned using
|
|
2766
|
+
* `processed_at` in ASC order (oldest first).
|
|
2767
|
+
*
|
|
2768
|
+
*
|
|
2769
|
+
* > ℹ️
|
|
2770
|
+
* > This endpoint requires one of the following scopes: `transactions:all`, `transactions:readonly`
|
|
2771
|
+
*/
|
|
2772
|
+
const getTransactionChanges = (options) => (options?.client ?? client).get({
|
|
2773
|
+
security: [{
|
|
2774
|
+
scheme: "bearer",
|
|
2775
|
+
type: "http"
|
|
2776
|
+
}],
|
|
2777
|
+
url: "/api/external/v2/changelogs/transactions",
|
|
2778
|
+
...options
|
|
2779
|
+
});
|
|
2780
|
+
/**
|
|
2781
|
+
* List bank accounts
|
|
2782
|
+
*
|
|
2783
|
+
* List bank_accounts
|
|
2784
|
+
*
|
|
2785
|
+
* > ℹ️
|
|
2786
|
+
* > This endpoint requires one of the following scopes: `bank_accounts:all`, `bank_accounts:readonly`
|
|
2787
|
+
*/
|
|
2788
|
+
const getBankAccounts = (options) => (options?.client ?? client).get({
|
|
2789
|
+
security: [{
|
|
2790
|
+
scheme: "bearer",
|
|
2791
|
+
type: "http"
|
|
2792
|
+
}],
|
|
2793
|
+
url: "/api/external/v2/bank_accounts",
|
|
2794
|
+
...options
|
|
2795
|
+
});
|
|
2796
|
+
/**
|
|
2797
|
+
* Create a bank account
|
|
2798
|
+
*
|
|
2799
|
+
* Create a bank account
|
|
2800
|
+
*
|
|
2801
|
+
* > ℹ️
|
|
2802
|
+
* > This endpoint requires one of the following scopes: `bank_accounts:all`
|
|
2803
|
+
*/
|
|
2804
|
+
const postBankAccount = (options) => (options.client ?? client).post({
|
|
2805
|
+
security: [{
|
|
2806
|
+
scheme: "bearer",
|
|
2807
|
+
type: "http"
|
|
2808
|
+
}],
|
|
2809
|
+
url: "/api/external/v2/bank_accounts",
|
|
2810
|
+
...options,
|
|
2811
|
+
headers: {
|
|
2812
|
+
"Content-Type": "application/json",
|
|
2813
|
+
...options.headers
|
|
2814
|
+
}
|
|
2815
|
+
});
|
|
2816
|
+
/**
|
|
2817
|
+
* Retrieve a bank account
|
|
2818
|
+
*
|
|
2819
|
+
* Retrieve a bank account
|
|
2820
|
+
*
|
|
2821
|
+
* > ℹ️
|
|
2822
|
+
* > This endpoint requires one of the following scopes: `bank_accounts:all`, `bank_accounts:readonly`
|
|
2823
|
+
*/
|
|
2824
|
+
const getBankAccount = (options) => (options.client ?? client).get({
|
|
2825
|
+
security: [{
|
|
2826
|
+
scheme: "bearer",
|
|
2827
|
+
type: "http"
|
|
2828
|
+
}],
|
|
2829
|
+
url: "/api/external/v2/bank_accounts/{id}",
|
|
2830
|
+
...options
|
|
2831
|
+
});
|
|
2832
|
+
/**
|
|
2833
|
+
* List transactions
|
|
2834
|
+
*
|
|
2835
|
+
* List transactions
|
|
2836
|
+
*
|
|
2837
|
+
* > ℹ️
|
|
2838
|
+
* > This endpoint requires one of the following scopes: `transactions:readonly`, `transactions:all`
|
|
2839
|
+
*/
|
|
2840
|
+
const getTransactions = (options) => (options?.client ?? client).get({
|
|
2841
|
+
security: [{
|
|
2842
|
+
scheme: "bearer",
|
|
2843
|
+
type: "http"
|
|
2844
|
+
}],
|
|
2845
|
+
url: "/api/external/v2/transactions",
|
|
2846
|
+
...options
|
|
2847
|
+
});
|
|
2848
|
+
/**
|
|
2849
|
+
* Create a transaction
|
|
2850
|
+
*
|
|
2851
|
+
* Create a banking transaction
|
|
2852
|
+
*
|
|
2853
|
+
* > ℹ️
|
|
2854
|
+
* > This endpoint requires one of the following scopes: `transactions:all`
|
|
2855
|
+
*/
|
|
2856
|
+
const createTransaction = (options) => (options.client ?? client).post({
|
|
2857
|
+
security: [{
|
|
2858
|
+
scheme: "bearer",
|
|
2859
|
+
type: "http"
|
|
2860
|
+
}],
|
|
2861
|
+
url: "/api/external/v2/transactions",
|
|
2862
|
+
...options,
|
|
2863
|
+
headers: {
|
|
2864
|
+
"Content-Type": "application/json",
|
|
2865
|
+
...options.headers
|
|
2866
|
+
}
|
|
2867
|
+
});
|
|
2868
|
+
/**
|
|
2869
|
+
* Retrieve a transaction
|
|
2870
|
+
*
|
|
2871
|
+
* Retrieve a transaction
|
|
2872
|
+
*
|
|
2873
|
+
* > ℹ️
|
|
2874
|
+
* > This endpoint requires one of the following scopes: `transactions:readonly`, `transactions:all`
|
|
2875
|
+
*/
|
|
2876
|
+
const getTransaction = (options) => (options.client ?? client).get({
|
|
2877
|
+
security: [{
|
|
2878
|
+
scheme: "bearer",
|
|
2879
|
+
type: "http"
|
|
2880
|
+
}],
|
|
2881
|
+
url: "/api/external/v2/transactions/{id}",
|
|
2882
|
+
...options
|
|
2883
|
+
});
|
|
2884
|
+
/**
|
|
2885
|
+
* Update a transaction
|
|
2886
|
+
*
|
|
2887
|
+
* This endpoint returns the updated transaction.
|
|
2888
|
+
*
|
|
2889
|
+
* > ℹ️
|
|
2890
|
+
* > This endpoint requires one of the following scopes: `transactions:all`
|
|
2891
|
+
*/
|
|
2892
|
+
const updateTransaction = (options) => (options.client ?? client).put({
|
|
2893
|
+
security: [{
|
|
2894
|
+
scheme: "bearer",
|
|
2895
|
+
type: "http"
|
|
2896
|
+
}],
|
|
2897
|
+
url: "/api/external/v2/transactions/{id}",
|
|
2898
|
+
...options,
|
|
2899
|
+
headers: {
|
|
2900
|
+
"Content-Type": "application/json",
|
|
2901
|
+
...options.headers
|
|
2902
|
+
}
|
|
2903
|
+
});
|
|
2904
|
+
/**
|
|
2905
|
+
* List categories of a bank transaction
|
|
2906
|
+
*
|
|
2907
|
+
* List categories of a bank transaction
|
|
2908
|
+
*
|
|
2909
|
+
* > ℹ️
|
|
2910
|
+
* > This endpoint requires one of the following scopes: `transactions:readonly`, `transactions:all`
|
|
2911
|
+
*/
|
|
2912
|
+
const getTransactionCategories = (options) => (options.client ?? client).get({
|
|
2913
|
+
security: [{
|
|
2914
|
+
scheme: "bearer",
|
|
2915
|
+
type: "http"
|
|
2916
|
+
}],
|
|
2917
|
+
url: "/api/external/v2/transactions/{transaction_id}/categories",
|
|
2918
|
+
...options
|
|
2919
|
+
});
|
|
2920
|
+
/**
|
|
2921
|
+
* Categorize a bank transaction
|
|
2922
|
+
*
|
|
2923
|
+
* Update the categories of a transaction. You can pass categories that don't belong to the same category group. The sum of categories of a same group must equal `1`. In the following example, the two first categories belong to the same category group A, the sum of the weights is `1`. The third category belongs to a category group B, its weight is `1`.
|
|
2924
|
+
* ```
|
|
2925
|
+
* [
|
|
2926
|
+
* { "id": 59, "weight": "0.5" }, // category group A
|
|
2927
|
+
* { "id": 33, "weight": "0.5" }, // category group A
|
|
2928
|
+
* { "id": 65, "weight": "1" } // category group B
|
|
2929
|
+
* ]
|
|
2930
|
+
* ```
|
|
2931
|
+
*
|
|
2932
|
+
*
|
|
2933
|
+
* > ℹ️
|
|
2934
|
+
* > This endpoint requires one of the following scopes: `transactions:all`
|
|
2935
|
+
*/
|
|
2936
|
+
const putTransactionCategories = (options) => (options.client ?? client).put({
|
|
2937
|
+
security: [{
|
|
2938
|
+
scheme: "bearer",
|
|
2939
|
+
type: "http"
|
|
2940
|
+
}],
|
|
2941
|
+
url: "/api/external/v2/transactions/{transaction_id}/categories",
|
|
2942
|
+
...options,
|
|
2943
|
+
headers: {
|
|
2944
|
+
"Content-Type": "application/json",
|
|
2945
|
+
...options.headers
|
|
2946
|
+
}
|
|
2947
|
+
});
|
|
2948
|
+
/**
|
|
2949
|
+
* List invoices matched to a bank transaction
|
|
2950
|
+
*
|
|
2951
|
+
* List invoices matched to a bank transaction
|
|
2952
|
+
*
|
|
2953
|
+
* > ℹ️
|
|
2954
|
+
* > This endpoint requires one of the following scopes: `transactions:readonly`, `transactions:all`
|
|
2955
|
+
*/
|
|
2956
|
+
const getTransactionMatchedInvoices = (options) => (options.client ?? client).get({
|
|
2957
|
+
security: [{
|
|
2958
|
+
scheme: "bearer",
|
|
2959
|
+
type: "http"
|
|
2960
|
+
}],
|
|
2961
|
+
url: "/api/external/v2/transactions/{transaction_id}/matched_invoices",
|
|
2962
|
+
...options
|
|
2963
|
+
});
|
|
2964
|
+
/**
|
|
2965
|
+
* List quotes
|
|
2966
|
+
*
|
|
2967
|
+
* Lists quotes
|
|
2968
|
+
*
|
|
2969
|
+
* > ℹ️
|
|
2970
|
+
* > This endpoint requires one of the following scopes: `quotes:all`, `quotes:readonly`
|
|
2971
|
+
*/
|
|
2972
|
+
const listQuotes = (options) => (options?.client ?? client).get({
|
|
2973
|
+
security: [{
|
|
2974
|
+
scheme: "bearer",
|
|
2975
|
+
type: "http"
|
|
2976
|
+
}],
|
|
2977
|
+
url: "/api/external/v2/quotes",
|
|
2978
|
+
...options
|
|
2979
|
+
});
|
|
2980
|
+
/**
|
|
2981
|
+
* Create a quote
|
|
2982
|
+
*
|
|
2983
|
+
* This endpoint allows you to create a quote
|
|
2984
|
+
*
|
|
2985
|
+
* > ℹ️
|
|
2986
|
+
* > This endpoint requires one of the following scopes: `quotes:all`
|
|
2987
|
+
*/
|
|
2988
|
+
const postQuotes = (options) => (options.client ?? client).post({
|
|
2989
|
+
security: [{
|
|
2990
|
+
scheme: "bearer",
|
|
2991
|
+
type: "http"
|
|
2992
|
+
}],
|
|
2993
|
+
url: "/api/external/v2/quotes",
|
|
2994
|
+
...options,
|
|
2995
|
+
headers: {
|
|
2996
|
+
"Content-Type": "application/json",
|
|
2997
|
+
...options.headers
|
|
2998
|
+
}
|
|
2999
|
+
});
|
|
3000
|
+
/**
|
|
3001
|
+
* Retrieve a quote
|
|
3002
|
+
*
|
|
3003
|
+
* This endpoint retrieves a quote.
|
|
3004
|
+
*
|
|
3005
|
+
* > ℹ️
|
|
3006
|
+
* > This endpoint requires one of the following scopes: `quotes:all`, `quotes:readonly`
|
|
3007
|
+
*/
|
|
3008
|
+
const getQuote = (options) => (options.client ?? client).get({
|
|
3009
|
+
security: [{
|
|
3010
|
+
scheme: "bearer",
|
|
3011
|
+
type: "http"
|
|
3012
|
+
}],
|
|
3013
|
+
url: "/api/external/v2/quotes/{id}",
|
|
3014
|
+
...options
|
|
3015
|
+
});
|
|
3016
|
+
/**
|
|
3017
|
+
* Update a quote
|
|
3018
|
+
*
|
|
3019
|
+
* This endpoint allows you to update a quote
|
|
3020
|
+
*
|
|
3021
|
+
* > ℹ️
|
|
3022
|
+
* > This endpoint requires one of the following scopes: `quotes:all`
|
|
3023
|
+
*/
|
|
3024
|
+
const updateQuote = (options) => (options.client ?? client).put({
|
|
3025
|
+
security: [{
|
|
3026
|
+
scheme: "bearer",
|
|
3027
|
+
type: "http"
|
|
3028
|
+
}],
|
|
3029
|
+
url: "/api/external/v2/quotes/{id}",
|
|
3030
|
+
...options,
|
|
3031
|
+
headers: {
|
|
3032
|
+
"Content-Type": "application/json",
|
|
3033
|
+
...options.headers
|
|
3034
|
+
}
|
|
3035
|
+
});
|
|
3036
|
+
/**
|
|
3037
|
+
* List appendices of a quote
|
|
3038
|
+
*
|
|
3039
|
+
* List appendices of a quote
|
|
3040
|
+
*
|
|
3041
|
+
* > ℹ️
|
|
3042
|
+
* > This endpoint requires one of the following scopes: `quotes:all`, `quotes:readonly`
|
|
3043
|
+
*/
|
|
3044
|
+
const getQuoteAppendices = (options) => (options.client ?? client).get({
|
|
3045
|
+
security: [{
|
|
3046
|
+
scheme: "bearer",
|
|
3047
|
+
type: "http"
|
|
3048
|
+
}],
|
|
3049
|
+
url: "/api/external/v2/quotes/{quote_id}/appendices",
|
|
3050
|
+
...options
|
|
3051
|
+
});
|
|
3052
|
+
/**
|
|
3053
|
+
* Upload an appendix for a quote
|
|
3054
|
+
*
|
|
3055
|
+
* Upload a file that will be an appendix attached to a quote.
|
|
3056
|
+
*
|
|
3057
|
+
* Note that this will not upload a file into the DMS (GED).
|
|
3058
|
+
*
|
|
3059
|
+
*
|
|
3060
|
+
* > ℹ️
|
|
3061
|
+
* > This endpoint requires one of the following scopes: `quotes:all`
|
|
3062
|
+
*/
|
|
3063
|
+
const postQuoteAppendices = (options) => (options.client ?? client).post({
|
|
3064
|
+
...formDataBodySerializer,
|
|
3065
|
+
security: [{
|
|
3066
|
+
scheme: "bearer",
|
|
3067
|
+
type: "http"
|
|
3068
|
+
}],
|
|
3069
|
+
url: "/api/external/v2/quotes/{quote_id}/appendices",
|
|
3070
|
+
...options,
|
|
3071
|
+
headers: {
|
|
3072
|
+
"Content-Type": null,
|
|
3073
|
+
...options.headers
|
|
3074
|
+
}
|
|
3075
|
+
});
|
|
3076
|
+
/**
|
|
3077
|
+
* List invoice lines for a quote
|
|
3078
|
+
*
|
|
3079
|
+
* List invoice lines for a quote
|
|
3080
|
+
*
|
|
3081
|
+
* > ℹ️
|
|
3082
|
+
* > This endpoint requires one of the following scopes: `quotes:all`, `quotes:readonly`
|
|
3083
|
+
*/
|
|
3084
|
+
const getQuoteInvoiceLines = (options) => (options.client ?? client).get({
|
|
3085
|
+
security: [{
|
|
3086
|
+
scheme: "bearer",
|
|
3087
|
+
type: "http"
|
|
3088
|
+
}],
|
|
3089
|
+
url: "/api/external/v2/quotes/{quote_id}/invoice_lines",
|
|
3090
|
+
...options
|
|
3091
|
+
});
|
|
3092
|
+
/**
|
|
3093
|
+
* List invoice line sections for a quote
|
|
3094
|
+
*
|
|
3095
|
+
* List invoice line sections for a quote
|
|
3096
|
+
*
|
|
3097
|
+
* > ℹ️
|
|
3098
|
+
* > This endpoint requires one of the following scopes: `quotes:all`, `quotes:readonly`
|
|
3099
|
+
*/
|
|
3100
|
+
const getQuoteInvoiceLineSections = (options) => (options.client ?? client).get({
|
|
3101
|
+
security: [{
|
|
3102
|
+
scheme: "bearer",
|
|
3103
|
+
type: "http"
|
|
3104
|
+
}],
|
|
3105
|
+
url: "/api/external/v2/quotes/{quote_id}/invoice_line_sections",
|
|
3106
|
+
...options
|
|
3107
|
+
});
|
|
3108
|
+
/**
|
|
3109
|
+
* Send a quote by email
|
|
3110
|
+
*
|
|
3111
|
+
* This endpoint allows you to send a quote by email to your customer.
|
|
3112
|
+
* This requires that the PDF file for that document has been generated
|
|
3113
|
+
* (this process can take a few minutes), so if you just created
|
|
3114
|
+
* the quote in our system, we may return a 409 error. You should
|
|
3115
|
+
* retry the request in a few minutes - if you receive a 204 response, that means
|
|
3116
|
+
* that the email is on its way. For more information about email sending, please
|
|
3117
|
+
* read \[this guide\](https://pennylane.readme.io/v2.0/docs/sending-documents-by-email).
|
|
3118
|
+
*
|
|
3119
|
+
*
|
|
3120
|
+
* > ℹ️
|
|
3121
|
+
* > This endpoint requires one of the following scopes: `quotes:all`
|
|
3122
|
+
*/
|
|
3123
|
+
const sendByEmailQuote = (options) => (options.client ?? client).post({
|
|
3124
|
+
security: [{
|
|
3125
|
+
scheme: "bearer",
|
|
3126
|
+
type: "http"
|
|
3127
|
+
}],
|
|
3128
|
+
url: "/api/external/v2/quotes/{id}/send_by_email",
|
|
3129
|
+
...options,
|
|
3130
|
+
headers: {
|
|
3131
|
+
"Content-Type": "application/json",
|
|
3132
|
+
...options.headers
|
|
3133
|
+
}
|
|
3134
|
+
});
|
|
3135
|
+
/**
|
|
3136
|
+
* Update status of a quote
|
|
3137
|
+
*
|
|
3138
|
+
* This endpoint allows you to update the status of a quote
|
|
3139
|
+
*
|
|
3140
|
+
* > ℹ️
|
|
3141
|
+
* > This endpoint requires one of the following scopes: `quotes:all`
|
|
3142
|
+
*/
|
|
3143
|
+
const updateStatusQuote = (options) => (options.client ?? client).put({
|
|
3144
|
+
security: [{
|
|
3145
|
+
scheme: "bearer",
|
|
3146
|
+
type: "http"
|
|
3147
|
+
}],
|
|
3148
|
+
url: "/api/external/v2/quotes/{id}/update_status",
|
|
3149
|
+
...options,
|
|
3150
|
+
headers: {
|
|
3151
|
+
"Content-Type": "application/json",
|
|
3152
|
+
...options.headers
|
|
3153
|
+
}
|
|
3154
|
+
});
|
|
3155
|
+
/**
|
|
3156
|
+
* List commercial documents
|
|
3157
|
+
*
|
|
3158
|
+
* This endpoint lists commercial documents.
|
|
3159
|
+
*
|
|
3160
|
+
* > ℹ️
|
|
3161
|
+
* > This endpoint requires one of the following scopes: `commercial_documents:all`, `commercial_documents:readonly`
|
|
3162
|
+
*/
|
|
3163
|
+
const listCommercialDocuments = (options) => (options?.client ?? client).get({
|
|
3164
|
+
security: [{
|
|
3165
|
+
scheme: "bearer",
|
|
3166
|
+
type: "http"
|
|
3167
|
+
}],
|
|
3168
|
+
url: "/api/external/v2/commercial_documents",
|
|
3169
|
+
...options
|
|
3170
|
+
});
|
|
3171
|
+
/**
|
|
3172
|
+
* Retrieve a commercial document
|
|
3173
|
+
*
|
|
3174
|
+
* This endpoint retrieves a commercial document.
|
|
3175
|
+
*
|
|
3176
|
+
* > ℹ️
|
|
3177
|
+
* > This endpoint requires one of the following scopes: `commercial_documents:all`, `commercial_documents:readonly`
|
|
3178
|
+
*/
|
|
3179
|
+
const getCommercialDocument = (options) => (options.client ?? client).get({
|
|
3180
|
+
security: [{
|
|
3181
|
+
scheme: "bearer",
|
|
3182
|
+
type: "http"
|
|
3183
|
+
}],
|
|
3184
|
+
url: "/api/external/v2/commercial_documents/{id}",
|
|
3185
|
+
...options
|
|
3186
|
+
});
|
|
3187
|
+
/**
|
|
3188
|
+
* List appendices of a commercial document
|
|
3189
|
+
*
|
|
3190
|
+
* List appendices of a commercial document
|
|
3191
|
+
*
|
|
3192
|
+
* > ℹ️
|
|
3193
|
+
* > This endpoint requires one of the following scopes: `commercial_documents:all`, `commercial_documents:readonly`
|
|
3194
|
+
*/
|
|
3195
|
+
const getCommercialDocumentAppendices = (options) => (options.client ?? client).get({
|
|
3196
|
+
security: [{
|
|
3197
|
+
scheme: "bearer",
|
|
3198
|
+
type: "http"
|
|
3199
|
+
}],
|
|
3200
|
+
url: "/api/external/v2/commercial_documents/{commercial_document_id}/appendices",
|
|
3201
|
+
...options
|
|
3202
|
+
});
|
|
3203
|
+
/**
|
|
3204
|
+
* Upload an appendix for a commercial document
|
|
3205
|
+
*
|
|
3206
|
+
* Upload a file that will be an appendix attached to a commercial document.
|
|
3207
|
+
*
|
|
3208
|
+
* Note that this will not upload a file into the DMS (GED).
|
|
3209
|
+
*
|
|
3210
|
+
*
|
|
3211
|
+
* > ℹ️
|
|
3212
|
+
* > This endpoint requires one of the following scopes: `commercial_documents:all`
|
|
3213
|
+
*/
|
|
3214
|
+
const postCommercialDocumentAppendices = (options) => (options.client ?? client).post({
|
|
3215
|
+
...formDataBodySerializer,
|
|
3216
|
+
security: [{
|
|
3217
|
+
scheme: "bearer",
|
|
3218
|
+
type: "http"
|
|
3219
|
+
}],
|
|
3220
|
+
url: "/api/external/v2/commercial_documents/{commercial_document_id}/appendices",
|
|
3221
|
+
...options,
|
|
3222
|
+
headers: {
|
|
3223
|
+
"Content-Type": null,
|
|
3224
|
+
...options.headers
|
|
3225
|
+
}
|
|
3226
|
+
});
|
|
3227
|
+
/**
|
|
3228
|
+
* List invoice lines for a commercial document
|
|
3229
|
+
*
|
|
3230
|
+
* List invoice lines for a commercial document
|
|
3231
|
+
*
|
|
3232
|
+
* > ℹ️
|
|
3233
|
+
* > This endpoint requires one of the following scopes: `commercial_documents:all`, `commercial_documents:readonly`
|
|
3234
|
+
*/
|
|
3235
|
+
const getCommercialDocumentInvoiceLines = (options) => (options.client ?? client).get({
|
|
3236
|
+
security: [{
|
|
3237
|
+
scheme: "bearer",
|
|
3238
|
+
type: "http"
|
|
3239
|
+
}],
|
|
3240
|
+
url: "/api/external/v2/commercial_documents/{commercial_document_id}/invoice_lines",
|
|
3241
|
+
...options
|
|
3242
|
+
});
|
|
3243
|
+
/**
|
|
3244
|
+
* List invoice line sections for a commercial document
|
|
3245
|
+
*
|
|
3246
|
+
* List invoice line sections for a commercial document
|
|
3247
|
+
*
|
|
3248
|
+
* > ℹ️
|
|
3249
|
+
* > This endpoint requires one of the following scopes: `commercial_documents:all`, `commercial_documents:readonly`
|
|
3250
|
+
*/
|
|
3251
|
+
const getCommercialDocumentInvoiceLineSections = (options) => (options.client ?? client).get({
|
|
3252
|
+
security: [{
|
|
3253
|
+
scheme: "bearer",
|
|
3254
|
+
type: "http"
|
|
3255
|
+
}],
|
|
3256
|
+
url: "/api/external/v2/commercial_documents/{commercial_document_id}/invoice_line_sections",
|
|
3257
|
+
...options
|
|
3258
|
+
});
|
|
3259
|
+
/**
|
|
3260
|
+
* List SEPA mandates
|
|
3261
|
+
*
|
|
3262
|
+
* This endpoint allows you to retrieve all SEPA mandates associated with your company
|
|
3263
|
+
*
|
|
3264
|
+
* > ℹ️
|
|
3265
|
+
* > This endpoint requires one of the following scopes: `customer_mandates:all`, `customer_mandates:readonly`
|
|
3266
|
+
*/
|
|
3267
|
+
const getSepaMandates = (options) => (options?.client ?? client).get({
|
|
3268
|
+
security: [{
|
|
3269
|
+
scheme: "bearer",
|
|
3270
|
+
type: "http"
|
|
3271
|
+
}],
|
|
3272
|
+
url: "/api/external/v2/sepa_mandates",
|
|
3273
|
+
...options
|
|
3274
|
+
});
|
|
3275
|
+
/**
|
|
3276
|
+
* Create a SEPA mandate
|
|
3277
|
+
*
|
|
3278
|
+
* This endpoint allows you to create a SEPA mandate to enable direct debit payments
|
|
3279
|
+
*
|
|
3280
|
+
* > ℹ️
|
|
3281
|
+
* > This endpoint requires one of the following scopes: `customer_mandates:all`
|
|
3282
|
+
*/
|
|
3283
|
+
const postSepaMandates = (options) => (options.client ?? client).post({
|
|
3284
|
+
security: [{
|
|
3285
|
+
scheme: "bearer",
|
|
3286
|
+
type: "http"
|
|
3287
|
+
}],
|
|
3288
|
+
url: "/api/external/v2/sepa_mandates",
|
|
3289
|
+
...options,
|
|
3290
|
+
headers: {
|
|
3291
|
+
"Content-Type": "application/json",
|
|
3292
|
+
...options.headers
|
|
3293
|
+
}
|
|
3294
|
+
});
|
|
3295
|
+
/**
|
|
3296
|
+
* Delete a SEPA mandate
|
|
3297
|
+
*
|
|
3298
|
+
* This endpoint allows you to delete a specific SEPA mandate
|
|
3299
|
+
*
|
|
3300
|
+
* > ℹ️
|
|
3301
|
+
* > This endpoint requires one of the following scopes: `customer_mandates:all`
|
|
3302
|
+
*/
|
|
3303
|
+
const deleteSepaMandate = (options) => (options.client ?? client).delete({
|
|
3304
|
+
security: [{
|
|
3305
|
+
scheme: "bearer",
|
|
3306
|
+
type: "http"
|
|
3307
|
+
}],
|
|
3308
|
+
url: "/api/external/v2/sepa_mandates/{id}",
|
|
3309
|
+
...options
|
|
3310
|
+
});
|
|
3311
|
+
/**
|
|
3312
|
+
* Get a SEPA mandate
|
|
3313
|
+
*
|
|
3314
|
+
* This endpoint allows you to retrieve a specific SEPA mandate by ID
|
|
3315
|
+
*
|
|
3316
|
+
* > ℹ️
|
|
3317
|
+
* > This endpoint requires one of the following scopes: `customer_mandates:all`, `customer_mandates:readonly`
|
|
3318
|
+
*/
|
|
3319
|
+
const getSepaMandate = (options) => (options.client ?? client).get({
|
|
3320
|
+
security: [{
|
|
3321
|
+
scheme: "bearer",
|
|
3322
|
+
type: "http"
|
|
3323
|
+
}],
|
|
3324
|
+
url: "/api/external/v2/sepa_mandates/{id}",
|
|
3325
|
+
...options
|
|
3326
|
+
});
|
|
3327
|
+
/**
|
|
3328
|
+
* Update a SEPA mandate
|
|
3329
|
+
*
|
|
3330
|
+
* This endpoint allows you to update an existing SEPA mandate
|
|
3331
|
+
*
|
|
3332
|
+
* > ℹ️
|
|
3333
|
+
* > This endpoint requires one of the following scopes: `customer_mandates:all`
|
|
3334
|
+
*/
|
|
3335
|
+
const putSepaMandate = (options) => (options.client ?? client).put({
|
|
3336
|
+
security: [{
|
|
3337
|
+
scheme: "bearer",
|
|
3338
|
+
type: "http"
|
|
3339
|
+
}],
|
|
3340
|
+
url: "/api/external/v2/sepa_mandates/{id}",
|
|
3341
|
+
...options,
|
|
3342
|
+
headers: {
|
|
3343
|
+
"Content-Type": "application/json",
|
|
3344
|
+
...options.headers
|
|
3345
|
+
}
|
|
3346
|
+
});
|
|
3347
|
+
/**
|
|
3348
|
+
* List gocardless mandates
|
|
3349
|
+
*
|
|
3350
|
+
* List gocardless mandates
|
|
3351
|
+
*
|
|
3352
|
+
* > ℹ️
|
|
3353
|
+
* > This endpoint requires one of the following scopes: `customer_mandates:all`, `customer_mandates:readonly`
|
|
3354
|
+
*/
|
|
3355
|
+
const getGocardlessMandates = (options) => (options?.client ?? client).get({
|
|
3356
|
+
security: [{
|
|
3357
|
+
scheme: "bearer",
|
|
3358
|
+
type: "http"
|
|
3359
|
+
}],
|
|
3360
|
+
url: "/api/external/v2/gocardless_mandates",
|
|
3361
|
+
...options
|
|
3362
|
+
});
|
|
3363
|
+
/**
|
|
3364
|
+
* Get a Gocardless mandate
|
|
3365
|
+
*
|
|
3366
|
+
* This endpoint allows you to retrieve a specific Gocardless mandate by ID.
|
|
3367
|
+
*
|
|
3368
|
+
* > ℹ️
|
|
3369
|
+
* > This endpoint requires one of the following scopes: `customer_mandates:all`, `customer_mandates:readonly`
|
|
3370
|
+
*/
|
|
3371
|
+
const getGocardlessMandate = (options) => (options.client ?? client).get({
|
|
3372
|
+
security: [{
|
|
3373
|
+
scheme: "bearer",
|
|
3374
|
+
type: "http"
|
|
3375
|
+
}],
|
|
3376
|
+
url: "/api/external/v2/gocardless_mandates/{id}",
|
|
3377
|
+
...options
|
|
3378
|
+
});
|
|
3379
|
+
/**
|
|
3380
|
+
* Send a GoCardless mandate email request
|
|
3381
|
+
*
|
|
3382
|
+
* This endpoint allows you to send an email request for a GoCardless mandate to a recipient.
|
|
3383
|
+
*
|
|
3384
|
+
* > ℹ️
|
|
3385
|
+
* > This endpoint requires one of the following scopes: `customer_mandates:all`
|
|
3386
|
+
*/
|
|
3387
|
+
const postGocardlessMandateMailRequests = (options) => (options.client ?? client).post({
|
|
3388
|
+
security: [{
|
|
3389
|
+
scheme: "bearer",
|
|
3390
|
+
type: "http"
|
|
3391
|
+
}],
|
|
3392
|
+
url: "/api/external/v2/gocardless_mandates/mail_requests",
|
|
3393
|
+
...options,
|
|
3394
|
+
headers: {
|
|
3395
|
+
"Content-Type": "application/json",
|
|
3396
|
+
...options.headers
|
|
3397
|
+
}
|
|
3398
|
+
});
|
|
3399
|
+
/**
|
|
3400
|
+
* Cancel a Gocardless mandate
|
|
3401
|
+
*
|
|
3402
|
+
* Cancels a specific Gocardless mandate by ID. The mandate must be in a cancellable state, having one of the following statuses: `pending_submission`, `submitted` or `active`.
|
|
3403
|
+
*
|
|
3404
|
+
* > ℹ️
|
|
3405
|
+
* > This endpoint requires one of the following scopes: `customer_mandates:all`
|
|
3406
|
+
*/
|
|
3407
|
+
const postGocardlessMandateCancellations = (options) => (options.client ?? client).post({
|
|
3408
|
+
security: [{
|
|
3409
|
+
scheme: "bearer",
|
|
3410
|
+
type: "http"
|
|
3411
|
+
}],
|
|
3412
|
+
url: "/api/external/v2/gocardless_mandates/{gocardless_mandate_id}/cancellations",
|
|
3413
|
+
...options
|
|
3414
|
+
});
|
|
3415
|
+
/**
|
|
3416
|
+
* Associate a GoCardless mandate to a customer
|
|
3417
|
+
*
|
|
3418
|
+
* This endpoint allows you to associate a GoCardless mandate to a customer.
|
|
3419
|
+
*
|
|
3420
|
+
* > ℹ️
|
|
3421
|
+
* > This endpoint requires one of the following scopes: `customer_mandates:all`
|
|
3422
|
+
*/
|
|
3423
|
+
const postGocardlessMandateAssociations = (options) => (options.client ?? client).post({
|
|
3424
|
+
security: [{
|
|
3425
|
+
scheme: "bearer",
|
|
3426
|
+
type: "http"
|
|
3427
|
+
}],
|
|
3428
|
+
url: "/api/external/v2/gocardless_mandates/{gocardless_mandate_id}/associations",
|
|
3429
|
+
...options,
|
|
3430
|
+
headers: {
|
|
3431
|
+
"Content-Type": "application/json",
|
|
3432
|
+
...options.headers
|
|
3433
|
+
}
|
|
3434
|
+
});
|
|
3435
|
+
/**
|
|
3436
|
+
* List custom header fields for a customer invoice
|
|
3437
|
+
*
|
|
3438
|
+
* List custom header fields for a customer invoice
|
|
3439
|
+
*
|
|
3440
|
+
* > ℹ️
|
|
3441
|
+
* > This endpoint requires one of the following scopes: `customer_invoices:all`, `customer_invoices:readonly`
|
|
3442
|
+
*/
|
|
3443
|
+
const getCustomerInvoiceCustomHeaderFields = (options) => (options.client ?? client).get({
|
|
3444
|
+
security: [{
|
|
3445
|
+
scheme: "bearer",
|
|
3446
|
+
type: "http"
|
|
3447
|
+
}],
|
|
3448
|
+
url: "/api/external/v2/customer_invoices/{customer_invoice_id}/custom_header_fields",
|
|
3449
|
+
...options
|
|
3450
|
+
});
|
|
3451
|
+
/**
|
|
3452
|
+
* [BETA] Import e-invoices
|
|
3453
|
+
*
|
|
3454
|
+
* This endpoint allows you to import an e-invoice.
|
|
3455
|
+
*
|
|
3456
|
+
* > ℹ️
|
|
3457
|
+
* > This endpoint requires one of the following scopes: `e_invoices:all`
|
|
3458
|
+
*/
|
|
3459
|
+
const createEInvoiceImport = (options) => (options.client ?? client).post({
|
|
3460
|
+
...formDataBodySerializer,
|
|
3461
|
+
security: [{
|
|
3462
|
+
scheme: "bearer",
|
|
3463
|
+
type: "http"
|
|
3464
|
+
}],
|
|
3465
|
+
url: "/api/external/v2/e-invoices/imports",
|
|
3466
|
+
...options,
|
|
3467
|
+
headers: {
|
|
3468
|
+
"Content-Type": null,
|
|
3469
|
+
...options.headers
|
|
3470
|
+
}
|
|
3471
|
+
});
|
|
3472
|
+
/**
|
|
3473
|
+
* Import a purchase order.
|
|
3474
|
+
*
|
|
3475
|
+
* Import a purchase order. This will create a purchase request with an existing purchase order attached.
|
|
3476
|
+
* The purchase request will be **automatically validated**.
|
|
3477
|
+
*
|
|
3478
|
+
*
|
|
3479
|
+
* > ℹ️
|
|
3480
|
+
* > This endpoint requires one of the following scopes: `purchase_requests:all`
|
|
3481
|
+
*/
|
|
3482
|
+
const createPurchaseRequestImport = (options) => (options.client ?? client).post({
|
|
3483
|
+
security: [{
|
|
3484
|
+
scheme: "bearer",
|
|
3485
|
+
type: "http"
|
|
3486
|
+
}],
|
|
3487
|
+
url: "/api/external/v2/purchase_requests/imports",
|
|
3488
|
+
...options,
|
|
3489
|
+
headers: {
|
|
3490
|
+
"Content-Type": "application/json",
|
|
3491
|
+
...options.headers
|
|
3492
|
+
}
|
|
3493
|
+
});
|
|
3494
|
+
/**
|
|
3495
|
+
* Retrieve a purchase request
|
|
3496
|
+
*
|
|
3497
|
+
* Retrieve a purchase request
|
|
3498
|
+
*
|
|
3499
|
+
* > ℹ️
|
|
3500
|
+
* > This endpoint requires one of the following scopes: `purchase_requests:all`, `purchase_requests:readonly`
|
|
3501
|
+
*/
|
|
3502
|
+
const getPurchaseRequest = (options) => (options.client ?? client).get({
|
|
3503
|
+
security: [{
|
|
3504
|
+
scheme: "bearer",
|
|
3505
|
+
type: "http"
|
|
3506
|
+
}],
|
|
3507
|
+
url: "/api/external/v2/purchase_requests/{id}",
|
|
3508
|
+
...options
|
|
3509
|
+
});
|
|
3510
|
+
/**
|
|
3511
|
+
* List purchase requests
|
|
3512
|
+
*
|
|
3513
|
+
* List purchase requests
|
|
3514
|
+
*
|
|
3515
|
+
* > ℹ️
|
|
3516
|
+
* > This endpoint requires one of the following scopes: `purchase_requests:all`, `purchase_requests:readonly`
|
|
3517
|
+
*/
|
|
3518
|
+
const getPurchaseRequests = (options) => (options?.client ?? client).get({
|
|
3519
|
+
security: [{
|
|
3520
|
+
scheme: "bearer",
|
|
3521
|
+
type: "http"
|
|
3522
|
+
}],
|
|
3523
|
+
url: "/api/external/v2/purchase_requests",
|
|
3524
|
+
...options
|
|
3525
|
+
});
|
|
3526
|
+
/**
|
|
3527
|
+
* List bank establishments
|
|
3528
|
+
*
|
|
3529
|
+
* List bank establishments
|
|
3530
|
+
*
|
|
3531
|
+
* > ℹ️
|
|
3532
|
+
* > This endpoint requires one of the following scopes: `bank_establishments:readonly`
|
|
3533
|
+
*/
|
|
3534
|
+
const getBankEstablishments = (options) => (options?.client ?? client).get({
|
|
3535
|
+
security: [{
|
|
3536
|
+
scheme: "bearer",
|
|
3537
|
+
type: "http"
|
|
3538
|
+
}],
|
|
3539
|
+
url: "/api/external/v2/bank_establishments",
|
|
3540
|
+
...options
|
|
3541
|
+
});
|
|
3542
|
+
|
|
3543
|
+
//#endregion
|
|
3544
|
+
//#region src/generated/types.gen.ts
|
|
3545
|
+
const BadRequestCodeEnum = {
|
|
3546
|
+
INVALID_DATE_FORMAT: "InvalidDateFormat",
|
|
3547
|
+
INVALID_DATE_TIME_FORMAT: "InvalidDateTimeFormat",
|
|
3548
|
+
INVALID_EMAIL_FORMAT: "InvalidEmailFormat",
|
|
3549
|
+
INVALID_PATTERN: "InvalidPattern",
|
|
3550
|
+
INVALID_UUID_FORMAT: "InvalidUUIDFormat",
|
|
3551
|
+
LESS_THAN_EXCLUSIVE_MINIMUM: "LessThanExclusiveMinimum",
|
|
3552
|
+
LESS_THAN_MINIMUM: "LessThanMinimum",
|
|
3553
|
+
LESS_THAN_MIN_ITEMS: "LessThanMinItems",
|
|
3554
|
+
LESS_THAN_MIN_LENGTH: "LessThanMinLength",
|
|
3555
|
+
MORE_THAN_EXCLUSIVE_MAXIMUM: "MoreThanExclusiveMaximum",
|
|
3556
|
+
MORE_THAN_MAXIMUM: "MoreThanMaximum",
|
|
3557
|
+
MORE_THAN_MAX_ITEMS: "MoreThanMaxItems",
|
|
3558
|
+
MORE_THAN_MAX_LENGTH: "MoreThanMaxLength",
|
|
3559
|
+
NOT_A_MULTIPART_FILE: "NotAMultipartFile",
|
|
3560
|
+
NOT_ANY_OF: "NotAnyOf",
|
|
3561
|
+
NOT_ENUM_INCLUDE: "NotEnumInclude",
|
|
3562
|
+
NOT_EXIST_CONTENT_TYPE_DEFINITION: "NotExistContentTypeDefinition",
|
|
3563
|
+
NOT_EXIST_DISCRIMINATOR_MAPPED_SCHEMA: "NotExistDiscriminatorMappedSchema",
|
|
3564
|
+
NOT_EXIST_DISCRIMINATOR_PROPERTY_NAME: "NotExistDiscriminatorPropertyName",
|
|
3565
|
+
NOT_EXIST_PROPERTY_DEFINITION: "NotExistPropertyDefinition",
|
|
3566
|
+
NOT_EXIST_REQUIRED_KEY: "NotExistRequiredKey",
|
|
3567
|
+
NOT_EXIST_STATUS_CODE_DEFINITION: "NotExistStatusCodeDefinition",
|
|
3568
|
+
NOT_NULL_ERROR: "NotNullError",
|
|
3569
|
+
NOT_ONE_OF: "NotOneOf",
|
|
3570
|
+
VALIDATE_ERROR: "ValidateError"
|
|
3571
|
+
};
|
|
3572
|
+
const VatRateWithAnyAndMixed = {
|
|
3573
|
+
FR_1_05: "FR_1_05",
|
|
3574
|
+
FR_1_75: "FR_1_75",
|
|
3575
|
+
FR_09: "FR_09",
|
|
3576
|
+
FR_21: "FR_21",
|
|
3577
|
+
FR_40: "FR_40",
|
|
3578
|
+
FR_50: "FR_50",
|
|
3579
|
+
FR_55: "FR_55",
|
|
3580
|
+
FR_60: "FR_60",
|
|
3581
|
+
FR_65: "FR_65",
|
|
3582
|
+
FR_85: "FR_85",
|
|
3583
|
+
FR_92: "FR_92",
|
|
3584
|
+
FR_100: "FR_100",
|
|
3585
|
+
FR_130: "FR_130",
|
|
3586
|
+
FR_15_385: "FR_15_385",
|
|
3587
|
+
FR_160: "FR_160",
|
|
3588
|
+
FR_196: "FR_196",
|
|
3589
|
+
FR_200: "FR_200",
|
|
3590
|
+
AD_10: "AD_10",
|
|
3591
|
+
AD_45: "AD_45",
|
|
3592
|
+
AD_95: "AD_95",
|
|
3593
|
+
AT_100: "AT_100",
|
|
3594
|
+
AT_130: "AT_130",
|
|
3595
|
+
AT_200: "AT_200",
|
|
3596
|
+
BE_60: "BE_60",
|
|
3597
|
+
BE_120: "BE_120",
|
|
3598
|
+
BE_210: "BE_210",
|
|
3599
|
+
BG_90: "BG_90",
|
|
3600
|
+
BG_200: "BG_200",
|
|
3601
|
+
CH_25: "CH_25",
|
|
3602
|
+
CH_37: "CH_37",
|
|
3603
|
+
CH_77: "CH_77",
|
|
3604
|
+
CH_26: "CH_26",
|
|
3605
|
+
CH_38: "CH_38",
|
|
3606
|
+
CH_81: "CH_81",
|
|
3607
|
+
CY_30: "CY_30",
|
|
3608
|
+
CY_50: "CY_50",
|
|
3609
|
+
CY_90: "CY_90",
|
|
3610
|
+
CY_190: "CY_190",
|
|
3611
|
+
CZ_100: "CZ_100",
|
|
3612
|
+
CZ_120: "CZ_120",
|
|
3613
|
+
CZ_150: "CZ_150",
|
|
3614
|
+
CZ_210: "CZ_210",
|
|
3615
|
+
DE_70: "DE_70",
|
|
3616
|
+
DE_190: "DE_190",
|
|
3617
|
+
DK_250: "DK_250",
|
|
3618
|
+
EE_90: "EE_90",
|
|
3619
|
+
EE_200: "EE_200",
|
|
3620
|
+
EE_220: "EE_220",
|
|
3621
|
+
EE_240: "EE_240",
|
|
3622
|
+
ES_40: "ES_40",
|
|
3623
|
+
ES_100: "ES_100",
|
|
3624
|
+
ES_210: "ES_210",
|
|
3625
|
+
FI_100: "FI_100",
|
|
3626
|
+
FI_140: "FI_140",
|
|
3627
|
+
FI_240: "FI_240",
|
|
3628
|
+
FI_255: "FI_255",
|
|
3629
|
+
GB_50: "GB_50",
|
|
3630
|
+
GB_200: "GB_200",
|
|
3631
|
+
GR_60: "GR_60",
|
|
3632
|
+
GR_130: "GR_130",
|
|
3633
|
+
GR_240: "GR_240",
|
|
3634
|
+
HR_50: "HR_50",
|
|
3635
|
+
HR_130: "HR_130",
|
|
3636
|
+
HR_250: "HR_250",
|
|
3637
|
+
HU_50: "HU_50",
|
|
3638
|
+
HU_180: "HU_180",
|
|
3639
|
+
HU_270: "HU_270",
|
|
3640
|
+
IE_48: "IE_48",
|
|
3641
|
+
IE_90: "IE_90",
|
|
3642
|
+
IE_135: "IE_135",
|
|
3643
|
+
IE_210: "IE_210",
|
|
3644
|
+
IE_230: "IE_230",
|
|
3645
|
+
IT_40: "IT_40",
|
|
3646
|
+
IT_50: "IT_50",
|
|
3647
|
+
IT_100: "IT_100",
|
|
3648
|
+
IT_220: "IT_220",
|
|
3649
|
+
LT_50: "LT_50",
|
|
3650
|
+
LT_90: "LT_90",
|
|
3651
|
+
LT_210: "LT_210",
|
|
3652
|
+
LU_30: "LU_30",
|
|
3653
|
+
LU_70: "LU_70",
|
|
3654
|
+
LU_80: "LU_80",
|
|
3655
|
+
LU_120: "LU_120",
|
|
3656
|
+
LU_130: "LU_130",
|
|
3657
|
+
LU_140: "LU_140",
|
|
3658
|
+
LU_160: "LU_160",
|
|
3659
|
+
LU_170: "LU_170",
|
|
3660
|
+
LV_50: "LV_50",
|
|
3661
|
+
LV_120: "LV_120",
|
|
3662
|
+
LV_210: "LV_210",
|
|
3663
|
+
MC_09: "MC_09",
|
|
3664
|
+
MC_21: "MC_21",
|
|
3665
|
+
MC_55: "MC_55",
|
|
3666
|
+
MC_85: "MC_85",
|
|
3667
|
+
MC_100: "MC_100",
|
|
3668
|
+
MC_200: "MC_200",
|
|
3669
|
+
MT_50: "MT_50",
|
|
3670
|
+
MT_70: "MT_70",
|
|
3671
|
+
MT_180: "MT_180",
|
|
3672
|
+
MU_150: "MU_150",
|
|
3673
|
+
NL_90: "NL_90",
|
|
3674
|
+
NL_210: "NL_210",
|
|
3675
|
+
PL_50: "PL_50",
|
|
3676
|
+
PL_80: "PL_80",
|
|
3677
|
+
PL_230: "PL_230",
|
|
3678
|
+
PT_60: "PT_60",
|
|
3679
|
+
PT_130: "PT_130",
|
|
3680
|
+
PT_160: "PT_160",
|
|
3681
|
+
PT_230: "PT_230",
|
|
3682
|
+
RO_50: "RO_50",
|
|
3683
|
+
RO_90: "RO_90",
|
|
3684
|
+
RO_110: "RO_110",
|
|
3685
|
+
RO_190: "RO_190",
|
|
3686
|
+
RO_210: "RO_210",
|
|
3687
|
+
SE_60: "SE_60",
|
|
3688
|
+
SE_120: "SE_120",
|
|
3689
|
+
SE_250: "SE_250",
|
|
3690
|
+
SI_50: "SI_50",
|
|
3691
|
+
SI_95: "SI_95",
|
|
3692
|
+
SI_220: "SI_220",
|
|
3693
|
+
SK_100: "SK_100",
|
|
3694
|
+
SK_190: "SK_190",
|
|
3695
|
+
SK_200: "SK_200",
|
|
3696
|
+
SK_230: "SK_230",
|
|
3697
|
+
NO_120: "NO_120",
|
|
3698
|
+
NO_150: "NO_150",
|
|
3699
|
+
NO_250: "NO_250",
|
|
3700
|
+
EXEMPT: "exempt",
|
|
3701
|
+
INTRACOM_21: "intracom_21",
|
|
3702
|
+
INTRACOM_55: "intracom_55",
|
|
3703
|
+
INTRACOM_85: "intracom_85",
|
|
3704
|
+
INTRACOM_100: "intracom_100",
|
|
3705
|
+
CROSSBORDER: "crossborder",
|
|
3706
|
+
EXTRACOM: "extracom",
|
|
3707
|
+
FR_85_CONSTRUCTION: "FR_85_construction",
|
|
3708
|
+
FR_100_CONSTRUCTION: "FR_100_construction",
|
|
3709
|
+
FR_200_CONSTRUCTION: "FR_200_construction",
|
|
3710
|
+
ANY: "any",
|
|
3711
|
+
MIXED: "mixed"
|
|
3712
|
+
};
|
|
3713
|
+
const AuthorizedCountryAlpha2WithAny = {
|
|
3714
|
+
AT: "AT",
|
|
3715
|
+
BE: "BE",
|
|
3716
|
+
BG: "BG",
|
|
3717
|
+
CY: "CY",
|
|
3718
|
+
CZ: "CZ",
|
|
3719
|
+
DE: "DE",
|
|
3720
|
+
DK: "DK",
|
|
3721
|
+
EE: "EE",
|
|
3722
|
+
ES: "ES",
|
|
3723
|
+
FI: "FI",
|
|
3724
|
+
FR: "FR",
|
|
3725
|
+
GR: "GR",
|
|
3726
|
+
HR: "HR",
|
|
3727
|
+
HU: "HU",
|
|
3728
|
+
IE: "IE",
|
|
3729
|
+
IT: "IT",
|
|
3730
|
+
LT: "LT",
|
|
3731
|
+
LU: "LU",
|
|
3732
|
+
LV: "LV",
|
|
3733
|
+
MT: "MT",
|
|
3734
|
+
NL: "NL",
|
|
3735
|
+
PL: "PL",
|
|
3736
|
+
PT: "PT",
|
|
3737
|
+
RO: "RO",
|
|
3738
|
+
SE: "SE",
|
|
3739
|
+
SI: "SI",
|
|
3740
|
+
SK: "SK",
|
|
3741
|
+
GB: "GB",
|
|
3742
|
+
MC: "MC",
|
|
3743
|
+
CH: "CH",
|
|
3744
|
+
AD: "AD",
|
|
3745
|
+
MU: "MU",
|
|
3746
|
+
NO: "NO",
|
|
3747
|
+
ANY: "any"
|
|
3748
|
+
};
|
|
3749
|
+
const Currency = {
|
|
3750
|
+
EUR: "EUR",
|
|
3751
|
+
USD: "USD",
|
|
3752
|
+
GBP: "GBP",
|
|
3753
|
+
AED: "AED",
|
|
3754
|
+
AFN: "AFN",
|
|
3755
|
+
ALL: "ALL",
|
|
3756
|
+
AMD: "AMD",
|
|
3757
|
+
ANG: "ANG",
|
|
3758
|
+
AOA: "AOA",
|
|
3759
|
+
ARS: "ARS",
|
|
3760
|
+
AUD: "AUD",
|
|
3761
|
+
AWG: "AWG",
|
|
3762
|
+
AZN: "AZN",
|
|
3763
|
+
BAM: "BAM",
|
|
3764
|
+
BBD: "BBD",
|
|
3765
|
+
BDT: "BDT",
|
|
3766
|
+
BGN: "BGN",
|
|
3767
|
+
BHD: "BHD",
|
|
3768
|
+
BIF: "BIF",
|
|
3769
|
+
BMD: "BMD",
|
|
3770
|
+
BND: "BND",
|
|
3771
|
+
BOB: "BOB",
|
|
3772
|
+
BRL: "BRL",
|
|
3773
|
+
BSD: "BSD",
|
|
3774
|
+
BTN: "BTN",
|
|
3775
|
+
BWP: "BWP",
|
|
3776
|
+
BYN: "BYN",
|
|
3777
|
+
BYR: "BYR",
|
|
3778
|
+
BZD: "BZD",
|
|
3779
|
+
CAD: "CAD",
|
|
3780
|
+
CDF: "CDF",
|
|
3781
|
+
CHE: "CHE",
|
|
3782
|
+
CHF: "CHF",
|
|
3783
|
+
CLF: "CLF",
|
|
3784
|
+
CLP: "CLP",
|
|
3785
|
+
CNY: "CNY",
|
|
3786
|
+
COP: "COP",
|
|
3787
|
+
CRC: "CRC",
|
|
3788
|
+
CUC: "CUC",
|
|
3789
|
+
CUP: "CUP",
|
|
3790
|
+
CVE: "CVE",
|
|
3791
|
+
CZK: "CZK",
|
|
3792
|
+
DJF: "DJF",
|
|
3793
|
+
DKK: "DKK",
|
|
3794
|
+
DOP: "DOP",
|
|
3795
|
+
DZD: "DZD",
|
|
3796
|
+
EGP: "EGP",
|
|
3797
|
+
ERN: "ERN",
|
|
3798
|
+
ETB: "ETB",
|
|
3799
|
+
FJD: "FJD",
|
|
3800
|
+
FKP: "FKP",
|
|
3801
|
+
GEL: "GEL",
|
|
3802
|
+
GGP: "GGP",
|
|
3803
|
+
GHS: "GHS",
|
|
3804
|
+
GIP: "GIP",
|
|
3805
|
+
GMD: "GMD",
|
|
3806
|
+
GNF: "GNF",
|
|
3807
|
+
GTQ: "GTQ",
|
|
3808
|
+
GYD: "GYD",
|
|
3809
|
+
HKD: "HKD",
|
|
3810
|
+
HNL: "HNL",
|
|
3811
|
+
HRK: "HRK",
|
|
3812
|
+
HTG: "HTG",
|
|
3813
|
+
HUF: "HUF",
|
|
3814
|
+
IDR: "IDR",
|
|
3815
|
+
ILS: "ILS",
|
|
3816
|
+
IMP: "IMP",
|
|
3817
|
+
INR: "INR",
|
|
3818
|
+
IQD: "IQD",
|
|
3819
|
+
IRR: "IRR",
|
|
3820
|
+
ISK: "ISK",
|
|
3821
|
+
JEP: "JEP",
|
|
3822
|
+
JMD: "JMD",
|
|
3823
|
+
JOD: "JOD",
|
|
3824
|
+
JPY: "JPY",
|
|
3825
|
+
KES: "KES",
|
|
3826
|
+
KGS: "KGS",
|
|
3827
|
+
KHR: "KHR",
|
|
3828
|
+
KMF: "KMF",
|
|
3829
|
+
KPW: "KPW",
|
|
3830
|
+
KRW: "KRW",
|
|
3831
|
+
KWD: "KWD",
|
|
3832
|
+
KYD: "KYD",
|
|
3833
|
+
KZT: "KZT",
|
|
3834
|
+
LAK: "LAK",
|
|
3835
|
+
LBP: "LBP",
|
|
3836
|
+
LKR: "LKR",
|
|
3837
|
+
LRD: "LRD",
|
|
3838
|
+
LSL: "LSL",
|
|
3839
|
+
LTL: "LTL",
|
|
3840
|
+
LVL: "LVL",
|
|
3841
|
+
LYD: "LYD",
|
|
3842
|
+
MAD: "MAD",
|
|
3843
|
+
MDL: "MDL",
|
|
3844
|
+
MGA: "MGA",
|
|
3845
|
+
MKD: "MKD",
|
|
3846
|
+
MMK: "MMK",
|
|
3847
|
+
MNT: "MNT",
|
|
3848
|
+
MOP: "MOP",
|
|
3849
|
+
MRO: "MRO",
|
|
3850
|
+
MRU: "MRU",
|
|
3851
|
+
MUR: "MUR",
|
|
3852
|
+
MVR: "MVR",
|
|
3853
|
+
MWK: "MWK",
|
|
3854
|
+
MXN: "MXN",
|
|
3855
|
+
MYR: "MYR",
|
|
3856
|
+
MZN: "MZN",
|
|
3857
|
+
NAD: "NAD",
|
|
3858
|
+
NGN: "NGN",
|
|
3859
|
+
NIO: "NIO",
|
|
3860
|
+
NOK: "NOK",
|
|
3861
|
+
NPR: "NPR",
|
|
3862
|
+
NZD: "NZD",
|
|
3863
|
+
OMR: "OMR",
|
|
3864
|
+
PAB: "PAB",
|
|
3865
|
+
PEN: "PEN",
|
|
3866
|
+
PGK: "PGK",
|
|
3867
|
+
PHP: "PHP",
|
|
3868
|
+
PKR: "PKR",
|
|
3869
|
+
PLN: "PLN",
|
|
3870
|
+
PYG: "PYG",
|
|
3871
|
+
QAR: "QAR",
|
|
3872
|
+
RON: "RON",
|
|
3873
|
+
RSD: "RSD",
|
|
3874
|
+
RUB: "RUB",
|
|
3875
|
+
RWF: "RWF",
|
|
3876
|
+
SAR: "SAR",
|
|
3877
|
+
SBD: "SBD",
|
|
3878
|
+
SCR: "SCR",
|
|
3879
|
+
SDG: "SDG",
|
|
3880
|
+
SEK: "SEK",
|
|
3881
|
+
SGD: "SGD",
|
|
3882
|
+
SHP: "SHP",
|
|
3883
|
+
SLL: "SLL",
|
|
3884
|
+
SLE: "SLE",
|
|
3885
|
+
SOS: "SOS",
|
|
3886
|
+
SRD: "SRD",
|
|
3887
|
+
STD: "STD",
|
|
3888
|
+
SVC: "SVC",
|
|
3889
|
+
SYP: "SYP",
|
|
3890
|
+
SZL: "SZL",
|
|
3891
|
+
THB: "THB",
|
|
3892
|
+
TJS: "TJS",
|
|
3893
|
+
TMT: "TMT",
|
|
3894
|
+
TND: "TND",
|
|
3895
|
+
TOP: "TOP",
|
|
3896
|
+
TRY: "TRY",
|
|
3897
|
+
TTD: "TTD",
|
|
3898
|
+
TWD: "TWD",
|
|
3899
|
+
TZS: "TZS",
|
|
3900
|
+
UAH: "UAH",
|
|
3901
|
+
UGX: "UGX",
|
|
3902
|
+
UYU: "UYU",
|
|
3903
|
+
UZS: "UZS",
|
|
3904
|
+
VEF: "VEF",
|
|
3905
|
+
VND: "VND",
|
|
3906
|
+
VUV: "VUV",
|
|
3907
|
+
WST: "WST",
|
|
3908
|
+
XAF: "XAF",
|
|
3909
|
+
XCD: "XCD",
|
|
3910
|
+
XDR: "XDR",
|
|
3911
|
+
XOF: "XOF",
|
|
3912
|
+
XPF: "XPF",
|
|
3913
|
+
YER: "YER",
|
|
3914
|
+
ZAR: "ZAR",
|
|
3915
|
+
ZMK: "ZMK",
|
|
3916
|
+
ZMW: "ZMW",
|
|
3917
|
+
ZWL: "ZWL"
|
|
3918
|
+
};
|
|
3919
|
+
/**
|
|
3920
|
+
* - `none`: the API won't let you create an unbalanced lettering
|
|
3921
|
+
* and will respond with an error.
|
|
3922
|
+
* - `partial`: a potentially unbalanced lettering will be created.
|
|
3923
|
+
*
|
|
3924
|
+
*/
|
|
3925
|
+
const UnbalancedLetteringStrategy = {
|
|
3926
|
+
NONE: "none",
|
|
3927
|
+
PARTIAL: "partial"
|
|
3928
|
+
};
|
|
3929
|
+
const SchemasCurrency = {
|
|
3930
|
+
EUR: "EUR",
|
|
3931
|
+
USD: "USD",
|
|
3932
|
+
GBP: "GBP",
|
|
3933
|
+
AED: "AED",
|
|
3934
|
+
AFN: "AFN",
|
|
3935
|
+
ALL: "ALL",
|
|
3936
|
+
AMD: "AMD",
|
|
3937
|
+
ANG: "ANG",
|
|
3938
|
+
AOA: "AOA",
|
|
3939
|
+
ARS: "ARS",
|
|
3940
|
+
AUD: "AUD",
|
|
3941
|
+
AWG: "AWG",
|
|
3942
|
+
AZN: "AZN",
|
|
3943
|
+
BAM: "BAM",
|
|
3944
|
+
BBD: "BBD",
|
|
3945
|
+
BDT: "BDT",
|
|
3946
|
+
BGN: "BGN",
|
|
3947
|
+
BHD: "BHD",
|
|
3948
|
+
BIF: "BIF",
|
|
3949
|
+
BMD: "BMD",
|
|
3950
|
+
BND: "BND",
|
|
3951
|
+
BOB: "BOB",
|
|
3952
|
+
BRL: "BRL",
|
|
3953
|
+
BSD: "BSD",
|
|
3954
|
+
BTN: "BTN",
|
|
3955
|
+
BWP: "BWP",
|
|
3956
|
+
BYN: "BYN",
|
|
3957
|
+
BYR: "BYR",
|
|
3958
|
+
BZD: "BZD",
|
|
3959
|
+
CAD: "CAD",
|
|
3960
|
+
CDF: "CDF",
|
|
3961
|
+
CHF: "CHF",
|
|
3962
|
+
CLF: "CLF",
|
|
3963
|
+
CLP: "CLP",
|
|
3964
|
+
CNY: "CNY",
|
|
3965
|
+
COP: "COP",
|
|
3966
|
+
CRC: "CRC",
|
|
3967
|
+
CUC: "CUC",
|
|
3968
|
+
CUP: "CUP",
|
|
3969
|
+
CVE: "CVE",
|
|
3970
|
+
CZK: "CZK",
|
|
3971
|
+
DJF: "DJF",
|
|
3972
|
+
DKK: "DKK",
|
|
3973
|
+
DOP: "DOP",
|
|
3974
|
+
DZD: "DZD",
|
|
3975
|
+
EGP: "EGP",
|
|
3976
|
+
ERN: "ERN",
|
|
3977
|
+
ETB: "ETB",
|
|
3978
|
+
FJD: "FJD",
|
|
3979
|
+
FKP: "FKP",
|
|
3980
|
+
GEL: "GEL",
|
|
3981
|
+
GGP: "GGP",
|
|
3982
|
+
GHS: "GHS",
|
|
3983
|
+
GIP: "GIP",
|
|
3984
|
+
GMD: "GMD",
|
|
3985
|
+
GNF: "GNF",
|
|
3986
|
+
GTQ: "GTQ",
|
|
3987
|
+
GYD: "GYD",
|
|
3988
|
+
HKD: "HKD",
|
|
3989
|
+
HNL: "HNL",
|
|
3990
|
+
HRK: "HRK",
|
|
3991
|
+
HTG: "HTG",
|
|
3992
|
+
HUF: "HUF",
|
|
3993
|
+
IDR: "IDR",
|
|
3994
|
+
ILS: "ILS",
|
|
3995
|
+
IMP: "IMP",
|
|
3996
|
+
INR: "INR",
|
|
3997
|
+
IQD: "IQD",
|
|
3998
|
+
IRR: "IRR",
|
|
3999
|
+
ISK: "ISK",
|
|
4000
|
+
JEP: "JEP",
|
|
4001
|
+
JMD: "JMD",
|
|
4002
|
+
JOD: "JOD",
|
|
4003
|
+
JPY: "JPY",
|
|
4004
|
+
KES: "KES",
|
|
4005
|
+
KGS: "KGS",
|
|
4006
|
+
KHR: "KHR",
|
|
4007
|
+
KMF: "KMF",
|
|
4008
|
+
KPW: "KPW",
|
|
4009
|
+
KRW: "KRW",
|
|
4010
|
+
KWD: "KWD",
|
|
4011
|
+
KYD: "KYD",
|
|
4012
|
+
KZT: "KZT",
|
|
4013
|
+
LAK: "LAK",
|
|
4014
|
+
LBP: "LBP",
|
|
4015
|
+
LKR: "LKR",
|
|
4016
|
+
LRD: "LRD",
|
|
4017
|
+
LSL: "LSL",
|
|
4018
|
+
LTL: "LTL",
|
|
4019
|
+
LVL: "LVL",
|
|
4020
|
+
LYD: "LYD",
|
|
4021
|
+
MAD: "MAD",
|
|
4022
|
+
MDL: "MDL",
|
|
4023
|
+
MGA: "MGA",
|
|
4024
|
+
MKD: "MKD",
|
|
4025
|
+
MMK: "MMK",
|
|
4026
|
+
MNT: "MNT",
|
|
4027
|
+
MOP: "MOP",
|
|
4028
|
+
MRO: "MRO",
|
|
4029
|
+
MUR: "MUR",
|
|
4030
|
+
MVR: "MVR",
|
|
4031
|
+
MWK: "MWK",
|
|
4032
|
+
MXN: "MXN",
|
|
4033
|
+
MYR: "MYR",
|
|
4034
|
+
MZN: "MZN",
|
|
4035
|
+
NAD: "NAD",
|
|
4036
|
+
NGN: "NGN",
|
|
4037
|
+
NIO: "NIO",
|
|
4038
|
+
NOK: "NOK",
|
|
4039
|
+
NPR: "NPR",
|
|
4040
|
+
NZD: "NZD",
|
|
4041
|
+
OMR: "OMR",
|
|
4042
|
+
PAB: "PAB",
|
|
4043
|
+
PEN: "PEN",
|
|
4044
|
+
PGK: "PGK",
|
|
4045
|
+
PHP: "PHP",
|
|
4046
|
+
PKR: "PKR",
|
|
4047
|
+
PLN: "PLN",
|
|
4048
|
+
PYG: "PYG",
|
|
4049
|
+
QAR: "QAR",
|
|
4050
|
+
RON: "RON",
|
|
4051
|
+
RSD: "RSD",
|
|
4052
|
+
RUB: "RUB",
|
|
4053
|
+
RWF: "RWF",
|
|
4054
|
+
SAR: "SAR",
|
|
4055
|
+
SBD: "SBD",
|
|
4056
|
+
SCR: "SCR",
|
|
4057
|
+
SDG: "SDG",
|
|
4058
|
+
SEK: "SEK",
|
|
4059
|
+
SGD: "SGD",
|
|
4060
|
+
SHP: "SHP",
|
|
4061
|
+
SLL: "SLL",
|
|
4062
|
+
SOS: "SOS",
|
|
4063
|
+
SRD: "SRD",
|
|
4064
|
+
STD: "STD",
|
|
4065
|
+
SVC: "SVC",
|
|
4066
|
+
SYP: "SYP",
|
|
4067
|
+
SZL: "SZL",
|
|
4068
|
+
THB: "THB",
|
|
4069
|
+
TJS: "TJS",
|
|
4070
|
+
TMT: "TMT",
|
|
4071
|
+
TND: "TND",
|
|
4072
|
+
TOP: "TOP",
|
|
4073
|
+
TRY: "TRY",
|
|
4074
|
+
TTD: "TTD",
|
|
4075
|
+
TWD: "TWD",
|
|
4076
|
+
TZS: "TZS",
|
|
4077
|
+
UAH: "UAH",
|
|
4078
|
+
UGX: "UGX",
|
|
4079
|
+
UYU: "UYU",
|
|
4080
|
+
UZS: "UZS",
|
|
4081
|
+
VEF: "VEF",
|
|
4082
|
+
VND: "VND",
|
|
4083
|
+
VUV: "VUV",
|
|
4084
|
+
WST: "WST",
|
|
4085
|
+
XAF: "XAF",
|
|
4086
|
+
XCD: "XCD",
|
|
4087
|
+
XDR: "XDR",
|
|
4088
|
+
XOF: "XOF",
|
|
4089
|
+
XPF: "XPF",
|
|
4090
|
+
YER: "YER",
|
|
4091
|
+
ZAR: "ZAR",
|
|
4092
|
+
ZMK: "ZMK",
|
|
4093
|
+
ZMW: "ZMW",
|
|
4094
|
+
ZWL: "ZWL"
|
|
4095
|
+
};
|
|
4096
|
+
const TemplatesAvailablesLocales = {
|
|
4097
|
+
FR_FR: "fr_FR",
|
|
4098
|
+
EN_GB: "en_GB"
|
|
4099
|
+
};
|
|
4100
|
+
const InvoiceStatuses = {
|
|
4101
|
+
ARCHIVED: "archived",
|
|
4102
|
+
INCOMPLETE: "incomplete",
|
|
4103
|
+
CANCELLED: "cancelled",
|
|
4104
|
+
PAID: "paid",
|
|
4105
|
+
PARTIALLY_CANCELLED: "partially_cancelled",
|
|
4106
|
+
UPCOMING: "upcoming",
|
|
4107
|
+
LATE: "late",
|
|
4108
|
+
DRAFT: "draft",
|
|
4109
|
+
CREDIT_NOTE: "credit_note"
|
|
4110
|
+
};
|
|
4111
|
+
/**
|
|
4112
|
+
* Discount type.
|
|
4113
|
+
* - absolute if it is an amount
|
|
4114
|
+
* - relative if it is a percentage
|
|
4115
|
+
*
|
|
4116
|
+
*/
|
|
4117
|
+
const DiscountType = {
|
|
4118
|
+
ABSOLUTE: "absolute",
|
|
4119
|
+
RELATIVE: "relative"
|
|
4120
|
+
};
|
|
4121
|
+
/**
|
|
4122
|
+
* Product VAT rate. A 20% VAT in France is FR_200.
|
|
4123
|
+
*/
|
|
4124
|
+
const VatRate = {
|
|
4125
|
+
FR_1_05: "FR_1_05",
|
|
4126
|
+
FR_1_75: "FR_1_75",
|
|
4127
|
+
FR_09: "FR_09",
|
|
4128
|
+
FR_21: "FR_21",
|
|
4129
|
+
FR_40: "FR_40",
|
|
4130
|
+
FR_50: "FR_50",
|
|
4131
|
+
FR_55: "FR_55",
|
|
4132
|
+
FR_60: "FR_60",
|
|
4133
|
+
FR_65: "FR_65",
|
|
4134
|
+
FR_85: "FR_85",
|
|
4135
|
+
FR_92: "FR_92",
|
|
4136
|
+
FR_100: "FR_100",
|
|
4137
|
+
FR_130: "FR_130",
|
|
4138
|
+
FR_15_385: "FR_15_385",
|
|
4139
|
+
FR_160: "FR_160",
|
|
4140
|
+
FR_196: "FR_196",
|
|
4141
|
+
FR_200: "FR_200",
|
|
4142
|
+
AD_10: "AD_10",
|
|
4143
|
+
AD_45: "AD_45",
|
|
4144
|
+
AD_95: "AD_95",
|
|
4145
|
+
AT_100: "AT_100",
|
|
4146
|
+
AT_130: "AT_130",
|
|
4147
|
+
AT_200: "AT_200",
|
|
4148
|
+
BE_60: "BE_60",
|
|
4149
|
+
BE_120: "BE_120",
|
|
4150
|
+
BE_210: "BE_210",
|
|
4151
|
+
BG_90: "BG_90",
|
|
4152
|
+
BG_200: "BG_200",
|
|
4153
|
+
CH_25: "CH_25",
|
|
4154
|
+
CH_26: "CH_26",
|
|
4155
|
+
CH_37: "CH_37",
|
|
4156
|
+
CH_38: "CH_38",
|
|
4157
|
+
CH_77: "CH_77",
|
|
4158
|
+
CH_81: "CH_81",
|
|
4159
|
+
CY_30: "CY_30",
|
|
4160
|
+
CY_50: "CY_50",
|
|
4161
|
+
CY_90: "CY_90",
|
|
4162
|
+
CY_190: "CY_190",
|
|
4163
|
+
CZ_100: "CZ_100",
|
|
4164
|
+
CZ_120: "CZ_120",
|
|
4165
|
+
CZ_150: "CZ_150",
|
|
4166
|
+
CZ_210: "CZ_210",
|
|
4167
|
+
DE_70: "DE_70",
|
|
4168
|
+
DE_190: "DE_190",
|
|
4169
|
+
DK_250: "DK_250",
|
|
4170
|
+
EE_90: "EE_90",
|
|
4171
|
+
EE_200: "EE_200",
|
|
4172
|
+
EE_220: "EE_220",
|
|
4173
|
+
EE_240: "EE_240",
|
|
4174
|
+
ES_40: "ES_40",
|
|
4175
|
+
ES_100: "ES_100",
|
|
4176
|
+
ES_210: "ES_210",
|
|
4177
|
+
FI_100: "FI_100",
|
|
4178
|
+
FI_140: "FI_140",
|
|
4179
|
+
FI_240: "FI_240",
|
|
4180
|
+
FI_255: "FI_255",
|
|
4181
|
+
GB_50: "GB_50",
|
|
4182
|
+
GB_200: "GB_200",
|
|
4183
|
+
GR_60: "GR_60",
|
|
4184
|
+
GR_130: "GR_130",
|
|
4185
|
+
GR_240: "GR_240",
|
|
4186
|
+
HR_50: "HR_50",
|
|
4187
|
+
HR_130: "HR_130",
|
|
4188
|
+
HR_250: "HR_250",
|
|
4189
|
+
HU_50: "HU_50",
|
|
4190
|
+
HU_180: "HU_180",
|
|
4191
|
+
HU_270: "HU_270",
|
|
4192
|
+
IE_48: "IE_48",
|
|
4193
|
+
IE_90: "IE_90",
|
|
4194
|
+
IE_135: "IE_135",
|
|
4195
|
+
IE_210: "IE_210",
|
|
4196
|
+
IE_230: "IE_230",
|
|
4197
|
+
IT_40: "IT_40",
|
|
4198
|
+
IT_50: "IT_50",
|
|
4199
|
+
IT_100: "IT_100",
|
|
4200
|
+
IT_220: "IT_220",
|
|
4201
|
+
LT_50: "LT_50",
|
|
4202
|
+
LT_90: "LT_90",
|
|
4203
|
+
LT_210: "LT_210",
|
|
4204
|
+
LU_30: "LU_30",
|
|
4205
|
+
LU_70: "LU_70",
|
|
4206
|
+
LU_80: "LU_80",
|
|
4207
|
+
LU_120: "LU_120",
|
|
4208
|
+
LU_130: "LU_130",
|
|
4209
|
+
LU_140: "LU_140",
|
|
4210
|
+
LU_160: "LU_160",
|
|
4211
|
+
LU_170: "LU_170",
|
|
4212
|
+
LV_50: "LV_50",
|
|
4213
|
+
LV_120: "LV_120",
|
|
4214
|
+
LV_210: "LV_210",
|
|
4215
|
+
MC_09: "MC_09",
|
|
4216
|
+
MC_21: "MC_21",
|
|
4217
|
+
MC_55: "MC_55",
|
|
4218
|
+
MC_85: "MC_85",
|
|
4219
|
+
MC_100: "MC_100",
|
|
4220
|
+
MC_200: "MC_200",
|
|
4221
|
+
MT_50: "MT_50",
|
|
4222
|
+
MT_70: "MT_70",
|
|
4223
|
+
MT_180: "MT_180",
|
|
4224
|
+
MU_150: "MU_150",
|
|
4225
|
+
NL_90: "NL_90",
|
|
4226
|
+
NL_210: "NL_210",
|
|
4227
|
+
PL_50: "PL_50",
|
|
4228
|
+
PL_80: "PL_80",
|
|
4229
|
+
PL_230: "PL_230",
|
|
4230
|
+
PT_60: "PT_60",
|
|
4231
|
+
PT_130: "PT_130",
|
|
4232
|
+
PT_160: "PT_160",
|
|
4233
|
+
PT_230: "PT_230",
|
|
4234
|
+
RO_50: "RO_50",
|
|
4235
|
+
RO_90: "RO_90",
|
|
4236
|
+
RO_110: "RO_110",
|
|
4237
|
+
RO_190: "RO_190",
|
|
4238
|
+
RO_210: "RO_210",
|
|
4239
|
+
SE_60: "SE_60",
|
|
4240
|
+
SE_120: "SE_120",
|
|
4241
|
+
SE_250: "SE_250",
|
|
4242
|
+
SI_50: "SI_50",
|
|
4243
|
+
SI_95: "SI_95",
|
|
4244
|
+
SI_220: "SI_220",
|
|
4245
|
+
SK_100: "SK_100",
|
|
4246
|
+
SK_190: "SK_190",
|
|
4247
|
+
SK_200: "SK_200",
|
|
4248
|
+
SK_230: "SK_230",
|
|
4249
|
+
NO_120: "NO_120",
|
|
4250
|
+
NO_150: "NO_150",
|
|
4251
|
+
NO_250: "NO_250",
|
|
4252
|
+
EXEMPT: "exempt",
|
|
4253
|
+
EXTRACOM: "extracom",
|
|
4254
|
+
INTRACOM_21: "intracom_21",
|
|
4255
|
+
INTRACOM_55: "intracom_55",
|
|
4256
|
+
INTRACOM_85: "intracom_85",
|
|
4257
|
+
INTRACOM_100: "intracom_100",
|
|
4258
|
+
CROSSBORDER: "crossborder",
|
|
4259
|
+
FR_85_CONSTRUCTION: "FR_85_construction",
|
|
4260
|
+
FR_100_CONSTRUCTION: "FR_100_construction",
|
|
4261
|
+
FR_200_CONSTRUCTION: "FR_200_construction",
|
|
4262
|
+
MIXED: "mixed"
|
|
4263
|
+
};
|
|
4264
|
+
const BillingSubscriptionStatus = {
|
|
4265
|
+
DRAFT: "draft",
|
|
4266
|
+
STOPPED: "stopped",
|
|
4267
|
+
FINISHED: "finished",
|
|
4268
|
+
PENDING: "pending",
|
|
4269
|
+
NOT_STARTED: "not_started",
|
|
4270
|
+
IN_PROGRESS: "in_progress"
|
|
4271
|
+
};
|
|
4272
|
+
/**
|
|
4273
|
+
* - `awaiting_validation`: generated invoices will be in draft
|
|
4274
|
+
* - `finalized`: generated invoices will be finalized
|
|
4275
|
+
* - `email`: generated invoices will be finalized and sent by email to the recipients configured on the subscription
|
|
4276
|
+
*
|
|
4277
|
+
*/
|
|
4278
|
+
const BillingSubscriptionMode = {
|
|
4279
|
+
AWAITING_VALIDATION: "awaiting_validation",
|
|
4280
|
+
FINALIZED: "finalized",
|
|
4281
|
+
EMAIL: "email"
|
|
4282
|
+
};
|
|
4283
|
+
const BillingSubscriptionPaymentConditions = {
|
|
4284
|
+
UPON_RECEIPT: "upon_receipt",
|
|
4285
|
+
"7_DAYS": "7_days",
|
|
4286
|
+
"15_DAYS": "15_days",
|
|
4287
|
+
"30_DAYS": "30_days",
|
|
4288
|
+
"30_DAYS_END_OF_MONTH": "30_days_end_of_month",
|
|
4289
|
+
"45_DAYS": "45_days",
|
|
4290
|
+
"45_DAYS_END_OF_MONTH": "45_days_end_of_month",
|
|
4291
|
+
"60_DAYS": "60_days"
|
|
4292
|
+
};
|
|
4293
|
+
const Null = { NULL: null };
|
|
4294
|
+
/**
|
|
4295
|
+
* Payment method
|
|
4296
|
+
* offline means the subscription is not linked to a payment method
|
|
4297
|
+
* gocardless_direct-debit means at each new occurrence the client will be automatically debited thanks to GoCardless. To do so, you need a GoCardless account properly configured.
|
|
4298
|
+
*
|
|
4299
|
+
*/
|
|
4300
|
+
const BillingSubscriptionPaymentMethod = {
|
|
4301
|
+
OFFLINE: "offline",
|
|
4302
|
+
GOCARDLESS_DIRECT_DEBIT: "gocardless_direct_debit"
|
|
4303
|
+
};
|
|
4304
|
+
const BillingSubscriptionOcurrenceRuleType = {
|
|
4305
|
+
WEEKLY: "weekly",
|
|
4306
|
+
MONTHLY: "monthly",
|
|
4307
|
+
YEARLY: "yearly"
|
|
4308
|
+
};
|
|
4309
|
+
/**
|
|
4310
|
+
* The state of the export
|
|
4311
|
+
*/
|
|
4312
|
+
const ExportStatus = {
|
|
4313
|
+
PENDING: "pending",
|
|
4314
|
+
READY: "ready",
|
|
4315
|
+
ERROR: "error"
|
|
4316
|
+
};
|
|
4317
|
+
/**
|
|
4318
|
+
* Note that the `custom` option is only used on Pennylane's web app to avoid pre-filling the deadline when creating an invoice. On the API it has no effect and you will still have to provide a deadline when creating an invoice.
|
|
4319
|
+
*/
|
|
4320
|
+
const PaymentConditions = {
|
|
4321
|
+
UPON_RECEIPT: "upon_receipt",
|
|
4322
|
+
CUSTOM: "custom",
|
|
4323
|
+
"7_DAYS": "7_days",
|
|
4324
|
+
"15_DAYS": "15_days",
|
|
4325
|
+
"30_DAYS": "30_days",
|
|
4326
|
+
"30_DAYS_END_OF_MONTH": "30_days_end_of_month",
|
|
4327
|
+
"45_DAYS": "45_days",
|
|
4328
|
+
"45_DAYS_END_OF_MONTH": "45_days_end_of_month",
|
|
4329
|
+
"60_DAYS": "60_days"
|
|
4330
|
+
};
|
|
4331
|
+
/**
|
|
4332
|
+
* The language in which the customer will receive invoices. Default is `fr_FR`
|
|
4333
|
+
*/
|
|
4334
|
+
const CustomerBillingLanguage = {
|
|
4335
|
+
FR_FR: "fr_FR",
|
|
4336
|
+
EN_GB: "en_GB",
|
|
4337
|
+
DE_DE: "de_DE"
|
|
4338
|
+
};
|
|
4339
|
+
const SupplierPaymentMethod = {
|
|
4340
|
+
AUTOMATIC_TRANSFER: "automatic_transfer",
|
|
4341
|
+
MANUAL_TRANSFER: "manual_transfer",
|
|
4342
|
+
AUTOMATIC_DEBITING: "automatic_debiting",
|
|
4343
|
+
BILL_OF_EXCHANGE: "bill_of_exchange",
|
|
4344
|
+
CHECK: "check",
|
|
4345
|
+
CASH: "cash",
|
|
4346
|
+
CARD: "card"
|
|
4347
|
+
};
|
|
4348
|
+
const SupplierDueDateRule = {
|
|
4349
|
+
DAYS: "days",
|
|
4350
|
+
DAYS_OR_END_OF_MONTH: "days_or_end_of_month"
|
|
4351
|
+
};
|
|
4352
|
+
const PaymentStatus = {
|
|
4353
|
+
INITIATED: "initiated",
|
|
4354
|
+
PENDING: "pending",
|
|
4355
|
+
EMITTED: "emitted",
|
|
4356
|
+
FOUND: "found",
|
|
4357
|
+
NOT_FOUND: "not_found",
|
|
4358
|
+
ABORTED: "aborted",
|
|
4359
|
+
ERROR: "error",
|
|
4360
|
+
REFUNDED: "refunded",
|
|
4361
|
+
PREPARED: "prepared",
|
|
4362
|
+
PENDING_CUSTOMER_APPROVAL: "pending_customer_approval",
|
|
4363
|
+
PENDING_SUBMISSION: "pending_submission",
|
|
4364
|
+
SUBMITTED: "submitted",
|
|
4365
|
+
CONFIRMED: "confirmed",
|
|
4366
|
+
PAID_OUT: "paid_out",
|
|
4367
|
+
CANCELLED: "cancelled",
|
|
4368
|
+
CUSTOMER_APPROVAL_DENIED: "customer_approval_denied",
|
|
4369
|
+
FAILED: "failed",
|
|
4370
|
+
CHARGED_BACK: "charged_back",
|
|
4371
|
+
RESUBMISSION_REQUESTED: "resubmission_requested"
|
|
4372
|
+
};
|
|
4373
|
+
/**
|
|
4374
|
+
* The accounting state of the invoice.
|
|
4375
|
+
* - `draft`: The invoice is not yet sent to the accountant.
|
|
4376
|
+
* - `archived`: The invoice has been archived.
|
|
4377
|
+
* - `entry`: The invoice is incomplete. Some information is missing on the invoice and needs to be completed by SME.
|
|
4378
|
+
* - `validation_needed`: The invoice is sent to the accountant and needs validation.
|
|
4379
|
+
* - `complete`: The invoice has been validated by the accountant.
|
|
4380
|
+
*
|
|
4381
|
+
*/
|
|
4382
|
+
const InvoiceAccountantsStatus = {
|
|
4383
|
+
DRAFT: "draft",
|
|
4384
|
+
ARCHIVED: "archived",
|
|
4385
|
+
ENTRY: "entry",
|
|
4386
|
+
VALIDATION_NEEDED: "validation_needed",
|
|
4387
|
+
COMPLETE: "complete"
|
|
4388
|
+
};
|
|
4389
|
+
const InvoicePaymentStatus = {
|
|
4390
|
+
TO_BE_PROCESSED: "to_be_processed",
|
|
4391
|
+
TO_BE_PAID: "to_be_paid",
|
|
4392
|
+
PARTIALLY_PAID: "partially_paid",
|
|
4393
|
+
PAYMENT_ERROR: "payment_error",
|
|
4394
|
+
PAYMENT_SCHEDULED: "payment_scheduled",
|
|
4395
|
+
PAYMENT_IN_PROGRESS: "payment_in_progress",
|
|
4396
|
+
PAYMENT_EMITTED: "payment_emitted",
|
|
4397
|
+
PAYMENT_FOUND: "payment_found",
|
|
4398
|
+
PAID_OFFLINE: "paid_offline",
|
|
4399
|
+
FULLY_PAID: "fully_paid"
|
|
4400
|
+
};
|
|
4401
|
+
/**
|
|
4402
|
+
* Only applicable for _treasury_ categories
|
|
4403
|
+
*/
|
|
4404
|
+
const CategoryDirection = {
|
|
4405
|
+
CASH_IN: "cash_in",
|
|
4406
|
+
CASH_OUT: "cash_out"
|
|
4407
|
+
};
|
|
4408
|
+
const Null2 = { NULL: null };
|
|
4409
|
+
const AccountType = {
|
|
4410
|
+
CARD: "card",
|
|
4411
|
+
SAVINGS: "savings",
|
|
4412
|
+
SHARES: "shares",
|
|
4413
|
+
LOAN: "loan",
|
|
4414
|
+
LIFE_INSURANCE: "life_insurance",
|
|
4415
|
+
OTHER: "other",
|
|
4416
|
+
CHECKING: "checking"
|
|
4417
|
+
};
|
|
4418
|
+
/**
|
|
4419
|
+
* - accepted: quote has been accepted
|
|
4420
|
+
* - denied: quote has been denied
|
|
4421
|
+
* - expired: quote has expired
|
|
4422
|
+
* - invoiced: quote has been invoiced
|
|
4423
|
+
* - pending: quote to be denied or accepted
|
|
4424
|
+
*
|
|
4425
|
+
*/
|
|
4426
|
+
const QuoteStatus = {
|
|
4427
|
+
PENDING: "pending",
|
|
4428
|
+
ACCEPTED: "accepted",
|
|
4429
|
+
DENIED: "denied",
|
|
4430
|
+
INVOICED: "invoiced",
|
|
4431
|
+
EXPIRED: "expired"
|
|
4432
|
+
};
|
|
4433
|
+
const CommercialDocumentType = {
|
|
4434
|
+
PROFORMA: "proforma",
|
|
4435
|
+
SHIPPING_ORDER: "shipping_order",
|
|
4436
|
+
PURCHASING_ORDER: "purchasing_order"
|
|
4437
|
+
};
|
|
4438
|
+
/**
|
|
4439
|
+
* SEPA mandate sequence type that defines the payment process.
|
|
4440
|
+
* - `FRST`: First payment in a series of recurring payments
|
|
4441
|
+
* - `OOFF`: One-off payment
|
|
4442
|
+
* - `RCUR`: Recurring payment that is not the first payment
|
|
4443
|
+
* - `FNAL`: Final payment in a series of recurring payments
|
|
4444
|
+
*
|
|
4445
|
+
*/
|
|
4446
|
+
const SepaSequenceType = {
|
|
4447
|
+
FRST: "FRST",
|
|
4448
|
+
OOFF: "OOFF",
|
|
4449
|
+
RCUR: "RCUR",
|
|
4450
|
+
FNAL: "FNAL"
|
|
4451
|
+
};
|
|
4452
|
+
const MandateStatus = {
|
|
4453
|
+
PENDING_CUSTOMER_APPROVAL: "pending_customer_approval",
|
|
4454
|
+
PENDING_SUBMISSION: "pending_submission",
|
|
4455
|
+
SUBMITTED: "submitted",
|
|
4456
|
+
ACTIVE: "active",
|
|
4457
|
+
FAILED: "failed",
|
|
4458
|
+
CANCELLED: "cancelled",
|
|
4459
|
+
EXPIRED: "expired",
|
|
4460
|
+
CONSUMED: "consumed",
|
|
4461
|
+
REPLACED: "replaced",
|
|
4462
|
+
BLOCKED: "blocked",
|
|
4463
|
+
BANK_DISCONNECTED: "bank_disconnected"
|
|
4464
|
+
};
|
|
4465
|
+
const PurchaseRequestLineUnit = {
|
|
4466
|
+
PIECE: "piece",
|
|
4467
|
+
HOUR: "hour",
|
|
4468
|
+
DAY: "day",
|
|
4469
|
+
MONTH: "month",
|
|
4470
|
+
KILOGRAM: "kilogram",
|
|
4471
|
+
M2: "m2",
|
|
4472
|
+
M3: "m3",
|
|
4473
|
+
TON: "ton",
|
|
4474
|
+
MG: "mg",
|
|
4475
|
+
NO_UNIT: "no_unit"
|
|
4476
|
+
};
|
|
4477
|
+
const PurchaseRequestStatuses = {
|
|
4478
|
+
TO_BE_VALIDATED: "to_be_validated",
|
|
4479
|
+
APPROVED: "approved",
|
|
4480
|
+
REJECTED: "rejected",
|
|
4481
|
+
INVOICED: "invoiced"
|
|
4482
|
+
};
|
|
4483
|
+
|
|
4484
|
+
//#endregion
|
|
4485
|
+
export { AccountType, AuthorizedCountryAlpha2WithAny, BadRequestCodeEnum, BillingSubscriptionMode, BillingSubscriptionOcurrenceRuleType, BillingSubscriptionPaymentConditions, BillingSubscriptionPaymentMethod, BillingSubscriptionStatus, CategoryDirection, CommercialDocumentType, Currency, CustomerBillingLanguage, DiscountType, ExportStatus, InvoiceAccountantsStatus, InvoicePaymentStatus, InvoiceStatuses, MandateStatus, Null, Null2, PaymentConditions, PaymentStatus, PurchaseRequestLineUnit, PurchaseRequestStatuses, QuoteStatus, SchemasCurrency, SepaSequenceType, SupplierDueDateRule, SupplierPaymentMethod, TemplatesAvailablesLocales, UnbalancedLetteringStrategy, VatRate, VatRateWithAnyAndMixed, companyCompleteRegistration, companyCreate, companyFiscalYears, createCustomerInvoiceFromQuote, createEInvoiceImport, createPurchaseRequestImport, createTransaction, deleteCustomerInvoiceMatchedTransactions, deleteCustomerInvoices, deleteLedgerEntryLinesUnletter, deleteSepaMandate, deleteSupplierInvoiceMatchedTransactions, exportAnalyticalGeneralLedger, exportFec, finalizeCustomerInvoice, findUser, getAnalyticalGeneralLedgerExport, getBankAccount, getBankAccounts, getBankEstablishments, getBillingSubscription, getBillingSubscriptionInvoiceLineSections, getBillingSubscriptionInvoiceLines, getBillingSubscriptions, getCategories, getCategory, getCategoryGroup, getCategoryGroupCategories, getCategoryGroups, getCommercialDocument, getCommercialDocumentAppendices, getCommercialDocumentInvoiceLineSections, getCommercialDocumentInvoiceLines, getCompanyCustomer, getCustomer, getCustomerChanges, getCustomerContacts, getCustomerInvoice, getCustomerInvoiceAppendices, getCustomerInvoiceCategories, getCustomerInvoiceCustomHeaderFields, getCustomerInvoiceInvoiceLineSections, getCustomerInvoiceInvoiceLines, getCustomerInvoiceMatchedTransactions, getCustomerInvoicePayments, getCustomerInvoiceTemplates, getCustomerInvoices, getCustomerInvoicesChanges, getCustomers, getFecExport, getFileAttachments, getGocardlessMandate, getGocardlessMandates, getIndividualCustomer, getJournal, getJournals, getLedgerAccount, getLedgerAccounts, getLedgerAttachments, getLedgerEntries, getLedgerEntriesLedgerEntryLines, getLedgerEntry, getLedgerEntryLine, getLedgerEntryLineChanges, getLedgerEntryLines, getLedgerEntryLinesCategories, getLedgerEntryLinesLetteredLedgerEntryLines, getMe, getProduct, getProductChanges, getProducts, getPurchaseRequest, getPurchaseRequests, getQuote, getQuoteAppendices, getQuoteInvoiceLineSections, getQuoteInvoiceLines, getSepaMandate, getSepaMandates, getSupplier, getSupplierChanges, getSupplierInvoice, getSupplierInvoiceCategories, getSupplierInvoiceLines, getSupplierInvoiceMatchedTransactions, getSupplierInvoicePayments, getSupplierInvoices, getSupplierInvoicesChanges, getSuppliers, getTransaction, getTransactionCategories, getTransactionChanges, getTransactionMatchedInvoices, getTransactions, getTrialBalance, importCustomerInvoices, importSupplierInvoice, linkCreditNote, listCommercialDocuments, listQuotes, markAsPaidCustomerInvoice, postBankAccount, postBillingSubscriptions, postCategories, postCommercialDocumentAppendices, postCompanyCustomer, postCustomerInvoiceAppendices, postCustomerInvoiceMatchedTransactions, postCustomerInvoices, postFileAttachments, postGocardlessMandateAssociations, postGocardlessMandateCancellations, postGocardlessMandateMailRequests, postIndividualCustomer, postJournals, postLedgerAccounts, postLedgerAttachments, postLedgerEntries, postLedgerEntryLinesLetter, postProducts, postQuoteAppendices, postQuotes, postSepaMandates, postSupplier, postSupplierInvoiceLinkedPurchaseRequests, postSupplierInvoiceMatchedTransactions, postUsers, putBillingSubscriptions, putCompanyCustomer, putCustomerInvoiceCategories, putIndividualCustomer, putLedgerEntries, putLedgerEntryLinesCategories, putProduct, putSepaMandate, putSupplier, putSupplierInvoice, putSupplierInvoiceCategories, putTransactionCategories, putUsers, sendByEmailCustomerInvoice, sendByEmailQuote, updateCategory, updateCustomerInvoice, updateImportedCustomerInvoice, updateLedgerAccount, updateQuote, updateStatusQuote, updateSupplierInvoicePaymentStatus, updateTransaction, validateAccountingSupplierInvoice };
|
|
4486
|
+
//# sourceMappingURL=index.mjs.map
|