@theholocron/zendesk-client 1.3.3 → 1.3.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.
package/dist/index.d.mts CHANGED
@@ -348,6 +348,10 @@ 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
351
355
  //#region src/tickets/fields.d.ts
352
356
  declare function fields(rest: RestClient): {
353
357
  list: () => Promise<TTicketFieldsResponse>;
@@ -357,19 +361,6 @@ declare function fields(rest: RestClient): {
357
361
  delete: (id: number) => Promise<void>;
358
362
  };
359
363
  //#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
373
364
  //#region src/tickets/fields.mocks.d.ts
374
365
  declare const mockCustomField1: ICustomField;
375
366
  declare const mockCustomField2: ICustomField;
@@ -414,6 +405,15 @@ interface ITicketMetric {
414
405
  //#region src/tickets/metrics.mocks.d.ts
415
406
  declare const mockTicketMetric: ITicketMetric;
416
407
  //#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,15 +1,4 @@
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
13
2
  //#region src/activities/activities.ts
14
3
  const PATH$5 = "/api/v2/activities";
15
4
  function activities(rest) {
@@ -100,6 +89,17 @@ function tickets(rest) {
100
89
  };
101
90
  }
102
91
  //#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.3.3",
3
+ "version": "1.3.5",
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,11 +30,11 @@
30
30
  }
31
31
  },
32
32
  "dependencies": {
33
- "@theholocron/http-client": "^1.3.3"
33
+ "@theholocron/http-client": "^1.3.5"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^26.1.1",
37
- "@theholocron/eslint-config": "^7.4.1",
37
+ "@theholocron/eslint-config": "^7.6.0",
38
38
  "@theholocron/tsconfig": "^7.4.1",
39
39
  "@theholocron/tsdown-config": "^7.4.1",
40
40
  "@theholocron/vitest-config": "^7.4.1",
@@ -42,6 +42,7 @@
42
42
  "@vitest/eslint-plugin": "^1.6.23",
43
43
  "eslint": "^10.7.0",
44
44
  "eslint-plugin-n": "^18.2.2",
45
+ "eslint-plugin-simple-import-sort": "^14.0.0",
45
46
  "globals": "^17.7.0",
46
47
  "tsdown": "^0.22.13",
47
48
  "typescript": "^5.9.3",