@shipfox/api-integration-linear-dto 2.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.
@@ -0,0 +1,2 @@
1
+ $ shipfox-swc
2
+ Successfully compiled: 2 files with swc (37.22ms)
@@ -0,0 +1 @@
1
+ $ shipfox-tsc-emit
@@ -0,0 +1 @@
1
+ $ shipfox-tsc-check
package/CHANGELOG.md ADDED
@@ -0,0 +1,27 @@
1
+ # @shipfox/api-integration-linear-dto
2
+
3
+ ## 2.0.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 1b0d344: Publishes the complete API runtime closure with packed-consumer-safe internal imports and records its exact package set in application releases.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [1b0d344]
12
+ - @shipfox/api-integration-core-dto@2.0.0
13
+
14
+ ## 0.0.1
15
+
16
+ ### Patch Changes
17
+
18
+ - 0948b67: Scaffolds the Linear integration provider, package pair, config, and installation store behind the core provider flag.
19
+ - Updated dependencies [115655e]
20
+ - Updated dependencies [ce062a9]
21
+ - Updated dependencies [f3614ae]
22
+ - Updated dependencies [f8f339a]
23
+ - Updated dependencies [b8e49ff]
24
+ - Updated dependencies [d6d4862]
25
+ - Updated dependencies [01be723]
26
+ - Updated dependencies [2933c33]
27
+ - @shipfox/api-integration-core-dto@0.1.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Shipfox
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ export * from './schemas/index.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export * from './schemas/index.js';
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './schemas/index.js';\n"],"names":[],"mappings":"AAAA,cAAc,qBAAqB"}
@@ -0,0 +1,147 @@
1
+ import { z } from 'zod';
2
+ export declare const LINEAR_PROVIDER = "linear";
3
+ export type LinearProvider = typeof LINEAR_PROVIDER;
4
+ export declare const linearWebhookResourceTypes: readonly ["Issue", "Comment", "IssueLabel", "Project", "Cycle"];
5
+ export declare const linearWebhookActions: readonly ["create", "update", "remove"];
6
+ export declare const linearAgentSessionWebhookActions: readonly ["created", "prompted"];
7
+ export declare const linearAgentSessionWebhookEventNames: ("agentSession.created" | "agentSession.prompted")[];
8
+ export declare const linearWebhookEventNames: readonly ("agentSession.created" | "agentSession.prompted" | "Issue.create" | "Issue.update" | "Issue.remove" | "Comment.create" | "Comment.update" | "Comment.remove" | "IssueLabel.create" | "IssueLabel.update" | "IssueLabel.remove" | "Project.create" | "Project.update" | "Project.remove" | "Cycle.create" | "Cycle.update" | "Cycle.remove")[];
9
+ export type LinearWebhookResourceType = (typeof linearWebhookResourceTypes)[number];
10
+ export type LinearWebhookAction = (typeof linearWebhookActions)[number];
11
+ export type LinearAgentSessionWebhookAction = (typeof linearAgentSessionWebhookActions)[number];
12
+ export type LinearAgentSessionWebhookEventName = (typeof linearAgentSessionWebhookEventNames)[number];
13
+ export type LinearWebhookEventName = (typeof linearWebhookEventNames)[number];
14
+ export declare const linearAgentSessionWebhookBaseEnvelopeSchema: z.ZodObject<{
15
+ action: z.ZodString;
16
+ type: z.ZodLiteral<"AgentSessionEvent">;
17
+ organizationId: z.ZodString;
18
+ appUserId: z.ZodString;
19
+ webhookTimestamp: z.ZodNumber;
20
+ agentSession: z.ZodRecord<z.ZodString, z.ZodUnknown>;
21
+ }, z.core.$strip>;
22
+ export type LinearAgentSessionWebhookBaseEnvelopeDto = z.infer<typeof linearAgentSessionWebhookBaseEnvelopeSchema>;
23
+ export declare const linearAgentSessionWebhookEnvelopeSchema: z.ZodObject<{
24
+ type: z.ZodLiteral<"AgentSessionEvent">;
25
+ organizationId: z.ZodString;
26
+ appUserId: z.ZodString;
27
+ webhookTimestamp: z.ZodNumber;
28
+ agentSession: z.ZodRecord<z.ZodString, z.ZodUnknown>;
29
+ action: z.ZodEnum<{
30
+ created: "created";
31
+ prompted: "prompted";
32
+ }>;
33
+ }, z.core.$strip>;
34
+ export type LinearAgentSessionWebhookEnvelopeDto = z.infer<typeof linearAgentSessionWebhookEnvelopeSchema>;
35
+ export declare const linearWebhookEnvelopeSchema: z.ZodUnion<readonly [z.ZodObject<{
36
+ action: z.ZodEnum<{
37
+ create: "create";
38
+ update: "update";
39
+ remove: "remove";
40
+ }>;
41
+ type: z.ZodEnum<{
42
+ Issue: "Issue";
43
+ Comment: "Comment";
44
+ IssueLabel: "IssueLabel";
45
+ Project: "Project";
46
+ Cycle: "Cycle";
47
+ }>;
48
+ organizationId: z.ZodString;
49
+ webhookTimestamp: z.ZodNumber;
50
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
51
+ }, z.core.$strip>, z.ZodObject<{
52
+ type: z.ZodLiteral<"AgentSessionEvent">;
53
+ organizationId: z.ZodString;
54
+ appUserId: z.ZodString;
55
+ webhookTimestamp: z.ZodNumber;
56
+ agentSession: z.ZodRecord<z.ZodString, z.ZodUnknown>;
57
+ action: z.ZodEnum<{
58
+ created: "created";
59
+ prompted: "prompted";
60
+ }>;
61
+ }, z.core.$strip>]>;
62
+ export type LinearWebhookEnvelopeDto = z.infer<typeof linearWebhookEnvelopeSchema>;
63
+ export declare const linearWebhookBaseEnvelopeSchema: z.ZodUnion<readonly [z.ZodObject<{
64
+ action: z.ZodString;
65
+ type: z.ZodString;
66
+ organizationId: z.ZodString;
67
+ webhookTimestamp: z.ZodNumber;
68
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
69
+ }, z.core.$strip>, z.ZodObject<{
70
+ action: z.ZodString;
71
+ type: z.ZodLiteral<"AgentSessionEvent">;
72
+ organizationId: z.ZodString;
73
+ appUserId: z.ZodString;
74
+ webhookTimestamp: z.ZodNumber;
75
+ agentSession: z.ZodRecord<z.ZodString, z.ZodUnknown>;
76
+ }, z.core.$strip>]>;
77
+ export type LinearWebhookBaseEnvelopeDto = z.infer<typeof linearWebhookBaseEnvelopeSchema>;
78
+ export declare const createLinearInstallBodySchema: z.ZodObject<{
79
+ workspace_id: z.ZodString;
80
+ }, z.core.$strip>;
81
+ export type CreateLinearInstallBodyDto = z.infer<typeof createLinearInstallBodySchema>;
82
+ export declare const createLinearInstallResponseSchema: z.ZodObject<{
83
+ install_url: z.ZodString;
84
+ }, z.core.$strip>;
85
+ export type CreateLinearInstallResponseDto = z.infer<typeof createLinearInstallResponseSchema>;
86
+ export declare const linearCallbackQuerySchema: z.ZodUnion<readonly [z.ZodObject<{
87
+ code: z.ZodString;
88
+ state: z.ZodString;
89
+ }, z.core.$strip>, z.ZodObject<{
90
+ error: z.ZodString;
91
+ error_description: z.ZodOptional<z.ZodString>;
92
+ state: z.ZodString;
93
+ }, z.core.$strip>]>;
94
+ export type LinearCallbackQueryDto = z.infer<typeof linearCallbackQuerySchema>;
95
+ export declare const linearCallbackResponseSchema: z.ZodObject<{
96
+ id: z.ZodString;
97
+ workspace_id: z.ZodString;
98
+ provider: z.ZodString;
99
+ external_account_id: z.ZodString;
100
+ slug: z.ZodString;
101
+ display_name: z.ZodString;
102
+ lifecycle_status: z.ZodEnum<{
103
+ error: "error";
104
+ active: "active";
105
+ disabled: "disabled";
106
+ }>;
107
+ capabilities: z.ZodArray<z.ZodEnum<{
108
+ source_control: "source_control";
109
+ agent_tools: "agent_tools";
110
+ }>>;
111
+ external_url: z.ZodOptional<z.ZodString>;
112
+ created_at: z.ZodString;
113
+ updated_at: z.ZodString;
114
+ }, z.core.$strip>;
115
+ export type LinearCallbackResponseDto = z.infer<typeof linearCallbackResponseSchema>;
116
+ export declare const createE2eLinearConnectionBodySchema: z.ZodObject<{
117
+ workspace_id: z.ZodString;
118
+ organization_id: z.ZodString;
119
+ organization_url_key: z.ZodString;
120
+ app_user_id: z.ZodString;
121
+ display_name: z.ZodString;
122
+ access_token: z.ZodString;
123
+ scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
124
+ }, z.core.$strip>;
125
+ export type CreateE2eLinearConnectionBodyDto = z.infer<typeof createE2eLinearConnectionBodySchema>;
126
+ export declare const createE2eLinearConnectionResponseSchema: z.ZodObject<{
127
+ id: z.ZodString;
128
+ workspace_id: z.ZodString;
129
+ provider: z.ZodString;
130
+ external_account_id: z.ZodString;
131
+ slug: z.ZodString;
132
+ display_name: z.ZodString;
133
+ lifecycle_status: z.ZodEnum<{
134
+ error: "error";
135
+ active: "active";
136
+ disabled: "disabled";
137
+ }>;
138
+ capabilities: z.ZodArray<z.ZodEnum<{
139
+ source_control: "source_control";
140
+ agent_tools: "agent_tools";
141
+ }>>;
142
+ external_url: z.ZodOptional<z.ZodString>;
143
+ created_at: z.ZodString;
144
+ updated_at: z.ZodString;
145
+ }, z.core.$strip>;
146
+ export type CreateE2eLinearConnectionResponseDto = z.infer<typeof createE2eLinearConnectionResponseSchema>;
147
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,eAAe,WAAW,CAAC;AAExC,MAAM,MAAM,cAAc,GAAG,OAAO,eAAe,CAAC;AAEpD,eAAO,MAAM,0BAA0B,iEAM7B,CAAC;AACX,eAAO,MAAM,oBAAoB,yCAA0C,CAAC;AAC5E,eAAO,MAAM,gCAAgC,kCAAmC,CAAC;AAKjF,eAAO,MAAM,mCAAmC,sDAE/C,CAAC;AACF,eAAO,MAAM,uBAAuB,yVAG1B,CAAC;AAEX,MAAM,MAAM,yBAAyB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AACpF,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AACxE,MAAM,MAAM,+BAA+B,GAAG,CAAC,OAAO,gCAAgC,CAAC,CAAC,MAAM,CAAC,CAAC;AAChG,MAAM,MAAM,kCAAkC,GAC5C,CAAC,OAAO,mCAAmC,CAAC,CAAC,MAAM,CAAC,CAAC;AACvD,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAoB9E,eAAO,MAAM,2CAA2C;;;;;;;iBAOtD,CAAC;AACH,MAAM,MAAM,wCAAwC,GAAG,CAAC,CAAC,KAAK,CAC5D,OAAO,2CAA2C,CACnD,CAAC;AAEF,eAAO,MAAM,uCAAuC;;;;;;;;;;iBAGhD,CAAC;AACL,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACxD,OAAO,uCAAuC,CAC/C,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;mBAGtC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEnF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;mBAG1C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAE3F,eAAO,MAAM,6BAA6B;;iBAExC,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEvF,eAAO,MAAM,iCAAiC;;iBAE5C,CAAC;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE/F,eAAO,MAAM,yBAAyB;;;;;;;mBAUpC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE/E,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;iBAAiC,CAAC;AAC3E,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAErF,eAAO,MAAM,mCAAmC;;;;;;;;iBAQ9C,CAAC;AACH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAEnG,eAAO,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;;iBAAiC,CAAC;AACtF,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACxD,OAAO,uCAAuC,CAC/C,CAAC"}
@@ -0,0 +1,93 @@
1
+ import { integrationConnectionDtoSchema } from '@shipfox/api-integration-core-dto';
2
+ import { z } from 'zod';
3
+ export const LINEAR_PROVIDER = 'linear';
4
+ export const linearWebhookResourceTypes = [
5
+ 'Issue',
6
+ 'Comment',
7
+ 'IssueLabel',
8
+ 'Project',
9
+ 'Cycle'
10
+ ];
11
+ export const linearWebhookActions = [
12
+ 'create',
13
+ 'update',
14
+ 'remove'
15
+ ];
16
+ export const linearAgentSessionWebhookActions = [
17
+ 'created',
18
+ 'prompted'
19
+ ];
20
+ const linearDataWebhookEventNames = linearWebhookResourceTypes.flatMap((type)=>linearWebhookActions.map((action)=>`${type}.${action}`));
21
+ export const linearAgentSessionWebhookEventNames = linearAgentSessionWebhookActions.map((action)=>`agentSession.${action}`);
22
+ export const linearWebhookEventNames = [
23
+ ...linearDataWebhookEventNames,
24
+ ...linearAgentSessionWebhookEventNames
25
+ ];
26
+ const linearWebhookDataSchema = z.record(z.string(), z.unknown());
27
+ const linearWebhookAgentSessionSchema = z.record(z.string(), z.unknown());
28
+ const linearWebhookDataEnvelopeSchema = z.object({
29
+ action: z.enum(linearWebhookActions),
30
+ type: z.enum(linearWebhookResourceTypes),
31
+ organizationId: z.string().min(1),
32
+ webhookTimestamp: z.number().int(),
33
+ data: linearWebhookDataSchema
34
+ });
35
+ const linearWebhookDataBaseEnvelopeSchema = z.object({
36
+ action: z.string().min(1),
37
+ type: z.string().min(1),
38
+ organizationId: z.string().min(1),
39
+ webhookTimestamp: z.number().int(),
40
+ data: linearWebhookDataSchema
41
+ });
42
+ export const linearAgentSessionWebhookBaseEnvelopeSchema = z.object({
43
+ action: z.string().min(1),
44
+ type: z.literal('AgentSessionEvent'),
45
+ organizationId: z.string().min(1),
46
+ appUserId: z.string().min(1),
47
+ webhookTimestamp: z.number().int(),
48
+ agentSession: linearWebhookAgentSessionSchema
49
+ });
50
+ export const linearAgentSessionWebhookEnvelopeSchema = linearAgentSessionWebhookBaseEnvelopeSchema.extend({
51
+ action: z.enum(linearAgentSessionWebhookActions)
52
+ });
53
+ export const linearWebhookEnvelopeSchema = z.union([
54
+ linearWebhookDataEnvelopeSchema,
55
+ linearAgentSessionWebhookEnvelopeSchema
56
+ ]);
57
+ export const linearWebhookBaseEnvelopeSchema = z.union([
58
+ linearWebhookDataBaseEnvelopeSchema,
59
+ linearAgentSessionWebhookBaseEnvelopeSchema
60
+ ]);
61
+ export const createLinearInstallBodySchema = z.object({
62
+ workspace_id: z.string().uuid()
63
+ });
64
+ export const createLinearInstallResponseSchema = z.object({
65
+ install_url: z.string().url()
66
+ });
67
+ export const linearCallbackQuerySchema = z.union([
68
+ z.object({
69
+ code: z.string().min(1),
70
+ state: z.string().min(1)
71
+ }),
72
+ z.object({
73
+ error: z.string().min(1),
74
+ error_description: z.string().min(1).optional(),
75
+ state: z.string().min(1)
76
+ })
77
+ ]);
78
+ export const linearCallbackResponseSchema = integrationConnectionDtoSchema;
79
+ export const createE2eLinearConnectionBodySchema = z.object({
80
+ workspace_id: z.string().uuid(),
81
+ organization_id: z.string().min(1),
82
+ organization_url_key: z.string().min(1),
83
+ app_user_id: z.string().min(1),
84
+ display_name: z.string().min(1),
85
+ access_token: z.string().min(1),
86
+ scopes: z.array(z.string().min(1)).min(1).default([
87
+ 'read',
88
+ 'write'
89
+ ])
90
+ });
91
+ export const createE2eLinearConnectionResponseSchema = integrationConnectionDtoSchema;
92
+
93
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/schemas/index.ts"],"sourcesContent":["import {integrationConnectionDtoSchema} from '@shipfox/api-integration-core-dto';\nimport {z} from 'zod';\n\nexport const LINEAR_PROVIDER = 'linear';\n\nexport type LinearProvider = typeof LINEAR_PROVIDER;\n\nexport const linearWebhookResourceTypes = [\n 'Issue',\n 'Comment',\n 'IssueLabel',\n 'Project',\n 'Cycle',\n] as const;\nexport const linearWebhookActions = ['create', 'update', 'remove'] as const;\nexport const linearAgentSessionWebhookActions = ['created', 'prompted'] as const;\n\nconst linearDataWebhookEventNames = linearWebhookResourceTypes.flatMap((type) =>\n linearWebhookActions.map((action) => `${type}.${action}` as const),\n);\nexport const linearAgentSessionWebhookEventNames = linearAgentSessionWebhookActions.map(\n (action) => `agentSession.${action}` as const,\n);\nexport const linearWebhookEventNames = [\n ...linearDataWebhookEventNames,\n ...linearAgentSessionWebhookEventNames,\n] as const;\n\nexport type LinearWebhookResourceType = (typeof linearWebhookResourceTypes)[number];\nexport type LinearWebhookAction = (typeof linearWebhookActions)[number];\nexport type LinearAgentSessionWebhookAction = (typeof linearAgentSessionWebhookActions)[number];\nexport type LinearAgentSessionWebhookEventName =\n (typeof linearAgentSessionWebhookEventNames)[number];\nexport type LinearWebhookEventName = (typeof linearWebhookEventNames)[number];\n\nconst linearWebhookDataSchema = z.record(z.string(), z.unknown());\nconst linearWebhookAgentSessionSchema = z.record(z.string(), z.unknown());\n\nconst linearWebhookDataEnvelopeSchema = z.object({\n action: z.enum(linearWebhookActions),\n type: z.enum(linearWebhookResourceTypes),\n organizationId: z.string().min(1),\n webhookTimestamp: z.number().int(),\n data: linearWebhookDataSchema,\n});\n\nconst linearWebhookDataBaseEnvelopeSchema = z.object({\n action: z.string().min(1),\n type: z.string().min(1),\n organizationId: z.string().min(1),\n webhookTimestamp: z.number().int(),\n data: linearWebhookDataSchema,\n});\nexport const linearAgentSessionWebhookBaseEnvelopeSchema = z.object({\n action: z.string().min(1),\n type: z.literal('AgentSessionEvent'),\n organizationId: z.string().min(1),\n appUserId: z.string().min(1),\n webhookTimestamp: z.number().int(),\n agentSession: linearWebhookAgentSessionSchema,\n});\nexport type LinearAgentSessionWebhookBaseEnvelopeDto = z.infer<\n typeof linearAgentSessionWebhookBaseEnvelopeSchema\n>;\n\nexport const linearAgentSessionWebhookEnvelopeSchema =\n linearAgentSessionWebhookBaseEnvelopeSchema.extend({\n action: z.enum(linearAgentSessionWebhookActions),\n });\nexport type LinearAgentSessionWebhookEnvelopeDto = z.infer<\n typeof linearAgentSessionWebhookEnvelopeSchema\n>;\n\nexport const linearWebhookEnvelopeSchema = z.union([\n linearWebhookDataEnvelopeSchema,\n linearAgentSessionWebhookEnvelopeSchema,\n]);\nexport type LinearWebhookEnvelopeDto = z.infer<typeof linearWebhookEnvelopeSchema>;\n\nexport const linearWebhookBaseEnvelopeSchema = z.union([\n linearWebhookDataBaseEnvelopeSchema,\n linearAgentSessionWebhookBaseEnvelopeSchema,\n]);\nexport type LinearWebhookBaseEnvelopeDto = z.infer<typeof linearWebhookBaseEnvelopeSchema>;\n\nexport const createLinearInstallBodySchema = z.object({\n workspace_id: z.string().uuid(),\n});\nexport type CreateLinearInstallBodyDto = z.infer<typeof createLinearInstallBodySchema>;\n\nexport const createLinearInstallResponseSchema = z.object({\n install_url: z.string().url(),\n});\nexport type CreateLinearInstallResponseDto = z.infer<typeof createLinearInstallResponseSchema>;\n\nexport const linearCallbackQuerySchema = z.union([\n z.object({\n code: z.string().min(1),\n state: z.string().min(1),\n }),\n z.object({\n error: z.string().min(1),\n error_description: z.string().min(1).optional(),\n state: z.string().min(1),\n }),\n]);\nexport type LinearCallbackQueryDto = z.infer<typeof linearCallbackQuerySchema>;\n\nexport const linearCallbackResponseSchema = integrationConnectionDtoSchema;\nexport type LinearCallbackResponseDto = z.infer<typeof linearCallbackResponseSchema>;\n\nexport const createE2eLinearConnectionBodySchema = z.object({\n workspace_id: z.string().uuid(),\n organization_id: z.string().min(1),\n organization_url_key: z.string().min(1),\n app_user_id: z.string().min(1),\n display_name: z.string().min(1),\n access_token: z.string().min(1),\n scopes: z.array(z.string().min(1)).min(1).default(['read', 'write']),\n});\nexport type CreateE2eLinearConnectionBodyDto = z.infer<typeof createE2eLinearConnectionBodySchema>;\n\nexport const createE2eLinearConnectionResponseSchema = integrationConnectionDtoSchema;\nexport type CreateE2eLinearConnectionResponseDto = z.infer<\n typeof createE2eLinearConnectionResponseSchema\n>;\n"],"names":["integrationConnectionDtoSchema","z","LINEAR_PROVIDER","linearWebhookResourceTypes","linearWebhookActions","linearAgentSessionWebhookActions","linearDataWebhookEventNames","flatMap","type","map","action","linearAgentSessionWebhookEventNames","linearWebhookEventNames","linearWebhookDataSchema","record","string","unknown","linearWebhookAgentSessionSchema","linearWebhookDataEnvelopeSchema","object","enum","organizationId","min","webhookTimestamp","number","int","data","linearWebhookDataBaseEnvelopeSchema","linearAgentSessionWebhookBaseEnvelopeSchema","literal","appUserId","agentSession","linearAgentSessionWebhookEnvelopeSchema","extend","linearWebhookEnvelopeSchema","union","linearWebhookBaseEnvelopeSchema","createLinearInstallBodySchema","workspace_id","uuid","createLinearInstallResponseSchema","install_url","url","linearCallbackQuerySchema","code","state","error","error_description","optional","linearCallbackResponseSchema","createE2eLinearConnectionBodySchema","organization_id","organization_url_key","app_user_id","display_name","access_token","scopes","array","default","createE2eLinearConnectionResponseSchema"],"mappings":"AAAA,SAAQA,8BAA8B,QAAO,oCAAoC;AACjF,SAAQC,CAAC,QAAO,MAAM;AAEtB,OAAO,MAAMC,kBAAkB,SAAS;AAIxC,OAAO,MAAMC,6BAA6B;IACxC;IACA;IACA;IACA;IACA;CACD,CAAU;AACX,OAAO,MAAMC,uBAAuB;IAAC;IAAU;IAAU;CAAS,CAAU;AAC5E,OAAO,MAAMC,mCAAmC;IAAC;IAAW;CAAW,CAAU;AAEjF,MAAMC,8BAA8BH,2BAA2BI,OAAO,CAAC,CAACC,OACtEJ,qBAAqBK,GAAG,CAAC,CAACC,SAAW,GAAGF,KAAK,CAAC,EAAEE,QAAQ;AAE1D,OAAO,MAAMC,sCAAsCN,iCAAiCI,GAAG,CACrF,CAACC,SAAW,CAAC,aAAa,EAAEA,QAAQ,EACpC;AACF,OAAO,MAAME,0BAA0B;OAClCN;OACAK;CACJ,CAAU;AASX,MAAME,0BAA0BZ,EAAEa,MAAM,CAACb,EAAEc,MAAM,IAAId,EAAEe,OAAO;AAC9D,MAAMC,kCAAkChB,EAAEa,MAAM,CAACb,EAAEc,MAAM,IAAId,EAAEe,OAAO;AAEtE,MAAME,kCAAkCjB,EAAEkB,MAAM,CAAC;IAC/CT,QAAQT,EAAEmB,IAAI,CAAChB;IACfI,MAAMP,EAAEmB,IAAI,CAACjB;IACbkB,gBAAgBpB,EAAEc,MA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