@internxt/sdk 1.9.20 → 1.9.21

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.
@@ -14,21 +14,21 @@ export declare class ObjectStorage {
14
14
  static client(apiUrl: ApiUrl, appDetails: AppDetails): ObjectStorage;
15
15
  private constructor();
16
16
  getObjectStoragePlanById(priceId: string, currency?: string): Promise<ObjectStoragePlan>;
17
- createCustomerForObjectStorage({ name, email, country, companyVatId, }: {
18
- name: string;
17
+ getObjectStorageCustomerId({ customerName, email, country, postalCode, companyVatId, }: {
18
+ customerName: string;
19
19
  email: string;
20
- country?: string;
20
+ country: string;
21
+ postalCode: string;
21
22
  companyVatId?: string;
22
23
  }): Promise<{
23
24
  customerId: string;
24
25
  token: string;
25
26
  }>;
26
- createObjectStorageSubscription({ customerId, plan, token, companyName, vatId, promoCodeId, }: {
27
+ createObjectStorageSubscription({ customerId, priceId, currency, token, promoCodeId, }: {
27
28
  customerId: string;
28
- plan: ObjectStoragePlan;
29
+ priceId: string;
30
+ currency: string;
29
31
  token: string;
30
- companyName: string;
31
- vatId: string;
32
32
  promoCodeId?: string;
33
33
  }): Promise<CreatedSubscriptionData>;
34
34
  private headers;
@@ -15,27 +15,25 @@ var ObjectStorage = /** @class */ (function () {
15
15
  var query = new URLSearchParams();
16
16
  priceId !== undefined && query.set('planId', priceId);
17
17
  currency !== undefined && query.set('currency', currency);
18
- return this.client.get("/object-storage-plan-by-id?".concat(query.toString()), this.headers());
18
+ return this.client.get("/object-storage/price?".concat(query.toString()), this.headers());
19
19
  };
20
- ObjectStorage.prototype.createCustomerForObjectStorage = function (_a) {
21
- var name = _a.name, email = _a.email, country = _a.country, companyVatId = _a.companyVatId;
22
- return this.client.post('/create-customer-for-object-storage', {
23
- name: name,
24
- email: email,
25
- country: country,
26
- companyVatId: companyVatId,
27
- }, this.headers());
20
+ ObjectStorage.prototype.getObjectStorageCustomerId = function (_a) {
21
+ var customerName = _a.customerName, email = _a.email, country = _a.country, postalCode = _a.postalCode, companyVatId = _a.companyVatId;
22
+ var query = new URLSearchParams();
23
+ query.set('customerName', customerName);
24
+ query.set('email', email);
25
+ query.set('postalCode', postalCode);
26
+ query.set('country', country);
27
+ companyVatId !== undefined && query.set('companyVatId', companyVatId);
28
+ return this.client.get("/object-storage/customer?".concat(query.toString()), this.headers());
28
29
  };
29
30
  ObjectStorage.prototype.createObjectStorageSubscription = function (_a) {
30
- var customerId = _a.customerId, plan = _a.plan, token = _a.token, companyName = _a.companyName, vatId = _a.vatId, promoCodeId = _a.promoCodeId;
31
- var priceId = plan.id, currency = plan.currency;
32
- return this.client.post('/create-subscription-for-object-storage', {
31
+ var customerId = _a.customerId, priceId = _a.priceId, currency = _a.currency, token = _a.token, promoCodeId = _a.promoCodeId;
32
+ return this.client.post('/object-storage/subscription', {
33
33
  customerId: customerId,
34
34
  priceId: priceId,
35
- token: token,
36
35
  currency: currency,
37
- companyName: companyName,
38
- companyVatId: vatId,
36
+ token: token,
39
37
  promoCodeId: promoCodeId,
40
38
  }, this.headers());
41
39
  };
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.20",
4
+ "version": "1.9.21",
5
5
  "description": "An sdk for interacting with Internxt's services",
6
6
  "repository": {
7
7
  "type": "git",