@open-wa/wa-automate 4.42.1 → 4.42.2
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/cli/collections.js +134 -1
- package/dist/connect/socket.d.ts +1 -1
- package/dist/connect/socket.js +1 -1
- package/package.json +1 -1
package/dist/cli/collections.js
CHANGED
@@ -46,6 +46,24 @@ const generateCollections = (config, spinner) => __awaiter(void 0, void 0, void
|
|
46
46
|
pmCol = yield (0, __1.generatePostmanJson)(config);
|
47
47
|
spinner.succeed(`Postman collection generated: open-wa-${config.sessionId}.postman_collection.json`);
|
48
48
|
swCol = (0, postman_2_swagger_1.default)(pmCol);
|
49
|
+
swCol.tags = [
|
50
|
+
{
|
51
|
+
"name": "default",
|
52
|
+
"description": "All methods from the Client",
|
53
|
+
"externalDocs": {
|
54
|
+
"description": "Find out more",
|
55
|
+
"url": "https://docs.openwa.dev/classes/api_Client.Client.html"
|
56
|
+
}
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"name": "meta",
|
60
|
+
"description": "Operations related to generating SDKs for this specific API"
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"name": "media",
|
64
|
+
"description": "Access files in the /media folder when messagePreProcessor is set to AUTO_DECRYPT_SAVE"
|
65
|
+
}
|
66
|
+
];
|
49
67
|
/**
|
50
68
|
* Fix swagger docs by removing the content type as a required paramater
|
51
69
|
*/
|
@@ -57,7 +75,7 @@ const generateCollections = (config, spinner) => __awaiter(void 0, void 0, void
|
|
57
75
|
"api_key": []
|
58
76
|
}
|
59
77
|
];
|
60
|
-
swCol.paths[p].nickname = p.replace("/", "");
|
78
|
+
swCol.paths[p].operationId = swCol.paths[p].nickname = p.replace("/", "");
|
61
79
|
swCol.paths[p].post.externalDocs = {
|
62
80
|
"description": "Documentation",
|
63
81
|
"url": swCol.paths[p].post.documentationUrl
|
@@ -78,6 +96,121 @@ const generateCollections = (config, spinner) => __awaiter(void 0, void 0, void
|
|
78
96
|
};
|
79
97
|
delete path.parameters;
|
80
98
|
});
|
99
|
+
const metaPaths = {
|
100
|
+
"/media/{fileName}": {
|
101
|
+
"get": {
|
102
|
+
"summary": "Get a file from the /media folder",
|
103
|
+
"description": "Make sure to set messagePreProcessor to AUTO_DECRYPT_SAVE in order to decrypt and save media within the /media folder",
|
104
|
+
tags: ["media"],
|
105
|
+
"produces": [
|
106
|
+
"application/pdf",
|
107
|
+
"image/jpeg",
|
108
|
+
"image/jpg",
|
109
|
+
"image/png",
|
110
|
+
"image/webp",
|
111
|
+
"audio/mpeg",
|
112
|
+
"audio/ogg",
|
113
|
+
"audio/vorbis",
|
114
|
+
"video/mp4",
|
115
|
+
],
|
116
|
+
"parameters": [
|
117
|
+
{
|
118
|
+
"name": "fileName",
|
119
|
+
"in": "path",
|
120
|
+
"description": "The filename, e.g: 2B8A12C1DAF21D8CA34105560D5B1864.jpeg",
|
121
|
+
"required": true,
|
122
|
+
"type": "string",
|
123
|
+
}
|
124
|
+
],
|
125
|
+
"responses": {
|
126
|
+
"200": {
|
127
|
+
"description": "Downloaded file"
|
128
|
+
},
|
129
|
+
"404": {
|
130
|
+
"description": "File not found"
|
131
|
+
},
|
132
|
+
}
|
133
|
+
}
|
134
|
+
},
|
135
|
+
"/meta/swagger.json": {
|
136
|
+
"get": {
|
137
|
+
"description": "Get a swagger/OAS collection json",
|
138
|
+
tags: ["meta"],
|
139
|
+
"produces": [
|
140
|
+
"application/json",
|
141
|
+
],
|
142
|
+
"responses": {
|
143
|
+
"200": {
|
144
|
+
"description": "successful request"
|
145
|
+
},
|
146
|
+
}
|
147
|
+
}
|
148
|
+
},
|
149
|
+
"/meta/postman.json": {
|
150
|
+
"get": {
|
151
|
+
"description": "Get a postman collection json",
|
152
|
+
tags: ["meta"],
|
153
|
+
"produces": [
|
154
|
+
"application/json",
|
155
|
+
],
|
156
|
+
"responses": {
|
157
|
+
"200": {
|
158
|
+
"description": "successful request"
|
159
|
+
},
|
160
|
+
}
|
161
|
+
}
|
162
|
+
},
|
163
|
+
"/meta/basic/commands": {
|
164
|
+
get: {
|
165
|
+
"description": "Get a list of possible client methods/commands",
|
166
|
+
tags: ["meta"],
|
167
|
+
"produces": [
|
168
|
+
"application/json",
|
169
|
+
],
|
170
|
+
"responses": {
|
171
|
+
"200": {
|
172
|
+
"description": "successful request"
|
173
|
+
},
|
174
|
+
}
|
175
|
+
}
|
176
|
+
},
|
177
|
+
"/meta/basic/listeners": {
|
178
|
+
get: {
|
179
|
+
"description": "Get a list of possible listeners",
|
180
|
+
tags: ["meta"],
|
181
|
+
"produces": [
|
182
|
+
"application/json",
|
183
|
+
],
|
184
|
+
"responses": {
|
185
|
+
"200": {
|
186
|
+
"description": "successful request"
|
187
|
+
},
|
188
|
+
}
|
189
|
+
}
|
190
|
+
},
|
191
|
+
"/meta/codegen/{language}": {
|
192
|
+
post: {
|
193
|
+
"summary": "Generate SDK",
|
194
|
+
"description": "Generate a SDK for this specific API - see https://codegen.openwa.dev/api/gen/clients for list of possible languages",
|
195
|
+
tags: ["meta"],
|
196
|
+
"parameters": [
|
197
|
+
{
|
198
|
+
"name": "language",
|
199
|
+
"in": "path",
|
200
|
+
"description": "The language to generate the SDK for. ",
|
201
|
+
"required": true,
|
202
|
+
"type": "string",
|
203
|
+
}
|
204
|
+
],
|
205
|
+
"responses": {
|
206
|
+
"200": {
|
207
|
+
"description": "successful request"
|
208
|
+
},
|
209
|
+
}
|
210
|
+
}
|
211
|
+
}
|
212
|
+
};
|
213
|
+
swCol.paths = Object.assign(Object.assign({}, swCol.paths), metaPaths);
|
81
214
|
delete swCol.swagger;
|
82
215
|
swCol.openapi = "3.0.3";
|
83
216
|
swCol.components = {};
|
package/dist/connect/socket.d.ts
CHANGED
@@ -67,7 +67,7 @@ export declare class SocketClient {
|
|
67
67
|
};
|
68
68
|
};
|
69
69
|
/**
|
70
|
-
* The main way to create the socket
|
70
|
+
* The main way to create the socket based client.
|
71
71
|
* @param url URL of the socket server (i.e the EASY API instance address)
|
72
72
|
* @param apiKey optional api key if set
|
73
73
|
* @returns SocketClient
|
package/dist/connect/socket.js
CHANGED
@@ -113,7 +113,7 @@ class SocketClient {
|
|
113
113
|
});
|
114
114
|
}
|
115
115
|
/**
|
116
|
-
* The main way to create the socket
|
116
|
+
* The main way to create the socket based client.
|
117
117
|
* @param url URL of the socket server (i.e the EASY API instance address)
|
118
118
|
* @param apiKey optional api key if set
|
119
119
|
* @returns SocketClient
|
package/package.json
CHANGED