@open-wa/schema 5.0.0-alpha.2 → 5.0.0-alpha.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.
Files changed (102) hide show
  1. package/dist/generated/index.cjs +598 -0
  2. package/dist/generated/index.cjs.map +1 -0
  3. package/dist/generated/index.d.cts +3674 -0
  4. package/dist/generated/index.d.cts.map +1 -0
  5. package/dist/generated/index.d.mts +3674 -0
  6. package/dist/generated/index.d.mts.map +1 -0
  7. package/dist/generated/index.mjs +595 -0
  8. package/dist/generated/index.mjs.map +1 -0
  9. package/dist/http-manifest-BlJWPKsp.d.mts +177 -0
  10. package/dist/http-manifest-BlJWPKsp.d.mts.map +1 -0
  11. package/dist/http-manifest-DCOVY9QZ.d.cts +177 -0
  12. package/dist/http-manifest-DCOVY9QZ.d.cts.map +1 -0
  13. package/dist/http-manifest.cjs +59 -0
  14. package/dist/http-manifest.cjs.map +1 -0
  15. package/dist/http-manifest.d.cts +2 -0
  16. package/dist/http-manifest.d.mts +2 -0
  17. package/dist/http-manifest.mjs +58 -0
  18. package/dist/http-manifest.mjs.map +1 -0
  19. package/dist/implementor-DIBNbQXA.d.cts +8 -0
  20. package/dist/implementor-DIBNbQXA.d.cts.map +1 -0
  21. package/dist/implementor-DoN9ga7C.d.mts +8 -0
  22. package/dist/implementor-DoN9ga7C.d.mts.map +1 -0
  23. package/dist/implementor.cjs +50 -0
  24. package/dist/implementor.cjs.map +1 -0
  25. package/dist/implementor.d.cts +2 -0
  26. package/dist/implementor.d.mts +2 -0
  27. package/dist/implementor.mjs +48 -0
  28. package/dist/implementor.mjs.map +1 -0
  29. package/dist/index-BB9uyLe8.d.cts +1323 -0
  30. package/dist/index-BB9uyLe8.d.cts.map +1 -0
  31. package/dist/index-D77q1gPk.d.mts +1323 -0
  32. package/dist/index-D77q1gPk.d.mts.map +1 -0
  33. package/dist/index.cjs +649 -0
  34. package/dist/index.cjs.map +1 -0
  35. package/dist/index.d.cts +4 -0
  36. package/dist/index.d.mts +4 -0
  37. package/dist/index.mjs +299 -0
  38. package/dist/index.mjs.map +1 -0
  39. package/dist/methods/index.cjs +125 -0
  40. package/dist/methods/index.d.cts +2 -0
  41. package/dist/methods/index.d.mts +2 -0
  42. package/dist/methods/index.mjs +2 -0
  43. package/dist/methods-BXZrkKjP.mjs +2633 -0
  44. package/dist/methods-BXZrkKjP.mjs.map +1 -0
  45. package/dist/methods-CuiwUO7-.cjs +3802 -0
  46. package/dist/methods-CuiwUO7-.cjs.map +1 -0
  47. package/dist/registry-CsyR8i6y.mjs +284 -0
  48. package/dist/registry-CsyR8i6y.mjs.map +1 -0
  49. package/dist/registry-TbMVoiw5.cjs +355 -0
  50. package/dist/registry-TbMVoiw5.cjs.map +1 -0
  51. package/package.json +6 -3
  52. package/CHANGELOG.md +0 -31
  53. package/client_migration_doc.md +0 -467
  54. package/codecs_and_params_plan.md +0 -936
  55. package/migration_plan_doc.md +0 -223
  56. package/scripts/gen-client-implementation.ts +0 -129
  57. package/scripts/gen-client-reference-docs.ts +0 -621
  58. package/scripts/gen-openapi.ts +0 -96
  59. package/scripts/gen-types.ts +0 -43
  60. package/scripts/verify-v5-pipeline.ts +0 -85
  61. package/src/__tests__/generators.contract.test.ts +0 -181
  62. package/src/__tests__/registry.contract.test.ts +0 -81
  63. package/src/client-config.ts +0 -30
  64. package/src/codecs.test.ts +0 -41
  65. package/src/codecs.ts +0 -191
  66. package/src/common-types.ts +0 -280
  67. package/src/config.ts +0 -47
  68. package/src/enums.ts +0 -63
  69. package/src/events/groups.ts +0 -33
  70. package/src/events/index.ts +0 -4
  71. package/src/events/messaging.ts +0 -72
  72. package/src/events/registry.ts +0 -114
  73. package/src/events/state.ts +0 -59
  74. package/src/generated/AliasMap.ts +0 -214
  75. package/src/generated/BaseClient.ts +0 -868
  76. package/src/generated/BaseNamespacedClient.ts +0 -212
  77. package/src/generated/index.ts +0 -5
  78. package/src/generated/openapi.json +0 -7799
  79. package/src/generated/types.ts +0 -377
  80. package/src/http-manifest.ts +0 -97
  81. package/src/implementor.test.ts +0 -88
  82. package/src/implementor.ts +0 -75
  83. package/src/index.ts +0 -43
  84. package/src/methods/business.ts +0 -51
  85. package/src/methods/chats.ts +0 -263
  86. package/src/methods/communities.ts +0 -119
  87. package/src/methods/contacts.ts +0 -158
  88. package/src/methods/groups.ts +0 -376
  89. package/src/methods/index.ts +0 -33
  90. package/src/methods/labels.ts +0 -86
  91. package/src/methods/media.ts +0 -36
  92. package/src/methods/messaging.ts +0 -828
  93. package/src/methods/session.ts +0 -261
  94. package/src/methods/status.ts +0 -120
  95. package/src/open-wa-utils.d.ts +0 -4
  96. package/src/parameters.ts +0 -237
  97. package/src/registry.test.ts +0 -30
  98. package/src/registry.ts +0 -601
  99. package/tsconfig.generated.json +0 -11
  100. package/tsconfig.json +0 -15
  101. package/tsdown.config.ts +0 -16
  102. package/vitest.config.ts +0 -10
package/src/index.ts DELETED
@@ -1,43 +0,0 @@
1
- export * from './registry';
2
- export * from './config';
3
- export * from './client-config';
4
- export * from './common-types';
5
- export * from './methods';
6
- export * from './events';
7
- export * from './enums';
8
- export * from './implementor';
9
- export {
10
- chatIdCodec,
11
- contactIdCodec,
12
- groupIdCodec,
13
- messageIdCodec,
14
- createFileCodec,
15
- fileToDataUrlCodec,
16
- fileToBase64Codec,
17
- fileToBufferCodec,
18
- fileToTempPathCodec,
19
- fileToStreamCodec,
20
- base64ToDataUrlCodec,
21
- urlToDataUrlCodec,
22
- isoDatetimeToDate,
23
- unixSecondsToDate,
24
- unixMillisToDate,
25
- hexColorCodec,
26
- jsonStringCodec,
27
- ChatIdSchema,
28
- ContactIdSchema,
29
- GroupIdSchema,
30
- MessageIdSchema,
31
- ChatIdCodecSchema,
32
- ContactIdCodecSchema,
33
- GroupIdCodecSchema,
34
- MessageIdCodecSchema,
35
- FileToDataUrlSchema,
36
- Base64ToDataUrlSchema,
37
- HexColorSchema,
38
- IsoDatetimeToDateSchema,
39
- UnixSecondsToDateSchema,
40
- UnixMillisToDateSchema
41
- } from './codecs';
42
- export * from './parameters';
43
- export * from './http-manifest';
@@ -1,51 +0,0 @@
1
- import { z } from 'zod';
2
- import { defineMethodV2 } from '../registry';
3
- import { contactIdParam, messageIdParam } from '../parameters';
4
-
5
- export const getBusinessProfile = defineMethodV2('getBusinessProfile', {
6
- meta: {
7
- description: 'Get business profile',
8
- action: 'read',
9
- namespace: 'business',
10
- license: 'none',
11
- functionality: 'both',
12
- httpMethod: 'GET',
13
- },
14
- input: z.object({ contactId: contactIdParam }),
15
- parameterOrder: ['contactId'],
16
- output: z.any(),
17
- });
18
-
19
- export const getBusinessProducts = defineMethodV2('getBusinessProducts', {
20
- meta: {
21
- description: 'Get business products',
22
- action: 'read',
23
- namespace: 'business',
24
- license: 'none',
25
- functionality: 'both',
26
- httpMethod: 'GET',
27
- aliases: {
28
- deprecated: ['getBusinessProfilesProducts'],
29
- },
30
- wapiOverride: 'getBusinessProfilesProducts',
31
- },
32
- input: z.object({ contactId: contactIdParam }),
33
- parameterOrder: ['contactId'],
34
- output: z.any(),
35
- });
36
-
37
- export const getOrder = defineMethodV2('getOrder', {
38
- meta: {
39
- description: 'Get order details',
40
- action: 'read',
41
- namespace: 'business',
42
- license: 'insiders',
43
- functionality: 'both',
44
- httpMethod: 'GET',
45
- },
46
- input: z.object({
47
- id: z.union([messageIdParam, z.string()]).describe('Order or message ID'),
48
- }),
49
- parameterOrder: ['id'],
50
- output: z.any(),
51
- });
@@ -1,263 +0,0 @@
1
- import { z } from 'zod';
2
- import { defineMethodV2 } from '../registry';
3
- import { chatIdParam, withNewMessagesOnlyParam } from '../parameters';
4
-
5
- export const getAllChats = defineMethodV2('getAllChats', {
6
- meta: {
7
- description: 'Retrieves all chats',
8
- action: 'read',
9
- namespace: 'chats',
10
- license: 'none',
11
- functionality: 'both',
12
- httpMethod: 'GET',
13
- },
14
- input: z.object({ withNewMessagesOnly: withNewMessagesOnlyParam }),
15
- parameterOrder: ['withNewMessagesOnly'],
16
- output: z.array(z.any()),
17
- });
18
-
19
- export const getAllChatIds = defineMethodV2('getAllChatIds', {
20
- meta: {
21
- description: 'Get all chat IDs',
22
- action: 'read',
23
- namespace: 'chatIds',
24
- license: 'none',
25
- functionality: 'both',
26
- httpMethod: 'GET',
27
- aliases: {
28
- explicit: ['chats.ids'],
29
- },
30
- },
31
- input: z.object({}),
32
- parameterOrder: [],
33
- output: z.array(z.string()),
34
- });
35
-
36
- // export const getAllChatsWithMessages = defineMethodV2('getAllChatsWithMessages', {
37
- // meta: {
38
- // description: 'Get chats with messages',
39
- // action: 'read',
40
- // namespace: 'chats',
41
- // license: 'none',
42
- // functionality: 'both',
43
- // httpMethod: 'GET',
44
- // },
45
- // input: z.object({
46
- // withNewMessagesOnly: withNewMessagesOnlyParam,
47
- // }),
48
- // parameterOrder: ['withNewMessagesOnly'],
49
- // output: z.array(z.any()),
50
- // });
51
-
52
- export const getChat = defineMethodV2('getChat', {
53
- meta: {
54
- description: 'Get specific chat by ID',
55
- action: 'read',
56
- namespace: 'chats',
57
- license: 'none',
58
- functionality: 'both',
59
- httpMethod: 'GET',
60
- aliases: {
61
- explicit: ['getChatById'],
62
- },
63
- },
64
- input: z.object({
65
- chatId: chatIdParam,
66
- }),
67
- parameterOrder: ['chatId'],
68
- output: z.any(),
69
- });
70
-
71
- export const getChatWithNonContacts = defineMethodV2('getChatWithNonContacts', {
72
- meta: {
73
- description: 'Get chats with non-contacts',
74
- action: 'read',
75
- namespace: 'chats',
76
- license: 'none',
77
- functionality: 'both',
78
- httpMethod: 'GET',
79
- },
80
- input: z.object({}),
81
- parameterOrder: [],
82
- output: z.array(z.any()),
83
- });
84
-
85
- export const archiveChat = defineMethodV2('archiveChat', {
86
- meta: {
87
- description: 'Archive a chat',
88
- action: 'update',
89
- namespace: 'chats',
90
- license: 'none',
91
- functionality: 'both',
92
- httpMethod: 'PUT',
93
- },
94
- input: z.object({ chatId: chatIdParam }),
95
- parameterOrder: ['chatId'],
96
- output: z.boolean(),
97
- });
98
-
99
- export const unarchiveChat = defineMethodV2('unarchiveChat', {
100
- meta: {
101
- description: 'Unarchive a chat',
102
- action: 'update',
103
- namespace: 'chats',
104
- license: 'none',
105
- functionality: 'both',
106
- httpMethod: 'PUT',
107
- },
108
- input: z.object({ chatId: chatIdParam }),
109
- parameterOrder: ['chatId'],
110
- output: z.boolean(),
111
- });
112
-
113
- export const clearChat = defineMethodV2('clearChat', {
114
- meta: {
115
- description: 'Clear chat history',
116
- action: 'delete',
117
- namespace: 'chats',
118
- license: 'none',
119
- functionality: 'both',
120
- httpMethod: 'DELETE',
121
- },
122
- input: z.object({ chatId: chatIdParam }),
123
- parameterOrder: ['chatId'],
124
- output: z.boolean(),
125
- });
126
-
127
- export const deleteChat = defineMethodV2('deleteChat', {
128
- meta: {
129
- description: 'Delete a chat',
130
- action: 'delete',
131
- namespace: 'chats',
132
- license: 'none',
133
- functionality: 'both',
134
- httpMethod: 'DELETE',
135
- },
136
- input: z.object({ chatId: chatIdParam }),
137
- parameterOrder: ['chatId'],
138
- output: z.boolean(),
139
- });
140
-
141
- export const pinChat = defineMethodV2('pinChat', {
142
- meta: {
143
- description: 'Pin a chat',
144
- action: 'update',
145
- namespace: 'chats',
146
- license: 'none',
147
- functionality: 'both',
148
- httpMethod: 'PUT',
149
- },
150
- input: z.object({ chatId: chatIdParam }),
151
- parameterOrder: ['chatId'],
152
- output: z.boolean(),
153
- });
154
-
155
- export const unpinChat = defineMethodV2('unpinChat', {
156
- meta: {
157
- description: 'Unpin a chat',
158
- action: 'update',
159
- namespace: 'chats',
160
- license: 'none',
161
- functionality: 'both',
162
- httpMethod: 'PUT',
163
- },
164
- input: z.object({ chatId: chatIdParam }),
165
- parameterOrder: ['chatId'],
166
- output: z.boolean(),
167
- });
168
-
169
- export const muteChat = defineMethodV2('muteChat', {
170
- meta: {
171
- description: 'Mute a chat',
172
- action: 'update',
173
- namespace: 'chats',
174
- license: 'none',
175
- functionality: 'both',
176
- httpMethod: 'PUT',
177
- },
178
- input: z.object({
179
- chatId: chatIdParam,
180
- muteDuration: z.union([z.number(), z.string()]).describe('Mute duration'),
181
- }),
182
- parameterOrder: ['chatId', 'muteDuration'],
183
- output: z.union([z.string(), z.boolean(), z.number()]),
184
- });
185
-
186
- export const unmuteChat = defineMethodV2('unmuteChat', {
187
- meta: {
188
- description: 'Unmute a chat',
189
- action: 'update',
190
- namespace: 'chats',
191
- license: 'none',
192
- functionality: 'both',
193
- httpMethod: 'PUT',
194
- },
195
- input: z.object({ chatId: chatIdParam }),
196
- parameterOrder: ['chatId'],
197
- output: z.union([z.string(), z.boolean(), z.number()]),
198
- });
199
-
200
- export const markAsRead = defineMethodV2('markAsRead', {
201
- meta: {
202
- description: 'Mark chat as read',
203
- action: 'update',
204
- namespace: 'chats',
205
- license: 'none',
206
- functionality: 'both',
207
- httpMethod: 'PUT',
208
- aliases: {
209
- namespacedName: 'markAsRead',
210
- },
211
- },
212
- input: z.object({ chatId: chatIdParam }),
213
- parameterOrder: ['chatId'],
214
- output: z.boolean(),
215
- });
216
-
217
- export const markAsUnread = defineMethodV2('markAsUnread', {
218
- meta: {
219
- description: 'Mark chat as unread',
220
- action: 'update',
221
- namespace: 'chats',
222
- license: 'none',
223
- functionality: 'both',
224
- httpMethod: 'PUT',
225
- aliases: {
226
- namespacedName: 'markAsUnread',
227
- },
228
- },
229
- input: z.object({ chatId: chatIdParam }),
230
- parameterOrder: ['chatId'],
231
- output: z.boolean(),
232
- });
233
-
234
- export const setChatEphemeral = defineMethodV2('setChatEphemeral', {
235
- meta: {
236
- description: 'Set ephemeral messages for chat',
237
- action: 'update',
238
- namespace: 'chats',
239
- license: 'none',
240
- functionality: 'both',
241
- httpMethod: 'PUT',
242
- },
243
- input: z.object({
244
- chatId: chatIdParam,
245
- ephemeral: z.union([z.boolean(), z.number()]).describe('Ephemeral setting'),
246
- }),
247
- parameterOrder: ['chatId', 'ephemeral'],
248
- output: z.boolean(),
249
- });
250
-
251
- export const isChatOnline = defineMethodV2('isChatOnline', {
252
- meta: {
253
- description: 'Check if chat is online',
254
- action: 'read',
255
- namespace: 'chats',
256
- license: 'none',
257
- functionality: 'both',
258
- httpMethod: 'GET',
259
- },
260
- input: z.object({ chatId: chatIdParam }),
261
- parameterOrder: ['chatId'],
262
- output: z.union([z.boolean(), z.string()]),
263
- });
@@ -1,119 +0,0 @@
1
- import { z } from 'zod';
2
- import { defineMethodV2 } from '../registry';
3
- import { communityIdParam } from '../parameters';
4
-
5
- // ============================================================================
6
- // Community Methods
7
- // ============================================================================
8
-
9
- /**
10
- * Get all communities
11
- */
12
- export const getAllCommunities = defineMethodV2('getAllCommunities', {
13
- meta: {
14
- description: 'Get all communities',
15
- action: 'read',
16
- namespace: 'communities',
17
- license: 'none',
18
- functionality: 'both',
19
- httpMethod: 'GET',
20
- },
21
- input: z.object({}),
22
- parameterOrder: [],
23
- output: z.array(z.string())
24
- });
25
-
26
- /**
27
- * Get community info
28
- */
29
- export const getCommunityInfo = defineMethodV2('getCommunityInfo', {
30
- meta: {
31
- description: 'Get community metadata',
32
- action: 'read',
33
- namespace: 'communities',
34
- license: 'none',
35
- functionality: 'both',
36
- httpMethod: 'GET',
37
- },
38
- input: z.object({
39
- communityId: communityIdParam
40
- }),
41
- parameterOrder: ['communityId'],
42
- output: z.any()
43
- });
44
-
45
- /**
46
- * Get community participant IDs
47
- */
48
- export const getCommunityParticipantIds = defineMethodV2('getCommunityParticipantIds', {
49
- meta: {
50
- description: 'Get community participant IDs',
51
- action: 'read',
52
- namespace: 'communities',
53
- license: 'none',
54
- functionality: 'both',
55
- httpMethod: 'GET',
56
- },
57
- input: z.object({
58
- communityId: communityIdParam
59
- }),
60
- parameterOrder: ['communityId'],
61
- output: z.any()
62
- });
63
-
64
- /**
65
- * Get community admin IDs
66
- */
67
- export const getCommunityAdminIds = defineMethodV2('getCommunityAdminIds', {
68
- meta: {
69
- description: 'Get community admin IDs',
70
- action: 'read',
71
- namespace: 'communities',
72
- license: 'none',
73
- functionality: 'both',
74
- httpMethod: 'GET',
75
- },
76
- input: z.object({
77
- communityId: communityIdParam
78
- }),
79
- parameterOrder: ['communityId'],
80
- output: z.any()
81
- });
82
-
83
- /**
84
- * Get community participants
85
- */
86
- export const getCommunityParticipants = defineMethodV2('getCommunityParticipants', {
87
- meta: {
88
- description: 'Get community participants',
89
- action: 'read',
90
- namespace: 'communities',
91
- license: 'none',
92
- functionality: 'both',
93
- httpMethod: 'GET',
94
- },
95
- input: z.object({
96
- communityId: communityIdParam
97
- }),
98
- parameterOrder: ['communityId'],
99
- output: z.any()
100
- });
101
-
102
- /**
103
- * Get community admins
104
- */
105
- export const getCommunityAdmins = defineMethodV2('getCommunityAdmins', {
106
- meta: {
107
- description: 'Get community admins',
108
- action: 'read',
109
- namespace: 'communities',
110
- license: 'none',
111
- functionality: 'both',
112
- httpMethod: 'GET',
113
- },
114
- input: z.object({
115
- communityId: communityIdParam
116
- }),
117
- parameterOrder: ['communityId'],
118
- output: z.any()
119
- });
@@ -1,158 +0,0 @@
1
- import { z } from 'zod';
2
- import { defineMethodV2 } from '../registry';
3
- import { chatIdParam, contactIdParam } from '../parameters';
4
-
5
- export const getAllContacts = defineMethodV2('getAllContacts', {
6
- meta: {
7
- description: 'Retrieves all contacts',
8
- action: 'read',
9
- namespace: 'contacts',
10
- license: 'none',
11
- functionality: 'both',
12
- httpMethod: 'GET',
13
- },
14
- input: z.object({}),
15
- parameterOrder: [],
16
- output: z.array(z.any()),
17
- });
18
-
19
- export const getContact = defineMethodV2('getContact', {
20
- meta: {
21
- description: 'Get specific contact',
22
- action: 'read',
23
- namespace: 'contacts',
24
- license: 'none',
25
- functionality: 'both',
26
- httpMethod: 'GET',
27
- },
28
- input: z.object({ contactId: contactIdParam }),
29
- parameterOrder: ['contactId'],
30
- output: z.any(),
31
- });
32
-
33
- export const getCommonGroups = defineMethodV2('getCommonGroups', {
34
- meta: {
35
- description: 'Get common groups with contact',
36
- action: 'read',
37
- namespace: 'contacts',
38
- license: 'none',
39
- functionality: 'both',
40
- httpMethod: 'GET',
41
- },
42
- input: z.object({ contactId: contactIdParam }),
43
- parameterOrder: ['contactId'],
44
- output: z.any(),
45
- });
46
-
47
- export const getNumberProfile = defineMethodV2('getNumberProfile', {
48
- meta: {
49
- description: 'Get profile of number',
50
- action: 'read',
51
- namespace: 'contacts',
52
- license: 'insiders',
53
- functionality: 'both',
54
- httpMethod: 'GET',
55
- },
56
- input: z.object({ contactId: contactIdParam }),
57
- parameterOrder: ['contactId'],
58
- output: z.any(),
59
- });
60
-
61
- export const getBlockedIds = defineMethodV2('getBlockedIds', {
62
- meta: {
63
- description: 'Get blocked contact IDs',
64
- action: 'read',
65
- namespace: 'contacts',
66
- license: 'none',
67
- functionality: 'both',
68
- httpMethod: 'GET',
69
- },
70
- input: z.object({}),
71
- parameterOrder: [],
72
- output: z.array(z.string()),
73
- });
74
-
75
- export const blockContact = defineMethodV2('blockContact', {
76
- meta: {
77
- description: 'Block a contact',
78
- action: 'update',
79
- namespace: 'contacts',
80
- license: 'none',
81
- functionality: 'both',
82
- httpMethod: 'PUT',
83
- aliases: {
84
- deprecated: ['contactBlock'],
85
- },
86
- wapiOverride: 'contactBlock',
87
- },
88
- input: z.object({ contactId: contactIdParam }),
89
- parameterOrder: ['contactId'],
90
- output: z.boolean(),
91
- });
92
-
93
- export const unblockContact = defineMethodV2('unblockContact', {
94
- meta: {
95
- description: 'Unblock a contact',
96
- action: 'update',
97
- namespace: 'contacts',
98
- license: 'none',
99
- functionality: 'both',
100
- httpMethod: 'PUT',
101
- aliases: {
102
- deprecated: ['contactUnblock'],
103
- },
104
- wapiOverride: 'contactUnblock',
105
- },
106
- input: z.object({ contactId: contactIdParam }),
107
- parameterOrder: ['contactId'],
108
- output: z.boolean(),
109
- });
110
-
111
- export const checkReadReceipts = defineMethodV2('checkReadReceipts', {
112
- meta: {
113
- description: 'Check read receipts setting',
114
- action: 'read',
115
- namespace: 'contacts',
116
- license: 'none',
117
- functionality: 'both',
118
- httpMethod: 'GET',
119
- aliases: {
120
- explicit: ['getReadReceipts'],
121
- },
122
- },
123
- input: z.object({ contactId: contactIdParam }),
124
- parameterOrder: ['contactId'],
125
- output: z.union([z.boolean(), z.string()]),
126
- });
127
-
128
- export const checkNumberStatus = defineMethodV2('checkNumberStatus', {
129
- meta: {
130
- description: 'Check if number is on WhatsApp',
131
- action: 'read',
132
- namespace: 'contacts',
133
- license: 'insiders',
134
- functionality: 'both',
135
- httpMethod: 'GET',
136
- },
137
- input: z.object({ contactId: contactIdParam }),
138
- parameterOrder: ['contactId'],
139
- output: z.any(),
140
- });
141
-
142
- export const getProfilePicture = defineMethodV2('getProfilePicture', {
143
- meta: {
144
- description: 'Get profile picture from server',
145
- action: 'read',
146
- namespace: 'contacts',
147
- license: 'none',
148
- functionality: 'both',
149
- httpMethod: 'GET',
150
- aliases: {
151
- deprecated: ['getProfilePicFromServer'],
152
- },
153
- wapiOverride: 'getProfilePicFromServer',
154
- },
155
- input: z.object({ chatId: chatIdParam }),
156
- parameterOrder: ['chatId'],
157
- output: z.string(),
158
- });