@decaf-ts/integrations 0.12.0 → 0.14.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.
Files changed (144) hide show
  1. package/dist/integrations.cjs +1 -1
  2. package/lib/cjs/calendar/environment.cjs +48 -0
  3. package/lib/cjs/calendar/environment.cjs.map +1 -0
  4. package/lib/cjs/calendar/google-calendar/GoogleCalendarService.cjs +338 -0
  5. package/lib/cjs/calendar/google-calendar/GoogleCalendarService.cjs.map +1 -0
  6. package/lib/cjs/calendar/google-calendar/index.cjs +20 -0
  7. package/lib/cjs/calendar/google-calendar/index.cjs.map +1 -0
  8. package/lib/cjs/comms/discord/DiscordService.cjs +318 -0
  9. package/lib/cjs/comms/discord/DiscordService.cjs.map +1 -0
  10. package/lib/cjs/comms/discord/index.cjs +19 -0
  11. package/lib/cjs/comms/discord/index.cjs.map +1 -0
  12. package/lib/cjs/comms/environment.cjs +16 -0
  13. package/lib/cjs/comms/environment.cjs.map +1 -1
  14. package/lib/cjs/comms/index.cjs +3 -0
  15. package/lib/cjs/comms/index.cjs.map +1 -1
  16. package/lib/cjs/comms/outlook/MicrosoftOutlookService.cjs +325 -0
  17. package/lib/cjs/comms/outlook/MicrosoftOutlookService.cjs.map +1 -0
  18. package/lib/cjs/comms/outlook/index.cjs +19 -0
  19. package/lib/cjs/comms/outlook/index.cjs.map +1 -0
  20. package/lib/cjs/comms/whatsapp/WhatsAppService.cjs +274 -0
  21. package/lib/cjs/comms/whatsapp/WhatsAppService.cjs.map +1 -0
  22. package/lib/cjs/comms/whatsapp/index.cjs +19 -0
  23. package/lib/cjs/comms/whatsapp/index.cjs.map +1 -0
  24. package/lib/cjs/index.cjs +3 -3
  25. package/lib/cjs/io/confluence/ConfluenceService.cjs +317 -0
  26. package/lib/cjs/io/confluence/ConfluenceService.cjs.map +1 -0
  27. package/lib/cjs/io/confluence/index.cjs +19 -0
  28. package/lib/cjs/io/confluence/index.cjs.map +1 -0
  29. package/lib/cjs/io/environment.cjs +28 -0
  30. package/lib/cjs/io/environment.cjs.map +1 -1
  31. package/lib/cjs/io/google-docs/GoogleDocsService.cjs +275 -0
  32. package/lib/cjs/io/google-docs/GoogleDocsService.cjs.map +1 -0
  33. package/lib/cjs/io/google-docs/index.cjs +19 -0
  34. package/lib/cjs/io/google-docs/index.cjs.map +1 -0
  35. package/lib/cjs/io/index.cjs +5 -0
  36. package/lib/cjs/io/index.cjs.map +1 -1
  37. package/lib/cjs/io/jira/JiraService.cjs +354 -0
  38. package/lib/cjs/io/jira/JiraService.cjs.map +1 -0
  39. package/lib/cjs/io/jira/index.cjs +19 -0
  40. package/lib/cjs/io/jira/index.cjs.map +1 -0
  41. package/lib/cjs/io/microsoft-excel/MicrosoftExcelService.cjs +253 -0
  42. package/lib/cjs/io/microsoft-excel/MicrosoftExcelService.cjs.map +1 -0
  43. package/lib/cjs/io/microsoft-excel/index.cjs +19 -0
  44. package/lib/cjs/io/microsoft-excel/index.cjs.map +1 -0
  45. package/lib/cjs/io/microsoft-sharepoint/MicrosoftSharePointService.cjs +261 -0
  46. package/lib/cjs/io/microsoft-sharepoint/MicrosoftSharePointService.cjs.map +1 -0
  47. package/lib/cjs/io/microsoft-sharepoint/index.cjs +19 -0
  48. package/lib/cjs/io/microsoft-sharepoint/index.cjs.map +1 -0
  49. package/lib/esm/calendar/environment.js +44 -0
  50. package/lib/esm/calendar/environment.js.map +1 -0
  51. package/lib/esm/calendar/google-calendar/GoogleCalendarService.js +333 -0
  52. package/lib/esm/calendar/google-calendar/GoogleCalendarService.js.map +1 -0
  53. package/lib/esm/calendar/google-calendar/index.js +3 -0
  54. package/lib/esm/calendar/google-calendar/index.js.map +1 -0
  55. package/lib/esm/comms/discord/DiscordService.js +313 -0
  56. package/lib/esm/comms/discord/DiscordService.js.map +1 -0
  57. package/lib/esm/comms/discord/index.js +2 -0
  58. package/lib/esm/comms/discord/index.js.map +1 -0
  59. package/lib/esm/comms/environment.js +16 -0
  60. package/lib/esm/comms/environment.js.map +1 -1
  61. package/lib/esm/comms/index.js +3 -0
  62. package/lib/esm/comms/index.js.map +1 -1
  63. package/lib/esm/comms/outlook/MicrosoftOutlookService.js +320 -0
  64. package/lib/esm/comms/outlook/MicrosoftOutlookService.js.map +1 -0
  65. package/lib/esm/comms/outlook/index.js +2 -0
  66. package/lib/esm/comms/outlook/index.js.map +1 -0
  67. package/lib/esm/comms/whatsapp/WhatsAppService.js +269 -0
  68. package/lib/esm/comms/whatsapp/WhatsAppService.js.map +1 -0
  69. package/lib/esm/comms/whatsapp/index.js +2 -0
  70. package/lib/esm/comms/whatsapp/index.js.map +1 -0
  71. package/lib/esm/index.js +3 -3
  72. package/lib/esm/io/confluence/ConfluenceService.js +312 -0
  73. package/lib/esm/io/confluence/ConfluenceService.js.map +1 -0
  74. package/lib/esm/io/confluence/index.js +2 -0
  75. package/lib/esm/io/confluence/index.js.map +1 -0
  76. package/lib/esm/io/environment.js +28 -0
  77. package/lib/esm/io/environment.js.map +1 -1
  78. package/lib/esm/io/google-docs/GoogleDocsService.js +270 -0
  79. package/lib/esm/io/google-docs/GoogleDocsService.js.map +1 -0
  80. package/lib/esm/io/google-docs/index.js +2 -0
  81. package/lib/esm/io/google-docs/index.js.map +1 -0
  82. package/lib/esm/io/index.js +5 -0
  83. package/lib/esm/io/index.js.map +1 -1
  84. package/lib/esm/io/jira/JiraService.js +349 -0
  85. package/lib/esm/io/jira/JiraService.js.map +1 -0
  86. package/lib/esm/io/jira/index.js +2 -0
  87. package/lib/esm/io/jira/index.js.map +1 -0
  88. package/lib/esm/io/microsoft-excel/MicrosoftExcelService.js +248 -0
  89. package/lib/esm/io/microsoft-excel/MicrosoftExcelService.js.map +1 -0
  90. package/lib/esm/io/microsoft-excel/index.js +2 -0
  91. package/lib/esm/io/microsoft-excel/index.js.map +1 -0
  92. package/lib/esm/io/microsoft-sharepoint/MicrosoftSharePointService.js +256 -0
  93. package/lib/esm/io/microsoft-sharepoint/MicrosoftSharePointService.js.map +1 -0
  94. package/lib/esm/io/microsoft-sharepoint/index.js +2 -0
  95. package/lib/esm/io/microsoft-sharepoint/index.js.map +1 -0
  96. package/lib/types/calendar/environment.d.cts +48 -0
  97. package/lib/types/calendar/environment.d.mts +48 -0
  98. package/lib/types/calendar/google-calendar/GoogleCalendarService.d.cts +316 -0
  99. package/lib/types/calendar/google-calendar/GoogleCalendarService.d.mts +316 -0
  100. package/lib/types/calendar/google-calendar/index.d.cts +2 -0
  101. package/lib/types/calendar/google-calendar/index.d.mts +2 -0
  102. package/lib/types/comms/discord/DiscordService.d.cts +285 -0
  103. package/lib/types/comms/discord/DiscordService.d.mts +285 -0
  104. package/lib/types/comms/discord/index.d.cts +1 -0
  105. package/lib/types/comms/discord/index.d.mts +1 -0
  106. package/lib/types/comms/environment.d.cts +34 -8
  107. package/lib/types/comms/environment.d.mts +34 -8
  108. package/lib/types/comms/index.d.cts +3 -0
  109. package/lib/types/comms/index.d.mts +3 -0
  110. package/lib/types/comms/outlook/MicrosoftOutlookService.d.cts +282 -0
  111. package/lib/types/comms/outlook/MicrosoftOutlookService.d.mts +282 -0
  112. package/lib/types/comms/outlook/index.d.cts +1 -0
  113. package/lib/types/comms/outlook/index.d.mts +1 -0
  114. package/lib/types/comms/whatsapp/WhatsAppService.d.cts +258 -0
  115. package/lib/types/comms/whatsapp/WhatsAppService.d.mts +258 -0
  116. package/lib/types/comms/whatsapp/index.d.cts +1 -0
  117. package/lib/types/comms/whatsapp/index.d.mts +1 -0
  118. package/lib/types/index.d.cts +2 -2
  119. package/lib/types/index.d.mts +2 -2
  120. package/lib/types/io/confluence/ConfluenceService.d.cts +250 -0
  121. package/lib/types/io/confluence/ConfluenceService.d.mts +250 -0
  122. package/lib/types/io/confluence/index.d.cts +1 -0
  123. package/lib/types/io/confluence/index.d.mts +1 -0
  124. package/lib/types/io/environment.d.cts +52 -12
  125. package/lib/types/io/environment.d.mts +52 -12
  126. package/lib/types/io/google-docs/GoogleDocsService.d.cts +188 -0
  127. package/lib/types/io/google-docs/GoogleDocsService.d.mts +188 -0
  128. package/lib/types/io/google-docs/index.d.cts +1 -0
  129. package/lib/types/io/google-docs/index.d.mts +1 -0
  130. package/lib/types/io/index.d.cts +5 -0
  131. package/lib/types/io/index.d.mts +5 -0
  132. package/lib/types/io/jira/JiraService.d.cts +300 -0
  133. package/lib/types/io/jira/JiraService.d.mts +300 -0
  134. package/lib/types/io/jira/index.d.cts +1 -0
  135. package/lib/types/io/jira/index.d.mts +1 -0
  136. package/lib/types/io/microsoft-excel/MicrosoftExcelService.d.cts +230 -0
  137. package/lib/types/io/microsoft-excel/MicrosoftExcelService.d.mts +230 -0
  138. package/lib/types/io/microsoft-excel/index.d.cts +1 -0
  139. package/lib/types/io/microsoft-excel/index.d.mts +1 -0
  140. package/lib/types/io/microsoft-sharepoint/MicrosoftSharePointService.d.cts +226 -0
  141. package/lib/types/io/microsoft-sharepoint/MicrosoftSharePointService.d.mts +226 -0
  142. package/lib/types/io/microsoft-sharepoint/index.d.cts +1 -0
  143. package/lib/types/io/microsoft-sharepoint/index.d.mts +1 -0
  144. package/package.json +101 -5
@@ -0,0 +1,270 @@
1
+ /**
2
+ * @module integrations/io/google-docs/service
3
+ * @summary Google Docs API integration service for document content operations.
4
+ * @description Exposes Google Docs document operations (get, create, batch
5
+ * update, append text, and replace-all) as an undecorated client-based service
6
+ * built on {@link HttpApiService}. Configuration comes from an explicit
7
+ * `GoogleDocsServiceConfig` or the `io.googleDocs` environment slice. An OAuth
8
+ * access token is sent as a bearer token when present; otherwise an API key is
9
+ * sent as `X-Goog-Api-Key` (writes generally require OAuth). Credentials are
10
+ * referenced from configuration (and, from as-graph nodes, from the resolved
11
+ * `google-docs` credential secret) and are never embedded in source. Failures
12
+ * are mapped to decaf errors via {@link httpError}.
13
+ */
14
+ import { InternalError } from "@decaf-ts/db-decorators";
15
+ import { IoEnvironment } from "./../environment.js";
16
+ import { envNumber, envString } from "./../../shared/environmentValue.js";
17
+ import { HttpApiService, httpError, } from "./../../shared/http/index.js";
18
+ /**
19
+ * @description Google Docs API integration service
20
+ * @summary An undecorated HTTP service for reading and creating documents,
21
+ * running raw batch updates, appending text, and replacing all matching text.
22
+ * Every operation needs either an OAuth token or an API key; missing
23
+ * credentials or identifiers raise `InternalError`, and transport failures are
24
+ * mapped to decaf errors via {@link httpError}.
25
+ * @class GoogleDocsService
26
+ * @extends HttpApiService
27
+ * @category IO
28
+ * @example
29
+ * ```ts
30
+ * import { GoogleDocsService } from "@decaf-ts/integrations/io/google-docs";
31
+ *
32
+ * const docs = new GoogleDocsService();
33
+ * await docs.initialize({
34
+ * token: process.env.GRAPH_CREDENTIAL_GOOGLE_DOCS_TOKEN,
35
+ * });
36
+ * await docs.appendText(process.env.GOOGLE_DOC_ID ?? "", "New paragraph");
37
+ * ```
38
+ * @mermaid
39
+ * sequenceDiagram
40
+ * autonumber
41
+ * participant Caller
42
+ * participant Service as GoogleDocsService
43
+ * participant API as Google Docs API
44
+ * Caller->>Service: appendText(documentId, text)
45
+ * activate Service
46
+ * Service->>Service: requireAuth()
47
+ * Service->>API: GET /documents/{id}
48
+ * activate API
49
+ * API-->>Service: body content endIndex
50
+ * deactivate API
51
+ * Service->>API: POST /documents/{id}:batchUpdate
52
+ * activate API
53
+ * API-->>Service: batch update result
54
+ * deactivate API
55
+ * Service-->>Caller: batch update result
56
+ * deactivate Service
57
+ * @memberOf module:integrations/io/google-docs/service
58
+ */
59
+ export class GoogleDocsService extends HttpApiService {
60
+ constructor() {
61
+ super(...arguments);
62
+ /**
63
+ * @description The provider name used in error messages
64
+ */
65
+ this.serviceName = "Google Docs";
66
+ }
67
+ /**
68
+ * @description The Google Docs API base URL
69
+ * @summary Used when the resolved config carries no `baseUrl`.
70
+ * @returns {string} `"https://docs.googleapis.com/v1"`.
71
+ */
72
+ defaultBaseUrl() {
73
+ return "https://docs.googleapis.com/v1";
74
+ }
75
+ /**
76
+ * @description Builds the Google Docs authentication headers
77
+ * @summary Prefers `Authorization: Bearer <token>`, falls back to
78
+ * `X-Goog-Api-Key: <apiKey>`, and returns no headers when neither is set.
79
+ * @param {GoogleDocsServiceConfig} config - The resolved service configuration.
80
+ * @returns {Record<string, string>} The authentication headers.
81
+ */
82
+ authHeaders(config) {
83
+ if (config.token)
84
+ return { Authorization: `Bearer ${config.token}` };
85
+ if (config.apiKey)
86
+ return { "X-Goog-Api-Key": config.apiKey };
87
+ return {};
88
+ }
89
+ /**
90
+ * @description Reads the Google Docs credentials and defaults from the environment
91
+ * @summary Reads the `io.googleDocs` slice and returns a partial config when
92
+ * a token or API key is configured, `undefined` otherwise. Values pass
93
+ * through `envString`/`envNumber` to reject unset-leaf proxies.
94
+ * @returns {Partial<GoogleDocsServiceConfig> | undefined} A partial config, or `undefined` when no credential is configured.
95
+ */
96
+ configFromEnvironment() {
97
+ const env = IoEnvironment.io.googleDocs;
98
+ const token = envString(env?.token);
99
+ const apiKey = envString(env?.apiKey);
100
+ if (!token && !apiKey)
101
+ return undefined;
102
+ return {
103
+ token,
104
+ apiKey,
105
+ baseUrl: envString(env.baseUrl),
106
+ timeout: envNumber(env.timeout),
107
+ };
108
+ }
109
+ /**
110
+ * @description Asserts that an OAuth token or API key is configured
111
+ * @summary Called by every operation before it touches the network.
112
+ * @returns {void}
113
+ * @throws {InternalError} When neither a token nor an API key is configured.
114
+ */
115
+ requireAuth() {
116
+ if (!this.config.token && !this.config.apiKey) {
117
+ throw new InternalError("Google Docs requires an OAuth token or an API key");
118
+ }
119
+ }
120
+ /**
121
+ * @description Fetches a Google Docs document
122
+ * @summary `GET`s `/documents/<id>` and returns the full document payload.
123
+ * @param {string} documentId - The document ID.
124
+ * @returns {Promise<unknown>} The document payload.
125
+ * @throws {InternalError} When no credential is configured or the document ID is empty.
126
+ * @throws {NotFoundError} When the document does not exist (HTTP 404).
127
+ * @throws {BadRequestError} When Google rejects the request.
128
+ */
129
+ async getDocument(documentId) {
130
+ this.requireAuth();
131
+ if (!documentId) {
132
+ throw new InternalError("Google Docs requires a document id");
133
+ }
134
+ try {
135
+ const response = await this.client.get(`/documents/${encodeURIComponent(documentId)}`);
136
+ return response.data;
137
+ }
138
+ catch (error) {
139
+ throw httpError("Google Docs", "get document", error);
140
+ }
141
+ }
142
+ /**
143
+ * @description Creates a Google Docs document
144
+ * @summary `POST`s a new document with the given title and returns its
145
+ * payload (including `documentId`).
146
+ * @param {string} title - The new document title.
147
+ * @returns {Promise<unknown>} The created document payload.
148
+ * @throws {InternalError} When no credential is configured or the title is empty.
149
+ * @throws {BadRequestError} When Google rejects the request.
150
+ */
151
+ async createDocument(title) {
152
+ this.requireAuth();
153
+ if (!title) {
154
+ throw new InternalError("Google Docs requires a document title");
155
+ }
156
+ try {
157
+ const response = await this.client.post("/documents", { title });
158
+ return response.data;
159
+ }
160
+ catch (error) {
161
+ throw httpError("Google Docs", "create document", error);
162
+ }
163
+ }
164
+ /**
165
+ * @description Applies a raw Google Docs batch update
166
+ * @summary `POST`s the `requests` array to `/documents/<id>:batchUpdate`
167
+ * unchanged, allowing any Docs API request type.
168
+ * @param {string} documentId - The document ID.
169
+ * @param {unknown[]} requests - The Docs API request objects.
170
+ * @returns {Promise<unknown>} The batch update response payload.
171
+ * @throws {InternalError} When no credential is configured, or the document ID or requests are missing.
172
+ * @throws {NotFoundError} When the document does not exist (HTTP 404).
173
+ * @throws {BadRequestError} When Google rejects a request.
174
+ */
175
+ async batchUpdate(documentId, requests) {
176
+ this.requireAuth();
177
+ if (!documentId || !Array.isArray(requests) || !requests.length) {
178
+ throw new InternalError("Google Docs batchUpdate requires a document id and requests");
179
+ }
180
+ try {
181
+ const response = await this.client.post(`/documents/${encodeURIComponent(documentId)}:batchUpdate`, { requests });
182
+ return response.data;
183
+ }
184
+ catch (error) {
185
+ throw httpError("Google Docs", "batch update", error);
186
+ }
187
+ }
188
+ /**
189
+ * @description Appends text to the end of a Google Docs document
190
+ * @summary Reads the document to find the final `endIndex`, then inserts the
191
+ * text just before it through a `batchUpdate`.
192
+ * @param {string} documentId - The document ID.
193
+ * @param {string} text - The text to append.
194
+ * @returns {Promise<unknown>} The batch update response payload.
195
+ * @throws {InternalError} When no credential is configured, or the document ID or text is empty.
196
+ * @throws {NotFoundError} When the document does not exist (HTTP 404).
197
+ * @throws {BadRequestError} When Google rejects the update.
198
+ */
199
+ async appendText(documentId, text) {
200
+ this.requireAuth();
201
+ if (!documentId || !text) {
202
+ throw new InternalError("Google Docs appendText requires a document id and text");
203
+ }
204
+ try {
205
+ const document = await this.client.get(`/documents/${encodeURIComponent(documentId)}`);
206
+ const content = document.data.body?.content ?? [];
207
+ const last = content[content.length - 1];
208
+ const endIndex = last?.endIndex ?? 1;
209
+ const response = await this.client.post(`/documents/${encodeURIComponent(documentId)}:batchUpdate`, {
210
+ requests: [
211
+ {
212
+ insertText: {
213
+ location: { index: Math.max(endIndex - 1, 1) },
214
+ text,
215
+ },
216
+ },
217
+ ],
218
+ });
219
+ return response.data;
220
+ }
221
+ catch (error) {
222
+ throw httpError("Google Docs", "append text", error);
223
+ }
224
+ }
225
+ /**
226
+ * @description Replaces all matching text in a Google Docs document
227
+ * @summary Sends a `replaceAllText` request honoring the `matchCase` option
228
+ * and returns the batch update response payload.
229
+ * @param {GoogleDocsReplaceInput} input - The document, find/replace text, and case option.
230
+ * @returns {Promise<unknown>} The batch update response payload.
231
+ * @throws {InternalError} When no credential is configured, or the document ID or find text is empty.
232
+ * @throws {NotFoundError} When the document does not exist (HTTP 404).
233
+ * @throws {BadRequestError} When Google rejects the update.
234
+ * @example
235
+ * ```ts
236
+ * await docs.replaceAllText({
237
+ * documentId: "abc123",
238
+ * find: "TODO",
239
+ * replace: "DONE",
240
+ * matchCase: true,
241
+ * });
242
+ * ```
243
+ */
244
+ async replaceAllText(input) {
245
+ this.requireAuth();
246
+ if (!input.documentId || !input.find) {
247
+ throw new InternalError("Google Docs replaceAllText requires a document id and find text");
248
+ }
249
+ try {
250
+ const response = await this.client.post(`/documents/${encodeURIComponent(input.documentId)}:batchUpdate`, {
251
+ requests: [
252
+ {
253
+ replaceAllText: {
254
+ containsText: {
255
+ text: input.find,
256
+ matchCase: input.matchCase ?? false,
257
+ },
258
+ replaceText: input.replace ?? "",
259
+ },
260
+ },
261
+ ],
262
+ });
263
+ return response.data;
264
+ }
265
+ catch (error) {
266
+ throw httpError("Google Docs", "replace all text", error);
267
+ }
268
+ }
269
+ }
270
+ //# sourceMappingURL=GoogleDocsService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GoogleDocsService.js","sourceRoot":"","sources":["../../../../src/io/google-docs/GoogleDocsService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,4BAAuB;AAC/C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,2CAAsC;AACrE,OAAO,EACL,cAAc,EAEd,SAAS,GACV,qCAA0B;AA8D3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,OAAO,iBAAkB,SAAQ,cAAuC;IAA9E;;QACE;;WAEG;QACgB,gBAAW,GAAG,aAAa,CAAC;IAwOjD,CAAC;IAtOC;;;;OAIG;IACO,cAAc;QACtB,OAAO,gCAAgC,CAAC;IAC1C,CAAC;IAED;;;;;;OAMG;IACO,WAAW,CACnB,MAA+B;QAE/B,IAAI,MAAM,CAAC,KAAK;YAAE,OAAO,EAAE,aAAa,EAAE,UAAU,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC;QACrE,IAAI,MAAM,CAAC,MAAM;YAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;QAC9D,OAAO,EAAE,CAAC;IACZ,CAAC;IAED;;;;;;OAMG;IACO,qBAAqB;QAG7B,MAAM,GAAG,GAAG,aAAa,CAAC,EAAE,CAAC,UAAU,CAAC;QACxC,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAA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WAAW,EAAE,KAAK,CAAC,OAAO,IAAI,EAAE;yBACjC;qBACF;iBACF;aACF,CACF,CAAC;YACF,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,SAAS,CAAC,aAAa,EAAE,kBAAkB,EAAE,KAAK,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export * from "./GoogleDocsService.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/io/google-docs/index.ts"],"names":[],"mappings":"AAAA,uCAAoC"}
@@ -9,5 +9,10 @@ export * from "./airtable/index.js";
9
9
  export * from "./google-sheets/index.js";
10
10
  export * from "./graphql/index.js";
11
11
  export * from "./spreadsheet/index.js";
12
+ export * from "./microsoft-excel/index.js";
13
+ export * from "./confluence/index.js";
14
+ export * from "./jira/index.js";
15
+ export * from "./google-docs/index.js";
16
+ export * from "./microsoft-sharepoint/index.js";
12
17
  export * from "./environment.js";
13
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/io/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,oCAA2B;AAC3B,yCAAgC;AAChC,mCAA0B;AAC1B,uCAA8B;AAC9B,iCAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/io/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,oCAA2B;AAC3B,yCAAgC;AAChC,mCAA0B;AAC1B,uCAA8B;AAC9B,2CAAkC;AAClC,sCAA6B;AAC7B,gCAAuB;AACvB,uCAA8B;AAC9B,gDAAuC;AACvC,iCAA8B"}
@@ -0,0 +1,349 @@
1
+ /**
2
+ * @module integrations/io/jira/service
3
+ * @summary Jira REST API integration service for issues, comments, and workflows.
4
+ * @description Exposes Jira issue operations (create, read, update, delete,
5
+ * comment, transition, and JQL search) through the Jira REST `api/2` surface as
6
+ * an undecorated client-based service built on {@link HttpApiService}.
7
+ * Configuration comes from an explicit `JiraServiceConfig` or the `io.jira`
8
+ * environment slice. When both `username` and `token` are configured the
9
+ * service sends HTTP Basic authentication (API token as the password);
10
+ * otherwise the token is sent as a bearer token. The site `baseUrl` is
11
+ * required. Credentials are referenced from configuration (and, from as-graph
12
+ * nodes, from the resolved `jira` credential secret) and are never embedded in
13
+ * source. Failures are mapped to decaf errors via {@link httpError}.
14
+ */
15
+ import { InternalError } from "@decaf-ts/db-decorators";
16
+ import { IoEnvironment } from "./../environment.js";
17
+ import { envNumber, envString } from "./../../shared/environmentValue.js";
18
+ import { HttpApiService, httpError, } from "./../../shared/http/index.js";
19
+ /** Default issue type written when a create does not specify one (`"Task"`). */
20
+ const DEFAULT_ISSUE_TYPE = "Task";
21
+ /**
22
+ * @description Jira REST API integration service
23
+ * @summary An undecorated HTTP service for issue CRUD, comments, workflow
24
+ * transitions, and JQL search. The site base URL and API token are required;
25
+ * supplying a `username` switches authentication to Basic, and transport
26
+ * failures are mapped to decaf errors via {@link httpError}.
27
+ * @class JiraService
28
+ * @extends HttpApiService
29
+ * @category IO
30
+ * @example
31
+ * ```ts
32
+ * import { JiraService } from "@decaf-ts/integrations/io/jira";
33
+ *
34
+ * const jira = new JiraService();
35
+ * await jira.initialize({
36
+ * baseUrl: "https://example.atlassian.net",
37
+ * username: process.env.JIRA_USERNAME,
38
+ * token: process.env.GRAPH_CREDENTIAL_JIRA_TOKEN,
39
+ * });
40
+ * const issue = await jira.createIssue({
41
+ * projectKey: "OPS",
42
+ * summary: "Deployment failed",
43
+ * });
44
+ * ```
45
+ * @mermaid
46
+ * sequenceDiagram
47
+ * autonumber
48
+ * participant Caller
49
+ * participant Service as JiraService
50
+ * participant API as Jira REST API
51
+ * Caller->>Service: createIssue(input)
52
+ * activate Service
53
+ * Service->>Service: requireCredentials()
54
+ * Service->>API: POST /rest/api/2/issue
55
+ * activate API
56
+ * API-->>Service: { id, key }
57
+ * deactivate API
58
+ * Service-->>Caller: created issue
59
+ * deactivate Service
60
+ * @memberOf module:integrations/io/jira/service
61
+ */
62
+ export class JiraService extends HttpApiService {
63
+ constructor() {
64
+ super(...arguments);
65
+ /**
66
+ * @description The provider name used in error messages
67
+ */
68
+ this.serviceName = "Jira";
69
+ }
70
+ /**
71
+ * @description The default base URL for Jira
72
+ * @summary Returns an empty string; Jira is site-hosted, so the resolved
73
+ * `baseUrl` (from config or `io.jira.baseUrl`) is required.
74
+ * @returns {string} An empty string.
75
+ */
76
+ defaultBaseUrl() {
77
+ return "";
78
+ }
79
+ /**
80
+ * @description Builds the Jira authentication headers
81
+ * @summary Uses HTTP Basic (`username:token`) when both values are present,
82
+ * otherwise a bearer token when only `token` is present. Always requests
83
+ * JSON responses.
84
+ * @param {JiraServiceConfig} config - The resolved service configuration.
85
+ * @returns {Record<string, string>} The authorization and accept headers.
86
+ */
87
+ authHeaders(config) {
88
+ if (config.username && config.token) {
89
+ const encoded = Buffer.from(`${config.username}:${config.token}`, "utf8").toString("base64");
90
+ return {
91
+ Authorization: `Basic ${encoded}`,
92
+ Accept: "application/json",
93
+ };
94
+ }
95
+ return config.token
96
+ ? { Authorization: `Bearer ${config.token}`, Accept: "application/json" }
97
+ : { Accept: "application/json" };
98
+ }
99
+ /**
100
+ * @description Reads the Jira credentials and defaults from the environment
101
+ * @summary Reads the `io.jira` slice and returns a partial config when an
102
+ * API token is configured, `undefined` otherwise. Values pass through
103
+ * `envString`/`envNumber` to reject unset-leaf proxies.
104
+ * @returns {Partial<JiraServiceConfig> | undefined} A partial config, or `undefined` when no Jira token is configured.
105
+ */
106
+ configFromEnvironment() {
107
+ const env = IoEnvironment.io.jira;
108
+ const token = envString(env?.token);
109
+ if (!token)
110
+ return undefined;
111
+ return {
112
+ token,
113
+ username: envString(env.username),
114
+ baseUrl: envString(env.baseUrl),
115
+ timeout: envNumber(env.timeout),
116
+ };
117
+ }
118
+ /**
119
+ * @description Asserts that the Jira token and site base URL are configured
120
+ * @summary Called by every operation before it touches the network.
121
+ * @returns {void}
122
+ * @throws {InternalError} When no API token or base URL is configured.
123
+ */
124
+ requireCredentials() {
125
+ if (!this.config.token) {
126
+ throw new InternalError("Jira requires an API token");
127
+ }
128
+ if (!this.config.baseUrl) {
129
+ throw new InternalError("Jira requires a base URL");
130
+ }
131
+ }
132
+ /**
133
+ * @description Builds the encoded issue path
134
+ * @summary Validates the issue key and URL-encodes it into
135
+ * `/rest/api/2/issue/<key>`.
136
+ * @param {string} issueKey - The Jira issue key.
137
+ * @returns {string} The issue API path.
138
+ * @throws {InternalError} When `issueKey` is empty.
139
+ */
140
+ issuePath(issueKey) {
141
+ if (!issueKey) {
142
+ throw new InternalError("Jira requires an issue key");
143
+ }
144
+ return `/rest/api/2/issue/${encodeURIComponent(issueKey)}`;
145
+ }
146
+ /**
147
+ * @description Creates a Jira issue
148
+ * @summary `POST`s the project, summary, issue type (default `Task`),
149
+ * optional description, and extra fields to `/rest/api/2/issue`.
150
+ * @param {JiraIssueInput} input - The issue definition.
151
+ * @returns {Promise<unknown>} The created issue payload (including `id` and `key`).
152
+ * @throws {InternalError} When credentials are missing, or the project key or summary is empty.
153
+ * @throws {BadRequestError} When Jira rejects the issue.
154
+ */
155
+ async createIssue(input) {
156
+ this.requireCredentials();
157
+ if (!input.projectKey || !input.summary) {
158
+ throw new InternalError("Jira createIssue requires a project key and summary");
159
+ }
160
+ try {
161
+ const response = await this.client.post("/rest/api/2/issue", {
162
+ fields: {
163
+ project: { key: input.projectKey },
164
+ summary: input.summary,
165
+ issuetype: { name: input.issueType ?? DEFAULT_ISSUE_TYPE },
166
+ ...(input.description ? { description: input.description } : {}),
167
+ ...(input.fields ?? {}),
168
+ },
169
+ });
170
+ return response.data;
171
+ }
172
+ catch (error) {
173
+ throw httpError("Jira", "create issue", error);
174
+ }
175
+ }
176
+ /**
177
+ * @description Fetches a Jira issue
178
+ * @summary `GET`s the issue by key, optionally projecting the given field
179
+ * names.
180
+ * @param {string} issueKey - The issue key to fetch.
181
+ * @param {string[]} [fields] - Field names to include in the response.
182
+ * @returns {Promise<unknown>} The issue payload.
183
+ * @throws {InternalError} When credentials are missing or the issue key is empty.
184
+ * @throws {NotFoundError} When the issue does not exist (HTTP 404).
185
+ * @throws {BadRequestError} When Jira rejects the request.
186
+ */
187
+ async getIssue(issueKey, fields) {
188
+ this.requireCredentials();
189
+ try {
190
+ const response = await this.client.get(this.issuePath(issueKey), {
191
+ params: fields?.length ? { fields: fields.join(",") } : {},
192
+ });
193
+ return response.data;
194
+ }
195
+ catch (error) {
196
+ throw httpError("Jira", "get issue", error);
197
+ }
198
+ }
199
+ /**
200
+ * @description Updates fields on a Jira issue
201
+ * @summary `PUT`s the `fields` map to the issue and returns
202
+ * `{ updated: true, issueKey }`.
203
+ * @param {JiraIssueUpdate} input - The issue key and fields to update.
204
+ * @returns {Promise<unknown>} `{ updated: true, issueKey }` on success.
205
+ * @throws {InternalError} When credentials are missing, or the issue key or fields are empty.
206
+ * @throws {NotFoundError} When the issue does not exist (HTTP 404).
207
+ * @throws {BadRequestError} When Jira rejects the update.
208
+ */
209
+ async updateIssue(input) {
210
+ this.requireCredentials();
211
+ if (!input.fields) {
212
+ throw new InternalError("Jira updateIssue requires fields");
213
+ }
214
+ try {
215
+ await this.client.put(this.issuePath(input.issueKey), {
216
+ fields: input.fields,
217
+ });
218
+ return { updated: true, issueKey: input.issueKey };
219
+ }
220
+ catch (error) {
221
+ throw httpError("Jira", "update issue", error);
222
+ }
223
+ }
224
+ /**
225
+ * @description Deletes a Jira issue
226
+ * @summary `DELETE`s the issue and returns `{ deleted: true, issueKey }`.
227
+ * @param {string} issueKey - The issue key to delete.
228
+ * @returns {Promise<unknown>} `{ deleted: true, issueKey }` on success.
229
+ * @throws {InternalError} When credentials are missing or the issue key is empty.
230
+ * @throws {NotFoundError} When the issue does not exist (HTTP 404).
231
+ * @throws {BadRequestError} When Jira rejects the deletion.
232
+ */
233
+ async deleteIssue(issueKey) {
234
+ this.requireCredentials();
235
+ try {
236
+ await this.client.delete(this.issuePath(issueKey));
237
+ return { deleted: true, issueKey };
238
+ }
239
+ catch (error) {
240
+ throw httpError("Jira", "delete issue", error);
241
+ }
242
+ }
243
+ /**
244
+ * @description Adds a comment to a Jira issue
245
+ * @summary `POST`s the comment body to the issue's `/comment` endpoint.
246
+ * @param {JiraCommentInput} input - The issue key and comment body.
247
+ * @returns {Promise<unknown>} The created comment payload.
248
+ * @throws {InternalError} When credentials are missing, or the issue key or body is empty.
249
+ * @throws {NotFoundError} When the issue does not exist (HTTP 404).
250
+ * @throws {BadRequestError} When Jira rejects the comment.
251
+ */
252
+ async addComment(input) {
253
+ this.requireCredentials();
254
+ if (!input.body) {
255
+ throw new InternalError("Jira addComment requires a body");
256
+ }
257
+ try {
258
+ const response = await this.client.post(`${this.issuePath(input.issueKey)}/comment`, { body: input.body });
259
+ return response.data;
260
+ }
261
+ catch (error) {
262
+ throw httpError("Jira", "add comment", error);
263
+ }
264
+ }
265
+ /**
266
+ * @description Lists the available workflow transitions for a Jira issue
267
+ * @summary `GET`s the issue's `/transitions` collection, whose IDs feed
268
+ * {@link JiraService.transitionIssue}.
269
+ * @param {string} issueKey - The issue key.
270
+ * @returns {Promise<unknown>} The available transitions payload.
271
+ * @throws {InternalError} When credentials are missing or the issue key is empty.
272
+ * @throws {NotFoundError} When the issue does not exist (HTTP 404).
273
+ * @throws {BadRequestError} When Jira rejects the request.
274
+ */
275
+ async getTransitions(issueKey) {
276
+ this.requireCredentials();
277
+ try {
278
+ const response = await this.client.get(`${this.issuePath(issueKey)}/transitions`);
279
+ return response.data;
280
+ }
281
+ catch (error) {
282
+ throw httpError("Jira", "get transitions", error);
283
+ }
284
+ }
285
+ /**
286
+ * @description Transitions a Jira issue through its workflow
287
+ * @summary `POST`s the transition ID to the issue's `/transitions` endpoint
288
+ * and returns the applied transition identifiers.
289
+ * @param {JiraTransitionInput} input - The issue key and transition ID.
290
+ * @returns {Promise<unknown>} `{ transitioned: true, issueKey, transitionId }` on success.
291
+ * @throws {InternalError} When credentials are missing, or the issue key or transition ID is empty.
292
+ * @throws {NotFoundError} When the issue does not exist (HTTP 404).
293
+ * @throws {BadRequestError} When Jira rejects the transition.
294
+ */
295
+ async transitionIssue(input) {
296
+ this.requireCredentials();
297
+ if (!input.transitionId) {
298
+ throw new InternalError("Jira transitionIssue requires a transition id");
299
+ }
300
+ try {
301
+ await this.client.post(`${this.issuePath(input.issueKey)}/transitions`, {
302
+ transition: { id: input.transitionId },
303
+ });
304
+ return {
305
+ transitioned: true,
306
+ issueKey: input.issueKey,
307
+ transitionId: input.transitionId,
308
+ };
309
+ }
310
+ catch (error) {
311
+ throw httpError("Jira", "transition issue", error);
312
+ }
313
+ }
314
+ /**
315
+ * @description Searches Jira issues with JQL
316
+ * @summary `POST`s the JQL query to `/rest/api/2/search` with a result cap
317
+ * (default `50`) and optional field projection.
318
+ * @param {JiraSearchInput} input - The JQL query and search options.
319
+ * @returns {Promise<unknown>} The search result payload.
320
+ * @throws {InternalError} When credentials are missing or the JQL query is empty.
321
+ * @throws {BadRequestError} When the JQL query is invalid.
322
+ * @example
323
+ * ```ts
324
+ * const results = await jira.search({
325
+ * jql: 'project = "OPS" AND status = "Open"',
326
+ * maxResults: 100,
327
+ * fields: ["summary", "status"],
328
+ * });
329
+ * ```
330
+ */
331
+ async search(input) {
332
+ this.requireCredentials();
333
+ if (!input.jql) {
334
+ throw new InternalError("Jira search requires a JQL query");
335
+ }
336
+ try {
337
+ const response = await this.client.post("/rest/api/2/search", {
338
+ jql: input.jql,
339
+ maxResults: input.maxResults ?? 50,
340
+ ...(input.fields ? { fields: input.fields } : {}),
341
+ });
342
+ return response.data;
343
+ }
344
+ catch (error) {
345
+ throw httpError("Jira", "search issues", error);
346
+ }
347
+ }
348
+ }
349
+ //# sourceMappingURL=JiraService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JiraService.js","sourceRoot":"","sources":["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;;;;;;;;;OAgBG;IACH,KAAK,CAAC,MAAM,CAAC,KAAsB;QACjC,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;YACf,MAAM,IAAI,aAAa,CAAC,kCAAkC,CAAC,CAAC;QAC9D,CAAC;QACD,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,EAAE;gBAC5D,GAAG,EAAE,KAAK,CAAC,GAAG;gBACd,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,EAAE;gBAClC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAClD,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,SAAS,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export * from "./JiraService.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/io/jira/index.ts"],"names":[],"mappings":"AAAA,iCAA8B"}