@great-detail/support-sdk 0.4.4 → 0.4.6

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 (102) hide show
  1. package/dist/{chunk-F67NJYPP.js → chunk-HN3EOCB3.js} +1 -1
  2. package/dist/{chunk-23BXD6T5.js → chunk-OXJTX6H4.js} +1 -1
  3. package/dist/cli/index.cjs +1 -1
  4. package/dist/cli/index.d.cts +1 -1
  5. package/dist/cli/index.d.ts +1 -1
  6. package/dist/cli/index.js +1 -1
  7. package/dist/cli.cjs +1 -1
  8. package/dist/cli.js +1 -1
  9. package/dist/{index-CV2Xq9A0.d.cts → index-BLy-LH3e.d.cts} +115 -90
  10. package/dist/{index-CV2Xq9A0.d.ts → index-BLy-LH3e.d.ts} +115 -90
  11. package/dist/index.cjs +1 -1
  12. package/dist/index.d.cts +2 -2
  13. package/dist/index.d.ts +2 -2
  14. package/dist/index.js +1 -1
  15. package/package.json +2 -3
  16. package/src/Action/ListActions.ts +0 -40
  17. package/src/Action/index.ts +0 -10
  18. package/src/Authentication/KeyAuthentication.ts +0 -50
  19. package/src/Authentication/PublicAuthentication.ts +0 -32
  20. package/src/Authentication/TokenAuthentication.ts +0 -41
  21. package/src/Authentication/index.ts +0 -13
  22. package/src/Boilerplate/CreateBoilerplateCategoryBoilerplate.ts +0 -55
  23. package/src/Boilerplate/GetBoilerplate.ts +0 -41
  24. package/src/Boilerplate/ListBoilerplateCategoryBoilerplates.ts +0 -41
  25. package/src/Boilerplate/ListBoilerplates.ts +0 -37
  26. package/src/Boilerplate/UpdateBoilerplate.ts +0 -53
  27. package/src/Boilerplate/index.ts +0 -14
  28. package/src/BoilerplateCategory/CreateBoilerplateCategory.ts +0 -52
  29. package/src/BoilerplateCategory/GetBoilerplateCategory.ts +0 -40
  30. package/src/BoilerplateCategory/ListBoilerplateCategories.ts +0 -39
  31. package/src/BoilerplateCategory/UpdateBoilerplateCategory.ts +0 -52
  32. package/src/BoilerplateCategory/index.ts +0 -13
  33. package/src/Channel/ListChannels.ts +0 -53
  34. package/src/Channel/index.ts +0 -10
  35. package/src/Client/index.ts +0 -206
  36. package/src/Contact/ContactVCF/GetContactVCF.ts +0 -45
  37. package/src/Contact/CreateContact.ts +0 -51
  38. package/src/Contact/GetContact.ts +0 -41
  39. package/src/Contact/ListContacts.ts +0 -37
  40. package/src/Contact/ListLabelContacts.ts +0 -41
  41. package/src/Contact/UpdateContact.ts +0 -54
  42. package/src/Contact/index.ts +0 -14
  43. package/src/Conversation/CreateConversation.ts +0 -58
  44. package/src/Conversation/GetConversation.ts +0 -45
  45. package/src/Conversation/ListContactConversations.ts +0 -45
  46. package/src/Conversation/ListConversations.ts +0 -41
  47. package/src/Conversation/ListLabelConversations.ts +0 -45
  48. package/src/Conversation/UpdateConversation.ts +0 -64
  49. package/src/Conversation/index.ts +0 -15
  50. package/src/Error/AuthError.ts +0 -12
  51. package/src/Error/AuthenticationError.ts +0 -16
  52. package/src/Error/AuthorizationError.ts +0 -16
  53. package/src/Error/LogicError.ts +0 -20
  54. package/src/Error/NetworkError.ts +0 -12
  55. package/src/Error/SupportError.ts +0 -10
  56. package/src/Error/ValidationError.ts +0 -16
  57. package/src/Error/index.ts +0 -20
  58. package/src/Label/CreateLabel.ts +0 -49
  59. package/src/Label/DeleteLabel.ts +0 -31
  60. package/src/Label/GetLabel.ts +0 -40
  61. package/src/Label/ListLabels.ts +0 -36
  62. package/src/Label/UpdateLabel.ts +0 -52
  63. package/src/Label/index.ts +0 -14
  64. package/src/Message/ListConversationMessages.ts +0 -49
  65. package/src/Message/ListMessages.ts +0 -45
  66. package/src/Message/index.ts +0 -11
  67. package/src/Model/Correction/CreateCorrectionModel.ts +0 -44
  68. package/src/Model/GetModel.ts +0 -39
  69. package/src/Model/ListModels.ts +0 -35
  70. package/src/Model/Response/CreateResponseModel.ts +0 -53
  71. package/src/Model/index.ts +0 -15
  72. package/src/Note/CreateContactNote.ts +0 -49
  73. package/src/Note/CreateConversationNote.ts +0 -49
  74. package/src/Note/GetNote.ts +0 -38
  75. package/src/Note/ListContactNotes.ts +0 -38
  76. package/src/Note/ListConversationNotes.ts +0 -38
  77. package/src/Note/UpdateNote.ts +0 -49
  78. package/src/Note/index.ts +0 -15
  79. package/src/NotificationSubscription/CreateContactNotificationSubscription.ts +0 -57
  80. package/src/NotificationSubscription/index.ts +0 -10
  81. package/src/Request/RequestFilterable.ts +0 -16
  82. package/src/Request/RequestStandardHeaders.ts +0 -32
  83. package/src/Source/GetSource.ts +0 -40
  84. package/src/Source/ListSources.ts +0 -36
  85. package/src/Source/index.ts +0 -11
  86. package/src/Transport/FetchTransport.ts +0 -100
  87. package/src/Transport/index.ts +0 -18
  88. package/src/Webhook/index.ts +0 -55
  89. package/src/__tests__/Client/Client.test.ts +0 -38
  90. package/src/cli/actions.ts +0 -31
  91. package/src/cli/channels.ts +0 -31
  92. package/src/cli/contacts.ts +0 -45
  93. package/src/cli/conversations.ts +0 -48
  94. package/src/cli/index.ts +0 -46
  95. package/src/cli/labels.ts +0 -62
  96. package/src/cli/messages.ts +0 -31
  97. package/src/cli/models.ts +0 -45
  98. package/src/cli/sources.ts +0 -45
  99. package/src/cli.ts +0 -13
  100. package/src/constants/environment.ts +0 -36
  101. package/src/constants/index.ts +0 -31
  102. package/src/index.ts +0 -39
@@ -1,45 +0,0 @@
1
- /**
2
- * Great Detail Support System.
3
- *
4
- * @copyright 2024 Great Detail Ltd
5
- * @author Great Detail Ltd <info@greatdetail.com>
6
- * @author Dom Webber <dom.webber@greatdetail.com>
7
- * @see https://greatdetail.com
8
- */
9
-
10
- import { Command } from "commander";
11
- import { oraPromise } from "ora";
12
- import type { Options as CommandOptions } from "./index.js";
13
-
14
- export type Options = CommandOptions;
15
-
16
- export default function sources({ client, ora }: Options) {
17
- const command = new Command("sources").description("Sources");
18
-
19
- command.addCommand(
20
- new Command("get")
21
- .description("Find source")
22
- .argument("<source>", "Source ID")
23
- .action(async (id) => {
24
- const result = await oraPromise(() => client.source.get.send({ id }), {
25
- ...ora,
26
- text: "Finding source",
27
- });
28
-
29
- console.log(await result.json());
30
- }),
31
- );
32
-
33
- command.addCommand(
34
- new Command("list").description("List sources").action(async () => {
35
- const result = await oraPromise(() => client.source.list.send(), {
36
- ...ora,
37
- text: "Finding sources",
38
- });
39
-
40
- console.log(await result.json());
41
- }),
42
- );
43
-
44
- return command;
45
- }
package/src/cli.ts DELETED
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Great Detail Support System.
5
- *
6
- * @copyright 2024 Great Detail Ltd
7
- * @author Great Detail Ltd <info@greatdetail.com>
8
- * @author Dom Webber <dom.webber@greatdetail.com>
9
- * @see https://greatdetail.com
10
- */
11
- import cli from "./cli/index.js";
12
-
13
- cli.parseAsync(process.argv);
@@ -1,36 +0,0 @@
1
- /**
2
- * Great Detail Support System.
3
- *
4
- * @copyright 2024 Great Detail Ltd
5
- * @author Great Detail Ltd <info@greatdetail.com>
6
- * @author Dom Webber <dom.webber@greatdetail.com>
7
- * @see https://greatdetail.com
8
- */
9
-
10
- /**
11
- * The Token-Authentication Environment Variable Name.
12
- *
13
- * @since 1.0.0
14
- */
15
- export const TOKEN_ENV_VAR = "SUPPORT_ACCESS_TOKEN";
16
-
17
- /**
18
- * The API-Key Authentication Environment Variable Name.
19
- *
20
- * @since 1.0.0
21
- */
22
- export const KEY_ENV_VAR = "SUPPORT_API_KEY";
23
-
24
- /**
25
- * The API-Key Authentication Username Environment Variable Name.
26
- *
27
- * @since 1.0.0
28
- */
29
- export const USER_ENV_VAR = "SUPPORT_KEY_NAME";
30
-
31
- /**
32
- * The Base URL Environment Variable Name.
33
- *
34
- * @since 1.0.0
35
- */
36
- export const BASE_URL_ENV_VAR = "SUPPORT_BASE_URL";
@@ -1,31 +0,0 @@
1
- /**
2
- * Great Detail Support System.
3
- *
4
- * @copyright 2024 Great Detail Ltd
5
- * @author Great Detail Ltd <info@greatdetail.com>
6
- * @author Dom Webber <dom.webber@greatdetail.com>
7
- * @see https://greatdetail.com
8
- */
9
-
10
- /**
11
- * Support System API Base URL.
12
- *
13
- * @since 1.0.0
14
- */
15
- export const DEFAULT_SUPPORT_BASE_URL = "https://api.support.greatdetail.com";
16
-
17
- /**
18
- * Standard HTTP Request Headers.
19
- *
20
- * @since 1.0.0
21
- */
22
- export const STANDARD_HEADERS = {
23
- "X-Powered-By": "GDSupport/JavaScript",
24
- };
25
-
26
- /**
27
- * Default Basic Authentication Username for Key Authentication.
28
- *
29
- * @since 1.0.0
30
- */
31
- export const DEFAULT_KEY_AUTHENTICATION_NAME = "api-key";
package/src/index.ts DELETED
@@ -1,39 +0,0 @@
1
- /**
2
- * Great Detail Support System.
3
- *
4
- * @copyright 2024 Great Detail Ltd
5
- * @author Great Detail Ltd <info@greatdetail.com>
6
- * @author Dom Webber <dom.webber@greatdetail.com>
7
- * @see https://greatdetail.com
8
- */
9
-
10
- export { DEFAULT_SUPPORT_BASE_URL } from "./constants/index.js";
11
-
12
- // Client
13
- export { default, default as Client, type Options } from "./Client/index.js";
14
-
15
- // Errors
16
- export * as Error from "./Error/index.js";
17
-
18
- // Transport & Filtering
19
- export { type default as RequestFilterable } from "./Request/RequestFilterable.js";
20
- export { type Options as TransportOptions } from "./Transport/index.js";
21
-
22
- // Authentication
23
- export { default as KeyAuthentication } from "./Authentication/KeyAuthentication.js";
24
- export { default as TokenAuthentication } from "./Authentication/TokenAuthentication.js";
25
- export { default as PublicAuthentication } from "./Authentication/PublicAuthentication.js";
26
-
27
- export * from "./Action/index.js";
28
- export * from "./Boilerplate/index.js";
29
- export * from "./BoilerplateCategory/index.js";
30
- export * from "./Channel/index.js";
31
- export * from "./Contact/index.js";
32
- export * from "./Conversation/index.js";
33
- export * from "./Label/index.js";
34
- export * from "./Message/index.js";
35
- export * from "./Model/index.js";
36
- export * from "./Note/index.js";
37
- export * from "./Source/index.js";
38
- export * from "./NotificationSubscription/index.js";
39
- export { type WebhookResponse } from "./Webhook/index.js";