@shipfox/api-integration-core-dto 12.0.0 → 14.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 +17 -0
- package/dist/events.d.ts +27 -4
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +14 -0
- package/dist/events.js.map +1 -1
- package/dist/inter-module.d.ts +88 -37
- package/dist/inter-module.d.ts.map +1 -1
- package/dist/inter-module.js +33 -0
- package/dist/inter-module.js.map +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/integrations.d.ts +25 -19
- package/dist/schemas/integrations.d.ts.map +1 -1
- package/dist/schemas/integrations.js +8 -0
- package/dist/schemas/integrations.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/dist/webhooks.d.ts +8 -8
- package/package.json +1 -1
- package/src/events.test.ts +70 -0
- package/src/events.ts +19 -0
- package/src/inter-module.test.ts +76 -0
- package/src/inter-module.ts +21 -0
- package/src/schemas/index.ts +1 -0
- package/src/schemas/integrations.ts +7 -0
- package/tsconfig.build.tsbuildinfo +1 -1
package/dist/schemas/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { CONNECTION_SLUG_MAX_LENGTH, connectionSlugSchema, integrationCapabilitySchema, integrationConnectionDtoSchema, integrationConnectionLifecycleStatusSchema, integrationProviderDtoSchema, integrationProviderKindSchema, listIntegrationConnectionsQuerySchema, listIntegrationConnectionsResponseSchema, listIntegrationProvidersQuerySchema, listIntegrationProvidersResponseSchema, listRepositoriesParamsSchema, listRepositoriesQuerySchema, listRepositoriesResponseSchema, repositoryDtoSchema, repositoryVisibilitySchema, updateIntegrationConnectionBodySchema, updateIntegrationConnectionLifecycleStatusSchema } from './integrations.js';
|
|
1
|
+
export { CONNECTION_SLUG_MAX_LENGTH, connectionSlugSchema, integrationCapabilitySchema, integrationConnectionDtoSchema, integrationConnectionLifecycleStatusSchema, integrationProviderDtoSchema, integrationProviderKindSchema, listIntegrationConnectionsQuerySchema, listIntegrationConnectionsResponseSchema, listIntegrationProvidersQuerySchema, listIntegrationProvidersResponseSchema, listRepositoriesParamsSchema, listRepositoriesQuerySchema, listRepositoriesResponseSchema, RESERVED_CONNECTION_SLUGS, repositoryDtoSchema, repositoryVisibilitySchema, updateIntegrationConnectionBodySchema, updateIntegrationConnectionLifecycleStatusSchema } from './integrations.js';
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/schemas/index.ts"],"sourcesContent":["export {\n CONNECTION_SLUG_MAX_LENGTH,\n connectionSlugSchema,\n type IntegrationCapabilityDto,\n type IntegrationConnectionDto,\n type IntegrationConnectionLifecycleStatusDto,\n type IntegrationProviderDto,\n type IntegrationProviderKindDto,\n integrationCapabilitySchema,\n integrationConnectionDtoSchema,\n integrationConnectionLifecycleStatusSchema,\n integrationProviderDtoSchema,\n integrationProviderKindSchema,\n type ListIntegrationConnectionsQueryDto,\n type ListIntegrationConnectionsResponseDto,\n type ListIntegrationProvidersQueryDto,\n type ListIntegrationProvidersResponseDto,\n type ListRepositoriesParamsDto,\n type ListRepositoriesQueryDto,\n type ListRepositoriesResponseDto,\n listIntegrationConnectionsQuerySchema,\n listIntegrationConnectionsResponseSchema,\n listIntegrationProvidersQuerySchema,\n listIntegrationProvidersResponseSchema,\n listRepositoriesParamsSchema,\n listRepositoriesQuerySchema,\n listRepositoriesResponseSchema,\n type RepositoryDto,\n type RepositoryVisibilityDto,\n repositoryDtoSchema,\n repositoryVisibilitySchema,\n type UpdateIntegrationConnectionBodyDto,\n type UpdateIntegrationConnectionLifecycleStatusDto,\n updateIntegrationConnectionBodySchema,\n updateIntegrationConnectionLifecycleStatusSchema,\n} from './integrations.js';\n"],"names":["CONNECTION_SLUG_MAX_LENGTH","connectionSlugSchema","integrationCapabilitySchema","integrationConnectionDtoSchema","integrationConnectionLifecycleStatusSchema","integrationProviderDtoSchema","integrationProviderKindSchema","listIntegrationConnectionsQuerySchema","listIntegrationConnectionsResponseSchema","listIntegrationProvidersQuerySchema","listIntegrationProvidersResponseSchema","listRepositoriesParamsSchema","listRepositoriesQuerySchema","listRepositoriesResponseSchema","repositoryDtoSchema","repositoryVisibilitySchema","updateIntegrationConnectionBodySchema","updateIntegrationConnectionLifecycleStatusSchema"],"mappings":"AAAA,SACEA,0BAA0B,EAC1BC,oBAAoB,EAMpBC,2BAA2B,EAC3BC,8BAA8B,EAC9BC,0CAA0C,EAC1CC,4BAA4B,EAC5BC,6BAA6B,EAQ7BC,qCAAqC,EACrCC,wCAAwC,EACxCC,mCAAmC,EACnCC,sCAAsC,EACtCC,4BAA4B,EAC5BC,2BAA2B,EAC3BC,8BAA8B,
|
|
1
|
+
{"version":3,"sources":["../../src/schemas/index.ts"],"sourcesContent":["export {\n CONNECTION_SLUG_MAX_LENGTH,\n connectionSlugSchema,\n type IntegrationCapabilityDto,\n type IntegrationConnectionDto,\n type IntegrationConnectionLifecycleStatusDto,\n type IntegrationProviderDto,\n type IntegrationProviderKindDto,\n integrationCapabilitySchema,\n integrationConnectionDtoSchema,\n integrationConnectionLifecycleStatusSchema,\n integrationProviderDtoSchema,\n integrationProviderKindSchema,\n type ListIntegrationConnectionsQueryDto,\n type ListIntegrationConnectionsResponseDto,\n type ListIntegrationProvidersQueryDto,\n type ListIntegrationProvidersResponseDto,\n type ListRepositoriesParamsDto,\n type ListRepositoriesQueryDto,\n type ListRepositoriesResponseDto,\n listIntegrationConnectionsQuerySchema,\n listIntegrationConnectionsResponseSchema,\n listIntegrationProvidersQuerySchema,\n listIntegrationProvidersResponseSchema,\n listRepositoriesParamsSchema,\n listRepositoriesQuerySchema,\n listRepositoriesResponseSchema,\n RESERVED_CONNECTION_SLUGS,\n type RepositoryDto,\n type RepositoryVisibilityDto,\n repositoryDtoSchema,\n repositoryVisibilitySchema,\n type UpdateIntegrationConnectionBodyDto,\n type UpdateIntegrationConnectionLifecycleStatusDto,\n updateIntegrationConnectionBodySchema,\n updateIntegrationConnectionLifecycleStatusSchema,\n} from './integrations.js';\n"],"names":["CONNECTION_SLUG_MAX_LENGTH","connectionSlugSchema","integrationCapabilitySchema","integrationConnectionDtoSchema","integrationConnectionLifecycleStatusSchema","integrationProviderDtoSchema","integrationProviderKindSchema","listIntegrationConnectionsQuerySchema","listIntegrationConnectionsResponseSchema","listIntegrationProvidersQuerySchema","listIntegrationProvidersResponseSchema","listRepositoriesParamsSchema","listRepositoriesQuerySchema","listRepositoriesResponseSchema","RESERVED_CONNECTION_SLUGS","repositoryDtoSchema","repositoryVisibilitySchema","updateIntegrationConnectionBodySchema","updateIntegrationConnectionLifecycleStatusSchema"],"mappings":"AAAA,SACEA,0BAA0B,EAC1BC,oBAAoB,EAMpBC,2BAA2B,EAC3BC,8BAA8B,EAC9BC,0CAA0C,EAC1CC,4BAA4B,EAC5BC,6BAA6B,EAQ7BC,qCAAqC,EACrCC,wCAAwC,EACxCC,mCAAmC,EACnCC,sCAAsC,EACtCC,4BAA4B,EAC5BC,2BAA2B,EAC3BC,8BAA8B,EAC9BC,yBAAyB,EAGzBC,mBAAmB,EACnBC,0BAA0B,EAG1BC,qCAAqC,EACrCC,gDAAgD,QAC3C,oBAAoB"}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const CONNECTION_SLUG_MAX_LENGTH = 100;
|
|
3
|
+
/**
|
|
4
|
+
* Slugs sync classifies by literal: a source equal to one of these names is a
|
|
5
|
+
* built-in trigger source, never a connection. No provider may allocate a
|
|
6
|
+
* connection holding one of them.
|
|
7
|
+
*/
|
|
8
|
+
export declare const RESERVED_CONNECTION_SLUGS: readonly ['manual', 'cron'];
|
|
3
9
|
export declare const connectionSlugSchema: z.ZodString;
|
|
4
10
|
export declare const integrationProviderKindSchema: z.ZodString;
|
|
5
11
|
export type IntegrationProviderKindDto = z.infer<typeof integrationProviderKindSchema>;
|
|
6
12
|
export declare const integrationCapabilitySchema: z.ZodEnum<{
|
|
7
|
-
source_control: "source_control";
|
|
8
13
|
agent_tools: "agent_tools";
|
|
14
|
+
source_control: "source_control";
|
|
9
15
|
}>;
|
|
10
16
|
export type IntegrationCapabilityDto = z.infer<typeof integrationCapabilitySchema>;
|
|
11
17
|
export declare const integrationConnectionLifecycleStatusSchema: z.ZodEnum<{
|
|
12
|
-
error: "error";
|
|
13
18
|
active: "active";
|
|
14
19
|
disabled: "disabled";
|
|
20
|
+
error: "error";
|
|
15
21
|
}>;
|
|
16
22
|
export type IntegrationConnectionLifecycleStatusDto = z.infer<typeof integrationConnectionLifecycleStatusSchema>;
|
|
17
23
|
export declare const updateIntegrationConnectionLifecycleStatusSchema: z.ZodEnum<{
|
|
@@ -20,25 +26,25 @@ export declare const updateIntegrationConnectionLifecycleStatusSchema: z.ZodEnum
|
|
|
20
26
|
}>;
|
|
21
27
|
export type UpdateIntegrationConnectionLifecycleStatusDto = z.infer<typeof updateIntegrationConnectionLifecycleStatusSchema>;
|
|
22
28
|
export declare const repositoryVisibilitySchema: z.ZodEnum<{
|
|
23
|
-
unknown: "unknown";
|
|
24
|
-
public: "public";
|
|
25
|
-
private: "private";
|
|
26
29
|
internal: "internal";
|
|
30
|
+
private: "private";
|
|
31
|
+
public: "public";
|
|
32
|
+
unknown: "unknown";
|
|
27
33
|
}>;
|
|
28
34
|
export type RepositoryVisibilityDto = z.infer<typeof repositoryVisibilitySchema>;
|
|
29
35
|
export declare const integrationProviderDtoSchema: z.ZodObject<{
|
|
30
36
|
provider: z.ZodString;
|
|
31
37
|
display_name: z.ZodString;
|
|
32
38
|
capabilities: z.ZodArray<z.ZodEnum<{
|
|
33
|
-
source_control: "source_control";
|
|
34
39
|
agent_tools: "agent_tools";
|
|
40
|
+
source_control: "source_control";
|
|
35
41
|
}>>;
|
|
36
42
|
}, z.core.$strip>;
|
|
37
43
|
export type IntegrationProviderDto = z.infer<typeof integrationProviderDtoSchema>;
|
|
38
44
|
export declare const listIntegrationProvidersQuerySchema: z.ZodObject<{
|
|
39
45
|
capability: z.ZodOptional<z.ZodEnum<{
|
|
40
|
-
source_control: "source_control";
|
|
41
46
|
agent_tools: "agent_tools";
|
|
47
|
+
source_control: "source_control";
|
|
42
48
|
}>>;
|
|
43
49
|
}, z.core.$strip>;
|
|
44
50
|
export type ListIntegrationProvidersQueryDto = z.infer<typeof listIntegrationProvidersQuerySchema>;
|
|
@@ -47,8 +53,8 @@ export declare const listIntegrationProvidersResponseSchema: z.ZodObject<{
|
|
|
47
53
|
provider: z.ZodString;
|
|
48
54
|
display_name: z.ZodString;
|
|
49
55
|
capabilities: z.ZodArray<z.ZodEnum<{
|
|
50
|
-
source_control: "source_control";
|
|
51
56
|
agent_tools: "agent_tools";
|
|
57
|
+
source_control: "source_control";
|
|
52
58
|
}>>;
|
|
53
59
|
}, z.core.$strip>>;
|
|
54
60
|
}, z.core.$strip>;
|
|
@@ -61,13 +67,13 @@ export declare const integrationConnectionDtoSchema: z.ZodObject<{
|
|
|
61
67
|
slug: z.ZodString;
|
|
62
68
|
display_name: z.ZodString;
|
|
63
69
|
lifecycle_status: z.ZodEnum<{
|
|
64
|
-
error: "error";
|
|
65
70
|
active: "active";
|
|
66
71
|
disabled: "disabled";
|
|
72
|
+
error: "error";
|
|
67
73
|
}>;
|
|
68
74
|
capabilities: z.ZodArray<z.ZodEnum<{
|
|
69
|
-
source_control: "source_control";
|
|
70
75
|
agent_tools: "agent_tools";
|
|
76
|
+
source_control: "source_control";
|
|
71
77
|
}>>;
|
|
72
78
|
external_url: z.ZodOptional<z.ZodString>;
|
|
73
79
|
created_at: z.ZodString;
|
|
@@ -77,8 +83,8 @@ export type IntegrationConnectionDto = z.infer<typeof integrationConnectionDtoSc
|
|
|
77
83
|
export declare const listIntegrationConnectionsQuerySchema: z.ZodObject<{
|
|
78
84
|
workspace_id: z.ZodString;
|
|
79
85
|
capability: z.ZodOptional<z.ZodEnum<{
|
|
80
|
-
source_control: "source_control";
|
|
81
86
|
agent_tools: "agent_tools";
|
|
87
|
+
source_control: "source_control";
|
|
82
88
|
}>>;
|
|
83
89
|
}, z.core.$strip>;
|
|
84
90
|
export type ListIntegrationConnectionsQueryDto = z.infer<typeof listIntegrationConnectionsQuerySchema>;
|
|
@@ -91,13 +97,13 @@ export declare const listIntegrationConnectionsResponseSchema: z.ZodObject<{
|
|
|
91
97
|
slug: z.ZodString;
|
|
92
98
|
display_name: z.ZodString;
|
|
93
99
|
lifecycle_status: z.ZodEnum<{
|
|
94
|
-
error: "error";
|
|
95
100
|
active: "active";
|
|
96
101
|
disabled: "disabled";
|
|
102
|
+
error: "error";
|
|
97
103
|
}>;
|
|
98
104
|
capabilities: z.ZodArray<z.ZodEnum<{
|
|
99
|
-
source_control: "source_control";
|
|
100
105
|
agent_tools: "agent_tools";
|
|
106
|
+
source_control: "source_control";
|
|
101
107
|
}>>;
|
|
102
108
|
external_url: z.ZodOptional<z.ZodString>;
|
|
103
109
|
created_at: z.ZodString;
|
|
@@ -130,10 +136,10 @@ export declare const repositoryDtoSchema: z.ZodObject<{
|
|
|
130
136
|
full_name: z.ZodString;
|
|
131
137
|
default_branch: z.ZodString;
|
|
132
138
|
visibility: z.ZodEnum<{
|
|
133
|
-
unknown: "unknown";
|
|
134
|
-
public: "public";
|
|
135
|
-
private: "private";
|
|
136
139
|
internal: "internal";
|
|
140
|
+
private: "private";
|
|
141
|
+
public: "public";
|
|
142
|
+
unknown: "unknown";
|
|
137
143
|
}>;
|
|
138
144
|
clone_url: z.ZodString;
|
|
139
145
|
html_url: z.ZodString;
|
|
@@ -148,10 +154,10 @@ export declare const listRepositoriesResponseSchema: z.ZodObject<{
|
|
|
148
154
|
full_name: z.ZodString;
|
|
149
155
|
default_branch: z.ZodString;
|
|
150
156
|
visibility: z.ZodEnum<{
|
|
151
|
-
unknown: "unknown";
|
|
152
|
-
public: "public";
|
|
153
|
-
private: "private";
|
|
154
157
|
internal: "internal";
|
|
158
|
+
private: "private";
|
|
159
|
+
public: "public";
|
|
160
|
+
unknown: "unknown";
|
|
155
161
|
}>;
|
|
156
162
|
clone_url: z.ZodString;
|
|
157
163
|
html_url: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../src/schemas/integrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAE9C,eAAO,MAAM,oBAAoB,aAIQ,CAAC;AAE1C,eAAO,MAAM,6BAA6B,aAAoB,CAAC;AAC/D,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEvF,eAAO,MAAM,2BAA2B;;;EAA4C,CAAC;AACrF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEnF,eAAO,MAAM,0CAA0C;;;;EAA0C,CAAC;AAClG,MAAM,MAAM,uCAAuC,GAAG,CAAC,CAAC,KAAK,CAC3D,OAAO,0CAA0C,CAClD,CAAC;AACF,eAAO,MAAM,gDAAgD;;;EAAiC,CAAC;AAC/F,MAAM,MAAM,6CAA6C,GAAG,CAAC,CAAC,KAAK,CACjE,OAAO,gDAAgD,CACxD,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;EAAuD,CAAC;AAC/F,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEjF,eAAO,MAAM,4BAA4B;;;;;;;iBAIvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,mCAAmC;;;;;iBAE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8B,CAAC,CAAC"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export const CONNECTION_SLUG_MAX_LENGTH = 100;
|
|
3
|
+
/**
|
|
4
|
+
* Slugs sync classifies by literal: a source equal to one of these names is a
|
|
5
|
+
* built-in trigger source, never a connection. No provider may allocate a
|
|
6
|
+
* connection holding one of them.
|
|
7
|
+
*/ export const RESERVED_CONNECTION_SLUGS = [
|
|
8
|
+
'manual',
|
|
9
|
+
'cron'
|
|
10
|
+
];
|
|
3
11
|
export const connectionSlugSchema = z.string().min(1).max(CONNECTION_SLUG_MAX_LENGTH).regex(/^[a-z0-9]+(?:[_-][a-z0-9]+)*$/);
|
|
4
12
|
export const integrationProviderKindSchema = z.string().min(1);
|
|
5
13
|
export const integrationCapabilitySchema = z.enum([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/schemas/integrations.ts"],"sourcesContent":["import {z} from 'zod';\n\nexport const CONNECTION_SLUG_MAX_LENGTH = 100;\n\nexport const connectionSlugSchema = z\n .string()\n .min(1)\n .max(CONNECTION_SLUG_MAX_LENGTH)\n .regex(/^[a-z0-9]+(?:[_-][a-z0-9]+)*$/);\n\nexport const integrationProviderKindSchema = z.string().min(1);\nexport type IntegrationProviderKindDto = z.infer<typeof integrationProviderKindSchema>;\n\nexport const integrationCapabilitySchema = z.enum(['source_control', 'agent_tools']);\nexport type IntegrationCapabilityDto = z.infer<typeof integrationCapabilitySchema>;\n\nexport const integrationConnectionLifecycleStatusSchema = z.enum(['active', 'disabled', 'error']);\nexport type IntegrationConnectionLifecycleStatusDto = z.infer<\n typeof integrationConnectionLifecycleStatusSchema\n>;\nexport const updateIntegrationConnectionLifecycleStatusSchema = z.enum(['active', 'disabled']);\nexport type UpdateIntegrationConnectionLifecycleStatusDto = z.infer<\n typeof updateIntegrationConnectionLifecycleStatusSchema\n>;\n\nexport const repositoryVisibilitySchema = z.enum(['public', 'private', 'internal', 'unknown']);\nexport type RepositoryVisibilityDto = z.infer<typeof repositoryVisibilitySchema>;\n\nexport const integrationProviderDtoSchema = z.object({\n provider: integrationProviderKindSchema,\n display_name: z.string(),\n capabilities: z.array(integrationCapabilitySchema),\n});\nexport type IntegrationProviderDto = z.infer<typeof integrationProviderDtoSchema>;\n\nexport const listIntegrationProvidersQuerySchema = z.object({\n capability: integrationCapabilitySchema.optional(),\n});\nexport type ListIntegrationProvidersQueryDto = z.infer<typeof listIntegrationProvidersQuerySchema>;\n\nexport const listIntegrationProvidersResponseSchema = z.object({\n providers: z.array(integrationProviderDtoSchema),\n});\nexport type ListIntegrationProvidersResponseDto = z.infer<\n typeof listIntegrationProvidersResponseSchema\n>;\n\nexport const integrationConnectionDtoSchema = z.object({\n id: z.string().uuid(),\n workspace_id: z.string().uuid(),\n provider: integrationProviderKindSchema,\n external_account_id: z.string(),\n slug: connectionSlugSchema,\n display_name: z.string(),\n lifecycle_status: integrationConnectionLifecycleStatusSchema,\n capabilities: z.array(integrationCapabilitySchema),\n external_url: z.string().url().optional(),\n created_at: z.string(),\n updated_at: z.string(),\n});\nexport type IntegrationConnectionDto = z.infer<typeof integrationConnectionDtoSchema>;\n\nexport const listIntegrationConnectionsQuerySchema = z.object({\n workspace_id: z.string().uuid(),\n capability: integrationCapabilitySchema.optional(),\n});\nexport type ListIntegrationConnectionsQueryDto = z.infer<\n typeof listIntegrationConnectionsQuerySchema\n>;\n\nexport const listIntegrationConnectionsResponseSchema = z.object({\n connections: z.array(integrationConnectionDtoSchema),\n});\nexport type ListIntegrationConnectionsResponseDto = z.infer<\n typeof listIntegrationConnectionsResponseSchema\n>;\n\nexport const updateIntegrationConnectionBodySchema = z.object({\n lifecycle_status: updateIntegrationConnectionLifecycleStatusSchema,\n});\nexport type UpdateIntegrationConnectionBodyDto = z.infer<\n typeof updateIntegrationConnectionBodySchema\n>;\n\nexport const listRepositoriesParamsSchema = z.object({\n connectionId: z.string().uuid(),\n});\nexport type ListRepositoriesParamsDto = z.infer<typeof listRepositoriesParamsSchema>;\n\nexport const listRepositoriesQuerySchema = z.object({\n limit: z.coerce.number().int().min(1).max(100).default(50),\n cursor: z.string().optional(),\n search: z.string().min(1).max(100).optional(),\n});\nexport type ListRepositoriesQueryDto = z.infer<typeof listRepositoriesQuerySchema>;\n\nexport const repositoryDtoSchema = z.object({\n connection_id: z.string().uuid(),\n external_repository_id: z.string(),\n owner: z.string(),\n name: z.string(),\n full_name: z.string(),\n default_branch: z.string(),\n visibility: repositoryVisibilitySchema,\n clone_url: z.string(),\n html_url: z.string(),\n});\nexport type RepositoryDto = z.infer<typeof repositoryDtoSchema>;\n\nexport const listRepositoriesResponseSchema = z.object({\n repositories: z.array(repositoryDtoSchema),\n next_cursor: z.string().nullable(),\n});\nexport type ListRepositoriesResponseDto = z.infer<typeof listRepositoriesResponseSchema>;\n"],"names":["z","CONNECTION_SLUG_MAX_LENGTH","connectionSlugSchema","string","min","max","regex","integrationProviderKindSchema","integrationCapabilitySchema","enum","integrationConnectionLifecycleStatusSchema","updateIntegrationConnectionLifecycleStatusSchema","repositoryVisibilitySchema","integrationProviderDtoSchema","object","provider","display_name","capabilities","array","listIntegrationProvidersQuerySchema","capability","optional","listIntegrationProvidersResponseSchema","providers","integrationConnectionDtoSchema","id","uuid","workspace_id","external_account_id","slug","lifecycle_status","external_url","url","created_at","updated_at","listIntegrationConnectionsQuerySchema","listIntegrationConnectionsResponseSchema","connections","updateIntegrationConnectionBodySchema","listRepositoriesParamsSchema","connectionId","listRepositoriesQuerySchema","limit","coerce","number","int","default","cursor","search","repositoryDtoSchema","connection_id","external_repository_id","owner","name","full_name","default_branch","visibility","clone_url","html_url","listRepositoriesResponseSchema","repositories","next_cursor","nullable"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AAEtB,OAAO,MAAMC,6BAA6B,IAAI;AAE9C,OAAO,MAAMC,
|
|
1
|
+
{"version":3,"sources":["../../src/schemas/integrations.ts"],"sourcesContent":["import {z} from 'zod';\n\nexport const CONNECTION_SLUG_MAX_LENGTH = 100;\n\n/**\n * Slugs sync classifies by literal: a source equal to one of these names is a\n * built-in trigger source, never a connection. No provider may allocate a\n * connection holding one of them.\n */\nexport const RESERVED_CONNECTION_SLUGS = ['manual', 'cron'] as const;\n\nexport const connectionSlugSchema = z\n .string()\n .min(1)\n .max(CONNECTION_SLUG_MAX_LENGTH)\n .regex(/^[a-z0-9]+(?:[_-][a-z0-9]+)*$/);\n\nexport const integrationProviderKindSchema = z.string().min(1);\nexport type IntegrationProviderKindDto = z.infer<typeof integrationProviderKindSchema>;\n\nexport const integrationCapabilitySchema = z.enum(['source_control', 'agent_tools']);\nexport type IntegrationCapabilityDto = z.infer<typeof integrationCapabilitySchema>;\n\nexport const integrationConnectionLifecycleStatusSchema = z.enum(['active', 'disabled', 'error']);\nexport type IntegrationConnectionLifecycleStatusDto = z.infer<\n typeof integrationConnectionLifecycleStatusSchema\n>;\nexport const updateIntegrationConnectionLifecycleStatusSchema = z.enum(['active', 'disabled']);\nexport type UpdateIntegrationConnectionLifecycleStatusDto = z.infer<\n typeof updateIntegrationConnectionLifecycleStatusSchema\n>;\n\nexport const repositoryVisibilitySchema = z.enum(['public', 'private', 'internal', 'unknown']);\nexport type RepositoryVisibilityDto = z.infer<typeof repositoryVisibilitySchema>;\n\nexport const integrationProviderDtoSchema = z.object({\n provider: integrationProviderKindSchema,\n display_name: z.string(),\n capabilities: z.array(integrationCapabilitySchema),\n});\nexport type IntegrationProviderDto = z.infer<typeof integrationProviderDtoSchema>;\n\nexport const listIntegrationProvidersQuerySchema = z.object({\n capability: integrationCapabilitySchema.optional(),\n});\nexport type ListIntegrationProvidersQueryDto = z.infer<typeof listIntegrationProvidersQuerySchema>;\n\nexport const listIntegrationProvidersResponseSchema = z.object({\n providers: z.array(integrationProviderDtoSchema),\n});\nexport type ListIntegrationProvidersResponseDto = z.infer<\n typeof listIntegrationProvidersResponseSchema\n>;\n\nexport const integrationConnectionDtoSchema = z.object({\n id: z.string().uuid(),\n workspace_id: z.string().uuid(),\n provider: integrationProviderKindSchema,\n external_account_id: z.string(),\n slug: connectionSlugSchema,\n display_name: z.string(),\n lifecycle_status: integrationConnectionLifecycleStatusSchema,\n capabilities: z.array(integrationCapabilitySchema),\n external_url: z.string().url().optional(),\n created_at: z.string(),\n updated_at: z.string(),\n});\nexport type IntegrationConnectionDto = z.infer<typeof integrationConnectionDtoSchema>;\n\nexport const listIntegrationConnectionsQuerySchema = z.object({\n workspace_id: z.string().uuid(),\n capability: integrationCapabilitySchema.optional(),\n});\nexport type ListIntegrationConnectionsQueryDto = z.infer<\n typeof listIntegrationConnectionsQuerySchema\n>;\n\nexport const listIntegrationConnectionsResponseSchema = z.object({\n connections: z.array(integrationConnectionDtoSchema),\n});\nexport type ListIntegrationConnectionsResponseDto = z.infer<\n typeof listIntegrationConnectionsResponseSchema\n>;\n\nexport const updateIntegrationConnectionBodySchema = z.object({\n lifecycle_status: updateIntegrationConnectionLifecycleStatusSchema,\n});\nexport type UpdateIntegrationConnectionBodyDto = z.infer<\n typeof updateIntegrationConnectionBodySchema\n>;\n\nexport const listRepositoriesParamsSchema = z.object({\n connectionId: z.string().uuid(),\n});\nexport type ListRepositoriesParamsDto = z.infer<typeof listRepositoriesParamsSchema>;\n\nexport const listRepositoriesQuerySchema = z.object({\n limit: z.coerce.number().int().min(1).max(100).default(50),\n cursor: z.string().optional(),\n search: z.string().min(1).max(100).optional(),\n});\nexport type ListRepositoriesQueryDto = z.infer<typeof listRepositoriesQuerySchema>;\n\nexport const repositoryDtoSchema = z.object({\n connection_id: z.string().uuid(),\n external_repository_id: z.string(),\n owner: z.string(),\n name: z.string(),\n full_name: z.string(),\n default_branch: z.string(),\n visibility: repositoryVisibilitySchema,\n clone_url: z.string(),\n html_url: z.string(),\n});\nexport type RepositoryDto = z.infer<typeof repositoryDtoSchema>;\n\nexport const listRepositoriesResponseSchema = z.object({\n repositories: z.array(repositoryDtoSchema),\n next_cursor: z.string().nullable(),\n});\nexport type ListRepositoriesResponseDto = z.infer<typeof listRepositoriesResponseSchema>;\n"],"names":["z","CONNECTION_SLUG_MAX_LENGTH","RESERVED_CONNECTION_SLUGS","connectionSlugSchema","string","min","max","regex","integrationProviderKindSchema","integrationCapabilitySchema","enum","integrationConnectionLifecycleStatusSchema","updateIntegrationConnectionLifecycleStatusSchema","repositoryVisibilitySchema","integrationProviderDtoSchema","object","provider","display_name","capabilities","array","listIntegrationProvidersQuerySchema","capability","optional","listIntegrationProvidersResponseSchema","providers","integrationConnectionDtoSchema","id","uuid","workspace_id","external_account_id","slug","lifecycle_status","external_url","url","created_at","updated_at","listIntegrationConnectionsQuerySchema","listIntegrationConnectionsResponseSchema","connections","updateIntegrationConnectionBodySchema","listRepositoriesParamsSchema","connectionId","listRepositoriesQuerySchema","limit","coerce","number","int","default","cursor","search","repositoryDtoSchema","connection_id","external_repository_id","owner","name","full_name","default_branch","visibility","clone_url","html_url","listRepositoriesResponseSchema","repositories","next_cursor","nullable"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AAEtB,OAAO,MAAMC,6BAA6B,IAAI;AAE9C;;;;CAIC,GACD,OAAO,MAAMC,4BAA4B;IAAC;IAAU;CAAO,CAAU;AAErE,OAAO,MAAMC,uBAAuBH,EACjCI,MAAM,GACNC,GAAG,CAAC,GACJC,GAAG,CAACL,4BACJM,KAAK,CAAC,iCAAiC;AAE1C,OAAO,MAAMC,gCAAgCR,EAAEI,MAAM,GAAGC,GAAG,CAAC,GAAG;AAG/D,OAAO,MAAMI,8BAA8BT,EAAEU,IAAI,CAAC;IAAC;IAAkB;CAAc,EAAE;AAGrF,OAAO,MAAMC,6CAA6CX,EAAEU,IAAI,CAAC;IAAC;IAAU;IAAY;CAAQ,EAAE;AAIlG,OAAO,MAAME,mDAAmDZ,EAAEU,IAAI,CAAC;IAAC;IAAU;CAAW,EAAE;AAK/F,OAAO,MAAMG,6BAA6Bb,EAAEU,IAAI,CAAC;IAAC;IAAU;IAAW;IAAY;CAAU,EAAE;A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