@internxt/sdk 1.9.26 → 1.9.28

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.
@@ -54,6 +54,13 @@ export declare class Backups {
54
54
  * @returns A promise that resolves when the device is successfully deleted.
55
55
  */
56
56
  deleteBackupDevice(deviceId: number): Promise<void>;
57
+ /**
58
+ * Deletes a backup device by its folder ID.
59
+ *
60
+ * @param folderId - The unique identifier of the folder to be deleted.
61
+ * @returns A promise that resolves when the device is successfully deleted.
62
+ */
63
+ deleteBackupDeviceAsFolder(folderId: string): Promise<void>;
57
64
  /**
58
65
  * Returns the needed headers for the module requests
59
66
  * @private
@@ -80,6 +80,16 @@ var Backups = /** @class */ (function () {
80
80
  return this.client
81
81
  .delete("/backup/devices/".concat(deviceId), this.headers());
82
82
  };
83
+ /**
84
+ * Deletes a backup device by its folder ID.
85
+ *
86
+ * @param folderId - The unique identifier of the folder to be deleted.
87
+ * @returns A promise that resolves when the device is successfully deleted.
88
+ */
89
+ Backups.prototype.deleteBackupDeviceAsFolder = function (folderId) {
90
+ return this.client
91
+ .delete("/backup/deviceAsFolder/".concat(folderId), this.headers());
92
+ };
83
93
  /**
84
94
  * Returns the needed headers for the module requests
85
95
  * @private
@@ -1,3 +1,4 @@
1
+ import { PaymentMethodVerification, PaymentMethodVerificationPayload } from 'src/payments/types';
1
2
  import { ApiUrl, AppDetails } from '../../shared';
2
3
  import { CreatedSubscriptionData } from './types/types';
3
4
  interface ObjectStoragePlan {
@@ -31,6 +32,7 @@ export declare class ObjectStorage {
31
32
  token: string;
32
33
  promoCodeId?: string;
33
34
  }): Promise<CreatedSubscriptionData>;
35
+ paymentMethodVerification({ customerId, token, currency, priceId, paymentMethod, }: PaymentMethodVerificationPayload): Promise<PaymentMethodVerification>;
34
36
  private headers;
35
37
  }
36
38
  export {};
@@ -13,7 +13,7 @@ var ObjectStorage = /** @class */ (function () {
13
13
  };
14
14
  ObjectStorage.prototype.getObjectStoragePlanById = function (priceId, currency) {
15
15
  var query = new URLSearchParams();
16
- priceId !== undefined && query.set('planId', priceId);
16
+ query.set('planId', priceId);
17
17
  currency !== undefined && query.set('currency', currency);
18
18
  return this.client.get("/object-storage/price?".concat(query.toString()), this.headers());
19
19
  };
@@ -37,6 +37,16 @@ var ObjectStorage = /** @class */ (function () {
37
37
  promoCodeId: promoCodeId,
38
38
  }, this.headers());
39
39
  };
40
+ ObjectStorage.prototype.paymentMethodVerification = function (_a) {
41
+ var customerId = _a.customerId, token = _a.token, _b = _a.currency, currency = _b === void 0 ? 'eur' : _b, priceId = _a.priceId, paymentMethod = _a.paymentMethod;
42
+ return this.client.post('/payment-method-verification', {
43
+ customerId: customerId,
44
+ token: token,
45
+ currency: currency,
46
+ priceId: priceId,
47
+ paymentMethod: paymentMethod,
48
+ }, this.headers());
49
+ };
40
50
  ObjectStorage.prototype.headers = function () {
41
51
  return (0, headers_1.basicHeaders)(this.appDetails.clientName, this.appDetails.clientVersion);
42
52
  };
@@ -14,6 +14,18 @@ export interface CreatePaymentIntentPayload {
14
14
  currency?: string;
15
15
  promoCodeId?: string;
16
16
  }
17
+ export interface PaymentMethodVerificationPayload {
18
+ customerId: string;
19
+ token: string;
20
+ paymentMethod: string;
21
+ priceId: string;
22
+ currency?: string;
23
+ }
24
+ export interface PaymentMethodVerification {
25
+ intentId: string;
26
+ verified: boolean;
27
+ clientSecret?: string;
28
+ }
17
29
  export interface GetPriceByIdPayload {
18
30
  priceId: string;
19
31
  promoCodeName?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@internxt/sdk",
3
3
  "author": "Internxt <hello@internxt.com>",
4
- "version": "1.9.26",
4
+ "version": "1.9.28",
5
5
  "description": "An sdk for interacting with Internxt's services",
6
6
  "repository": {
7
7
  "type": "git",