@great-detail/support-cli 0.2.2 → 0.3.0-next-20260312135910
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +2 -1
- package/dist/cli.js.map +1 -0
- package/package.json +5 -4
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
2
|
+
import{Client as e}from"@great-detail/support-sdk";import{Command as t}from"commander";function n({client:e}){let n=new t(`actions`).description(`Actions`);return n.addCommand(new t(`list`).description(`List actions`).action(async()=>{let t=await e.action.list().json();console.log(t)})),n}function r({client:e}){let n=new t(`channels`).description(`Channels`);return n.addCommand(new t(`list`).description(`List channels`).action(async()=>{let t=await e.channel.list().json();console.log(t)})),n}function i({client:e}){let n=new t(`contacts`).description(`Contacts`);return n.addCommand(new t(`get`).description(`Find contact`).argument(`<contact>`,`Contact ID`).action(async t=>{let n=await e.contact.get(t).json();console.log(n)})),n.addCommand(new t(`list`).description(`List contacts`).action(async()=>{let t=await e.contact.list().json();console.log(t)})),n.addCommand(new t(`get-vcf`).description(`Export Contact as VCF`).argument(`<contact>`,`Contact ID`).action(async t=>{let n=await e.contact.getVCF(t).response();console.log(n)})),n}function a({client:e}){let n=new t(`conversations`).description(`Conversations`);return n.addCommand(new t(`get`).description(`Find conversation`).argument(`<conversation>`,`Conversation ID`).action(async t=>{let n=await e.conversation.get(t).json();console.log(n)})),n.addCommand(new t(`list`).description(`List conversations`).action(async()=>{let t=await e.conversation.list().json();console.log(t)})),n}function o({client:e}){let n=new t(`labels`).description(`Labels`);return n.addCommand(new t(`get`).description(`Find label`).argument(`<label>`,`Label ID`).action(async t=>{let n=await e.label.get(t).json();console.log(n)})),n.addCommand(new t(`list`).description(`List labels`).action(async()=>{let t=await e.label.list().json();console.log(t)})),n}function s({client:e}){let n=new t(`messages`).description(`Messages`);return n.addCommand(new t(`list`).description(`List messages`).action(async()=>{let t=await e.message.list().json();console.log(t)})),n}function c({client:e}){let n=new t(`sources`).description(`Sources`);return n.addCommand(new t(`get`).description(`Find source`).argument(`<source>`,`Source ID`).action(async t=>{let n=await e.source.get(t).json();console.log(n)})),n.addCommand(new t(`list`).description(`List sources`).action(async()=>{let t=await e.source.list().json();console.log(t)})),n}const l={client:new e(new e.PublicAuthentication)};new t(`gds`).description(`Great Detail Support System`).addCommand(n(l)).addCommand(r(l)).addCommand(i(l)).addCommand(a(l)).addCommand(o(l)).addCommand(s(l)).addCommand(c(l)).parseAsync(process.argv);export{};
|
|
3
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","names":[],"sources":["../src/actions.ts","../src/channels.ts","../src/contacts.ts","../src/conversations.ts","../src/labels.ts","../src/messages.ts","../src/sources.ts","../src/index.ts","../src/entrypoint/cli.ts"],"sourcesContent":["/**\n * Great Detail Support System.\n *\n * @copyright 2026 Great Detail Ltd\n * @author Great Detail Ltd <info@greatdetail.com>\n * @author Dom Webber <dom.webber@greatdetail.com>\n * @see https://greatdetail.com\n */\n\nimport { Command } from \"commander\";\nimport type { Options as CommandOptions } from \"./index.js\";\n\nexport type Options = CommandOptions;\n\nexport default function actions({ client }: Options) {\n const command = new Command(\"actions\").description(\"Actions\");\n\n command.addCommand(\n new Command(\"list\").description(\"List actions\").action(async () => {\n const result = await client.action.list().json();\n console.log(result);\n }),\n );\n\n return command;\n}\n","/**\n * Great Detail Support System.\n *\n * @copyright 2026 Great Detail Ltd\n * @author Great Detail Ltd <info@greatdetail.com>\n * @author Dom Webber <dom.webber@greatdetail.com>\n * @see https://greatdetail.com\n */\n\nimport { Command } from \"commander\";\nimport type { Options as CommandOptions } from \"./index.js\";\n\nexport type Options = CommandOptions;\n\nexport default function channels({ client }: Options) {\n const command = new Command(\"channels\").description(\"Channels\");\n\n command.addCommand(\n new Command(\"list\").description(\"List channels\").action(async () => {\n const result = await client.channel.list().json();\n console.log(result);\n }),\n );\n\n return command;\n}\n","/**\n * Great Detail Support System.\n *\n * @copyright 2026 Great Detail Ltd\n * @author Great Detail Ltd <info@greatdetail.com>\n * @author Dom Webber <dom.webber@greatdetail.com>\n * @see https://greatdetail.com\n */\n\nimport { Command } from \"commander\";\nimport type { Options as CommandOptions } from \"./index.js\";\n\nexport type Options = CommandOptions;\n\nexport default function contacts({ client }: Options) {\n const command = new Command(\"contacts\").description(\"Contacts\");\n\n command.addCommand(\n new Command(\"get\")\n .description(\"Find contact\")\n .argument(\"<contact>\", \"Contact ID\")\n .action(async (id) => {\n const result = await client.contact.get(id).json();\n console.log(result);\n }),\n );\n\n command.addCommand(\n new Command(\"list\").description(\"List contacts\").action(async () => {\n const result = await client.contact.list().json();\n console.log(result);\n }),\n );\n\n command.addCommand(\n new Command(\"get-vcf\")\n .description(\"Export Contact as VCF\")\n .argument(\"<contact>\", \"Contact ID\")\n .action(async (id) => {\n const result = await client.contact.getVCF(id).response();\n console.log(result);\n }),\n );\n\n return command;\n}\n","/**\n * Great Detail Support System.\n *\n * @copyright 2026 Great Detail Ltd\n * @author Great Detail Ltd <info@greatdetail.com>\n * @author Dom Webber <dom.webber@greatdetail.com>\n * @see https://greatdetail.com\n */\n\nimport { Command } from \"commander\";\nimport type { Options as CommandOptions } from \"./index.js\";\n\nexport type Options = CommandOptions;\n\nexport default function conversations({ client }: Options) {\n const command = new Command(\"conversations\").description(\"Conversations\");\n\n command.addCommand(\n new Command(\"get\")\n .description(\"Find conversation\")\n .argument(\"<conversation>\", \"Conversation ID\")\n .action(async (id) => {\n const result = await client.conversation.get(id).json();\n console.log(result);\n }),\n );\n\n command.addCommand(\n new Command(\"list\").description(\"List conversations\").action(async () => {\n const result = await client.conversation.list().json();\n console.log(result);\n }),\n );\n\n return command;\n}\n","/**\n * Great Detail Support System.\n *\n * @copyright 2026 Great Detail Ltd\n * @author Great Detail Ltd <info@greatdetail.com>\n * @author Dom Webber <dom.webber@greatdetail.com>\n * @see https://greatdetail.com\n */\n\nimport { Command } from \"commander\";\nimport type { Options as CommandOptions } from \"./index.js\";\n\nexport type Options = CommandOptions;\n\nexport default function labels({ client }: Options) {\n const command = new Command(\"labels\").description(\"Labels\");\n\n command.addCommand(\n new Command(\"get\")\n .description(\"Find label\")\n .argument(\"<label>\", \"Label ID\")\n .action(async (id) => {\n const result = await client.label.get(id).json();\n console.log(result);\n }),\n );\n\n command.addCommand(\n new Command(\"list\").description(\"List labels\").action(async () => {\n const result = await client.label.list().json();\n console.log(result);\n }),\n );\n\n return command;\n}\n","/**\n * Great Detail Support System.\n *\n * @copyright 2026 Great Detail Ltd\n * @author Great Detail Ltd <info@greatdetail.com>\n * @author Dom Webber <dom.webber@greatdetail.com>\n * @see https://greatdetail.com\n */\n\nimport { Command } from \"commander\";\nimport type { Options as CommandOptions } from \"./index.js\";\n\nexport type Options = CommandOptions;\n\nexport default function messages({ client }: Options) {\n const command = new Command(\"messages\").description(\"Messages\");\n\n command.addCommand(\n new Command(\"list\").description(\"List messages\").action(async () => {\n const result = await client.message.list().json();\n console.log(result);\n }),\n );\n\n return command;\n}\n","/**\n * Great Detail Support System.\n *\n * @copyright 2026 Great Detail Ltd\n * @author Great Detail Ltd <info@greatdetail.com>\n * @author Dom Webber <dom.webber@greatdetail.com>\n * @see https://greatdetail.com\n */\n\nimport { Command } from \"commander\";\nimport type { Options as CommandOptions } from \"./index.js\";\n\nexport type Options = CommandOptions;\n\nexport default function sources({ client }: Options) {\n const command = new Command(\"sources\").description(\"Sources\");\n\n command.addCommand(\n new Command(\"get\")\n .description(\"Find source\")\n .argument(\"<source>\", \"Source ID\")\n .action(async (id) => {\n const result = await client.source.get(id).json();\n console.log(result);\n }),\n );\n\n command.addCommand(\n new Command(\"list\").description(\"List sources\").action(async () => {\n const result = await client.source.list().json();\n console.log(result);\n }),\n );\n\n return command;\n}\n","/**\n * Great Detail Support System.\n *\n * @copyright 2026 Great Detail Ltd\n * @author Great Detail Ltd <info@greatdetail.com>\n * @author Dom Webber <dom.webber@greatdetail.com>\n * @see https://greatdetail.com\n */\n\nimport { Client } from \"@great-detail/support-sdk\";\nimport { Command } from \"commander\";\nimport actions from \"./actions.js\";\nimport channels from \"./channels.js\";\nimport contacts from \"./contacts.js\";\nimport conversations from \"./conversations.js\";\nimport labels from \"./labels.js\";\nimport messages from \"./messages.js\";\nimport sources from \"./sources.js\";\n\nexport interface Options {\n client: Client;\n}\n\nconst options: Options = {\n client: new Client(new Client.PublicAuthentication()),\n};\n\nconst cli = new Command(\"gds\")\n .description(\"Great Detail Support System\")\n .addCommand(actions(options))\n .addCommand(channels(options))\n .addCommand(contacts(options))\n .addCommand(conversations(options))\n .addCommand(labels(options))\n .addCommand(messages(options))\n .addCommand(sources(options));\n\nexport default cli;\n","#!/usr/bin/env node\n/**\n * Great Detail Support System.\n *\n * @copyright 2026 Great Detail Ltd\n * @author Great Detail Ltd <info@greatdetail.com>\n * @author Dom Webber <dom.webber@greatdetail.com>\n * @see https://greatdetail.com\n */\n\nimport cli from \"../index.js\";\n\ncli.parseAsync(process.argv);\n"],"mappings":";uFAcA,SAAwB,EAAQ,CAAE,UAAmB,CACnD,IAAM,EAAU,IAAI,EAAQ,UAAU,CAAC,YAAY,UAAU,CAS7D,OAPA,EAAQ,WACN,IAAI,EAAQ,OAAO,CAAC,YAAY,eAAe,CAAC,OAAO,SAAY,CACjE,IAAM,EAAS,MAAM,EAAO,OAAO,MAAM,CAAC,MAAM,CAChD,QAAQ,IAAI,EAAO,EACnB,CACH,CAEM,ECVT,SAAwB,EAAS,CAAE,UAAmB,CACpD,IAAM,EAAU,IAAI,EAAQ,WAAW,CAAC,YAAY,WAAW,CAS/D,OAPA,EAAQ,WACN,IAAI,EAAQ,OAAO,CAAC,YAAY,gBAAgB,CAAC,OAAO,SAAY,CAClE,IAAM,EAAS,MAAM,EA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AI,EAAO,IAAI,EAAO,qBAAuB,CACtD,CAEW,IAAI,EAAQ,MAAM,CAC3B,YAAY,8BAA8B,CAC1C,WAAW,EAAQ,EAAQ,CAAC,CAC5B,WAAW,EAAS,EAAQ,CAAC,CAC7B,WAAW,EAAS,EAAQ,CAAC,CAC7B,WAAW,EAAc,EAAQ,CAAC,CAClC,WAAW,EAAO,EAAQ,CAAC,CAC3B,WAAW,EAAS,EAAQ,CAAC,CAC7B,WAAW,EAAQ,EAAQ,CAAC,CCvB3B,WAAW,QAAQ,KAAK"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@great-detail/support-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-next-20260312135910",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI for the Great Detail Support System",
|
|
6
6
|
"author": "Great Detail Ltd <info@greatdetail.com>",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"commander": "^14.0.0",
|
|
26
|
-
"@great-detail/support-sdk": ""
|
|
26
|
+
"@great-detail/support-sdk": "0.42.0-next-20260312135910"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "^24.1.0",
|
|
30
30
|
"publint": "^0.3.12",
|
|
31
|
-
"
|
|
31
|
+
"tsdown": "^0.21.1",
|
|
32
32
|
"tsx": "^4.19.4",
|
|
33
33
|
"typescript": "^5.8.3"
|
|
34
34
|
},
|
|
@@ -37,8 +37,9 @@
|
|
|
37
37
|
"provenance": false
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
|
-
"build": "
|
|
40
|
+
"build": "tsdown src/entrypoint/cli.ts",
|
|
41
41
|
"test": "node --import tsx --test --experimental-test-coverage src/__tests__/**/*.test.ts src/__tests__/*.test.ts",
|
|
42
|
+
"lint:licenses": "license-checker --summary --onlyAllow 'UNLICENSED;Unlicense;MIT;Public Domain;Apache-2.0;BSD;ISC;MPL;Unicode-3.0;LGPL-3.0-or-later;Python-2.0;' --excludePackages ''",
|
|
42
43
|
"typecheck": "tsc --noEmit"
|
|
43
44
|
}
|
|
44
45
|
}
|