sinfactura-types 1.4.0 → 1.5.0

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.
package/dist/index.d.ts CHANGED
@@ -12,6 +12,7 @@ export * from "./imports";
12
12
  export * from "./invoice";
13
13
  export * from "./log";
14
14
  export * from "./maintenance";
15
+ export * from "./mercadopago";
15
16
  export * from "./notification";
16
17
  export * from "./order";
17
18
  export * from "./product";
package/dist/index.js CHANGED
@@ -12,6 +12,7 @@ export * from "./imports";
12
12
  export * from "./invoice";
13
13
  export * from "./log";
14
14
  export * from "./maintenance";
15
+ export * from "./mercadopago";
15
16
  export * from "./notification";
16
17
  export * from "./order";
17
18
  export * from "./product";
@@ -0,0 +1,66 @@
1
+ declare global {
2
+ interface MpOauthTokenResponse {
3
+ access_token: string;
4
+ refresh_token: string;
5
+ user_id: number;
6
+ expires_in: number;
7
+ scope?: string;
8
+ token_type?: string;
9
+ public_key?: string;
10
+ live_mode?: boolean;
11
+ }
12
+ interface MpOauthInitiateResponse {
13
+ authorizationUrl: string;
14
+ }
15
+ interface MpOauthCallbackResponse {
16
+ connected: true;
17
+ storeId: string;
18
+ mercadopagoUserId: string;
19
+ expiresAt: number;
20
+ connectedAt: number;
21
+ }
22
+ interface MercadopagoStatus {
23
+ connected: boolean;
24
+ status: MercadopagoConnectionStatus;
25
+ userId?: string;
26
+ connectedAt?: number;
27
+ expiresAt?: number;
28
+ liveMode?: boolean;
29
+ publicKey?: string;
30
+ statementDescriptor?: string;
31
+ pos?: Mercadopago["pos"];
32
+ features?: Mercadopago["features"];
33
+ }
34
+ interface MpWebhookEvent {
35
+ id: number;
36
+ live_mode: boolean;
37
+ type: string;
38
+ date_created: string;
39
+ application_id: number;
40
+ user_id: number;
41
+ version: number;
42
+ api_version: string;
43
+ action: string;
44
+ data: {
45
+ id: string;
46
+ };
47
+ }
48
+ interface MpPaymentNotification {
49
+ paymentId: string;
50
+ status: string;
51
+ statusDetail?: string;
52
+ amount: number;
53
+ currency: string;
54
+ paymentMethod?: string;
55
+ externalReference?: string;
56
+ receivedAt: number;
57
+ }
58
+ interface MpPointDevice {
59
+ id: string;
60
+ posId: number;
61
+ storeId: number;
62
+ externalPosId?: string;
63
+ operatingMode: "PDV" | "STANDALONE";
64
+ }
65
+ }
66
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/dist/store.d.ts CHANGED
@@ -148,11 +148,7 @@ declare global {
148
148
  products?: number;
149
149
  users?: number;
150
150
  };
151
- mercadopago?: {
152
- accessToken?: string;
153
- code?: string;
154
- refreshToken?: string;
155
- };
151
+ mercadopago?: Mercadopago;
156
152
  afip: Afip;
157
153
  appVersion: number;
158
154
  fiscalConditions: FiscalCondition[];
@@ -161,6 +157,34 @@ declare global {
161
157
  notificationOptions?: Method[];
162
158
  maintenance?: MaintenanceInfo;
163
159
  }
160
+ interface Mercadopago {
161
+ userId?: string;
162
+ accessToken?: string;
163
+ refreshToken?: string;
164
+ expiresAt?: number;
165
+ connectedAt?: number;
166
+ tokenType?: string;
167
+ scope?: string;
168
+ liveMode?: boolean;
169
+ publicKey?: string;
170
+ status?: MercadopagoConnectionStatus;
171
+ disconnectedAt?: number;
172
+ lastTokenRefreshAt?: number;
173
+ tokenRefreshFailures?: number;
174
+ statementDescriptor?: string;
175
+ notificationUrl?: string;
176
+ pos?: {
177
+ defaultDeviceId?: string;
178
+ defaultStoreMpId?: string;
179
+ };
180
+ features?: {
181
+ checkoutPro?: boolean;
182
+ pointOfSale?: boolean;
183
+ subscriptions?: boolean;
184
+ };
185
+ code?: string;
186
+ }
187
+ type MercadopagoConnectionStatus = "connected" | "expired" | "disconnected" | "error" | "never";
164
188
  interface Afip {
165
189
  production: boolean;
166
190
  address?: string;
@@ -0,0 +1 @@
1
+ {"root":["../src/account.ts","../src/afip.ts","../src/api.ts","../src/audit.ts","../src/auth.ts","../src/basket.ts","../src/brands.ts","../src/cash.ts","../src/categories.ts","../src/customer.ts","../src/imports.ts","../src/index.ts","../src/invoice.ts","../src/log.ts","../src/maintenance.ts","../src/notification.ts","../src/order.ts","../src/product.ts","../src/provinces.ts","../src/return.ts","../src/stock.ts","../src/store.ts","../src/subscription.ts","../src/supplier.ts","../src/user.ts","../src/whatsapp.ts"],"version":"5.6.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinfactura-types",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",