@vinzsocket/baileys 2.8.9 → 2.8.20

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 (83) hide show
  1. package/lib/Defaults/index.js +75 -73
  2. package/lib/Signal/Group/ciphertext-message.js +9 -9
  3. package/lib/Signal/Group/group-session-builder.js +21 -21
  4. package/lib/Signal/Group/group_cipher.js +79 -81
  5. package/lib/Signal/Group/index.js +2 -2
  6. package/lib/Signal/Group/keyhelper.js +9 -9
  7. package/lib/Signal/Group/queue-job.js +43 -46
  8. package/lib/Signal/Group/sender-chain-key.js +24 -25
  9. package/lib/Signal/Group/sender-key-distribution-message.js +50 -58
  10. package/lib/Signal/Group/sender-key-message.js +55 -60
  11. package/lib/Signal/Group/sender-key-name.js +38 -39
  12. package/lib/Signal/Group/sender-key-record.js +39 -41
  13. package/lib/Signal/Group/sender-key-state.js +85 -89
  14. package/lib/Signal/Group/sender-message-key.js +22 -22
  15. package/lib/Signal/libsignal.js +387 -292
  16. package/lib/Signal/lid-mapping.js +98 -93
  17. package/lib/Socket/Client/types.js +6 -6
  18. package/lib/Socket/Client/websocket.js +44 -44
  19. package/lib/Socket/business.js +350 -365
  20. package/lib/Socket/chats.js +1019 -914
  21. package/lib/Socket/communities.js +454 -376
  22. package/lib/Socket/groups.js +378 -310
  23. package/lib/Socket/index.js +11 -11
  24. package/lib/Socket/messages-recv.js +1355 -1182
  25. package/lib/Socket/messages-send.js +1224 -1081
  26. package/lib/Socket/mex.js +40 -34
  27. package/lib/Socket/newsletter.js +212 -169
  28. package/lib/Socket/socket.js +896 -757
  29. package/lib/Store/index.js +1 -1
  30. package/lib/Store/make-cache-manager-store.js +75 -79
  31. package/lib/Store/make-in-memory-store.js +450 -389
  32. package/lib/Store/make-ordered-dictionary.js +73 -76
  33. package/lib/Store/object-repository.js +24 -22
  34. package/lib/Types/Chat.js +1 -7
  35. package/lib/Types/Label.js +20 -20
  36. package/lib/Types/LabelAssociation.js +2 -2
  37. package/lib/Types/Message.js +2 -2
  38. package/lib/Types/Newsletter.js +24 -24
  39. package/lib/Types/Socket.js +1 -1
  40. package/lib/Types/State.js +8 -8
  41. package/lib/Types/index.js +10 -10
  42. package/lib/Utils/auth-utils.js +408 -401
  43. package/lib/Utils/baileys-event-stream.js +44 -35
  44. package/lib/Utils/business.js +200 -197
  45. package/lib/Utils/chat-utils.js +775 -708
  46. package/lib/Utils/crypto.js +97 -85
  47. package/lib/Utils/decode-wa-message.js +240 -227
  48. package/lib/Utils/event-buffer.js +547 -518
  49. package/lib/Utils/extended-messages.js +250 -203
  50. package/lib/Utils/generics.js +300 -289
  51. package/lib/Utils/history.js +76 -69
  52. package/lib/Utils/lid-resolver.js +47 -42
  53. package/lib/Utils/link-preview.js +75 -65
  54. package/lib/Utils/logger.js +3 -1
  55. package/lib/Utils/lt-hash.js +38 -34
  56. package/lib/Utils/make-mutex.js +32 -34
  57. package/lib/Utils/mention.js +79 -86
  58. package/lib/Utils/message-retry-manager.js +148 -136
  59. package/lib/Utils/messages-media.js +652 -562
  60. package/lib/Utils/messages.js +753 -707
  61. package/lib/Utils/noise-handler.js +156 -135
  62. package/lib/Utils/process-message.js +404 -341
  63. package/lib/Utils/signal.js +180 -118
  64. package/lib/Utils/use-multi-file-auth-state.js +87 -91
  65. package/lib/Utils/validate-connection.js +167 -142
  66. package/lib/WABinary/constants.js +28 -1293
  67. package/lib/WABinary/decode.js +220 -218
  68. package/lib/WABinary/encode.js +199 -201
  69. package/lib/WABinary/generic-utils.js +80 -77
  70. package/lib/WABinary/jid-utils.js +41 -35
  71. package/lib/WAM/BinaryInfo.js +7 -7
  72. package/lib/WAM/constants.js +1 -15241
  73. package/lib/WAM/encode.js +124 -131
  74. package/lib/WAUSync/Protocols/USyncContactProtocol.js +23 -23
  75. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +51 -47
  76. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +22 -22
  77. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +30 -32
  78. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +19 -19
  79. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +53 -43
  80. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +17 -17
  81. package/lib/WAUSync/USyncQuery.js +82 -84
  82. package/lib/WAUSync/USyncUser.js +20 -20
  83. package/package.json +4 -1
@@ -10,18 +10,24 @@ import { makeMutex } from './make-mutex.js';
10
10
  * @param filename File to save to
11
11
  */
12
12
  export const captureEventStream = (ev, filename) => {
13
- const oldEmit = ev.emit;
14
- // write mutex so data is appended in order
15
- const writeMutex = makeMutex();
16
- // monkey patch eventemitter to capture all events
17
- ev.emit = function (...args) {
18
- const content = JSON.stringify({ timestamp: Date.now(), event: args[0], data: args[1] }) + '\n';
19
- const result = oldEmit.apply(ev, args);
20
- writeMutex.mutex(async () => {
21
- await writeFile(filename, content, { flag: 'a' });
22
- });
23
- return result;
24
- };
13
+ const oldEmit = ev.emit;
14
+ // write mutex so data is appended in order
15
+ const writeMutex = makeMutex();
16
+ // monkey patch eventemitter to capture all events
17
+ ev.emit = function (...args) {
18
+ const content = JSON.stringify({
19
+ timestamp: Date.now(),
20
+ event: args[0],
21
+ data: args[1]
22
+ }) + '\n';
23
+ const result = oldEmit.apply(ev, args);
24
+ writeMutex.mutex(async () => {
25
+ await writeFile(filename, content, {
26
+ flag: 'a'
27
+ });
28
+ });
29
+ return result;
30
+ };
25
31
  };
26
32
  /**
27
33
  * Read event file and emit events from there
@@ -29,28 +35,31 @@ export const captureEventStream = (ev, filename) => {
29
35
  * @param delayIntervalMs delay between each event emit
30
36
  */
31
37
  export const readAndEmitEventStream = (filename, delayIntervalMs = 0) => {
32
- const ev = new EventEmitter();
33
- const fireEvents = async () => {
34
- // from: https://stackoverflow.com/questions/6156501/read-a-file-one-line-at-a-time-in-node-js
35
- const fileStream = createReadStream(filename);
36
- const rl = createInterface({
37
- input: fileStream,
38
- crlfDelay: Infinity
39
- });
40
- // Note: we use the crlfDelay option to recognize all instances of CR LF
41
- // ('\r\n') in input.txt as a single line break.
42
- for await (const line of rl) {
43
- if (line) {
44
- const { event, data } = JSON.parse(line);
45
- ev.emit(event, data);
46
- delayIntervalMs && (await delay(delayIntervalMs));
47
- }
48
- }
49
- fileStream.close();
50
- };
51
- return {
52
- ev,
53
- task: fireEvents()
54
- };
38
+ const ev = new EventEmitter();
39
+ const fireEvents = async () => {
40
+ // from: https://stackoverflow.com/questions/6156501/read-a-file-one-line-at-a-time-in-node-js
41
+ const fileStream = createReadStream(filename);
42
+ const rl = createInterface({
43
+ input: fileStream,
44
+ crlfDelay: Infinity
45
+ });
46
+ // Note: we use the crlfDelay option to recognize all instances of CR LF
47
+ // ('\r\n') in input.txt as a single line break.
48
+ for await (const line of rl) {
49
+ if (line) {
50
+ const {
51
+ event,
52
+ data
53
+ } = JSON.parse(line);
54
+ ev.emit(event, data);
55
+ delayIntervalMs && (await delay(delayIntervalMs));
56
+ }
57
+ }
58
+ fileStream.close();
59
+ };
60
+ return {
61
+ ev,
62
+ task: fireEvents()
63
+ };
55
64
  };
56
65
  //# sourceMappingURL=baileys-event-stream.js.map
@@ -6,226 +6,229 @@ import { join } from 'path';
6
6
  import { getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString } from '../WABinary/index.js';
7
7
  import { generateMessageIDV2 } from './generics.js';
8
8
  import { getStream, getUrlFromDirectPath } from './messages-media.js';
9
- export const parseCatalogNode = (node) => {
10
- const catalogNode = getBinaryNodeChild(node, 'product_catalog');
11
- const products = getBinaryNodeChildren(catalogNode, 'product').map(parseProductNode);
12
- const paging = getBinaryNodeChild(catalogNode, 'paging');
9
+ export const parseCatalogNode = node => {
10
+ const catalogNode = getBinaryNodeChild(node, 'product_catalog');
11
+ const products = getBinaryNodeChildren(catalogNode, 'product').map(parseProductNode);
12
+ const paging = getBinaryNodeChild(catalogNode, 'paging');
13
+ return {
14
+ products,
15
+ nextPageCursor: paging ? getBinaryNodeChildString(paging, 'after') : undefined
16
+ };
17
+ };
18
+ export const parseCollectionsNode = node => {
19
+ const collectionsNode = getBinaryNodeChild(node, 'collections');
20
+ const collections = getBinaryNodeChildren(collectionsNode, 'collection').map(collectionNode => {
21
+ const id = getBinaryNodeChildString(collectionNode, 'id');
22
+ const name = getBinaryNodeChildString(collectionNode, 'name');
23
+ const products = getBinaryNodeChildren(collectionNode, 'product').map(parseProductNode);
13
24
  return {
14
- products,
15
- nextPageCursor: paging ? getBinaryNodeChildString(paging, 'after') : undefined
25
+ id,
26
+ name,
27
+ products,
28
+ status: parseStatusInfo(collectionNode)
16
29
  };
30
+ });
31
+ return {
32
+ collections
33
+ };
17
34
  };
18
- export const parseCollectionsNode = (node) => {
19
- const collectionsNode = getBinaryNodeChild(node, 'collections');
20
- const collections = getBinaryNodeChildren(collectionsNode, 'collection').map(collectionNode => {
21
- const id = getBinaryNodeChildString(collectionNode, 'id');
22
- const name = getBinaryNodeChildString(collectionNode, 'name');
23
- const products = getBinaryNodeChildren(collectionNode, 'product').map(parseProductNode);
24
- return {
25
- id,
26
- name,
27
- products,
28
- status: parseStatusInfo(collectionNode)
29
- };
30
- });
35
+ export const parseOrderDetailsNode = node => {
36
+ const orderNode = getBinaryNodeChild(node, 'order');
37
+ const products = getBinaryNodeChildren(orderNode, 'product').map(productNode => {
38
+ const imageNode = getBinaryNodeChild(productNode, 'image');
31
39
  return {
32
- collections
40
+ id: getBinaryNodeChildString(productNode, 'id'),
41
+ name: getBinaryNodeChildString(productNode, 'name'),
42
+ imageUrl: getBinaryNodeChildString(imageNode, 'url'),
43
+ price: +getBinaryNodeChildString(productNode, 'price'),
44
+ currency: getBinaryNodeChildString(productNode, 'currency'),
45
+ quantity: +getBinaryNodeChildString(productNode, 'quantity')
33
46
  };
47
+ });
48
+ const priceNode = getBinaryNodeChild(orderNode, 'price');
49
+ const orderDetails = {
50
+ price: {
51
+ total: +getBinaryNodeChildString(priceNode, 'total'),
52
+ currency: getBinaryNodeChildString(priceNode, 'currency')
53
+ },
54
+ products
55
+ };
56
+ return orderDetails;
34
57
  };
35
- export const parseOrderDetailsNode = (node) => {
36
- const orderNode = getBinaryNodeChild(node, 'order');
37
- const products = getBinaryNodeChildren(orderNode, 'product').map(productNode => {
38
- const imageNode = getBinaryNodeChild(productNode, 'image');
58
+ export const toProductNode = (productId, product) => {
59
+ const attrs = {};
60
+ const content = [];
61
+ if (typeof productId !== 'undefined') {
62
+ content.push({
63
+ tag: 'id',
64
+ attrs: {},
65
+ content: Buffer.from(productId)
66
+ });
67
+ }
68
+ if (typeof product.name !== 'undefined') {
69
+ content.push({
70
+ tag: 'name',
71
+ attrs: {},
72
+ content: Buffer.from(product.name)
73
+ });
74
+ }
75
+ if (typeof product.description !== 'undefined') {
76
+ content.push({
77
+ tag: 'description',
78
+ attrs: {},
79
+ content: Buffer.from(product.description)
80
+ });
81
+ }
82
+ if (typeof product.retailerId !== 'undefined') {
83
+ content.push({
84
+ tag: 'retailer_id',
85
+ attrs: {},
86
+ content: Buffer.from(product.retailerId)
87
+ });
88
+ }
89
+ if (product.images.length) {
90
+ content.push({
91
+ tag: 'media',
92
+ attrs: {},
93
+ content: product.images.map(img => {
94
+ if (!('url' in img)) {
95
+ throw new Boom('Expected img for product to already be uploaded', {
96
+ statusCode: 400
97
+ });
98
+ }
39
99
  return {
40
- id: getBinaryNodeChildString(productNode, 'id'),
41
- name: getBinaryNodeChildString(productNode, 'name'),
42
- imageUrl: getBinaryNodeChildString(imageNode, 'url'),
43
- price: +getBinaryNodeChildString(productNode, 'price'),
44
- currency: getBinaryNodeChildString(productNode, 'currency'),
45
- quantity: +getBinaryNodeChildString(productNode, 'quantity')
100
+ tag: 'image',
101
+ attrs: {},
102
+ content: [{
103
+ tag: 'url',
104
+ attrs: {},
105
+ content: Buffer.from(img.url.toString())
106
+ }]
46
107
  };
108
+ })
47
109
  });
48
- const priceNode = getBinaryNodeChild(orderNode, 'price');
49
- const orderDetails = {
50
- price: {
51
- total: +getBinaryNodeChildString(priceNode, 'total'),
52
- currency: getBinaryNodeChildString(priceNode, 'currency')
53
- },
54
- products
55
- };
56
- return orderDetails;
57
- };
58
- export const toProductNode = (productId, product) => {
59
- const attrs = {};
60
- const content = [];
61
- if (typeof productId !== 'undefined') {
62
- content.push({
63
- tag: 'id',
64
- attrs: {},
65
- content: Buffer.from(productId)
66
- });
67
- }
68
- if (typeof product.name !== 'undefined') {
69
- content.push({
70
- tag: 'name',
71
- attrs: {},
72
- content: Buffer.from(product.name)
73
- });
74
- }
75
- if (typeof product.description !== 'undefined') {
76
- content.push({
77
- tag: 'description',
78
- attrs: {},
79
- content: Buffer.from(product.description)
80
- });
81
- }
82
- if (typeof product.retailerId !== 'undefined') {
83
- content.push({
84
- tag: 'retailer_id',
85
- attrs: {},
86
- content: Buffer.from(product.retailerId)
87
- });
88
- }
89
- if (product.images.length) {
90
- content.push({
91
- tag: 'media',
92
- attrs: {},
93
- content: product.images.map(img => {
94
- if (!('url' in img)) {
95
- throw new Boom('Expected img for product to already be uploaded', { statusCode: 400 });
96
- }
97
- return {
98
- tag: 'image',
99
- attrs: {},
100
- content: [
101
- {
102
- tag: 'url',
103
- attrs: {},
104
- content: Buffer.from(img.url.toString())
105
- }
106
- ]
107
- };
108
- })
109
- });
110
- }
111
- if (typeof product.price !== 'undefined') {
112
- content.push({
113
- tag: 'price',
114
- attrs: {},
115
- content: Buffer.from(product.price.toString())
116
- });
117
- }
118
- if (typeof product.currency !== 'undefined') {
119
- content.push({
120
- tag: 'currency',
121
- attrs: {},
122
- content: Buffer.from(product.currency)
123
- });
124
- }
125
- if ('originCountryCode' in product) {
126
- if (typeof product.originCountryCode === 'undefined') {
127
- attrs['compliance_category'] = 'COUNTRY_ORIGIN_EXEMPT';
128
- }
129
- else {
130
- content.push({
131
- tag: 'compliance_info',
132
- attrs: {},
133
- content: [
134
- {
135
- tag: 'country_code_origin',
136
- attrs: {},
137
- content: Buffer.from(product.originCountryCode)
138
- }
139
- ]
140
- });
141
- }
142
- }
143
- if (typeof product.isHidden !== 'undefined') {
144
- attrs['is_hidden'] = product.isHidden.toString();
110
+ }
111
+ if (typeof product.price !== 'undefined') {
112
+ content.push({
113
+ tag: 'price',
114
+ attrs: {},
115
+ content: Buffer.from(product.price.toString())
116
+ });
117
+ }
118
+ if (typeof product.currency !== 'undefined') {
119
+ content.push({
120
+ tag: 'currency',
121
+ attrs: {},
122
+ content: Buffer.from(product.currency)
123
+ });
124
+ }
125
+ if ('originCountryCode' in product) {
126
+ if (typeof product.originCountryCode === 'undefined') {
127
+ attrs['compliance_category'] = 'COUNTRY_ORIGIN_EXEMPT';
128
+ } else {
129
+ content.push({
130
+ tag: 'compliance_info',
131
+ attrs: {},
132
+ content: [{
133
+ tag: 'country_code_origin',
134
+ attrs: {},
135
+ content: Buffer.from(product.originCountryCode)
136
+ }]
137
+ });
145
138
  }
146
- const node = {
147
- tag: 'product',
148
- attrs,
149
- content
150
- };
151
- return node;
139
+ }
140
+ if (typeof product.isHidden !== 'undefined') {
141
+ attrs['is_hidden'] = product.isHidden.toString();
142
+ }
143
+ const node = {
144
+ tag: 'product',
145
+ attrs,
146
+ content
147
+ };
148
+ return node;
152
149
  };
153
- export const parseProductNode = (productNode) => {
154
- const isHidden = productNode.attrs.is_hidden === 'true';
155
- const id = getBinaryNodeChildString(productNode, 'id');
156
- const mediaNode = getBinaryNodeChild(productNode, 'media');
157
- const statusInfoNode = getBinaryNodeChild(productNode, 'status_info');
158
- const product = {
159
- id,
160
- imageUrls: parseImageUrls(mediaNode),
161
- reviewStatus: {
162
- whatsapp: getBinaryNodeChildString(statusInfoNode, 'status')
163
- },
164
- availability: 'in stock',
165
- name: getBinaryNodeChildString(productNode, 'name'),
166
- retailerId: getBinaryNodeChildString(productNode, 'retailer_id'),
167
- url: getBinaryNodeChildString(productNode, 'url'),
168
- description: getBinaryNodeChildString(productNode, 'description'),
169
- price: +getBinaryNodeChildString(productNode, 'price'),
170
- currency: getBinaryNodeChildString(productNode, 'currency'),
171
- isHidden
172
- };
173
- return product;
150
+ export const parseProductNode = productNode => {
151
+ const isHidden = productNode.attrs.is_hidden === 'true';
152
+ const id = getBinaryNodeChildString(productNode, 'id');
153
+ const mediaNode = getBinaryNodeChild(productNode, 'media');
154
+ const statusInfoNode = getBinaryNodeChild(productNode, 'status_info');
155
+ const product = {
156
+ id,
157
+ imageUrls: parseImageUrls(mediaNode),
158
+ reviewStatus: {
159
+ whatsapp: getBinaryNodeChildString(statusInfoNode, 'status')
160
+ },
161
+ availability: 'in stock',
162
+ name: getBinaryNodeChildString(productNode, 'name'),
163
+ retailerId: getBinaryNodeChildString(productNode, 'retailer_id'),
164
+ url: getBinaryNodeChildString(productNode, 'url'),
165
+ description: getBinaryNodeChildString(productNode, 'description'),
166
+ price: +getBinaryNodeChildString(productNode, 'price'),
167
+ currency: getBinaryNodeChildString(productNode, 'currency'),
168
+ isHidden
169
+ };
170
+ return product;
174
171
  };
175
172
  /**
176
173
  * Uploads images not already uploaded to WA's servers
177
174
  */
178
175
  export async function uploadingNecessaryImagesOfProduct(product, waUploadToServer, timeoutMs = 30000) {
179
- product = {
180
- ...product,
181
- images: product.images
182
- ? await uploadingNecessaryImages(product.images, waUploadToServer, timeoutMs)
183
- : product.images
184
- };
185
- return product;
176
+ product = {
177
+ ...product,
178
+ images: product.images ? await uploadingNecessaryImages(product.images, waUploadToServer, timeoutMs) : product.images
179
+ };
180
+ return product;
186
181
  }
187
182
  /**
188
183
  * Uploads images not already uploaded to WA's servers
189
184
  */
190
185
  export const uploadingNecessaryImages = async (images, waUploadToServer, timeoutMs = 30000) => {
191
- const results = await Promise.all(images.map(async (img) => {
192
- if ('url' in img) {
193
- const url = img.url.toString();
194
- if (url.includes('.whatsapp.net')) {
195
- return { url };
196
- }
197
- }
198
- const { stream } = await getStream(img);
199
- const hasher = createHash('sha256');
200
- const filePath = join(tmpdir(), 'img' + generateMessageIDV2());
201
- const encFileWriteStream = createWriteStream(filePath);
202
- for await (const block of stream) {
203
- hasher.update(block);
204
- encFileWriteStream.write(block);
205
- }
206
- const sha = hasher.digest('base64');
207
- const { directPath } = await waUploadToServer(filePath, {
208
- mediaType: 'product-catalog-image',
209
- fileEncSha256B64: sha,
210
- timeoutMs
211
- });
212
- await fs.unlink(filePath).catch(err => console.log('Error deleting temp file ', err));
213
- return { url: getUrlFromDirectPath(directPath) };
214
- }));
215
- return results;
216
- };
217
- const parseImageUrls = (mediaNode) => {
218
- const imgNode = getBinaryNodeChild(mediaNode, 'image');
186
+ const results = await Promise.all(images.map(async img => {
187
+ if ('url' in img) {
188
+ const url = img.url.toString();
189
+ if (url.includes('.whatsapp.net')) {
190
+ return {
191
+ url
192
+ };
193
+ }
194
+ }
195
+ const {
196
+ stream
197
+ } = await getStream(img);
198
+ const hasher = createHash('sha256');
199
+ const filePath = join(tmpdir(), 'img' + generateMessageIDV2());
200
+ const encFileWriteStream = createWriteStream(filePath);
201
+ for await (const block of stream) {
202
+ hasher.update(block);
203
+ encFileWriteStream.write(block);
204
+ }
205
+ const sha = hasher.digest('base64');
206
+ const {
207
+ directPath
208
+ } = await waUploadToServer(filePath, {
209
+ mediaType: 'product-catalog-image',
210
+ fileEncSha256B64: sha,
211
+ timeoutMs
212
+ });
213
+ await fs.unlink(filePath).catch(err => console.log('Error deleting temp file ', err));
219
214
  return {
220
- requested: getBinaryNodeChildString(imgNode, 'request_image_url'),
221
- original: getBinaryNodeChildString(imgNode, 'original_image_url')
215
+ url: getUrlFromDirectPath(directPath)
222
216
  };
217
+ }));
218
+ return results;
223
219
  };
224
- const parseStatusInfo = (mediaNode) => {
225
- const node = getBinaryNodeChild(mediaNode, 'status_info');
226
- return {
227
- status: getBinaryNodeChildString(node, 'status'),
228
- canAppeal: getBinaryNodeChildString(node, 'can_appeal') === 'true'
229
- };
220
+ const parseImageUrls = mediaNode => {
221
+ const imgNode = getBinaryNodeChild(mediaNode, 'image');
222
+ return {
223
+ requested: getBinaryNodeChildString(imgNode, 'request_image_url'),
224
+ original: getBinaryNodeChildString(imgNode, 'original_image_url')
225
+ };
226
+ };
227
+ const parseStatusInfo = mediaNode => {
228
+ const node = getBinaryNodeChild(mediaNode, 'status_info');
229
+ return {
230
+ status: getBinaryNodeChildString(node, 'status'),
231
+ canAppeal: getBinaryNodeChildString(node, 'can_appeal') === 'true'
232
+ };
230
233
  };
231
234
  //# sourceMappingURL=business.js.map