@great-detail/support-sdk 0.4.4 → 0.4.5

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 (88) hide show
  1. package/package.json +2 -3
  2. package/src/Action/ListActions.ts +0 -40
  3. package/src/Action/index.ts +0 -10
  4. package/src/Authentication/KeyAuthentication.ts +0 -50
  5. package/src/Authentication/PublicAuthentication.ts +0 -32
  6. package/src/Authentication/TokenAuthentication.ts +0 -41
  7. package/src/Authentication/index.ts +0 -13
  8. package/src/Boilerplate/CreateBoilerplateCategoryBoilerplate.ts +0 -55
  9. package/src/Boilerplate/GetBoilerplate.ts +0 -41
  10. package/src/Boilerplate/ListBoilerplateCategoryBoilerplates.ts +0 -41
  11. package/src/Boilerplate/ListBoilerplates.ts +0 -37
  12. package/src/Boilerplate/UpdateBoilerplate.ts +0 -53
  13. package/src/Boilerplate/index.ts +0 -14
  14. package/src/BoilerplateCategory/CreateBoilerplateCategory.ts +0 -52
  15. package/src/BoilerplateCategory/GetBoilerplateCategory.ts +0 -40
  16. package/src/BoilerplateCategory/ListBoilerplateCategories.ts +0 -39
  17. package/src/BoilerplateCategory/UpdateBoilerplateCategory.ts +0 -52
  18. package/src/BoilerplateCategory/index.ts +0 -13
  19. package/src/Channel/ListChannels.ts +0 -53
  20. package/src/Channel/index.ts +0 -10
  21. package/src/Client/index.ts +0 -206
  22. package/src/Contact/ContactVCF/GetContactVCF.ts +0 -45
  23. package/src/Contact/CreateContact.ts +0 -51
  24. package/src/Contact/GetContact.ts +0 -41
  25. package/src/Contact/ListContacts.ts +0 -37
  26. package/src/Contact/ListLabelContacts.ts +0 -41
  27. package/src/Contact/UpdateContact.ts +0 -54
  28. package/src/Contact/index.ts +0 -14
  29. package/src/Conversation/CreateConversation.ts +0 -58
  30. package/src/Conversation/GetConversation.ts +0 -45
  31. package/src/Conversation/ListContactConversations.ts +0 -45
  32. package/src/Conversation/ListConversations.ts +0 -41
  33. package/src/Conversation/ListLabelConversations.ts +0 -45
  34. package/src/Conversation/UpdateConversation.ts +0 -64
  35. package/src/Conversation/index.ts +0 -15
  36. package/src/Error/AuthError.ts +0 -12
  37. package/src/Error/AuthenticationError.ts +0 -16
  38. package/src/Error/AuthorizationError.ts +0 -16
  39. package/src/Error/LogicError.ts +0 -20
  40. package/src/Error/NetworkError.ts +0 -12
  41. package/src/Error/SupportError.ts +0 -10
  42. package/src/Error/ValidationError.ts +0 -16
  43. package/src/Error/index.ts +0 -20
  44. package/src/Label/CreateLabel.ts +0 -49
  45. package/src/Label/DeleteLabel.ts +0 -31
  46. package/src/Label/GetLabel.ts +0 -40
  47. package/src/Label/ListLabels.ts +0 -36
  48. package/src/Label/UpdateLabel.ts +0 -52
  49. package/src/Label/index.ts +0 -14
  50. package/src/Message/ListConversationMessages.ts +0 -49
  51. package/src/Message/ListMessages.ts +0 -45
  52. package/src/Message/index.ts +0 -11
  53. package/src/Model/Correction/CreateCorrectionModel.ts +0 -44
  54. package/src/Model/GetModel.ts +0 -39
  55. package/src/Model/ListModels.ts +0 -35
  56. package/src/Model/Response/CreateResponseModel.ts +0 -53
  57. package/src/Model/index.ts +0 -15
  58. package/src/Note/CreateContactNote.ts +0 -49
  59. package/src/Note/CreateConversationNote.ts +0 -49
  60. package/src/Note/GetNote.ts +0 -38
  61. package/src/Note/ListContactNotes.ts +0 -38
  62. package/src/Note/ListConversationNotes.ts +0 -38
  63. package/src/Note/UpdateNote.ts +0 -49
  64. package/src/Note/index.ts +0 -15
  65. package/src/NotificationSubscription/CreateContactNotificationSubscription.ts +0 -57
  66. package/src/NotificationSubscription/index.ts +0 -10
  67. package/src/Request/RequestFilterable.ts +0 -16
  68. package/src/Request/RequestStandardHeaders.ts +0 -32
  69. package/src/Source/GetSource.ts +0 -40
  70. package/src/Source/ListSources.ts +0 -36
  71. package/src/Source/index.ts +0 -11
  72. package/src/Transport/FetchTransport.ts +0 -100
  73. package/src/Transport/index.ts +0 -18
  74. package/src/Webhook/index.ts +0 -55
  75. package/src/__tests__/Client/Client.test.ts +0 -38
  76. package/src/cli/actions.ts +0 -31
  77. package/src/cli/channels.ts +0 -31
  78. package/src/cli/contacts.ts +0 -45
  79. package/src/cli/conversations.ts +0 -48
  80. package/src/cli/index.ts +0 -46
  81. package/src/cli/labels.ts +0 -62
  82. package/src/cli/messages.ts +0 -31
  83. package/src/cli/models.ts +0 -45
  84. package/src/cli/sources.ts +0 -45
  85. package/src/cli.ts +0 -13
  86. package/src/constants/environment.ts +0 -36
  87. package/src/constants/index.ts +0 -31
  88. package/src/index.ts +0 -39
@@ -1,44 +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 { z } from "zod";
11
- import FetchTransport from "../../Transport/FetchTransport.js";
12
-
13
- export interface Options {
14
- id: string;
15
- body: z.infer<typeof CreateCorrectionModel.SCHEMA>;
16
- request?: RequestInit;
17
- }
18
-
19
- export type CreateCorrectionResponse = unknown;
20
-
21
- export default class CreateCorrectionModel {
22
- public static SCHEMA = z.object({
23
- input: z.string().max(65_536),
24
- original: z.string().max(65_536),
25
- correction: z.string().max(65_536),
26
- });
27
-
28
- constructor(protected _transport: FetchTransport) {}
29
-
30
- public async send({ id, body, request = {} }: Options) {
31
- return this._transport.send<CreateCorrectionResponse>(
32
- "v1/models/" + encodeURIComponent(id) + "/correction",
33
- {
34
- ...request,
35
- method: "POST",
36
- headers: {
37
- ...request.headers,
38
- "Content-Type": "application/json",
39
- },
40
- body: JSON.stringify(CreateCorrectionModel.SCHEMA.parse(body)),
41
- },
42
- );
43
- }
44
- }
@@ -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
- import FetchTransport from "../Transport/FetchTransport.js";
11
-
12
- export interface Options {
13
- id: string;
14
- request?: RequestInit;
15
- }
16
-
17
- export type GetModelResponse = {
18
- model: {
19
- id: string;
20
- name: string;
21
- url?: string;
22
- icon?: string;
23
- disambiguatingDescription: string;
24
- };
25
- };
26
-
27
- export default class GetModel {
28
- constructor(protected _transport: FetchTransport) {}
29
-
30
- public async send({ id, request = {} }: Options) {
31
- return this._transport.send<GetModelResponse>(
32
- "v1/models/" + encodeURIComponent(id),
33
- {
34
- ...request,
35
- method: "GET",
36
- },
37
- );
38
- }
39
- }
@@ -1,35 +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 FetchTransport from "../Transport/FetchTransport.js";
11
-
12
- export interface Options {
13
- request?: RequestInit;
14
- }
15
-
16
- export type ListModelsResponse = {
17
- models: {
18
- id: string;
19
- name: string;
20
- url?: string;
21
- icon?: string;
22
- disambiguatingDescription: string;
23
- }[];
24
- };
25
-
26
- export default class ListModels {
27
- constructor(protected _transport: FetchTransport) {}
28
-
29
- public async send({ request = {} }: Options = {}) {
30
- return this._transport.send<ListModelsResponse>("v1/models", {
31
- ...request,
32
- method: "GET",
33
- });
34
- }
35
- }
@@ -1,53 +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 { z } from "zod";
11
- import FetchTransport from "../../Transport/FetchTransport.js";
12
-
13
- export interface Options {
14
- id: string;
15
- body: z.infer<typeof CreateResponseModel.SCHEMA>;
16
- request?: RequestInit;
17
- }
18
-
19
- export type CreateResponseResponse = {
20
- message: string | null;
21
- debug: {
22
- duration: string;
23
- sources: (string | undefined)[];
24
- };
25
- };
26
-
27
- export default class CreateResponseModel {
28
- public static SCHEMA = z
29
- .array(
30
- z.object({
31
- role: z.enum(["user", "assistant"]),
32
- content: z.string().max(65_536).nullable(),
33
- }),
34
- )
35
- .min(1);
36
-
37
- constructor(protected _transport: FetchTransport) {}
38
-
39
- public async send({ id, body, request = {} }: Options) {
40
- return this._transport.send<CreateResponseResponse>(
41
- "v1/models/" + encodeURIComponent(id) + "/response",
42
- {
43
- ...request,
44
- method: "POST",
45
- headers: {
46
- ...request.headers,
47
- "Content-Type": "application/json",
48
- },
49
- body: JSON.stringify(CreateResponseModel.SCHEMA.parse(body)),
50
- },
51
- );
52
- }
53
- }
@@ -1,15 +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 { type GetModelResponse } from "./GetModel.js";
11
- export { type ListModelsResponse } from "./ListModels.js";
12
-
13
- export { type CreateCorrectionResponse } from "./Correction/CreateCorrectionModel.js";
14
-
15
- export { type CreateResponseResponse } from "./Response/CreateResponseModel.js";
@@ -1,49 +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 { z } from "zod";
11
- import FetchTransport from "../Transport/FetchTransport.js";
12
-
13
- export interface Options {
14
- id: string;
15
- body: z.infer<typeof CreateContactNote.SCHEMA>;
16
- request?: RequestInit;
17
- }
18
-
19
- export type CreateContactNoteResponse = {
20
- note: {
21
- id: string;
22
- content: string;
23
- createdAt: string;
24
- updatedAt: string;
25
- };
26
- };
27
-
28
- export default class CreateContactNote {
29
- public static SCHEMA = z.object({
30
- content: z.string(),
31
- });
32
-
33
- constructor(protected _transport: FetchTransport) {}
34
-
35
- public async send({ id, body, request = {} }: Options) {
36
- return this._transport.send<CreateContactNoteResponse>(
37
- "v1/contacts/" + encodeURIComponent(id) + "/notes",
38
- {
39
- ...request,
40
- method: "POST",
41
- headers: {
42
- ...request.headers,
43
- "Content-Type": "application/json",
44
- },
45
- body: JSON.stringify(CreateContactNote.SCHEMA.parse(body)),
46
- },
47
- );
48
- }
49
- }
@@ -1,49 +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 { z } from "zod";
11
- import FetchTransport from "../Transport/FetchTransport.js";
12
-
13
- export interface Options {
14
- id: string;
15
- body: z.infer<typeof CreateConversationNote.SCHEMA>;
16
- request?: RequestInit;
17
- }
18
-
19
- export type CreateConversationNoteResponse = {
20
- note: {
21
- id: string;
22
- content: string;
23
- createdAt: string;
24
- updatedAt: string;
25
- };
26
- };
27
-
28
- export default class CreateConversationNote {
29
- public static SCHEMA = z.object({
30
- content: z.string(),
31
- });
32
-
33
- constructor(protected _transport: FetchTransport) {}
34
-
35
- public async send({ id, body, request = {} }: Options) {
36
- return this._transport.send<CreateConversationNoteResponse>(
37
- "v1/conversations/" + encodeURIComponent(id) + "/notes",
38
- {
39
- ...request,
40
- method: "POST",
41
- headers: {
42
- ...request.headers,
43
- "Content-Type": "application/json",
44
- },
45
- body: JSON.stringify(CreateConversationNote.SCHEMA.parse(body)),
46
- },
47
- );
48
- }
49
- }
@@ -1,38 +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 FetchTransport from "../Transport/FetchTransport.js";
11
-
12
- export interface Options {
13
- id: string;
14
- request?: RequestInit;
15
- }
16
-
17
- export type GetNoteResponse = {
18
- note: {
19
- id: string;
20
- content: string;
21
- createdAt: string;
22
- updatedAt: string;
23
- };
24
- };
25
-
26
- export default class GetNote {
27
- constructor(protected _transport: FetchTransport) {}
28
-
29
- public async send({ id, request = {} }: Options) {
30
- return this._transport.send<GetNoteResponse>(
31
- "v1/notes/" + encodeURIComponent(id),
32
- {
33
- ...request,
34
- method: "GET",
35
- },
36
- );
37
- }
38
- }
@@ -1,38 +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 FetchTransport from "../Transport/FetchTransport.js";
11
-
12
- export interface Options {
13
- id: string;
14
- request?: RequestInit;
15
- }
16
-
17
- export type ListContactNotesResponse = {
18
- notes: {
19
- id: string;
20
- content: string;
21
- createdAt: string;
22
- updatedAt: string;
23
- }[];
24
- };
25
-
26
- export default class ListContactNotes {
27
- constructor(protected _transport: FetchTransport) {}
28
-
29
- public async send({ id, request = {} }: Options) {
30
- return this._transport.send<ListContactNotesResponse>(
31
- "v1/contacts/" + encodeURIComponent(id) + "/notes",
32
- {
33
- ...request,
34
- method: "GET",
35
- },
36
- );
37
- }
38
- }
@@ -1,38 +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 FetchTransport from "../Transport/FetchTransport.js";
11
-
12
- export interface Options {
13
- id: string;
14
- request?: RequestInit;
15
- }
16
-
17
- export type ListConversationNotesResponse = {
18
- notes: {
19
- id: string;
20
- content: string;
21
- createdAt: string;
22
- updatedAt: string;
23
- }[];
24
- };
25
-
26
- export default class ListConversationNotes {
27
- constructor(protected _transport: FetchTransport) {}
28
-
29
- public async send({ id, request = {} }: Options) {
30
- return this._transport.send<ListConversationNotesResponse>(
31
- "v1/conversations/" + encodeURIComponent(id) + "/notes",
32
- {
33
- ...request,
34
- method: "GET",
35
- },
36
- );
37
- }
38
- }
@@ -1,49 +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 { z } from "zod";
11
- import FetchTransport from "../Transport/FetchTransport.js";
12
-
13
- export interface Options {
14
- id: string;
15
- body: z.infer<typeof UpdateNote.SCHEMA>;
16
- request?: RequestInit;
17
- }
18
-
19
- export type UpdateNoteResponse = {
20
- note: {
21
- id: string;
22
- content: string;
23
- createdAt: string;
24
- updatedAt: string;
25
- };
26
- };
27
-
28
- export default class UpdateNote {
29
- public static SCHEMA = z.object({
30
- content: z.string().optional(),
31
- });
32
-
33
- constructor(protected _transport: FetchTransport) {}
34
-
35
- public async send({ id, body, request = {} }: Options) {
36
- return this._transport.send<UpdateNoteResponse>(
37
- "v1/notes/" + encodeURIComponent(id),
38
- {
39
- ...request,
40
- method: "PATCH",
41
- headers: {
42
- ...request.headers,
43
- "Content-Type": "application/json",
44
- },
45
- body: JSON.stringify(UpdateNote.SCHEMA.parse(body)),
46
- },
47
- );
48
- }
49
- }
package/src/Note/index.ts DELETED
@@ -1,15 +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 { type CreateContactNoteResponse } from "./CreateContactNote.js";
11
- export { type CreateConversationNoteResponse } from "./CreateConversationNote.js";
12
- export { type GetNoteResponse } from "./GetNote.js";
13
- export { type ListContactNotesResponse } from "./ListContactNotes.js";
14
- export { type ListConversationNotesResponse } from "./ListConversationNotes.js";
15
- export { type UpdateNoteResponse } from "./UpdateNote.js";
@@ -1,57 +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 { z } from "zod";
11
- import FetchTransport from "../Transport/FetchTransport.js";
12
-
13
- export interface Options {
14
- id: string;
15
- body: z.infer<typeof CreateContactNotificationSubscription.SCHEMA>;
16
- request?: RequestInit;
17
- }
18
-
19
- export type CreateContactNotificationSubscriptionResponse = {
20
- subscription: {
21
- id: string;
22
- createdAt: string;
23
- updatedAt: string;
24
- };
25
- };
26
-
27
- export default class CreateContactNotificationSubscription {
28
- public static SCHEMA = z.discriminatedUnion("type", [
29
- z.object({
30
- type: z.literal("vapid"),
31
- endpoint: z.string().url(),
32
- keys: z.object({
33
- p256dh: z.string(),
34
- auth: z.string(),
35
- }),
36
- }),
37
- ]);
38
-
39
- constructor(protected _transport: FetchTransport) {}
40
-
41
- public async send({ id, body, request = {} }: Options) {
42
- return this._transport.send<CreateContactNotificationSubscriptionResponse>(
43
- "v1/contacts/" + encodeURIComponent(id) + "/notification-subscriptions",
44
- {
45
- ...request,
46
- method: "POST",
47
- headers: {
48
- ...request.headers,
49
- "Content-Type": "application/json",
50
- },
51
- body: JSON.stringify(
52
- CreateContactNotificationSubscription.SCHEMA.parse(body),
53
- ),
54
- },
55
- );
56
- }
57
- }
@@ -1,10 +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 { type CreateContactNotificationSubscriptionResponse } from "./CreateContactNotificationSubscription.js";
@@ -1,16 +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 interface RequestFilterable {
11
- /**
12
- * @deprecated
13
- */
14
- filter(...options: unknown[]): Promise<{ headers: Record<string, string> }>;
15
- getHeaders(): Record<string, string>;
16
- }
@@ -1,32 +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 { STANDARD_HEADERS } from "../constants/index.js";
11
- import RequestFilterable from "./RequestFilterable.js";
12
-
13
- export default class RequestStandardHeaders implements RequestFilterable {
14
- public static STANDARD_HEADERS = STANDARD_HEADERS;
15
-
16
- constructor(
17
- protected _standardHeaders: Record<
18
- string,
19
- string
20
- > = RequestStandardHeaders.STANDARD_HEADERS,
21
- ) {}
22
-
23
- public async filter() {
24
- return {
25
- headers: this.getHeaders(),
26
- };
27
- }
28
-
29
- public getHeaders() {
30
- return this._standardHeaders;
31
- }
32
- }
@@ -1,40 +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 FetchTransport from "../Transport/FetchTransport.js";
11
-
12
- export interface Options {
13
- id: string;
14
- request?: RequestInit;
15
- }
16
-
17
- export type GetSourceResponse = {
18
- source: {
19
- id: string;
20
- name: string;
21
- category: string;
22
- url?: string;
23
- icon?: string;
24
- disambiguatingDescription: string;
25
- };
26
- };
27
-
28
- export default class GetSource {
29
- constructor(protected _transport: FetchTransport) {}
30
-
31
- public async send({ id, request = {} }: Options) {
32
- return this._transport.send<GetSourceResponse>(
33
- "v1/sources/" + encodeURIComponent(id),
34
- {
35
- ...request,
36
- method: "GET",
37
- },
38
- );
39
- }
40
- }
@@ -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
- import FetchTransport from "../Transport/FetchTransport.js";
11
-
12
- export interface Options {
13
- request?: RequestInit;
14
- }
15
-
16
- export type ListSourcesResponse = {
17
- sources: {
18
- id: string;
19
- name: string;
20
- category: string;
21
- url?: string;
22
- icon?: string;
23
- disambiguatingDescription: string;
24
- }[];
25
- };
26
-
27
- export default class ListSources {
28
- constructor(protected _transport: FetchTransport) {}
29
-
30
- public async send({ request = {} }: Options = {}) {
31
- return this._transport.send<ListSourcesResponse>("v1/sources", {
32
- ...request,
33
- method: "GET",
34
- });
35
- }
36
- }
@@ -1,11 +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 { type GetSourceResponse } from "./GetSource.js";
11
- export { type ListSourcesResponse } from "./ListSources.js";