@shipfox/api-integration-jira 4.0.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 (73) hide show
  1. package/.turbo/turbo-build.log +2 -0
  2. package/.turbo/turbo-type$colon$emit.log +1 -0
  3. package/.turbo/turbo-type.log +1 -0
  4. package/CHANGELOG.md +11 -0
  5. package/LICENSE +21 -0
  6. package/README.md +5 -0
  7. package/dist/config.d.ts +10 -0
  8. package/dist/config.d.ts.map +1 -0
  9. package/dist/config.js +28 -0
  10. package/dist/config.js.map +1 -0
  11. package/dist/core/errors.d.ts +10 -0
  12. package/dist/core/errors.d.ts.map +1 -0
  13. package/dist/core/errors.js +20 -0
  14. package/dist/core/errors.js.map +1 -0
  15. package/dist/core/tokens.d.ts +36 -0
  16. package/dist/core/tokens.d.ts.map +1 -0
  17. package/dist/core/tokens.js +40 -0
  18. package/dist/core/tokens.js.map +1 -0
  19. package/dist/db/db.d.ts +475 -0
  20. package/dist/db/db.d.ts.map +1 -0
  21. package/dist/db/db.js +18 -0
  22. package/dist/db/db.js.map +1 -0
  23. package/dist/db/installations.d.ts +41 -0
  24. package/dist/db/installations.d.ts.map +1 -0
  25. package/dist/db/installations.js +65 -0
  26. package/dist/db/installations.js.map +1 -0
  27. package/dist/db/migrations.d.ts +2 -0
  28. package/dist/db/migrations.d.ts.map +1 -0
  29. package/dist/db/migrations.js +5 -0
  30. package/dist/db/migrations.js.map +1 -0
  31. package/dist/db/schema/common.d.ts +2 -0
  32. package/dist/db/schema/common.d.ts.map +1 -0
  33. package/dist/db/schema/common.js +4 -0
  34. package/dist/db/schema/common.js.map +1 -0
  35. package/dist/db/schema/installations.d.ts +239 -0
  36. package/dist/db/schema/installations.d.ts.map +1 -0
  37. package/dist/db/schema/installations.js +48 -0
  38. package/dist/db/schema/installations.js.map +1 -0
  39. package/dist/index.d.ts +15 -0
  40. package/dist/index.d.ts.map +1 -0
  41. package/dist/index.js +16 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/tsconfig.test.tsbuildinfo +1 -0
  44. package/drizzle/0000_whole_master_chief.sql +18 -0
  45. package/drizzle/meta/0000_snapshot.json +145 -0
  46. package/drizzle/meta/_journal.json +13 -0
  47. package/drizzle.config.ts +7 -0
  48. package/package.json +63 -0
  49. package/src/config.test.ts +37 -0
  50. package/src/config.ts +27 -0
  51. package/src/core/errors.ts +22 -0
  52. package/src/core/tokens.test.ts +106 -0
  53. package/src/core/tokens.ts +77 -0
  54. package/src/db/db.ts +16 -0
  55. package/src/db/installations.test.ts +93 -0
  56. package/src/db/installations.ts +125 -0
  57. package/src/db/migrations.ts +4 -0
  58. package/src/db/schema/common.ts +3 -0
  59. package/src/db/schema/installations.ts +48 -0
  60. package/src/index.test.ts +9 -0
  61. package/src/index.ts +36 -0
  62. package/test/api-secrets.d.ts +26 -0
  63. package/test/env.ts +15 -0
  64. package/test/factories/index.ts +1 -0
  65. package/test/factories/jira-installation.ts +35 -0
  66. package/test/globalSetup.ts +23 -0
  67. package/test/index.ts +1 -0
  68. package/test/setup.ts +17 -0
  69. package/tsconfig.build.json +9 -0
  70. package/tsconfig.build.tsbuildinfo +1 -0
  71. package/tsconfig.json +3 -0
  72. package/tsconfig.test.json +9 -0
  73. package/vitest.config.ts +12 -0
@@ -0,0 +1,239 @@
1
+ import type { JiraInstallation } from '#db/installations.js';
2
+ export declare const jiraInstallations: import("drizzle-orm/pg-core").PgTableWithColumns<{
3
+ name: "installations";
4
+ schema: undefined;
5
+ columns: {
6
+ id: import("drizzle-orm/pg-core").PgColumn<{
7
+ name: "id";
8
+ tableName: "installations";
9
+ dataType: "string";
10
+ columnType: "PgUUID";
11
+ data: string;
12
+ driverParam: string;
13
+ notNull: true;
14
+ hasDefault: true;
15
+ isPrimaryKey: true;
16
+ isAutoincrement: false;
17
+ hasRuntimeDefault: false;
18
+ enumValues: undefined;
19
+ baseColumn: never;
20
+ identity: undefined;
21
+ generated: undefined;
22
+ }, {}, {}>;
23
+ connectionId: import("drizzle-orm/pg-core").PgColumn<{
24
+ name: "connection_id";
25
+ tableName: "installations";
26
+ dataType: "string";
27
+ columnType: "PgUUID";
28
+ data: string;
29
+ driverParam: string;
30
+ notNull: true;
31
+ hasDefault: false;
32
+ isPrimaryKey: false;
33
+ isAutoincrement: false;
34
+ hasRuntimeDefault: false;
35
+ enumValues: undefined;
36
+ baseColumn: never;
37
+ identity: undefined;
38
+ generated: undefined;
39
+ }, {}, {}>;
40
+ cloudId: import("drizzle-orm/pg-core").PgColumn<{
41
+ name: "cloud_id";
42
+ tableName: "installations";
43
+ dataType: "string";
44
+ columnType: "PgText";
45
+ data: string;
46
+ driverParam: string;
47
+ notNull: true;
48
+ hasDefault: false;
49
+ isPrimaryKey: false;
50
+ isAutoincrement: false;
51
+ hasRuntimeDefault: false;
52
+ enumValues: [string, ...string[]];
53
+ baseColumn: never;
54
+ identity: undefined;
55
+ generated: undefined;
56
+ }, {}, {}>;
57
+ siteUrl: import("drizzle-orm/pg-core").PgColumn<{
58
+ name: "site_url";
59
+ tableName: "installations";
60
+ dataType: "string";
61
+ columnType: "PgText";
62
+ data: string;
63
+ driverParam: string;
64
+ notNull: true;
65
+ hasDefault: false;
66
+ isPrimaryKey: false;
67
+ isAutoincrement: false;
68
+ hasRuntimeDefault: false;
69
+ enumValues: [string, ...string[]];
70
+ baseColumn: never;
71
+ identity: undefined;
72
+ generated: undefined;
73
+ }, {}, {}>;
74
+ siteName: import("drizzle-orm/pg-core").PgColumn<{
75
+ name: "site_name";
76
+ tableName: "installations";
77
+ dataType: "string";
78
+ columnType: "PgText";
79
+ data: string;
80
+ driverParam: string;
81
+ notNull: true;
82
+ hasDefault: false;
83
+ isPrimaryKey: false;
84
+ isAutoincrement: false;
85
+ hasRuntimeDefault: false;
86
+ enumValues: [string, ...string[]];
87
+ baseColumn: never;
88
+ identity: undefined;
89
+ generated: undefined;
90
+ }, {}, {}>;
91
+ authorizingAccountId: import("drizzle-orm/pg-core").PgColumn<{
92
+ name: "authorizing_account_id";
93
+ tableName: "installations";
94
+ dataType: "string";
95
+ columnType: "PgText";
96
+ data: string;
97
+ driverParam: string;
98
+ notNull: true;
99
+ hasDefault: false;
100
+ isPrimaryKey: false;
101
+ isAutoincrement: false;
102
+ hasRuntimeDefault: false;
103
+ enumValues: [string, ...string[]];
104
+ baseColumn: never;
105
+ identity: undefined;
106
+ generated: undefined;
107
+ }, {}, {}>;
108
+ scopes: import("drizzle-orm/pg-core").PgColumn<{
109
+ name: "scopes";
110
+ tableName: "installations";
111
+ dataType: "json";
112
+ columnType: "PgJsonb";
113
+ data: string[];
114
+ driverParam: unknown;
115
+ notNull: true;
116
+ hasDefault: false;
117
+ isPrimaryKey: false;
118
+ isAutoincrement: false;
119
+ hasRuntimeDefault: false;
120
+ enumValues: undefined;
121
+ baseColumn: never;
122
+ identity: undefined;
123
+ generated: undefined;
124
+ }, {}, {
125
+ $type: string[];
126
+ }>;
127
+ webhookIds: import("drizzle-orm/pg-core").PgColumn<{
128
+ name: "webhook_ids";
129
+ tableName: "installations";
130
+ dataType: "json";
131
+ columnType: "PgJsonb";
132
+ data: number[];
133
+ driverParam: unknown;
134
+ notNull: true;
135
+ hasDefault: true;
136
+ isPrimaryKey: false;
137
+ isAutoincrement: false;
138
+ hasRuntimeDefault: false;
139
+ enumValues: undefined;
140
+ baseColumn: never;
141
+ identity: undefined;
142
+ generated: undefined;
143
+ }, {}, {
144
+ $type: number[];
145
+ }>;
146
+ webhookExpiresAt: import("drizzle-orm/pg-core").PgColumn<{
147
+ name: "webhook_expires_at";
148
+ tableName: "installations";
149
+ dataType: "date";
150
+ columnType: "PgTimestamp";
151
+ data: Date;
152
+ driverParam: string;
153
+ notNull: false;
154
+ hasDefault: false;
155
+ isPrimaryKey: false;
156
+ isAutoincrement: false;
157
+ hasRuntimeDefault: false;
158
+ enumValues: undefined;
159
+ baseColumn: never;
160
+ identity: undefined;
161
+ generated: undefined;
162
+ }, {}, {}>;
163
+ status: import("drizzle-orm/pg-core").PgColumn<{
164
+ name: "status";
165
+ tableName: "installations";
166
+ dataType: "string";
167
+ columnType: "PgText";
168
+ data: import("#db/installations.js").JiraInstallationStatus;
169
+ driverParam: string;
170
+ notNull: true;
171
+ hasDefault: false;
172
+ isPrimaryKey: false;
173
+ isAutoincrement: false;
174
+ hasRuntimeDefault: false;
175
+ enumValues: [string, ...string[]];
176
+ baseColumn: never;
177
+ identity: undefined;
178
+ generated: undefined;
179
+ }, {}, {
180
+ $type: import("#db/installations.js").JiraInstallationStatus;
181
+ }>;
182
+ tokenExpiresAt: import("drizzle-orm/pg-core").PgColumn<{
183
+ name: "token_expires_at";
184
+ tableName: "installations";
185
+ dataType: "date";
186
+ columnType: "PgTimestamp";
187
+ data: Date;
188
+ driverParam: string;
189
+ notNull: false;
190
+ hasDefault: false;
191
+ isPrimaryKey: false;
192
+ isAutoincrement: false;
193
+ hasRuntimeDefault: false;
194
+ enumValues: undefined;
195
+ baseColumn: never;
196
+ identity: undefined;
197
+ generated: undefined;
198
+ }, {}, {}>;
199
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
200
+ name: "created_at";
201
+ tableName: "installations";
202
+ dataType: "date";
203
+ columnType: "PgTimestamp";
204
+ data: Date;
205
+ driverParam: string;
206
+ notNull: true;
207
+ hasDefault: true;
208
+ isPrimaryKey: false;
209
+ isAutoincrement: false;
210
+ hasRuntimeDefault: false;
211
+ enumValues: undefined;
212
+ baseColumn: never;
213
+ identity: undefined;
214
+ generated: undefined;
215
+ }, {}, {}>;
216
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
217
+ name: "updated_at";
218
+ tableName: "installations";
219
+ dataType: "date";
220
+ columnType: "PgTimestamp";
221
+ data: Date;
222
+ driverParam: string;
223
+ notNull: true;
224
+ hasDefault: true;
225
+ isPrimaryKey: false;
226
+ isAutoincrement: false;
227
+ hasRuntimeDefault: false;
228
+ enumValues: undefined;
229
+ baseColumn: never;
230
+ identity: undefined;
231
+ generated: undefined;
232
+ }, {}, {}>;
233
+ };
234
+ dialect: "pg";
235
+ }>;
236
+ export type JiraInstallationDb = typeof jiraInstallations.$inferSelect;
237
+ export type JiraInstallationCreateDb = typeof jiraInstallations.$inferInsert;
238
+ export declare function toJiraInstallation(row: JiraInstallationDb): JiraInstallation;
239
+ //# sourceMappingURL=installations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installations.d.ts","sourceRoot":"","sources":["../../../src/db/schema/installations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAG3D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqB7B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,OAAO,iBAAiB,CAAC,YAAY,CAAC;AACvE,MAAM,MAAM,wBAAwB,GAAG,OAAO,iBAAiB,CAAC,YAAY,CAAC;AAE7E,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,kBAAkB,GAAG,gBAAgB,CAgB5E"}
@@ -0,0 +1,48 @@
1
+ import { uuidv7PrimaryKey } from '@shipfox/node-drizzle';
2
+ import { index, jsonb, text, timestamp, uniqueIndex, uuid } from 'drizzle-orm/pg-core';
3
+ import { pgTable } from './common.js';
4
+ export const jiraInstallations = pgTable('installations', {
5
+ id: uuidv7PrimaryKey(),
6
+ connectionId: uuid('connection_id').notNull(),
7
+ cloudId: text('cloud_id').notNull(),
8
+ siteUrl: text('site_url').notNull(),
9
+ siteName: text('site_name').notNull(),
10
+ authorizingAccountId: text('authorizing_account_id').notNull(),
11
+ scopes: jsonb('scopes').$type().notNull(),
12
+ webhookIds: jsonb('webhook_ids').$type().notNull().default([]),
13
+ webhookExpiresAt: timestamp('webhook_expires_at', {
14
+ withTimezone: true
15
+ }),
16
+ status: text('status').notNull().$type(),
17
+ tokenExpiresAt: timestamp('token_expires_at', {
18
+ withTimezone: true
19
+ }),
20
+ createdAt: timestamp('created_at', {
21
+ withTimezone: true
22
+ }).notNull().defaultNow(),
23
+ updatedAt: timestamp('updated_at', {
24
+ withTimezone: true
25
+ }).notNull().defaultNow()
26
+ }, (table)=>[
27
+ uniqueIndex('integrations_jira_installations_connection_unique').on(table.connectionId),
28
+ index('integrations_jira_installations_cloud_id_idx').on(table.cloudId)
29
+ ]);
30
+ export function toJiraInstallation(row) {
31
+ return {
32
+ id: row.id,
33
+ connectionId: row.connectionId,
34
+ cloudId: row.cloudId,
35
+ siteUrl: row.siteUrl,
36
+ siteName: row.siteName,
37
+ authorizingAccountId: row.authorizingAccountId,
38
+ scopes: row.scopes,
39
+ webhookIds: row.webhookIds,
40
+ webhookExpiresAt: row.webhookExpiresAt,
41
+ status: row.status,
42
+ tokenExpiresAt: row.tokenExpiresAt,
43
+ createdAt: row.createdAt,
44
+ updatedAt: row.updatedAt
45
+ };
46
+ }
47
+
48
+ //# sourceMappingURL=installations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/db/schema/installations.ts"],"sourcesContent":["import {uuidv7PrimaryKey} from '@shipfox/node-drizzle';\nimport {index, jsonb, text, timestamp, uniqueIndex, uuid} from 'drizzle-orm/pg-core';\nimport type {JiraInstallation} from '#db/installations.js';\nimport {pgTable} from './common.js';\n\nexport const jiraInstallations = pgTable(\n 'installations',\n {\n id: uuidv7PrimaryKey(),\n connectionId: uuid('connection_id').notNull(),\n cloudId: text('cloud_id').notNull(),\n siteUrl: text('site_url').notNull(),\n siteName: text('site_name').notNull(),\n authorizingAccountId: text('authorizing_account_id').notNull(),\n scopes: jsonb('scopes').$type<string[]>().notNull(),\n webhookIds: jsonb('webhook_ids').$type<number[]>().notNull().default([]),\n webhookExpiresAt: timestamp('webhook_expires_at', {withTimezone: true}),\n status: text('status').notNull().$type<JiraInstallation['status']>(),\n tokenExpiresAt: timestamp('token_expires_at', {withTimezone: true}),\n createdAt: timestamp('created_at', {withTimezone: true}).notNull().defaultNow(),\n updatedAt: timestamp('updated_at', {withTimezone: true}).notNull().defaultNow(),\n },\n (table) => [\n uniqueIndex('integrations_jira_installations_connection_unique').on(table.connectionId),\n index('integrations_jira_installations_cloud_id_idx').on(table.cloudId),\n ],\n);\n\nexport type JiraInstallationDb = typeof jiraInstallations.$inferSelect;\nexport type JiraInstallationCreateDb = typeof jiraInstallations.$inferInsert;\n\nexport function toJiraInstallation(row: JiraInstallationDb): JiraInstallation {\n return {\n id: row.id,\n connectionId: row.connectionId,\n cloudId: row.cloudId,\n siteUrl: row.siteUrl,\n siteName: row.siteName,\n authorizingAccountId: row.authorizingAccountId,\n scopes: row.scopes,\n webhookIds: row.webhookIds,\n webhookExpiresAt: row.webhookExpiresAt,\n status: row.status,\n tokenExpiresAt: row.tokenExpiresAt,\n createdAt: row.createdAt,\n updatedAt: row.updatedAt,\n };\n}\n"],"names":["uuidv7PrimaryKey","index","jsonb","text","timestamp","uniqueIndex","uuid","pgTable","jiraInstallations","id","connectionId","notNull","cloudId","siteUrl","siteName","authorizingAccountId","scopes","$type","webhookIds","default","webhookExpiresAt","withTimezone","status","tokenExpiresAt","createdAt","defaultNow","updatedAt","table","on","toJiraInstallation","row"],"mappings":"AAAA,SAAQA,gBAAgB,QAAO,wBAAwB;AACvD,SAAQC,KAAK,EAAEC,KAAK,EAAEC,IAAI,EAAEC,SAAS,EAAEC,WAAW,EAAEC,IAAI,QAAO,sBAAsB;AAErF,SAAQC,OAAO,QAAO,cAAc;AAEpC,OAAO,MAAMC,oBAAoBD,QAC/B,iBACA;IACEE,IAAIT;IACJU,cAAcJ,KAAK,iBAAiBK,OAAO;IAC3CC,SAAST,KAAK,YAAYQ,OAAO;IACjCE,SAASV,KAAK,YAAYQ,OAAO;IACjCG,UAAUX,KAAK,aAAaQ,OAAO;IACnCI,sBAAsBZ,KAAK,0BAA0BQ,OAAO;IAC5DK,QAAQd,MAAM,UAAUe,KAAK,GAAaN,OAAO;IACjDO,YAAYhB,MAAM,eAAee,KAAK,GAAaN,OAAO,GAAGQ,OAAO,CAAC,EAAE;IACvEC,kBAAkBhB,UAAU,sBAAsB;QAACiB,cAAc;IAAI;IACrEC,QAAQnB,KAAK,UAAUQ,OAAO,GAAGM,KAAK;IACtCM,gBAAgBnB,UAAU,oBAAoB;QAACiB,cAAc;IAAI;IACjEG,WAAWpB,UAAU,cAAc;QAACiB,cAAc;IAAI,GAAGV,OAAO,GAAGc,UAAU;IAC7EC,WAAWtB,UAAU,cAAc;QAACiB,cAAc;IAAI,GAAGV,OAAO,GAAGc,UAAU;AAC/E,GACA,CAACE,QAAU;QACTtB,YAAY,qDAAqDuB,EAAE,CAACD,MAAMjB,YAAY;QACtFT,MAAM,gDAAgD2B,EAAE,CAACD,MAAMf,OAAO;KACvE,EACD;AAKF,OAAO,SAASiB,mBAAmBC,GAAuB;IACxD,OAAO;QACLrB,IAAIqB,IAAIrB,EAAE;QACVC,cAAcoB,IAAIpB,YAAY;QAC9BE,SAASkB,IAAIlB,OAAO;QACpBC,SAASiB,IAAIjB,OAAO;QACpBC,UAAUgB,IAAIhB,QAAQ;QACtBC,sBAAsBe,IAAIf,oBAAoB;QAC9CC,QAAQc,IAAId,MAAM;QAClBE,YAAYY,IAAIZ,UAAU;QAC1BE,kBAAkBU,IAAIV,gBAAgB;QACtCE,QAAQQ,IAAIR,MAAM;QAClBC,gBAAgBO,IAAIP,cAAc;QAClCC,WAAWM,IAAIN,SAAS;QACxBE,WAAWI,IAAIJ,SAAS;IAC1B;AACF"}
@@ -0,0 +1,15 @@
1
+ import { config } from '#config.js';
2
+ import { closeDb, db } from '#db/db.js';
3
+ import { migrationsPath } from '#db/migrations.js';
4
+ export type { JiraProvider } from '@shipfox/api-integration-jira-dto';
5
+ export { JiraAccessTokenMissingError, JiraConnectionNotFoundError, JiraInstallationSiteMismatchError, } from '#core/errors.js';
6
+ export type { CreateJiraTokenStoreParams, GetJiraAccessTokenParams, JiraConnectionResolverResult, JiraSecretsStore, JiraTokenStore, StoreJiraTokensParams, } from '#core/tokens.js';
7
+ export { createJiraTokenStore, jiraSecretsNamespace } from '#core/tokens.js';
8
+ export type { JiraInstallation, JiraInstallationStatus, UpsertJiraInstallationParams, } from '#db/installations.js';
9
+ export { getJiraInstallationByConnectionId, getJiraInstallationByWebhookId, markJiraInstallationRevoked, upsertJiraInstallation, } from '#db/installations.js';
10
+ export { closeDb, config, db, migrationsPath };
11
+ export declare function createJiraIntegrationProvider(): {
12
+ provider: string;
13
+ displayName: string;
14
+ };
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,MAAM,EAAC,MAAM,YAAY,CAAC;AAClC,OAAO,EAAC,OAAO,EAAE,EAAE,EAAC,MAAM,WAAW,CAAC;AACtC,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAEjD,YAAY,EAAC,YAAY,EAAC,MAAM,mCAAmC,CAAC;AACpE,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,iCAAiC,GAClC,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,0BAA0B,EAC1B,wBAAwB,EACxB,4BAA4B,EAC5B,gBAAgB,EAChB,cAAc,EACd,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,oBAAoB,EAAE,oBAAoB,EAAC,MAAM,iBAAiB,CAAC;AAC3E,YAAY,EACV,gBAAgB,EAChB,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,iCAAiC,EACjC,8BAA8B,EAC9B,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,cAAc,EAAC,CAAC;AAE7C,wBAAgB,6BAA6B;;;EAE5C"}
package/dist/index.js ADDED
@@ -0,0 +1,16 @@
1
+ import { JIRA_PROVIDER } from '@shipfox/api-integration-jira-dto';
2
+ import { config } from '#config.js';
3
+ import { closeDb, db } from '#db/db.js';
4
+ import { migrationsPath } from '#db/migrations.js';
5
+ export { JiraAccessTokenMissingError, JiraConnectionNotFoundError, JiraInstallationSiteMismatchError } from '#core/errors.js';
6
+ export { createJiraTokenStore, jiraSecretsNamespace } from '#core/tokens.js';
7
+ export { getJiraInstallationByConnectionId, getJiraInstallationByWebhookId, markJiraInstallationRevoked, upsertJiraInstallation } from '#db/installations.js';
8
+ export { closeDb, config, db, migrationsPath };
9
+ export function createJiraIntegrationProvider() {
10
+ return {
11
+ provider: JIRA_PROVIDER,
12
+ displayName: 'Jira'
13
+ };
14
+ }
15
+
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import {JIRA_PROVIDER} from '@shipfox/api-integration-jira-dto';\nimport {config} from '#config.js';\nimport {closeDb, db} from '#db/db.js';\nimport {migrationsPath} from '#db/migrations.js';\n\nexport type {JiraProvider} from '@shipfox/api-integration-jira-dto';\nexport {\n JiraAccessTokenMissingError,\n JiraConnectionNotFoundError,\n JiraInstallationSiteMismatchError,\n} from '#core/errors.js';\nexport type {\n CreateJiraTokenStoreParams,\n GetJiraAccessTokenParams,\n JiraConnectionResolverResult,\n JiraSecretsStore,\n JiraTokenStore,\n StoreJiraTokensParams,\n} from '#core/tokens.js';\nexport {createJiraTokenStore, jiraSecretsNamespace} from '#core/tokens.js';\nexport type {\n JiraInstallation,\n JiraInstallationStatus,\n UpsertJiraInstallationParams,\n} from '#db/installations.js';\nexport {\n getJiraInstallationByConnectionId,\n getJiraInstallationByWebhookId,\n markJiraInstallationRevoked,\n upsertJiraInstallation,\n} from '#db/installations.js';\nexport {closeDb, config, db, migrationsPath};\n\nexport function createJiraIntegrationProvider() {\n return {provider: JIRA_PROVIDER, displayName: 'Jira'};\n}\n"],"names":["JIRA_PROVIDER","config","closeDb","db","migrationsPath","JiraAccessTokenMissingError","JiraConnectionNotFoundError","JiraInstallationSiteMismatchError","createJiraTokenStore","jiraSecretsNamespace","getJiraInstallationByConnectionId","getJiraInstallationByWebhookId","markJiraInstallationRevoked","upsertJiraInstallation","createJiraIntegrationProvider","provider","displayName"],"mappings":"AAAA,SAAQA,aAAa,QAAO,oCAAoC;AAChE,SAAQC,MAAM,QAAO,aAAa;AAClC,SAAQC,OAAO,EAAEC,EAAE,QAAO,YAAY;AACtC,SAAQC,cAAc,QAAO,oBAAoB;AAGjD,SACEC,2BAA2B,EAC3BC,2BAA2B,EAC3BC,iCAAiC,QAC5B,kBAAkB;AASzB,SAAQC,oBAAoB,EAAEC,oBAAoB,QAAO,kBAAkB;AAM3E,SACEC,iCAAiC,EACjCC,8BAA8B,EAC9BC,2BAA2B,EAC3BC,sBAAsB,QACjB,uBAAuB;AAC9B,SAAQX,OAAO,EAAED,MAAM,EAAEE,EAAE,EAAEC,cAAc,GAAE;AAE7C,OAAO,SAASU;IACd,OAAO;QAACC,UAAUf;QAAegB,aAAa;IAAM;AACtD"}