@open-wa/schema 5.0.0 → 5.1.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/generated/index.cjs +8 -2
- package/dist/generated/index.cjs.map +1 -1
- package/dist/generated/index.d.cts +715 -1
- package/dist/generated/index.d.cts.map +1 -1
- package/dist/generated/index.d.mts +715 -1
- package/dist/generated/index.d.mts.map +1 -1
- package/dist/generated/index.mjs +8 -2
- package/dist/generated/index.mjs.map +1 -1
- package/dist/{index-ChYFQM1K.d.cts → index-DTztyYhw.d.cts} +893 -3
- package/dist/index-DTztyYhw.d.cts.map +1 -0
- package/dist/{index-BHcd0h7x.d.mts → index-nVKR0RmZ.d.mts} +893 -3
- package/dist/index-nVKR0RmZ.d.mts.map +1 -0
- package/dist/index.cjs +51 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +24 -2
- package/dist/index.mjs.map +1 -1
- package/dist/methods/index.cjs +5 -1
- package/dist/methods/index.d.cts +2 -2
- package/dist/methods/index.d.mts +2 -2
- package/dist/methods/index.mjs +2 -2
- package/dist/{methods-CZqeUhKy.mjs → methods-BSv5O3bS.mjs} +317 -2
- package/dist/methods-BSv5O3bS.mjs.map +1 -0
- package/dist/{methods-Dizm7Fn9.cjs → methods-DO0JONvB.cjs} +472 -1
- package/dist/methods-DO0JONvB.cjs.map +1 -0
- package/package.json +4 -3
- package/src/__tests__/generators.contract.test.ts +181 -0
- package/src/__tests__/registry.contract.test.ts +81 -0
- package/src/client-config.ts +30 -0
- package/src/codecs.test.ts +41 -0
- package/src/codecs.ts +191 -0
- package/src/common-types.ts +280 -0
- package/src/config.ts +47 -0
- package/src/enums.ts +63 -0
- package/src/events/groups.ts +33 -0
- package/src/events/index.ts +4 -0
- package/src/events/messaging.ts +86 -0
- package/src/events/registry.ts +124 -0
- package/src/events/state.ts +59 -0
- package/src/generated/AliasMap.ts +216 -0
- package/src/generated/BaseClient.ts +878 -0
- package/src/generated/BaseNamespacedClient.ts +214 -0
- package/src/generated/index.ts +5 -0
- package/src/generated/openapi.json +8949 -0
- package/src/generated/types.ts +383 -0
- package/src/http-manifest.ts +97 -0
- package/src/implementor.test.ts +88 -0
- package/src/implementor.ts +75 -0
- package/src/index.ts +44 -0
- package/src/interactive.ts +151 -0
- package/src/methods/business.ts +51 -0
- package/src/methods/chats.ts +263 -0
- package/src/methods/communities.ts +119 -0
- package/src/methods/contacts.ts +158 -0
- package/src/methods/groups.ts +376 -0
- package/src/methods/index.ts +34 -0
- package/src/methods/interactive.ts +21 -0
- package/src/methods/labels.ts +86 -0
- package/src/methods/media.ts +36 -0
- package/src/methods/messaging.ts +828 -0
- package/src/methods/session.ts +261 -0
- package/src/methods/status.ts +120 -0
- package/src/parameters.ts +237 -0
- package/src/registry.test.ts +30 -0
- package/src/registry.ts +601 -0
- package/dist/index-BHcd0h7x.d.mts.map +0 -1
- package/dist/index-ChYFQM1K.d.cts.map +0 -1
- package/dist/methods-CZqeUhKy.mjs.map +0 -1
- package/dist/methods-Dizm7Fn9.cjs.map +0 -1
package/src/enums.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Action types for RBAC permissions
|
|
5
|
+
* - read: Retrieve data (e.g., get contact, chat object)
|
|
6
|
+
* - send: Create/send new content (e.g., send message, image, story)
|
|
7
|
+
* - update: Modify existing data (e.g., update message, chat metadata, promote admin)
|
|
8
|
+
* - delete: Remove data (e.g., delete chat, story, remove contact, demote admin)
|
|
9
|
+
*/
|
|
10
|
+
export const ActionEnum = z.enum([
|
|
11
|
+
'read',
|
|
12
|
+
'send',
|
|
13
|
+
'update',
|
|
14
|
+
'delete'
|
|
15
|
+
]);
|
|
16
|
+
|
|
17
|
+
export type ActionType = z.infer<typeof ActionEnum>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* License tiers for feature gating
|
|
21
|
+
* - none: Available to all users
|
|
22
|
+
* - insiders: Requires insiders license
|
|
23
|
+
* - restricted: Requires special/restricted license
|
|
24
|
+
*/
|
|
25
|
+
export const LicenseEnum = z.enum([
|
|
26
|
+
'none',
|
|
27
|
+
'insiders',
|
|
28
|
+
'restricted'
|
|
29
|
+
]);
|
|
30
|
+
|
|
31
|
+
export type LicenseTier = z.infer<typeof LicenseEnum>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Functionality scope for WhatsApp account types
|
|
35
|
+
* - both: Works on both business and personal accounts
|
|
36
|
+
* - business-only: Only works on business accounts
|
|
37
|
+
* - personal-only: Only works on personal accounts
|
|
38
|
+
*/
|
|
39
|
+
export const FunctionalityEnum = z.enum([
|
|
40
|
+
'both',
|
|
41
|
+
'business-only',
|
|
42
|
+
'personal-only'
|
|
43
|
+
]);
|
|
44
|
+
|
|
45
|
+
export type FunctionalityScope = z.infer<typeof FunctionalityEnum>;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* HTTP methods for API mapping
|
|
49
|
+
* - AUTO: Automatically inferred from action type or defaults to POST
|
|
50
|
+
* - GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD: Standard HTTP methods
|
|
51
|
+
*/
|
|
52
|
+
export const HttpMethodEnum = z.enum([
|
|
53
|
+
'AUTO',
|
|
54
|
+
'GET',
|
|
55
|
+
'POST',
|
|
56
|
+
'PUT',
|
|
57
|
+
'DELETE',
|
|
58
|
+
'PATCH',
|
|
59
|
+
'OPTIONS',
|
|
60
|
+
'HEAD'
|
|
61
|
+
]);
|
|
62
|
+
|
|
63
|
+
export type HttpMethod = z.infer<typeof HttpMethodEnum>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineListenerV2 } from './registry';
|
|
3
|
+
|
|
4
|
+
export const participantsChangedEvent = defineListenerV2('participantsChanged', {
|
|
5
|
+
legacyName: 'onParticipantsChanged',
|
|
6
|
+
meta: {
|
|
7
|
+
description: 'Fired when group participants change',
|
|
8
|
+
namespace: 'groups',
|
|
9
|
+
status: 'stable',
|
|
10
|
+
license: 'none',
|
|
11
|
+
},
|
|
12
|
+
payload: z.object({
|
|
13
|
+
groupId: z.string(),
|
|
14
|
+
action: z.enum(['add', 'remove', 'promote', 'demote']),
|
|
15
|
+
participantIds: z.array(z.string()),
|
|
16
|
+
by: z.string().optional(),
|
|
17
|
+
}),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const addedToGroupEvent = defineListenerV2('addedToGroup', {
|
|
21
|
+
legacyName: 'onAddedToGroup',
|
|
22
|
+
meta: {
|
|
23
|
+
description: 'Fired when you are added to a group',
|
|
24
|
+
namespace: 'groups',
|
|
25
|
+
status: 'stable',
|
|
26
|
+
license: 'none',
|
|
27
|
+
},
|
|
28
|
+
payload: z.object({
|
|
29
|
+
groupId: z.string(),
|
|
30
|
+
groupName: z.string(),
|
|
31
|
+
addedBy: z.string().optional(),
|
|
32
|
+
}),
|
|
33
|
+
});
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { InteractiveResponseSchema, FormResponseSchema } from '../interactive';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { defineListenerV2 } from './registry';
|
|
4
|
+
import { MessageSchema, MessageAck } from '../common-types';
|
|
5
|
+
|
|
6
|
+
const AckSchema = z.object({
|
|
7
|
+
id: z.string(),
|
|
8
|
+
chatId: z.string(),
|
|
9
|
+
ack: z.nativeEnum(MessageAck),
|
|
10
|
+
timestamp: z.number().optional(),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export const messageEvent = defineListenerV2('message', {
|
|
14
|
+
legacyName: 'onMessage',
|
|
15
|
+
meta: {
|
|
16
|
+
description: 'Fired when a new message is received (excluding own messages)',
|
|
17
|
+
namespace: 'messages',
|
|
18
|
+
status: 'stable',
|
|
19
|
+
license: 'none',
|
|
20
|
+
},
|
|
21
|
+
payload: MessageSchema,
|
|
22
|
+
defaultQueueOptions: { concurrency: 1 },
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export const anyMessageEvent = defineListenerV2('anyMessage', {
|
|
26
|
+
legacyName: 'onAnyMessage',
|
|
27
|
+
meta: {
|
|
28
|
+
description: 'Fired for any message including own messages',
|
|
29
|
+
namespace: 'messages',
|
|
30
|
+
status: 'stable',
|
|
31
|
+
license: 'none',
|
|
32
|
+
},
|
|
33
|
+
payload: MessageSchema,
|
|
34
|
+
defaultQueueOptions: { concurrency: 1 },
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export const messageDeletedEvent = defineListenerV2('messageDeleted', {
|
|
38
|
+
legacyName: 'onMessageDeleted',
|
|
39
|
+
meta: {
|
|
40
|
+
description: 'Fired when a message is deleted',
|
|
41
|
+
namespace: 'messages',
|
|
42
|
+
status: 'stable',
|
|
43
|
+
license: 'none',
|
|
44
|
+
},
|
|
45
|
+
payload: MessageSchema,
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export const ackEvent = defineListenerV2('ack', {
|
|
49
|
+
legacyName: 'onAck',
|
|
50
|
+
meta: {
|
|
51
|
+
description: 'Fired when a message acknowledgment is received',
|
|
52
|
+
namespace: 'messages',
|
|
53
|
+
status: 'stable',
|
|
54
|
+
license: 'none',
|
|
55
|
+
},
|
|
56
|
+
payload: AckSchema,
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export const reactionEvent = defineListenerV2('reaction', {
|
|
60
|
+
legacyName: 'onReaction',
|
|
61
|
+
meta: {
|
|
62
|
+
description: 'Fired when a reaction is added to a message',
|
|
63
|
+
namespace: 'messages',
|
|
64
|
+
status: 'stable',
|
|
65
|
+
license: 'none',
|
|
66
|
+
},
|
|
67
|
+
payload: z.object({
|
|
68
|
+
messageId: z.string(),
|
|
69
|
+
reaction: z.string(),
|
|
70
|
+
senderId: z.string(),
|
|
71
|
+
timestamp: z.number(),
|
|
72
|
+
}),
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export const interactiveResponseEvent = defineListenerV2('interactiveResponse', {
|
|
76
|
+
legacyName: 'onInteractiveResponse',
|
|
77
|
+
meta: { description: 'Structured reply, list, form or native interactive response', namespace: 'messages', status: 'stable', license: 'insiders' },
|
|
78
|
+
payload: InteractiveResponseSchema,
|
|
79
|
+
defaultQueueOptions: { concurrency: 1 },
|
|
80
|
+
});
|
|
81
|
+
export const formResponseEvent = defineListenerV2('formResponse', {
|
|
82
|
+
legacyName: 'onFormResponse',
|
|
83
|
+
meta: { description: 'A form submission with question IDs and chosen option IDs', namespace: 'messages', status: 'stable', license: 'insiders' },
|
|
84
|
+
payload: FormResponseSchema,
|
|
85
|
+
defaultQueueOptions: { concurrency: 1 },
|
|
86
|
+
});
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { LicenseTier } from '../enums';
|
|
3
|
+
|
|
4
|
+
export type QueueOverloadStrategy = 'backpressure' | 'dropping';
|
|
5
|
+
|
|
6
|
+
export interface QueueOptions {
|
|
7
|
+
concurrency?: number;
|
|
8
|
+
capacity?: number;
|
|
9
|
+
overload?: QueueOverloadStrategy;
|
|
10
|
+
ordering?: 'fifo';
|
|
11
|
+
intervalCap?: number;
|
|
12
|
+
interval?: number;
|
|
13
|
+
timeout?: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type EventStatus = 'stable' | 'beta' | 'deprecated' | 'experimental';
|
|
17
|
+
|
|
18
|
+
export interface EventMetadata {
|
|
19
|
+
eventName: string;
|
|
20
|
+
legacyName: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
namespace?: string;
|
|
23
|
+
status?: EventStatus;
|
|
24
|
+
deprecated?: string;
|
|
25
|
+
license?: LicenseTier;
|
|
26
|
+
since?: string;
|
|
27
|
+
payloadSchema: z.ZodTypeAny;
|
|
28
|
+
defaultQueueOptions?: QueueOptions;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface EventDefinition {
|
|
32
|
+
callbackSchema: z.ZodFunction<any, any>;
|
|
33
|
+
meta: EventMetadata;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const eventsByName = new Map<string, EventDefinition>();
|
|
37
|
+
const nameByCallback = new WeakMap<z.ZodFunction<any, any>, string>();
|
|
38
|
+
|
|
39
|
+
export const eventRegistry = {
|
|
40
|
+
register(def: EventDefinition): z.ZodFunction<any, any> {
|
|
41
|
+
const name = def.meta.eventName;
|
|
42
|
+
|
|
43
|
+
if (eventsByName.has(name)) {
|
|
44
|
+
throw new Error(`Event "${name}" already registered`);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
eventsByName.set(name, def);
|
|
48
|
+
nameByCallback.set(def.callbackSchema, name);
|
|
49
|
+
|
|
50
|
+
return def.callbackSchema;
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
get(name: string): EventDefinition | undefined {
|
|
54
|
+
return eventsByName.get(name);
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
getByLegacyName(legacyName: string): EventDefinition | undefined {
|
|
58
|
+
for (const def of eventsByName.values()) {
|
|
59
|
+
if (def.meta.legacyName === legacyName) return def;
|
|
60
|
+
}
|
|
61
|
+
return undefined;
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
has(name: string): boolean {
|
|
65
|
+
return eventsByName.has(name);
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
getAll(): EventDefinition[] {
|
|
69
|
+
return Array.from(eventsByName.values());
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
getByNamespace(namespace: string): EventDefinition[] {
|
|
73
|
+
return this.getAll().filter(def => def.meta.namespace === namespace);
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
clear(): void {
|
|
77
|
+
eventsByName.clear();
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const QueueOptionsSchema = z.object({
|
|
82
|
+
concurrency: z.number().int().positive().optional(),
|
|
83
|
+
capacity: z.number().int().positive().optional(),
|
|
84
|
+
overload: z.enum(['backpressure', 'dropping']).optional(),
|
|
85
|
+
ordering: z.literal('fifo').optional(),
|
|
86
|
+
intervalCap: z.number().int().positive().optional(),
|
|
87
|
+
interval: z.number().positive().optional(),
|
|
88
|
+
timeout: z.number().positive().optional(),
|
|
89
|
+
}).optional();
|
|
90
|
+
|
|
91
|
+
export function defineListenerV2<T extends z.ZodTypeAny>(
|
|
92
|
+
name: string,
|
|
93
|
+
params: {
|
|
94
|
+
legacyName?: string;
|
|
95
|
+
meta: Omit<EventMetadata, 'eventName' | 'legacyName' | 'payloadSchema'>;
|
|
96
|
+
payload: T;
|
|
97
|
+
defaultQueueOptions?: QueueOptions;
|
|
98
|
+
}
|
|
99
|
+
): z.ZodFunction<any, any> {
|
|
100
|
+
|
|
101
|
+
const legacyName = params.legacyName || `on${name.charAt(0).toUpperCase()}${name.slice(1)}`;
|
|
102
|
+
|
|
103
|
+
const callbackSchema = z.function({
|
|
104
|
+
input: z.tuple([params.payload, QueueOptionsSchema]),
|
|
105
|
+
output: z.union([
|
|
106
|
+
z.boolean(),
|
|
107
|
+
z.promise(z.boolean()),
|
|
108
|
+
z.function({ input: z.tuple([]), output: z.void() }),
|
|
109
|
+
])
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
eventRegistry.register({
|
|
113
|
+
callbackSchema,
|
|
114
|
+
meta: {
|
|
115
|
+
eventName: name,
|
|
116
|
+
legacyName,
|
|
117
|
+
payloadSchema: params.payload,
|
|
118
|
+
defaultQueueOptions: params.defaultQueueOptions,
|
|
119
|
+
...params.meta
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
return callbackSchema as any;
|
|
124
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineListenerV2 } from './registry';
|
|
3
|
+
|
|
4
|
+
export const StateEnum = z.enum([
|
|
5
|
+
'STARTING',
|
|
6
|
+
'AUTHENTICATING',
|
|
7
|
+
'READY',
|
|
8
|
+
'STOPPED',
|
|
9
|
+
'CONNECTED',
|
|
10
|
+
'DISCONNECTED',
|
|
11
|
+
'SYNCING',
|
|
12
|
+
'CONFLICT',
|
|
13
|
+
'UNLAUNCHED',
|
|
14
|
+
'PAIRING',
|
|
15
|
+
'TIMEOUT',
|
|
16
|
+
]);
|
|
17
|
+
|
|
18
|
+
export const stateChangedEvent = defineListenerV2('stateChanged', {
|
|
19
|
+
legacyName: 'onStateChanged',
|
|
20
|
+
meta: {
|
|
21
|
+
description: 'Fired when connection state changes',
|
|
22
|
+
namespace: 'state',
|
|
23
|
+
status: 'stable',
|
|
24
|
+
license: 'none',
|
|
25
|
+
},
|
|
26
|
+
payload: z.object({
|
|
27
|
+
state: StateEnum,
|
|
28
|
+
previousState: StateEnum.optional(),
|
|
29
|
+
}),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export const chatStateEvent = defineListenerV2('chatState', {
|
|
33
|
+
legacyName: 'onChatState',
|
|
34
|
+
meta: {
|
|
35
|
+
description: 'Fired when someone is typing or recording',
|
|
36
|
+
namespace: 'state',
|
|
37
|
+
status: 'stable',
|
|
38
|
+
license: 'none',
|
|
39
|
+
},
|
|
40
|
+
payload: z.object({
|
|
41
|
+
chatId: z.string(),
|
|
42
|
+
state: z.enum(['typing', 'recording', 'paused']),
|
|
43
|
+
senderId: z.string(),
|
|
44
|
+
}),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export const logoutEvent = defineListenerV2('logout', {
|
|
48
|
+
legacyName: 'onLogout',
|
|
49
|
+
meta: {
|
|
50
|
+
description: 'Fired when the session is logged out',
|
|
51
|
+
namespace: 'state',
|
|
52
|
+
status: 'stable',
|
|
53
|
+
license: 'none',
|
|
54
|
+
},
|
|
55
|
+
payload: z.object({
|
|
56
|
+
reason: z.string().optional(),
|
|
57
|
+
timestamp: z.number(),
|
|
58
|
+
}),
|
|
59
|
+
});
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated by packages/schema/scripts/gen-client-implementation.ts
|
|
4
|
+
* Do not edit this file manually.
|
|
5
|
+
*/
|
|
6
|
+
export const clientMethodAliasMap = {
|
|
7
|
+
"messages.sendText": "sendText",
|
|
8
|
+
"messages.sendTextWithMentions": "sendTextWithMentions",
|
|
9
|
+
"messages.sendReplyWithMentions": "sendReplyWithMentions",
|
|
10
|
+
"messages.sendPaymentRequest": "sendPaymentRequest",
|
|
11
|
+
"messages.sendImage": "sendImage",
|
|
12
|
+
"messages.sendFile": "sendFile",
|
|
13
|
+
"messages.sendAudio": "sendAudio",
|
|
14
|
+
"sendVoiceNote": "sendPtt",
|
|
15
|
+
"messages.sendPtt": "sendPtt",
|
|
16
|
+
"messages.sendVoiceNote": "sendPtt",
|
|
17
|
+
"messages.sendVideoAsGif": "sendVideoAsGif",
|
|
18
|
+
"messages.sendLocation": "sendLocation",
|
|
19
|
+
"messages.sendVCard": "sendVCard",
|
|
20
|
+
"messages.sendContact": "sendContact",
|
|
21
|
+
"sendContacts": "sendMultipleContacts",
|
|
22
|
+
"messages.sendContacts": "sendMultipleContacts",
|
|
23
|
+
"messages.sendMultipleContacts": "sendMultipleContacts",
|
|
24
|
+
"messages.sendButtons": "sendButtons",
|
|
25
|
+
"messages.sendAdvancedButtons": "sendAdvancedButtons",
|
|
26
|
+
"sendList": "sendListMessage",
|
|
27
|
+
"messages.sendList": "sendListMessage",
|
|
28
|
+
"messages.sendPoll": "sendPoll",
|
|
29
|
+
"messages.sendBanner": "sendBanner",
|
|
30
|
+
"sendYoutubeLink": "sendYouTubeLink",
|
|
31
|
+
"messages.sendYouTubeLink": "sendYouTubeLink",
|
|
32
|
+
"messages.sendYoutubeLink": "sendYouTubeLink",
|
|
33
|
+
"sendLink": "sendLinkWithAutoPreview",
|
|
34
|
+
"messages.sendLinkWithAutoPreview": "sendLinkWithAutoPreview",
|
|
35
|
+
"messages.sendLink": "sendLinkWithAutoPreview",
|
|
36
|
+
"sendLinkWithThumbnail": "sendMessageWithThumb",
|
|
37
|
+
"messages.sendLinkWithThumbnail": "sendMessageWithThumb",
|
|
38
|
+
"messages.sendWithThumb": "sendMessageWithThumb",
|
|
39
|
+
"messages.forward": "forwardMessages",
|
|
40
|
+
"messages.delete": "deleteMessage",
|
|
41
|
+
"getMessage": "getMessageById",
|
|
42
|
+
"messages.get": "getMessageById",
|
|
43
|
+
"messages.getById": "getMessageById",
|
|
44
|
+
"listMessages": "getAllMessages",
|
|
45
|
+
"messages.getAll": "getAllMessages",
|
|
46
|
+
"messages.all": "getAllMessages",
|
|
47
|
+
"messages.list": "getAllMessages",
|
|
48
|
+
"messages.getMyLast": "getMyLastMessage",
|
|
49
|
+
"messages.getStarred": "getStarredMessages",
|
|
50
|
+
"messages.getUnsent": "getUnsentMessages",
|
|
51
|
+
"messages.getInfo": "getMessageInfo",
|
|
52
|
+
"messages.getVCards": "getVCards",
|
|
53
|
+
"getGptArray": "getMessagesForLLM",
|
|
54
|
+
"messages.getForLLM": "getMessagesForLLM",
|
|
55
|
+
"messages.getGptArray": "getMessagesForLLM",
|
|
56
|
+
"messages.star": "starMessage",
|
|
57
|
+
"messages.unstar": "unstarMessage",
|
|
58
|
+
"messages.react": "react",
|
|
59
|
+
"messages.sendSeen": "sendSeen",
|
|
60
|
+
"loadOlderMessages": "loadEarlierMessages",
|
|
61
|
+
"messages.loadEarlier": "loadEarlierMessages",
|
|
62
|
+
"messages.loadOlder": "loadEarlierMessages",
|
|
63
|
+
"messages.sendFileFromUrl": "sendFileFromUrl",
|
|
64
|
+
"listChats": "getAllChats",
|
|
65
|
+
"chats.getAll": "getAllChats",
|
|
66
|
+
"chats.all": "getAllChats",
|
|
67
|
+
"chats.list": "getAllChats",
|
|
68
|
+
"chats.ids": "getAllChatIds",
|
|
69
|
+
"listChatIds": "getAllChatIds",
|
|
70
|
+
"chatIds.getAll": "getAllChatIds",
|
|
71
|
+
"chatIds.all": "getAllChatIds",
|
|
72
|
+
"chatIds.list": "getAllChatIds",
|
|
73
|
+
"getChatById": "getChat",
|
|
74
|
+
"chats.get": "getChat",
|
|
75
|
+
"chats.getById": "getChat",
|
|
76
|
+
"chats.getWithNonContacts": "getChatWithNonContacts",
|
|
77
|
+
"chats.archive": "archiveChat",
|
|
78
|
+
"chats.unarchive": "unarchiveChat",
|
|
79
|
+
"chats.clear": "clearChat",
|
|
80
|
+
"chats.delete": "deleteChat",
|
|
81
|
+
"chats.pin": "pinChat",
|
|
82
|
+
"chats.unpin": "unpinChat",
|
|
83
|
+
"chats.mute": "muteChat",
|
|
84
|
+
"chats.unmute": "unmuteChat",
|
|
85
|
+
"chats.markAsRead": "markAsRead",
|
|
86
|
+
"chats.markAsUnread": "markAsUnread",
|
|
87
|
+
"chats.setEphemeral": "setChatEphemeral",
|
|
88
|
+
"chats.isOnline": "isChatOnline",
|
|
89
|
+
"listContacts": "getAllContacts",
|
|
90
|
+
"contacts.getAll": "getAllContacts",
|
|
91
|
+
"contacts.all": "getAllContacts",
|
|
92
|
+
"contacts.list": "getAllContacts",
|
|
93
|
+
"contacts.get": "getContact",
|
|
94
|
+
"contacts.getCommonGroups": "getCommonGroups",
|
|
95
|
+
"contacts.getNumberProfile": "getNumberProfile",
|
|
96
|
+
"contacts.getBlockedIds": "getBlockedIds",
|
|
97
|
+
"contactBlock": "blockContact",
|
|
98
|
+
"contacts.block": "blockContact",
|
|
99
|
+
"contacts.contactBlock": "blockContact",
|
|
100
|
+
"contactUnblock": "unblockContact",
|
|
101
|
+
"contacts.unblock": "unblockContact",
|
|
102
|
+
"contacts.contactUnblock": "unblockContact",
|
|
103
|
+
"getReadReceipts": "checkReadReceipts",
|
|
104
|
+
"contacts.checkReadReceipts": "checkReadReceipts",
|
|
105
|
+
"contacts.getReadReceipts": "checkReadReceipts",
|
|
106
|
+
"contacts.checkNumberStatus": "checkNumberStatus",
|
|
107
|
+
"getProfilePicFromServer": "getProfilePicture",
|
|
108
|
+
"contacts.getProfilePicture": "getProfilePicture",
|
|
109
|
+
"contacts.getProfilePicFromServer": "getProfilePicture",
|
|
110
|
+
"groups.getMembers": "getGroupMembers",
|
|
111
|
+
"listGroups": "getAllGroups",
|
|
112
|
+
"groups.getAll": "getAllGroups",
|
|
113
|
+
"groups.all": "getAllGroups",
|
|
114
|
+
"groups.list": "getAllGroups",
|
|
115
|
+
"getGroupMemberIds": "getGroupMembersId",
|
|
116
|
+
"groups.getMemberIds": "getGroupMembersId",
|
|
117
|
+
"groups.getMembersId": "getGroupMembersId",
|
|
118
|
+
"groups.getInfo": "getGroupInfo",
|
|
119
|
+
"groups.getAdmins": "getGroupAdmins",
|
|
120
|
+
"groups.getKicked": "getKickedGroups",
|
|
121
|
+
"groups.getInviteLink": "getGroupInviteLink",
|
|
122
|
+
"groups.create": "createGroup",
|
|
123
|
+
"groups.leave": "leaveGroup",
|
|
124
|
+
"joinGroup": "joinGroupViaLink",
|
|
125
|
+
"groups.join": "joinGroupViaLink",
|
|
126
|
+
"groups.joinViaLink": "joinGroupViaLink",
|
|
127
|
+
"groups.revokeInviteLink": "revokeGroupInviteLink",
|
|
128
|
+
"groups.setTitle": "setGroupTitle",
|
|
129
|
+
"groups.setDescription": "setGroupDescription",
|
|
130
|
+
"groups.setIcon": "setGroupIcon",
|
|
131
|
+
"groups.setAdminsOnly": "setGroupToAdminsOnly",
|
|
132
|
+
"groups.setToAdminsOnly": "setGroupToAdminsOnly",
|
|
133
|
+
"groups.setEditAdminsOnly": "setGroupEditToAdminsOnly",
|
|
134
|
+
"groups.setEditToAdminsOnly": "setGroupEditToAdminsOnly",
|
|
135
|
+
"addGroupParticipant": "addParticipant",
|
|
136
|
+
"groups.addParticipant": "addParticipant",
|
|
137
|
+
"removeGroupParticipant": "removeParticipant",
|
|
138
|
+
"groups.removeParticipant": "removeParticipant",
|
|
139
|
+
"promoteGroupParticipant": "promoteParticipant",
|
|
140
|
+
"groups.promoteParticipant": "promoteParticipant",
|
|
141
|
+
"demoteGroupParticipant": "demoteParticipant",
|
|
142
|
+
"groups.demoteParticipant": "demoteParticipant",
|
|
143
|
+
"groups.approveJoinRequest": "approveGroupJoinRequest",
|
|
144
|
+
"groups.rejectJoinRequest": "rejectGroupJoinRequest",
|
|
145
|
+
"listCommunities": "getAllCommunities",
|
|
146
|
+
"communities.getAll": "getAllCommunities",
|
|
147
|
+
"communities.all": "getAllCommunities",
|
|
148
|
+
"communities.list": "getAllCommunities",
|
|
149
|
+
"communities.getInfo": "getCommunityInfo",
|
|
150
|
+
"communities.getParticipantIds": "getCommunityParticipantIds",
|
|
151
|
+
"communities.getAdminIds": "getCommunityAdminIds",
|
|
152
|
+
"communities.getParticipants": "getCommunityParticipants",
|
|
153
|
+
"communities.getAdmins": "getCommunityAdmins",
|
|
154
|
+
"status.postText": "postTextStatus",
|
|
155
|
+
"status.postImage": "postImageStatus",
|
|
156
|
+
"status.postVideo": "postVideoStatus",
|
|
157
|
+
"getStatuses": "getStories",
|
|
158
|
+
"status.getAll": "getStories",
|
|
159
|
+
"status.getStories": "getStories",
|
|
160
|
+
"status.get": "getStories",
|
|
161
|
+
"mystatus.getStatus": "getStatus",
|
|
162
|
+
"status.delete": "deleteStatus",
|
|
163
|
+
"deleteAllStatuses": "deleteAllStatus",
|
|
164
|
+
"status.deleteAll": "deleteAllStatus",
|
|
165
|
+
"listLabels": "getAllLabels",
|
|
166
|
+
"labels.getAll": "getAllLabels",
|
|
167
|
+
"labels.all": "getAllLabels",
|
|
168
|
+
"labels.list": "getAllLabels",
|
|
169
|
+
"labels.getChats": "getChatsByLabel",
|
|
170
|
+
"labels.getChatsBy": "getChatsByLabel",
|
|
171
|
+
"labels.add": "addLabel",
|
|
172
|
+
"labels.remove": "removeLabel",
|
|
173
|
+
"business.getProfile": "getBusinessProfile",
|
|
174
|
+
"getBusinessProfilesProducts": "getBusinessProducts",
|
|
175
|
+
"business.getProducts": "getBusinessProducts",
|
|
176
|
+
"business.getProfilesProducts": "getBusinessProducts",
|
|
177
|
+
"business.getOrder": "getOrder",
|
|
178
|
+
"session.getMe": "getMe",
|
|
179
|
+
"session.getHostNumber": "getHostNumber",
|
|
180
|
+
"session.getConnectionState": "getConnectionState",
|
|
181
|
+
"getWhatsAppVersion": "getWAVersion",
|
|
182
|
+
"session.getWAVersion": "getWAVersion",
|
|
183
|
+
"session.getWhatsAppVersion": "getWAVersion",
|
|
184
|
+
"session.getBatteryLevel": "getBatteryLevel",
|
|
185
|
+
"getIsPlugged": "isPlugged",
|
|
186
|
+
"session.isPlugged": "isPlugged",
|
|
187
|
+
"session.getIsPlugged": "isPlugged",
|
|
188
|
+
"session.getFeatures": "getFeatures",
|
|
189
|
+
"session.getLicenseType": "getLicenseType",
|
|
190
|
+
"getGeneratedUserAgent": "getUserAgent",
|
|
191
|
+
"session.getUserAgent": "getUserAgent",
|
|
192
|
+
"session.getGeneratedUserAgent": "getUserAgent",
|
|
193
|
+
"session.getProcessStats": "getProcessStats",
|
|
194
|
+
"getAmountOfLoadedMessages": "getLoadedMessageCount",
|
|
195
|
+
"session.getLoadedMessageCount": "getLoadedMessageCount",
|
|
196
|
+
"session.getAmountOfLoadedMessages": "getLoadedMessageCount",
|
|
197
|
+
"takeScreenshot": "getSnapshot",
|
|
198
|
+
"session.getSnapshot": "getSnapshot",
|
|
199
|
+
"session.takeScreenshot": "getSnapshot",
|
|
200
|
+
"session.healthCheck": "healthCheck",
|
|
201
|
+
"setDisplayName": "setMyName",
|
|
202
|
+
"session.setName": "setMyName",
|
|
203
|
+
"session.setMyName": "setMyName",
|
|
204
|
+
"session.setDisplayName": "setMyName",
|
|
205
|
+
"setStatusText": "setMyStatus",
|
|
206
|
+
"session.setStatus": "setMyStatus",
|
|
207
|
+
"session.setMyStatus": "setMyStatus",
|
|
208
|
+
"session.setStatusText": "setMyStatus",
|
|
209
|
+
"setProfilePic": "setProfilePicture",
|
|
210
|
+
"session.setProfilePicture": "setProfilePicture",
|
|
211
|
+
"session.setProfilePic": "setProfilePicture",
|
|
212
|
+
"media.decrypt": "decryptMedia",
|
|
213
|
+
"media.download": "downloadMedia",
|
|
214
|
+
"messages.sendInteractive": "sendInteractive",
|
|
215
|
+
"messages.sendRaw": "sendRawMessage"
|
|
216
|
+
} as const;
|