@beel_es/sdk 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +234 -74
- package/dist/index.d.mts +26774 -0
- package/dist/index.d.ts +26769 -21
- package/dist/index.js +1556 -50
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1497 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +49 -19
- package/dist/client.d.ts +0 -54
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -94
- package/dist/client.js.map +0 -1
- package/dist/generated/client/client.gen.d.ts +0 -3
- package/dist/generated/client/client.gen.d.ts.map +0 -1
- package/dist/generated/client/client.gen.js +0 -240
- package/dist/generated/client/client.gen.js.map +0 -1
- package/dist/generated/client/index.d.ts +0 -9
- package/dist/generated/client/index.d.ts.map +0 -1
- package/dist/generated/client/index.js +0 -18
- package/dist/generated/client/index.js.map +0 -1
- package/dist/generated/client/types.gen.d.ts +0 -118
- package/dist/generated/client/types.gen.d.ts.map +0 -1
- package/dist/generated/client/types.gen.js +0 -4
- package/dist/generated/client/types.gen.js.map +0 -1
- package/dist/generated/client/utils.gen.d.ts +0 -34
- package/dist/generated/client/utils.gen.d.ts.map +0 -1
- package/dist/generated/client/utils.gen.js +0 -242
- package/dist/generated/client/utils.gen.js.map +0 -1
- package/dist/generated/client.gen.d.ts +0 -13
- package/dist/generated/client.gen.d.ts.map +0 -1
- package/dist/generated/client.gen.js +0 -7
- package/dist/generated/client.gen.js.map +0 -1
- package/dist/generated/core/auth.gen.d.ts +0 -19
- package/dist/generated/core/auth.gen.d.ts.map +0 -1
- package/dist/generated/core/auth.gen.js +0 -19
- package/dist/generated/core/auth.gen.js.map +0 -1
- package/dist/generated/core/bodySerializer.gen.d.ts +0 -26
- package/dist/generated/core/bodySerializer.gen.d.ts.map +0 -1
- package/dist/generated/core/bodySerializer.gen.js +0 -61
- package/dist/generated/core/bodySerializer.gen.js.map +0 -1
- package/dist/generated/core/params.gen.d.ts +0 -44
- package/dist/generated/core/params.gen.d.ts.map +0 -1
- package/dist/generated/core/params.gen.js +0 -105
- package/dist/generated/core/params.gen.js.map +0 -1
- package/dist/generated/core/pathSerializer.gen.d.ts +0 -34
- package/dist/generated/core/pathSerializer.gen.d.ts.map +0 -1
- package/dist/generated/core/pathSerializer.gen.js +0 -116
- package/dist/generated/core/pathSerializer.gen.js.map +0 -1
- package/dist/generated/core/queryKeySerializer.gen.d.ts +0 -19
- package/dist/generated/core/queryKeySerializer.gen.d.ts.map +0 -1
- package/dist/generated/core/queryKeySerializer.gen.js +0 -99
- package/dist/generated/core/queryKeySerializer.gen.js.map +0 -1
- package/dist/generated/core/serverSentEvents.gen.d.ts +0 -72
- package/dist/generated/core/serverSentEvents.gen.d.ts.map +0 -1
- package/dist/generated/core/serverSentEvents.gen.js +0 -138
- package/dist/generated/core/serverSentEvents.gen.js.map +0 -1
- package/dist/generated/core/types.gen.d.ts +0 -79
- package/dist/generated/core/types.gen.d.ts.map +0 -1
- package/dist/generated/core/types.gen.js +0 -4
- package/dist/generated/core/types.gen.js.map +0 -1
- package/dist/generated/core/utils.gen.d.ts +0 -20
- package/dist/generated/core/utils.gen.d.ts.map +0 -1
- package/dist/generated/core/utils.gen.js +0 -94
- package/dist/generated/core/utils.gen.js.map +0 -1
- package/dist/generated/index.d.ts +0 -3
- package/dist/generated/index.d.ts.map +0 -1
- package/dist/generated/index.js +0 -84
- package/dist/generated/index.js.map +0 -1
- package/dist/generated/sdk.gen.d.ts +0 -966
- package/dist/generated/sdk.gen.d.ts.map +0 -1
- package/dist/generated/sdk.gen.js +0 -1490
- package/dist/generated/sdk.gen.js.map +0 -1
- package/dist/generated/types.gen.d.ts +0 -5646
- package/dist/generated/types.gen.d.ts.map +0 -1
- package/dist/generated/types.gen.js +0 -4
- package/dist/generated/types.gen.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/resources/companies.d.ts +0 -75
- package/dist/resources/companies.d.ts.map +0 -1
- package/dist/resources/companies.js +0 -77
- package/dist/resources/companies.js.map +0 -1
- package/dist/resources/config.d.ts +0 -106
- package/dist/resources/config.d.ts.map +0 -1
- package/dist/resources/config.js +0 -86
- package/dist/resources/config.js.map +0 -1
- package/dist/resources/customers.d.ts +0 -172
- package/dist/resources/customers.d.ts.map +0 -1
- package/dist/resources/customers.js +0 -96
- package/dist/resources/customers.js.map +0 -1
- package/dist/resources/invoices.d.ts +0 -370
- package/dist/resources/invoices.d.ts.map +0 -1
- package/dist/resources/invoices.js +0 -174
- package/dist/resources/invoices.js.map +0 -1
- package/dist/resources/products.d.ts +0 -155
- package/dist/resources/products.d.ts.map +0 -1
- package/dist/resources/products.js +0 -96
- package/dist/resources/products.js.map +0 -1
- package/dist/resources/series.d.ts +0 -98
- package/dist/resources/series.d.ts.map +0 -1
- package/dist/resources/series.js +0 -83
- package/dist/resources/series.js.map +0 -1
- package/dist/webhooks/index.d.ts +0 -20
- package/dist/webhooks/index.d.ts.map +0 -1
- package/dist/webhooks/index.js +0 -70
- package/dist/webhooks/index.js.map +0 -1
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.Invoices = void 0;
|
|
37
|
-
const api = __importStar(require("../generated/sdk.gen"));
|
|
38
|
-
/**
|
|
39
|
-
* Invoice management operations.
|
|
40
|
-
*/
|
|
41
|
-
class Invoices {
|
|
42
|
-
constructor(client) {
|
|
43
|
-
this.client = client;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* List invoices with optional filters.
|
|
47
|
-
*/
|
|
48
|
-
async list(params) {
|
|
49
|
-
return api.listInvoices({ query: params, client: this.client });
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Get a single invoice by ID.
|
|
53
|
-
*/
|
|
54
|
-
async get(id) {
|
|
55
|
-
return api.getInvoice({ path: { invoice_id: id }, client: this.client });
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Create a new invoice.
|
|
59
|
-
*/
|
|
60
|
-
async create(data) {
|
|
61
|
-
return api.createInvoice({ body: data, client: this.client });
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Update an existing invoice.
|
|
65
|
-
*/
|
|
66
|
-
async update(id, data) {
|
|
67
|
-
return api.updateInvoice({ path: { invoice_id: id }, body: data, client: this.client });
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Delete an invoice.
|
|
71
|
-
*/
|
|
72
|
-
async delete(id) {
|
|
73
|
-
return api.deleteInvoice({ path: { invoice_id: id }, client: this.client });
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Issue an invoice (mark as ready).
|
|
77
|
-
*/
|
|
78
|
-
async issue(id) {
|
|
79
|
-
return api.issueInvoice({ path: { invoice_id: id }, client: this.client });
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Mark an invoice as paid.
|
|
83
|
-
*/
|
|
84
|
-
async markPaid(id, data) {
|
|
85
|
-
return api.markInvoicePaid({ path: { invoice_id: id }, body: data, client: this.client });
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Mark an invoice as sent.
|
|
89
|
-
*/
|
|
90
|
-
async markSent(id, data) {
|
|
91
|
-
return api.markInvoiceSent({ path: { invoice_id: id }, body: data, client: this.client });
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Void (cancel) an invoice.
|
|
95
|
-
*/
|
|
96
|
-
async void(id, data) {
|
|
97
|
-
return api.voidInvoice({ path: { invoice_id: id }, body: data, client: this.client });
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Duplicate an invoice.
|
|
101
|
-
*/
|
|
102
|
-
async duplicate(id, data) {
|
|
103
|
-
return api.duplicateInvoice({ path: { invoice_id: id }, body: data, client: this.client });
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Schedule an invoice for future issuance.
|
|
107
|
-
*/
|
|
108
|
-
async schedule(id, data) {
|
|
109
|
-
return api.scheduleInvoice({ path: { invoice_id: id }, body: data, client: this.client });
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Reschedule a scheduled invoice.
|
|
113
|
-
*/
|
|
114
|
-
async reschedule(id, data) {
|
|
115
|
-
return api.rescheduleInvoice({ path: { invoice_id: id }, body: data, client: this.client });
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Cancel a scheduled invoice.
|
|
119
|
-
*/
|
|
120
|
-
async unschedule(id) {
|
|
121
|
-
return api.unscheduleInvoice({ path: { invoice_id: id }, client: this.client });
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Download invoice PDF.
|
|
125
|
-
*/
|
|
126
|
-
async downloadPdf(id) {
|
|
127
|
-
return api.generateInvoicePdf({ path: { invoice_id: id }, client: this.client });
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Send invoice by email.
|
|
131
|
-
*/
|
|
132
|
-
async sendEmail(id, data) {
|
|
133
|
-
return api.sendInvoiceEmail({ path: { invoice_id: id }, body: data, client: this.client });
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Create a corrective (rectification) invoice.
|
|
137
|
-
*/
|
|
138
|
-
async createCorrective(invoiceId, data) {
|
|
139
|
-
return api.createCorrectiveInvoice({ path: { invoice_id: invoiceId }, body: data, client: this.client });
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Submit invoice to VeriFactu.
|
|
143
|
-
*/
|
|
144
|
-
async submitVeriFactu(id) {
|
|
145
|
-
return api.submitInvoiceVeriFactu({ path: { invoice_id: id }, client: this.client });
|
|
146
|
-
}
|
|
147
|
-
// --- Bulk operations ---
|
|
148
|
-
/**
|
|
149
|
-
* Create multiple invoices at once.
|
|
150
|
-
*/
|
|
151
|
-
async createBulk(data) {
|
|
152
|
-
return api.createInvoicesBulk({ body: data, client: this.client });
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Download PDFs for multiple invoices.
|
|
156
|
-
*/
|
|
157
|
-
async downloadPdfBulk(data) {
|
|
158
|
-
return api.downloadInvoicesPdfBulk({ body: data, client: this.client });
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Send emails for multiple invoices.
|
|
162
|
-
*/
|
|
163
|
-
async sendEmailBulk(data) {
|
|
164
|
-
return api.sendInvoicesBulkEmail({ body: data, client: this.client });
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Change status for multiple invoices.
|
|
168
|
-
*/
|
|
169
|
-
async changeStatusBulk(data) {
|
|
170
|
-
return api.changeInvoicesStatusBulk({ body: data, client: this.client });
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
exports.Invoices = Invoices;
|
|
174
|
-
//# sourceMappingURL=invoices.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.js","sourceRoot":"","sources":["../../src/resources/invoices.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,0DAA4C;AAsB5C;;GAEG;AACH,MAAa,QAAQ;IACnB,YAAoB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAEtC;;OAEG;IACH,KAAK,CAAC,IAAI,CAAC,MAAkC;QAC3C,OAAO,GAAG,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAClE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,GAAG,CAAC,EAAU;QAClB,OAAO,GAAG,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,IAA+B;QAC1C,OAAO,GAAG,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,IAA+B;QACtD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,CAAC,wBAAwB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3E,CAAC;CACF;AAvJD,4BAuJC"}
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import type { Client } from '../generated/client';
|
|
2
|
-
import type { ListProductsData, CreateProductData, UpdateProductData, CreateProductsBulkData, DeleteProductsBulkData } from '../generated/types.gen';
|
|
3
|
-
/**
|
|
4
|
-
* Product management operations.
|
|
5
|
-
*/
|
|
6
|
-
export declare class Products {
|
|
7
|
-
private client;
|
|
8
|
-
constructor(client: Client);
|
|
9
|
-
/**
|
|
10
|
-
* List products with optional filters.
|
|
11
|
-
*/
|
|
12
|
-
list(params?: ListProductsData['query']): Promise<({
|
|
13
|
-
data: import("../generated/types.gen").SuccessResponse & {
|
|
14
|
-
data?: {
|
|
15
|
-
products: Array<import("../generated/types.gen").Product>;
|
|
16
|
-
pagination: import("../generated/types.gen").Pagination;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
error: undefined;
|
|
20
|
-
} | {
|
|
21
|
-
data: undefined;
|
|
22
|
-
error: import("../generated/types.gen").ErrorResponse;
|
|
23
|
-
}) & {
|
|
24
|
-
request: Request;
|
|
25
|
-
response: Response;
|
|
26
|
-
}>;
|
|
27
|
-
/**
|
|
28
|
-
* Get a single product by ID.
|
|
29
|
-
*/
|
|
30
|
-
get(id: string): Promise<({
|
|
31
|
-
data: import("../generated/types.gen").SuccessResponse & {
|
|
32
|
-
data?: import("../generated/types.gen").Product;
|
|
33
|
-
};
|
|
34
|
-
error: undefined;
|
|
35
|
-
} | {
|
|
36
|
-
data: undefined;
|
|
37
|
-
error: import("../generated/types.gen").ErrorResponse;
|
|
38
|
-
}) & {
|
|
39
|
-
request: Request;
|
|
40
|
-
response: Response;
|
|
41
|
-
}>;
|
|
42
|
-
/**
|
|
43
|
-
* Create a new product.
|
|
44
|
-
*/
|
|
45
|
-
create(data: CreateProductData['body']): Promise<({
|
|
46
|
-
data: import("../generated/types.gen").SuccessResponse & {
|
|
47
|
-
data?: import("../generated/types.gen").Product;
|
|
48
|
-
};
|
|
49
|
-
error: undefined;
|
|
50
|
-
} | {
|
|
51
|
-
data: undefined;
|
|
52
|
-
error: import("../generated/types.gen").ErrorResponse;
|
|
53
|
-
}) & {
|
|
54
|
-
request: Request;
|
|
55
|
-
response: Response;
|
|
56
|
-
}>;
|
|
57
|
-
/**
|
|
58
|
-
* Update an existing product.
|
|
59
|
-
*/
|
|
60
|
-
update(id: string, data: UpdateProductData['body']): Promise<({
|
|
61
|
-
data: import("../generated/types.gen").SuccessResponse & {
|
|
62
|
-
data?: import("../generated/types.gen").Product;
|
|
63
|
-
};
|
|
64
|
-
error: undefined;
|
|
65
|
-
} | {
|
|
66
|
-
data: undefined;
|
|
67
|
-
error: import("../generated/types.gen").ErrorResponse;
|
|
68
|
-
}) & {
|
|
69
|
-
request: Request;
|
|
70
|
-
response: Response;
|
|
71
|
-
}>;
|
|
72
|
-
/**
|
|
73
|
-
* Delete a product.
|
|
74
|
-
*/
|
|
75
|
-
delete(id: string): Promise<({
|
|
76
|
-
data: void;
|
|
77
|
-
error: undefined;
|
|
78
|
-
} | {
|
|
79
|
-
data: undefined;
|
|
80
|
-
error: import("../generated/types.gen").ErrorResponse;
|
|
81
|
-
}) & {
|
|
82
|
-
request: Request;
|
|
83
|
-
response: Response;
|
|
84
|
-
}>;
|
|
85
|
-
/**
|
|
86
|
-
* Search products by query string.
|
|
87
|
-
*/
|
|
88
|
-
search(query: string): Promise<({
|
|
89
|
-
data: import("../generated/types.gen").SuccessResponse & {
|
|
90
|
-
data?: Array<import("../generated/types.gen").Product>;
|
|
91
|
-
};
|
|
92
|
-
error: undefined;
|
|
93
|
-
} | {
|
|
94
|
-
data: undefined;
|
|
95
|
-
error: import("../generated/types.gen").ErrorResponse;
|
|
96
|
-
}) & {
|
|
97
|
-
request: Request;
|
|
98
|
-
response: Response;
|
|
99
|
-
}>;
|
|
100
|
-
/**
|
|
101
|
-
* Create multiple products at once.
|
|
102
|
-
*/
|
|
103
|
-
createBulk(data: CreateProductsBulkData['body']): Promise<({
|
|
104
|
-
data: import("../generated/types.gen").SuccessResponse & {
|
|
105
|
-
data?: {
|
|
106
|
-
created_products?: Array<import("../generated/types.gen").Product>;
|
|
107
|
-
errors?: Array<{
|
|
108
|
-
index?: number;
|
|
109
|
-
code?: string;
|
|
110
|
-
name?: string;
|
|
111
|
-
error?: string;
|
|
112
|
-
}>;
|
|
113
|
-
summary?: {
|
|
114
|
-
total_processed?: number;
|
|
115
|
-
successful?: number;
|
|
116
|
-
failed?: number;
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
};
|
|
120
|
-
error: undefined;
|
|
121
|
-
} | {
|
|
122
|
-
data: undefined;
|
|
123
|
-
error: import("../generated/types.gen").ErrorResponse;
|
|
124
|
-
}) & {
|
|
125
|
-
request: Request;
|
|
126
|
-
response: Response;
|
|
127
|
-
}>;
|
|
128
|
-
/**
|
|
129
|
-
* Delete multiple products.
|
|
130
|
-
*/
|
|
131
|
-
deleteBulk(data: DeleteProductsBulkData['body']): Promise<({
|
|
132
|
-
data: import("../generated/types.gen").SuccessResponse & {
|
|
133
|
-
data?: {
|
|
134
|
-
deleted_products?: Array<string>;
|
|
135
|
-
errors?: Array<{
|
|
136
|
-
product_id?: string;
|
|
137
|
-
error?: string;
|
|
138
|
-
}>;
|
|
139
|
-
summary?: {
|
|
140
|
-
total_processed?: number;
|
|
141
|
-
successful?: number;
|
|
142
|
-
failed?: number;
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
error: undefined;
|
|
147
|
-
} | {
|
|
148
|
-
data: undefined;
|
|
149
|
-
error: import("../generated/types.gen").ErrorResponse;
|
|
150
|
-
}) & {
|
|
151
|
-
request: Request;
|
|
152
|
-
response: Response;
|
|
153
|
-
}>;
|
|
154
|
-
}
|
|
155
|
-
//# sourceMappingURL=products.d.ts.map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AC;0BAAgC,CAAC;;;;;;;;;;;;CAD/5+G"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.Products = void 0;
|
|
37
|
-
const api = __importStar(require("../generated/sdk.gen"));
|
|
38
|
-
/**
|
|
39
|
-
* Product management operations.
|
|
40
|
-
*/
|
|
41
|
-
class Products {
|
|
42
|
-
constructor(client) {
|
|
43
|
-
this.client = client;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* List products with optional filters.
|
|
47
|
-
*/
|
|
48
|
-
async list(params) {
|
|
49
|
-
return api.listProducts({ query: params, client: this.client });
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Get a single product by ID.
|
|
53
|
-
*/
|
|
54
|
-
async get(id) {
|
|
55
|
-
return api.getProduct({ path: { product_id: id }, client: this.client });
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Create a new product.
|
|
59
|
-
*/
|
|
60
|
-
async create(data) {
|
|
61
|
-
return api.createProduct({ body: data, client: this.client });
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Update an existing product.
|
|
65
|
-
*/
|
|
66
|
-
async update(id, data) {
|
|
67
|
-
return api.updateProduct({ path: { product_id: id }, body: data, client: this.client });
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Delete a product.
|
|
71
|
-
*/
|
|
72
|
-
async delete(id) {
|
|
73
|
-
return api.deleteProduct({ path: { product_id: id }, client: this.client });
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Search products by query string.
|
|
77
|
-
*/
|
|
78
|
-
async search(query) {
|
|
79
|
-
return api.searchProducts({ query: { q: query }, client: this.client });
|
|
80
|
-
}
|
|
81
|
-
// --- Bulk operations ---
|
|
82
|
-
/**
|
|
83
|
-
* Create multiple products at once.
|
|
84
|
-
*/
|
|
85
|
-
async createBulk(data) {
|
|
86
|
-
return api.createProductsBulk({ body: data, client: this.client });
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Delete multiple products.
|
|
90
|
-
*/
|
|
91
|
-
async deleteBulk(data) {
|
|
92
|
-
return api.deleteProductsBulk({ body: data, client: this.client });
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
exports.Products = Products;
|
|
96
|
-
//# sourceMappingURL=products.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"products.js","sourceRoot":"","sources":["../../src/resources/products.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,0DAA4C;AAU5C;;GAEG;AACH,MAAa,QAAQ;IACnB,YAAoB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAEtC;;OAEG;IACH,KAAK,CAAC,IAAI,CAAC,MAAkC;QAC3C,OAAO,GAAG,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAClE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,GAAG,CAAC,EAAU;QAClB,OAAO,GAAG,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,IAA+B;QAC1C,OAAO,GAAG,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,IAA+B;QACtD,OAAO,GAAG,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,OAAO,GAAG,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,KAAa;QACxB,OAAO,GAAG,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,0BAA0B;IAE1B;;OAEG;IACH,KAAK,CAAC,UAAU,CAAC,IAAoC;QACnD,OAAO,GAAG,CAAC,kBAAkB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,UAAU,CAAC,IAAoC;QACnD,OAAO,GAAG,CAAC,kBAAkB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IACrE,CAAC;CACF;AA5DD,4BA4DC"}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import type { Client } from '../generated/client';
|
|
2
|
-
import type { CreateSeriesData, UpdateSeriesData } from '../generated/types.gen';
|
|
3
|
-
/**
|
|
4
|
-
* Invoice series management operations.
|
|
5
|
-
*/
|
|
6
|
-
export declare class Series {
|
|
7
|
-
private client;
|
|
8
|
-
constructor(client: Client);
|
|
9
|
-
/**
|
|
10
|
-
* List all invoice series.
|
|
11
|
-
*/
|
|
12
|
-
list(): Promise<({
|
|
13
|
-
data: import("../generated/types.gen").SuccessResponse & {
|
|
14
|
-
data?: Array<import("../generated/types.gen").InvoiceSeries>;
|
|
15
|
-
};
|
|
16
|
-
error: undefined;
|
|
17
|
-
} | {
|
|
18
|
-
data: undefined;
|
|
19
|
-
error: import("../generated/types.gen").ErrorResponse;
|
|
20
|
-
}) & {
|
|
21
|
-
request: Request;
|
|
22
|
-
response: Response;
|
|
23
|
-
}>;
|
|
24
|
-
/**
|
|
25
|
-
* Get a single series by ID.
|
|
26
|
-
*/
|
|
27
|
-
get(id: string): Promise<({
|
|
28
|
-
data: import("../generated/types.gen").SuccessResponse & {
|
|
29
|
-
data?: import("../generated/types.gen").InvoiceSeries;
|
|
30
|
-
};
|
|
31
|
-
error: undefined;
|
|
32
|
-
} | {
|
|
33
|
-
data: undefined;
|
|
34
|
-
error: import("../generated/types.gen").ErrorResponse;
|
|
35
|
-
}) & {
|
|
36
|
-
request: Request;
|
|
37
|
-
response: Response;
|
|
38
|
-
}>;
|
|
39
|
-
/**
|
|
40
|
-
* Create a new invoice series.
|
|
41
|
-
*/
|
|
42
|
-
create(data: CreateSeriesData['body']): Promise<({
|
|
43
|
-
data: import("../generated/types.gen").SuccessResponse & {
|
|
44
|
-
data?: import("../generated/types.gen").InvoiceSeries;
|
|
45
|
-
};
|
|
46
|
-
error: undefined;
|
|
47
|
-
} | {
|
|
48
|
-
data: undefined;
|
|
49
|
-
error: import("../generated/types.gen").ErrorResponse;
|
|
50
|
-
}) & {
|
|
51
|
-
request: Request;
|
|
52
|
-
response: Response;
|
|
53
|
-
}>;
|
|
54
|
-
/**
|
|
55
|
-
* Update an existing series.
|
|
56
|
-
*/
|
|
57
|
-
update(id: string, data: UpdateSeriesData['body']): Promise<({
|
|
58
|
-
data: import("../generated/types.gen").SuccessResponse & {
|
|
59
|
-
data?: import("../generated/types.gen").InvoiceSeries;
|
|
60
|
-
};
|
|
61
|
-
error: undefined;
|
|
62
|
-
} | {
|
|
63
|
-
data: undefined;
|
|
64
|
-
error: import("../generated/types.gen").ErrorResponse;
|
|
65
|
-
}) & {
|
|
66
|
-
request: Request;
|
|
67
|
-
response: Response;
|
|
68
|
-
}>;
|
|
69
|
-
/**
|
|
70
|
-
* Delete a series.
|
|
71
|
-
*/
|
|
72
|
-
delete(id: string): Promise<({
|
|
73
|
-
data: void;
|
|
74
|
-
error: undefined;
|
|
75
|
-
} | {
|
|
76
|
-
data: undefined;
|
|
77
|
-
error: import("../generated/types.gen").ErrorResponse;
|
|
78
|
-
}) & {
|
|
79
|
-
request: Request;
|
|
80
|
-
response: Response;
|
|
81
|
-
}>;
|
|
82
|
-
/**
|
|
83
|
-
* Set a series as default.
|
|
84
|
-
*/
|
|
85
|
-
setDefault(id: string): Promise<({
|
|
86
|
-
data: import("../generated/types.gen").SuccessResponse & {
|
|
87
|
-
data?: import("../generated/types.gen").InvoiceSeries;
|
|
88
|
-
};
|
|
89
|
-
error: undefined;
|
|
90
|
-
} | {
|
|
91
|
-
data: undefined;
|
|
92
|
-
error: import("../generated/types.gen").ErrorResponse;
|
|
93
|
-
}) & {
|
|
94
|
-
request: Request;
|
|
95
|
-
response: Response;
|
|
96
|
-
}>;
|
|
97
|
-
}
|
|
98
|
-
//# sourceMappingURL=series.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"series.d.ts","sourceRoot":"","sources":["../../src/resources/series.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAEhC;;GAEG;AACH,qBAAa,MAAM;IACL,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAElC;;OAEG;IACG,IAAI;;;;;;;;;;;;IAIV;;OAEG;IACG,GAAG,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;;;IAIpB;;OAEG;IACG,MAAM,CAAC,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC;;;;;;;;;;;;IAI3C;;OAEG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC;;;;;;;;;;;;IAIvD;;OAEG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;IAIvB;;OAEG;IACG,UAAU,CAAC,EAAE,EAAE,MAAM;;;;;;;;;;;;CAG5B"}
|
package/dist/resources/series.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.Series = void 0;
|
|
37
|
-
const api = __importStar(require("../generated/sdk.gen"));
|
|
38
|
-
/**
|
|
39
|
-
* Invoice series management operations.
|
|
40
|
-
*/
|
|
41
|
-
class Series {
|
|
42
|
-
constructor(client) {
|
|
43
|
-
this.client = client;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* List all invoice series.
|
|
47
|
-
*/
|
|
48
|
-
async list() {
|
|
49
|
-
return api.listSeries({ client: this.client });
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Get a single series by ID.
|
|
53
|
-
*/
|
|
54
|
-
async get(id) {
|
|
55
|
-
return api.getSeries({ path: { series_id: id }, client: this.client });
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Create a new invoice series.
|
|
59
|
-
*/
|
|
60
|
-
async create(data) {
|
|
61
|
-
return api.createSeries({ body: data, client: this.client });
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Update an existing series.
|
|
65
|
-
*/
|
|
66
|
-
async update(id, data) {
|
|
67
|
-
return api.updateSeries({ path: { series_id: id }, body: data, client: this.client });
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Delete a series.
|
|
71
|
-
*/
|
|
72
|
-
async delete(id) {
|
|
73
|
-
return api.deleteSeries({ path: { series_id: id }, client: this.client });
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Set a series as default.
|
|
77
|
-
*/
|
|
78
|
-
async setDefault(id) {
|
|
79
|
-
return api.setDefaultSeries({ path: { series_id: id }, client: this.client });
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
exports.Series = Series;
|
|
83
|
-
//# sourceMappingURL=series.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"series.js","sourceRoot":"","sources":["../../src/resources/series.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,0DAA4C;AAM5C;;GAEG;AACH,MAAa,MAAM;IACjB,YAAoB,MAA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ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export interface WebhookEvent {
|
|
2
|
-
id: string;
|
|
3
|
-
type: string;
|
|
4
|
-
created_at: string;
|
|
5
|
-
data: Record<string, unknown>;
|
|
6
|
-
test?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare class WebhookVerifier {
|
|
9
|
-
private readonly secret;
|
|
10
|
-
private readonly toleranceSeconds;
|
|
11
|
-
constructor(secret: string, toleranceSeconds?: number);
|
|
12
|
-
verify<T extends WebhookEvent = WebhookEvent>(rawBody: string | Buffer, signatureHeader: string | undefined): T;
|
|
13
|
-
private parseSignatureHeader;
|
|
14
|
-
private computeSignature;
|
|
15
|
-
private secureCompare;
|
|
16
|
-
}
|
|
17
|
-
export declare class WebhookVerificationError extends Error {
|
|
18
|
-
constructor(message: string);
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/webhooks/index.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;gBAE9B,MAAM,EAAE,MAAM,EAAE,gBAAgB,GAAE,MAAY;IAQ1D,MAAM,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,EAC1C,OAAO,EAAE,MAAM,GAAG,MAAM,EACxB,eAAe,EAAE,MAAM,GAAG,SAAS,GAClC,CAAC;IA8BJ,OAAO,CAAC,oBAAoB;IAkB5B,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,aAAa;CAItB;AAED,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,OAAO,EAAE,MAAM;CAI5B"}
|