@scell/sdk 1.4.0 → 1.5.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 +0 -0
- package/README.md +0 -0
- package/dist/index.d.mts +37 -3
- package/dist/index.d.ts +37 -3
- package/dist/index.js +50 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +50 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +0 -0
- package/src/errors.ts +0 -0
- package/src/index.ts +28 -4
- package/src/resources/api-keys.ts +0 -0
- package/src/resources/auth.ts +0 -0
- package/src/resources/balance.ts +0 -0
- package/src/resources/billing.ts +0 -0
- package/src/resources/companies.ts +0 -0
- package/src/resources/fiscal.ts +0 -0
- package/src/resources/invoices.ts +0 -0
- package/src/resources/signatures.ts +33 -0
- package/src/resources/stats.ts +0 -0
- package/src/resources/sub-tenants.ts +0 -0
- package/src/resources/tenant-credit-notes.ts +0 -0
- package/src/resources/tenant-direct-credit-notes.ts +0 -0
- package/src/resources/tenant-direct-invoices.ts +0 -0
- package/src/resources/tenant-incoming-invoices.ts +0 -0
- package/src/resources/webhooks.ts +0 -0
- package/src/tenant-client.ts +0 -0
- package/src/types/api-keys.ts +0 -0
- package/src/types/auth.ts +0 -0
- package/src/types/balance.ts +0 -0
- package/src/types/billing.ts +0 -0
- package/src/types/common.ts +0 -0
- package/src/types/companies.ts +0 -0
- package/src/types/fiscal.ts +0 -0
- package/src/types/index.ts +0 -0
- package/src/types/invoices.ts +0 -0
- package/src/types/signatures.ts +0 -0
- package/src/types/stats.ts +0 -0
- package/src/types/sub-tenants.ts +0 -0
- package/src/types/tenant-credit-notes.ts +0 -0
- package/src/types/tenant-invoices.ts +0 -0
- package/src/types/tenant-profile.ts +0 -0
- package/src/types/webhooks.ts +0 -0
- package/src/utils/retry.ts +0 -0
- package/src/utils/webhook-verify.ts +0 -0
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
File without changes
|
package/dist/index.d.mts
CHANGED
|
@@ -3925,6 +3925,28 @@ declare class SignaturesResource {
|
|
|
3925
3925
|
* ```
|
|
3926
3926
|
*/
|
|
3927
3927
|
cancel(id: string, requestOptions?: RequestOptions): Promise<MessageResponse>;
|
|
3928
|
+
/**
|
|
3929
|
+
* Get signature audit trail (JSON)
|
|
3930
|
+
*
|
|
3931
|
+
* Returns the complete history of actions on the signature:
|
|
3932
|
+
* creation, delivery, opening, signing, refusal, etc.
|
|
3933
|
+
*
|
|
3934
|
+
* @param id - Signature UUID
|
|
3935
|
+
* @param requestOptions - Request options
|
|
3936
|
+
* @returns Audit trail entries with integrity validation
|
|
3937
|
+
*
|
|
3938
|
+
* @example
|
|
3939
|
+
* ```typescript
|
|
3940
|
+
* const { data: entries, integrity_valid } = await client.signatures.auditTrail(
|
|
3941
|
+
* 'signature-uuid'
|
|
3942
|
+
* );
|
|
3943
|
+
*
|
|
3944
|
+
* if (integrity_valid) {
|
|
3945
|
+
* entries.forEach(e => console.log(e.action, e.created_at));
|
|
3946
|
+
* }
|
|
3947
|
+
* ```
|
|
3948
|
+
*/
|
|
3949
|
+
auditTrail(id: string, requestOptions?: RequestOptions): Promise<AuditTrailResponse>;
|
|
3928
3950
|
}
|
|
3929
3951
|
|
|
3930
3952
|
/**
|
|
@@ -4599,12 +4621,24 @@ declare class ScellApiClient {
|
|
|
4599
4621
|
readonly invoices: InvoicesResource;
|
|
4600
4622
|
/** Signature operations (create, download, remind, cancel) */
|
|
4601
4623
|
readonly signatures: SignaturesResource;
|
|
4602
|
-
/**
|
|
4603
|
-
readonly
|
|
4624
|
+
/** Sub-tenant management (provision, update, list) */
|
|
4625
|
+
readonly subTenants: SubTenantsResource;
|
|
4626
|
+
/** NF525 fiscal compliance (closings, FEC, attestation) */
|
|
4627
|
+
readonly fiscal: FiscalResource;
|
|
4628
|
+
/** Platform statistics */
|
|
4629
|
+
readonly stats: StatsResource;
|
|
4630
|
+
/** Platform billing (usage, top-up, transactions) */
|
|
4631
|
+
readonly billing: BillingResource;
|
|
4632
|
+
/** Credit notes operations (create, send, download) */
|
|
4633
|
+
readonly creditNotes: TenantCreditNotesResource;
|
|
4634
|
+
/** Tenant invoice operations (create, submit, update, delete) */
|
|
4635
|
+
readonly tenantInvoices: TenantDirectInvoicesResource;
|
|
4636
|
+
/** Incoming invoice operations (list, accept, reject) */
|
|
4637
|
+
readonly incomingInvoices: TenantIncomingInvoicesResource;
|
|
4604
4638
|
/**
|
|
4605
4639
|
* Create a new Scell API Client
|
|
4606
4640
|
*
|
|
4607
|
-
* @param apiKey - Your API key (
|
|
4641
|
+
* @param apiKey - Your API key (sk_live_xxx or sk_test_xxx)
|
|
4608
4642
|
* @param config - Client configuration
|
|
4609
4643
|
*
|
|
4610
4644
|
* @example
|
package/dist/index.d.ts
CHANGED
|
@@ -3925,6 +3925,28 @@ declare class SignaturesResource {
|
|
|
3925
3925
|
* ```
|
|
3926
3926
|
*/
|
|
3927
3927
|
cancel(id: string, requestOptions?: RequestOptions): Promise<MessageResponse>;
|
|
3928
|
+
/**
|
|
3929
|
+
* Get signature audit trail (JSON)
|
|
3930
|
+
*
|
|
3931
|
+
* Returns the complete history of actions on the signature:
|
|
3932
|
+
* creation, delivery, opening, signing, refusal, etc.
|
|
3933
|
+
*
|
|
3934
|
+
* @param id - Signature UUID
|
|
3935
|
+
* @param requestOptions - Request options
|
|
3936
|
+
* @returns Audit trail entries with integrity validation
|
|
3937
|
+
*
|
|
3938
|
+
* @example
|
|
3939
|
+
* ```typescript
|
|
3940
|
+
* const { data: entries, integrity_valid } = await client.signatures.auditTrail(
|
|
3941
|
+
* 'signature-uuid'
|
|
3942
|
+
* );
|
|
3943
|
+
*
|
|
3944
|
+
* if (integrity_valid) {
|
|
3945
|
+
* entries.forEach(e => console.log(e.action, e.created_at));
|
|
3946
|
+
* }
|
|
3947
|
+
* ```
|
|
3948
|
+
*/
|
|
3949
|
+
auditTrail(id: string, requestOptions?: RequestOptions): Promise<AuditTrailResponse>;
|
|
3928
3950
|
}
|
|
3929
3951
|
|
|
3930
3952
|
/**
|
|
@@ -4599,12 +4621,24 @@ declare class ScellApiClient {
|
|
|
4599
4621
|
readonly invoices: InvoicesResource;
|
|
4600
4622
|
/** Signature operations (create, download, remind, cancel) */
|
|
4601
4623
|
readonly signatures: SignaturesResource;
|
|
4602
|
-
/**
|
|
4603
|
-
readonly
|
|
4624
|
+
/** Sub-tenant management (provision, update, list) */
|
|
4625
|
+
readonly subTenants: SubTenantsResource;
|
|
4626
|
+
/** NF525 fiscal compliance (closings, FEC, attestation) */
|
|
4627
|
+
readonly fiscal: FiscalResource;
|
|
4628
|
+
/** Platform statistics */
|
|
4629
|
+
readonly stats: StatsResource;
|
|
4630
|
+
/** Platform billing (usage, top-up, transactions) */
|
|
4631
|
+
readonly billing: BillingResource;
|
|
4632
|
+
/** Credit notes operations (create, send, download) */
|
|
4633
|
+
readonly creditNotes: TenantCreditNotesResource;
|
|
4634
|
+
/** Tenant invoice operations (create, submit, update, delete) */
|
|
4635
|
+
readonly tenantInvoices: TenantDirectInvoicesResource;
|
|
4636
|
+
/** Incoming invoice operations (list, accept, reject) */
|
|
4637
|
+
readonly incomingInvoices: TenantIncomingInvoicesResource;
|
|
4604
4638
|
/**
|
|
4605
4639
|
* Create a new Scell API Client
|
|
4606
4640
|
*
|
|
4607
|
-
* @param apiKey - Your API key (
|
|
4641
|
+
* @param apiKey - Your API key (sk_live_xxx or sk_test_xxx)
|
|
4608
4642
|
* @param config - Client configuration
|
|
4609
4643
|
*
|
|
4610
4644
|
* @example
|
package/dist/index.js
CHANGED
|
@@ -2810,6 +2810,34 @@ var SignaturesResource = class {
|
|
|
2810
2810
|
requestOptions
|
|
2811
2811
|
);
|
|
2812
2812
|
}
|
|
2813
|
+
/**
|
|
2814
|
+
* Get signature audit trail (JSON)
|
|
2815
|
+
*
|
|
2816
|
+
* Returns the complete history of actions on the signature:
|
|
2817
|
+
* creation, delivery, opening, signing, refusal, etc.
|
|
2818
|
+
*
|
|
2819
|
+
* @param id - Signature UUID
|
|
2820
|
+
* @param requestOptions - Request options
|
|
2821
|
+
* @returns Audit trail entries with integrity validation
|
|
2822
|
+
*
|
|
2823
|
+
* @example
|
|
2824
|
+
* ```typescript
|
|
2825
|
+
* const { data: entries, integrity_valid } = await client.signatures.auditTrail(
|
|
2826
|
+
* 'signature-uuid'
|
|
2827
|
+
* );
|
|
2828
|
+
*
|
|
2829
|
+
* if (integrity_valid) {
|
|
2830
|
+
* entries.forEach(e => console.log(e.action, e.created_at));
|
|
2831
|
+
* }
|
|
2832
|
+
* ```
|
|
2833
|
+
*/
|
|
2834
|
+
async auditTrail(id, requestOptions) {
|
|
2835
|
+
return this.http.get(
|
|
2836
|
+
`/signatures/${id}/audit-trail`,
|
|
2837
|
+
void 0,
|
|
2838
|
+
requestOptions
|
|
2839
|
+
);
|
|
2840
|
+
}
|
|
2813
2841
|
};
|
|
2814
2842
|
|
|
2815
2843
|
// src/resources/webhooks.ts
|
|
@@ -3214,12 +3242,24 @@ var ScellApiClient = class {
|
|
|
3214
3242
|
invoices;
|
|
3215
3243
|
/** Signature operations (create, download, remind, cancel) */
|
|
3216
3244
|
signatures;
|
|
3217
|
-
/**
|
|
3218
|
-
|
|
3245
|
+
/** Sub-tenant management (provision, update, list) */
|
|
3246
|
+
subTenants;
|
|
3247
|
+
/** NF525 fiscal compliance (closings, FEC, attestation) */
|
|
3248
|
+
fiscal;
|
|
3249
|
+
/** Platform statistics */
|
|
3250
|
+
stats;
|
|
3251
|
+
/** Platform billing (usage, top-up, transactions) */
|
|
3252
|
+
billing;
|
|
3253
|
+
/** Credit notes operations (create, send, download) */
|
|
3254
|
+
creditNotes;
|
|
3255
|
+
/** Tenant invoice operations (create, submit, update, delete) */
|
|
3256
|
+
tenantInvoices;
|
|
3257
|
+
/** Incoming invoice operations (list, accept, reject) */
|
|
3258
|
+
incomingInvoices;
|
|
3219
3259
|
/**
|
|
3220
3260
|
* Create a new Scell API Client
|
|
3221
3261
|
*
|
|
3222
|
-
* @param apiKey - Your API key (
|
|
3262
|
+
* @param apiKey - Your API key (sk_live_xxx or sk_test_xxx)
|
|
3223
3263
|
* @param config - Client configuration
|
|
3224
3264
|
*
|
|
3225
3265
|
* @example
|
|
@@ -3237,7 +3277,13 @@ var ScellApiClient = class {
|
|
|
3237
3277
|
this.http = new HttpClient("api-key", apiKey, config);
|
|
3238
3278
|
this.invoices = new InvoicesResource(this.http);
|
|
3239
3279
|
this.signatures = new SignaturesResource(this.http);
|
|
3240
|
-
this.
|
|
3280
|
+
this.subTenants = new SubTenantsResource(this.http);
|
|
3281
|
+
this.fiscal = new FiscalResource(this.http);
|
|
3282
|
+
this.stats = new StatsResource(this.http);
|
|
3283
|
+
this.billing = new BillingResource(this.http);
|
|
3284
|
+
this.creditNotes = new TenantCreditNotesResource(this.http);
|
|
3285
|
+
this.tenantInvoices = new TenantDirectInvoicesResource(this.http);
|
|
3286
|
+
this.incomingInvoices = new TenantIncomingInvoicesResource(this.http);
|
|
3241
3287
|
}
|
|
3242
3288
|
};
|
|
3243
3289
|
|