@shipfox/api-integration-core-dto 9.0.2 → 12.2.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 +29 -0
- package/dist/events.d.ts +54 -3
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +28 -1
- package/dist/events.js.map +1 -1
- package/dist/inter-module.d.ts +81 -29
- package/dist/inter-module.d.ts.map +1 -1
- package/dist/inter-module.js +28 -5
- package/dist/inter-module.js.map +1 -1
- package/dist/schemas/integrations.d.ts +19 -19
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/dist/webhooks.d.ts +33 -10
- package/dist/webhooks.d.ts.map +1 -1
- package/dist/webhooks.js +9 -3
- package/dist/webhooks.js.map +1 -1
- package/package.json +2 -2
- package/src/events.test.ts +61 -1
- package/src/events.ts +41 -0
- package/src/inter-module.test.ts +42 -0
- package/src/inter-module.ts +17 -1
- package/src/webhooks.test.ts +18 -0
- package/src/webhooks.ts +25 -4
- package/tsconfig.build.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
$ shipfox-swc
|
|
2
|
-
Successfully compiled: 8 files with swc (
|
|
2
|
+
Successfully compiled: 8 files with swc (390.78ms)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @shipfox/api-integration-core-dto
|
|
2
2
|
|
|
3
|
+
## 12.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 7901a60: Retry workspace workflow definition syncs when an integration connection becomes available.
|
|
8
|
+
|
|
9
|
+
## 12.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- 54c820e: Capture the actor that caused a source-control event on the normalized trigger reference. `TriggerReference` gains a required `actor`, resolved from the webhook sender by the GitHub and Gitea providers and null for payloads that name none.
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- f13e8bb: Add Jira dynamic webhook registration and authenticated event ingestion through
|
|
18
|
+
the shared stored-webhook workflow. Update the SPI webhook request exports and
|
|
19
|
+
serialize Jira installation replacement across API replicas. Preserve Jira
|
|
20
|
+
delivery identifiers and require lifecycle callbacks for registration. Remove
|
|
21
|
+
the unused Jira webhook signing-secret configuration and allow HS256 verification
|
|
22
|
+
at a supplied receipt time.
|
|
23
|
+
- 869a792: Refresh source-backed project repository identity from GitHub repository and installation-repository events.
|
|
24
|
+
- 032d316: Scope checkout credential minting to the currently running checkout step and return its fetch depth.
|
|
25
|
+
- cb0abfa: Expose the normalized trigger project, repository, ref, and commit in workflow context.
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Updated dependencies [f78740d]
|
|
30
|
+
- @shipfox/inter-module@0.2.3
|
|
31
|
+
|
|
3
32
|
## 9.0.2
|
|
4
33
|
|
|
5
34
|
### Patch Changes
|
package/dist/events.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const INTEGRATION_EVENT_RECEIVED:
|
|
2
|
+
export declare const INTEGRATION_EVENT_RECEIVED: 'integrations.event.received';
|
|
3
|
+
export declare const INTEGRATION_CONNECTION_AVAILABLE: 'integrations.connection.available';
|
|
3
4
|
export declare const integrationEventReceivedSchema: z.ZodObject<{
|
|
4
5
|
provider: z.ZodString;
|
|
5
6
|
source: z.ZodString;
|
|
@@ -12,6 +13,13 @@ export declare const integrationEventReceivedSchema: z.ZodObject<{
|
|
|
12
13
|
payload: z.ZodCustom<unknown, unknown>;
|
|
13
14
|
}, z.core.$strip>;
|
|
14
15
|
export type IntegrationEventReceivedEvent = z.infer<typeof integrationEventReceivedSchema>;
|
|
16
|
+
export declare const integrationConnectionAvailableSchema: z.ZodObject<{
|
|
17
|
+
provider: z.ZodString;
|
|
18
|
+
workspaceId: z.ZodString;
|
|
19
|
+
connectionId: z.ZodString;
|
|
20
|
+
slug: z.ZodString;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export type IntegrationConnectionAvailableEvent = z.infer<typeof integrationConnectionAvailableSchema>;
|
|
15
23
|
export declare const sourcePushSchema: z.ZodObject<{
|
|
16
24
|
externalRepositoryId: z.ZodString;
|
|
17
25
|
ref: z.ZodString;
|
|
@@ -20,7 +28,7 @@ export declare const sourcePushSchema: z.ZodObject<{
|
|
|
20
28
|
isDefaultBranch: z.ZodBoolean;
|
|
21
29
|
}, z.core.$strip>;
|
|
22
30
|
export type SourcePushPayload = z.infer<typeof sourcePushSchema>;
|
|
23
|
-
export declare const INTEGRATION_SOURCE_COMMIT_PUSHED:
|
|
31
|
+
export declare const INTEGRATION_SOURCE_COMMIT_PUSHED: 'integrations.source_control.commit_pushed';
|
|
24
32
|
export declare const integrationSourceCommitPushedSchema: z.ZodObject<{
|
|
25
33
|
provider: z.ZodString;
|
|
26
34
|
workspaceId: z.ZodString;
|
|
@@ -36,6 +44,28 @@ export declare const integrationSourceCommitPushedSchema: z.ZodObject<{
|
|
|
36
44
|
}, z.core.$strip>;
|
|
37
45
|
}, z.core.$strip>;
|
|
38
46
|
export type IntegrationSourceCommitPushedEvent = z.infer<typeof integrationSourceCommitPushedSchema>;
|
|
47
|
+
export declare const sourceRepositoryIdentitySchema: z.ZodObject<{
|
|
48
|
+
externalRepositoryId: z.ZodString;
|
|
49
|
+
owner: z.ZodString;
|
|
50
|
+
name: z.ZodString;
|
|
51
|
+
defaultBranch: z.ZodString;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
export type SourceRepositoryIdentity = z.infer<typeof sourceRepositoryIdentitySchema>;
|
|
54
|
+
export declare const INTEGRATION_SOURCE_REPOSITORY_UPDATED: 'integrations.source_control.repository_updated';
|
|
55
|
+
export declare const integrationSourceRepositoryUpdatedSchema: z.ZodObject<{
|
|
56
|
+
provider: z.ZodString;
|
|
57
|
+
workspaceId: z.ZodString;
|
|
58
|
+
connectionId: z.ZodString;
|
|
59
|
+
deliveryId: z.ZodString;
|
|
60
|
+
receivedAt: z.ZodString;
|
|
61
|
+
repository: z.ZodObject<{
|
|
62
|
+
externalRepositoryId: z.ZodString;
|
|
63
|
+
owner: z.ZodString;
|
|
64
|
+
name: z.ZodString;
|
|
65
|
+
defaultBranch: z.ZodString;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
export type IntegrationSourceRepositoryUpdatedEvent = z.infer<typeof integrationSourceRepositoryUpdatedSchema>;
|
|
39
69
|
export interface SentryIssuePayload {
|
|
40
70
|
action: SentryIssueAction;
|
|
41
71
|
issueId: string;
|
|
@@ -51,13 +81,21 @@ export interface SentryIssuePayload {
|
|
|
51
81
|
firstSeenAt: string | null;
|
|
52
82
|
lastSeenAt: string | null;
|
|
53
83
|
}
|
|
54
|
-
export declare const SENTRY_ISSUE_ACTIONS: readonly [
|
|
84
|
+
export declare const SENTRY_ISSUE_ACTIONS: readonly ['created', 'resolved', 'assigned', 'archived', 'unresolved'];
|
|
55
85
|
export type SentryIssueAction = (typeof SENTRY_ISSUE_ACTIONS)[number];
|
|
56
86
|
export interface IntegrationsEventMap {
|
|
87
|
+
[INTEGRATION_CONNECTION_AVAILABLE]: IntegrationConnectionAvailableEvent;
|
|
57
88
|
[INTEGRATION_EVENT_RECEIVED]: IntegrationEventReceivedEvent;
|
|
58
89
|
[INTEGRATION_SOURCE_COMMIT_PUSHED]: IntegrationSourceCommitPushedEvent;
|
|
90
|
+
[INTEGRATION_SOURCE_REPOSITORY_UPDATED]: IntegrationSourceRepositoryUpdatedEvent;
|
|
59
91
|
}
|
|
60
92
|
export declare const integrationsEventSchemas: {
|
|
93
|
+
"integrations.connection.available": z.ZodObject<{
|
|
94
|
+
provider: z.ZodString;
|
|
95
|
+
workspaceId: z.ZodString;
|
|
96
|
+
connectionId: z.ZodString;
|
|
97
|
+
slug: z.ZodString;
|
|
98
|
+
}, z.core.$strip>;
|
|
61
99
|
"integrations.event.received": z.ZodObject<{
|
|
62
100
|
provider: z.ZodString;
|
|
63
101
|
source: z.ZodString;
|
|
@@ -83,5 +121,18 @@ export declare const integrationsEventSchemas: {
|
|
|
83
121
|
isDefaultBranch: z.ZodBoolean;
|
|
84
122
|
}, z.core.$strip>;
|
|
85
123
|
}, z.core.$strip>;
|
|
124
|
+
"integrations.source_control.repository_updated": z.ZodObject<{
|
|
125
|
+
provider: z.ZodString;
|
|
126
|
+
workspaceId: z.ZodString;
|
|
127
|
+
connectionId: z.ZodString;
|
|
128
|
+
deliveryId: z.ZodString;
|
|
129
|
+
receivedAt: z.ZodString;
|
|
130
|
+
repository: z.ZodObject<{
|
|
131
|
+
externalRepositoryId: z.ZodString;
|
|
132
|
+
owner: z.ZodString;
|
|
133
|
+
name: z.ZodString;
|
|
134
|
+
defaultBranch: z.ZodString;
|
|
135
|
+
}, z.core.$strip>;
|
|
136
|
+
}, z.core.$strip>;
|
|
86
137
|
};
|
|
87
138
|
//# sourceMappingURL=events.d.ts.map
|
package/dist/events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,0BAA0B,EAAG,6BAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,0BAA0B,EAAG,6BAAsC,CAAC;AACjF,eAAO,MAAM,gCAAgC,EAAG,mCAA4C,CAAC;AAO7F,eAAO,MAAM,8BAA8B;;;;;;;;;;iBAYzC,CAAC;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,C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WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAKD,eAAO,MAAM,oBAAoB,YAC/B,SAAS,EACT,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,CACJ,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,MAAM,WAAW,oBAAoB;IACnC,CAAC,gCAAgC,CAAC,EAAE,mCAAmC,CAAC;IACxE,CAAC,0BAA0B,CAAC,EAAE,6BAA6B,CAAC;IAC5D,CAAC,gCAAgC,CAAC,EAAE,kCAAkC,CAAC;IACvE,CAAC,qCAAqC,CAAC,EAAE,uCAAuC,CAAC;CAClF;AAED,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKoB,CAAC"}
|
package/dist/events.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export const INTEGRATION_EVENT_RECEIVED = 'integrations.event.received';
|
|
3
|
+
export const INTEGRATION_CONNECTION_AVAILABLE = 'integrations.connection.available';
|
|
3
4
|
const nonEmptyStringSchema = z.string().nonempty();
|
|
4
5
|
const isoDateTimeSchema = z.string().datetime();
|
|
5
6
|
const requiredUnknownSchema = z.custom((value)=>value !== undefined);
|
|
@@ -17,6 +18,12 @@ export const integrationEventReceivedSchema = z.object({
|
|
|
17
18
|
receivedAt: isoDateTimeSchema,
|
|
18
19
|
payload: requiredUnknownSchema
|
|
19
20
|
});
|
|
21
|
+
export const integrationConnectionAvailableSchema = z.object({
|
|
22
|
+
provider: nonEmptyStringSchema,
|
|
23
|
+
workspaceId: nonEmptyStringSchema,
|
|
24
|
+
connectionId: nonEmptyStringSchema,
|
|
25
|
+
slug: nonEmptyStringSchema
|
|
26
|
+
});
|
|
20
27
|
// A source-control push, normalized by the producing provider and carried by
|
|
21
28
|
// `INTEGRATION_SOURCE_COMMIT_PUSHED` for domain consumers.
|
|
22
29
|
export const sourcePushSchema = z.object({
|
|
@@ -38,6 +45,24 @@ export const integrationSourceCommitPushedSchema = z.object({
|
|
|
38
45
|
receivedAt: isoDateTimeSchema,
|
|
39
46
|
push: sourcePushSchema
|
|
40
47
|
});
|
|
48
|
+
export const sourceRepositoryIdentitySchema = z.object({
|
|
49
|
+
externalRepositoryId: nonEmptyStringSchema,
|
|
50
|
+
owner: nonEmptyStringSchema,
|
|
51
|
+
name: nonEmptyStringSchema,
|
|
52
|
+
defaultBranch: nonEmptyStringSchema
|
|
53
|
+
});
|
|
54
|
+
export const INTEGRATION_SOURCE_REPOSITORY_UPDATED = 'integrations.source_control.repository_updated';
|
|
55
|
+
// Typed, provider-agnostic source-control event. The producing provider owns the
|
|
56
|
+
// translation from its raw webhook into this shape, so domain consumers never decode
|
|
57
|
+
// provider payloads.
|
|
58
|
+
export const integrationSourceRepositoryUpdatedSchema = z.object({
|
|
59
|
+
provider: nonEmptyStringSchema,
|
|
60
|
+
workspaceId: nonEmptyStringSchema,
|
|
61
|
+
connectionId: nonEmptyStringSchema,
|
|
62
|
+
deliveryId: nonEmptyStringSchema,
|
|
63
|
+
receivedAt: isoDateTimeSchema,
|
|
64
|
+
repository: sourceRepositoryIdentitySchema
|
|
65
|
+
});
|
|
41
66
|
// Single source of truth for Sentry issue actions: the sentry-dto webhook schema
|
|
42
67
|
// builds its z.enum from this tuple, so accepted webhook actions and the published
|
|
43
68
|
// SentryIssuePayload contract cannot drift.
|
|
@@ -49,8 +74,10 @@ export const SENTRY_ISSUE_ACTIONS = [
|
|
|
49
74
|
'unresolved'
|
|
50
75
|
];
|
|
51
76
|
export const integrationsEventSchemas = {
|
|
77
|
+
[INTEGRATION_CONNECTION_AVAILABLE]: integrationConnectionAvailableSchema,
|
|
52
78
|
[INTEGRATION_EVENT_RECEIVED]: integrationEventReceivedSchema,
|
|
53
|
-
[INTEGRATION_SOURCE_COMMIT_PUSHED]: integrationSourceCommitPushedSchema
|
|
79
|
+
[INTEGRATION_SOURCE_COMMIT_PUSHED]: integrationSourceCommitPushedSchema,
|
|
80
|
+
[INTEGRATION_SOURCE_REPOSITORY_UPDATED]: integrationSourceRepositoryUpdatedSchema
|
|
54
81
|
};
|
|
55
82
|
|
|
56
83
|
//# sourceMappingURL=events.js.map
|
package/dist/events.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/events.ts"],"sourcesContent":["import {z} from 'zod';\n\nexport const INTEGRATION_EVENT_RECEIVED = 'integrations.event.received' as const;\n\nconst nonEmptyStringSchema = z.string().nonempty();\nconst isoDateTimeSchema = z.string().datetime();\nconst requiredUnknownSchema = z.custom<unknown>((value) => value !== undefined);\nconst nullableConnectionNameSchema = nonEmptyStringSchema.nullish().default(null);\n\nexport const integrationEventReceivedSchema = z.object({\n provider: nonEmptyStringSchema,\n source: nonEmptyStringSchema,\n event: nonEmptyStringSchema,\n workspaceId: nonEmptyStringSchema,\n connectionId: nonEmptyStringSchema,\n // Denormalized so trigger consumers can render the connection name without a\n // synchronous callback into the integrations module.\n connectionName: nullableConnectionNameSchema,\n deliveryId: nonEmptyStringSchema,\n receivedAt: isoDateTimeSchema,\n payload: requiredUnknownSchema,\n});\nexport type IntegrationEventReceivedEvent = z.infer<typeof integrationEventReceivedSchema>;\n\n// A source-control push, normalized by the producing provider and carried by\n// `INTEGRATION_SOURCE_COMMIT_PUSHED` for domain consumers.\nexport const sourcePushSchema = z.object({\n externalRepositoryId: nonEmptyStringSchema,\n ref: nonEmptyStringSchema,\n headCommitSha: nonEmptyStringSchema,\n defaultBranch: nonEmptyStringSchema,\n isDefaultBranch: z.boolean(),\n});\nexport type SourcePushPayload = z.infer<typeof sourcePushSchema>;\n\nexport const INTEGRATION_SOURCE_COMMIT_PUSHED =\n 'integrations.source_control.commit_pushed' as const;\n\n// Typed, provider-agnostic source-control event. The producing provider owns the\n// translation from its raw webhook into this shape, so domain consumers never decode\n// provider payloads. `isDefaultBranch` is a fact; the branch policy lives in the consumer.\nexport const integrationSourceCommitPushedSchema = z.object({\n provider: nonEmptyStringSchema,\n workspaceId: nonEmptyStringSchema,\n connectionId: nonEmptyStringSchema,\n deliveryId: nonEmptyStringSchema,\n receivedAt: isoDateTimeSchema,\n push: sourcePushSchema,\n});\nexport type IntegrationSourceCommitPushedEvent = z.infer<\n typeof integrationSourceCommitPushedSchema\n>;\n\nexport interface SentryIssuePayload {\n action: SentryIssueAction;\n issueId: string;\n shortId: string | null;\n title: string;\n culprit: string | null;\n level: string | null;\n status: string | null;\n platform: string | null;\n webUrl: string | null;\n issueUrl: string | null;\n projectUrl: string | null;\n firstSeenAt: string | null;\n lastSeenAt: string | null;\n}\n\n// Single source of truth for Sentry issue actions: the sentry-dto webhook schema\n// builds its z.enum from this tuple, so accepted webhook actions and the published\n// SentryIssuePayload contract cannot drift.\nexport const SENTRY_ISSUE_ACTIONS = [\n 'created',\n 'resolved',\n 'assigned',\n 'archived',\n 'unresolved',\n] as const;\n\nexport type SentryIssueAction = (typeof SENTRY_ISSUE_ACTIONS)[number];\n\nexport interface IntegrationsEventMap {\n [INTEGRATION_EVENT_RECEIVED]: IntegrationEventReceivedEvent;\n [INTEGRATION_SOURCE_COMMIT_PUSHED]: IntegrationSourceCommitPushedEvent;\n}\n\nexport const integrationsEventSchemas = {\n [INTEGRATION_EVENT_RECEIVED]: integrationEventReceivedSchema,\n [INTEGRATION_SOURCE_COMMIT_PUSHED]: integrationSourceCommitPushedSchema,\n} satisfies Record<keyof IntegrationsEventMap, z.ZodType>;\n"],"names":["z","INTEGRATION_EVENT_RECEIVED","nonEmptyStringSchema","string","nonempty","isoDateTimeSchema","datetime","requiredUnknownSchema","custom","value","undefined","nullableConnectionNameSchema","nullish","default","integrationEventReceivedSchema","object","provider","source","event","workspaceId","connectionId","connectionName","deliveryId","receivedAt","payload","sourcePushSchema","externalRepositoryId","ref","headCommitSha","defaultBranch","isDefaultBranch","boolean","INTEGRATION_SOURCE_COMMIT_PUSHED","integrationSourceCommitPushedSchema","push","SENTRY_ISSUE_ACTIONS","integrationsEventSchemas"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AAEtB,OAAO,MAAMC,6BAA6B,8BAAuC;
|
|
1
|
+
{"version":3,"sources":["../src/events.ts"],"sourcesContent":["import {z} from 'zod';\n\nexport const INTEGRATION_EVENT_RECEIVED = 'integrations.event.received' as const;\nexport const INTEGRATION_CONNECTION_AVAILABLE = 'integrations.connection.available' as const;\n\nconst nonEmptyStringSchema = z.string().nonempty();\nconst isoDateTimeSchema = z.string().datetime();\nconst requiredUnknownSchema = z.custom<unknown>((value) => value !== undefined);\nconst nullableConnectionNameSchema = nonEmptyStringSchema.nullish().default(null);\n\nexport const integrationEventReceivedSchema = z.object({\n provider: nonEmptyStringSchema,\n source: nonEmptyStringSchema,\n event: nonEmptyStringSchema,\n workspaceId: nonEmptyStringSchema,\n connectionId: nonEmptyStringSchema,\n // Denormalized so trigger consumers can render the connection name without a\n // synchronous callback into the integrations module.\n connectionName: nullableConnectionNameSchema,\n deliveryId: nonEmptyStringSchema,\n receivedAt: isoDateTimeSchema,\n payload: requiredUnknownSchema,\n});\nexport type IntegrationEventReceivedEvent = z.infer<typeof integrationEventReceivedSchema>;\n\nexport const integrationConnectionAvailableSchema = z.object({\n provider: nonEmptyStringSchema,\n workspaceId: nonEmptyStringSchema,\n connectionId: nonEmptyStringSchema,\n slug: nonEmptyStringSchema,\n});\nexport type IntegrationConnectionAvailableEvent = z.infer<\n typeof integrationConnectionAvailableSchema\n>;\n\n// A source-control push, normalized by the producing provider and carried by\n// `INTEGRATION_SOURCE_COMMIT_PUSHED` for domain consumers.\nexport const sourcePushSchema = z.object({\n externalRepositoryId: nonEmptyStringSchema,\n ref: nonEmptyStringSchema,\n headCommitSha: nonEmptyStringSchema,\n defaultBranch: nonEmptyStringSchema,\n isDefaultBranch: z.boolean(),\n});\nexport type SourcePushPayload = z.infer<typeof sourcePushSchema>;\n\nexport const INTEGRATION_SOURCE_COMMIT_PUSHED =\n 'integrations.source_control.commit_pushed' as const;\n\n// Typed, provider-agnostic source-control event. The producing provider owns the\n// translation from its raw webhook into this shape, so domain consumers never decode\n// provider payloads. `isDefaultBranch` is a fact; the branch policy lives in the consumer.\nexport const integrationSourceCommitPushedSchema = z.object({\n provider: nonEmptyStringSchema,\n workspaceId: nonEmptyStringSchema,\n connectionId: nonEmptyStringSchema,\n deliveryId: nonEmptyStringSchema,\n receivedAt: isoDateTimeSchema,\n push: sourcePushSchema,\n});\nexport type IntegrationSourceCommitPushedEvent = z.infer<\n typeof integrationSourceCommitPushedSchema\n>;\n\nexport const sourceRepositoryIdentitySchema = z.object({\n externalRepositoryId: nonEmptyStringSchema,\n owner: nonEmptyStringSchema,\n name: nonEmptyStringSchema,\n defaultBranch: nonEmptyStringSchema,\n});\nexport type SourceRepositoryIdentity = z.infer<typeof sourceRepositoryIdentitySchema>;\n\nexport const INTEGRATION_SOURCE_REPOSITORY_UPDATED =\n 'integrations.source_control.repository_updated' as const;\n\n// Typed, provider-agnostic source-control event. The producing provider owns the\n// translation from its raw webhook into this shape, so domain consumers never decode\n// provider payloads.\nexport const integrationSourceRepositoryUpdatedSchema = z.object({\n provider: nonEmptyStringSchema,\n workspaceId: nonEmptyStringSchema,\n connectionId: nonEmptyStringSchema,\n deliveryId: nonEmptyStringSchema,\n receivedAt: isoDateTimeSchema,\n repository: sourceRepositoryIdentitySchema,\n});\nexport type IntegrationSourceRepositoryUpdatedEvent = z.infer<\n typeof integrationSourceRepositoryUpdatedSchema\n>;\n\nexport interface SentryIssuePayload {\n action: SentryIssueAction;\n issueId: string;\n shortId: string | null;\n title: string;\n culprit: string | null;\n level: string | null;\n status: string | null;\n platform: string | null;\n webUrl: string | null;\n issueUrl: string | null;\n projectUrl: string | null;\n firstSeenAt: string | null;\n lastSeenAt: string | null;\n}\n\n// Single source of truth for Sentry issue actions: the sentry-dto webhook schema\n// builds its z.enum from this tuple, so accepted webhook actions and the published\n// SentryIssuePayload contract cannot drift.\nexport const SENTRY_ISSUE_ACTIONS = [\n 'created',\n 'resolved',\n 'assigned',\n 'archived',\n 'unresolved',\n] as const;\n\nexport type SentryIssueAction = (typeof SENTRY_ISSUE_ACTIONS)[number];\n\nexport interface IntegrationsEventMap {\n [INTEGRATION_CONNECTION_AVAILABLE]: IntegrationConnectionAvailableEvent;\n [INTEGRATION_EVENT_RECEIVED]: IntegrationEventReceivedEvent;\n [INTEGRATION_SOURCE_COMMIT_PUSHED]: IntegrationSourceCommitPushedEvent;\n [INTEGRATION_SOURCE_REPOSITORY_UPDATED]: IntegrationSourceRepositoryUpdatedEvent;\n}\n\nexport const integrationsEventSchemas = {\n [INTEGRATION_CONNECTION_AVAILABLE]: integrationConnectionAvailableSchema,\n [INTEGRATION_EVENT_RECEIVED]: integrationEventReceivedSchema,\n [INTEGRATION_SOURCE_COMMIT_PUSHED]: integrationSourceCommitPushedSchema,\n [INTEGRATION_SOURCE_REPOSITORY_UPDATED]: integrationSourceRepositoryUpdatedSchema,\n} satisfies Record<keyof IntegrationsEventMap, z.ZodType>;\n"],"names":["z","INTEGRATION_EVENT_RECEIVED","INTEGRATION_CONNECTION_AVAILABLE","nonEmptyStringSchema","string","nonempty","isoDateTimeSchema","datetime","requiredUnknownSchema","custom","value","undefined","nullableConnectionNameSchema","nullish","default","integrationEventReceivedSchema","object","provider","source","event","workspaceId","connectionId","connectionName","deliveryId","receivedAt","payload","integrationConnectionAvailableSchema","slug","sourcePushSchema","externalRepositoryId","ref","headCommitSha","defaultBranch","isDefaultBranch","boolean","INTEGRATION_SOURCE_COMMIT_PUSHED","integrationSourceCommitPushedSchema","push","sourceRepositoryIdentitySchema","owner","name","INTEGRATION_SOURCE_REPOSITORY_UPDATED","integrationSourceRepositoryUpdatedSchema","repository","SENTRY_ISSUE_ACTIONS","integrationsEventSchemas"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AAEtB,OAAO,MAAMC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jF,qFAAqF;AACrF,qBAAqB;AACrB,OAAO,MAAMC,2CAA2C1C,EAAEgB,MAAM,CAAC;IAC/DC,UAAUd;IACViB,aAAajB;IACbkB,cAAclB;IACdoB,YAAYpB;IACZqB,YAAYlB;IACZqC,YAAYL;AACd,GAAG;AAqBH,iFAAiF;AACjF,mFAAmF;AACnF,4CAA4C;AAC5C,OAAO,MAAMM,uBAAuB;IAClC;IACA;IACA;IACA;IACA;CACD,CAAU;AAWX,OAAO,MAAMC,2BAA2B;IACtC,CAAC3C,iCAAiC,EAAEwB;IACpC,CAACzB,2BAA2B,EAAEc;IAC9B,CAACoB,iCAAiC,EAAEC;IACpC,CAACK,sCAAsC,EAAEC;AAC3C,EAA0D"}
|
package/dist/inter-module.d.ts
CHANGED
|
@@ -4,13 +4,13 @@ import { z } from 'zod';
|
|
|
4
4
|
export declare const integrationsInterModuleContract: import("@shipfox/inter-module").InterModuleContract<{
|
|
5
5
|
readonly module: "integrations";
|
|
6
6
|
readonly methods: {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
resolveSourceRepository: {
|
|
8
|
+
input: z.ZodObject<{
|
|
9
9
|
workspaceId: z.ZodString;
|
|
10
10
|
connectionId: z.ZodString;
|
|
11
11
|
externalRepositoryId: z.ZodString;
|
|
12
12
|
}, z.core.$strip>;
|
|
13
|
-
|
|
13
|
+
output: z.ZodObject<{
|
|
14
14
|
connection: z.ZodObject<{
|
|
15
15
|
id: z.ZodString;
|
|
16
16
|
provider: z.ZodString;
|
|
@@ -23,16 +23,16 @@ export declare const integrationsInterModuleContract: import("@shipfox/inter-mod
|
|
|
23
23
|
fullName: z.ZodString;
|
|
24
24
|
defaultBranch: z.ZodString;
|
|
25
25
|
visibility: z.ZodEnum<{
|
|
26
|
-
unknown: "unknown";
|
|
27
|
-
public: "public";
|
|
28
|
-
private: "private";
|
|
29
26
|
internal: "internal";
|
|
27
|
+
private: "private";
|
|
28
|
+
public: "public";
|
|
29
|
+
unknown: "unknown";
|
|
30
30
|
}>;
|
|
31
31
|
cloneUrl: z.ZodString;
|
|
32
32
|
htmlUrl: z.ZodString;
|
|
33
33
|
}, z.core.$strip>;
|
|
34
34
|
}, z.core.$strip>;
|
|
35
|
-
|
|
35
|
+
errors: {
|
|
36
36
|
'connection-not-found': z.ZodObject<{
|
|
37
37
|
connectionId: z.ZodString;
|
|
38
38
|
}, z.core.$strip>;
|
|
@@ -48,8 +48,60 @@ export declare const integrationsInterModuleContract: import("@shipfox/inter-mod
|
|
|
48
48
|
'capability-unavailable': z.ZodObject<{
|
|
49
49
|
provider: z.ZodString;
|
|
50
50
|
capability: z.ZodEnum<{
|
|
51
|
+
agent_tools: "agent_tools";
|
|
51
52
|
source_control: "source_control";
|
|
53
|
+
}>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
'checkout-unsupported': z.ZodObject<{
|
|
56
|
+
provider: z.ZodString;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
'provider-failure': z.ZodObject<{
|
|
59
|
+
reason: z.ZodString;
|
|
60
|
+
retryAfterSeconds: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
resolveConnection: {
|
|
65
|
+
input: z.ZodObject<{
|
|
66
|
+
workspaceId: z.ZodString;
|
|
67
|
+
slug: z.ZodString;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
output: z.ZodNullable<z.ZodObject<{
|
|
70
|
+
id: z.ZodString;
|
|
71
|
+
provider: z.ZodString;
|
|
72
|
+
slug: z.ZodString;
|
|
73
|
+
}, z.core.$strip>>;
|
|
74
|
+
};
|
|
75
|
+
resolveTriggerReference: {
|
|
76
|
+
input: z.ZodObject<{
|
|
77
|
+
workspaceId: z.ZodString;
|
|
78
|
+
connectionId: z.ZodString;
|
|
79
|
+
payload: z.ZodUnknown;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
output: z.ZodNullable<z.ZodObject<{
|
|
82
|
+
externalRepositoryId: z.ZodString;
|
|
83
|
+
ref: z.ZodString;
|
|
84
|
+
commit: z.ZodString;
|
|
85
|
+
actor: z.ZodNullable<z.ZodString>;
|
|
86
|
+
}, z.core.$strip>>;
|
|
87
|
+
errors: {
|
|
88
|
+
'connection-not-found': z.ZodObject<{
|
|
89
|
+
connectionId: z.ZodString;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
'connection-inactive': z.ZodObject<{
|
|
92
|
+
connectionId: z.ZodString;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
'connection-workspace-mismatch': z.ZodObject<{
|
|
95
|
+
connectionId: z.ZodString;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
'provider-unavailable': z.ZodObject<{
|
|
98
|
+
provider: z.ZodString;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
'capability-unavailable': z.ZodObject<{
|
|
101
|
+
provider: z.ZodString;
|
|
102
|
+
capability: z.ZodEnum<{
|
|
52
103
|
agent_tools: "agent_tools";
|
|
104
|
+
source_control: "source_control";
|
|
53
105
|
}>;
|
|
54
106
|
}, z.core.$strip>;
|
|
55
107
|
'checkout-unsupported': z.ZodObject<{
|
|
@@ -61,8 +113,8 @@ export declare const integrationsInterModuleContract: import("@shipfox/inter-mod
|
|
|
61
113
|
}, z.core.$strip>;
|
|
62
114
|
};
|
|
63
115
|
};
|
|
64
|
-
|
|
65
|
-
|
|
116
|
+
listSourceFiles: {
|
|
117
|
+
input: z.ZodObject<{
|
|
66
118
|
workspaceId: z.ZodString;
|
|
67
119
|
connectionId: z.ZodString;
|
|
68
120
|
externalRepositoryId: z.ZodString;
|
|
@@ -71,7 +123,7 @@ export declare const integrationsInterModuleContract: import("@shipfox/inter-mod
|
|
|
71
123
|
limit: z.ZodNumber;
|
|
72
124
|
cursor: z.ZodOptional<z.ZodString>;
|
|
73
125
|
}, z.core.$strip>;
|
|
74
|
-
|
|
126
|
+
output: z.ZodObject<{
|
|
75
127
|
files: z.ZodArray<z.ZodObject<{
|
|
76
128
|
path: z.ZodString;
|
|
77
129
|
type: z.ZodLiteral<"file">;
|
|
@@ -79,7 +131,7 @@ export declare const integrationsInterModuleContract: import("@shipfox/inter-mod
|
|
|
79
131
|
}, z.core.$strip>>;
|
|
80
132
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
81
133
|
}, z.core.$strip>;
|
|
82
|
-
|
|
134
|
+
errors: {
|
|
83
135
|
'connection-not-found': z.ZodObject<{
|
|
84
136
|
connectionId: z.ZodString;
|
|
85
137
|
}, z.core.$strip>;
|
|
@@ -95,8 +147,8 @@ export declare const integrationsInterModuleContract: import("@shipfox/inter-mod
|
|
|
95
147
|
'capability-unavailable': z.ZodObject<{
|
|
96
148
|
provider: z.ZodString;
|
|
97
149
|
capability: z.ZodEnum<{
|
|
98
|
-
source_control: "source_control";
|
|
99
150
|
agent_tools: "agent_tools";
|
|
151
|
+
source_control: "source_control";
|
|
100
152
|
}>;
|
|
101
153
|
}, z.core.$strip>;
|
|
102
154
|
'checkout-unsupported': z.ZodObject<{
|
|
@@ -108,20 +160,20 @@ export declare const integrationsInterModuleContract: import("@shipfox/inter-mod
|
|
|
108
160
|
}, z.core.$strip>;
|
|
109
161
|
};
|
|
110
162
|
};
|
|
111
|
-
|
|
112
|
-
|
|
163
|
+
fetchSourceFile: {
|
|
164
|
+
input: z.ZodObject<{
|
|
113
165
|
workspaceId: z.ZodString;
|
|
114
166
|
connectionId: z.ZodString;
|
|
115
167
|
externalRepositoryId: z.ZodString;
|
|
116
168
|
ref: z.ZodString;
|
|
117
169
|
path: z.ZodString;
|
|
118
170
|
}, z.core.$strip>;
|
|
119
|
-
|
|
171
|
+
output: z.ZodObject<{
|
|
120
172
|
path: z.ZodString;
|
|
121
173
|
ref: z.ZodString;
|
|
122
174
|
content: z.ZodString;
|
|
123
175
|
}, z.core.$strip>;
|
|
124
|
-
|
|
176
|
+
errors: {
|
|
125
177
|
'connection-not-found': z.ZodObject<{
|
|
126
178
|
connectionId: z.ZodString;
|
|
127
179
|
}, z.core.$strip>;
|
|
@@ -137,8 +189,8 @@ export declare const integrationsInterModuleContract: import("@shipfox/inter-mod
|
|
|
137
189
|
'capability-unavailable': z.ZodObject<{
|
|
138
190
|
provider: z.ZodString;
|
|
139
191
|
capability: z.ZodEnum<{
|
|
140
|
-
source_control: "source_control";
|
|
141
192
|
agent_tools: "agent_tools";
|
|
193
|
+
source_control: "source_control";
|
|
142
194
|
}>;
|
|
143
195
|
}, z.core.$strip>;
|
|
144
196
|
'checkout-unsupported': z.ZodObject<{
|
|
@@ -150,8 +202,8 @@ export declare const integrationsInterModuleContract: import("@shipfox/inter-mod
|
|
|
150
202
|
}, z.core.$strip>;
|
|
151
203
|
};
|
|
152
204
|
};
|
|
153
|
-
|
|
154
|
-
|
|
205
|
+
createCheckoutSpec: {
|
|
206
|
+
input: z.ZodObject<{
|
|
155
207
|
workspaceId: z.ZodString;
|
|
156
208
|
connectionId: z.ZodString;
|
|
157
209
|
externalRepositoryId: z.ZodString;
|
|
@@ -163,7 +215,7 @@ export declare const integrationsInterModuleContract: import("@shipfox/inter-mod
|
|
|
163
215
|
}>;
|
|
164
216
|
}, z.core.$strip>>;
|
|
165
217
|
}, z.core.$strip>;
|
|
166
|
-
|
|
218
|
+
output: z.ZodObject<{
|
|
167
219
|
repositoryUrl: z.ZodString;
|
|
168
220
|
ref: z.ZodString;
|
|
169
221
|
credentials: z.ZodOptional<z.ZodObject<{
|
|
@@ -176,7 +228,7 @@ export declare const integrationsInterModuleContract: import("@shipfox/inter-mod
|
|
|
176
228
|
email: z.ZodString;
|
|
177
229
|
}, z.core.$strip>>;
|
|
178
230
|
}, z.core.$strip>;
|
|
179
|
-
|
|
231
|
+
errors: {
|
|
180
232
|
'connection-not-found': z.ZodObject<{
|
|
181
233
|
connectionId: z.ZodString;
|
|
182
234
|
}, z.core.$strip>;
|
|
@@ -192,8 +244,8 @@ export declare const integrationsInterModuleContract: import("@shipfox/inter-mod
|
|
|
192
244
|
'capability-unavailable': z.ZodObject<{
|
|
193
245
|
provider: z.ZodString;
|
|
194
246
|
capability: z.ZodEnum<{
|
|
195
|
-
source_control: "source_control";
|
|
196
247
|
agent_tools: "agent_tools";
|
|
248
|
+
source_control: "source_control";
|
|
197
249
|
}>;
|
|
198
250
|
}, z.core.$strip>;
|
|
199
251
|
'checkout-unsupported': z.ZodObject<{
|
|
@@ -205,20 +257,20 @@ export declare const integrationsInterModuleContract: import("@shipfox/inter-mod
|
|
|
205
257
|
}, z.core.$strip>;
|
|
206
258
|
};
|
|
207
259
|
};
|
|
208
|
-
|
|
209
|
-
|
|
260
|
+
getAgentToolsContext: {
|
|
261
|
+
input: z.ZodObject<{
|
|
210
262
|
workspaceId: z.ZodString;
|
|
211
263
|
defaultConnectionId: z.ZodString;
|
|
212
264
|
}, z.core.$strip>;
|
|
213
|
-
|
|
265
|
+
output: z.ZodObject<{
|
|
214
266
|
selectionCatalogs: z.ZodArray<z.ZodObject<{
|
|
215
267
|
provider: z.ZodString;
|
|
216
268
|
selectors: z.ZodArray<z.ZodObject<{
|
|
217
269
|
token: z.ZodString;
|
|
218
270
|
kind: z.ZodEnum<{
|
|
219
|
-
method: "method";
|
|
220
271
|
family: "family";
|
|
221
272
|
family_wildcard: "family_wildcard";
|
|
273
|
+
method: "method";
|
|
222
274
|
standalone: "standalone";
|
|
223
275
|
}>;
|
|
224
276
|
sensitivity: z.ZodEnum<{
|
|
@@ -258,8 +310,8 @@ export declare const integrationsInterModuleContract: import("@shipfox/inter-mod
|
|
|
258
310
|
id: z.ZodString;
|
|
259
311
|
provider: z.ZodString;
|
|
260
312
|
capabilities: z.ZodArray<z.ZodEnum<{
|
|
261
|
-
source_control: "source_control";
|
|
262
313
|
agent_tools: "agent_tools";
|
|
314
|
+
source_control: "source_control";
|
|
263
315
|
}>>;
|
|
264
316
|
}, z.core.$strip>>;
|
|
265
317
|
defaultConnection: z.ZodNullable<z.ZodObject<{
|
|
@@ -268,7 +320,7 @@ export declare const integrationsInterModuleContract: import("@shipfox/inter-mod
|
|
|
268
320
|
provider: z.ZodString;
|
|
269
321
|
}, z.core.$strip>>;
|
|
270
322
|
}, z.core.$strip>;
|
|
271
|
-
|
|
323
|
+
errors: {
|
|
272
324
|
'connection-not-found': z.ZodObject<{
|
|
273
325
|
connectionId: z.ZodString;
|
|
274
326
|
}, z.core.$strip>;
|
|
@@ -284,8 +336,8 @@ export declare const integrationsInterModuleContract: import("@shipfox/inter-mod
|
|
|
284
336
|
'capability-unavailable': z.ZodObject<{
|
|
285
337
|
provider: z.ZodString;
|
|
286
338
|
capability: z.ZodEnum<{
|
|
287
|
-
source_control: "source_control";
|
|
288
339
|
agent_tools: "agent_tools";
|
|
340
|
+
source_control: "source_control";
|
|
289
341
|
}>;
|
|
290
342
|
}, z.core.$strip>;
|
|
291
343
|
'checkout-unsupported': z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inter-module.d.ts","sourceRoot":"","sources":["../src/inter-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"inter-module.d.ts","sourceRoot":"","sources":["../src/inter-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAqCtB,kFAAkF;AAClF,eAAO,MAAM,+BAA+B;;;QAGxC,uBAAuB;YACrB,KAAK;;;;;YACL,MAAM;;;;;;;;;;;;;;;;;;;;;;YACN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAER,iBAAiB;YACf,KAAK;;;;YACL,MAAM;;;;;;QAER,uBAAuB;YACrB,KAAK;;;;;YACL,MAAM;;;;;;YACN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAER,eAAe;YACb,KAAK;;;;;;;;;YAML,MAAM;;;;;;;;YAMN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAER,eAAe;YACb,KAAK;;;;;;;YACL,MAAM;;;;;YACN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAER,kBAAkB;YAChB,KAAK;;;;;;;;;;;;YAIL,MAAM;;;;;;;;;;;;;YAQN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAER,oBAAoB;YAClB,KAAK;;;;YACL,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA8CN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGV,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CAAC,OAAO,+BAA+B,CAAC,CAAC"}
|
package/dist/inter-module.js
CHANGED
|
@@ -6,6 +6,11 @@ const capability = z.enum([
|
|
|
6
6
|
'source_control',
|
|
7
7
|
'agent_tools'
|
|
8
8
|
]);
|
|
9
|
+
const connection = z.object({
|
|
10
|
+
id,
|
|
11
|
+
provider,
|
|
12
|
+
slug: z.string().min(1)
|
|
13
|
+
});
|
|
9
14
|
const repository = z.object({
|
|
10
15
|
externalRepositoryId: z.string(),
|
|
11
16
|
owner: z.string(),
|
|
@@ -21,6 +26,12 @@ const repository = z.object({
|
|
|
21
26
|
cloneUrl: z.string(),
|
|
22
27
|
htmlUrl: z.string()
|
|
23
28
|
});
|
|
29
|
+
const triggerReference = z.object({
|
|
30
|
+
externalRepositoryId: z.string(),
|
|
31
|
+
ref: z.string(),
|
|
32
|
+
commit: z.string(),
|
|
33
|
+
actor: z.string().nullable()
|
|
34
|
+
});
|
|
24
35
|
const sourceInput = z.object({
|
|
25
36
|
workspaceId: id,
|
|
26
37
|
connectionId: id,
|
|
@@ -58,15 +69,27 @@ const sourceErrors = {
|
|
|
58
69
|
resolveSourceRepository: {
|
|
59
70
|
input: sourceInput,
|
|
60
71
|
output: z.object({
|
|
61
|
-
connection
|
|
62
|
-
id,
|
|
63
|
-
provider,
|
|
64
|
-
slug: z.string()
|
|
65
|
-
}),
|
|
72
|
+
connection,
|
|
66
73
|
repository
|
|
67
74
|
}),
|
|
68
75
|
errors: sourceErrors
|
|
69
76
|
},
|
|
77
|
+
resolveConnection: {
|
|
78
|
+
input: z.object({
|
|
79
|
+
workspaceId: id,
|
|
80
|
+
slug: z.string().min(1)
|
|
81
|
+
}),
|
|
82
|
+
output: connection.nullable()
|
|
83
|
+
},
|
|
84
|
+
resolveTriggerReference: {
|
|
85
|
+
input: z.object({
|
|
86
|
+
workspaceId: id,
|
|
87
|
+
connectionId: id,
|
|
88
|
+
payload: z.unknown()
|
|
89
|
+
}),
|
|
90
|
+
output: triggerReference.nullable(),
|
|
91
|
+
errors: sourceErrors
|
|
92
|
+
},
|
|
70
93
|
listSourceFiles: {
|
|
71
94
|
input: sourceInput.extend({
|
|
72
95
|
ref: z.string(),
|
package/dist/inter-module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/inter-module.ts"],"sourcesContent":["import {defineInterModuleContract, type InterModuleClient} from '@shipfox/inter-module';\nimport {z} from 'zod';\n\nconst id = z.string().uuid();\nconst provider = z.string().min(1);\nconst capability = z.enum(['source_control', 'agent_tools']);\nconst repository = z.object({\n externalRepositoryId: z.string(),\n owner: z.string(),\n name: z.string(),\n fullName: z.string(),\n defaultBranch: z.string(),\n visibility: z.enum(['public', 'private', 'internal', 'unknown']),\n cloneUrl: z.string(),\n htmlUrl: z.string(),\n});\nconst sourceInput = z.object({workspaceId: id, connectionId: id, externalRepositoryId: z.string()});\nconst providerError = z.object({\n reason: z.string(),\n retryAfterSeconds: z.number().int().positive().optional(),\n});\nconst sourceErrors = {\n 'connection-not-found': z.object({connectionId: id}),\n 'connection-inactive': z.object({connectionId: id}),\n 'connection-workspace-mismatch': z.object({connectionId: id}),\n 'provider-unavailable': z.object({provider}),\n 'capability-unavailable': z.object({provider, capability}),\n 'checkout-unsupported': z.object({provider}),\n 'provider-failure': providerError,\n};\n\n/** Producer-owned synchronous operations for the Integrations bounded context. */\nexport const integrationsInterModuleContract = defineInterModuleContract({\n module: 'integrations',\n methods: {\n resolveSourceRepository: {\n input: sourceInput,\n output: z.object({connection: z.object({id, provider, slug: z.string()}), repository}),\n errors: sourceErrors,\n },\n listSourceFiles: {\n input: sourceInput.extend({\n ref: z.string(),\n prefix: z.string(),\n limit: z.number().int().positive(),\n cursor: z.string().optional(),\n }),\n output: z.object({\n files: z.array(\n z.object({path: z.string(), type: z.literal('file'), size: z.number().int().nullable()}),\n ),\n nextCursor: z.string().nullable(),\n }),\n errors: sourceErrors,\n },\n fetchSourceFile: {\n input: sourceInput.extend({ref: z.string(), path: z.string()}),\n output: z.object({path: z.string(), ref: z.string(), content: z.string()}),\n errors: sourceErrors,\n },\n createCheckoutSpec: {\n input: sourceInput.extend({\n ref: z.string().optional(),\n permissions: z.object({contents: z.enum(['read', 'write'])}).optional(),\n }),\n output: z.object({\n repositoryUrl: z.string(),\n ref: z.string(),\n credentials: z\n .object({username: z.string(), token: z.string(), expiresAt: z.string().datetime()})\n .optional(),\n gitAuthor: z.object({name: z.string(), email: z.string()}).optional(),\n }),\n errors: sourceErrors,\n },\n getAgentToolsContext: {\n input: z.object({workspaceId: id, defaultConnectionId: id}),\n output: z.object({\n selectionCatalogs: z.array(\n z.object({\n provider,\n selectors: z.array(\n z.object({\n token: z.string(),\n kind: z.enum(['family', 'family_wildcard', 'method', 'standalone']),\n sensitivity: z.enum(['read', 'write']),\n sensitive: z.boolean(),\n }),\n ),\n }),\n ),\n catalogs: z.array(\n z.object({\n provider,\n tools: z.array(\n z.object({\n id: z.string(),\n description: z.string(),\n sensitivity: z.enum(['read', 'write']),\n sensitive: z.boolean(),\n requiredScope: z.unknown(),\n inputSchema: z.record(z.string(), z.unknown()),\n outputSchema: z.record(z.string(), z.unknown()).optional(),\n methods: z\n .array(\n z.object({\n id: z.string(),\n description: z.string(),\n sensitivity: z.enum(['read', 'write']),\n sensitive: z.boolean(),\n requiredScope: z.unknown(),\n }),\n )\n .optional(),\n }),\n ),\n }),\n ),\n workspaceConnections: z.array(\n z.object({slug: z.string(), id, provider, capabilities: z.array(capability)}),\n ),\n defaultConnection: z.object({id, slug: z.string(), provider}).nullable(),\n }),\n errors: sourceErrors,\n },\n },\n});\n\nexport type IntegrationsModuleClient = InterModuleClient<typeof integrationsInterModuleContract>;\n"],"names":["defineInterModuleContract","z","id","string","uuid","provider","min","capability","enum","repository","object","externalRepositoryId","owner","name","fullName","defaultBranch","visibility","cloneUrl","htmlUrl","sourceInput","workspaceId","connectionId","providerError","reason","retryAfterSeconds","number","int","positive","optional","sourceErrors","integrationsInterModuleContract","module","methods","resolveSourceRepository","input","output","connection","slug","errors","listSourceFiles","extend","ref","prefix","limit","cursor","files","array","path","type","literal","size","nullable","nextCursor","fetchSourceFile","content","createCheckoutSpec","permissions","contents","repositoryUrl","credentials","username","token","expiresAt","datetime","gitAuthor","email","getAgentToolsContext","defaultConnectionId","selectionCatalogs","selectors","kind","sensitivity","sensitive","boolean","catalogs","tools","description","requiredScope","unknown","inputSchema","record","outputSchema","workspaceConnections","capabilities","defaultConnection"],"mappings":"AAAA,SAAQA,yBAAyB,QAA+B,wBAAwB;AACxF,SAAQC,CAAC,QAAO,MAAM;AAEtB,MAAMC,KAAKD,EAAEE,MAAM,GAAGC,IAAI;AAC1B,MAAMC,WAAWJ,EAAEE,MAAM,GAAGG,GAAG,CAAC;AAChC,MAAMC,aAAaN,EAAEO,IAAI,CAAC;IAAC;IAAkB;CAAc;AAC3D,MAAMC,aAAaR,EAAES,MAAM,CAAC;IAC1BC,sBAAsBV,EAAEE,MAAM;IAC9BS,OAAOX,EAAEE,MAAM;IACfU,MAAMZ,EAAEE,MAAM;IACdW,UAAUb,EAAEE,MAAM;IAClBY,eAAed,EAAEE,MAAM;IACvBa,YAAYf,EAAEO,IAAI,CAAC;QAAC;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IG;oBAAU8E,cAAclF,EAAE6C,KAAK,CAACvC;gBAAW;gBAE7E6E,mBAAmBnF,EAAES,MAAM,CAAC;oBAACR;oBAAImC,MAAMpC,EAAEE,MAAM;oBAAIE;gBAAQ,GAAG8C,QAAQ;YACxE;YACAb,QAAQT;QACV;IACF;AACF,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../src/inter-module.ts"],"sourcesContent":["import {defineInterModuleContract, type InterModuleClient} from '@shipfox/inter-module';\nimport {z} from 'zod';\n\nconst id = z.string().uuid();\nconst provider = z.string().min(1);\nconst capability = z.enum(['source_control', 'agent_tools']);\nconst connection = z.object({id, provider, slug: z.string().min(1)});\nconst repository = z.object({\n externalRepositoryId: z.string(),\n owner: z.string(),\n name: z.string(),\n fullName: z.string(),\n defaultBranch: z.string(),\n visibility: z.enum(['public', 'private', 'internal', 'unknown']),\n cloneUrl: z.string(),\n htmlUrl: z.string(),\n});\nconst triggerReference = z.object({\n externalRepositoryId: z.string(),\n ref: z.string(),\n commit: z.string(),\n actor: z.string().nullable(),\n});\nconst sourceInput = z.object({workspaceId: id, connectionId: id, externalRepositoryId: z.string()});\nconst providerError = z.object({\n reason: z.string(),\n retryAfterSeconds: z.number().int().positive().optional(),\n});\nconst sourceErrors = {\n 'connection-not-found': z.object({connectionId: id}),\n 'connection-inactive': z.object({connectionId: id}),\n 'connection-workspace-mismatch': z.object({connectionId: id}),\n 'provider-unavailable': z.object({provider}),\n 'capability-unavailable': z.object({provider, capability}),\n 'checkout-unsupported': z.object({provider}),\n 'provider-failure': providerError,\n};\n\n/** Producer-owned synchronous operations for the Integrations bounded context. */\nexport const integrationsInterModuleContract = defineInterModuleContract({\n module: 'integrations',\n methods: {\n resolveSourceRepository: {\n input: sourceInput,\n output: z.object({connection, repository}),\n errors: sourceErrors,\n },\n resolveConnection: {\n input: z.object({workspaceId: id, slug: z.string().min(1)}),\n output: connection.nullable(),\n },\n resolveTriggerReference: {\n input: z.object({workspaceId: id, connectionId: id, payload: z.unknown()}),\n output: triggerReference.nullable(),\n errors: sourceErrors,\n },\n listSourceFiles: {\n input: sourceInput.extend({\n ref: z.string(),\n prefix: z.string(),\n limit: z.number().int().positive(),\n cursor: z.string().optional(),\n }),\n output: z.object({\n files: z.array(\n z.object({path: z.string(), type: z.literal('file'), size: z.number().int().nullable()}),\n ),\n nextCursor: z.string().nullable(),\n }),\n errors: sourceErrors,\n },\n fetchSourceFile: {\n input: sourceInput.extend({ref: z.string(), path: z.string()}),\n output: z.object({path: z.string(), ref: z.string(), content: z.string()}),\n errors: sourceErrors,\n },\n createCheckoutSpec: {\n input: sourceInput.extend({\n ref: z.string().optional(),\n permissions: z.object({contents: z.enum(['read', 'write'])}).optional(),\n }),\n output: z.object({\n repositoryUrl: z.string(),\n ref: z.string(),\n credentials: z\n .object({username: z.string(), token: z.string(), expiresAt: z.string().datetime()})\n .optional(),\n gitAuthor: z.object({name: z.string(), email: z.string()}).optional(),\n }),\n errors: sourceErrors,\n },\n getAgentToolsContext: {\n input: z.object({workspaceId: id, defaultConnectionId: id}),\n output: z.object({\n selectionCatalogs: z.array(\n z.object({\n provider,\n selectors: z.array(\n z.object({\n token: z.string(),\n kind: z.enum(['family', 'family_wildcard', 'method', 'standalone']),\n sensitivity: z.enum(['read', 'write']),\n sensitive: z.boolean(),\n }),\n ),\n }),\n ),\n catalogs: z.array(\n z.object({\n provider,\n tools: z.array(\n z.object({\n id: z.string(),\n description: z.string(),\n sensitivity: z.enum(['read', 'write']),\n sensitive: z.boolean(),\n requiredScope: z.unknown(),\n inputSchema: z.record(z.string(), z.unknown()),\n outputSchema: z.record(z.string(), z.unknown()).optional(),\n methods: z\n .array(\n z.object({\n id: z.string(),\n description: z.string(),\n sensitivity: z.enum(['read', 'write']),\n sensitive: z.boolean(),\n requiredScope: z.unknown(),\n }),\n )\n .optional(),\n }),\n ),\n }),\n ),\n workspaceConnections: z.array(\n z.object({slug: z.string(), id, provider, capabilities: z.array(capability)}),\n ),\n defaultConnection: z.object({id, slug: z.string(), provider}).nullable(),\n }),\n errors: sourceErrors,\n },\n },\n});\n\nexport type IntegrationsModuleClient = InterModuleClient<typeof integrationsInterModuleContract>;\n"],"names":["defineInterModuleContract","z","id","string","uuid","provider","min","capability","enum","connection","object","slug","repository","externalRepositoryId","owner","name","fullName","defaultBranch","visibility","cloneUrl","htmlUrl","triggerReference","ref","commit","actor","nullable","sourceInput","workspaceId","connectionId","providerError","reason","retryAfterSeconds","number","int","positive","optional","sourceErrors","integrationsInterModuleContract","module","methods","resolveSourceRepository","input","output","errors","resolveConnection","resolveTriggerReference","payload","unknown","listSourceFiles","extend","prefix","limit","cursor","files","array","path","type","literal","size","nextCursor","fetchSourceFile","content","createCheckoutSpec","permissions","contents","repositoryUrl","credentials","username","token","expiresAt","datetime","gitAuthor","email","getAgentToolsContext","defaultConnectionId","selectionCatalogs","selectors","kind","sensitivity","sensitive","boolean","catalogs","tools","description","requiredScope","inputSchema","record","outputSchema","workspaceConnections","capabilities","defaultConnection"],"mappings":"AAAA,SAAQA,yBAAyB,QAA+B,wBAAwB;AACxF,SAAQC,CAAC,QAAO,MAAM;AAEtB,MAAMC,KAAKD,EAAEE,MAAM,GAAGC,IAAI;AAC1B,MAAMC,WAAWJ,EAAEE,MAAM,GAAGG,GAAG,CAAC;AAChC,MAAMC,aAAaN,EAAEO,IAAI,CAAC;IAAC;IAAkB;CAAc;AAC3D,MAAMC,aAAaR,EAAES,MAAM,CAAC;IAACR;IAAIG;IAAUM,MAAMV,EAAEE,MAAM,GAAGG,GAAG,CAAC;AAAE;AAClE,MAAMM,aAAaX,EAAES,MAAM,CAAC;IAC1BG,sBAAsBZ,EAAEE,MAAM;IAC9BW,OAAOb,EAAEE,MAAM;IACfY,MAAMd,EAAEE,MAAM;IACda,UAAUf,EAAEE,MAAM;IAClBc,eAAehB,EAAEE,MAAM;IACvBe,YAAYjB,EAAEO,IAAI,CAAC;QAAC;QAAU;QAAW;QAAY;KAAU;IAC/DW,UAAUlB,EAAEE,MAAM;IACl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