@internxt/sdk 1.11.25 → 1.11.26

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,7 +1,7 @@
1
1
  import { paths } from '../../schema';
2
2
  import { ApiSecurity, ApiUrl, AppDetails } from '../../shared';
3
3
  import { UserSettings } from '../../shared/types/userSettings';
4
- import { ChangePasswordPayload, ChangePasswordPayloadNew, CheckChangeEmailExpirationResponse, FriendInvite, InitializeUserResponse, PreCreateUserResponse, Token, UpdateProfilePayload, UserPublicKeyResponse, UserPublicKeyWithCreationResponse, VerifyEmailChangeResponse } from './types';
4
+ import { ChangePasswordPayload, ChangePasswordPayloadNew, CheckChangeEmailExpirationResponse, FriendInvite, IncompleteCheckoutPayload, IncompleteCheckoutResponse, InitializeUserResponse, PreCreateUserResponse, Token, UpdateProfilePayload, UserPublicKeyResponse, UserPublicKeyWithCreationResponse, VerifyEmailChangeResponse } from './types';
5
5
  import { UserKeys } from '../../auth/types';
6
6
  export * as UserTypes from './types';
7
7
  export declare class Users {
@@ -201,6 +201,12 @@ export declare class Users {
201
201
  generateMnemonic(): Promise<{
202
202
  mnemonic: string;
203
203
  }>;
204
+ /**
205
+ * Tracks incomplete checkout event and sends notification email when user abandons checkout process
206
+ * @param payload - The incomplete checkout data containing checkout URL, plan name and price
207
+ * @returns A promise that resolves when the event is tracked successfully
208
+ */
209
+ handleIncompleteCheckout(payload: IncompleteCheckoutPayload): Promise<IncompleteCheckoutResponse>;
204
210
  private basicHeaders;
205
211
  private headers;
206
212
  private headersWithToken;
@@ -344,6 +344,14 @@ var Users = /** @class */ (function () {
344
344
  Users.prototype.generateMnemonic = function () {
345
345
  return this.client.get('/users/generate-mnemonic', this.basicHeaders());
346
346
  };
347
+ /**
348
+ * Tracks incomplete checkout event and sends notification email when user abandons checkout process
349
+ * @param payload - The incomplete checkout data containing checkout URL, plan name and price
350
+ * @returns A promise that resolves when the event is tracked successfully
351
+ */
352
+ Users.prototype.handleIncompleteCheckout = function (payload) {
353
+ return this.client.post('/users/payments/incomplete-checkout', payload, this.headers());
354
+ };
347
355
  Users.prototype.basicHeaders = function () {
348
356
  return (0, headers_1.basicHeaders)({
349
357
  clientName: this.appDetails.clientName,
@@ -76,3 +76,12 @@ export type VerifyEmailChangeResponse = {
76
76
  export type CheckChangeEmailExpirationResponse = {
77
77
  isExpired: boolean;
78
78
  };
79
+ export interface IncompleteCheckoutPayload extends Record<string, unknown> {
80
+ completeCheckoutUrl: string;
81
+ planName?: string;
82
+ price?: number;
83
+ }
84
+ export interface IncompleteCheckoutResponse {
85
+ success: boolean;
86
+ message: string;
87
+ }
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.11.25",
4
+ "version": "1.11.26",
5
5
  "description": "An sdk for interacting with Internxt's services",
6
6
  "repository": {
7
7
  "type": "git",