@scell/sdk 1.8.0 → 1.9.2
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/README.md +18 -4
- package/dist/index.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/resources/fiscal.ts +15 -0
- package/src/types/invoices.ts +0 -2
package/README.md
CHANGED
|
@@ -44,9 +44,10 @@ const apiClient = new ScellApiClient('your-api-key');
|
|
|
44
44
|
|
|
45
45
|
### Create an Invoice
|
|
46
46
|
|
|
47
|
+
> **Note:** Invoice numbers are automatically generated by Scell.io. Draft invoices receive a temporary number, and the definitive fiscal number is assigned when the invoice is submitted.
|
|
48
|
+
|
|
47
49
|
```typescript
|
|
48
50
|
const { data: invoice } = await apiClient.invoices.create({
|
|
49
|
-
invoice_number: 'FACT-2024-001',
|
|
50
51
|
direction: 'outgoing',
|
|
51
52
|
output_format: 'facturx',
|
|
52
53
|
issue_date: '2024-01-15',
|
|
@@ -95,7 +96,6 @@ For non-French parties, SIRET is not required. Use VAT numbers for EU businesses
|
|
|
95
96
|
|
|
96
97
|
```typescript
|
|
97
98
|
const { data: invoice } = await apiClient.invoices.create({
|
|
98
|
-
invoice_number: 'INV-2026-042',
|
|
99
99
|
issue_date: '2026-03-29',
|
|
100
100
|
due_date: '2026-04-28',
|
|
101
101
|
currency: 'EUR',
|
|
@@ -125,7 +125,6 @@ For non-EU buyers, use `buyer_legal_id` and `buyer_legal_id_scheme` in addition
|
|
|
125
125
|
|
|
126
126
|
```typescript
|
|
127
127
|
const { data: invoice } = await apiClient.invoices.create({
|
|
128
|
-
invoice_number: 'INV-2026-044',
|
|
129
128
|
issue_date: '2026-03-29',
|
|
130
129
|
due_date: '2026-04-28',
|
|
131
130
|
currency: 'GBP',
|
|
@@ -267,7 +266,7 @@ apiClient.invoices // Create, download, convert invoices
|
|
|
267
266
|
apiClient.signatures // Create, download, remind, cancel signatures
|
|
268
267
|
apiClient.creditNotes // Create, send, download tenant credit notes
|
|
269
268
|
apiClient.subTenants // Sub-tenant management
|
|
270
|
-
apiClient.fiscal //
|
|
269
|
+
apiClient.fiscal // ISCA fiscal compliance
|
|
271
270
|
apiClient.stats // Platform statistics
|
|
272
271
|
apiClient.billing // Usage, top-up, transactions
|
|
273
272
|
apiClient.tenantInvoices // Tenant invoice operations
|
|
@@ -569,6 +568,21 @@ await tenant.incomingInvoices.accept(invoiceId);
|
|
|
569
568
|
const compliance = await tenant.fiscal.compliance();
|
|
570
569
|
const integrity = await tenant.fiscal.integrity();
|
|
571
570
|
|
|
571
|
+
### ISCA Compliance Documents
|
|
572
|
+
|
|
573
|
+
Download the three mandatory ISCA compliance documents as PDF:
|
|
574
|
+
|
|
575
|
+
```typescript
|
|
576
|
+
// Measures register (registre des mesures)
|
|
577
|
+
const registerPdf = await client.fiscal.downloadMeasuresRegister();
|
|
578
|
+
|
|
579
|
+
// Technical dossier (dossier technique)
|
|
580
|
+
const dossierPdf = await client.fiscal.downloadTechnicalDossier();
|
|
581
|
+
|
|
582
|
+
// Self-attestation (auto-attestation ISCA)
|
|
583
|
+
const attestationPdf = await client.fiscal.downloadSelfAttestation();
|
|
584
|
+
```
|
|
585
|
+
|
|
572
586
|
// Billing
|
|
573
587
|
const billingInvoices = await tenant.billing.invoices();
|
|
574
588
|
const usage = await tenant.billing.usage();
|
package/dist/index.d.mts
CHANGED
|
@@ -336,8 +336,6 @@ interface InvoiceLineInput {
|
|
|
336
336
|
interface CreateInvoiceInput {
|
|
337
337
|
/** Your external reference ID */
|
|
338
338
|
external_id?: string | undefined;
|
|
339
|
-
/** Invoice number (required) */
|
|
340
|
-
invoice_number: string;
|
|
341
339
|
/** Direction: outgoing (sale) or incoming (purchase) */
|
|
342
340
|
direction: InvoiceDirection;
|
|
343
341
|
/** Output format for electronic invoice */
|
|
@@ -2273,6 +2271,12 @@ declare class FiscalResource {
|
|
|
2273
2271
|
exportRules(options: FiscalExportRulesOptions, requestOptions?: RequestOptions): Promise<SingleResponse<Record<string, unknown>>>;
|
|
2274
2272
|
replayRules(input: FiscalReplayRulesInput, requestOptions?: RequestOptions): Promise<MessageResponse>;
|
|
2275
2273
|
forensicExport(options: FiscalForensicExportOptions, requestOptions?: RequestOptions): Promise<SingleResponse<Record<string, unknown>>>;
|
|
2274
|
+
/** Download the ISCA measures register as PDF */
|
|
2275
|
+
downloadMeasuresRegister(): Promise<Blob | ArrayBuffer>;
|
|
2276
|
+
/** Download the ISCA technical dossier as PDF */
|
|
2277
|
+
downloadTechnicalDossier(): Promise<Blob | ArrayBuffer>;
|
|
2278
|
+
/** Download the ISCA self-attestation as PDF */
|
|
2279
|
+
downloadSelfAttestation(): Promise<Blob | ArrayBuffer>;
|
|
2276
2280
|
}
|
|
2277
2281
|
|
|
2278
2282
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -336,8 +336,6 @@ interface InvoiceLineInput {
|
|
|
336
336
|
interface CreateInvoiceInput {
|
|
337
337
|
/** Your external reference ID */
|
|
338
338
|
external_id?: string | undefined;
|
|
339
|
-
/** Invoice number (required) */
|
|
340
|
-
invoice_number: string;
|
|
341
339
|
/** Direction: outgoing (sale) or incoming (purchase) */
|
|
342
340
|
direction: InvoiceDirection;
|
|
343
341
|
/** Output format for electronic invoice */
|
|
@@ -2273,6 +2271,12 @@ declare class FiscalResource {
|
|
|
2273
2271
|
exportRules(options: FiscalExportRulesOptions, requestOptions?: RequestOptions): Promise<SingleResponse<Record<string, unknown>>>;
|
|
2274
2272
|
replayRules(input: FiscalReplayRulesInput, requestOptions?: RequestOptions): Promise<MessageResponse>;
|
|
2275
2273
|
forensicExport(options: FiscalForensicExportOptions, requestOptions?: RequestOptions): Promise<SingleResponse<Record<string, unknown>>>;
|
|
2274
|
+
/** Download the ISCA measures register as PDF */
|
|
2275
|
+
downloadMeasuresRegister(): Promise<Blob | ArrayBuffer>;
|
|
2276
|
+
/** Download the ISCA technical dossier as PDF */
|
|
2277
|
+
downloadTechnicalDossier(): Promise<Blob | ArrayBuffer>;
|
|
2278
|
+
/** Download the ISCA self-attestation as PDF */
|
|
2279
|
+
downloadSelfAttestation(): Promise<Blob | ArrayBuffer>;
|
|
2276
2280
|
}
|
|
2277
2281
|
|
|
2278
2282
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1586,6 +1586,18 @@ var FiscalResource = class {
|
|
|
1586
1586
|
async forensicExport(options, requestOptions) {
|
|
1587
1587
|
return this.http.get("/tenant/fiscal/forensic-export", options, requestOptions);
|
|
1588
1588
|
}
|
|
1589
|
+
/** Download the ISCA measures register as PDF */
|
|
1590
|
+
async downloadMeasuresRegister() {
|
|
1591
|
+
return this.http.get("tenant/fiscal/isca/measures-register/download");
|
|
1592
|
+
}
|
|
1593
|
+
/** Download the ISCA technical dossier as PDF */
|
|
1594
|
+
async downloadTechnicalDossier() {
|
|
1595
|
+
return this.http.get("tenant/fiscal/isca/technical-dossier/download");
|
|
1596
|
+
}
|
|
1597
|
+
/** Download the ISCA self-attestation as PDF */
|
|
1598
|
+
async downloadSelfAttestation() {
|
|
1599
|
+
return this.http.get("tenant/fiscal/isca/self-attestation/download");
|
|
1600
|
+
}
|
|
1589
1601
|
};
|
|
1590
1602
|
|
|
1591
1603
|
// src/resources/billing.ts
|