@multimegas/sdk-js 0.0.1

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.
Files changed (56) hide show
  1. package/README.md +1 -0
  2. package/dist/client.d.ts +35 -0
  3. package/dist/client.d.ts.map +1 -0
  4. package/dist/client.js +63 -0
  5. package/dist/index.d.ts +8 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +8 -0
  8. package/dist/services/AuthService.d.ts +32 -0
  9. package/dist/services/AuthService.d.ts.map +1 -0
  10. package/dist/services/AuthService.js +39 -0
  11. package/dist/services/HealthService.d.ts +11 -0
  12. package/dist/services/HealthService.d.ts.map +1 -0
  13. package/dist/services/HealthService.js +11 -0
  14. package/dist/services/OrderService.d.ts +13 -0
  15. package/dist/services/OrderService.d.ts.map +1 -0
  16. package/dist/services/OrderService.js +13 -0
  17. package/dist/services/ProductService.d.ts +8 -0
  18. package/dist/services/ProductService.d.ts.map +1 -0
  19. package/dist/services/ProductService.js +8 -0
  20. package/dist/services/PublicService.d.ts +13 -0
  21. package/dist/services/PublicService.d.ts.map +1 -0
  22. package/dist/services/PublicService.js +23 -0
  23. package/dist/services/ReferralService.d.ts +9 -0
  24. package/dist/services/ReferralService.d.ts.map +1 -0
  25. package/dist/services/ReferralService.js +11 -0
  26. package/dist/services/RegistrationService.d.ts +41 -0
  27. package/dist/services/RegistrationService.d.ts.map +1 -0
  28. package/dist/services/RegistrationService.js +35 -0
  29. package/dist/services/ShippingService.d.ts +8 -0
  30. package/dist/services/ShippingService.d.ts.map +1 -0
  31. package/dist/services/ShippingService.js +8 -0
  32. package/dist/services/StoreService.d.ts +11 -0
  33. package/dist/services/StoreService.d.ts.map +1 -0
  34. package/dist/services/StoreService.js +8 -0
  35. package/dist/services/UserService.d.ts +34 -0
  36. package/dist/services/UserService.d.ts.map +1 -0
  37. package/dist/services/UserService.js +57 -0
  38. package/dist/services/WebRegisterService.d.ts +17 -0
  39. package/dist/services/WebRegisterService.d.ts.map +1 -0
  40. package/dist/services/WebRegisterService.js +14 -0
  41. package/dist/types/config.d.ts +6 -0
  42. package/dist/types/config.d.ts.map +1 -0
  43. package/dist/types/config.js +1 -0
  44. package/dist/types/entities.d.ts +181 -0
  45. package/dist/types/entities.d.ts.map +1 -0
  46. package/dist/types/entities.js +1 -0
  47. package/dist/types/enums.d.ts +82 -0
  48. package/dist/types/enums.d.ts.map +1 -0
  49. package/dist/types/enums.js +95 -0
  50. package/dist/types/requests.d.ts +89 -0
  51. package/dist/types/requests.d.ts.map +1 -0
  52. package/dist/types/requests.js +1 -0
  53. package/dist/types/responses.d.ts +42 -0
  54. package/dist/types/responses.d.ts.map +1 -0
  55. package/dist/types/responses.js +1 -0
  56. package/package.json +26 -0
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # sdk
@@ -0,0 +1,35 @@
1
+ import { MultimegasClientConfig } from './types/config';
2
+ import { AuthService } from './services/AuthService';
3
+ import { RegistrationService } from './services/RegistrationService';
4
+ import { UserService } from './services/UserService';
5
+ import { OrderService } from './services/OrderService';
6
+ import { ProductService } from './services/ProductService';
7
+ import { ShippingService } from './services/ShippingService';
8
+ import { ReferralService } from './services/ReferralService';
9
+ import { StoreService } from './services/StoreService';
10
+ import { PublicService } from './services/PublicService';
11
+ import { HealthService } from './services/HealthService';
12
+ import { WebRegisterService } from './services/WebRegisterService';
13
+ export declare class MultimegasClient {
14
+ private api;
15
+ private sessionToken?;
16
+ private registrationToken?;
17
+ readonly auth: AuthService;
18
+ readonly registration: RegistrationService;
19
+ readonly user: UserService;
20
+ readonly orders: OrderService;
21
+ readonly products: ProductService;
22
+ readonly shipping: ShippingService;
23
+ readonly referrals: ReferralService;
24
+ readonly store: StoreService;
25
+ readonly public: PublicService;
26
+ readonly health: HealthService;
27
+ readonly webRegister: WebRegisterService;
28
+ constructor(config?: MultimegasClientConfig);
29
+ setSessionToken(token: string): void;
30
+ setRegistrationToken(token: string): void;
31
+ clearTokens(): void;
32
+ getSessionToken(): string | undefined;
33
+ getRegistrationToken(): string | undefined;
34
+ }
35
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,qBAAa,gBAAgB;IACzB,OAAO,CAAC,GAAG,CAAgB;IAC3B,OAAO,CAAC,YAAY,CAAC,CAAS;IAC9B,OAAO,CAAC,iBAAiB,CAAC,CAAS;IAGnC,SAAgB,IAAI,EAAE,WAAW,CAAC;IAClC,SAAgB,YAAY,EAAE,mBAAmB,CAAC;IAClD,SAAgB,IAAI,EAAE,WAAW,CAAC;IAClC,SAAgB,MAAM,EAAE,YAAY,CAAC;IACrC,SAAgB,QAAQ,EAAE,cAAc,CAAC;IACzC,SAAgB,QAAQ,EAAE,eAAe,CAAC;IAC1C,SAAgB,SAAS,EAAE,eAAe,CAAC;IAC3C,SAAgB,KAAK,EAAE,YAAY,CAAC;IACpC,SAAgB,MAAM,EAAE,aAAa,CAAC;IACtC,SAAgB,MAAM,EAAE,aAAa,CAAC;IACtC,SAAgB,WAAW,EAAE,kBAAkB,CAAC;gBAEpC,MAAM,GAAE,sBAA2B;IAkC/C,eAAe,CAAC,KAAK,EAAE,MAAM;IAI7B,oBAAoB,CAAC,KAAK,EAAE,MAAM;IAIlC,WAAW;IAKX,eAAe,IAAI,MAAM,GAAG,SAAS;IAIrC,oBAAoB,IAAI,MAAM,GAAG,SAAS;CAG7C"}
package/dist/client.js ADDED
@@ -0,0 +1,63 @@
1
+ // ==================== src/client.ts ====================
2
+ import axios from 'axios';
3
+ import { AuthService } from './services/AuthService';
4
+ import { RegistrationService } from './services/RegistrationService';
5
+ import { UserService } from './services/UserService';
6
+ import { OrderService } from './services/OrderService';
7
+ import { ProductService } from './services/ProductService';
8
+ import { ShippingService } from './services/ShippingService';
9
+ import { ReferralService } from './services/ReferralService';
10
+ import { StoreService } from './services/StoreService';
11
+ import { PublicService } from './services/PublicService';
12
+ import { HealthService } from './services/HealthService';
13
+ import { WebRegisterService } from './services/WebRegisterService';
14
+ export class MultimegasClient {
15
+ constructor(config = {}) {
16
+ this.api = axios.create({
17
+ baseURL: config.baseURL || 'http://localhost:3000',
18
+ timeout: config.timeout || 30000,
19
+ headers: {
20
+ 'Content-Type': 'application/json',
21
+ ...config.headers,
22
+ },
23
+ });
24
+ // Request interceptor
25
+ this.api.interceptors.request.use((config) => {
26
+ if (this.sessionToken) {
27
+ config.headers.Authorization = `Bearer ${this.sessionToken}`;
28
+ }
29
+ else if (this.registrationToken) {
30
+ config.headers.Authorization = `Bearer ${this.registrationToken}`;
31
+ }
32
+ return config;
33
+ });
34
+ // Initialize services
35
+ this.auth = new AuthService(this.api);
36
+ this.registration = new RegistrationService(this.api);
37
+ this.user = new UserService(this.api);
38
+ this.orders = new OrderService(this.api);
39
+ this.products = new ProductService(this.api);
40
+ this.shipping = new ShippingService(this.api);
41
+ this.referrals = new ReferralService(this.api);
42
+ this.store = new StoreService(this.api);
43
+ this.public = new PublicService(this.api);
44
+ this.health = new HealthService(this.api);
45
+ this.webRegister = new WebRegisterService(this.api);
46
+ }
47
+ setSessionToken(token) {
48
+ this.sessionToken = token;
49
+ }
50
+ setRegistrationToken(token) {
51
+ this.registrationToken = token;
52
+ }
53
+ clearTokens() {
54
+ this.sessionToken = undefined;
55
+ this.registrationToken = undefined;
56
+ }
57
+ getSessionToken() {
58
+ return this.sessionToken;
59
+ }
60
+ getRegistrationToken() {
61
+ return this.registrationToken;
62
+ }
63
+ }
@@ -0,0 +1,8 @@
1
+ export * from './client';
2
+ export * from './types/enums';
3
+ export * from './types/entities';
4
+ export * from './types/requests';
5
+ export * from './types/responses';
6
+ export * from './types/config';
7
+ export { MultimegasClient } from './client';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ // ==================== src/index.ts ====================
2
+ export * from './client';
3
+ export * from './types/enums';
4
+ export * from './types/entities';
5
+ export * from './types/requests';
6
+ export * from './types/responses';
7
+ export * from './types/config';
8
+ export { MultimegasClient } from './client';
@@ -0,0 +1,32 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { LoginRequest, SendOTPRequest, VerifyOTPRequest } from '../types/requests';
3
+ import { TokenResponse, LoginResponse } from '../types/responses';
4
+ export declare class AuthService {
5
+ private api;
6
+ constructor(api: AxiosInstance);
7
+ checkPhoneBrand(phoneNumber: string, countryCode?: string): Promise<import("axios").AxiosResponse<{
8
+ carrier: string | null;
9
+ type: "referrer" | "new";
10
+ }, any, {}>>;
11
+ checkPhone(phoneNumber: string, countryCode?: string): Promise<import("axios").AxiosResponse<{
12
+ message: string;
13
+ }, any, {}>>;
14
+ checkAlias(alias: string, suggest?: boolean): Promise<import("axios").AxiosResponse<{
15
+ available: boolean;
16
+ suggestions: string[];
17
+ }, any, {}>>;
18
+ checkParentAlias(alias: string): Promise<import("axios").AxiosResponse<{
19
+ exists: boolean;
20
+ }, any, {}>>;
21
+ sendOTP(data: SendOTPRequest): Promise<import("axios").AxiosResponse<{
22
+ message?: string;
23
+ provider: "whatsapp" | "sms";
24
+ }, any, {}>>;
25
+ verifyOTP(data: VerifyOTPRequest): Promise<import("axios").AxiosResponse<TokenResponse, any, {}>>;
26
+ login(data: LoginRequest): Promise<import("axios").AxiosResponse<LoginResponse, any, {}>>;
27
+ validateNIP(nip: string): Promise<import("axios").AxiosResponse<{
28
+ message: string;
29
+ }, any, {}>>;
30
+ refreshToken(refreshToken: string): Promise<import("axios").AxiosResponse<TokenResponse, any, {}>>;
31
+ }
32
+ //# sourceMappingURL=AuthService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthService.d.ts","sourceRoot":"","sources":["../../src/services/AuthService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EACH,YAAY,EACZ,cAAc,EACd,gBAAgB,EACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAElE,qBAAa,WAAW;IACR,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAEhC,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,SAAQ;iBAC1B,MAAM,GAAG,IAAI;cAAQ,UAAU,GAAG,KAAK;;IAMrE,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,SAAQ;iBACrB,MAAM;;IAMpC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,UAAQ;mBACT,OAAO;qBAAe,MAAM,EAAE;;IAM9D,gBAAgB,CAAC,KAAK,EAAE,MAAM;gBACD,OAAO;;IAKpC,OAAO,CAAC,IAAI,EAAE,cAAc;kBACG,MAAM;kBAAY,UAAU,GAAG,KAAK;;IAMnE,SAAS,CAAC,IAAI,EAAE,gBAAgB;IAIhC,KAAK,CAAC,IAAI,EAAE,YAAY;IAIxB,WAAW,CAAC,GAAG,EAAE,MAAM;iBACO,MAAM;;IAGpC,YAAY,CAAC,YAAY,EAAE,MAAM;CAK1C"}
@@ -0,0 +1,39 @@
1
+ export class AuthService {
2
+ constructor(api) {
3
+ this.api = api;
4
+ }
5
+ async checkPhoneBrand(phoneNumber, countryCode = '+52') {
6
+ return this.api.post('/auth/phone/brand', { phoneNumber, countryCode });
7
+ }
8
+ async checkPhone(phoneNumber, countryCode = '+52') {
9
+ return this.api.post('/auth/phone/check', {
10
+ phoneNumber,
11
+ countryCode,
12
+ });
13
+ }
14
+ async checkAlias(alias, suggest = false) {
15
+ return this.api.post('/auth/check-alias', { alias, suggest });
16
+ }
17
+ async checkParentAlias(alias) {
18
+ return this.api.post('/auth/check-parent-alias', {
19
+ alias,
20
+ });
21
+ }
22
+ async sendOTP(data) {
23
+ return this.api.post('/auth/send-otp', data);
24
+ }
25
+ async verifyOTP(data) {
26
+ return this.api.post('/auth/verify-otp', data);
27
+ }
28
+ async login(data) {
29
+ return this.api.post('/auth/login', data);
30
+ }
31
+ async validateNIP(nip) {
32
+ return this.api.post('/auth/validate-nip', { nip });
33
+ }
34
+ async refreshToken(refreshToken) {
35
+ return this.api.post('/auth/token/refresh', {
36
+ refreshToken,
37
+ });
38
+ }
39
+ }
@@ -0,0 +1,11 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { HealthCheckResponse } from '../types/responses';
3
+ export declare class HealthService {
4
+ private api;
5
+ constructor(api: AxiosInstance);
6
+ check(): Promise<import("axios").AxiosResponse<HealthCheckResponse, any, {}>>;
7
+ getStatus(): Promise<import("axios").AxiosResponse<{
8
+ 'Everything is awesome!': string;
9
+ }, any, {}>>;
10
+ }
11
+ //# sourceMappingURL=HealthService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HealthService.d.ts","sourceRoot":"","sources":["../../src/services/HealthService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,qBAAa,aAAa;IACV,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAEhC,KAAK;IAIL,SAAS;kCACqC,MAAM;;CAE7D"}
@@ -0,0 +1,11 @@
1
+ export class HealthService {
2
+ constructor(api) {
3
+ this.api = api;
4
+ }
5
+ async check() {
6
+ return this.api.get('/health/');
7
+ }
8
+ async getStatus() {
9
+ return this.api.get('/');
10
+ }
11
+ }
@@ -0,0 +1,13 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { Order } from '../types/entities';
3
+ import { OrderStatus } from '../types/enums';
4
+ export declare class OrderService {
5
+ private api;
6
+ constructor(api: AxiosInstance);
7
+ getOrders(): Promise<import("axios").AxiosResponse<Order[], any, {}>>;
8
+ updateStatus(id: string, status: OrderStatus): Promise<import("axios").AxiosResponse<{
9
+ message: string;
10
+ order: Order;
11
+ }, any, {}>>;
12
+ }
13
+ //# sourceMappingURL=OrderService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrderService.d.ts","sourceRoot":"","sources":["../../src/services/OrderService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,qBAAa,YAAY;IACT,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAEhC,SAAS;IAIT,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW;iBACb,MAAM;eAAS,KAAK;;CAI5D"}
@@ -0,0 +1,13 @@
1
+ export class OrderService {
2
+ constructor(api) {
3
+ this.api = api;
4
+ }
5
+ async getOrders() {
6
+ return this.api.get('/user/order/list');
7
+ }
8
+ async updateStatus(id, status) {
9
+ return this.api.patch(`/order/${id}`, {
10
+ status,
11
+ });
12
+ }
13
+ }
@@ -0,0 +1,8 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { Product } from '../types/entities';
3
+ export declare class ProductService {
4
+ private api;
5
+ constructor(api: AxiosInstance);
6
+ getAll(): Promise<import("axios").AxiosResponse<Product[], any, {}>>;
7
+ }
8
+ //# sourceMappingURL=ProductService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProductService.d.ts","sourceRoot":"","sources":["../../src/services/ProductService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,qBAAa,cAAc;IACX,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAEhC,MAAM;CAGf"}
@@ -0,0 +1,8 @@
1
+ export class ProductService {
2
+ constructor(api) {
3
+ this.api = api;
4
+ }
5
+ async getAll() {
6
+ return this.api.get('/products/');
7
+ }
8
+ }
@@ -0,0 +1,13 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { ESIMDevice, PaymentMethodInfo, RewardRule } from '../types/entities';
3
+ export declare class PublicService {
4
+ private api;
5
+ constructor(api: AxiosInstance);
6
+ getPrivacyPolicy(): Promise<import("axios").AxiosResponse<string, any, {}>>;
7
+ getAppTerms(): Promise<import("axios").AxiosResponse<string, any, {}>>;
8
+ getLoyaltyTerms(): Promise<import("axios").AxiosResponse<string, any, {}>>;
9
+ getESIMDevices(): Promise<import("axios").AxiosResponse<ESIMDevice[], any, {}>>;
10
+ getPaymentMethods(): Promise<import("axios").AxiosResponse<PaymentMethodInfo[], any, {}>>;
11
+ getRewardRules(): Promise<import("axios").AxiosResponse<RewardRule[], any, {}>>;
12
+ }
13
+ //# sourceMappingURL=PublicService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PublicService.d.ts","sourceRoot":"","sources":["../../src/services/PublicService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE9E,qBAAa,aAAa;IACV,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAEhC,gBAAgB;IAIhB,WAAW;IAIX,eAAe;IAIf,cAAc;IAId,iBAAiB;IAIjB,cAAc;CAGvB"}
@@ -0,0 +1,23 @@
1
+ export class PublicService {
2
+ constructor(api) {
3
+ this.api = api;
4
+ }
5
+ async getPrivacyPolicy() {
6
+ return this.api.get('/public/aviso-privacidad');
7
+ }
8
+ async getAppTerms() {
9
+ return this.api.get('/public/tycos-app');
10
+ }
11
+ async getLoyaltyTerms() {
12
+ return this.api.get('/public/tycos-lealtad');
13
+ }
14
+ async getESIMDevices() {
15
+ return this.api.get('/public/e-sims-devices');
16
+ }
17
+ async getPaymentMethods() {
18
+ return this.api.get('/public/payment-methods');
19
+ }
20
+ async getRewardRules() {
21
+ return this.api.get('/reward/rules');
22
+ }
23
+ }
@@ -0,0 +1,9 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { User, RewardTransaction } from '../types/entities';
3
+ export declare class ReferralService {
4
+ private api;
5
+ constructor(api: AxiosInstance);
6
+ getList(): Promise<import("axios").AxiosResponse<User[], any, {}>>;
7
+ getActivity(): Promise<import("axios").AxiosResponse<RewardTransaction[], any, {}>>;
8
+ }
9
+ //# sourceMappingURL=ReferralService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReferralService.d.ts","sourceRoot":"","sources":["../../src/services/ReferralService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,qBAAa,eAAe;IACZ,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAEhC,OAAO;IAIP,WAAW;CAGpB"}
@@ -0,0 +1,11 @@
1
+ export class ReferralService {
2
+ constructor(api) {
3
+ this.api = api;
4
+ }
5
+ async getList() {
6
+ return this.api.get('/referrals/list');
7
+ }
8
+ async getActivity() {
9
+ return this.api.get('/referrals/activity');
10
+ }
11
+ }
@@ -0,0 +1,41 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { RegisterLeadRequest, CreateNIPRequest, PersonalInfoRequest, AddPaymentMethodRequest, ProcessPaymentRequest, UpdateLocationRequest } from '../types/requests';
3
+ import { Address, PaymentMethodData, Order } from '../types/entities';
4
+ import { TokenResponse, RegisterStatusResponse, ShippingQuoteResponse } from '../types/responses';
5
+ export declare class RegistrationService {
6
+ private api;
7
+ constructor(api: AxiosInstance);
8
+ registerLead(data: RegisterLeadRequest): Promise<import("axios").AxiosResponse<{
9
+ userId: string;
10
+ message: string;
11
+ }, any, {}>>;
12
+ createNIP(data: CreateNIPRequest): Promise<import("axios").AxiosResponse<{
13
+ message: string;
14
+ }, any, {}>>;
15
+ savePersonalInfo(data: PersonalInfoRequest): Promise<import("axios").AxiosResponse<{
16
+ message: string;
17
+ address: Address;
18
+ }, any, {}>>;
19
+ registerAlias(alias: string): Promise<import("axios").AxiosResponse<TokenResponse & {
20
+ message: string;
21
+ }, any, {}>>;
22
+ selectPortability(requiredPortability: boolean): Promise<import("axios").AxiosResponse<{
23
+ message: string;
24
+ }, any, {}>>;
25
+ updateLocation(data: UpdateLocationRequest): Promise<import("axios").AxiosResponse<{
26
+ message: string;
27
+ latitude: string;
28
+ longitude: string;
29
+ }, any, {}>>;
30
+ getShippingQuote(): Promise<import("axios").AxiosResponse<ShippingQuoteResponse, any, {}>>;
31
+ addPaymentMethod(data: AddPaymentMethodRequest): Promise<import("axios").AxiosResponse<{
32
+ message: string;
33
+ paymentMethod: PaymentMethodData;
34
+ }, any, {}>>;
35
+ processPayment(data: ProcessPaymentRequest): Promise<import("axios").AxiosResponse<{
36
+ message: string;
37
+ order: Order;
38
+ }, any, {}>>;
39
+ getStatus(): Promise<import("axios").AxiosResponse<RegisterStatusResponse, any, {}>>;
40
+ }
41
+ //# sourceMappingURL=RegistrationService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RegistrationService.d.ts","sourceRoot":"","sources":["../../src/services/RegistrationService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EACH,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAElG,qBAAa,mBAAmB;IAChB,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAEhC,YAAY,CAAC,IAAI,EAAE,mBAAmB;gBACT,MAAM;iBAAW,MAAM;;IAMpD,SAAS,CAAC,IAAI,EAAE,gBAAgB;iBACF,MAAM;;IAMpC,gBAAgB,CAAC,IAAI,EAAE,mBAAmB;iBACZ,MAAM;iBAAW,OAAO;;IAMtD,aAAa,CAAC,KAAK,EAAE,MAAM;iBACmB,MAAM;;IAMpD,iBAAiB,CAAC,mBAAmB,EAAE,OAAO;iBAChB,MAAM;;IAMpC,cAAc,CAAC,IAAI,EAAE,qBAAqB;iBACZ,MAAM;kBAAY,MAAM;mBAAa,MAAM;;IAMzE,gBAAgB;IAIhB,gBAAgB,CAAC,IAAI,EAAE,uBAAuB;iBAChB,MAAM;uBAAiB,iBAAiB;;IAMtE,cAAc,CAAC,IAAI,EAAE,qBAAqB;iBACZ,MAAM;eAAS,KAAK;;IAMlD,SAAS;CAGlB"}
@@ -0,0 +1,35 @@
1
+ export class RegistrationService {
2
+ constructor(api) {
3
+ this.api = api;
4
+ }
5
+ async registerLead(data) {
6
+ return this.api.post('/auth/register/lead', data);
7
+ }
8
+ async createNIP(data) {
9
+ return this.api.post('/auth/register/create-nip', data);
10
+ }
11
+ async savePersonalInfo(data) {
12
+ return this.api.post('/auth/register/personal-info', data);
13
+ }
14
+ async registerAlias(alias) {
15
+ return this.api.post('/auth/register/alias', { alias });
16
+ }
17
+ async selectPortability(requiredPortability) {
18
+ return this.api.post('/auth/register/select-portability', { requiredPortability });
19
+ }
20
+ async updateLocation(data) {
21
+ return this.api.post('/auth/register/update-location', data);
22
+ }
23
+ async getShippingQuote() {
24
+ return this.api.post('/auth/register/shipping-quote');
25
+ }
26
+ async addPaymentMethod(data) {
27
+ return this.api.post('/auth/register/add-payment-method', data);
28
+ }
29
+ async processPayment(data) {
30
+ return this.api.post('/auth/register/pay', data);
31
+ }
32
+ async getStatus() {
33
+ return this.api.get('/auth/register/status');
34
+ }
35
+ }
@@ -0,0 +1,8 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { Quote } from '../types/entities';
3
+ export declare class ShippingService {
4
+ private api;
5
+ constructor(api: AxiosInstance);
6
+ createQuote(addressId: string): Promise<import("axios").AxiosResponse<Quote[], any, {}>>;
7
+ }
8
+ //# sourceMappingURL=ShippingService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShippingService.d.ts","sourceRoot":"","sources":["../../src/services/ShippingService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,qBAAa,eAAe;IACZ,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAEhC,WAAW,CAAC,SAAS,EAAE,MAAM;CAGtC"}
@@ -0,0 +1,8 @@
1
+ export class ShippingService {
2
+ constructor(api) {
3
+ this.api = api;
4
+ }
5
+ async createQuote(addressId) {
6
+ return this.api.post('/shipping/quote', { addressId });
7
+ }
8
+ }
@@ -0,0 +1,11 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { TopupRequest } from '../types/requests';
3
+ export declare class StoreService {
4
+ private api;
5
+ constructor(api: AxiosInstance);
6
+ requestTopup(data: TopupRequest): Promise<import("axios").AxiosResponse<{
7
+ success: boolean;
8
+ message: string;
9
+ }, any, {}>>;
10
+ }
11
+ //# sourceMappingURL=StoreService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StoreService.d.ts","sourceRoot":"","sources":["../../src/services/StoreService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,qBAAa,YAAY;IACT,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAEhC,YAAY,CAAC,IAAI,EAAE,YAAY;iBACD,OAAO;iBAAW,MAAM;;CAK/D"}
@@ -0,0 +1,8 @@
1
+ export class StoreService {
2
+ constructor(api) {
3
+ this.api = api;
4
+ }
5
+ async requestTopup(data) {
6
+ return this.api.post('/store/topup', data);
7
+ }
8
+ }
@@ -0,0 +1,34 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { UpdatePasswordRequest, UpdatePhoneNumberRequest, CreateAddressRequest, UpdateAddressRequest } from '../types/requests';
3
+ import { User, RewardAccount, PaymentMethodData, Address, Notification } from '../types/entities';
4
+ export declare class UserService {
5
+ private api;
6
+ constructor(api: AxiosInstance);
7
+ getProfile(): Promise<import("axios").AxiosResponse<User & {
8
+ rewardAccount: RewardAccount;
9
+ }, any, {}>>;
10
+ getRewardAccount(): Promise<import("axios").AxiosResponse<RewardAccount, any, {}>>;
11
+ getLevel(): Promise<import("axios").AxiosResponse<{
12
+ level: string;
13
+ }, any, {}>>;
14
+ getBalance(): Promise<import("axios").AxiosResponse<{
15
+ balance: string;
16
+ }, any, {}>>;
17
+ updatePassword(data: UpdatePasswordRequest): Promise<import("axios").AxiosResponse<{
18
+ message: string;
19
+ }, any, {}>>;
20
+ updatePhoneNumber(data: UpdatePhoneNumberRequest): Promise<import("axios").AxiosResponse<User, any, {}>>;
21
+ getPaymentMethods(): Promise<import("axios").AxiosResponse<PaymentMethodData[], any, {}>>;
22
+ createPaymentMethod(data: PaymentMethodData): Promise<import("axios").AxiosResponse<PaymentMethodData, any, {}>>;
23
+ deletePaymentMethod(id: string): Promise<import("axios").AxiosResponse<{
24
+ message: string;
25
+ }, any, {}>>;
26
+ getAddresses(): Promise<import("axios").AxiosResponse<Address[], any, {}>>;
27
+ createAddress(data: CreateAddressRequest): Promise<import("axios").AxiosResponse<Address, any, {}>>;
28
+ updateAddress(id: string, data: UpdateAddressRequest): Promise<import("axios").AxiosResponse<Address, any, {}>>;
29
+ getNotifications(includeRead?: boolean): Promise<import("axios").AxiosResponse<Notification[], any, {}>>;
30
+ getNotification(id: string): Promise<import("axios").AxiosResponse<Notification, any, {}>>;
31
+ deleteNotification(id: string): Promise<import("axios").AxiosResponse<Notification, any, {}>>;
32
+ bulkDeleteNotifications(notificationIds: string[]): Promise<import("axios").AxiosResponse<Notification[], any, {}>>;
33
+ }
34
+ //# sourceMappingURL=UserService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserService.d.ts","sourceRoot":"","sources":["../../src/services/UserService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EACH,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,iBAAiB,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAElG,qBAAa,WAAW;IACR,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAEhC,UAAU;uBACgC,aAAa;;IAGvD,gBAAgB;IAIhB,QAAQ;eACmB,MAAM;;IAGjC,UAAU;iBACmB,MAAM;;IAGnC,cAAc,CAAC,IAAI,EAAE,qBAAqB;iBACX,MAAM;;IAGrC,iBAAiB,CAAC,IAAI,EAAE,wBAAwB;IAIhD,iBAAiB;IAIjB,mBAAmB,CAAC,IAAI,EAAE,iBAAiB;IAI3C,mBAAmB,CAAC,EAAE,EAAE,MAAM;iBACE,MAAM;;IAGtC,YAAY;IAIZ,aAAa,CAAC,IAAI,EAAE,oBAAoB;IAIxC,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB;IAIpD,gBAAgB,CAAC,WAAW,UAAQ;IAMpC,eAAe,CAAC,EAAE,EAAE,MAAM;IAI1B,kBAAkB,CAAC,EAAE,EAAE,MAAM;IAI7B,uBAAuB,CAAC,eAAe,EAAE,MAAM,EAAE;CAK1D"}
@@ -0,0 +1,57 @@
1
+ export class UserService {
2
+ constructor(api) {
3
+ this.api = api;
4
+ }
5
+ async getProfile() {
6
+ return this.api.get('/user/profile');
7
+ }
8
+ async getRewardAccount() {
9
+ return this.api.get('/user/reward-account');
10
+ }
11
+ async getLevel() {
12
+ return this.api.get('/user/level');
13
+ }
14
+ async getBalance() {
15
+ return this.api.get('/user/balance');
16
+ }
17
+ async updatePassword(data) {
18
+ return this.api.patch('/user/password', data);
19
+ }
20
+ async updatePhoneNumber(data) {
21
+ return this.api.patch('/user/phone-number', data);
22
+ }
23
+ async getPaymentMethods() {
24
+ return this.api.get('/user/payment-methods/');
25
+ }
26
+ async createPaymentMethod(data) {
27
+ return this.api.post('/user/payment-methods/', data);
28
+ }
29
+ async deletePaymentMethod(id) {
30
+ return this.api.delete(`/user/payment-methods/${id}`);
31
+ }
32
+ async getAddresses() {
33
+ return this.api.get('/user/addresses/');
34
+ }
35
+ async createAddress(data) {
36
+ return this.api.post('/user/addresses/', data);
37
+ }
38
+ async updateAddress(id, data) {
39
+ return this.api.patch(`/user/addresses/${id}`, data);
40
+ }
41
+ async getNotifications(includeRead = false) {
42
+ return this.api.get('/user/notifications/', {
43
+ params: { includeRead },
44
+ });
45
+ }
46
+ async getNotification(id) {
47
+ return this.api.get(`/user/notifications/${id}`);
48
+ }
49
+ async deleteNotification(id) {
50
+ return this.api.delete(`/user/notifications/${id}`);
51
+ }
52
+ async bulkDeleteNotifications(notificationIds) {
53
+ return this.api.delete('/user/notifications/bulk', {
54
+ data: { notificationIds },
55
+ });
56
+ }
57
+ }
@@ -0,0 +1,17 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { CreateOrderRequest } from '../types/requests';
3
+ import { Order } from '../types/entities';
4
+ import { RegisterStatusResponse } from '../types/responses';
5
+ export declare class WebRegisterService {
6
+ private api;
7
+ constructor(api: AxiosInstance);
8
+ checkPhone(phoneNumber: string, countryCode?: string): Promise<import("axios").AxiosResponse<{
9
+ message: string;
10
+ }, any, {}>>;
11
+ createOrder(data: CreateOrderRequest): Promise<import("axios").AxiosResponse<{
12
+ message: string;
13
+ order: Order;
14
+ }, any, {}>>;
15
+ getStatus(): Promise<import("axios").AxiosResponse<RegisterStatusResponse, any, {}>>;
16
+ }
17
+ //# sourceMappingURL=WebRegisterService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebRegisterService.d.ts","sourceRoot":"","sources":["../../src/services/WebRegisterService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,qBAAa,kBAAkB;IACf,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAEhC,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,SAAQ;iBACrB,MAAM;;IAMpC,WAAW,CAAC,IAAI,EAAE,kBAAkB;iBACN,MAAM;eAAS,KAAK;;IAMlD,SAAS;CAGlB"}
@@ -0,0 +1,14 @@
1
+ export class WebRegisterService {
2
+ constructor(api) {
3
+ this.api = api;
4
+ }
5
+ async checkPhone(phoneNumber, countryCode = '+52') {
6
+ return this.api.post('/auth/web-register/check-phone', { phoneNumber, countryCode });
7
+ }
8
+ async createOrder(data) {
9
+ return this.api.post('/auth/web-register/create-order', data);
10
+ }
11
+ async getStatus() {
12
+ return this.api.get('/auth/web-register/status');
13
+ }
14
+ }
@@ -0,0 +1,6 @@
1
+ export interface MultimegasClientConfig {
2
+ baseURL?: string;
3
+ timeout?: number;
4
+ headers?: Record<string, string>;
5
+ }
6
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,sBAAsB;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,181 @@
1
+ import { RegisterStatus, UserStatus, OrderStatus, PaymentMethodType, Provider, RewardLevel, NotificationIcon, NotificationType, NotificationProvider, RewardTransactionType, RewardTransactionStatus, AccumulationType } from './enums';
2
+ export interface User {
3
+ id: string;
4
+ phone: string;
5
+ registerStatus: RegisterStatus;
6
+ status: UserStatus;
7
+ alias: string | null;
8
+ username: string | null;
9
+ firstName: string | null;
10
+ lastName: string | null;
11
+ email: string | null;
12
+ fullName?: string;
13
+ referralLink?: string;
14
+ }
15
+ export interface Address {
16
+ id: string;
17
+ street: string;
18
+ number: string;
19
+ intNumber: string | null;
20
+ zipCode: string;
21
+ locality: string | null;
22
+ district: string | null;
23
+ city: string;
24
+ state: string;
25
+ stateCode: string | null;
26
+ country: string;
27
+ countryCode: string;
28
+ reference: string | null;
29
+ latitude: string | null;
30
+ longitude: string | null;
31
+ userId?: string;
32
+ createdAt?: string;
33
+ updatedAt?: string;
34
+ deletedAt?: string | null;
35
+ }
36
+ export interface RewardAccount {
37
+ id: string;
38
+ balance: number;
39
+ level: RewardLevel;
40
+ levelExpiresAt: string | null;
41
+ lastActivityAt: string | null;
42
+ createdAt: string;
43
+ updatedAt: string;
44
+ isLocked: boolean;
45
+ }
46
+ export interface PaymentMethodData {
47
+ id: string;
48
+ userId: string;
49
+ type: PaymentMethodType;
50
+ providerId: string;
51
+ provider: Provider;
52
+ brand: string | null;
53
+ lastFour: string | null;
54
+ holderName: string | null;
55
+ isDefault: boolean;
56
+ isActive: boolean;
57
+ properties: Record<string, any>;
58
+ createdAt: string;
59
+ updatedAt: string;
60
+ }
61
+ export interface Product {
62
+ id: string;
63
+ sku: string;
64
+ name: string;
65
+ description: string | null;
66
+ provider: string;
67
+ price: number;
68
+ providerPrice: number;
69
+ properties: {
70
+ data: string[];
71
+ legals: string[];
72
+ bullets: string[];
73
+ countries: string[];
74
+ periodicity: string[];
75
+ unlimitedData: boolean;
76
+ socialNetworks: string[];
77
+ unlimitedSocialNetworks: boolean;
78
+ };
79
+ isActive: boolean;
80
+ tags: string[];
81
+ paymentAllowed: 'POINTS' | 'ANY' | 'TDC_ONLY' | null;
82
+ withSIM: boolean;
83
+ pointsPrice: number;
84
+ deletedAt: string | null;
85
+ createdAt: string;
86
+ updatedAt: string;
87
+ }
88
+ export interface Quote {
89
+ id: string;
90
+ carrier: string;
91
+ service: string;
92
+ carrierDescription: string;
93
+ serviceDescription: string;
94
+ deliveryEstimate: string;
95
+ totalPrice: number;
96
+ quotePrice: number;
97
+ }
98
+ export interface Order {
99
+ id: string;
100
+ userId: string;
101
+ productId: string;
102
+ quoteId: string | null;
103
+ paymentId: string;
104
+ addressId: string | null;
105
+ service: string | null;
106
+ carrier: string | null;
107
+ status: OrderStatus;
108
+ totalAmount: number;
109
+ trackingNumber: string | null;
110
+ trackingUrl: string | null;
111
+ label: string | null;
112
+ quantity: number;
113
+ simType: string | null;
114
+ createdAt: string;
115
+ updatedAt: string;
116
+ product?: Product;
117
+ quote?: any;
118
+ payment?: any;
119
+ address?: Address;
120
+ statusLog?: Array<{
121
+ status: OrderStatus;
122
+ description: string;
123
+ createdAt: string;
124
+ }>;
125
+ }
126
+ export interface Notification {
127
+ id: string;
128
+ type: NotificationType;
129
+ recipientId: string;
130
+ provider: NotificationProvider;
131
+ providerId: string;
132
+ content: string;
133
+ read: boolean;
134
+ createdAt: string;
135
+ updatedAt: string;
136
+ readAt: string | null;
137
+ icon: NotificationIcon;
138
+ actorId: string | null;
139
+ }
140
+ export interface RewardTransaction {
141
+ id: string;
142
+ sourceTxId: string | null;
143
+ userId: string;
144
+ accountId: string;
145
+ type: RewardTransactionType;
146
+ sourceEvent: string;
147
+ relatedUserId: string | null;
148
+ relatedAccountId: string | null;
149
+ amount: number;
150
+ rewardEarned: number;
151
+ status: RewardTransactionStatus;
152
+ createdAt: string;
153
+ description: string | null;
154
+ relatedUser: User;
155
+ }
156
+ export interface RewardRule {
157
+ id: string;
158
+ eventType: string;
159
+ appliesToLevel: RewardLevel | null;
160
+ channel: string | null;
161
+ isActive: boolean;
162
+ isForParent: boolean;
163
+ accumulationType: AccumulationType;
164
+ factor: string;
165
+ activeFrom: string | null;
166
+ activeTo: string | null;
167
+ notificationTemplate: string | null;
168
+ createdAt: string;
169
+ updatedAt: string;
170
+ }
171
+ export interface ESIMDevice {
172
+ brand: string;
173
+ devices: string[];
174
+ }
175
+ export interface PaymentMethodInfo {
176
+ id: string;
177
+ title: string;
178
+ subtitle: string;
179
+ icon: string;
180
+ }
181
+ //# sourceMappingURL=entities.d.ts.map
@@ -0,0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AAE,MAAM,GAAG,IAAI,CAAC;IAC7B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,uBAAuB,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,WAAW,GAAG,IAAI,CAAC;IACnC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,82 @@
1
+ export declare enum RegisterStatus {
2
+ START_REGISTER = "START_REGISTER",
3
+ START_REGISTER_NEW_FP_NUMBER = "START_REGISTER_NEW_FP_NUMBER",
4
+ CREATE_NIP = "CREATE_NIP",
5
+ INPUT_PERSONAL_INFO = "INPUT_PERSONAL_INFO",
6
+ SELECT_MULTITAG = "SELECT_MULTITAG",
7
+ SELECT_PORTABILITY = "SELECT_PORTABILITY",
8
+ SELECT_PACKAGE = "SELECT_PACKAGE",
9
+ INPUT_ADDRESS = "INPUT_ADDRESS",
10
+ VERIFY_ADDRESS = "VERIFY_ADDRESS",
11
+ CREATE_PAYMENT_METHOD = "CREATE_PAYMENT_METHOD",
12
+ CONFIRM_PURCHASE = "CONFIRM_PURCHASE",
13
+ WAITING_SHIPPING = "WAITING_SHIPPING",
14
+ WAITING_ACTIVATION = "WAITING_ACTIVATION",
15
+ COMPLETED = "COMPLETED"
16
+ }
17
+ export declare enum UserStatus {
18
+ LEAD = "LEAD",
19
+ PURCHASED = "PURCHASED",
20
+ READY = "READY",
21
+ CURRENT = "CURRENT"
22
+ }
23
+ export declare enum OrderStatus {
24
+ PENDING = "PENDING",
25
+ PENDING_PAYMENT = "PENDING_PAYMENT",
26
+ PROCESSING = "PROCESSING",
27
+ FAILED = "FAILED",
28
+ CANCELLED = "CANCELLED",
29
+ DELIVERED = "DELIVERED",
30
+ SHIPPING = "SHIPPING",
31
+ COMPLETED = "COMPLETED"
32
+ }
33
+ export declare enum PaymentMethod {
34
+ CARD = "card",
35
+ STORE = "store",
36
+ BANK_ACCOUNT = "bank_account"
37
+ }
38
+ export declare enum PaymentMethodType {
39
+ CARD = "CARD",
40
+ PAYPAL = "PAYPAL"
41
+ }
42
+ export declare enum Provider {
43
+ OPENPAY = "OPENPAY"
44
+ }
45
+ export declare enum RewardLevel {
46
+ PRINCIPIANTE = "PRINCIPIANTE",
47
+ VIAJERO = "VIAJERO",
48
+ EXPLORADOR = "EXPLORADOR",
49
+ MAESTRO = "MAESTRO"
50
+ }
51
+ export declare enum NotificationIcon {
52
+ USER_AVATAR = "USER_AVATAR",
53
+ SIM = "SIM",
54
+ MMS = "MMS"
55
+ }
56
+ export declare enum NotificationType {
57
+ EMAIL = "email",
58
+ PUSH = "push",
59
+ SMS = "sms",
60
+ WHATSAPP = "whatsapp"
61
+ }
62
+ export declare enum NotificationProvider {
63
+ CUSTOMERIO = "CUSTOMERIO",
64
+ TWILIO = "TWILIO"
65
+ }
66
+ export declare enum RewardTransactionType {
67
+ ACCRUAL = "ACCRUAL",
68
+ REDEMPTION = "REDEMPTION",
69
+ EXPIRE = "EXPIRE",
70
+ ADJUSTMENT = "ADJUSTMENT"
71
+ }
72
+ export declare enum RewardTransactionStatus {
73
+ PENDING = "PENDING",
74
+ CONFIRMED = "CONFIRMED",
75
+ REJECTED = "REJECTED"
76
+ }
77
+ export declare enum AccumulationType {
78
+ FIXED = "FIXED",
79
+ PERCENTAGE = "PERCENTAGE",
80
+ STEP = "STEP"
81
+ }
82
+ //# sourceMappingURL=enums.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/types/enums.ts"],"names":[],"mappings":"AACA,oBAAY,cAAc;IACtB,cAAc,mBAAmB;IACjC,4BAA4B,iCAAiC;IAC7D,UAAU,eAAe;IACzB,mBAAmB,wBAAwB;IAC3C,eAAe,oBAAoB;IACnC,kBAAkB,uBAAuB;IACzC,cAAc,mBAAmB;IACjC,aAAa,kBAAkB;IAC/B,cAAc,mBAAmB;IACjC,qBAAqB,0BAA0B;IAC/C,gBAAgB,qBAAqB;IACrC,gBAAgB,qBAAqB;IACrC,kBAAkB,uBAAuB;IACzC,SAAS,cAAc;CAC1B;AAED,oBAAY,UAAU;IAClB,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,OAAO,YAAY;CACtB;AAED,oBAAY,WAAW;IACnB,OAAO,YAAY;IACnB,eAAe,oBAAoB;IACnC,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,SAAS,cAAc;CAC1B;AAED,oBAAY,aAAa;IACrB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,YAAY,iBAAiB;CAChC;AAED,oBAAY,iBAAiB;IACzB,IAAI,SAAS;IACb,MAAM,WAAW;CACpB;AAED,oBAAY,QAAQ;IAChB,OAAO,YAAY;CACtB;AAED,oBAAY,WAAW;IACnB,YAAY,iBAAiB;IAC7B,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,OAAO,YAAY;CACtB;AAED,oBAAY,gBAAgB;IACxB,WAAW,gBAAgB;IAC3B,GAAG,QAAQ;IACX,GAAG,QAAQ;CACd;AAED,oBAAY,gBAAgB;IACxB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,QAAQ,aAAa;CACxB;AAED,oBAAY,oBAAoB;IAC5B,UAAU,eAAe;IACzB,MAAM,WAAW;CACpB;AAED,oBAAY,qBAAqB;IAC7B,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,UAAU,eAAe;CAC5B;AAED,oBAAY,uBAAuB;IAC/B,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,QAAQ,aAAa;CACxB;AAED,oBAAY,gBAAgB;IACxB,KAAK,UAAU;IACf,UAAU,eAAe;IACzB,IAAI,SAAS;CAChB"}
@@ -0,0 +1,95 @@
1
+ // ==================== src/types/enums.ts ====================
2
+ export var RegisterStatus;
3
+ (function (RegisterStatus) {
4
+ RegisterStatus["START_REGISTER"] = "START_REGISTER";
5
+ RegisterStatus["START_REGISTER_NEW_FP_NUMBER"] = "START_REGISTER_NEW_FP_NUMBER";
6
+ RegisterStatus["CREATE_NIP"] = "CREATE_NIP";
7
+ RegisterStatus["INPUT_PERSONAL_INFO"] = "INPUT_PERSONAL_INFO";
8
+ RegisterStatus["SELECT_MULTITAG"] = "SELECT_MULTITAG";
9
+ RegisterStatus["SELECT_PORTABILITY"] = "SELECT_PORTABILITY";
10
+ RegisterStatus["SELECT_PACKAGE"] = "SELECT_PACKAGE";
11
+ RegisterStatus["INPUT_ADDRESS"] = "INPUT_ADDRESS";
12
+ RegisterStatus["VERIFY_ADDRESS"] = "VERIFY_ADDRESS";
13
+ RegisterStatus["CREATE_PAYMENT_METHOD"] = "CREATE_PAYMENT_METHOD";
14
+ RegisterStatus["CONFIRM_PURCHASE"] = "CONFIRM_PURCHASE";
15
+ RegisterStatus["WAITING_SHIPPING"] = "WAITING_SHIPPING";
16
+ RegisterStatus["WAITING_ACTIVATION"] = "WAITING_ACTIVATION";
17
+ RegisterStatus["COMPLETED"] = "COMPLETED";
18
+ })(RegisterStatus || (RegisterStatus = {}));
19
+ export var UserStatus;
20
+ (function (UserStatus) {
21
+ UserStatus["LEAD"] = "LEAD";
22
+ UserStatus["PURCHASED"] = "PURCHASED";
23
+ UserStatus["READY"] = "READY";
24
+ UserStatus["CURRENT"] = "CURRENT";
25
+ })(UserStatus || (UserStatus = {}));
26
+ export var OrderStatus;
27
+ (function (OrderStatus) {
28
+ OrderStatus["PENDING"] = "PENDING";
29
+ OrderStatus["PENDING_PAYMENT"] = "PENDING_PAYMENT";
30
+ OrderStatus["PROCESSING"] = "PROCESSING";
31
+ OrderStatus["FAILED"] = "FAILED";
32
+ OrderStatus["CANCELLED"] = "CANCELLED";
33
+ OrderStatus["DELIVERED"] = "DELIVERED";
34
+ OrderStatus["SHIPPING"] = "SHIPPING";
35
+ OrderStatus["COMPLETED"] = "COMPLETED";
36
+ })(OrderStatus || (OrderStatus = {}));
37
+ export var PaymentMethod;
38
+ (function (PaymentMethod) {
39
+ PaymentMethod["CARD"] = "card";
40
+ PaymentMethod["STORE"] = "store";
41
+ PaymentMethod["BANK_ACCOUNT"] = "bank_account";
42
+ })(PaymentMethod || (PaymentMethod = {}));
43
+ export var PaymentMethodType;
44
+ (function (PaymentMethodType) {
45
+ PaymentMethodType["CARD"] = "CARD";
46
+ PaymentMethodType["PAYPAL"] = "PAYPAL";
47
+ })(PaymentMethodType || (PaymentMethodType = {}));
48
+ export var Provider;
49
+ (function (Provider) {
50
+ Provider["OPENPAY"] = "OPENPAY";
51
+ })(Provider || (Provider = {}));
52
+ export var RewardLevel;
53
+ (function (RewardLevel) {
54
+ RewardLevel["PRINCIPIANTE"] = "PRINCIPIANTE";
55
+ RewardLevel["VIAJERO"] = "VIAJERO";
56
+ RewardLevel["EXPLORADOR"] = "EXPLORADOR";
57
+ RewardLevel["MAESTRO"] = "MAESTRO";
58
+ })(RewardLevel || (RewardLevel = {}));
59
+ export var NotificationIcon;
60
+ (function (NotificationIcon) {
61
+ NotificationIcon["USER_AVATAR"] = "USER_AVATAR";
62
+ NotificationIcon["SIM"] = "SIM";
63
+ NotificationIcon["MMS"] = "MMS";
64
+ })(NotificationIcon || (NotificationIcon = {}));
65
+ export var NotificationType;
66
+ (function (NotificationType) {
67
+ NotificationType["EMAIL"] = "email";
68
+ NotificationType["PUSH"] = "push";
69
+ NotificationType["SMS"] = "sms";
70
+ NotificationType["WHATSAPP"] = "whatsapp";
71
+ })(NotificationType || (NotificationType = {}));
72
+ export var NotificationProvider;
73
+ (function (NotificationProvider) {
74
+ NotificationProvider["CUSTOMERIO"] = "CUSTOMERIO";
75
+ NotificationProvider["TWILIO"] = "TWILIO";
76
+ })(NotificationProvider || (NotificationProvider = {}));
77
+ export var RewardTransactionType;
78
+ (function (RewardTransactionType) {
79
+ RewardTransactionType["ACCRUAL"] = "ACCRUAL";
80
+ RewardTransactionType["REDEMPTION"] = "REDEMPTION";
81
+ RewardTransactionType["EXPIRE"] = "EXPIRE";
82
+ RewardTransactionType["ADJUSTMENT"] = "ADJUSTMENT";
83
+ })(RewardTransactionType || (RewardTransactionType = {}));
84
+ export var RewardTransactionStatus;
85
+ (function (RewardTransactionStatus) {
86
+ RewardTransactionStatus["PENDING"] = "PENDING";
87
+ RewardTransactionStatus["CONFIRMED"] = "CONFIRMED";
88
+ RewardTransactionStatus["REJECTED"] = "REJECTED";
89
+ })(RewardTransactionStatus || (RewardTransactionStatus = {}));
90
+ export var AccumulationType;
91
+ (function (AccumulationType) {
92
+ AccumulationType["FIXED"] = "FIXED";
93
+ AccumulationType["PERCENTAGE"] = "PERCENTAGE";
94
+ AccumulationType["STEP"] = "STEP";
95
+ })(AccumulationType || (AccumulationType = {}));
@@ -0,0 +1,89 @@
1
+ import { Address } from './entities';
2
+ import { PaymentMethod } from './enums';
3
+ export interface LoginRequest {
4
+ phoneNumber: string;
5
+ countryCode?: string;
6
+ nip: string;
7
+ }
8
+ export interface SendOTPRequest {
9
+ phoneNumber: string;
10
+ countryCode?: string;
11
+ }
12
+ export interface VerifyOTPRequest {
13
+ phoneNumber: string;
14
+ countryCode?: string;
15
+ code: string;
16
+ }
17
+ export interface RegisterLeadRequest {
18
+ phoneNumber: string;
19
+ countryCode?: string;
20
+ email: string;
21
+ referral?: string | null;
22
+ registerType?: 'EXISTING_LINE' | 'NEW_LINE' | null;
23
+ }
24
+ export interface CreateNIPRequest {
25
+ phoneNumber: string;
26
+ countryCode?: string;
27
+ nip: string;
28
+ }
29
+ export interface PersonalInfoRequest {
30
+ firstName: string;
31
+ lastName: string;
32
+ birthDate: string;
33
+ address: Omit<Address, 'userId' | 'createdAt' | 'updatedAt' | 'deletedAt'>;
34
+ parentAlias?: string;
35
+ }
36
+ export interface AddPaymentMethodRequest {
37
+ token_id: string;
38
+ }
39
+ export interface ProcessPaymentRequest {
40
+ paymentMethodId: string;
41
+ productId: string;
42
+ quote: {
43
+ id: string;
44
+ carrier: string;
45
+ service: string;
46
+ };
47
+ }
48
+ export interface CreateOrderRequest {
49
+ email: string;
50
+ phoneNumber: string;
51
+ countryCode: string;
52
+ productId: string;
53
+ personalInfo: {
54
+ firstName: string;
55
+ lastName: string;
56
+ birthDate: string;
57
+ address: Partial<Address>;
58
+ parentAlias?: string;
59
+ };
60
+ requiredPortability?: boolean;
61
+ paymentMethodToken?: string;
62
+ paymentMethodId?: string;
63
+ paymentReferenceMethod?: PaymentMethod;
64
+ simType?: string;
65
+ referral?: string;
66
+ }
67
+ export interface TopupRequest {
68
+ productId: string;
69
+ paymentMethodType: 'card' | 'mms';
70
+ paymentMethodId: string;
71
+ phoneNumber: string;
72
+ }
73
+ export interface UpdatePasswordRequest {
74
+ password: string;
75
+ newPassword: string;
76
+ }
77
+ export interface UpdatePhoneNumberRequest {
78
+ oldPhoneNumber: string;
79
+ newPhoneNumber: string;
80
+ }
81
+ export interface UpdateLocationRequest {
82
+ latitude: string;
83
+ longitude: string;
84
+ }
85
+ export interface CreateAddressRequest extends Omit<Address, 'id' | 'userId' | 'createdAt' | 'updatedAt' | 'deletedAt'> {
86
+ }
87
+ export interface UpdateAddressRequest extends CreateAddressRequest {
88
+ }
89
+ //# sourceMappingURL=requests.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../src/types/requests.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAqB,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,WAAW,YAAY;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,eAAe,GAAG,UAAU,GAAG,IAAI,CAAC;CACtD;AAED,MAAM,WAAW,gBAAgB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;CAC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AM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,wBAAwB;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAqB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,OAAO,EAAE,IAAI,GAAG,QAAQ,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;CAAI;AAE1H,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;CAAI"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,42 @@
1
+ import { User, Address, RewardAccount, PaymentMethodData, Order, Product, Quote } from './entities';
2
+ export interface TokenResponse {
3
+ token: string;
4
+ tokenType: string;
5
+ expiresIn: number;
6
+ refreshToken?: string;
7
+ refreshTokenType?: string;
8
+ refreshExpiresIn?: number;
9
+ }
10
+ export interface LoginResponse {
11
+ TokenResponse: TokenResponse;
12
+ user: User;
13
+ }
14
+ export interface RegisterStatusResponse extends User {
15
+ rewardAccount: RewardAccount;
16
+ simType: string | null;
17
+ address: Address;
18
+ paymentMethod: PaymentMethodData;
19
+ order: Order;
20
+ product: Product;
21
+ quote: Quote;
22
+ parentAlias: string | null;
23
+ }
24
+ export interface ShippingQuoteResponse {
25
+ quotes: Array<{
26
+ carrier: string;
27
+ carrierDescription: string;
28
+ service: string;
29
+ serviceDescription: string;
30
+ deliveryEstimate: string;
31
+ quotePrice: number;
32
+ totalPrice: number;
33
+ }>;
34
+ id: string;
35
+ expiresAt: string;
36
+ }
37
+ export interface HealthCheckResponse {
38
+ status: string;
39
+ uptime: number;
40
+ timestamp: string;
41
+ }
42
+ //# sourceMappingURL=responses.d.ts.map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AChC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@multimegas/sdk-js",
3
+ "version": "0.0.1",
4
+ "description": "Multimegas client SDK for JS/TS apps",
5
+ "license": "MIT",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "dependencies": {
12
+ "axios": "^1.12.2"
13
+ },
14
+ "devDependencies": {
15
+ "rimraf": "^6.0.1",
16
+ "tsup": "^8.0.1",
17
+ "typescript": "^5.6.3"
18
+ },
19
+ "scripts": {
20
+ "build": "npx tsc",
21
+ "dev": "npx tsc -w",
22
+ "clean": "rimraf dist || rm -rf dist",
23
+ "prepublishOnly": "yarn clean && yarn build",
24
+ "publish": "npm publish --access public"
25
+ }
26
+ }