@internxt/sdk 1.9.6 → 1.9.7

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.
@@ -1,5 +1,5 @@
1
1
  import { ApiSecurity, ApiUrl, AppDetails } from '../../shared';
2
- import { CreateCheckoutSessionPayload, CreatedSubscriptionData, CreatePaymentSessionPayload, CustomerBillingInfo, DisplayPrice, FreeTrialAvailable, Invoice, InvoicePayload, PaymentMethod, ProductData, RedeemCodePayload, UpdateSubscriptionPaymentMethod, UserSubscription, UserType } from './types';
2
+ import { AvailableProducts, CreateCheckoutSessionPayload, CreatedSubscriptionData, CreatePaymentSessionPayload, CustomerBillingInfo, DisplayPrice, FreeTrialAvailable, Invoice, InvoicePayload, PaymentMethod, ProductData, RedeemCodePayload, UpdateSubscriptionPaymentMethod, UserSubscription, UserType } from './types';
3
3
  export declare class Payments {
4
4
  private readonly client;
5
5
  private readonly appDetails;
@@ -58,6 +58,11 @@ export declare class Payments {
58
58
  sessionId: string;
59
59
  }>;
60
60
  updateCustomerBillingInfo(payload: CustomerBillingInfo): Promise<void>;
61
+ /**
62
+ * Gets the available products from the user
63
+ * @returns an object containing available products
64
+ */
65
+ checkUserAvailableProducts(): Promise<AvailableProducts>;
61
66
  /**
62
67
  * Returns the needed headers for the module requests
63
68
  * @private
@@ -197,6 +197,13 @@ var Payments = /** @class */ (function () {
197
197
  Payments.prototype.updateCustomerBillingInfo = function (payload) {
198
198
  return this.client.patch('/billing', __assign({}, payload), this.headers());
199
199
  };
200
+ /**
201
+ * Gets the available products from the user
202
+ * @returns an object containing available products
203
+ */
204
+ Payments.prototype.checkUserAvailableProducts = function () {
205
+ return this.client.get('/products', this.headers());
206
+ };
200
207
  /**
201
208
  * Returns the needed headers for the module requests
202
209
  * @private
@@ -179,3 +179,8 @@ export type CreatedSubscriptionData = {
179
179
  subscriptionId?: string;
180
180
  paymentIntentId?: string;
181
181
  };
182
+ export type AvailableProducts = {
183
+ featuresPerService: {
184
+ antivirus: boolean;
185
+ };
186
+ };
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.6",
4
+ "version": "1.9.7",
5
5
  "description": "An sdk for interacting with Internxt's services",
6
6
  "repository": {
7
7
  "type": "git",