@airxpay/init-sdk 1.0.5 → 1.0.8

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,11 +1,11 @@
1
1
  import { Seller } from "../types/sellerTypes";
2
- import { DeveloperKeys } from "../types/developerTypes";
2
+ import { Keys } from "../types/keys";
3
3
  import { ApiConfig } from "../config/apiConfig";
4
4
  export declare class AirXPay {
5
5
  private config;
6
6
  constructor(config?: Partial<ApiConfig>);
7
7
  private request;
8
- createSeller(seller: Seller, keys: DeveloperKeys): Promise<any>;
8
+ createSeller(seller: Seller, keys: Keys): Promise<any>;
9
9
  updateKyc(sellerId: string, docs: Record<string, string>): Promise<any>;
10
10
  updateBank(sellerId: string, bankDetails: Record<string, string>): Promise<any>;
11
11
  getPendingStatus(sellerId: string): Promise<any>;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  export { AirXPay } from "./api/sellerOnboardAPI";
2
- export type { Seller } from "./types/sellerTypes";
3
- export type { DeveloperKeys } from "./types/developerTypes";
2
+ export type { Seller, OnboardedPlatform, BusinessType, Mode, SellerStatus } from "./types/sellerTypes";
3
+ export type { Keys } from "./types/keys";
4
+ export type { BankDetails } from "./types/bank";
5
+ export type { KycDocuments, KycStatus } from "./types/kyc";
6
+ export type { ApiConfig } from "./config/apiConfig";
4
7
  export { validateKeys } from "./utils/validateKeys";
5
8
  export { base64ToBlob } from "./utils/uploadHelper";
package/dist/index.js CHANGED
@@ -1,10 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.base64ToBlob = exports.validateKeys = exports.AirXPay = void 0;
4
+ // --------------------------
4
5
  // ✅ Main SDK class (explicit export)
6
+ // --------------------------
5
7
  var sellerOnboardAPI_1 = require("./api/sellerOnboardAPI");
6
8
  Object.defineProperty(exports, "AirXPay", { enumerable: true, get: function () { return sellerOnboardAPI_1.AirXPay; } });
9
+ // --------------------------
7
10
  // ✅ Utilities (optional public API)
11
+ // --------------------------
8
12
  var validateKeys_1 = require("./utils/validateKeys");
9
13
  Object.defineProperty(exports, "validateKeys", { enumerable: true, get: function () { return validateKeys_1.validateKeys; } });
10
14
  var uploadHelper_1 = require("./utils/uploadHelper");
@@ -1,8 +1,8 @@
1
- export interface BankDetails {
2
- accountHolderName?: string;
3
- bankName?: string;
4
- accountNumber?: string;
5
- ifscCode?: string;
6
- upiId?: string;
7
- cancelledChequeUrl?: string;
8
- }
1
+ export interface BankDetails {
2
+ accountHolderName?: string;
3
+ bankName?: string;
4
+ accountNumber?: string;
5
+ ifscCode?: string;
6
+ upiId?: string;
7
+ cancelledChequeUrl?: string;
8
+ }
@@ -0,0 +1,8 @@
1
+ export interface BankDetails {
2
+ accountHolderName?: string;
3
+ bankName?: string;
4
+ accountNumber?: string;
5
+ ifscCode?: string;
6
+ upiId?: string;
7
+ cancelledChequeUrl?: string;
8
+ }
@@ -1,5 +1,5 @@
1
- export interface Keys {
2
- publicKey: string;
3
- secretKey: string;
4
- clientKey: string;
5
- }
1
+ export interface Keys {
2
+ publicKey: string;
3
+ secretKey: string;
4
+ clientKey: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,4 @@
1
- export interface DeveloperKeys {
1
+ export interface Keys {
2
2
  publicKey: string;
3
3
  secretKey: string;
4
4
  clientKey: string;
@@ -1,11 +1,10 @@
1
- export type KycStatus = "not_submitted" | "pending" | "verified" | "rejected";
2
-
3
- export interface KycDocuments {
4
- panCardUrl?: string;
5
- aadhaarUrl?: string;
6
- identityProofUrl?: string;
7
- addressProofUrl?: string;
8
- selfieUrl?: string;
9
- businessRegistrationUrl?: string;
10
- gstCertificateUrl?: string;
11
- }
1
+ export type KycStatus = "not_submitted" | "pending" | "verified" | "rejected";
2
+ export interface KycDocuments {
3
+ panCardUrl?: string;
4
+ aadhaarUrl?: string;
5
+ identityProofUrl?: string;
6
+ addressProofUrl?: string;
7
+ selfieUrl?: string;
8
+ businessRegistrationUrl?: string;
9
+ gstCertificateUrl?: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ export type KycStatus = "not_submitted" | "pending" | "verified" | "rejected";
2
+
3
+ export interface KycDocuments {
4
+ panCardUrl?: string;
5
+ aadhaarUrl?: string;
6
+ identityProofUrl?: string;
7
+ addressProofUrl?: string;
8
+ selfieUrl?: string;
9
+ businessRegistrationUrl?: string;
10
+ gstCertificateUrl?: string;
11
+ }
@@ -1,15 +1,35 @@
1
+ export type BusinessType = "individual" | "company";
2
+ export type Mode = "test" | "live";
3
+ export type SellerStatus = "active" | "suspended" | "blocked";
4
+ export interface OnboardedPlatform {
5
+ platformName: string;
6
+ platformId: string;
7
+ onboardedAt: Date;
8
+ }
1
9
  export interface Seller {
2
10
  sellerName: string;
3
11
  sellerEmail: string;
4
- sellerPhone: string;
5
- sellerDID?: string;
6
- walletId?: string;
7
- businessName: string;
8
- businessType: string;
12
+ sellerPhone?: string;
13
+ developerId: string;
14
+ developerUserId?: string;
15
+ developerClientKey: string;
16
+ sellerDID: string;
17
+ walletId: string;
18
+ businessName?: string;
19
+ businessType?: BusinessType;
9
20
  businessCategory?: string;
10
- country: string;
11
- dob?: string;
21
+ country?: string;
22
+ dob?: Date;
12
23
  nationality?: string;
13
- mode?: "test" | "live";
14
- metadata?: Record<string, any>;
24
+ mode: Mode;
25
+ kycStatus: "not_submitted" | "pending" | "verified" | "rejected";
26
+ isKycCompleted: boolean;
27
+ kycDocuments?: import("./kyc").KycDocuments;
28
+ bankDetails?: import("./bank").BankDetails;
29
+ isBankDetailsCompleted: boolean;
30
+ onboardedPlatforms: OnboardedPlatform[];
31
+ status: SellerStatus;
32
+ metadata?: any;
33
+ createdAt: Date;
34
+ updatedAt: Date;
15
35
  }
@@ -1,15 +1,46 @@
1
+ export type BusinessType = "individual" | "company";
2
+ export type Mode = "test" | "live";
3
+ export type SellerStatus = "active" | "suspended" | "blocked";
4
+
5
+ export interface OnboardedPlatform {
6
+ platformName: string;
7
+ platformId: string;
8
+ onboardedAt: Date;
9
+ }
10
+
1
11
  export interface Seller {
2
12
  sellerName: string;
3
13
  sellerEmail: string;
4
- sellerPhone: string;
5
- sellerDID?: string;
6
- walletId?: string;
7
- businessName: string;
8
- businessType: string;
14
+ sellerPhone?: string;
15
+
16
+ developerId: string;
17
+ developerUserId?: string;
18
+ developerClientKey: string;
19
+
20
+ sellerDID: string;
21
+ walletId: string;
22
+
23
+ businessName?: string;
24
+ businessType?: BusinessType;
9
25
  businessCategory?: string;
10
- country: string;
11
- dob?: string;
26
+ country?: string;
27
+ dob?: Date;
12
28
  nationality?: string;
13
- mode?: "test" | "live";
14
- metadata?: Record<string, any>;
29
+
30
+ mode: Mode;
31
+
32
+ kycStatus: "not_submitted" | "pending" | "verified" | "rejected";
33
+ isKycCompleted: boolean;
34
+
35
+ kycDocuments?: import("./kyc").KycDocuments;
36
+ bankDetails?: import("./bank").BankDetails;
37
+ isBankDetailsCompleted: boolean;
38
+
39
+ onboardedPlatforms: OnboardedPlatform[];
40
+
41
+ status: SellerStatus;
42
+ metadata?: any;
43
+
44
+ createdAt: Date;
45
+ updatedAt: Date;
15
46
  }
@@ -1,2 +1,2 @@
1
- import { DeveloperKeys } from "../types/developerTypes";
2
- export declare function validateKeys(keys: DeveloperKeys): boolean;
1
+ import { Keys } from "../types/keys";
2
+ export declare function validateKeys(keys: Keys): boolean;
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@airxpay/init-sdk",
3
- "version": "1.0.5",
3
+ "version": "1.0.8",
4
4
  "description": "AirXPay Flixora SDK - Seller Onboard",
5
5
  "author": "Tafseel Khan",
6
6
  "license": "MIT",
7
- "types": "dist/types/index.d.ts",
7
+ "types": "dist/index.d.ts",
8
8
  "main": "dist/index.js",
9
9
  "files": [
10
10
  "dist"
@@ -1,5 +0,0 @@
1
- export interface DeveloperKeys {
2
- publicKey: string;
3
- secretKey: string;
4
- clientKey: string;
5
- }
@@ -1,14 +0,0 @@
1
- declare module 'airxpay' {
2
- export * from './seller';
3
- export * from './bank';
4
- export * from './kyc';
5
- export * from './keys';
6
- }
7
- export declare class AirXPayTypes {
8
- constructor(config: { baseUrl: string; secretKey: string; clientKey: string });
9
-
10
- createSeller(seller: import('./seller').SellerData, keys: import('./keys').Keys): Promise<import('./seller').SellerData>;
11
- updateKyc(sellerId: string, docs: Partial<import('./kyc').KycDocuments>): Promise<import('./seller').SellerData>;
12
- updateBank(sellerId: string, bankDetails: Partial<import('./bank').BankDetails>): Promise<import('./seller').SellerData>;
13
- getPendingStatus(sellerId: string): Promise<{ status: import('./kyc').KycStatus | import('./seller').SellerStatus }>;
14
- }
@@ -1,46 +0,0 @@
1
- export type BusinessType = "individual" | "company";
2
- export type Mode = "test" | "live";
3
- export type SellerStatus = "active" | "suspended" | "blocked";
4
-
5
- export interface OnboardedPlatform {
6
- platformName: string;
7
- platformId: string;
8
- onboardedAt: Date;
9
- }
10
-
11
- export interface SellerData {
12
- sellerName: string;
13
- sellerEmail: string;
14
- sellerPhone?: string;
15
-
16
- developerId: string;
17
- developerUserId?: string;
18
- developerClientKey: string;
19
-
20
- sellerDID: string;
21
- walletId: string;
22
-
23
- businessName?: string;
24
- businessType?: BusinessType;
25
- businessCategory?: string;
26
- country?: string;
27
- dob?: Date;
28
- nationality?: string;
29
-
30
- mode: Mode;
31
-
32
- kycStatus: "not_submitted" | "pending" | "verified" | "rejected";
33
- isKycCompleted: boolean;
34
-
35
- kycDocuments?: import("./kyc").KycDocuments;
36
- bankDetails?: import("./bank").BankDetails;
37
- isBankDetailsCompleted: boolean;
38
-
39
- onboardedPlatforms: OnboardedPlatform[];
40
-
41
- status: SellerStatus;
42
- metadata?: any;
43
-
44
- createdAt: Date;
45
- updatedAt: Date;
46
- }
File without changes