@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.
- package/dist/{chunk-F67NJYPP.js → chunk-HN3EOCB3.js} +1 -1
- package/dist/{chunk-23BXD6T5.js → chunk-OXJTX6H4.js} +1 -1
- package/dist/cli/index.cjs +1 -1
- package/dist/cli/index.d.cts +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/{index-CV2Xq9A0.d.cts → index-BLy-LH3e.d.cts} +115 -90
- package/dist/{index-CV2Xq9A0.d.ts → index-BLy-LH3e.d.ts} +115 -90
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +2 -3
- package/src/Action/ListActions.ts +0 -40
- package/src/Action/index.ts +0 -10
- package/src/Authentication/KeyAuthentication.ts +0 -50
- package/src/Authentication/PublicAuthentication.ts +0 -32
- package/src/Authentication/TokenAuthentication.ts +0 -41
- package/src/Authentication/index.ts +0 -13
- package/src/Boilerplate/CreateBoilerplateCategoryBoilerplate.ts +0 -55
- package/src/Boilerplate/GetBoilerplate.ts +0 -41
- package/src/Boilerplate/ListBoilerplateCategoryBoilerplates.ts +0 -41
- package/src/Boilerplate/ListBoilerplates.ts +0 -37
- package/src/Boilerplate/UpdateBoilerplate.ts +0 -53
- package/src/Boilerplate/index.ts +0 -14
- package/src/BoilerplateCategory/CreateBoilerplateCategory.ts +0 -52
- package/src/BoilerplateCategory/GetBoilerplateCategory.ts +0 -40
- package/src/BoilerplateCategory/ListBoilerplateCategories.ts +0 -39
- package/src/BoilerplateCategory/UpdateBoilerplateCategory.ts +0 -52
- package/src/BoilerplateCategory/index.ts +0 -13
- package/src/Channel/ListChannels.ts +0 -53
- package/src/Channel/index.ts +0 -10
- package/src/Client/index.ts +0 -206
- package/src/Contact/ContactVCF/GetContactVCF.ts +0 -45
- package/src/Contact/CreateContact.ts +0 -51
- package/src/Contact/GetContact.ts +0 -41
- package/src/Contact/ListContacts.ts +0 -37
- package/src/Contact/ListLabelContacts.ts +0 -41
- package/src/Contact/UpdateContact.ts +0 -54
- package/src/Contact/index.ts +0 -14
- package/src/Conversation/CreateConversation.ts +0 -58
- package/src/Conversation/GetConversation.ts +0 -45
- package/src/Conversation/ListContactConversations.ts +0 -45
- package/src/Conversation/ListConversations.ts +0 -41
- package/src/Conversation/ListLabelConversations.ts +0 -45
- package/src/Conversation/UpdateConversation.ts +0 -64
- package/src/Conversation/index.ts +0 -15
- package/src/Error/AuthError.ts +0 -12
- package/src/Error/AuthenticationError.ts +0 -16
- package/src/Error/AuthorizationError.ts +0 -16
- package/src/Error/LogicError.ts +0 -20
- package/src/Error/NetworkError.ts +0 -12
- package/src/Error/SupportError.ts +0 -10
- package/src/Error/ValidationError.ts +0 -16
- package/src/Error/index.ts +0 -20
- package/src/Label/CreateLabel.ts +0 -49
- package/src/Label/DeleteLabel.ts +0 -31
- package/src/Label/GetLabel.ts +0 -40
- package/src/Label/ListLabels.ts +0 -36
- package/src/Label/UpdateLabel.ts +0 -52
- package/src/Label/index.ts +0 -14
- package/src/Message/ListConversationMessages.ts +0 -49
- package/src/Message/ListMessages.ts +0 -45
- package/src/Message/index.ts +0 -11
- package/src/Model/Correction/CreateCorrectionModel.ts +0 -44
- package/src/Model/GetModel.ts +0 -39
- package/src/Model/ListModels.ts +0 -35
- package/src/Model/Response/CreateResponseModel.ts +0 -53
- package/src/Model/index.ts +0 -15
- package/src/Note/CreateContactNote.ts +0 -49
- package/src/Note/CreateConversationNote.ts +0 -49
- package/src/Note/GetNote.ts +0 -38
- package/src/Note/ListContactNotes.ts +0 -38
- package/src/Note/ListConversationNotes.ts +0 -38
- package/src/Note/UpdateNote.ts +0 -49
- package/src/Note/index.ts +0 -15
- package/src/NotificationSubscription/CreateContactNotificationSubscription.ts +0 -57
- package/src/NotificationSubscription/index.ts +0 -10
- package/src/Request/RequestFilterable.ts +0 -16
- package/src/Request/RequestStandardHeaders.ts +0 -32
- package/src/Source/GetSource.ts +0 -40
- package/src/Source/ListSources.ts +0 -36
- package/src/Source/index.ts +0 -11
- package/src/Transport/FetchTransport.ts +0 -100
- package/src/Transport/index.ts +0 -18
- package/src/Webhook/index.ts +0 -55
- package/src/__tests__/Client/Client.test.ts +0 -38
- package/src/cli/actions.ts +0 -31
- package/src/cli/channels.ts +0 -31
- package/src/cli/contacts.ts +0 -45
- package/src/cli/conversations.ts +0 -48
- package/src/cli/index.ts +0 -46
- package/src/cli/labels.ts +0 -62
- package/src/cli/messages.ts +0 -31
- package/src/cli/models.ts +0 -45
- package/src/cli/sources.ts +0 -45
- package/src/cli.ts +0 -13
- package/src/constants/environment.ts +0 -36
- package/src/constants/index.ts +0 -31
- package/src/index.ts +0 -39
package/src/cli/sources.ts
DELETED
|
@@ -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";
|
package/src/constants/index.ts
DELETED
|
@@ -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";
|