Skip to content

Commit 27ef2cc

Browse files
committed
📝 documentation improvements
1 parent c5c4e0d commit 27ef2cc

File tree

5 files changed

+162
-43
lines changed

5 files changed

+162
-43
lines changed

docs-v3/docs/api/classes/api_Client.Client.md

Lines changed: 129 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,78 @@ custom_edit_url: null
77

88
[api/Client](/api/modules/api_Client.md).Client
99

10+
## Properties
11+
12+
### deleteAllStatus
13+
14+
**deleteAllStatus**: () => `Promise`<`boolean`\>
15+
16+
#### Type declaration <div class="label license restricted">restricted</div>
17+
18+
▸ (): `Promise`<`boolean`\>
19+
20+
:::license May require restricted license
21+
Use this link to get the [correct license](https://gum.co/open-wa?wanted=true&tier=1%20Restricted%20License).
22+
:::
23+
24+
Deletes all your existing stories.
25+
26+
##### Returns
27+
28+
`Promise`<`boolean`\>
29+
30+
boolean. True if it worked.
31+
32+
___
33+
34+
### deleteStatus
35+
36+
**deleteStatus**: (`statusesToDelete`: `string` \| `string`[]) => `Promise`<`boolean`\>
37+
38+
#### Type declaration <div class="label license restricted">restricted</div>
39+
40+
▸ (`statusesToDelete`): `Promise`<`boolean`\>
41+
42+
:::license May require restricted license
43+
Use this link to get the [correct license](https://gum.co/open-wa?wanted=true&tier=1%20Restricted%20License).
44+
:::
45+
46+
Consumes a list of id strings of stories to delete.
47+
48+
##### Parameters
49+
50+
| Name | Type | Description |
51+
| :------ | :------ | :------ |
52+
| `statusesToDelete` | `string` \| `string`[] | string [] \| string an array of ids of stories to delete. |
53+
54+
##### Returns
55+
56+
`Promise`<`boolean`\>
57+
58+
boolean. True if it worked.
59+
60+
___
61+
62+
### getMyStatusArray
63+
64+
**getMyStatusArray**: () => `Promise`<[`Message`](/api/interfaces/api_model_message.Message.md)[]\>
65+
66+
#### Type declaration <div class="label license restricted">restricted</div>
67+
68+
▸ (): `Promise`<[`Message`](/api/interfaces/api_model_message.Message.md)[]\>
69+
70+
:::license May require restricted license
71+
Use this link to get the [correct license](https://gum.co/open-wa?wanted=true&tier=1%20Restricted%20License).
72+
:::
73+
74+
Retrieves all existing stories.
75+
76+
Only works with a Story License Key
77+
78+
##### Returns
79+
80+
`Promise`<[`Message`](/api/interfaces/api_model_message.Message.md)[]\>
81+
1082
## Methods
1183

1284
### B <div class="label license insiders">insiders</div>
@@ -428,11 +500,15 @@ Decrypts a media message.
428500

429501
___
430502

431-
### deleteAllStatus
503+
### deleteAllStories <div class="label license restricted">restricted</div>
504+
505+
**deleteAllStories**(): `Promise`<`boolean`\>
432506

433-
**deleteAllStatus**(): `Promise`<`boolean`\>
507+
:::license May require restricted license
508+
Use this link to get the [correct license](https://gum.co/open-wa?wanted=true&tier=1%20Restricted%20License).
509+
:::
434510

435-
Deletes all your existing statuses.
511+
Deletes all your existing stories.
436512

437513
#### Returns
438514

@@ -502,17 +578,21 @@ Deletes chats from a certain index (default 1000). E.g if this startingFrom para
502578

503579
___
504580

505-
### deleteStatus
581+
### deleteStory <div class="label license restricted">restricted</div>
582+
583+
**deleteStory**(`statusesToDelete`): `Promise`<`boolean`\>
506584

507-
**deleteStatus**(`statusesToDelete`): `Promise`<`boolean`\>
585+
:::license May require restricted license
586+
Use this link to get the [correct license](https://gum.co/open-wa?wanted=true&tier=1%20Restricted%20License).
587+
:::
508588

509-
Consumes a list of id strings of statuses to delete.
589+
Consumes a list of id strings of stories to delete.
510590

511591
#### Parameters
512592

513593
| Name | Type | Description |
514594
| :------ | :------ | :------ |
515-
| `statusesToDelete` | `string` \| `string`[] | string [] \| stringan array of ids of statuses to delete. |
595+
| `statusesToDelete` | `string` \| `string`[] | string [] \| string an array of ids of stories to delete. |
516596

517597
#### Returns
518598

@@ -1566,11 +1646,15 @@ message object or `undefined` if the host account's last message could not be fo
15661646

15671647
___
15681648

1569-
### getMyStatusArray
1649+
### getMyStoryArray <div class="label license restricted">restricted</div>
15701650

1571-
**getMyStatusArray**(): `Promise`<[`Message`](/api/interfaces/api_model_message.Message.md)[]\>
1651+
**getMyStoryArray**(): `Promise`<[`Message`](/api/interfaces/api_model_message.Message.md)[]\>
1652+
1653+
:::license May require restricted license
1654+
Use this link to get the [correct license](https://gum.co/open-wa?wanted=true&tier=1%20Restricted%20License).
1655+
:::
15721656

1573-
retrieves all existing statuses.
1657+
Retrieves all existing stories.
15741658

15751659
Only works with a Story License Key
15761660

@@ -1780,21 +1864,25 @@ message object OR `false`
17801864

17811865
___
17821866

1783-
### getStoryViewers
1867+
### getStoryViewers <div class="label license restricted">restricted</div>
1868+
1869+
**getStoryViewers**(`id?`): `Promise`<[`ContactId`](/api/types/api_model_aliases.ContactId.md)[] \| { `[k: MessageId]`: [`ContactId`](/api/types/api_model_aliases.ContactId.md)[]; }\>
17841870

1785-
**getStoryViewers**(`id`): `Promise`<[`ContactId`](/api/types/api_model_aliases.ContactId.md)[]\>
1871+
:::license May require restricted license
1872+
Use this link to get the [correct license](https://gum.co/open-wa?wanted=true&tier=1%20Restricted%20License).
1873+
:::
17861874

17871875
Retrieves an array of user ids that have 'read' your story.
17881876

17891877
#### Parameters
17901878

17911879
| Name | Type | Description |
17921880
| :------ | :------ | :------ |
1793-
| `id` | `string` | string The id of the story Only works with a Story License Key |
1881+
| `id?` | `string` | string The id of the story |
17941882

17951883
#### Returns
17961884

1797-
`Promise`<[`ContactId`](/api/types/api_model_aliases.ContactId.md)[]\>
1885+
`Promise`<[`ContactId`](/api/types/api_model_aliases.ContactId.md)[] \| { `[k: MessageId]`: [`ContactId`](/api/types/api_model_aliases.ContactId.md)[]; }\>
17981886

17991887
___
18001888

@@ -3091,7 +3179,7 @@ ___
30913179

30923180
### sendImage
30933181

3094-
**sendImage**(`to`, `file`, `filename`, `caption`, `quotedMsgId?`, `waitForId?`, `ptt?`, `withoutPreview?`, `hideTags?`, `viewOnce?`): `Promise`<`boolean` \| [`MessageId`](/api/types/api_model_aliases.MessageId.md)\>
3182+
**sendImage**(`to`, `file`, `filename`, `caption`, `quotedMsgId?`, `waitForId?`, `ptt?`, `withoutPreview?`, `hideTags?`, `viewOnce?`, `requestConfig?`): `Promise`<`boolean` \| [`MessageId`](/api/types/api_model_aliases.MessageId.md)\>
30953183

30963184
Sends a image to given chat, with caption or not, using base64
30973185

@@ -3109,6 +3197,7 @@ Sends a image to given chat, with caption or not, using base64
31093197
| `withoutPreview?` | `boolean` | - |
31103198
| `hideTags?` | `boolean` | boolean default: false [INSIDERS] set this to try silent tag someone in the caption |
31113199
| `viewOnce?` | `boolean` | - |
3200+
| `requestConfig?` | `any` | - |
31123201

31133202
#### Returns
31143203

@@ -3348,6 +3437,26 @@ Sends a payment request message to given chat
33483437

33493438
___
33503439

3440+
### sendPoll
3441+
3442+
**sendPoll**(`to`, `name`, `options`): `Promise`<[`MessageId`](/api/types/api_model_aliases.MessageId.md)\>
3443+
3444+
Send a poll to a group chat
3445+
3446+
#### Parameters
3447+
3448+
| Name | Type | Description |
3449+
| :------ | :------ | :------ |
3450+
| `to` | [`GroupChatId`](/api/types/api_model_aliases.GroupChatId.md) | chat id - a group chat is required |
3451+
| `name` | `string` | the name of the poll |
3452+
| `options` | `string`[] | an array of poll options |
3453+
3454+
#### Returns
3455+
3456+
`Promise`<[`MessageId`](/api/types/api_model_aliases.MessageId.md)\>
3457+
3458+
___
3459+
33513460
### sendProduct <div class="label license insiders">insiders</div>
33523461

33533462
**sendProduct**(`chatId`, `productId`): `Promise`<[`MessageId`](/api/types/api_model_aliases.MessageId.md)\>
@@ -4681,11 +4790,14 @@ STATE observable sream of states
46814790
46824791
___
46834792
4684-
### onStory
4793+
### onStory <div class="label license restricted">restricted</div>
46854794
46864795
▸ **onStory**(`fn`): `Promise`<`boolean` \| `Listener`\>
46874796
4688-
Requires a Story License Key
4797+
:::license May require restricted license
4798+
Use this link to get the [correct license](https://gum.co/open-wa?wanted=true&tier=1%20Restricted%20License).
4799+
:::
4800+
46894801
Listens to when a contact posts a new story.
46904802
46914803
**`Fires`**

docs-v3/docs/api/classes/structures_Collector.Collection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ ___
100100

101101
#### Inherited from
102102

103-
BaseCollection.\_\_@species@1841
103+
BaseCollection.\_\_@species@1855
104104

105105
___
106106

docs-v3/docs/api/interfaces/api_model_message.Message.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,8 @@ ___
377377

378378
**self**: ``"in"`` \| ``"out"``
379379

380-
Indicates whether the message was sent by the host account
380+
Indicates whether the message is coming into the session or going out of the session. You can have a message sent by the host account show as `in` when the message was sent from another
381+
session or from the host account device itself.
381382

382383
___
383384

docs-v3/docs/api/reference

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: "reference"
3-
title: "@open-wa/wa-automate - v4.47.6"
3+
title: "@open-wa/wa-automate - v4.49.2"
44
sidebar_label: "Readme"
55
sidebar_position: 0
66
custom_edit_url: null
Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,31 @@
1-
document.addEventListener("DOMContentLoaded", function(event) {
2-
if(!window.grObserver) {
3-
window.grObserver = new MutationObserver((mutationList, observer) => {
4-
for (const mutation of mutationList) {
5-
if(mutation.type === "childList" && mutation.addedNodes && [...mutation.addedNodes].find(node=>node.className==="gumroad")) {
6-
window.grObserver.disconnect();
7-
const grNode = [...mutation.addedNodes].find(node=>node.className==="gumroad")
8-
const cartbtn = grNode.getElementsByClassName('cart-button')[0]
9-
grNode.style.position = cartbtn.style.position = 'unset'
10-
const isMobile = !!document.getElementsByClassName('menu__list').length
11-
const addTo = document.getElementsByClassName('menu__list')[0] || document.getElementsByClassName("navbar__items navbar__items--right")[0]
12-
if(isMobile) {
13-
addTo.appendChild(grNode);
14-
grNode.style.padding = '16px'
15-
grNode.style.width = cartbtn.style.width = '-webkit-fill-available'
16-
}
17-
else addTo.insertBefore(grNode,document.getElementsByClassName('DocSearch DocSearch-Button')[0].parentElement)
18-
}
19-
}
20-
})
21-
window.grObserver.observe(document.body, {childList: true });
22-
}
23-
});
1+
/**
2+
* Breaks license popup code in desktop client docs page
3+
*/
4+
5+
//TODO: only run this code on mobile
6+
7+
// document.addEventListener("DOMContentLoaded", function(event) {
8+
// if(!window.grObserver) {
9+
// window.grObserver = new MutationObserver((mutationList, observer) => {
10+
// for (const mutation of mutationList) {
11+
// if(mutation.type === "childList" && mutation.addedNodes && [...mutation.addedNodes].find(node=>node.className==="gumroad")) {
12+
// window.grObserver.disconnect();
13+
// const grNode = [...mutation.addedNodes].find(node=>node.className==="gumroad")
14+
// const cartbtn = grNode.getElementsByClassName('cart-button')[0]
15+
// grNode.style.position = cartbtn.style.position = 'unset'
16+
// const isMobile = !!document.getElementsByClassName('menu__list').length
17+
// const addTo = document.getElementsByClassName('menu__list')[0] || document.getElementsByClassName("navbar__items navbar__items--right")[0]
18+
// if(isMobile) {
19+
// addTo.appendChild(grNode);
20+
// grNode.style.padding = '16px'
21+
// grNode.style.width = cartbtn.style.width = '-webkit-fill-available'
22+
// }
23+
// else addTo.insertBefore(grNode,document.getElementsByClassName('DocSearch DocSearch-Button')[0].parentElement)
24+
// }
25+
// }
26+
// })
27+
// window.grObserver.observe(document.body, {childList: true });
28+
// }
29+
// });
2430

2531

0 commit comments

Comments
 (0)