talkyzap-wapp-api 1.0.6 → 1.0.7

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 (41) hide show
  1. package/CHANGELOG.md +1 -6
  2. package/README.md +4 -4
  3. package/dist/assert/assertColor.d.ts +4 -4
  4. package/dist/chat/functions/buttonsParser.d.ts +24 -0
  5. package/dist/chat/functions/getNotes.d.ts +26 -0
  6. package/dist/chat/functions/index.d.ts +3 -0
  7. package/dist/chat/functions/sendEventMessage.d.ts +64 -0
  8. package/dist/chat/functions/sendFileMessage.d.ts +2 -1
  9. package/dist/chat/functions/sendScheduledCallMessage.d.ts +5 -8
  10. package/dist/chat/functions/setNotes.d.ts +26 -0
  11. package/dist/community/functions/getAnnouncementGroup.d.ts +28 -0
  12. package/dist/community/functions/getSubgroups.d.ts +28 -0
  13. package/dist/community/functions/index.d.ts +2 -0
  14. package/dist/contact/functions/getProfilePictureUrl.d.ts +1 -1
  15. package/dist/contact/functions/getStatus.d.ts +1 -1
  16. package/dist/contact/functions/index.d.ts +2 -0
  17. package/dist/contact/functions/queryExists.d.ts +1 -1
  18. package/dist/contact/functions/subscribePresence.d.ts +27 -0
  19. package/dist/contact/functions/unsubscribePresence.d.ts +27 -0
  20. package/dist/eventEmitter/index.d.ts +22 -22
  21. package/dist/group/functions/getGroupInfoFromInviteCode.d.ts +1 -1
  22. package/dist/profile/functions/getMyProfilePicture.d.ts +27 -0
  23. package/dist/profile/functions/index.d.ts +1 -0
  24. package/dist/whatsapp/collections/BotProfileCollection.d.ts +26 -0
  25. package/dist/whatsapp/collections/NoteCollection.d.ts +26 -0
  26. package/dist/whatsapp/collections/index.d.ts +2 -0
  27. package/dist/whatsapp/functions/addOrEditNoteAction.d.ts +27 -0
  28. package/dist/whatsapp/functions/createEventCallLink.d.ts +18 -0
  29. package/dist/whatsapp/functions/genBotMsgSecretFromMsgSecret.d.ts +19 -0
  30. package/dist/whatsapp/functions/index.d.ts +4 -0
  31. package/dist/whatsapp/functions/removeStatusMessage.d.ts +19 -0
  32. package/dist/whatsapp/functions/subscribePresence.d.ts +20 -0
  33. package/dist/whatsapp/misc/Wid.d.ts +1 -0
  34. package/dist/whatsapp/models/BotProfileModel.d.ts +51 -0
  35. package/dist/whatsapp/models/ChatModel.d.ts +1 -0
  36. package/dist/whatsapp/models/NoteModel.d.ts +40 -0
  37. package/dist/whatsapp/models/index.d.ts +2 -0
  38. package/dist/whatsapp/stores.d.ts +4 -0
  39. package/dist/wppconnect-wa.js +1 -1
  40. package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
  41. package/package.json +10 -10
@@ -0,0 +1,27 @@
1
+ /*!
2
+ * Copyright 2024 WPPConnect Team
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { ProfilePicThumbModel } from '../../whatsapp';
17
+ /**
18
+ * Get your current profile picture
19
+ *
20
+ * @example
21
+ * ```javascript
22
+ * await WPP.profile.getMyProfilePicture();
23
+ * ```
24
+ *
25
+ * @category Profile
26
+ */
27
+ export declare function getMyProfilePicture(): Promise<ProfilePicThumbModel>;
@@ -15,6 +15,7 @@
15
15
  */
16
16
  export { editBusinessProfile } from './editBusinessProfile';
17
17
  export { getMyProfileName } from './getMyProfileName';
18
+ export { getMyProfilePicture } from './getMyProfilePicture';
18
19
  export { getMyStatus } from './getMyStatus';
19
20
  export { isBusiness } from './isBusiness';
20
21
  export { removeMyProfilePicture } from './removeMyProfilePicture';
@@ -0,0 +1,26 @@
1
+ /*!
2
+ * Copyright 2021 WPPConnect Team
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { BotProfileModel } from '../models/BotProfileModel';
17
+ import { Collection } from './Collection';
18
+ /** @whatsapp WAWebBotProfileCollection
19
+ */
20
+ export declare class BotProfileCollection extends Collection<BotProfileModel> {
21
+ static model: BotProfileModel;
22
+ static staleCollection?: any;
23
+ getDefaultBot(): any;
24
+ findImpl(a?: any): any;
25
+ update(): any;
26
+ }
@@ -0,0 +1,26 @@
1
+ /*!
2
+ * Copyright 2024 WPPConnect Team
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { NoteModel } from '../models';
17
+ import { Collection } from './Collection';
18
+ /** @whatsapp WAWebNoteCollection
19
+ */
20
+ export declare class NoteCollection extends Collection<NoteModel> {
21
+ static model: NoteModel;
22
+ maybeGetNoteByChatJid(a?: any): any;
23
+ hasCachedQueryForChatJid(e?: any): any;
24
+ updateCollectionFromDB(a?: any, b?: any): any;
25
+ purgeNotesByChatJid(a?: any): any;
26
+ }
@@ -16,6 +16,7 @@
16
16
  export * from './AggReactionsCollection';
17
17
  export * from './BaseCollection';
18
18
  export * from './BlocklistCollection';
19
+ export * from './BotProfileCollection';
19
20
  export * from './BusinessCategoriesResultCollection';
20
21
  export * from './BusinessProfileCollection';
21
22
  export * from './ButtonCollection';
@@ -37,6 +38,7 @@ export * from './MsgCollection';
37
38
  export * from './MsgInfoCollection';
38
39
  export * from './MsgInfoParticipantCollection';
39
40
  export * from './MuteCollection';
41
+ export * from './NoteCollection';
40
42
  export * from './OrderCollection';
41
43
  export * from './OrderItemCollection';
42
44
  export * from './ParticipantCollection';
@@ -0,0 +1,27 @@
1
+ /*!
2
+ * Copyright 2024 WPPConnect Team
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { NoteModel } from '../models';
17
+ /** @whatsapp WAWebNoteAction
18
+ */
19
+ export declare function addOrEditNoteAction(attrs: {
20
+ actionType: 'edit' | 'add';
21
+ chatJid: string;
22
+ content: string;
23
+ createdAt: number;
24
+ id: string;
25
+ noteType: 'unstructured';
26
+ }, b: boolean): Promise<any>;
27
+ export declare function retrieveOnlyNoteForChatJid(jid: string): Promise<null | NoteModel>;
@@ -0,0 +1,18 @@
1
+ /*!
2
+ * Copyright 2024 WPPConnect Team
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /** @whatsapp 75887
17
+ */
18
+ export declare function createEventCallLink(eventStartTime: number, type: 'voice' | 'video'): Promise<string>;
@@ -0,0 +1,19 @@
1
+ /*!
2
+ * Copyright 2024 WPPConnect Team
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /**
17
+ * @whatsapp WAWebBotMessageSecret
18
+ */
19
+ export declare function genBotMsgSecretFromMsgSecret(a: any): Promise<any>;
@@ -26,6 +26,7 @@ export * from './changeOptInStatusForExternalWebBeta';
26
26
  export * from './collections';
27
27
  export * from './colorIndexToHex';
28
28
  export * from './contactFunctions';
29
+ export * from './createEventCallLink';
29
30
  export * from './createFanoutMsgStanza';
30
31
  export * from './createGroup';
31
32
  export * from './createMsgProtobuf';
@@ -48,6 +49,7 @@ export * from './findCommonGroups';
48
49
  export * from './findFirstWebLink';
49
50
  export * from './forwardMessagesToChats';
50
51
  export * from './frontendFireAndForget';
52
+ export * from './genBotMsgSecretFromMsgSecret';
51
53
  export * from './generateVideoThumbsAndDuration';
52
54
  export * from './genLinkDeviceCodeForPhoneNumber';
53
55
  export * from './genMinimalLinkPreview';
@@ -109,6 +111,7 @@ export * from './queryNewsletterMetadataByJid';
109
111
  export * from './queryOrder';
110
112
  export * from './randomHex';
111
113
  export * from './randomId';
114
+ export * from './removeStatusMessage';
112
115
  export * from './resetGroupInviteCode';
113
116
  export * from './revokeStatus';
114
117
  export * from './sendClear';
@@ -134,6 +137,7 @@ export * from './setPushname';
134
137
  export * from './status';
135
138
  export * from './STATUS_JID';
136
139
  export * from './statusEnable';
140
+ export * from './subscribePresence';
137
141
  export * from './syncABPropsTask';
138
142
  export * from './typeAttributeFromProtobuf';
139
143
  export * from './unixTime';
@@ -0,0 +1,19 @@
1
+ /*!
2
+ * Copyright 2024 WPPConnect Team
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /**
17
+ * @whatsapp WAWebDBMessageDelete
18
+ */
19
+ export declare function removeStatusMessage(id: string[]): Promise<any>;
@@ -0,0 +1,20 @@
1
+ /*!
2
+ * Copyright 2024 WPPConnect Team
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Wid } from '..';
17
+ /**
18
+ * @whatsapp WAWebContactPresenceBridge
19
+ */
20
+ export declare function subscribePresence(id: Wid, tcToken?: any): Promise<any>;
@@ -27,6 +27,7 @@ export declare class Wid {
27
27
  equals(wid: unknown): boolean;
28
28
  getDeviceId(): number;
29
29
  getSignalAddress(): string;
30
+ isBot(): boolean;
30
31
  isBroadcast(): boolean;
31
32
  isCompanion(): boolean;
32
33
  isSameAccount(wid: Wid): boolean;
@@ -0,0 +1,51 @@
1
+ /*!
2
+ * Copyright 2024 WPPConnect Team
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { BotProfileCollection } from '../collections';
17
+ import { Wid } from '../misc';
18
+ import { ContactModel } from './ContactModel';
19
+ import { Model, ModelOptions, ModelPropertiesContructor, ModelProxy } from './Model';
20
+ interface Props {
21
+ id: Wid;
22
+ name: string;
23
+ attrs?: any;
24
+ description?: any;
25
+ category?: any;
26
+ isDefault: boolean;
27
+ prompts?: any[];
28
+ personaId: string;
29
+ commands: any[];
30
+ commandsDescription: any;
31
+ isMetaCreated: boolean;
32
+ creatorName?: string;
33
+ creatorProfileUrl?: string;
34
+ lastUpdateTs: number;
35
+ }
36
+ interface Session {
37
+ contact: ContactModel;
38
+ }
39
+ interface Derived {
40
+ }
41
+ /** @whatsapp WAWebBotProfileModel
42
+ */
43
+ export declare interface BotProfileModel extends ModelProxy<Props, Session, Derived> {
44
+ }
45
+ /** @whatsapp WAWebBotProfileModel
46
+ */
47
+ export declare class BotProfileModel extends Model<BotProfileCollection> {
48
+ idClass: typeof Wid;
49
+ constructor(proterties?: ModelPropertiesContructor<BotProfileModel>, options?: ModelOptions);
50
+ }
51
+ export {};
@@ -86,6 +86,7 @@ interface Derived {
86
86
  isUser: boolean;
87
87
  isPSA: boolean;
88
88
  isGroup: boolean;
89
+ isParentGroup: boolean;
89
90
  isBroadcast: boolean;
90
91
  isNewsletter: boolean;
91
92
  canUnread: boolean;
@@ -0,0 +1,40 @@
1
+ /*!
2
+ * Copyright 2024 WPPConnect Team
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { NoteCollection } from '../collections';
17
+ import { Model, ModelOptions, ModelPropertiesContructor, ModelProxy } from './Model';
18
+ interface Props {
19
+ id?: any;
20
+ type?: string;
21
+ chatJid: string;
22
+ content: string;
23
+ createdAt?: number;
24
+ modifiedAt?: number;
25
+ }
26
+ interface Session {
27
+ stale?: any;
28
+ }
29
+ interface Derived {
30
+ }
31
+ export declare interface NoteModel extends ModelProxy<Props, Session, Derived> {
32
+ }
33
+ /** @whatsapp 86761
34
+ */
35
+ export declare class NoteModel extends Model<NoteCollection> {
36
+ constructor(proterties?: ModelPropertiesContructor<NoteModel>, options?: ModelOptions);
37
+ triggerItemCollectionUpdate(): any;
38
+ getCollection(): NoteCollection;
39
+ }
40
+ export {};
@@ -16,6 +16,7 @@
16
16
  export * from './AggReactionsModel';
17
17
  export * from './AttachMediaModel';
18
18
  export * from './BlocklistModel';
19
+ export * from './BotProfileModel';
19
20
  export * from './BusinessCategoriesResultModel';
20
21
  export * from './BusinessProfileModel';
21
22
  export * from './CallModel';
@@ -42,6 +43,7 @@ export * from './MsgInfoParticipantModel';
42
43
  export * from './MsgModel';
43
44
  export * from './MuteModel';
44
45
  export * from './NetworkStatusModel';
46
+ export * from './NoteModel';
45
47
  export * from './OrderItemModel';
46
48
  export * from './OrderModel';
47
49
  export * from './ParticipantModel';
@@ -26,6 +26,9 @@ export declare const BusinessCategoriesResultStore: collections.BusinessCategori
26
26
  * @whatsapp 493581 >= 2.2222.8
27
27
  */
28
28
  export declare const BusinessProfileStore: collections.BusinessProfileCollection;
29
+ /** @whatsapp WAWebBotProfileCollection
30
+ */
31
+ export declare const BotProfileStore: collections.BotProfileCollection;
29
32
  /** @whatsapp 60868
30
33
  * @whatsapp 31218 >= 2.2204.13
31
34
  * @whatsapp 160868 >= 2.2222.8
@@ -126,3 +129,4 @@ export declare const StickerPackStore: collections.StickerPackCollection;
126
129
  */
127
130
  export declare const StickerSearchStore: collections.StickerSearchCollection;
128
131
  export declare const PinInChatStore: collections.PinInChatCollection;
132
+ export declare const NoteStore: collections.NoteCollection;