@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@great-detail/support-sdk",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "type": "module",
5
5
  "description": "JavaScript SDK for the Great Detail Support System",
6
6
  "author": "Great Detail Ltd <info@greatdetail.com>",
@@ -36,8 +36,7 @@
36
36
  }
37
37
  },
38
38
  "files": [
39
- "dist",
40
- "src"
39
+ "dist"
41
40
  ],
42
41
  "keywords": [
43
42
  "SDK"
@@ -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
- request?: RequestInit;
14
- }
15
-
16
- export type ListActionsResponse = {
17
- actions: {
18
- id: string;
19
- actionStatus: string;
20
- message: string;
21
- name: string;
22
- object?: string;
23
- result?: string;
24
- startedAt?: string;
25
- endedAt?: string;
26
- createdAt: string;
27
- updatedAt?: string;
28
- }[];
29
- };
30
-
31
- export default class ListActions {
32
- constructor(protected _transport: FetchTransport) {}
33
-
34
- public async send({ request = {} }: Options = {}) {
35
- return this._transport.send<ListActionsResponse>("v1/actions", {
36
- ...request,
37
- method: "GET",
38
- });
39
- }
40
- }
@@ -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 ListActionsResponse } from "./ListActions.js";
@@ -1,50 +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 { KEY_ENV_VAR, USER_ENV_VAR } from "../constants/environment.js";
11
- import { DEFAULT_KEY_AUTHENTICATION_NAME } from "../constants/index.js";
12
- import Authentication from "./index.js";
13
-
14
- export interface Options {
15
- name?: string;
16
- key?: string;
17
- }
18
-
19
- export default class KeyAuthentication implements Authentication {
20
- public static DEFAULT_NAME = DEFAULT_KEY_AUTHENTICATION_NAME;
21
-
22
- public name: string;
23
- #key: string;
24
-
25
- constructor({
26
- name = process.env[USER_ENV_VAR] ?? KeyAuthentication.DEFAULT_NAME,
27
- key = process.env[KEY_ENV_VAR],
28
- }: Options = {}) {
29
- if (!key) {
30
- throw new Error(
31
- "API Key option must be specified when using Key Authentication",
32
- );
33
- }
34
-
35
- this.name = name;
36
- this.#key = key;
37
- }
38
-
39
- public async filter() {
40
- return {
41
- headers: this.getHeaders(),
42
- };
43
- }
44
-
45
- public getHeaders() {
46
- return {
47
- Authorization: `Basic ${btoa(this.name + ":" + this.#key)}`,
48
- };
49
- }
50
- }
@@ -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 Authentication from "./index.js";
11
-
12
- /**
13
- * Public Authentication Configuration.
14
- * This type of authentication doesn't define any authentication for outgoing
15
- * HTTP requests. This functionality may work well when using a proxying method
16
- * to add credentials to a request after-the-fact.
17
- *
18
- * Note: Not all APIs and endpoints will work with this authentication type.
19
- *
20
- * @since 1.0.l0
21
- */
22
- export default class PublicAuthentication implements Authentication {
23
- public async filter() {
24
- return {
25
- headers: this.getHeaders(),
26
- };
27
- }
28
-
29
- public getHeaders() {
30
- return {};
31
- }
32
- }
@@ -1,41 +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 { TOKEN_ENV_VAR } from "../constants/environment.js";
11
- import Authentication from "./index.js";
12
-
13
- export interface Options {
14
- token?: string;
15
- }
16
-
17
- export default class TokenAuthentication implements Authentication {
18
- #token: string;
19
-
20
- constructor({ token = process.env[TOKEN_ENV_VAR] }: Options = {}) {
21
- if (!token) {
22
- throw new Error(
23
- "Access Token option must be specified when using Token Authentication",
24
- );
25
- }
26
-
27
- this.#token = token;
28
- }
29
-
30
- public async filter() {
31
- return {
32
- headers: this.getHeaders(),
33
- };
34
- }
35
-
36
- public getHeaders() {
37
- return {
38
- Authorization: `Bearer ${this.#token}`,
39
- };
40
- }
41
- }
@@ -1,13 +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 RequestFilterable from "../Request/RequestFilterable.js";
11
-
12
- type Authentication = RequestFilterable;
13
- export default Authentication;
@@ -1,55 +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 CreateBoilerplateCategoryBoilerplate.SCHEMA>;
16
- request?: RequestInit;
17
- }
18
-
19
- export type CreateBoilerplateCategoryBoilerplateResponse = {
20
- boilerplate: {
21
- id: string;
22
- title: string;
23
- content: string;
24
- account: string;
25
- createdAt: string;
26
- updatedAt: string;
27
- };
28
- };
29
-
30
- export default class CreateBoilerplateCategoryBoilerplate {
31
- public static SCHEMA = z.object({
32
- title: z.string(),
33
- content: z.string(),
34
- account: z.string(),
35
- });
36
-
37
- constructor(protected _transport: FetchTransport) {}
38
-
39
- public async send({ id, body, request = {} }: Options) {
40
- return this._transport.send<CreateBoilerplateCategoryBoilerplateResponse>(
41
- "v1/boilerplate-categories/" + encodeURIComponent(id) + "/boilerplates",
42
- {
43
- ...request,
44
- method: "POST",
45
- headers: {
46
- ...request.headers,
47
- "Content-Type": "application/json",
48
- },
49
- body: JSON.stringify(
50
- CreateBoilerplateCategoryBoilerplate.SCHEMA.parse(body),
51
- ),
52
- },
53
- );
54
- }
55
- }
@@ -1,41 +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 GetBoilerplateResponse = {
18
- boilerplate: {
19
- id: string;
20
- title: string;
21
- content: string;
22
- account: string;
23
- boilerplateCategory: string;
24
- createdAt: string;
25
- updatedAt: string;
26
- };
27
- };
28
-
29
- export default class GetBoilerplate {
30
- constructor(protected _transport: FetchTransport) {}
31
-
32
- public async send({ id, request = {} }: Options) {
33
- return this._transport.send<GetBoilerplateResponse>(
34
- "v1/boilerplates/" + encodeURIComponent(id),
35
- {
36
- ...request,
37
- method: "GET",
38
- },
39
- );
40
- }
41
- }
@@ -1,41 +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 default class ListBoilerplateCategoryBoilerplates {
18
- constructor(protected _transport: FetchTransport) {}
19
-
20
- public async send({ id, request = {} }: Options) {
21
- return this._transport.send<ListBoilerplateCategoryBoilerplatesResponse>(
22
- "v1/boilerplate-categories/" + encodeURIComponent(id) + "/boilerplates",
23
- {
24
- ...request,
25
- method: "GET",
26
- },
27
- );
28
- }
29
- }
30
-
31
- export type ListBoilerplateCategoryBoilerplatesResponse = {
32
- boilerplates: {
33
- id: string;
34
- title: string;
35
- content: string;
36
- account: string;
37
- boilerplateCategory: string;
38
- createdAt: string;
39
- updatedAt: string;
40
- }[];
41
- };
@@ -1,37 +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 ListBoilerplatesResponse = {
17
- boilerplates: {
18
- id: string;
19
- title: string;
20
- content: string;
21
- account: string;
22
- boilerplateCategory: string;
23
- createdAt: string;
24
- updatedAt: string;
25
- }[];
26
- };
27
-
28
- export default class ListBoilerplates {
29
- constructor(protected _transport: FetchTransport) {}
30
-
31
- public async send({ request = {} }: Options = {}) {
32
- return this._transport.send<ListBoilerplatesResponse>("v1/boilerplates", {
33
- ...request,
34
- method: "GET",
35
- });
36
- }
37
- }
@@ -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 UpdateBoilerplate.SCHEMA>;
16
- request?: RequestInit;
17
- }
18
-
19
- export type UpdateBoilerplateResponse = {
20
- boilerplate: {
21
- id: string;
22
- title: string;
23
- content: string;
24
- account: string;
25
- boilerplateCategory: string;
26
- createdAt: string;
27
- updatedAt: string;
28
- };
29
- };
30
-
31
- export default class UpdateBoilerplate {
32
- public static SCHEMA = z.object({
33
- title: z.string().optional(),
34
- content: z.string().optional(),
35
- });
36
-
37
- constructor(protected _transport: FetchTransport) {}
38
-
39
- public async send({ id, body, request = {} }: Options) {
40
- return this._transport.send<UpdateBoilerplateResponse>(
41
- "v1/boilerplates/" + encodeURIComponent(id),
42
- {
43
- ...request,
44
- method: "PATCH",
45
- headers: {
46
- ...request.headers,
47
- "Content-Type": "application/json",
48
- },
49
- body: JSON.stringify(UpdateBoilerplate.SCHEMA.parse(body)),
50
- },
51
- );
52
- }
53
- }
@@ -1,14 +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 CreateBoilerplateCategoryBoilerplateResponse } from "./CreateBoilerplateCategoryBoilerplate.js";
11
- export { type ListBoilerplateCategoryBoilerplatesResponse } from "./ListBoilerplateCategoryBoilerplates.js";
12
- export { type GetBoilerplateResponse } from "./GetBoilerplate.js";
13
- export { type ListBoilerplatesResponse } from "./ListBoilerplates.js";
14
- export { type UpdateBoilerplateResponse } from "./UpdateBoilerplate.js";
@@ -1,52 +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
- body: z.infer<typeof CreateBoilerplateCategory.SCHEMA>;
15
- request?: RequestInit;
16
- }
17
-
18
- export type CreateBoilerplateCategoryResponse = {
19
- boilerplateCategory: {
20
- id: string;
21
- title: string;
22
- description?: string;
23
- account: string;
24
- createdAt: string;
25
- updatedAt: string;
26
- };
27
- };
28
-
29
- export default class CreateBoilerplateCategory {
30
- public static SCHEMA = z.object({
31
- title: z.string(),
32
- description: z.string().optional(),
33
- account: z.string(),
34
- });
35
-
36
- constructor(protected _transport: FetchTransport) {}
37
-
38
- public async send({ body, request = {} }: Options) {
39
- return this._transport.send<CreateBoilerplateCategoryResponse>(
40
- "v1/boilerplate-categories",
41
- {
42
- ...request,
43
- method: "POST",
44
- headers: {
45
- ...request.headers,
46
- "Content-Type": "application/json",
47
- },
48
- body: JSON.stringify(CreateBoilerplateCategory.SCHEMA.parse(body)),
49
- },
50
- );
51
- }
52
- }
@@ -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 GetBoilerplateCategoryResponse = {
18
- boilerplateCategory: {
19
- id: string;
20
- title: string;
21
- description?: string;
22
- account: string;
23
- createdAt: string;
24
- updatedAt: string;
25
- };
26
- };
27
-
28
- export default class GetBoilerplateCategory {
29
- constructor(protected _transport: FetchTransport) {}
30
-
31
- public async send({ id, request = {} }: Options) {
32
- return this._transport.send<GetBoilerplateCategoryResponse>(
33
- "v1/boilerplate-categories/" + encodeURIComponent(id),
34
- {
35
- ...request,
36
- method: "GET",
37
- },
38
- );
39
- }
40
- }
@@ -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
- request?: RequestInit;
14
- }
15
-
16
- export type ListBoilerplateCategoriesResponse = {
17
- boilerplateCategories: {
18
- id: string;
19
- title: string;
20
- description?: string;
21
- account: string;
22
- createdAt: string;
23
- updatedAt: string;
24
- }[];
25
- };
26
-
27
- export default class ListBoilerplateCategories {
28
- constructor(protected _transport: FetchTransport) {}
29
-
30
- public async send({ request = {} }: Options = {}) {
31
- return this._transport.send<ListBoilerplateCategoriesResponse>(
32
- "v1/boilerplate-categories",
33
- {
34
- ...request,
35
- method: "GET",
36
- },
37
- );
38
- }
39
- }
@@ -1,52 +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 UpdateBoilerplateCategory.SCHEMA>;
16
- request?: RequestInit;
17
- }
18
-
19
- export type UpdateBoilerplateCategoryResponse = {
20
- boilerplateCategory: {
21
- id: string;
22
- title: string;
23
- description?: string;
24
- account: string;
25
- createdAt: string;
26
- updatedAt: string;
27
- };
28
- };
29
-
30
- export default class UpdateBoilerplateCategory {
31
- public static SCHEMA = z.object({
32
- title: z.string().optional(),
33
- description: z.string().optional(),
34
- });
35
-
36
- constructor(protected _transport: FetchTransport) {}
37
-
38
- public async send({ id, body, request = {} }: Options) {
39
- return this._transport.send<UpdateBoilerplateCategoryResponse>(
40
- "v1/boilerplate-categories/" + encodeURIComponent(id),
41
- {
42
- ...request,
43
- method: "PATCH",
44
- headers: {
45
- ...request.headers,
46
- "Content-Type": "application/json",
47
- },
48
- body: JSON.stringify(UpdateBoilerplateCategory.SCHEMA.parse(body)),
49
- },
50
- );
51
- }
52
- }
@@ -1,13 +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 CreateBoilerplateCategoryResponse } from "./CreateBoilerplateCategory.js";
11
- export { type GetBoilerplateCategoryResponse } from "./GetBoilerplateCategory.js";
12
- export { type ListBoilerplateCategoriesResponse } from "./ListBoilerplateCategories.js";
13
- export { type UpdateBoilerplateCategoryResponse } from "./UpdateBoilerplateCategory.js";