docstar-cli 1.2.1 → 1.3.1
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/commands/api-test/whatsapp/send-message.js +35 -0
- package/dist/commands/config/get.d.ts +10 -0
- package/dist/commands/config/get.js +43 -0
- package/dist/commands/config/set.d.ts +11 -0
- package/dist/commands/config/set.js +33 -0
- package/dist/commands/github/apps/add-repo-to-installation-for-authenticated-user.js +31 -0
- package/dist/commands/github/apps/check-authorization.js +31 -0
- package/dist/commands/github/apps/check-token.js +30 -0
- package/dist/commands/github/apps/create-content-attachment.js +30 -0
- package/dist/commands/github/apps/create-from-manifest.js +30 -0
- package/dist/commands/github/apps/create-installation-access-token.js +30 -0
- package/dist/commands/github/apps/delete-authorization.js +30 -0
- package/dist/commands/github/apps/delete-installation.js +30 -0
- package/dist/commands/github/apps/delete-token.js +30 -0
- package/dist/commands/github/apps/get-authenticated.js +30 -0
- package/dist/commands/github/apps/get-by-slug.js +30 -0
- package/dist/commands/github/apps/get-installation.js +30 -0
- package/dist/commands/github/apps/get-org-installation.js +30 -0
- package/dist/commands/github/apps/get-repo-installation.js +31 -0
- package/dist/commands/github/apps/get-subscription-plan-for-account-stubbed.js +30 -0
- package/dist/commands/github/apps/get-subscription-plan-for-account.js +30 -0
- package/dist/commands/github/apps/get-user-installation.js +30 -0
- package/dist/commands/github/apps/get-webhook-config-for-app.js +30 -0
- package/dist/commands/github/apps/get-webhook-delivery.js +30 -0
- package/dist/commands/github/apps/list-accounts-for-plan-stubbed.js +34 -0
- package/dist/commands/github/apps/list-accounts-for-plan.js +34 -0
- package/dist/commands/github/apps/list-installation-repos-for-authenticated-user.js +32 -0
- package/dist/commands/github/apps/list-installations-for-authenticated-user.js +31 -0
- package/dist/commands/github/apps/list-installations.js +33 -0
- package/dist/commands/github/apps/list-plans-stubbed.js +31 -0
- package/dist/commands/github/apps/list-plans.js +31 -0
- package/dist/commands/github/apps/list-repos-accessible-to-installation.js +31 -0
- package/dist/commands/github/apps/list-subscriptions-for-authenticated-user-stubbed.js +31 -0
- package/dist/commands/github/apps/list-subscriptions-for-authenticated-user.js +31 -0
- package/dist/commands/github/apps/list-webhook-deliveries.js +32 -0
- package/dist/commands/github/apps/redeliver-webhook-delivery.js +30 -0
- package/dist/commands/github/apps/remove-repo-from-installation-for-authenticated-user.js +31 -0
- package/dist/commands/github/apps/reset-authorization.js +31 -0
- package/dist/commands/github/apps/reset-token.js +30 -0
- package/dist/commands/github/apps/revoke-authorization-for-application.js +31 -0
- package/dist/commands/github/apps/revoke-grant-for-application.js +31 -0
- package/dist/commands/github/apps/revoke-installation-access-token.js +30 -0
- package/dist/commands/github/apps/scope-token.js +30 -0
- package/dist/commands/github/apps/suspend-installation.js +30 -0
- package/dist/commands/github/apps/unsuspend-installation.js +30 -0
- package/dist/commands/github/apps/update-webhook-config-for-app.js +30 -0
- package/dist/commands/github/meta/get-all-versions.js +30 -0
- package/dist/commands/github/meta/get-octocat.js +30 -0
- package/dist/commands/github/meta/get-zen.js +30 -0
- package/dist/commands/github/meta/get.js +30 -0
- package/dist/commands/github/meta/root.js +30 -0
- package/dist/commands/github/oauth-authorizations/create-authorization.js +30 -0
- package/dist/commands/github/oauth-authorizations/delete-authorization.js +30 -0
- package/dist/commands/github/oauth-authorizations/delete-grant.js +30 -0
- package/dist/commands/github/oauth-authorizations/get-authorization.js +30 -0
- package/dist/commands/github/oauth-authorizations/get-grant.js +30 -0
- package/dist/commands/github/oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint.js +31 -0
- package/dist/commands/github/oauth-authorizations/get-or-create-authorization-for-app.js +30 -0
- package/dist/commands/github/oauth-authorizations/list-authorizations.js +32 -0
- package/dist/commands/github/oauth-authorizations/list-grants.js +32 -0
- package/dist/commands/github/oauth-authorizations/update-authorization.js +30 -0
- package/dist/commands/msg91/hello/assign-ticket.js +40 -0
- package/dist/commands/msg91/hello/bot-analytics.js +33 -0
- package/dist/commands/msg91/hello/close-all-ticket-by-filter-id.js +35 -0
- package/dist/commands/msg91/hello/close-all-ticket.js +37 -0
- package/dist/commands/msg91/hello/create-draft-email.js +35 -0
- package/dist/commands/msg91/hello/create-update.js +35 -0
- package/dist/commands/msg91/hello/delete-draft-email.js +33 -0
- package/dist/commands/msg91/hello/delete-draft.js +33 -0
- package/dist/commands/msg91/hello/email-inbox-list-1.js +36 -0
- package/dist/commands/msg91/hello/get-agent-team-bot.js +38 -0
- package/dist/commands/msg91/hello/get-draft.js +34 -0
- package/dist/commands/msg91/hello/get-save-filter-list-by-filter-id.js +31 -0
- package/dist/commands/msg91/hello/get-tickets.js +37 -0
- package/dist/commands/msg91/hello/hello-mail-send-api.js +38 -0
- package/dist/commands/msg91/hello/hello-mail-send.js +37 -0
- package/dist/commands/msg91/hello/mail-ticket-list.js +34 -0
- package/dist/commands/msg91/hello/open-ticket.js +32 -0
- package/dist/commands/msg91/hello/saved-filter-list.js +32 -0
- package/dist/commands/msg91/hello/statechangeapi.js +34 -0
- package/dist/commands/msg91/hello/update-draft-email.js +36 -0
- package/dist/commands/msg91/hello/update-draft-whatsapp.js +36 -0
- package/dist/commands/msg91/sms/add-flow.js +32 -0
- package/dist/commands/msg91/sms/add-template-version.js +32 -0
- package/dist/commands/msg91/sms/get-template-versions.js +33 -0
- package/dist/commands/msg91/sms/mark-default.js +33 -0
- package/dist/commands/msg91/sms/send-sms.js +37 -0
- package/dist/commands/msg91/sms/sms-analytics.js +33 -0
- package/dist/commands/msg91/sms/sms-logs.js +36 -0
- package/dist/commands/msg91/whatsapp/approve-join-requests.js +33 -0
- package/dist/commands/msg91/whatsapp/check-whatsapp-prepaid-balance.js +34 -0
- package/dist/commands/msg91/whatsapp/create-group.js +35 -0
- package/dist/commands/msg91/whatsapp/create-whatsapp-template.js +37 -0
- package/dist/commands/msg91/whatsapp/delete-group.js +32 -0
- package/dist/commands/msg91/whatsapp/delete-template.js +33 -0
- package/dist/commands/msg91/whatsapp/edit-template-1.js +35 -0
- package/dist/commands/msg91/whatsapp/edit-template.js +35 -0
- package/dist/commands/msg91/whatsapp/get-group-by-id.js +33 -0
- package/dist/commands/msg91/whatsapp/get-group-by-number.js +33 -0
- package/dist/commands/msg91/whatsapp/get-joinee-request.js +32 -0
- package/dist/commands/msg91/whatsapp/get-templates.js +39 -0
- package/dist/commands/msg91/whatsapp/interactive-wa-send-location.js +35 -0
- package/dist/commands/msg91/whatsapp/interactive-whatsapp-buttons.js +36 -0
- package/dist/commands/msg91/whatsapp/interactive-whatsapp-list.js +36 -0
- package/dist/commands/msg91/whatsapp/multiple-product-catalog.js +36 -0
- package/dist/commands/msg91/whatsapp/reject-join-requests-1.js +33 -0
- package/dist/commands/msg91/whatsapp/remove-participants.js +33 -0
- package/dist/commands/msg91/whatsapp/reset-group-invite-link-1.js +33 -0
- package/dist/commands/msg91/whatsapp/send-message-in-text.js +36 -0
- package/dist/commands/msg91/whatsapp/send-message-on-group.js +36 -0
- package/dist/commands/msg91/whatsapp/send-payment-link-via-whatsapp-payments.js +37 -0
- package/dist/commands/msg91/whatsapp/single-product-catalog.js +36 -0
- package/dist/commands/msg91/whatsapp/template-bulk.js +35 -0
- package/dist/commands/msg91/whatsapp/to-fetch-whatsapp-number.js +32 -0
- package/dist/commands/msg91/whatsapp/whatsapp-analytics.js +33 -0
- package/dist/commands/msg91/whatsapp/whatsapp-logs.js +36 -0
- package/dist/commands/msg91/whatsapp/whatsapp-voice-call.js +34 -0
- package/dist/commands/reqres/project/get-all-project.js +32 -0
- package/dist/lib/codegen.js +10 -0
- package/dist/lib/http.js +27 -4
- package/dist/lib/types.d.ts +1 -0
- package/oclif.manifest.json +5525 -1
- package/package.json +2 -2
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {Command, Flags} from '@oclif/core'
|
|
2
|
+
import {executeCliCommand} from '../../../lib/http.js'
|
|
3
|
+
import {promptForMissingParams} from '../../../lib/prompt.js'
|
|
4
|
+
|
|
5
|
+
const REQUIRED_PARAMS = ["channel","filter_id","assignee_id","assignee_type","type","state","start_from","page_size"]
|
|
6
|
+
|
|
7
|
+
export default class Generated extends Command {
|
|
8
|
+
static description = "Assign/Unassign Ticket "
|
|
9
|
+
static aliases = []
|
|
10
|
+
static flags = {
|
|
11
|
+
"channel": Flags.string({description: "Required parameter"}),
|
|
12
|
+
"filter_id": Flags.string({description: "Required parameter"}),
|
|
13
|
+
"assignee_id": Flags.string({description: "Required parameter"}),
|
|
14
|
+
"assignee_type": Flags.string({description: "Required parameter"}),
|
|
15
|
+
"type": Flags.string({description: "Required parameter"}),
|
|
16
|
+
"state": Flags.string({description: "Required parameter"}),
|
|
17
|
+
"start_from": Flags.string({description: "Required parameter"}),
|
|
18
|
+
"page_size": Flags.string({description: "Required parameter"}),
|
|
19
|
+
"accept": Flags.string({description: 'Header value'}),
|
|
20
|
+
"content-type": Flags.string({description: 'Header value'}),
|
|
21
|
+
"authkey": Flags.string({description: 'Header value'}),
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async run() {
|
|
25
|
+
const {flags} = await this.parse(Generated)
|
|
26
|
+
const params = {}
|
|
27
|
+
for (const [key, value] of Object.entries(flags)) {
|
|
28
|
+
if (value !== undefined) params[key] = value
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
|
|
32
|
+
|
|
33
|
+
try {
|
|
34
|
+
const result = await executeCliCommand("msg91", "hello", "assign-ticket", params)
|
|
35
|
+
this.log(JSON.stringify(result, null, 2))
|
|
36
|
+
} catch (error) {
|
|
37
|
+
this.error(error.message)
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {Command, Flags} from '@oclif/core'
|
|
2
|
+
import {executeCliCommand} from '../../../lib/http.js'
|
|
3
|
+
import {promptForMissingParams} from '../../../lib/prompt.js'
|
|
4
|
+
|
|
5
|
+
const REQUIRED_PARAMS = []
|
|
6
|
+
|
|
7
|
+
export default class Generated extends Command {
|
|
8
|
+
static description = "Bot Analytics"
|
|
9
|
+
static aliases = []
|
|
10
|
+
static flags = {
|
|
11
|
+
"startDate": Flags.string({description: "Optional parameter"}),
|
|
12
|
+
"endDate": Flags.string({description: "Optional parameter"}),
|
|
13
|
+
"Authkey": Flags.string({description: 'Header value'}),
|
|
14
|
+
"Aceept": Flags.string({description: 'Header value'}),
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async run() {
|
|
18
|
+
const {flags} = await this.parse(Generated)
|
|
19
|
+
const params = {}
|
|
20
|
+
for (const [key, value] of Object.entries(flags)) {
|
|
21
|
+
if (value !== undefined) params[key] = value
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
|
|
25
|
+
|
|
26
|
+
try {
|
|
27
|
+
const result = await executeCliCommand("msg91", "hello", "bot-analytics", params)
|
|
28
|
+
this.log(JSON.stringify(result, null, 2))
|
|
29
|
+
} catch (error) {
|
|
30
|
+
this.error(error.message)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {Command, Flags} from '@oclif/core'
|
|
2
|
+
import {executeCliCommand} from '../../../lib/http.js'
|
|
3
|
+
import {promptForMissingParams} from '../../../lib/prompt.js'
|
|
4
|
+
|
|
5
|
+
const REQUIRED_PARAMS = ["new_state","close_all","filter_id","agent_id"]
|
|
6
|
+
|
|
7
|
+
export default class Generated extends Command {
|
|
8
|
+
static description = "Close All Ticket by Filter ID"
|
|
9
|
+
static aliases = []
|
|
10
|
+
static flags = {
|
|
11
|
+
"new_state": Flags.string({description: "Required parameter"}),
|
|
12
|
+
"close_all": Flags.string({description: "Required parameter"}),
|
|
13
|
+
"filter_id": Flags.string({description: "Required parameter"}),
|
|
14
|
+
"agent_id": Flags.string({description: "Required parameter"}),
|
|
15
|
+
"Content-Type": Flags.string({description: 'Header value'}),
|
|
16
|
+
"Authkey": Flags.string({description: 'Header value'}),
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async run() {
|
|
20
|
+
const {flags} = await this.parse(Generated)
|
|
21
|
+
const params = {}
|
|
22
|
+
for (const [key, value] of Object.entries(flags)) {
|
|
23
|
+
if (value !== undefined) params[key] = value
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
|
|
27
|
+
|
|
28
|
+
try {
|
|
29
|
+
const result = await executeCliCommand("msg91", "hello", "close-all-ticket-by-filter-id", params)
|
|
30
|
+
this.log(JSON.stringify(result, null, 2))
|
|
31
|
+
} catch (error) {
|
|
32
|
+
this.error(error.message)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {Command, Flags} from '@oclif/core'
|
|
2
|
+
import {executeCliCommand} from '../../../lib/http.js'
|
|
3
|
+
import {promptForMissingParams} from '../../../lib/prompt.js'
|
|
4
|
+
|
|
5
|
+
const REQUIRED_PARAMS = ["close_all","assignees","last_reply_by","last_modified_between","inboxes","new_state"]
|
|
6
|
+
|
|
7
|
+
export default class Generated extends Command {
|
|
8
|
+
static description = "Bulk close operation for mail tickets with advanced filtering capabilities. Closes all tickets matching specified criteria across selected inboxes. "
|
|
9
|
+
static aliases = []
|
|
10
|
+
static flags = {
|
|
11
|
+
"close_all": Flags.string({description: "Required parameter"}),
|
|
12
|
+
"assignees": Flags.string({description: "Required parameter"}),
|
|
13
|
+
"last_reply_by": Flags.string({description: "Required parameter"}),
|
|
14
|
+
"last_modified_between": Flags.string({description: "Required parameter"}),
|
|
15
|
+
"inboxes": Flags.string({description: "Required parameter"}),
|
|
16
|
+
"new_state": Flags.string({description: "Required parameter"}),
|
|
17
|
+
"Content-Type": Flags.string({description: 'Header value'}),
|
|
18
|
+
"Authkey": Flags.string({description: 'Header value'}),
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
async run() {
|
|
22
|
+
const {flags} = await this.parse(Generated)
|
|
23
|
+
const params = {}
|
|
24
|
+
for (const [key, value] of Object.entries(flags)) {
|
|
25
|
+
if (value !== undefined) params[key] = value
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
|
|
29
|
+
|
|
30
|
+
try {
|
|
31
|
+
const result = await executeCliCommand("msg91", "hello", "close-all-ticket", params)
|
|
32
|
+
this.log(JSON.stringify(result, null, 2))
|
|
33
|
+
} catch (error) {
|
|
34
|
+
this.error(error.message)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {Command, Flags} from '@oclif/core'
|
|
2
|
+
import {executeCliCommand} from '../../../lib/http.js'
|
|
3
|
+
import {promptForMissingParams} from '../../../lib/prompt.js'
|
|
4
|
+
|
|
5
|
+
const REQUIRED_PARAMS = ["0","message_type","agent_id","content"]
|
|
6
|
+
|
|
7
|
+
export default class Generated extends Command {
|
|
8
|
+
static description = "Create new draft, Origin values can be \"chat\", \"mail\", \"whatsapp\", \"facebook\", \"instagram\", \"rcs\", \"numbers\"."
|
|
9
|
+
static aliases = []
|
|
10
|
+
static flags = {
|
|
11
|
+
"0": Flags.string({description: "Required parameter"}),
|
|
12
|
+
"message_type": Flags.string({description: "Required parameter"}),
|
|
13
|
+
"agent_id": Flags.string({description: "Required parameter"}),
|
|
14
|
+
"content": Flags.string({description: "Required parameter"}),
|
|
15
|
+
"Authkey": Flags.string({description: 'Header value'}),
|
|
16
|
+
"content-type": Flags.string({description: 'Header value'}),
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async run() {
|
|
20
|
+
const {flags} = await this.parse(Generated)
|
|
21
|
+
const params = {}
|
|
22
|
+
for (const [key, value] of Object.entries(flags)) {
|
|
23
|
+
if (value !== undefined) params[key] = value
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
|
|
27
|
+
|
|
28
|
+
try {
|
|
29
|
+
const result = await executeCliCommand("msg91", "hello", "create-draft-email", params)
|
|
30
|
+
this.log(JSON.stringify(result, null, 2))
|
|
31
|
+
} catch (error) {
|
|
32
|
+
this.error(error.message)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {Command, Flags} from '@oclif/core'
|
|
2
|
+
import {executeCliCommand} from '../../../lib/http.js'
|
|
3
|
+
import {promptForMissingParams} from '../../../lib/prompt.js'
|
|
4
|
+
|
|
5
|
+
const REQUIRED_PARAMS = ["0","message_type","agent_id","content"]
|
|
6
|
+
|
|
7
|
+
export default class Generated extends Command {
|
|
8
|
+
static description = "Create new draft, Origin values can be \"chat\", \"mail\", \"whatsapp\", \"facebook\", \"instagram\", \"rcs\", \"numbers\", "
|
|
9
|
+
static aliases = []
|
|
10
|
+
static flags = {
|
|
11
|
+
"0": Flags.string({description: "Required parameter"}),
|
|
12
|
+
"message_type": Flags.string({description: "Required parameter"}),
|
|
13
|
+
"agent_id": Flags.string({description: "Required parameter"}),
|
|
14
|
+
"content": Flags.string({description: "Required parameter"}),
|
|
15
|
+
"Authkey": Flags.string({description: 'Header value'}),
|
|
16
|
+
"Content-Type": Flags.string({description: 'Header value'}),
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async run() {
|
|
20
|
+
const {flags} = await this.parse(Generated)
|
|
21
|
+
const params = {}
|
|
22
|
+
for (const [key, value] of Object.entries(flags)) {
|
|
23
|
+
if (value !== undefined) params[key] = value
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
|
|
27
|
+
|
|
28
|
+
try {
|
|
29
|
+
const result = await executeCliCommand("msg91", "hello", "create-update", params)
|
|
30
|
+
this.log(JSON.stringify(result, null, 2))
|
|
31
|
+
} catch (error) {
|
|
32
|
+
this.error(error.message)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {Command, Flags} from '@oclif/core'
|
|
2
|
+
import {executeCliCommand} from '../../../lib/http.js'
|
|
3
|
+
import {promptForMissingParams} from '../../../lib/prompt.js'
|
|
4
|
+
|
|
5
|
+
const REQUIRED_PARAMS = ["0","1"]
|
|
6
|
+
|
|
7
|
+
export default class Generated extends Command {
|
|
8
|
+
static description = "Delete specific draft by draft ID. Origin value can be: : \"chat\", \"mail\", \"whatsapp\", \"facebook\", \"instagram\", \"rcs\", \"numbers\"."
|
|
9
|
+
static aliases = []
|
|
10
|
+
static flags = {
|
|
11
|
+
"0": Flags.string({description: "Required parameter"}),
|
|
12
|
+
"1": Flags.string({description: "Required parameter"}),
|
|
13
|
+
"content-type": Flags.string({description: 'Header value'}),
|
|
14
|
+
"Authkey": Flags.string({description: 'Header value'}),
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async run() {
|
|
18
|
+
const {flags} = await this.parse(Generated)
|
|
19
|
+
const params = {}
|
|
20
|
+
for (const [key, value] of Object.entries(flags)) {
|
|
21
|
+
if (value !== undefined) params[key] = value
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
|
|
25
|
+
|
|
26
|
+
try {
|
|
27
|
+
const result = await executeCliCommand("msg91", "hello", "delete-draft-email", params)
|
|
28
|
+
this.log(JSON.stringify(result, null, 2))
|
|
29
|
+
} catch (error) {
|
|
30
|
+
this.error(error.message)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {Command, Flags} from '@oclif/core'
|
|
2
|
+
import {executeCliCommand} from '../../../lib/http.js'
|
|
3
|
+
import {promptForMissingParams} from '../../../lib/prompt.js'
|
|
4
|
+
|
|
5
|
+
const REQUIRED_PARAMS = ["0","1"]
|
|
6
|
+
|
|
7
|
+
export default class Generated extends Command {
|
|
8
|
+
static description = "Delete specific draft by draft ID. Origin value can be: : \"chat\", \"mail\", \"whatsapp\", \"facebook\", \"instagram\", \"rcs\", \"numbers\"."
|
|
9
|
+
static aliases = []
|
|
10
|
+
static flags = {
|
|
11
|
+
"0": Flags.string({description: "Required parameter"}),
|
|
12
|
+
"1": Flags.string({description: "Required parameter"}),
|
|
13
|
+
"content-type": Flags.string({description: 'Header value'}),
|
|
14
|
+
"Authkey": Flags.string({description: 'Header value'}),
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async run() {
|
|
18
|
+
const {flags} = await this.parse(Generated)
|
|
19
|
+
const params = {}
|
|
20
|
+
for (const [key, value] of Object.entries(flags)) {
|
|
21
|
+
if (value !== undefined) params[key] = value
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
|
|
25
|
+
|
|
26
|
+
try {
|
|
27
|
+
const result = await executeCliCommand("msg91", "hello", "delete-draft", params)
|
|
28
|
+
this.log(JSON.stringify(result, null, 2))
|
|
29
|
+
} catch (error) {
|
|
30
|
+
this.error(error.message)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {Command, Flags} from '@oclif/core'
|
|
2
|
+
import {executeCliCommand} from '../../../lib/http.js'
|
|
3
|
+
import {promptForMissingParams} from '../../../lib/prompt.js'
|
|
4
|
+
|
|
5
|
+
const REQUIRED_PARAMS = []
|
|
6
|
+
|
|
7
|
+
export default class Generated extends Command {
|
|
8
|
+
static description = "Email Inbox List"
|
|
9
|
+
static aliases = []
|
|
10
|
+
static flags = {
|
|
11
|
+
"start_from": Flags.string({description: "Optional parameter"}),
|
|
12
|
+
"page_size": Flags.string({description: "Optional parameter"}),
|
|
13
|
+
"search": Flags.string({description: "Optional parameter"}),
|
|
14
|
+
"inbox_list": Flags.string({description: "Optional parameter"}),
|
|
15
|
+
"show_disabled": Flags.string({description: "Optional parameter"}),
|
|
16
|
+
"AuthKey": Flags.string({description: 'Header value'}),
|
|
17
|
+
"content-type": Flags.string({description: 'Header value'}),
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async run() {
|
|
21
|
+
const {flags} = await this.parse(Generated)
|
|
22
|
+
const params = {}
|
|
23
|
+
for (const [key, value] of Object.entries(flags)) {
|
|
24
|
+
if (value !== undefined) params[key] = value
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
|
|
28
|
+
|
|
29
|
+
try {
|
|
30
|
+
const result = await executeCliCommand("msg91", "hello", "email-inbox-list-1", params)
|
|
31
|
+
this.log(JSON.stringify(result, null, 2))
|
|
32
|
+
} catch (error) {
|
|
33
|
+
this.error(error.message)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {Command, Flags} from '@oclif/core'
|
|
2
|
+
import {executeCliCommand} from '../../../lib/http.js'
|
|
3
|
+
import {promptForMissingParams} from '../../../lib/prompt.js'
|
|
4
|
+
|
|
5
|
+
const REQUIRED_PARAMS = ["0"]
|
|
6
|
+
|
|
7
|
+
export default class Generated extends Command {
|
|
8
|
+
static description = "This API endpoint retrieves the list of agents, teams, and the assigned bot for a specific inbox. It supports filtering by permission status and provides pagination for large participant lists."
|
|
9
|
+
static aliases = []
|
|
10
|
+
static flags = {
|
|
11
|
+
"0": Flags.string({description: "Required parameter"}),
|
|
12
|
+
"status": Flags.string({description: "Optional parameter"}),
|
|
13
|
+
"sort_order": Flags.string({description: "Optional parameter"}),
|
|
14
|
+
"pageNumber": Flags.string({description: "Optional parameter"}),
|
|
15
|
+
"filter_by": Flags.string({description: "Optional parameter"}),
|
|
16
|
+
"itemsPerPage": Flags.string({description: "Optional parameter"}),
|
|
17
|
+
"search": Flags.string({description: "Optional parameter"}),
|
|
18
|
+
"Authkey": Flags.string({description: 'Header value'}),
|
|
19
|
+
"content-type": Flags.string({description: 'Header value'}),
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async run() {
|
|
23
|
+
const {flags} = await this.parse(Generated)
|
|
24
|
+
const params = {}
|
|
25
|
+
for (const [key, value] of Object.entries(flags)) {
|
|
26
|
+
if (value !== undefined) params[key] = value
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
const result = await executeCliCommand("msg91", "hello", "get-agent-team-bot", params)
|
|
33
|
+
this.log(JSON.stringify(result, null, 2))
|
|
34
|
+
} catch (error) {
|
|
35
|
+
this.error(error.message)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {Command, Flags} from '@oclif/core'
|
|
2
|
+
import {executeCliCommand} from '../../../lib/http.js'
|
|
3
|
+
import {promptForMissingParams} from '../../../lib/prompt.js'
|
|
4
|
+
|
|
5
|
+
const REQUIRED_PARAMS = ["0","1"]
|
|
6
|
+
|
|
7
|
+
export default class Generated extends Command {
|
|
8
|
+
static description = " Retrieve saved draft messages for a specific chat/email thread.Supported origins : chat, mail, whatsapp, facebook, instagram, rcs, apple_message, note"
|
|
9
|
+
static aliases = []
|
|
10
|
+
static flags = {
|
|
11
|
+
"0": Flags.string({description: "Required parameter"}),
|
|
12
|
+
"1": Flags.string({description: "Required parameter"}),
|
|
13
|
+
"agent_id": Flags.string({description: "Optional parameter"}),
|
|
14
|
+
"Content-type": Flags.string({description: 'Header value'}),
|
|
15
|
+
"Authkey": Flags.string({description: 'Header value'}),
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
async run() {
|
|
19
|
+
const {flags} = await this.parse(Generated)
|
|
20
|
+
const params = {}
|
|
21
|
+
for (const [key, value] of Object.entries(flags)) {
|
|
22
|
+
if (value !== undefined) params[key] = value
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
const result = await executeCliCommand("msg91", "hello", "get-draft", params)
|
|
29
|
+
this.log(JSON.stringify(result, null, 2))
|
|
30
|
+
} catch (error) {
|
|
31
|
+
this.error(error.message)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {Command, Flags} from '@oclif/core'
|
|
2
|
+
import {executeCliCommand} from '../../../lib/http.js'
|
|
3
|
+
import {promptForMissingParams} from '../../../lib/prompt.js'
|
|
4
|
+
|
|
5
|
+
const REQUIRED_PARAMS = []
|
|
6
|
+
|
|
7
|
+
export default class Generated extends Command {
|
|
8
|
+
static description = "Get Save Filter list by Filter ID"
|
|
9
|
+
static aliases = []
|
|
10
|
+
static flags = {
|
|
11
|
+
"Authkey": Flags.string({description: 'Header value'}),
|
|
12
|
+
"Content-type": Flags.string({description: 'Header value'}),
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async run() {
|
|
16
|
+
const {flags} = await this.parse(Generated)
|
|
17
|
+
const params = {}
|
|
18
|
+
for (const [key, value] of Object.entries(flags)) {
|
|
19
|
+
if (value !== undefined) params[key] = value
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
|
|
23
|
+
|
|
24
|
+
try {
|
|
25
|
+
const result = await executeCliCommand("msg91", "hello", "get-save-filter-list-by-filter-id", params)
|
|
26
|
+
this.log(JSON.stringify(result, null, 2))
|
|
27
|
+
} catch (error) {
|
|
28
|
+
this.error(error.message)
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {Command, Flags} from '@oclif/core'
|
|
2
|
+
import {executeCliCommand} from '../../../lib/http.js'
|
|
3
|
+
import {promptForMissingParams} from '../../../lib/prompt.js'
|
|
4
|
+
|
|
5
|
+
const REQUIRED_PARAMS = []
|
|
6
|
+
|
|
7
|
+
export default class Generated extends Command {
|
|
8
|
+
static description = "Retrieves list of tickets (mail and chat channels) with filtering and pagination support. Returns tickets sorted by last message timestamp in descending order."
|
|
9
|
+
static aliases = []
|
|
10
|
+
static flags = {
|
|
11
|
+
"mail_inboxes": Flags.string({description: "Optional parameter"}),
|
|
12
|
+
"chat_inboxes": Flags.string({description: "Optional parameter"}),
|
|
13
|
+
"type": Flags.string({description: "Optional parameter"}),
|
|
14
|
+
"Page_size": Flags.string({description: "Optional parameter"}),
|
|
15
|
+
"Start_from": Flags.string({description: "Optional parameter"}),
|
|
16
|
+
"queue": Flags.string({description: "Optional parameter"}),
|
|
17
|
+
"Authkey": Flags.string({description: 'Header value'}),
|
|
18
|
+
"content-type": Flags.string({description: 'Header value'}),
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
async run() {
|
|
22
|
+
const {flags} = await this.parse(Generated)
|
|
23
|
+
const params = {}
|
|
24
|
+
for (const [key, value] of Object.entries(flags)) {
|
|
25
|
+
if (value !== undefined) params[key] = value
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
|
|
29
|
+
|
|
30
|
+
try {
|
|
31
|
+
const result = await executeCliCommand("msg91", "hello", "get-tickets", params)
|
|
32
|
+
this.log(JSON.stringify(result, null, 2))
|
|
33
|
+
} catch (error) {
|
|
34
|
+
this.error(error.message)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {Command, Flags} from '@oclif/core'
|
|
2
|
+
import {executeCliCommand} from '../../../lib/http.js'
|
|
3
|
+
import {promptForMissingParams} from '../../../lib/prompt.js'
|
|
4
|
+
|
|
5
|
+
const REQUIRED_PARAMS = ["type","message_type","compose","to","inbox_id","chat_id","content"]
|
|
6
|
+
|
|
7
|
+
export default class Generated extends Command {
|
|
8
|
+
static description = "Reply in Same Thread"
|
|
9
|
+
static aliases = []
|
|
10
|
+
static flags = {
|
|
11
|
+
"type": Flags.string({description: "Required parameter"}),
|
|
12
|
+
"message_type": Flags.string({description: "Required parameter"}),
|
|
13
|
+
"compose": Flags.string({description: "Required parameter"}),
|
|
14
|
+
"to": Flags.string({description: "Required parameter"}),
|
|
15
|
+
"inbox_id": Flags.string({description: "Required parameter"}),
|
|
16
|
+
"chat_id": Flags.string({description: "Required parameter"}),
|
|
17
|
+
"content": Flags.string({description: "Required parameter"}),
|
|
18
|
+
"Authkey": Flags.string({description: 'Header value'}),
|
|
19
|
+
"content-type": Flags.string({description: 'Header value'}),
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async run() {
|
|
23
|
+
const {flags} = await this.parse(Generated)
|
|
24
|
+
const params = {}
|
|
25
|
+
for (const [key, value] of Object.entries(flags)) {
|
|
26
|
+
if (value !== undefined) params[key] = value
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
const result = await executeCliCommand("msg91", "hello", "hello-mail-send-api", params)
|
|
33
|
+
this.log(JSON.stringify(result, null, 2))
|
|
34
|
+
} catch (error) {
|
|
35
|
+
this.error(error.message)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {Command, Flags} from '@oclif/core'
|
|
2
|
+
import {executeCliCommand} from '../../../lib/http.js'
|
|
3
|
+
import {promptForMissingParams} from '../../../lib/prompt.js'
|
|
4
|
+
|
|
5
|
+
const REQUIRED_PARAMS = ["type","message_type","compose","to","inbox_id","content"]
|
|
6
|
+
|
|
7
|
+
export default class Generated extends Command {
|
|
8
|
+
static description = "Hello Mail Send API"
|
|
9
|
+
static aliases = []
|
|
10
|
+
static flags = {
|
|
11
|
+
"type": Flags.string({description: "Required parameter"}),
|
|
12
|
+
"message_type": Flags.string({description: "Required parameter"}),
|
|
13
|
+
"compose": Flags.string({description: "Required parameter"}),
|
|
14
|
+
"to": Flags.string({description: "Required parameter"}),
|
|
15
|
+
"inbox_id": Flags.string({description: "Required parameter"}),
|
|
16
|
+
"content": Flags.string({description: "Required parameter"}),
|
|
17
|
+
"Authkey": Flags.string({description: 'Header value'}),
|
|
18
|
+
"content-type": Flags.string({description: 'Header value'}),
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
async run() {
|
|
22
|
+
const {flags} = await this.parse(Generated)
|
|
23
|
+
const params = {}
|
|
24
|
+
for (const [key, value] of Object.entries(flags)) {
|
|
25
|
+
if (value !== undefined) params[key] = value
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
|
|
29
|
+
|
|
30
|
+
try {
|
|
31
|
+
const result = await executeCliCommand("msg91", "hello", "hello-mail-send", params)
|
|
32
|
+
this.log(JSON.stringify(result, null, 2))
|
|
33
|
+
} catch (error) {
|
|
34
|
+
this.error(error.message)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {Command, Flags} from '@oclif/core'
|
|
2
|
+
import {executeCliCommand} from '../../../lib/http.js'
|
|
3
|
+
import {promptForMissingParams} from '../../../lib/prompt.js'
|
|
4
|
+
|
|
5
|
+
const REQUIRED_PARAMS = []
|
|
6
|
+
|
|
7
|
+
export default class Generated extends Command {
|
|
8
|
+
static description = "Retrieves list of tickets (mail and chat channels) with filtering and pagination support. Returns tickets sorted by last message timestamp in descending order."
|
|
9
|
+
static aliases = []
|
|
10
|
+
static flags = {
|
|
11
|
+
"type": Flags.string({description: "Optional parameter"}),
|
|
12
|
+
"inbox_id": Flags.string({description: "Optional parameter"}),
|
|
13
|
+
"start_from": Flags.string({description: "Optional parameter"}),
|
|
14
|
+
"page_size": Flags.string({description: "Optional parameter"}),
|
|
15
|
+
"Content-type": Flags.string({description: 'Header value'}),
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
async run() {
|
|
19
|
+
const {flags} = await this.parse(Generated)
|
|
20
|
+
const params = {}
|
|
21
|
+
for (const [key, value] of Object.entries(flags)) {
|
|
22
|
+
if (value !== undefined) params[key] = value
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
const result = await executeCliCommand("msg91", "hello", "mail-ticket-list", params)
|
|
29
|
+
this.log(JSON.stringify(result, null, 2))
|
|
30
|
+
} catch (error) {
|
|
31
|
+
this.error(error.message)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {Command, Flags} from '@oclif/core'
|
|
2
|
+
import {executeCliCommand} from '../../../lib/http.js'
|
|
3
|
+
import {promptForMissingParams} from '../../../lib/prompt.js'
|
|
4
|
+
|
|
5
|
+
const REQUIRED_PARAMS = []
|
|
6
|
+
|
|
7
|
+
export default class Generated extends Command {
|
|
8
|
+
static description = "Open Ticket"
|
|
9
|
+
static aliases = []
|
|
10
|
+
static flags = {
|
|
11
|
+
"Authkey": Flags.string({description: 'Header value'}),
|
|
12
|
+
"Content-type": Flags.string({description: 'Header value'}),
|
|
13
|
+
"content-type": Flags.string({description: 'Header value'}),
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async run() {
|
|
17
|
+
const {flags} = await this.parse(Generated)
|
|
18
|
+
const params = {}
|
|
19
|
+
for (const [key, value] of Object.entries(flags)) {
|
|
20
|
+
if (value !== undefined) params[key] = value
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
const result = await executeCliCommand("msg91", "hello", "open-ticket", params)
|
|
27
|
+
this.log(JSON.stringify(result, null, 2))
|
|
28
|
+
} catch (error) {
|
|
29
|
+
this.error(error.message)
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {Command, Flags} from '@oclif/core'
|
|
2
|
+
import {executeCliCommand} from '../../../lib/http.js'
|
|
3
|
+
import {promptForMissingParams} from '../../../lib/prompt.js'
|
|
4
|
+
|
|
5
|
+
const REQUIRED_PARAMS = []
|
|
6
|
+
|
|
7
|
+
export default class Generated extends Command {
|
|
8
|
+
static description = "Get Saved Filter List by Agent ID"
|
|
9
|
+
static aliases = []
|
|
10
|
+
static flags = {
|
|
11
|
+
"agent_id": Flags.string({description: "Optional parameter"}),
|
|
12
|
+
"Authkey": Flags.string({description: 'Header value'}),
|
|
13
|
+
"Content-Type": Flags.string({description: 'Header value'}),
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async run() {
|
|
17
|
+
const {flags} = await this.parse(Generated)
|
|
18
|
+
const params = {}
|
|
19
|
+
for (const [key, value] of Object.entries(flags)) {
|
|
20
|
+
if (value !== undefined) params[key] = value
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
const result = await executeCliCommand("msg91", "hello", "saved-filter-list", params)
|
|
27
|
+
this.log(JSON.stringify(result, null, 2))
|
|
28
|
+
} catch (error) {
|
|
29
|
+
this.error(error.message)
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|