docstar-cli 1.2.1 → 1.4.0

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 (125) hide show
  1. package/README.md +7 -7
  2. package/dist/commands/api-test/whatsapp/send-message.js +35 -0
  3. package/dist/commands/config/get.d.ts +10 -0
  4. package/dist/commands/config/get.js +43 -0
  5. package/dist/commands/config/set.d.ts +11 -0
  6. package/dist/commands/config/set.js +33 -0
  7. package/dist/commands/dump-test/parent-page/collection.js +33 -0
  8. package/dist/commands/github/apps/add-repo-to-installation-for-authenticated-user.js +31 -0
  9. package/dist/commands/github/apps/check-authorization.js +31 -0
  10. package/dist/commands/github/apps/check-token.js +30 -0
  11. package/dist/commands/github/apps/create-content-attachment.js +30 -0
  12. package/dist/commands/github/apps/create-from-manifest.js +30 -0
  13. package/dist/commands/github/apps/create-installation-access-token.js +30 -0
  14. package/dist/commands/github/apps/delete-authorization.js +30 -0
  15. package/dist/commands/github/apps/delete-installation.js +30 -0
  16. package/dist/commands/github/apps/delete-token.js +30 -0
  17. package/dist/commands/github/apps/get-authenticated.js +30 -0
  18. package/dist/commands/github/apps/get-by-slug.js +30 -0
  19. package/dist/commands/github/apps/get-installation.js +30 -0
  20. package/dist/commands/github/apps/get-org-installation.js +30 -0
  21. package/dist/commands/github/apps/get-repo-installation.js +31 -0
  22. package/dist/commands/github/apps/get-subscription-plan-for-account-stubbed.js +30 -0
  23. package/dist/commands/github/apps/get-subscription-plan-for-account.js +30 -0
  24. package/dist/commands/github/apps/get-user-installation.js +30 -0
  25. package/dist/commands/github/apps/get-webhook-config-for-app.js +30 -0
  26. package/dist/commands/github/apps/get-webhook-delivery.js +30 -0
  27. package/dist/commands/github/apps/list-accounts-for-plan-stubbed.js +34 -0
  28. package/dist/commands/github/apps/list-accounts-for-plan.js +34 -0
  29. package/dist/commands/github/apps/list-installation-repos-for-authenticated-user.js +32 -0
  30. package/dist/commands/github/apps/list-installations-for-authenticated-user.js +31 -0
  31. package/dist/commands/github/apps/list-installations.js +33 -0
  32. package/dist/commands/github/apps/list-plans-stubbed.js +31 -0
  33. package/dist/commands/github/apps/list-plans.js +31 -0
  34. package/dist/commands/github/apps/list-repos-accessible-to-installation.js +31 -0
  35. package/dist/commands/github/apps/list-subscriptions-for-authenticated-user-stubbed.js +31 -0
  36. package/dist/commands/github/apps/list-subscriptions-for-authenticated-user.js +31 -0
  37. package/dist/commands/github/apps/list-webhook-deliveries.js +32 -0
  38. package/dist/commands/github/apps/redeliver-webhook-delivery.js +30 -0
  39. package/dist/commands/github/apps/remove-repo-from-installation-for-authenticated-user.js +31 -0
  40. package/dist/commands/github/apps/reset-authorization.js +31 -0
  41. package/dist/commands/github/apps/reset-token.js +30 -0
  42. package/dist/commands/github/apps/revoke-authorization-for-application.js +31 -0
  43. package/dist/commands/github/apps/revoke-grant-for-application.js +31 -0
  44. package/dist/commands/github/apps/revoke-installation-access-token.js +30 -0
  45. package/dist/commands/github/apps/scope-token.js +30 -0
  46. package/dist/commands/github/apps/suspend-installation.js +30 -0
  47. package/dist/commands/github/apps/unsuspend-installation.js +30 -0
  48. package/dist/commands/github/apps/update-webhook-config-for-app.js +30 -0
  49. package/dist/commands/github/meta/get-all-versions.js +30 -0
  50. package/dist/commands/github/meta/get-octocat.js +30 -0
  51. package/dist/commands/github/meta/get-zen.js +30 -0
  52. package/dist/commands/github/meta/get.js +30 -0
  53. package/dist/commands/github/meta/root.js +30 -0
  54. package/dist/commands/github/oauth-authorizations/create-authorization.js +30 -0
  55. package/dist/commands/github/oauth-authorizations/delete-authorization.js +30 -0
  56. package/dist/commands/github/oauth-authorizations/delete-grant.js +30 -0
  57. package/dist/commands/github/oauth-authorizations/get-authorization.js +30 -0
  58. package/dist/commands/github/oauth-authorizations/get-grant.js +30 -0
  59. package/dist/commands/github/oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint.js +31 -0
  60. package/dist/commands/github/oauth-authorizations/get-or-create-authorization-for-app.js +30 -0
  61. package/dist/commands/github/oauth-authorizations/list-authorizations.js +32 -0
  62. package/dist/commands/github/oauth-authorizations/list-grants.js +32 -0
  63. package/dist/commands/github/oauth-authorizations/update-authorization.js +30 -0
  64. package/dist/commands/msg91/hello/assign-ticket.js +40 -0
  65. package/dist/commands/msg91/hello/bot-analytics.js +33 -0
  66. package/dist/commands/msg91/hello/close-all-ticket-by-filter-id.js +35 -0
  67. package/dist/commands/msg91/hello/close-all-ticket.js +37 -0
  68. package/dist/commands/msg91/hello/create-draft-email.js +35 -0
  69. package/dist/commands/msg91/hello/create-update.js +35 -0
  70. package/dist/commands/msg91/hello/delete-draft-email.js +33 -0
  71. package/dist/commands/msg91/hello/delete-draft.js +33 -0
  72. package/dist/commands/msg91/hello/email-inbox-list-1.js +36 -0
  73. package/dist/commands/msg91/hello/get-agent-team-bot.js +38 -0
  74. package/dist/commands/msg91/hello/get-draft.js +34 -0
  75. package/dist/commands/msg91/hello/get-save-filter-list-by-filter-id.js +31 -0
  76. package/dist/commands/msg91/hello/get-tickets.js +37 -0
  77. package/dist/commands/msg91/hello/hello-mail-send-api.js +38 -0
  78. package/dist/commands/msg91/hello/hello-mail-send.js +37 -0
  79. package/dist/commands/msg91/hello/mail-ticket-list.js +34 -0
  80. package/dist/commands/msg91/hello/open-ticket.js +32 -0
  81. package/dist/commands/msg91/hello/saved-filter-list.js +32 -0
  82. package/dist/commands/msg91/hello/statechangeapi.js +34 -0
  83. package/dist/commands/msg91/hello/update-draft-email.js +36 -0
  84. package/dist/commands/msg91/hello/update-draft-whatsapp.js +36 -0
  85. package/dist/commands/msg91/sms/add-flow.js +32 -0
  86. package/dist/commands/msg91/sms/add-template-version.js +32 -0
  87. package/dist/commands/msg91/sms/get-template-versions.js +33 -0
  88. package/dist/commands/msg91/sms/mark-default.js +33 -0
  89. package/dist/commands/msg91/sms/send-sms.js +37 -0
  90. package/dist/commands/msg91/sms/sms-analytics.js +33 -0
  91. package/dist/commands/msg91/sms/sms-logs.js +36 -0
  92. package/dist/commands/msg91/whatsapp/approve-join-requests.js +33 -0
  93. package/dist/commands/msg91/whatsapp/check-whatsapp-prepaid-balance.js +34 -0
  94. package/dist/commands/msg91/whatsapp/create-group.js +35 -0
  95. package/dist/commands/msg91/whatsapp/create-whatsapp-template.js +37 -0
  96. package/dist/commands/msg91/whatsapp/delete-group.js +32 -0
  97. package/dist/commands/msg91/whatsapp/delete-template.js +33 -0
  98. package/dist/commands/msg91/whatsapp/edit-template-1.js +35 -0
  99. package/dist/commands/msg91/whatsapp/edit-template.js +35 -0
  100. package/dist/commands/msg91/whatsapp/get-group-by-id.js +33 -0
  101. package/dist/commands/msg91/whatsapp/get-group-by-number.js +33 -0
  102. package/dist/commands/msg91/whatsapp/get-joinee-request.js +32 -0
  103. package/dist/commands/msg91/whatsapp/get-templates.js +39 -0
  104. package/dist/commands/msg91/whatsapp/interactive-wa-send-location.js +35 -0
  105. package/dist/commands/msg91/whatsapp/interactive-whatsapp-buttons.js +36 -0
  106. package/dist/commands/msg91/whatsapp/interactive-whatsapp-list.js +36 -0
  107. package/dist/commands/msg91/whatsapp/multiple-product-catalog.js +36 -0
  108. package/dist/commands/msg91/whatsapp/reject-join-requests-1.js +33 -0
  109. package/dist/commands/msg91/whatsapp/remove-participants.js +33 -0
  110. package/dist/commands/msg91/whatsapp/reset-group-invite-link-1.js +33 -0
  111. package/dist/commands/msg91/whatsapp/send-message-in-text.js +36 -0
  112. package/dist/commands/msg91/whatsapp/send-message-on-group.js +36 -0
  113. package/dist/commands/msg91/whatsapp/send-payment-link-via-whatsapp-payments.js +37 -0
  114. package/dist/commands/msg91/whatsapp/single-product-catalog.js +36 -0
  115. package/dist/commands/msg91/whatsapp/template-bulk.js +35 -0
  116. package/dist/commands/msg91/whatsapp/to-fetch-whatsapp-number.js +32 -0
  117. package/dist/commands/msg91/whatsapp/whatsapp-analytics.js +33 -0
  118. package/dist/commands/msg91/whatsapp/whatsapp-logs.js +36 -0
  119. package/dist/commands/msg91/whatsapp/whatsapp-voice-call.js +34 -0
  120. package/dist/commands/reqres/project/get-all-project.js +32 -0
  121. package/dist/lib/codegen.js +10 -0
  122. package/dist/lib/http.js +27 -4
  123. package/dist/lib/types.d.ts +1 -0
  124. package/package.json +4 -7
  125. package/oclif.manifest.json +0 -208
@@ -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 = ["integrated_number","components","button_url"]
6
+
7
+ export default class Generated extends Command {
8
+ static description = "Edit Template"
9
+ static aliases = []
10
+ static flags = {
11
+ "integrated_number": Flags.string({description: "Required parameter"}),
12
+ "components": Flags.string({description: "Required parameter"}),
13
+ "button_url": Flags.string({description: "Required parameter"}),
14
+ "Content-Type": Flags.string({description: 'Header value'}),
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", "whatsapp", "edit-template-1", 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 = ["integrated_number","backup_templates","update_only_backup"]
6
+
7
+ export default class Generated extends Command {
8
+ static description = "Edit Template"
9
+ static aliases = []
10
+ static flags = {
11
+ "integrated_number": Flags.string({description: "Required parameter"}),
12
+ "backup_templates": Flags.string({description: "Required parameter"}),
13
+ "update_only_backup": Flags.string({description: "Required parameter"}),
14
+ "Content-Type": Flags.string({description: 'Header value'}),
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", "whatsapp", "edit-template", 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 = []
6
+
7
+ export default class Generated extends Command {
8
+ static description = "Get Group by ID"
9
+ static aliases = []
10
+ static flags = {
11
+ "integrated_number": Flags.string({description: "Optional parameter"}),
12
+ "timezone": Flags.string({description: "Optional parameter"}),
13
+ "authkey": Flags.string({description: 'Header value'}),
14
+ "content-type": 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", "whatsapp", "get-group-by-id", 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 = []
6
+
7
+ export default class Generated extends Command {
8
+ static description = "Get Group by Number"
9
+ static aliases = []
10
+ static flags = {
11
+ "integrated_number": Flags.string({description: "Optional parameter"}),
12
+ "timezone": Flags.string({description: "Optional parameter"}),
13
+ "authkey": Flags.string({description: 'Header value'}),
14
+ "content-type": 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", "whatsapp", "get-group-by-number", params)
28
+ this.log(JSON.stringify(result, null, 2))
29
+ } catch (error) {
30
+ this.error(error.message)
31
+ }
32
+ }
33
+ }
@@ -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 Join Request"
9
+ static aliases = []
10
+ static flags = {
11
+ "integrated_number": Flags.string({description: "Optional parameter"}),
12
+ "timezone": Flags.string({description: "Optional parameter"}),
13
+ "authkey": Flags.string({description: "Optional parameter"}),
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", "whatsapp", "get-joinee-request", params)
27
+ this.log(JSON.stringify(result, null, 2))
28
+ } catch (error) {
29
+ this.error(error.message)
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,39 @@
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 will return maximum of 500 templates only."
9
+ static aliases = []
10
+ static flags = {
11
+ "0": Flags.string({description: "Required parameter"}),
12
+ "template_name": Flags.string({description: "Optional parameter"}),
13
+ "template_status": Flags.string({description: "Optional parameter"}),
14
+ "template_language": Flags.string({description: "Optional parameter"}),
15
+ "pagination": Flags.string({description: "Optional parameter"}),
16
+ "page_size": Flags.string({description: "Optional parameter"}),
17
+ "page_num": Flags.string({description: "Optional parameter"}),
18
+ "accept": Flags.string({description: 'Header value'}),
19
+ "authkey": Flags.string({description: 'Header value'}),
20
+ "content-type": Flags.string({description: 'Header value'}),
21
+ }
22
+
23
+ async run() {
24
+ const {flags} = await this.parse(Generated)
25
+ const params = {}
26
+ for (const [key, value] of Object.entries(flags)) {
27
+ if (value !== undefined) params[key] = value
28
+ }
29
+
30
+ Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
31
+
32
+ try {
33
+ const result = await executeCliCommand("msg91", "whatsapp", "get-templates", params)
34
+ this.log(JSON.stringify(result, null, 2))
35
+ } catch (error) {
36
+ this.error(error.message)
37
+ }
38
+ }
39
+ }
@@ -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 = ["recipient_number","integrated_number","content_type","interactive"]
6
+
7
+ export default class Generated extends Command {
8
+ static description = "Interactive Wa Send Location"
9
+ static aliases = []
10
+ static flags = {
11
+ "recipient_number": Flags.string({description: "Required parameter"}),
12
+ "integrated_number": Flags.string({description: "Required parameter"}),
13
+ "content_type": Flags.string({description: "Required parameter"}),
14
+ "interactive": 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", "whatsapp", "interactive-wa-send-location", params)
30
+ this.log(JSON.stringify(result, null, 2))
31
+ } catch (error) {
32
+ this.error(error.message)
33
+ }
34
+ }
35
+ }
@@ -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 = ["recipient_number","integrated_number","content_type","interactive"]
6
+
7
+ export default class Generated extends Command {
8
+ static description = "Interactive Wa With Buttons"
9
+ static aliases = []
10
+ static flags = {
11
+ "recipient_number": Flags.string({description: "Required parameter"}),
12
+ "integrated_number": Flags.string({description: "Required parameter"}),
13
+ "content_type": Flags.string({description: "Required parameter"}),
14
+ "interactive": Flags.string({description: "Required parameter"}),
15
+ "authkey": Flags.string({description: 'Header value'}),
16
+ "content-type": Flags.string({description: 'Header value'}),
17
+ "accept": 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", "whatsapp", "interactive-whatsapp-buttons", params)
31
+ this.log(JSON.stringify(result, null, 2))
32
+ } catch (error) {
33
+ this.error(error.message)
34
+ }
35
+ }
36
+ }
@@ -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 = ["recipient_number","integrated_number","content_type","interactive"]
6
+
7
+ export default class Generated extends Command {
8
+ static description = "Interactive Wa With List"
9
+ static aliases = []
10
+ static flags = {
11
+ "recipient_number": Flags.string({description: "Required parameter"}),
12
+ "integrated_number": Flags.string({description: "Required parameter"}),
13
+ "content_type": Flags.string({description: "Required parameter"}),
14
+ "interactive": Flags.string({description: "Required parameter"}),
15
+ "content-type": Flags.string({description: 'Header value'}),
16
+ "authkey": Flags.string({description: 'Header value'}),
17
+ "accept": 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", "whatsapp", "interactive-whatsapp-list", params)
31
+ this.log(JSON.stringify(result, null, 2))
32
+ } catch (error) {
33
+ this.error(error.message)
34
+ }
35
+ }
36
+ }
@@ -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 = ["recipient_number","integrated_number","content_type","interactive"]
6
+
7
+ export default class Generated extends Command {
8
+ static description = "Multiple Product Catalog"
9
+ static aliases = []
10
+ static flags = {
11
+ "recipient_number": Flags.string({description: "Required parameter"}),
12
+ "integrated_number": Flags.string({description: "Required parameter"}),
13
+ "content_type": Flags.string({description: "Required parameter"}),
14
+ "interactive": Flags.string({description: "Required parameter"}),
15
+ "content-type": Flags.string({description: 'Header value'}),
16
+ "authkey": Flags.string({description: 'Header value'}),
17
+ "accept": 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", "whatsapp", "multiple-product-catalog", params)
31
+ this.log(JSON.stringify(result, null, 2))
32
+ } catch (error) {
33
+ this.error(error.message)
34
+ }
35
+ }
36
+ }
@@ -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 = ["integrated_number","join_requests"]
6
+
7
+ export default class Generated extends Command {
8
+ static description = "Reject Join Requests"
9
+ static aliases = []
10
+ static flags = {
11
+ "integrated_number": Flags.string({description: "Required parameter"}),
12
+ "join_requests": 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", "whatsapp", "reject-join-requests-1", 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 = ["integrated_number","remove_participants"]
6
+
7
+ export default class Generated extends Command {
8
+ static description = "Remove participants"
9
+ static aliases = []
10
+ static flags = {
11
+ "integrated_number": Flags.string({description: "Required parameter"}),
12
+ "remove_participants": 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", "whatsapp", "remove-participants", 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 = []
6
+
7
+ export default class Generated extends Command {
8
+ static description = "Reset Group Invite Link"
9
+ static aliases = []
10
+ static flags = {
11
+ "reset_group_link": Flags.string({description: "Optional parameter"}),
12
+ "integrated_number": Flags.string({description: "Optional parameter"}),
13
+ "authkey": Flags.string({description: 'Header value'}),
14
+ "content_type": 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", "whatsapp", "reset-group-invite-link-1", 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 = "Send Message (once Session Started)"
9
+ static aliases = []
10
+ static flags = {
11
+ "integrated_number": Flags.string({description: "Optional parameter"}),
12
+ "recipient_number": Flags.string({description: "Optional parameter"}),
13
+ "content_type": Flags.string({description: "Optional parameter"}),
14
+ "text": Flags.string({description: "Optional parameter"}),
15
+ "authkey": Flags.string({description: 'Header value'}),
16
+ "accept": 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", "whatsapp", "send-message-in-text", params)
31
+ this.log(JSON.stringify(result, null, 2))
32
+ } catch (error) {
33
+ this.error(error.message)
34
+ }
35
+ }
36
+ }
@@ -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 = ["integrated_number","recipient_number","content_type","text","recipient_type"]
6
+
7
+ export default class Generated extends Command {
8
+ static description = "Send Message on Group"
9
+ static aliases = []
10
+ static flags = {
11
+ "integrated_number": Flags.string({description: "Required parameter"}),
12
+ "recipient_number": Flags.string({description: "Required parameter"}),
13
+ "content_type": Flags.string({description: "Required parameter"}),
14
+ "text": Flags.string({description: "Required parameter"}),
15
+ "recipient_type": Flags.string({description: "Required parameter"}),
16
+ "content-type": Flags.string({description: 'Header value'}),
17
+ "authkey": 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", "whatsapp", "send-message-on-group", params)
31
+ this.log(JSON.stringify(result, null, 2))
32
+ } catch (error) {
33
+ this.error(error.message)
34
+ }
35
+ }
36
+ }
@@ -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 = ["recipient_number","integrated_number","content_type","interactive"]
6
+
7
+ export default class Generated extends Command {
8
+ static description = "Send Payment link via Whatsapp Payments"
9
+ static aliases = []
10
+ static flags = {
11
+ "recipient_number": Flags.string({description: "Required parameter"}),
12
+ "integrated_number": Flags.string({description: "Required parameter"}),
13
+ "content_type": Flags.string({description: "Required parameter"}),
14
+ "interactive": Flags.string({description: "Required parameter"}),
15
+ "accept": Flags.string({description: 'Header value'}),
16
+ "Content-Type": Flags.string({description: 'Header value'}),
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", "whatsapp", "send-payment-link-via-whatsapp-payments", params)
32
+ this.log(JSON.stringify(result, null, 2))
33
+ } catch (error) {
34
+ this.error(error.message)
35
+ }
36
+ }
37
+ }
@@ -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 = ["recipient_number","integrated_number","content_type","interactive"]
6
+
7
+ export default class Generated extends Command {
8
+ static description = "Single Product Catalog"
9
+ static aliases = []
10
+ static flags = {
11
+ "recipient_number": Flags.string({description: "Required parameter"}),
12
+ "integrated_number": Flags.string({description: "Required parameter"}),
13
+ "content_type": Flags.string({description: "Required parameter"}),
14
+ "interactive": Flags.string({description: "Required parameter"}),
15
+ "authkey": Flags.string({description: 'Header value'}),
16
+ "content-type": Flags.string({description: 'Header value'}),
17
+ "accept": 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", "whatsapp", "single-product-catalog", params)
31
+ this.log(JSON.stringify(result, null, 2))
32
+ } catch (error) {
33
+ this.error(error.message)
34
+ }
35
+ }
36
+ }
@@ -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 = ["integrated_number","content_type","payload"]
6
+
7
+ export default class Generated extends Command {
8
+ static description = "Send WhatsApp Template"
9
+ static aliases = []
10
+ static flags = {
11
+ "integrated_number": Flags.string({description: "Required parameter"}),
12
+ "content_type": Flags.string({description: "Required parameter"}),
13
+ "payload": Flags.string({description: "Required parameter"}),
14
+ "authkey": Flags.string({description: 'Header value'}),
15
+ "content-type": Flags.string({description: 'Header value'}),
16
+ "accept": 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", "whatsapp", "template-bulk", params)
30
+ this.log(JSON.stringify(result, null, 2))
31
+ } catch (error) {
32
+ this.error(error.message)
33
+ }
34
+ }
35
+ }