@theholocron/zendesk-client 1.6.6 → 1.7.0

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/index.d.mts CHANGED
@@ -348,10 +348,6 @@ declare function comments(rest: RestClient): {
348
348
  create: (ticketId: number, body: string) => Promise<void>;
349
349
  };
350
350
  //#endregion
351
- //#region src/tickets/comments.mocks.d.ts
352
- declare const mockComment: IComment;
353
- declare const mockCommentResponse: ICommentResponse;
354
- //#endregion
355
351
  //#region src/tickets/fields.d.ts
356
352
  declare function fields(rest: RestClient): {
357
353
  list: () => Promise<TTicketFieldsResponse>;
@@ -361,6 +357,19 @@ declare function fields(rest: RestClient): {
361
357
  delete: (id: number) => Promise<void>;
362
358
  };
363
359
  //#endregion
360
+ //#region src/tickets/tickets.d.ts
361
+ declare function tickets(rest: RestClient): {
362
+ list: (params?: Record<string, string>) => Promise<TTicketsResponse>;
363
+ get: (id: number) => Promise<TTicketResponse>;
364
+ create: (data: ITicket) => Promise<TTicketResponse>;
365
+ update: (id: number, data: Partial<ITicket>) => Promise<TTicketResponse>;
366
+ delete: (id: number) => Promise<void>;
367
+ };
368
+ //#endregion
369
+ //#region src/tickets/comments.mocks.d.ts
370
+ declare const mockComment: IComment;
371
+ declare const mockCommentResponse: ICommentResponse;
372
+ //#endregion
364
373
  //#region src/tickets/fields.mocks.d.ts
365
374
  declare const mockCustomField1: ICustomField;
366
375
  declare const mockCustomField2: ICustomField;
@@ -405,15 +414,6 @@ interface ITicketMetric {
405
414
  //#region src/tickets/metrics.mocks.d.ts
406
415
  declare const mockTicketMetric: ITicketMetric;
407
416
  //#endregion
408
- //#region src/tickets/tickets.d.ts
409
- declare function tickets(rest: RestClient): {
410
- list: (params?: Record<string, string>) => Promise<TTicketsResponse>;
411
- get: (id: number) => Promise<TTicketResponse>;
412
- create: (data: ITicket) => Promise<TTicketResponse>;
413
- update: (id: number, data: Partial<ITicket>) => Promise<TTicketResponse>;
414
- delete: (id: number) => Promise<void>;
415
- };
416
- //#endregion
417
417
  //#region src/tickets/tickets.mocks.d.ts
418
418
  declare const mockVia: IVia;
419
419
  declare const mockMetadata: IMetadata;
package/dist/index.mjs CHANGED
@@ -1,4 +1,15 @@
1
1
  import { createRestClient } from "@theholocron/http-client";
2
+ //#region src/utils.ts
3
+ const createToken = (user, password) => Buffer.from(`${user}/token:${password}`).toString("base64");
4
+ function createZendeskRestClient(opts) {
5
+ return createRestClient({
6
+ baseUrl: opts.baseUrl,
7
+ token: opts.token,
8
+ vendor: "Zendesk",
9
+ fetch: opts.fetch
10
+ });
11
+ }
12
+ //#endregion
2
13
  //#region src/activities/activities.ts
3
14
  const PATH$5 = "/api/v2/activities";
4
15
  function activities(rest) {
@@ -89,17 +100,6 @@ function tickets(rest) {
89
100
  };
90
101
  }
91
102
  //#endregion
92
- //#region src/utils.ts
93
- const createToken = (user, password) => Buffer.from(`${user}/token:${password}`).toString("base64");
94
- function createZendeskRestClient(opts) {
95
- return createRestClient({
96
- baseUrl: opts.baseUrl,
97
- token: opts.token,
98
- vendor: "Zendesk",
99
- fetch: opts.fetch
100
- });
101
- }
102
- //#endregion
103
103
  //#region src/attachments/attachments.mocks.ts
104
104
  const mockImage = {
105
105
  content_type: "image/gif",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/zendesk-client",
3
- "version": "1.6.6",
3
+ "version": "1.7.0",
4
4
  "description": "A TypeScript client for the Zendesk API",
5
5
  "homepage": "https://github.com/theholocron/clients/tree/main/packages/zendesk-client#readme",
6
6
  "bugs": "https://github.com/theholocron/clients/issues",
@@ -30,14 +30,14 @@
30
30
  }
31
31
  },
32
32
  "dependencies": {
33
- "@theholocron/http-client": "^1.6.6"
33
+ "@theholocron/http-client": "^1.7.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^26.2.0",
37
- "@theholocron/eslint-config": "^7.15.0",
38
- "@theholocron/tsconfig": "^7.15.0",
39
- "@theholocron/tsdown-config": "^7.15.0",
40
- "@theholocron/vitest-config": "^7.15.0",
37
+ "@theholocron/eslint-config": "^7.19.0",
38
+ "@theholocron/tsconfig": "^7.19.0",
39
+ "@theholocron/tsdown-config": "^7.19.0",
40
+ "@theholocron/vitest-config": "^7.19.0",
41
41
  "@vitest/coverage-v8": "^4.1.10",
42
42
  "@vitest/eslint-plugin": "^1.6.25",
43
43
  "eslint": "^10.8.1",