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,30 @@
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 = "OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the \"token\" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`."
9
+ static aliases = []
10
+ static flags = {
11
+ "0": Flags.string({description: "Required parameter"}),
12
+ }
13
+
14
+ async run() {
15
+ const {flags} = await this.parse(Generated)
16
+ const params = {}
17
+ for (const [key, value] of Object.entries(flags)) {
18
+ if (value !== undefined) params[key] = value
19
+ }
20
+
21
+ Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
22
+
23
+ try {
24
+ const result = await executeCliCommand("github", "apps", "reset-token", params)
25
+ this.log(JSON.stringify(result, null, 2))
26
+ } catch (error) {
27
+ this.error(error.message)
28
+ }
29
+ }
30
+ }
@@ -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 = ["0","1"]
6
+
7
+ export default class Generated extends Command {
8
+ static description = "**Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/).\n\nOAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password."
9
+ static aliases = []
10
+ static flags = {
11
+ "0": Flags.string({description: "Required parameter"}),
12
+ "1": Flags.string({description: "Required parameter"}),
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("github", "apps", "revoke-authorization-for-application", params)
26
+ this.log(JSON.stringify(result, null, 2))
27
+ } catch (error) {
28
+ this.error(error.message)
29
+ }
30
+ }
31
+ }
@@ -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 = ["0","1"]
6
+
7
+ export default class Generated extends Command {
8
+ static description = "**Deprecation Notice:** GitHub will discontinue OAuth endpoints that contain `access_token` in the path parameter. We have introduced new endpoints that allow you to securely manage tokens for OAuth Apps by moving `access_token` to the request body. For more information, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-app-endpoint/).\n\nOAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid token as `:access_token` and the grant for the token's owner will be deleted.\n\nDeleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the Applications settings page under \"Authorized OAuth Apps\" on GitHub](https://github.com/settings/applications#authorized)."
9
+ static aliases = []
10
+ static flags = {
11
+ "0": Flags.string({description: "Required parameter"}),
12
+ "1": Flags.string({description: "Required parameter"}),
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("github", "apps", "revoke-grant-for-application", params)
26
+ this.log(JSON.stringify(result, null, 2))
27
+ } catch (error) {
28
+ this.error(error.message)
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,30 @@
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 = "Revokes the installation token you're using to authenticate as an installation and access this endpoint.\n\nOnce an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the \"[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)\" endpoint.\n\nYou must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint."
9
+ static aliases = []
10
+ static flags = {
11
+
12
+ }
13
+
14
+ async run() {
15
+ const {flags} = await this.parse(Generated)
16
+ const params = {}
17
+ for (const [key, value] of Object.entries(flags)) {
18
+ if (value !== undefined) params[key] = value
19
+ }
20
+
21
+ Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
22
+
23
+ try {
24
+ const result = await executeCliCommand("github", "apps", "revoke-installation-access-token", params)
25
+ this.log(JSON.stringify(result, null, 2))
26
+ } catch (error) {
27
+ this.error(error.message)
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,30 @@
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 = "Use a non-scoped user-to-server access token to create a repository scoped and/or permission scoped user-to-server access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the `client_id` and `client_secret` of the GitHub App as the username and password. Invalid tokens will return `404 NOT FOUND`."
9
+ static aliases = []
10
+ static flags = {
11
+ "0": Flags.string({description: "Required parameter"}),
12
+ }
13
+
14
+ async run() {
15
+ const {flags} = await this.parse(Generated)
16
+ const params = {}
17
+ for (const [key, value] of Object.entries(flags)) {
18
+ if (value !== undefined) params[key] = value
19
+ }
20
+
21
+ Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
22
+
23
+ try {
24
+ const result = await executeCliCommand("github", "apps", "scope-token", params)
25
+ this.log(JSON.stringify(result, null, 2))
26
+ } catch (error) {
27
+ this.error(error.message)
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,30 @@
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 = "Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint."
9
+ static aliases = []
10
+ static flags = {
11
+ "0": Flags.string({description: "Required parameter"}),
12
+ }
13
+
14
+ async run() {
15
+ const {flags} = await this.parse(Generated)
16
+ const params = {}
17
+ for (const [key, value] of Object.entries(flags)) {
18
+ if (value !== undefined) params[key] = value
19
+ }
20
+
21
+ Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
22
+
23
+ try {
24
+ const result = await executeCliCommand("github", "apps", "suspend-installation", params)
25
+ this.log(JSON.stringify(result, null, 2))
26
+ } catch (error) {
27
+ this.error(error.message)
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,30 @@
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 = "Removes a GitHub App installation suspension.\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint."
9
+ static aliases = []
10
+ static flags = {
11
+ "0": Flags.string({description: "Required parameter"}),
12
+ }
13
+
14
+ async run() {
15
+ const {flags} = await this.parse(Generated)
16
+ const params = {}
17
+ for (const [key, value] of Object.entries(flags)) {
18
+ if (value !== undefined) params[key] = value
19
+ }
20
+
21
+ Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
22
+
23
+ try {
24
+ const result = await executeCliCommand("github", "apps", "unsuspend-installation", params)
25
+ this.log(JSON.stringify(result, null, 2))
26
+ } catch (error) {
27
+ this.error(error.message)
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,30 @@
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 = "Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see \"[Creating a GitHub App](/developers/apps/creating-a-github-app).\"\n\nYou must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint."
9
+ static aliases = []
10
+ static flags = {
11
+
12
+ }
13
+
14
+ async run() {
15
+ const {flags} = await this.parse(Generated)
16
+ const params = {}
17
+ for (const [key, value] of Object.entries(flags)) {
18
+ if (value !== undefined) params[key] = value
19
+ }
20
+
21
+ Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
22
+
23
+ try {
24
+ const result = await executeCliCommand("github", "apps", "update-webhook-config-for-app", params)
25
+ this.log(JSON.stringify(result, null, 2))
26
+ } catch (error) {
27
+ this.error(error.message)
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,30 @@
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 all supported GitHub API versions."
9
+ static aliases = []
10
+ static flags = {
11
+
12
+ }
13
+
14
+ async run() {
15
+ const {flags} = await this.parse(Generated)
16
+ const params = {}
17
+ for (const [key, value] of Object.entries(flags)) {
18
+ if (value !== undefined) params[key] = value
19
+ }
20
+
21
+ Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
22
+
23
+ try {
24
+ const result = await executeCliCommand("github", "meta", "get-all-versions", params)
25
+ this.log(JSON.stringify(result, null, 2))
26
+ } catch (error) {
27
+ this.error(error.message)
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,30 @@
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 the octocat as ASCII art"
9
+ static aliases = []
10
+ static flags = {
11
+ "s": Flags.string({description: "Optional parameter"}),
12
+ }
13
+
14
+ async run() {
15
+ const {flags} = await this.parse(Generated)
16
+ const params = {}
17
+ for (const [key, value] of Object.entries(flags)) {
18
+ if (value !== undefined) params[key] = value
19
+ }
20
+
21
+ Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
22
+
23
+ try {
24
+ const result = await executeCliCommand("github", "meta", "get-octocat", params)
25
+ this.log(JSON.stringify(result, null, 2))
26
+ } catch (error) {
27
+ this.error(error.message)
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,30 @@
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 a random sentence from the Zen of GitHub"
9
+ static aliases = []
10
+ static flags = {
11
+
12
+ }
13
+
14
+ async run() {
15
+ const {flags} = await this.parse(Generated)
16
+ const params = {}
17
+ for (const [key, value] of Object.entries(flags)) {
18
+ if (value !== undefined) params[key] = value
19
+ }
20
+
21
+ Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
22
+
23
+ try {
24
+ const result = await executeCliCommand("github", "meta", "get-zen", params)
25
+ this.log(JSON.stringify(result, null, 2))
26
+ } catch (error) {
27
+ this.error(error.message)
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,30 @@
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 = "Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see \"[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/).\"\n\n**Note:** This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported.\n\n**Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses."
9
+ static aliases = []
10
+ static flags = {
11
+
12
+ }
13
+
14
+ async run() {
15
+ const {flags} = await this.parse(Generated)
16
+ const params = {}
17
+ for (const [key, value] of Object.entries(flags)) {
18
+ if (value !== undefined) params[key] = value
19
+ }
20
+
21
+ Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
22
+
23
+ try {
24
+ const result = await executeCliCommand("github", "meta", "get", params)
25
+ this.log(JSON.stringify(result, null, 2))
26
+ } catch (error) {
27
+ this.error(error.message)
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,30 @@
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 Hypermedia links to resources accessible in GitHub's REST API"
9
+ static aliases = []
10
+ static flags = {
11
+
12
+ }
13
+
14
+ async run() {
15
+ const {flags} = await this.parse(Generated)
16
+ const params = {}
17
+ for (const [key, value] of Object.entries(flags)) {
18
+ if (value !== undefined) params[key] = value
19
+ }
20
+
21
+ Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
22
+
23
+ try {
24
+ const result = await executeCliCommand("github", "meta", "root", params)
25
+ this.log(JSON.stringify(result, null, 2))
26
+ } catch (error) {
27
+ this.error(error.message)
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,30 @@
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 = "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).\n\n**Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).\n\nCreates OAuth tokens using [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see \"[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication).\"\n\nTo create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them.\n\nYou can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://help.github.com/articles/creating-an-access-token-for-command-line-use).\n\nOrganizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://help.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on)."
9
+ static aliases = []
10
+ static flags = {
11
+
12
+ }
13
+
14
+ async run() {
15
+ const {flags} = await this.parse(Generated)
16
+ const params = {}
17
+ for (const [key, value] of Object.entries(flags)) {
18
+ if (value !== undefined) params[key] = value
19
+ }
20
+
21
+ Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
22
+
23
+ try {
24
+ const result = await executeCliCommand("github", "oauth-authorizations", "create-authorization", params)
25
+ this.log(JSON.stringify(result, null, 2))
26
+ } catch (error) {
27
+ this.error(error.message)
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,30 @@
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 = "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/)."
9
+ static aliases = []
10
+ static flags = {
11
+ "0": Flags.string({description: "Required parameter"}),
12
+ }
13
+
14
+ async run() {
15
+ const {flags} = await this.parse(Generated)
16
+ const params = {}
17
+ for (const [key, value] of Object.entries(flags)) {
18
+ if (value !== undefined) params[key] = value
19
+ }
20
+
21
+ Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
22
+
23
+ try {
24
+ const result = await executeCliCommand("github", "oauth-authorizations", "delete-authorization", params)
25
+ this.log(JSON.stringify(result, null, 2))
26
+ } catch (error) {
27
+ this.error(error.message)
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,30 @@
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 = "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).\n\nDeleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized)."
9
+ static aliases = []
10
+ static flags = {
11
+ "0": Flags.string({description: "Required parameter"}),
12
+ }
13
+
14
+ async run() {
15
+ const {flags} = await this.parse(Generated)
16
+ const params = {}
17
+ for (const [key, value] of Object.entries(flags)) {
18
+ if (value !== undefined) params[key] = value
19
+ }
20
+
21
+ Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
22
+
23
+ try {
24
+ const result = await executeCliCommand("github", "oauth-authorizations", "delete-grant", params)
25
+ this.log(JSON.stringify(result, null, 2))
26
+ } catch (error) {
27
+ this.error(error.message)
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,30 @@
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 = "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/)."
9
+ static aliases = []
10
+ static flags = {
11
+ "0": Flags.string({description: "Required parameter"}),
12
+ }
13
+
14
+ async run() {
15
+ const {flags} = await this.parse(Generated)
16
+ const params = {}
17
+ for (const [key, value] of Object.entries(flags)) {
18
+ if (value !== undefined) params[key] = value
19
+ }
20
+
21
+ Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
22
+
23
+ try {
24
+ const result = await executeCliCommand("github", "oauth-authorizations", "get-authorization", params)
25
+ this.log(JSON.stringify(result, null, 2))
26
+ } catch (error) {
27
+ this.error(error.message)
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,30 @@
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 = "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/)."
9
+ static aliases = []
10
+ static flags = {
11
+ "0": Flags.string({description: "Required parameter"}),
12
+ }
13
+
14
+ async run() {
15
+ const {flags} = await this.parse(Generated)
16
+ const params = {}
17
+ for (const [key, value] of Object.entries(flags)) {
18
+ if (value !== undefined) params[key] = value
19
+ }
20
+
21
+ Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
22
+
23
+ try {
24
+ const result = await executeCliCommand("github", "oauth-authorizations", "get-grant", params)
25
+ this.log(JSON.stringify(result, null, 2))
26
+ } catch (error) {
27
+ this.error(error.message)
28
+ }
29
+ }
30
+ }
@@ -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 = ["0","1"]
6
+
7
+ export default class Generated extends Command {
8
+ static description = "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).\n\n**Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).\n\nThis method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.\n\nIf you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see \"[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication).\""
9
+ static aliases = []
10
+ static flags = {
11
+ "0": Flags.string({description: "Required parameter"}),
12
+ "1": Flags.string({description: "Required parameter"}),
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("github", "oauth-authorizations", "get-or-create-authorization-for-app-and-fingerprint", params)
26
+ this.log(JSON.stringify(result, null, 2))
27
+ } catch (error) {
28
+ this.error(error.message)
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,30 @@
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 = "**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).\n\n**Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api).\n\nCreates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one.\n\nIf you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see \"[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication).\"\n\n**Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/)."
9
+ static aliases = []
10
+ static flags = {
11
+ "0": Flags.string({description: "Required parameter"}),
12
+ }
13
+
14
+ async run() {
15
+ const {flags} = await this.parse(Generated)
16
+ const params = {}
17
+ for (const [key, value] of Object.entries(flags)) {
18
+ if (value !== undefined) params[key] = value
19
+ }
20
+
21
+ Object.assign(params, await promptForMissingParams(REQUIRED_PARAMS, params))
22
+
23
+ try {
24
+ const result = await executeCliCommand("github", "oauth-authorizations", "get-or-create-authorization-for-app", params)
25
+ this.log(JSON.stringify(result, null, 2))
26
+ } catch (error) {
27
+ this.error(error.message)
28
+ }
29
+ }
30
+ }