@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.
Files changed (46) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +0 -0
  3. package/dist/index.d.mts +37 -3
  4. package/dist/index.d.ts +37 -3
  5. package/dist/index.js +50 -4
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +50 -4
  8. package/dist/index.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/src/client.ts +0 -0
  11. package/src/errors.ts +0 -0
  12. package/src/index.ts +28 -4
  13. package/src/resources/api-keys.ts +0 -0
  14. package/src/resources/auth.ts +0 -0
  15. package/src/resources/balance.ts +0 -0
  16. package/src/resources/billing.ts +0 -0
  17. package/src/resources/companies.ts +0 -0
  18. package/src/resources/fiscal.ts +0 -0
  19. package/src/resources/invoices.ts +0 -0
  20. package/src/resources/signatures.ts +33 -0
  21. package/src/resources/stats.ts +0 -0
  22. package/src/resources/sub-tenants.ts +0 -0
  23. package/src/resources/tenant-credit-notes.ts +0 -0
  24. package/src/resources/tenant-direct-credit-notes.ts +0 -0
  25. package/src/resources/tenant-direct-invoices.ts +0 -0
  26. package/src/resources/tenant-incoming-invoices.ts +0 -0
  27. package/src/resources/webhooks.ts +0 -0
  28. package/src/tenant-client.ts +0 -0
  29. package/src/types/api-keys.ts +0 -0
  30. package/src/types/auth.ts +0 -0
  31. package/src/types/balance.ts +0 -0
  32. package/src/types/billing.ts +0 -0
  33. package/src/types/common.ts +0 -0
  34. package/src/types/companies.ts +0 -0
  35. package/src/types/fiscal.ts +0 -0
  36. package/src/types/index.ts +0 -0
  37. package/src/types/invoices.ts +0 -0
  38. package/src/types/signatures.ts +0 -0
  39. package/src/types/stats.ts +0 -0
  40. package/src/types/sub-tenants.ts +0 -0
  41. package/src/types/tenant-credit-notes.ts +0 -0
  42. package/src/types/tenant-invoices.ts +0 -0
  43. package/src/types/tenant-profile.ts +0 -0
  44. package/src/types/webhooks.ts +0 -0
  45. package/src/utils/retry.ts +0 -0
  46. package/src/utils/webhook-verify.ts +0 -0
package/dist/index.mjs CHANGED
@@ -2808,6 +2808,34 @@ var SignaturesResource = class {
2808
2808
  requestOptions
2809
2809
  );
2810
2810
  }
2811
+ /**
2812
+ * Get signature audit trail (JSON)
2813
+ *
2814
+ * Returns the complete history of actions on the signature:
2815
+ * creation, delivery, opening, signing, refusal, etc.
2816
+ *
2817
+ * @param id - Signature UUID
2818
+ * @param requestOptions - Request options
2819
+ * @returns Audit trail entries with integrity validation
2820
+ *
2821
+ * @example
2822
+ * ```typescript
2823
+ * const { data: entries, integrity_valid } = await client.signatures.auditTrail(
2824
+ * 'signature-uuid'
2825
+ * );
2826
+ *
2827
+ * if (integrity_valid) {
2828
+ * entries.forEach(e => console.log(e.action, e.created_at));
2829
+ * }
2830
+ * ```
2831
+ */
2832
+ async auditTrail(id, requestOptions) {
2833
+ return this.http.get(
2834
+ `/signatures/${id}/audit-trail`,
2835
+ void 0,
2836
+ requestOptions
2837
+ );
2838
+ }
2811
2839
  };
2812
2840
 
2813
2841
  // src/resources/webhooks.ts
@@ -3212,12 +3240,24 @@ var ScellApiClient = class {
3212
3240
  invoices;
3213
3241
  /** Signature operations (create, download, remind, cancel) */
3214
3242
  signatures;
3215
- /** Tenant credit notes operations (create, send, download) */
3216
- tenantCreditNotes;
3243
+ /** Sub-tenant management (provision, update, list) */
3244
+ subTenants;
3245
+ /** NF525 fiscal compliance (closings, FEC, attestation) */
3246
+ fiscal;
3247
+ /** Platform statistics */
3248
+ stats;
3249
+ /** Platform billing (usage, top-up, transactions) */
3250
+ billing;
3251
+ /** Credit notes operations (create, send, download) */
3252
+ creditNotes;
3253
+ /** Tenant invoice operations (create, submit, update, delete) */
3254
+ tenantInvoices;
3255
+ /** Incoming invoice operations (list, accept, reject) */
3256
+ incomingInvoices;
3217
3257
  /**
3218
3258
  * Create a new Scell API Client
3219
3259
  *
3220
- * @param apiKey - Your API key (from dashboard)
3260
+ * @param apiKey - Your API key (sk_live_xxx or sk_test_xxx)
3221
3261
  * @param config - Client configuration
3222
3262
  *
3223
3263
  * @example
@@ -3235,7 +3275,13 @@ var ScellApiClient = class {
3235
3275
  this.http = new HttpClient("api-key", apiKey, config);
3236
3276
  this.invoices = new InvoicesResource(this.http);
3237
3277
  this.signatures = new SignaturesResource(this.http);
3238
- this.tenantCreditNotes = new TenantCreditNotesResource(this.http);
3278
+ this.subTenants = new SubTenantsResource(this.http);
3279
+ this.fiscal = new FiscalResource(this.http);
3280
+ this.stats = new StatsResource(this.http);
3281
+ this.billing = new BillingResource(this.http);
3282
+ this.creditNotes = new TenantCreditNotesResource(this.http);
3283
+ this.tenantInvoices = new TenantDirectInvoicesResource(this.http);
3284
+ this.incomingInvoices = new TenantIncomingInvoicesResource(this.http);
3239
3285
  }
3240
3286
  };
3241
3287