@shipfox/api-integration-linear-dto 12.2.0 → 15.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.
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +19 -0
- package/dist/event-catalog.d.ts +23 -0
- package/dist/event-catalog.d.ts.map +1 -0
- package/dist/event-catalog.js +48 -0
- package/dist/event-catalog.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/event-catalog.test.ts +20 -0
- package/src/event-catalog.ts +65 -0
- package/src/index.ts +1 -0
- package/tsconfig.build.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
$ shipfox-swc
|
|
2
|
-
Successfully compiled:
|
|
2
|
+
Successfully compiled: 3 files with swc (196.67ms)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @shipfox/api-integration-linear-dto
|
|
2
2
|
|
|
3
|
+
## 15.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @shipfox/api-integration-core-dto@15.0.0
|
|
8
|
+
|
|
9
|
+
## 14.0.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 2323e2e: Adds event catalog exports to the Linear, Slack, and Jira DTO packages.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [18e9bad]
|
|
18
|
+
- Updated dependencies [c44641f]
|
|
19
|
+
- Updated dependencies [1b71a66]
|
|
20
|
+
- @shipfox/api-integration-core-dto@14.0.0
|
|
21
|
+
|
|
3
22
|
## 12.2.0
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const linearEventCatalog: {
|
|
2
|
+
readonly provider: 'Linear';
|
|
3
|
+
readonly events: readonly ({
|
|
4
|
+
name: string;
|
|
5
|
+
summary: string;
|
|
6
|
+
emittedWhen: string;
|
|
7
|
+
payloadKind: 'raw-provider';
|
|
8
|
+
payloadDocUrl: string;
|
|
9
|
+
} | {
|
|
10
|
+
summary: 'A Linear agent session is created.';
|
|
11
|
+
emittedWhen: 'Linear creates an agent session after a user mentions or delegates to the app.';
|
|
12
|
+
name: "agentSession.created" | "agentSession.prompted";
|
|
13
|
+
payloadKind: 'raw-provider';
|
|
14
|
+
payloadDocUrl: string;
|
|
15
|
+
} | {
|
|
16
|
+
summary: 'A user adds a prompt to a Linear agent session.';
|
|
17
|
+
emittedWhen: 'Linear sends an AgentSessionEvent webhook with the prompted action.';
|
|
18
|
+
name: "agentSession.created" | "agentSession.prompted";
|
|
19
|
+
payloadKind: 'raw-provider';
|
|
20
|
+
payloadDocUrl: string;
|
|
21
|
+
})[];
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=event-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-catalog.d.ts","sourceRoot":"","sources":["../src/event-catalog.ts"],"names":[],"mappings":"AAyCA,eAAO,MAAM,kBAAkB;uBACnB,QAAQ;;;;;qBAOC,cAAc;;;iBAvBtB,oCAAoC;qBAChC,gFAAgF;;qBA6B9E,cAAc;;;iBA1BpB,iDAAiD;qBAC7C,qEAAqE;;qBAyBnE,cAAc;;;CAIW,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { linearAgentSessionWebhookEventNames, linearWebhookActions, linearWebhookResourceTypes } from './schemas/index.js';
|
|
2
|
+
const linearWebhookDocsUrl = 'https://linear.app/developers/webhooks';
|
|
3
|
+
const linearAgentInteractionDocsUrl = 'https://linear.app/developers/agent-interaction';
|
|
4
|
+
const resourceLabels = {
|
|
5
|
+
Issue: 'issue',
|
|
6
|
+
Comment: 'comment',
|
|
7
|
+
IssueLabel: 'issue label',
|
|
8
|
+
Project: 'project',
|
|
9
|
+
Cycle: 'cycle'
|
|
10
|
+
};
|
|
11
|
+
const dataEventSummaryByAction = {
|
|
12
|
+
create: 'is created.',
|
|
13
|
+
update: 'changes.',
|
|
14
|
+
remove: 'is removed.'
|
|
15
|
+
};
|
|
16
|
+
const agentSessionDetails = {
|
|
17
|
+
'agentSession.created': {
|
|
18
|
+
summary: 'A Linear agent session is created.',
|
|
19
|
+
emittedWhen: 'Linear creates an agent session after a user mentions or delegates to the app.'
|
|
20
|
+
},
|
|
21
|
+
'agentSession.prompted': {
|
|
22
|
+
summary: 'A user adds a prompt to a Linear agent session.',
|
|
23
|
+
emittedWhen: 'Linear sends an AgentSessionEvent webhook with the prompted action.'
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
export const linearEventCatalog = {
|
|
27
|
+
provider: 'Linear',
|
|
28
|
+
events: [
|
|
29
|
+
...linearWebhookResourceTypes.flatMap((type)=>linearWebhookActions.map((action)=>({
|
|
30
|
+
name: `${type}.${action}`,
|
|
31
|
+
summary: dataEventSummary(resourceLabels[type], action),
|
|
32
|
+
emittedWhen: `Linear sends a webhook for ${type} with the ${action} action.`,
|
|
33
|
+
payloadKind: 'raw-provider',
|
|
34
|
+
payloadDocUrl: linearWebhookDocsUrl
|
|
35
|
+
}))),
|
|
36
|
+
...linearAgentSessionWebhookEventNames.map((name)=>({
|
|
37
|
+
name,
|
|
38
|
+
...agentSessionDetails[name],
|
|
39
|
+
payloadKind: 'raw-provider',
|
|
40
|
+
payloadDocUrl: linearAgentInteractionDocsUrl
|
|
41
|
+
}))
|
|
42
|
+
]
|
|
43
|
+
};
|
|
44
|
+
function dataEventSummary(resource, action) {
|
|
45
|
+
return `A Linear ${resource} ${dataEventSummaryByAction[action]}`;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=event-catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/event-catalog.ts"],"sourcesContent":["import type {IntegrationEventCatalog} from '@shipfox/api-integration-core-dto';\nimport {\n linearAgentSessionWebhookEventNames,\n linearWebhookActions,\n linearWebhookResourceTypes,\n} from './schemas/index.js';\n\nconst linearWebhookDocsUrl = 'https://linear.app/developers/webhooks';\nconst linearAgentInteractionDocsUrl = 'https://linear.app/developers/agent-interaction';\n\nconst resourceLabels = {\n Issue: 'issue',\n Comment: 'comment',\n IssueLabel: 'issue label',\n Project: 'project',\n Cycle: 'cycle',\n} as const satisfies Record<(typeof linearWebhookResourceTypes)[number], string>;\n\nconst dataEventSummaryByAction = {\n create: 'is created.',\n update: 'changes.',\n remove: 'is removed.',\n} as const satisfies Record<(typeof linearWebhookActions)[number], string>;\n\nconst agentSessionDetails = {\n 'agentSession.created': {\n summary: 'A Linear agent session is created.',\n emittedWhen: 'Linear creates an agent session after a user mentions or delegates to the app.',\n },\n 'agentSession.prompted': {\n summary: 'A user adds a prompt to a Linear agent session.',\n emittedWhen: 'Linear sends an AgentSessionEvent webhook with the prompted action.',\n },\n} as const satisfies Record<\n (typeof linearAgentSessionWebhookEventNames)[number],\n {\n summary: string;\n emittedWhen: string;\n }\n>;\n\nexport const linearEventCatalog = {\n provider: 'Linear',\n events: [\n ...linearWebhookResourceTypes.flatMap((type) =>\n linearWebhookActions.map((action) => ({\n name: `${type}.${action}`,\n summary: dataEventSummary(resourceLabels[type], action),\n emittedWhen: `Linear sends a webhook for ${type} with the ${action} action.`,\n payloadKind: 'raw-provider' as const,\n payloadDocUrl: linearWebhookDocsUrl,\n })),\n ),\n ...linearAgentSessionWebhookEventNames.map((name) => ({\n name,\n ...agentSessionDetails[name],\n payloadKind: 'raw-provider' as const,\n payloadDocUrl: linearAgentInteractionDocsUrl,\n })),\n ],\n} as const satisfies IntegrationEventCatalog;\n\nfunction dataEventSummary(resource: string, action: (typeof linearWebhookActions)[number]): string {\n return `A Linear ${resource} ${dataEventSummaryByAction[action]}`;\n}\n"],"names":["linearAgentSessionWebhookEventNames","linearWebhookActions","linearWebhookResourceTypes","linearWebhookDocsUrl","linearAgentInteractionDocsUrl","resourceLabels","Issue","Comment","IssueLabel","Project","Cycle","dataEventSummaryByAction","create","update","remove","agentSessionDetails","summary","emittedWhen","linearEventCatalog","provider","events","flatMap","type","map","action","name","dataEventSummary","payloadKind","payloadDocUrl","resource"],"mappings":"AACA,SACEA,mCAAmC,EACnCC,oBAAoB,EACpBC,0BAA0B,QACrB,qBAAqB;AAE5B,MAAMC,uBAAuB;AAC7B,MAAMC,gCAAgC;AAEtC,MAAMC,iBAAiB;IACrBC,OAAO;IACPC,SAAS;IACTC,YAAY;IACZC,SAAS;IACTC,OAAO;AACT;AAEA,MAAMC,2BAA2B;IAC/BC,QAAQ;IACRC,QAAQ;IACRC,QAAQ;AACV;AAEA,MAAMC,sBAAsB;IAC1B,wBAAwB;QACtBC,SAAS;QACTC,aAAa;IACf;IACA,yBAAyB;QACvBD,SAAS;QACTC,aAAa;IACf;AACF;AAQA,OAAO,MAAMC,qBAAqB;IAChCC,UAAU;IACVC,QAAQ;WACHlB,2BAA2BmB,OAAO,CAAC,CAACC,OACrCrB,qBAAqBsB,GAAG,CAAC,CAACC,SAAY,CAAA;oBACpCC,MAAM,GAAGH,KAAK,CAAC,EAAEE,QAAQ;oBACzBR,SAASU,iBAAiBrB,cAAc,CAACiB,KAAK,EAAEE;oBAChDP,aAAa,CAAC,2BAA2B,EAAEK,KAAK,UAAU,EAAEE,OAAO,QAAQ,CAAC;oBAC5EG,aAAa;oBACbC,eAAezB;gBACjB,CAAA;WAECH,oCAAoCuB,GAAG,CAAC,CAACE,OAAU,CAAA;gBACpDA;gBACA,GAAGV,mBAAmB,CAACU,KAAK;gBAC5BE,aAAa;gBACbC,eAAexB;YACjB,CAAA;KACD;AACH,EAA6C;AAE7C,SAASsB,iBAAiBG,QAAgB,EAAEL,MAA6C;IACvF,OAAO,CAAC,SAAS,EAAEK,SAAS,CAAC,EAAElB,wBAAwB,CAACa,OAAO,EAAE;AACnE"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './schemas/index.js';\n"],"names":[],"mappings":"AAAA,cAAc,qBAAqB"}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './event-catalog.js';\nexport * from './schemas/index.js';\n"],"names":[],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,qBAAqB"}
|