sinfactura-types 1.0.2 → 1.0.3

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
@@ -13,3 +13,4 @@ export * from './order';
13
13
  export * from './product';
14
14
  export * from './store';
15
15
  export * from './user';
16
+ export * from './whatsapp';
@@ -6,10 +6,17 @@ declare global {
6
6
  type: 'order' | 'mercadopago' | 'dollarOficial' | 'dollarInformal' | 'dollarBna';
7
7
  title: string;
8
8
  orderId?: string;
9
+ userId?: string;
9
10
  read?: boolean;
10
11
  description?: string;
11
12
  details?: string;
12
13
  total?: number;
13
14
  }
15
+ interface Currency {
16
+ currencyId: string;
17
+ dated: string;
18
+ value: number;
19
+ name?: string;
20
+ }
14
21
  }
15
22
  export {};
@@ -0,0 +1,92 @@
1
+ declare global {
2
+ interface WhatsAppMessage {
3
+ object: 'whatsapp_business_account' | string;
4
+ entry: Entry[];
5
+ }
6
+ interface Entry {
7
+ id: string;
8
+ changes: Change[];
9
+ }
10
+ interface Change {
11
+ value: Value;
12
+ field: 'messages' | string;
13
+ }
14
+ interface Value {
15
+ messaging_product: 'whatsapp' | string;
16
+ metadata: {
17
+ display_phone_number: string;
18
+ phone_number_id: string;
19
+ };
20
+ contacts?: Contact[];
21
+ messages?: Message[];
22
+ statuses?: Status[];
23
+ }
24
+ interface Contact {
25
+ profile?: {
26
+ name: string;
27
+ };
28
+ input?: string;
29
+ wa_id: string;
30
+ }
31
+ interface Message {
32
+ from?: string;
33
+ id: string;
34
+ timestamp?: string;
35
+ text?: {
36
+ body: string;
37
+ };
38
+ type?: string;
39
+ document?: Document;
40
+ context?: {
41
+ from: string;
42
+ id: string;
43
+ };
44
+ audio?: Audio;
45
+ image?: Image;
46
+ }
47
+ interface Document {
48
+ caption: string;
49
+ filename: string;
50
+ mime_type: string;
51
+ sha256: string;
52
+ id: string;
53
+ }
54
+ interface Audio {
55
+ mime_type: string;
56
+ sha256: string;
57
+ id: string;
58
+ voice: boolean;
59
+ }
60
+ interface Image {
61
+ mime_type: string;
62
+ sha256: string;
63
+ id: string;
64
+ }
65
+ interface Status {
66
+ id: string;
67
+ status: 'sent' | 'delivered' | 'read' | 'failed' | string;
68
+ timestamp: string;
69
+ recipient_id: string;
70
+ conversation?: Conversation;
71
+ pricing?: Pricing;
72
+ errors?: Error[];
73
+ }
74
+ interface Error {
75
+ code: 131047 | number;
76
+ title: string;
77
+ href: string;
78
+ }
79
+ interface Conversation {
80
+ id: string;
81
+ expiration_timestamp?: string;
82
+ origin: {
83
+ type: 'user_initiated' | string;
84
+ };
85
+ }
86
+ interface Pricing {
87
+ billable: boolean;
88
+ pricing_model: 'CBP' | string;
89
+ category: 'user_initiated' | string;
90
+ }
91
+ }
92
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sinfactura-types",
3
3
  "private": false,
4
- "version": "1.0.2",
4
+ "version": "1.0.3",
5
5
  "type": "module",
6
6
  "main": "dist/index.d.ts",
7
7
  "keywords": [