@agentrhq/webcmd 0.4.1 → 0.4.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/README.md +3 -0
- package/cli-manifest.json +278 -0
- package/clis/amazon-in/auth.js +44 -0
- package/clis/amazon-in/checkout-status.js +54 -0
- package/clis/amazon-in/checkout.js +479 -0
- package/clis/amazon-in/parsers.js +252 -0
- package/clis/amazon-in/parsers.test.js +230 -0
- package/clis/amazon-in/product.js +72 -0
- package/clis/amazon-in/search.js +76 -0
- package/clis/amazon-in/shared.js +40 -0
- package/clis/amazon-in/wishlist.js +98 -0
- package/dist/src/hosted/client.d.ts +8 -10
- package/dist/src/hosted/client.js +24 -32
- package/dist/src/hosted/client.test.js +79 -24
- package/dist/src/hosted/runner.js +7 -35
- package/dist/src/hosted/runner.test.js +27 -51
- package/dist/src/hosted/types.d.ts +1 -5
- package/dist/src/root-command-surface.js +10 -2
- package/hosted-contract.json +329 -1
- package/package.json +1 -1
package/hosted-contract.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"webcmdVersion": "0.4.
|
|
3
|
+
"webcmdVersion": "0.4.2",
|
|
4
4
|
"outputFormats": [
|
|
5
5
|
"table",
|
|
6
6
|
"plain",
|
|
@@ -69,6 +69,334 @@
|
|
|
69
69
|
}
|
|
70
70
|
],
|
|
71
71
|
"commands": [
|
|
72
|
+
{
|
|
73
|
+
"command": "amazon-in/checkout",
|
|
74
|
+
"site": "amazon-in",
|
|
75
|
+
"name": "checkout",
|
|
76
|
+
"description": "Prepare a guarded Amazon.in checkout with browser-only payment handoff",
|
|
77
|
+
"access": "write",
|
|
78
|
+
"strategy": "UI",
|
|
79
|
+
"browser": true,
|
|
80
|
+
"domain": "amazon.in",
|
|
81
|
+
"positionals": [
|
|
82
|
+
{
|
|
83
|
+
"name": "input",
|
|
84
|
+
"type": "string",
|
|
85
|
+
"description": "Amazon.in product URL or ASIN",
|
|
86
|
+
"positional": true,
|
|
87
|
+
"required": true,
|
|
88
|
+
"variadic": false
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"options": [
|
|
92
|
+
{
|
|
93
|
+
"name": "quantity",
|
|
94
|
+
"type": "int",
|
|
95
|
+
"description": "Quantity (1-10)",
|
|
96
|
+
"positional": false,
|
|
97
|
+
"required": false,
|
|
98
|
+
"variadic": false,
|
|
99
|
+
"default": 1
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "size",
|
|
103
|
+
"type": "string",
|
|
104
|
+
"description": "Exact visible size label",
|
|
105
|
+
"positional": false,
|
|
106
|
+
"required": false,
|
|
107
|
+
"variadic": false
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "colour",
|
|
111
|
+
"type": "string",
|
|
112
|
+
"description": "Exact visible colour label",
|
|
113
|
+
"positional": false,
|
|
114
|
+
"required": false,
|
|
115
|
+
"variadic": false
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "payment",
|
|
119
|
+
"type": "string",
|
|
120
|
+
"description": "Payment method; secrets remain browser-only",
|
|
121
|
+
"positional": false,
|
|
122
|
+
"required": true,
|
|
123
|
+
"variadic": false,
|
|
124
|
+
"choices": [
|
|
125
|
+
"upi",
|
|
126
|
+
"saved-card",
|
|
127
|
+
"new-card",
|
|
128
|
+
"cod"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "card-last4",
|
|
133
|
+
"type": "string",
|
|
134
|
+
"description": "Saved-card selector: exactly four digits",
|
|
135
|
+
"positional": false,
|
|
136
|
+
"required": false,
|
|
137
|
+
"variadic": false
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "place-order",
|
|
141
|
+
"type": "boolean",
|
|
142
|
+
"description": "Submit the final Amazon action once",
|
|
143
|
+
"positional": false,
|
|
144
|
+
"required": false,
|
|
145
|
+
"variadic": false,
|
|
146
|
+
"default": false
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"columns": [
|
|
150
|
+
"status",
|
|
151
|
+
"asin",
|
|
152
|
+
"title",
|
|
153
|
+
"size",
|
|
154
|
+
"colour",
|
|
155
|
+
"quantity",
|
|
156
|
+
"item_price",
|
|
157
|
+
"total",
|
|
158
|
+
"payment_method",
|
|
159
|
+
"delivery_date",
|
|
160
|
+
"action",
|
|
161
|
+
"verify_command"
|
|
162
|
+
],
|
|
163
|
+
"aliases": [],
|
|
164
|
+
"defaultFormat": "table",
|
|
165
|
+
"fileArguments": [],
|
|
166
|
+
"sessionPolicy": "create-or-reuse",
|
|
167
|
+
"availability": {
|
|
168
|
+
"mode": "hosted"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"command": "amazon-in/checkout-status",
|
|
173
|
+
"site": "amazon-in",
|
|
174
|
+
"name": "checkout-status",
|
|
175
|
+
"description": "Read the current Amazon.in checkout or payment state without clicking",
|
|
176
|
+
"access": "read",
|
|
177
|
+
"strategy": "UI",
|
|
178
|
+
"browser": true,
|
|
179
|
+
"domain": "amazon.in",
|
|
180
|
+
"positionals": [],
|
|
181
|
+
"options": [],
|
|
182
|
+
"columns": [
|
|
183
|
+
"status",
|
|
184
|
+
"order_id",
|
|
185
|
+
"total",
|
|
186
|
+
"payment_method",
|
|
187
|
+
"action"
|
|
188
|
+
],
|
|
189
|
+
"aliases": [],
|
|
190
|
+
"defaultFormat": "table",
|
|
191
|
+
"fileArguments": [],
|
|
192
|
+
"sessionPolicy": "create-or-reuse",
|
|
193
|
+
"availability": {
|
|
194
|
+
"mode": "hosted"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"command": "amazon-in/login",
|
|
199
|
+
"site": "amazon-in",
|
|
200
|
+
"name": "login",
|
|
201
|
+
"description": "Open amazon-in login",
|
|
202
|
+
"access": "write",
|
|
203
|
+
"strategy": "COOKIE",
|
|
204
|
+
"browser": true,
|
|
205
|
+
"domain": "amazon.in",
|
|
206
|
+
"positionals": [],
|
|
207
|
+
"options": [],
|
|
208
|
+
"columns": [
|
|
209
|
+
"status",
|
|
210
|
+
"logged_in",
|
|
211
|
+
"site",
|
|
212
|
+
"user_name",
|
|
213
|
+
"action",
|
|
214
|
+
"verify_command"
|
|
215
|
+
],
|
|
216
|
+
"aliases": [],
|
|
217
|
+
"defaultFormat": "table",
|
|
218
|
+
"fileArguments": [],
|
|
219
|
+
"sessionPolicy": "create-or-reuse",
|
|
220
|
+
"availability": {
|
|
221
|
+
"mode": "hosted"
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"command": "amazon-in/product",
|
|
226
|
+
"site": "amazon-in",
|
|
227
|
+
"name": "product",
|
|
228
|
+
"description": "Fetch the current Amazon.in price and selected product variant",
|
|
229
|
+
"access": "read",
|
|
230
|
+
"strategy": "UI",
|
|
231
|
+
"browser": true,
|
|
232
|
+
"domain": "amazon.in",
|
|
233
|
+
"positionals": [
|
|
234
|
+
{
|
|
235
|
+
"name": "input",
|
|
236
|
+
"type": "string",
|
|
237
|
+
"description": "Amazon.in product URL or ASIN",
|
|
238
|
+
"positional": true,
|
|
239
|
+
"required": true,
|
|
240
|
+
"variadic": false
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
"options": [],
|
|
244
|
+
"columns": [
|
|
245
|
+
"asin",
|
|
246
|
+
"title",
|
|
247
|
+
"price",
|
|
248
|
+
"mrp",
|
|
249
|
+
"discount",
|
|
250
|
+
"availability",
|
|
251
|
+
"size",
|
|
252
|
+
"colour",
|
|
253
|
+
"image_url",
|
|
254
|
+
"product_url"
|
|
255
|
+
],
|
|
256
|
+
"aliases": [],
|
|
257
|
+
"defaultFormat": "table",
|
|
258
|
+
"fileArguments": [],
|
|
259
|
+
"sessionPolicy": "create-or-reuse",
|
|
260
|
+
"availability": {
|
|
261
|
+
"mode": "hosted"
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"command": "amazon-in/search",
|
|
266
|
+
"site": "amazon-in",
|
|
267
|
+
"name": "search",
|
|
268
|
+
"description": "Search Amazon.in products with inclusive INR price bounds and images",
|
|
269
|
+
"access": "read",
|
|
270
|
+
"strategy": "UI",
|
|
271
|
+
"browser": true,
|
|
272
|
+
"domain": "amazon.in",
|
|
273
|
+
"positionals": [
|
|
274
|
+
{
|
|
275
|
+
"name": "query",
|
|
276
|
+
"type": "string",
|
|
277
|
+
"description": "Product search query",
|
|
278
|
+
"positional": true,
|
|
279
|
+
"required": true,
|
|
280
|
+
"variadic": false
|
|
281
|
+
}
|
|
282
|
+
],
|
|
283
|
+
"options": [
|
|
284
|
+
{
|
|
285
|
+
"name": "min-price",
|
|
286
|
+
"type": "number",
|
|
287
|
+
"description": "Inclusive minimum price in rupees",
|
|
288
|
+
"positional": false,
|
|
289
|
+
"required": false,
|
|
290
|
+
"variadic": false
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"name": "max-price",
|
|
294
|
+
"type": "number",
|
|
295
|
+
"description": "Inclusive maximum price in rupees",
|
|
296
|
+
"positional": false,
|
|
297
|
+
"required": false,
|
|
298
|
+
"variadic": false
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"name": "limit",
|
|
302
|
+
"type": "int",
|
|
303
|
+
"description": "Maximum results (1-50)",
|
|
304
|
+
"positional": false,
|
|
305
|
+
"required": false,
|
|
306
|
+
"variadic": false,
|
|
307
|
+
"default": 20
|
|
308
|
+
}
|
|
309
|
+
],
|
|
310
|
+
"columns": [
|
|
311
|
+
"rank",
|
|
312
|
+
"asin",
|
|
313
|
+
"title",
|
|
314
|
+
"price",
|
|
315
|
+
"mrp",
|
|
316
|
+
"rating",
|
|
317
|
+
"review_count",
|
|
318
|
+
"image_url",
|
|
319
|
+
"product_url",
|
|
320
|
+
"is_sponsored"
|
|
321
|
+
],
|
|
322
|
+
"aliases": [],
|
|
323
|
+
"defaultFormat": "table",
|
|
324
|
+
"fileArguments": [],
|
|
325
|
+
"sessionPolicy": "create-or-reuse",
|
|
326
|
+
"availability": {
|
|
327
|
+
"mode": "hosted"
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"command": "amazon-in/whoami",
|
|
332
|
+
"site": "amazon-in",
|
|
333
|
+
"name": "whoami",
|
|
334
|
+
"description": "Show the current logged-in amazon-in account",
|
|
335
|
+
"access": "read",
|
|
336
|
+
"strategy": "COOKIE",
|
|
337
|
+
"browser": true,
|
|
338
|
+
"domain": "amazon.in",
|
|
339
|
+
"positionals": [],
|
|
340
|
+
"options": [],
|
|
341
|
+
"columns": [
|
|
342
|
+
"logged_in",
|
|
343
|
+
"site",
|
|
344
|
+
"user_name"
|
|
345
|
+
],
|
|
346
|
+
"aliases": [],
|
|
347
|
+
"defaultFormat": "table",
|
|
348
|
+
"fileArguments": [],
|
|
349
|
+
"sessionPolicy": "create-or-reuse",
|
|
350
|
+
"availability": {
|
|
351
|
+
"mode": "hosted"
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"command": "amazon-in/wishlist",
|
|
356
|
+
"site": "amazon-in",
|
|
357
|
+
"name": "wishlist",
|
|
358
|
+
"description": "Fetch current prices for products in the default Amazon.in wishlist",
|
|
359
|
+
"access": "read",
|
|
360
|
+
"strategy": "UI",
|
|
361
|
+
"browser": true,
|
|
362
|
+
"domain": "amazon.in",
|
|
363
|
+
"positionals": [],
|
|
364
|
+
"options": [
|
|
365
|
+
{
|
|
366
|
+
"name": "filter",
|
|
367
|
+
"type": "string",
|
|
368
|
+
"description": "Wishlist items to include",
|
|
369
|
+
"positional": false,
|
|
370
|
+
"required": false,
|
|
371
|
+
"variadic": false,
|
|
372
|
+
"default": "unpurchased",
|
|
373
|
+
"choices": [
|
|
374
|
+
"unpurchased",
|
|
375
|
+
"all"
|
|
376
|
+
]
|
|
377
|
+
}
|
|
378
|
+
],
|
|
379
|
+
"columns": [
|
|
380
|
+
"list_name",
|
|
381
|
+
"item_id",
|
|
382
|
+
"asin",
|
|
383
|
+
"title",
|
|
384
|
+
"price",
|
|
385
|
+
"mrp",
|
|
386
|
+
"availability",
|
|
387
|
+
"size",
|
|
388
|
+
"colour",
|
|
389
|
+
"image_url",
|
|
390
|
+
"product_url"
|
|
391
|
+
],
|
|
392
|
+
"aliases": [],
|
|
393
|
+
"defaultFormat": "table",
|
|
394
|
+
"fileArguments": [],
|
|
395
|
+
"sessionPolicy": "create-or-reuse",
|
|
396
|
+
"availability": {
|
|
397
|
+
"mode": "hosted"
|
|
398
|
+
}
|
|
399
|
+
},
|
|
72
400
|
{
|
|
73
401
|
"command": "amazon/bestsellers",
|
|
74
402
|
"site": "amazon",
|
package/package.json
CHANGED