@keystrokehq/zendesk 0.0.1

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 (68) hide show
  1. package/README.md +188 -0
  2. package/dist/_official/index.d.mts +2 -0
  3. package/dist/_official/index.mjs +3 -0
  4. package/dist/_runtime/index.d.mts +1531 -0
  5. package/dist/_runtime/index.mjs +39 -0
  6. package/dist/chunk-DQk6qfdC.mjs +18 -0
  7. package/dist/client.d.mts +41 -0
  8. package/dist/client.mjs +137 -0
  9. package/dist/custom/connection.d.mts +2 -0
  10. package/dist/custom/connection.mjs +3 -0
  11. package/dist/custom/jobs.d.mts +8 -0
  12. package/dist/custom/jobs.mjs +8 -0
  13. package/dist/custom/organizations.d.mts +8 -0
  14. package/dist/custom/organizations.mjs +17 -0
  15. package/dist/custom/search.d.mts +8 -0
  16. package/dist/custom/search.mjs +11 -0
  17. package/dist/custom/tickets.d.mts +8 -0
  18. package/dist/custom/tickets.mjs +18 -0
  19. package/dist/custom/triggers.d.mts +2 -0
  20. package/dist/custom/triggers.mjs +3 -0
  21. package/dist/custom/users.d.mts +8 -0
  22. package/dist/custom/users.mjs +18 -0
  23. package/dist/custom.d.mts +7 -0
  24. package/dist/custom.mjs +8 -0
  25. package/dist/errors-BPAyL8gM.mjs +38 -0
  26. package/dist/events.d.mts +47 -0
  27. package/dist/events.mjs +58 -0
  28. package/dist/factory-BOeuadDj.mjs +9 -0
  29. package/dist/index.d.mts +1 -0
  30. package/dist/index.mjs +1 -0
  31. package/dist/integration-BGHdDCMn.mjs +83 -0
  32. package/dist/integration-BYDT8ccc.d.mts +98 -0
  33. package/dist/jobs-9tdPkCE1.d.mts +43 -0
  34. package/dist/jobs-BjDRvbsd.mjs +36 -0
  35. package/dist/messaging.d.mts +1 -0
  36. package/dist/messaging.mjs +1 -0
  37. package/dist/organizations-BHCFYHgM.mjs +277 -0
  38. package/dist/organizations-Ct_354Ea.d.mts +355 -0
  39. package/dist/platform/connection.d.mts +2 -0
  40. package/dist/platform/connection.mjs +3 -0
  41. package/dist/platform/jobs.d.mts +8 -0
  42. package/dist/platform/jobs.mjs +8 -0
  43. package/dist/platform/organizations.d.mts +8 -0
  44. package/dist/platform/organizations.mjs +17 -0
  45. package/dist/platform/search.d.mts +8 -0
  46. package/dist/platform/search.mjs +11 -0
  47. package/dist/platform/tickets.d.mts +8 -0
  48. package/dist/platform/tickets.mjs +18 -0
  49. package/dist/platform/triggers.d.mts +2 -0
  50. package/dist/platform/triggers.mjs +3 -0
  51. package/dist/platform/users.d.mts +8 -0
  52. package/dist/platform/users.mjs +18 -0
  53. package/dist/platform.d.mts +7 -0
  54. package/dist/platform.mjs +8 -0
  55. package/dist/schemas.d.mts +287 -0
  56. package/dist/schemas.mjs +101 -0
  57. package/dist/search-BpPJ9ccR.mjs +85 -0
  58. package/dist/search-CpISWBay.d.mts +83 -0
  59. package/dist/shared-BmxcJmfq.mjs +12 -0
  60. package/dist/tickets-BnTr_JO7.mjs +387 -0
  61. package/dist/tickets-DWxLBQOd.d.mts +633 -0
  62. package/dist/triggers-BIrYDGYF.d.mts +37 -0
  63. package/dist/triggers-ELU-gyey.mjs +107 -0
  64. package/dist/users-4ecCBdGw.d.mts +423 -0
  65. package/dist/users-BDj0GBC8.mjs +323 -0
  66. package/dist/verification.d.mts +9 -0
  67. package/dist/verification.mjs +41 -0
  68. package/package.json +172 -0
package/README.md ADDED
@@ -0,0 +1,188 @@
1
+ # @keystrokehq/zendesk
2
+
3
+ Zendesk Support integration for Keystroke workflows.
4
+
5
+ ## Overview
6
+
7
+ This package provides Zendesk Support operations and triggers for building workflows against:
8
+
9
+ - tickets
10
+ - users
11
+ - organizations
12
+ - search
13
+ - async job status
14
+
15
+ Zendesk uses a mode-first public surface from day one:
16
+
17
+ - `@keystrokehq/zendesk/platform/connection` for the Keystroke-managed OAuth connection
18
+ - `@keystrokehq/zendesk/platform/tickets`
19
+ - `@keystrokehq/zendesk/platform/users`
20
+ - `@keystrokehq/zendesk/platform/organizations`
21
+ - `@keystrokehq/zendesk/platform/search`
22
+ - `@keystrokehq/zendesk/platform/jobs`
23
+ - `@keystrokehq/zendesk/platform/triggers`
24
+ - `@keystrokehq/zendesk/custom/connection` for the bring-your-own API token connection
25
+ - `@keystrokehq/zendesk/custom/tickets`
26
+ - `@keystrokehq/zendesk/custom/users`
27
+ - `@keystrokehq/zendesk/custom/organizations`
28
+ - `@keystrokehq/zendesk/custom/search`
29
+ - `@keystrokehq/zendesk/custom/jobs`
30
+ - `@keystrokehq/zendesk/custom/triggers`
31
+
32
+ Shared support surfaces:
33
+
34
+ - `@keystrokehq/zendesk/client`
35
+ - `@keystrokehq/zendesk/schemas`
36
+ - `@keystrokehq/zendesk/events`
37
+ - `@keystrokehq/zendesk/verification`
38
+
39
+ The package root is intentionally non-canonical. Do not import from `@keystrokehq/zendesk` for workflow authoring.
40
+
41
+ ## Installation
42
+
43
+ ```bash
44
+ pnpm add @keystrokehq/zendesk
45
+ ```
46
+
47
+ ## Credentials
48
+
49
+ ### Platform mode
50
+
51
+ Platform mode uses a Keystroke-managed Zendesk OAuth app and resolves to:
52
+
53
+ - `ZENDESK_ACCESS_TOKEN`
54
+ - `ZENDESK_SUBDOMAIN`
55
+
56
+ ```ts
57
+ import { zendeskPlatform } from '@keystrokehq/zendesk/platform/connection';
58
+ ```
59
+
60
+ Internal provider-app secrets used for OAuth and webhook verification are not part of the public auth contract.
61
+
62
+ ### Custom mode
63
+
64
+ Custom mode uses a bring-your-own Zendesk API token connection:
65
+
66
+ - `ZENDESK_SUBDOMAIN`
67
+ - `ZENDESK_EMAIL`
68
+ - `ZENDESK_API_TOKEN`
69
+
70
+ ```ts
71
+ import { zendeskCustom } from '@keystrokehq/zendesk/custom/connection';
72
+ ```
73
+
74
+ ## Triggers
75
+
76
+ Platform mode exposes both webhook and polling helpers:
77
+
78
+ ```ts
79
+ import { polling, webhooks } from '@keystrokehq/zendesk/platform/triggers';
80
+
81
+ const userCreated = webhooks.userCreated({
82
+ transform: (event) => ({
83
+ eventId: event.eventId,
84
+ subject: event.subject,
85
+ }),
86
+ });
87
+
88
+ const recentTickets = polling.recentTickets({
89
+ schedule: '10m',
90
+ transform: (event) => ({
91
+ eventId: event.eventId,
92
+ ticketCount: event.tickets.length,
93
+ }),
94
+ });
95
+ ```
96
+
97
+ Custom mode exposes polling helpers on day one:
98
+
99
+ ```ts
100
+ import { polling } from '@keystrokehq/zendesk/custom/triggers';
101
+
102
+ const recentTickets = polling.recentTickets({
103
+ schedule: '10m',
104
+ });
105
+ ```
106
+
107
+ ## Operations
108
+
109
+ Operations are Keystroke steps and are called with `.run(...)`.
110
+
111
+ ### Tickets
112
+
113
+ ```ts
114
+ import {
115
+ createTicket,
116
+ getTicket,
117
+ listTickets,
118
+ mergeTickets,
119
+ replyToTicket,
120
+ updateManyTickets,
121
+ } from '@keystrokehq/zendesk/platform/tickets';
122
+ ```
123
+
124
+ ### Users
125
+
126
+ ```ts
127
+ import {
128
+ createManyUsers,
129
+ getCurrentUser,
130
+ getUser,
131
+ searchUsers,
132
+ updateUser,
133
+ } from '@keystrokehq/zendesk/custom/users';
134
+ ```
135
+
136
+ ### Organizations and search
137
+
138
+ ```ts
139
+ import {
140
+ autocompleteOrganizations,
141
+ countOrganizations,
142
+ createOrganization,
143
+ } from '@keystrokehq/zendesk/platform/organizations';
144
+ import { countSearchResults, search } from '@keystrokehq/zendesk/custom/search';
145
+ ```
146
+
147
+ ### Async job status
148
+
149
+ ```ts
150
+ import { getJobStatus } from '@keystrokehq/zendesk/platform/jobs';
151
+ ```
152
+
153
+ ## Type Safety
154
+
155
+ Shared schemas and curated event payloads are available from explicit support surfaces:
156
+
157
+ ```ts
158
+ import type { ZendeskRecentTicketsEvent, ZendeskUserCreatedEvent } from '@keystrokehq/zendesk/events';
159
+ import { zendeskTicketSchema } from '@keystrokehq/zendesk/schemas';
160
+ ```
161
+
162
+ ## Webhook Verification
163
+
164
+ Platform webhook triggers verify Zendesk signatures before any user-authored trigger code runs.
165
+
166
+ Low-level helpers are available from `@keystrokehq/zendesk/verification` when needed.
167
+
168
+ ## Integration Testing
169
+
170
+ Live provider coverage is exposed through `test:int` and intentionally skips by credential mode when the required Zendesk env is absent.
171
+
172
+ Required env in `.env.test`:
173
+
174
+ - Custom mode: `ZENDESK_CUSTOM_SUBDOMAIN`, `ZENDESK_CUSTOM_EMAIL`, `ZENDESK_CUSTOM_API_TOKEN`
175
+ - Platform mode: `ZENDESK_PLATFORM_SUBDOMAIN`, `ZENDESK_PLATFORM_ACCESS_TOKEN`
176
+ - Platform webhook delivery: `ZENDESK_PLATFORM_WEBHOOK_SIGNING_SECRET`
177
+
178
+ Run the package validation suite with:
179
+
180
+ ```bash
181
+ turbo run test:int --filter=@keystrokehq/zendesk
182
+ ```
183
+
184
+ ## Migration Notes
185
+
186
+ - Prefer explicit `platform/<domain>` and `custom/<domain>` imports in all docs and workflows.
187
+ - Use `client`, `schemas`, `events`, and `verification` for shared support surfaces.
188
+ - Do not import from the package root for workflow authoring.
@@ -0,0 +1,2 @@
1
+ import { a as zendeskCustomOfficialIntegration, c as zendeskPlatformOfficialIntegration, i as zendeskCustomBundle, l as zendeskPlatformAppCredentialSet, s as zendeskPlatformBundle, u as zendeskPlatformProviderSeed } from "../integration-BYDT8ccc.mjs";
2
+ export { zendeskCustomBundle, zendeskCustomOfficialIntegration, zendeskPlatformAppCredentialSet, zendeskPlatformBundle, zendeskPlatformOfficialIntegration, zendeskPlatformProviderSeed };
@@ -0,0 +1,3 @@
1
+ import { a as zendeskPlatformBundle, c as zendeskPlatformProviderSeed, n as zendeskCustomBundle, o as zendeskPlatformOfficialIntegration, r as zendeskCustomOfficialIntegration, s as zendeskPlatformAppCredentialSet } from "../integration-BGHdDCMn.mjs";
2
+
3
+ export { zendeskCustomBundle, zendeskCustomOfficialIntegration, zendeskPlatformAppCredentialSet, zendeskPlatformBundle, zendeskPlatformOfficialIntegration, zendeskPlatformProviderSeed };