@vaultsaas/core 0.1.1 → 0.1.3

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/dist/index.d.cts CHANGED
@@ -450,6 +450,7 @@ declare class VaultClient {
450
450
  private readonly idempotencyStore;
451
451
  private readonly idempotencyTtlMs;
452
452
  private readonly transactionProviderIndex;
453
+ close(): Promise<void>;
453
454
  constructor(config: VaultConfig);
454
455
  charge(request: ChargeRequest): Promise<PaymentResult>;
455
456
  authorize(request: AuthorizeRequest): Promise<PaymentResult>;
package/dist/index.d.ts CHANGED
@@ -450,6 +450,7 @@ declare class VaultClient {
450
450
  private readonly idempotencyStore;
451
451
  private readonly idempotencyTtlMs;
452
452
  private readonly transactionProviderIndex;
453
+ close(): Promise<void>;
453
454
  constructor(config: VaultConfig);
454
455
  charge(request: ChargeRequest): Promise<PaymentResult>;
455
456
  authorize(request: AuthorizeRequest): Promise<PaymentResult>;
package/dist/index.js CHANGED
@@ -2953,6 +2953,12 @@ var VaultClient = class {
2953
2953
  idempotencyStore;
2954
2954
  idempotencyTtlMs;
2955
2955
  transactionProviderIndex = /* @__PURE__ */ new Map();
2956
+ async close() {
2957
+ if (this.platformConnector) {
2958
+ await this.platformConnector.flush();
2959
+ this.platformConnector.close();
2960
+ }
2961
+ }
2956
2962
  constructor(config) {
2957
2963
  validateVaultConfig(config);
2958
2964
  this.config = config;