@contractspec/example.integration-hub 1.46.0 → 1.47.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/dist/connection/connection.enum.d.ts +2 -2
- package/dist/connection/connection.enum.d.ts.map +1 -1
- package/dist/connection/connection.operation.d.ts +27 -27
- package/dist/connection/connection.operation.d.ts.map +1 -1
- package/dist/connection/connection.presentation.d.ts +3 -3
- package/dist/connection/connection.presentation.d.ts.map +1 -1
- package/dist/connection/connection.presentation.js +5 -5
- package/dist/connection/connection.presentation.js.map +1 -1
- package/dist/connection/connection.schema.d.ts +16 -16
- package/dist/connection/connection.schema.d.ts.map +1 -1
- package/dist/events.d.ts +10 -10
- package/dist/example.d.ts +2 -2
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +4 -2
- package/dist/example.js.map +1 -1
- package/dist/handlers/index.d.ts +2 -0
- package/dist/handlers/index.js +3 -0
- package/dist/handlers/integration.handlers.d.ts +130 -0
- package/dist/handlers/integration.handlers.d.ts.map +1 -0
- package/dist/handlers/integration.handlers.js +282 -0
- package/dist/handlers/integration.handlers.js.map +1 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +6 -1
- package/dist/integration/integration.enum.d.ts +2 -2
- package/dist/integration/integration.enum.d.ts.map +1 -1
- package/dist/integration/integration.operations.d.ts +25 -25
- package/dist/integration/integration.operations.d.ts.map +1 -1
- package/dist/integration/integration.presentation.d.ts +4 -4
- package/dist/integration/integration.presentation.d.ts.map +1 -1
- package/dist/integration/integration.presentation.js +7 -7
- package/dist/integration/integration.presentation.js.map +1 -1
- package/dist/integration/integration.schema.d.ts +16 -16
- package/dist/integration/integration.schema.d.ts.map +1 -1
- package/dist/integration-hub.capability.d.ts +9 -0
- package/dist/integration-hub.capability.d.ts.map +1 -0
- package/dist/integration-hub.capability.js +38 -0
- package/dist/integration-hub.capability.js.map +1 -0
- package/dist/integration-hub.feature.d.ts +2 -3
- package/dist/integration-hub.feature.d.ts.map +1 -1
- package/dist/integration-hub.feature.js +7 -2
- package/dist/integration-hub.feature.js.map +1 -1
- package/dist/seeders/index.d.ts +10 -0
- package/dist/seeders/index.d.ts.map +1 -0
- package/dist/seeders/index.js +19 -0
- package/dist/seeders/index.js.map +1 -0
- package/dist/sync/sync.enum.d.ts +4 -4
- package/dist/sync/sync.enum.d.ts.map +1 -1
- package/dist/sync/sync.operations.d.ts +126 -126
- package/dist/sync/sync.operations.d.ts.map +1 -1
- package/dist/sync/sync.presentation.d.ts +7 -7
- package/dist/sync/sync.presentation.d.ts.map +1 -1
- package/dist/sync/sync.presentation.js +13 -13
- package/dist/sync/sync.presentation.js.map +1 -1
- package/dist/sync/sync.schema.d.ts +85 -85
- package/dist/sync-engine/index.js.map +1 -1
- package/dist/tests/operations.test-spec.d.ts +9 -0
- package/dist/tests/operations.test-spec.d.ts.map +1 -0
- package/dist/tests/operations.test-spec.js +94 -0
- package/dist/tests/operations.test-spec.js.map +1 -0
- package/dist/ui/IntegrationDashboard.d.ts +7 -0
- package/dist/ui/IntegrationDashboard.d.ts.map +1 -0
- package/dist/ui/IntegrationDashboard.js +266 -0
- package/dist/ui/IntegrationDashboard.js.map +1 -0
- package/dist/ui/hooks/index.d.ts +2 -0
- package/dist/ui/hooks/index.js +5 -0
- package/dist/ui/hooks/useIntegrationData.d.ts +23 -0
- package/dist/ui/hooks/useIntegrationData.d.ts.map +1 -0
- package/dist/ui/hooks/useIntegrationData.js +59 -0
- package/dist/ui/hooks/useIntegrationData.js.map +1 -0
- package/dist/ui/index.d.ts +6 -0
- package/dist/ui/index.js +6 -0
- package/dist/ui/renderers/index.d.ts +2 -0
- package/dist/ui/renderers/index.js +3 -0
- package/dist/ui/renderers/integration.markdown.d.ts +28 -0
- package/dist/ui/renderers/integration.markdown.d.ts.map +1 -0
- package/dist/ui/renderers/integration.markdown.js +256 -0
- package/dist/ui/renderers/integration.markdown.js.map +1 -0
- package/package.json +24 -8
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema55 from "@contractspec/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/connection/connection.enum.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Connection status enum.
|
|
6
6
|
*/
|
|
7
|
-
declare const ConnectionStatusEnum:
|
|
7
|
+
declare const ConnectionStatusEnum: _contractspec_lib_schema55.EnumType<[string, string, string, string, string]>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { ConnectionStatusEnum };
|
|
10
10
|
//# sourceMappingURL=connection.enum.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.enum.d.ts","names":[],"sources":["../../src/connection/connection.enum.ts"],"sourcesContent":[],"mappings":";;;;;;AAKa,cAAA,oBAMX,EAAA,
|
|
1
|
+
{"version":3,"file":"connection.enum.d.ts","names":[],"sources":["../../src/connection/connection.enum.ts"],"sourcesContent":[],"mappings":";;;;;;AAKa,cAAA,oBAMX,EAAA,0BAAA,CAN+B,QAAA,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA"}
|
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_contracts15 from "@contractspec/lib.contracts";
|
|
2
|
+
import * as _contractspec_lib_schema56 from "@contractspec/lib.schema";
|
|
3
3
|
|
|
4
4
|
//#region src/connection/connection.operation.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Create a connection to an external system.
|
|
7
7
|
*/
|
|
8
|
-
declare const CreateConnectionContract:
|
|
8
|
+
declare const CreateConnectionContract: _contractspec_lib_contracts15.OperationSpec<_contractspec_lib_schema56.SchemaModel<{
|
|
9
9
|
integrationId: {
|
|
10
|
-
type:
|
|
10
|
+
type: _contractspec_lib_schema56.FieldType<string, string>;
|
|
11
11
|
isOptional: false;
|
|
12
12
|
};
|
|
13
13
|
name: {
|
|
14
|
-
type:
|
|
14
|
+
type: _contractspec_lib_schema56.FieldType<string, string>;
|
|
15
15
|
isOptional: false;
|
|
16
16
|
};
|
|
17
17
|
authType: {
|
|
18
|
-
type:
|
|
18
|
+
type: _contractspec_lib_schema56.FieldType<string, string>;
|
|
19
19
|
isOptional: false;
|
|
20
20
|
};
|
|
21
21
|
credentials: {
|
|
22
|
-
type:
|
|
22
|
+
type: _contractspec_lib_schema56.FieldType<unknown, unknown>;
|
|
23
23
|
isOptional: true;
|
|
24
24
|
};
|
|
25
|
-
}>,
|
|
25
|
+
}>, _contractspec_lib_schema56.SchemaModel<{
|
|
26
26
|
id: {
|
|
27
|
-
type:
|
|
27
|
+
type: _contractspec_lib_schema56.FieldType<string, string>;
|
|
28
28
|
isOptional: false;
|
|
29
29
|
};
|
|
30
30
|
integrationId: {
|
|
31
|
-
type:
|
|
31
|
+
type: _contractspec_lib_schema56.FieldType<string, string>;
|
|
32
32
|
isOptional: false;
|
|
33
33
|
};
|
|
34
34
|
name: {
|
|
35
|
-
type:
|
|
35
|
+
type: _contractspec_lib_schema56.FieldType<string, string>;
|
|
36
36
|
isOptional: false;
|
|
37
37
|
};
|
|
38
38
|
status: {
|
|
39
|
-
type:
|
|
39
|
+
type: _contractspec_lib_schema56.EnumType<[string, string, string, string, string]>;
|
|
40
40
|
isOptional: false;
|
|
41
41
|
};
|
|
42
42
|
authType: {
|
|
43
|
-
type:
|
|
43
|
+
type: _contractspec_lib_schema56.FieldType<string, string>;
|
|
44
44
|
isOptional: false;
|
|
45
45
|
};
|
|
46
46
|
externalAccountName: {
|
|
47
|
-
type:
|
|
47
|
+
type: _contractspec_lib_schema56.FieldType<string, string>;
|
|
48
48
|
isOptional: true;
|
|
49
49
|
};
|
|
50
50
|
connectedAt: {
|
|
51
|
-
type:
|
|
51
|
+
type: _contractspec_lib_schema56.FieldType<Date, string>;
|
|
52
52
|
isOptional: true;
|
|
53
53
|
};
|
|
54
54
|
lastHealthCheck: {
|
|
55
|
-
type:
|
|
55
|
+
type: _contractspec_lib_schema56.FieldType<Date, string>;
|
|
56
56
|
isOptional: true;
|
|
57
57
|
};
|
|
58
58
|
healthStatus: {
|
|
59
|
-
type:
|
|
59
|
+
type: _contractspec_lib_schema56.FieldType<string, string>;
|
|
60
60
|
isOptional: true;
|
|
61
61
|
};
|
|
62
62
|
}>, {
|
|
63
63
|
key: string;
|
|
64
64
|
version: string;
|
|
65
65
|
when: string;
|
|
66
|
-
payload:
|
|
66
|
+
payload: _contractspec_lib_schema56.SchemaModel<{
|
|
67
67
|
id: {
|
|
68
|
-
type:
|
|
68
|
+
type: _contractspec_lib_schema56.FieldType<string, string>;
|
|
69
69
|
isOptional: false;
|
|
70
70
|
};
|
|
71
71
|
integrationId: {
|
|
72
|
-
type:
|
|
72
|
+
type: _contractspec_lib_schema56.FieldType<string, string>;
|
|
73
73
|
isOptional: false;
|
|
74
74
|
};
|
|
75
75
|
name: {
|
|
76
|
-
type:
|
|
76
|
+
type: _contractspec_lib_schema56.FieldType<string, string>;
|
|
77
77
|
isOptional: false;
|
|
78
78
|
};
|
|
79
79
|
status: {
|
|
80
|
-
type:
|
|
80
|
+
type: _contractspec_lib_schema56.EnumType<[string, string, string, string, string]>;
|
|
81
81
|
isOptional: false;
|
|
82
82
|
};
|
|
83
83
|
authType: {
|
|
84
|
-
type:
|
|
84
|
+
type: _contractspec_lib_schema56.FieldType<string, string>;
|
|
85
85
|
isOptional: false;
|
|
86
86
|
};
|
|
87
87
|
externalAccountName: {
|
|
88
|
-
type:
|
|
88
|
+
type: _contractspec_lib_schema56.FieldType<string, string>;
|
|
89
89
|
isOptional: true;
|
|
90
90
|
};
|
|
91
91
|
connectedAt: {
|
|
92
|
-
type:
|
|
92
|
+
type: _contractspec_lib_schema56.FieldType<Date, string>;
|
|
93
93
|
isOptional: true;
|
|
94
94
|
};
|
|
95
95
|
lastHealthCheck: {
|
|
96
|
-
type:
|
|
96
|
+
type: _contractspec_lib_schema56.FieldType<Date, string>;
|
|
97
97
|
isOptional: true;
|
|
98
98
|
};
|
|
99
99
|
healthStatus: {
|
|
100
|
-
type:
|
|
100
|
+
type: _contractspec_lib_schema56.FieldType<string, string>;
|
|
101
101
|
isOptional: true;
|
|
102
102
|
};
|
|
103
103
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.operation.d.ts","names":[],"sources":["../../src/connection/connection.operation.ts"],"sourcesContent":[],"mappings":";;;;;;;cAWa,wDAAwB,
|
|
1
|
+
{"version":3,"file":"connection.operation.d.ts","names":[],"sources":["../../src/connection/connection.operation.ts"],"sourcesContent":[],"mappings":";;;;;;;cAWa,wDAAwB,yCAAA;EAAxB,aAAA,EAAA;IAiDX,IAAA,EAAA,0BAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;8CAjDmC,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;;;;UAAA,0BAAA,CAAA;;;;;;;;;;;;6CAAA,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA;IAAA,UAAA,EAAA,KAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
|
|
2
2
|
|
|
3
3
|
//#region src/connection/connection.presentation.d.ts
|
|
4
|
-
declare const ConnectionListPresentation: PresentationSpec;
|
|
5
|
-
declare const ConnectionSetupPresentation: PresentationSpec;
|
|
4
|
+
declare const ConnectionListPresentation: _contractspec_lib_contracts0.PresentationSpec;
|
|
5
|
+
declare const ConnectionSetupPresentation: _contractspec_lib_contracts0.PresentationSpec;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ConnectionListPresentation, ConnectionSetupPresentation };
|
|
8
8
|
//# sourceMappingURL=connection.presentation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.presentation.d.ts","names":[],"sources":["../../src/connection/connection.presentation.ts"],"sourcesContent":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"connection.presentation.d.ts","names":[],"sources":["../../src/connection/connection.presentation.ts"],"sourcesContent":[],"mappings":";;;cAGa,4BAuBX,4BAAA,CAvBqC;cAyB1B,6BAuBX,4BAAA,CAvBsC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ConnectionModel } from "./connection.schema.js";
|
|
2
|
-
import { StabilityEnum } from "@contractspec/lib.contracts";
|
|
2
|
+
import { StabilityEnum, definePresentation } from "@contractspec/lib.contracts";
|
|
3
3
|
|
|
4
4
|
//#region src/connection/connection.presentation.ts
|
|
5
|
-
const ConnectionListPresentation = {
|
|
5
|
+
const ConnectionListPresentation = definePresentation({
|
|
6
6
|
meta: {
|
|
7
7
|
key: "integration.connection.list",
|
|
8
8
|
version: "1.0.0",
|
|
@@ -27,8 +27,8 @@ const ConnectionListPresentation = {
|
|
|
27
27
|
},
|
|
28
28
|
targets: ["react", "markdown"],
|
|
29
29
|
policy: { flags: ["integration.enabled"] }
|
|
30
|
-
};
|
|
31
|
-
const ConnectionSetupPresentation = {
|
|
30
|
+
});
|
|
31
|
+
const ConnectionSetupPresentation = definePresentation({
|
|
32
32
|
meta: {
|
|
33
33
|
key: "integration.connection.setup",
|
|
34
34
|
version: "1.0.0",
|
|
@@ -53,7 +53,7 @@ const ConnectionSetupPresentation = {
|
|
|
53
53
|
},
|
|
54
54
|
targets: ["react"],
|
|
55
55
|
policy: { flags: ["integration.enabled"] }
|
|
56
|
-
};
|
|
56
|
+
});
|
|
57
57
|
|
|
58
58
|
//#endregion
|
|
59
59
|
export { ConnectionListPresentation, ConnectionSetupPresentation };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.presentation.js","names":[
|
|
1
|
+
{"version":3,"file":"connection.presentation.js","names":[],"sources":["../../src/connection/connection.presentation.ts"],"sourcesContent":["import { definePresentation, StabilityEnum } from '@contractspec/lib.contracts';\nimport { ConnectionModel } from './connection.schema';\n\nexport const ConnectionListPresentation = definePresentation({\n meta: {\n key: 'integration.connection.list',\n version: '1.0.0',\n title: 'Connection List',\n description: 'List of integration connections',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'connection', 'list'],\n stability: StabilityEnum.Experimental,\n goal: 'Provide an overview of all established integration connections.',\n context: 'The primary management view for integration hubs.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ConnectionList',\n props: ConnectionModel,\n },\n targets: ['react', 'markdown'],\n policy: {\n flags: ['integration.enabled'],\n },\n});\n\nexport const ConnectionSetupPresentation = definePresentation({\n meta: {\n key: 'integration.connection.setup',\n version: '1.0.0',\n title: 'Connection Setup',\n description: 'Setup wizard for creating integration connections',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'connection', 'setup'],\n stability: StabilityEnum.Experimental,\n goal: 'Guide users through the multi-step process of connecting to a new integration.',\n context: 'The onboarding flow for new integrations.',\n },\n source: {\n type: 'component',\n framework: 'react',\n componentKey: 'ConnectionSetup',\n props: ConnectionModel,\n },\n targets: ['react'],\n policy: {\n flags: ['integration.enabled'],\n },\n});\n"],"mappings":";;;;AAGA,MAAa,6BAA6B,mBAAmB;CAC3D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAc;GAAO;EAC3C,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,SAAS,WAAW;CAC9B,QAAQ,EACN,OAAO,CAAC,sBAAsB,EAC/B;CACF,CAAC;AAEF,MAAa,8BAA8B,mBAAmB;CAC5D,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aAAa;EACb,QAAQ;EACR,QAAQ,CAAC,oBAAoB;EAC7B,MAAM;GAAC;GAAe;GAAc;GAAQ;EAC5C,WAAW,cAAc;EACzB,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO;EACR;CACD,SAAS,CAAC,QAAQ;CAClB,QAAQ,EACN,OAAO,CAAC,sBAAsB,EAC/B;CACF,CAAC"}
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema40 from "@contractspec/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/connection/connection.schema.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* A connection to an external system.
|
|
6
6
|
*/
|
|
7
|
-
declare const ConnectionModel:
|
|
7
|
+
declare const ConnectionModel: _contractspec_lib_schema40.SchemaModel<{
|
|
8
8
|
id: {
|
|
9
|
-
type:
|
|
9
|
+
type: _contractspec_lib_schema40.FieldType<string, string>;
|
|
10
10
|
isOptional: false;
|
|
11
11
|
};
|
|
12
12
|
integrationId: {
|
|
13
|
-
type:
|
|
13
|
+
type: _contractspec_lib_schema40.FieldType<string, string>;
|
|
14
14
|
isOptional: false;
|
|
15
15
|
};
|
|
16
16
|
name: {
|
|
17
|
-
type:
|
|
17
|
+
type: _contractspec_lib_schema40.FieldType<string, string>;
|
|
18
18
|
isOptional: false;
|
|
19
19
|
};
|
|
20
20
|
status: {
|
|
21
|
-
type:
|
|
21
|
+
type: _contractspec_lib_schema40.EnumType<[string, string, string, string, string]>;
|
|
22
22
|
isOptional: false;
|
|
23
23
|
};
|
|
24
24
|
authType: {
|
|
25
|
-
type:
|
|
25
|
+
type: _contractspec_lib_schema40.FieldType<string, string>;
|
|
26
26
|
isOptional: false;
|
|
27
27
|
};
|
|
28
28
|
externalAccountName: {
|
|
29
|
-
type:
|
|
29
|
+
type: _contractspec_lib_schema40.FieldType<string, string>;
|
|
30
30
|
isOptional: true;
|
|
31
31
|
};
|
|
32
32
|
connectedAt: {
|
|
33
|
-
type:
|
|
33
|
+
type: _contractspec_lib_schema40.FieldType<Date, string>;
|
|
34
34
|
isOptional: true;
|
|
35
35
|
};
|
|
36
36
|
lastHealthCheck: {
|
|
37
|
-
type:
|
|
37
|
+
type: _contractspec_lib_schema40.FieldType<Date, string>;
|
|
38
38
|
isOptional: true;
|
|
39
39
|
};
|
|
40
40
|
healthStatus: {
|
|
41
|
-
type:
|
|
41
|
+
type: _contractspec_lib_schema40.FieldType<string, string>;
|
|
42
42
|
isOptional: true;
|
|
43
43
|
};
|
|
44
44
|
}>;
|
|
45
45
|
/**
|
|
46
46
|
* Input for creating a connection.
|
|
47
47
|
*/
|
|
48
|
-
declare const CreateConnectionInputModel:
|
|
48
|
+
declare const CreateConnectionInputModel: _contractspec_lib_schema40.SchemaModel<{
|
|
49
49
|
integrationId: {
|
|
50
|
-
type:
|
|
50
|
+
type: _contractspec_lib_schema40.FieldType<string, string>;
|
|
51
51
|
isOptional: false;
|
|
52
52
|
};
|
|
53
53
|
name: {
|
|
54
|
-
type:
|
|
54
|
+
type: _contractspec_lib_schema40.FieldType<string, string>;
|
|
55
55
|
isOptional: false;
|
|
56
56
|
};
|
|
57
57
|
authType: {
|
|
58
|
-
type:
|
|
58
|
+
type: _contractspec_lib_schema40.FieldType<string, string>;
|
|
59
59
|
isOptional: false;
|
|
60
60
|
};
|
|
61
61
|
credentials: {
|
|
62
|
-
type:
|
|
62
|
+
type: _contractspec_lib_schema40.FieldType<unknown, unknown>;
|
|
63
63
|
isOptional: true;
|
|
64
64
|
};
|
|
65
65
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.schema.d.ts","names":[],"sources":["../../src/connection/connection.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAMa,cAAA,eAmBX,
|
|
1
|
+
{"version":3,"file":"connection.schema.d.ts","names":[],"sources":["../../src/connection/connection.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAMa,cAAA,eAmBX,6BAnB0B,WAmB1B,CAAA;EAAA,EAAA,EAAA;UAAA,0BAAA,CAAA;;;;;;;;;;;EAnB0B,MAAA,EAAA;IAwBf,IAAA,qCAWX,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;EAXqC,CAAA;;;;;;;;;;;;;;;;;;;;;cAA1B,uDAA0B;;UAWrC,0BAAA,CAAA"}
|
package/dist/events.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_contracts1 from "@contractspec/lib.contracts";
|
|
2
2
|
import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
|
|
3
3
|
|
|
4
4
|
//#region src/events.d.ts
|
|
5
|
-
declare const IntegrationCreatedEvent:
|
|
5
|
+
declare const IntegrationCreatedEvent: _contractspec_lib_contracts1.EventSpec<_contractspec_lib_schema0.SchemaModel<{
|
|
6
6
|
integrationId: {
|
|
7
7
|
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
8
8
|
isOptional: false;
|
|
@@ -16,7 +16,7 @@ declare const IntegrationCreatedEvent: _contractspec_lib_contracts0.EventSpec<_c
|
|
|
16
16
|
isOptional: false;
|
|
17
17
|
};
|
|
18
18
|
}>>;
|
|
19
|
-
declare const ConnectionCreatedEvent:
|
|
19
|
+
declare const ConnectionCreatedEvent: _contractspec_lib_contracts1.EventSpec<_contractspec_lib_schema0.SchemaModel<{
|
|
20
20
|
connectionId: {
|
|
21
21
|
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
22
22
|
isOptional: false;
|
|
@@ -34,7 +34,7 @@ declare const ConnectionCreatedEvent: _contractspec_lib_contracts0.EventSpec<_co
|
|
|
34
34
|
isOptional: false;
|
|
35
35
|
};
|
|
36
36
|
}>>;
|
|
37
|
-
declare const ConnectionStatusChangedEvent:
|
|
37
|
+
declare const ConnectionStatusChangedEvent: _contractspec_lib_contracts1.EventSpec<_contractspec_lib_schema0.SchemaModel<{
|
|
38
38
|
connectionId: {
|
|
39
39
|
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
40
40
|
isOptional: false;
|
|
@@ -52,7 +52,7 @@ declare const ConnectionStatusChangedEvent: _contractspec_lib_contracts0.EventSp
|
|
|
52
52
|
isOptional: false;
|
|
53
53
|
};
|
|
54
54
|
}>>;
|
|
55
|
-
declare const SyncConfigCreatedEvent:
|
|
55
|
+
declare const SyncConfigCreatedEvent: _contractspec_lib_contracts1.EventSpec<_contractspec_lib_schema0.SchemaModel<{
|
|
56
56
|
syncConfigId: {
|
|
57
57
|
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
58
58
|
isOptional: false;
|
|
@@ -66,7 +66,7 @@ declare const SyncConfigCreatedEvent: _contractspec_lib_contracts0.EventSpec<_co
|
|
|
66
66
|
isOptional: false;
|
|
67
67
|
};
|
|
68
68
|
}>>;
|
|
69
|
-
declare const SyncStartedEvent:
|
|
69
|
+
declare const SyncStartedEvent: _contractspec_lib_contracts1.EventSpec<_contractspec_lib_schema0.SchemaModel<{
|
|
70
70
|
syncRunId: {
|
|
71
71
|
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
72
72
|
isOptional: false;
|
|
@@ -80,7 +80,7 @@ declare const SyncStartedEvent: _contractspec_lib_contracts0.EventSpec<_contract
|
|
|
80
80
|
isOptional: false;
|
|
81
81
|
};
|
|
82
82
|
}>>;
|
|
83
|
-
declare const SyncCompletedEvent:
|
|
83
|
+
declare const SyncCompletedEvent: _contractspec_lib_contracts1.EventSpec<_contractspec_lib_schema0.SchemaModel<{
|
|
84
84
|
syncRunId: {
|
|
85
85
|
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
86
86
|
isOptional: false;
|
|
@@ -98,7 +98,7 @@ declare const SyncCompletedEvent: _contractspec_lib_contracts0.EventSpec<_contra
|
|
|
98
98
|
isOptional: false;
|
|
99
99
|
};
|
|
100
100
|
}>>;
|
|
101
|
-
declare const SyncFailedEvent:
|
|
101
|
+
declare const SyncFailedEvent: _contractspec_lib_contracts1.EventSpec<_contractspec_lib_schema0.SchemaModel<{
|
|
102
102
|
syncRunId: {
|
|
103
103
|
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
104
104
|
isOptional: false;
|
|
@@ -116,7 +116,7 @@ declare const SyncFailedEvent: _contractspec_lib_contracts0.EventSpec<_contracts
|
|
|
116
116
|
isOptional: false;
|
|
117
117
|
};
|
|
118
118
|
}>>;
|
|
119
|
-
declare const RecordSyncedEvent:
|
|
119
|
+
declare const RecordSyncedEvent: _contractspec_lib_contracts1.EventSpec<_contractspec_lib_schema0.SchemaModel<{
|
|
120
120
|
syncRunId: {
|
|
121
121
|
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
122
122
|
isOptional: false;
|
|
@@ -134,7 +134,7 @@ declare const RecordSyncedEvent: _contractspec_lib_contracts0.EventSpec<_contrac
|
|
|
134
134
|
isOptional: false;
|
|
135
135
|
};
|
|
136
136
|
}>>;
|
|
137
|
-
declare const FieldMappingAddedEvent:
|
|
137
|
+
declare const FieldMappingAddedEvent: _contractspec_lib_contracts1.EventSpec<_contractspec_lib_schema0.SchemaModel<{
|
|
138
138
|
syncConfigId: {
|
|
139
139
|
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
140
140
|
isOptional: false;
|
package/dist/example.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as _contractspec_lib_contracts10 from "@contractspec/lib.contracts";
|
|
2
2
|
|
|
3
3
|
//#region src/example.d.ts
|
|
4
|
-
declare const example: ExampleSpec;
|
|
4
|
+
declare const example: _contractspec_lib_contracts10.ExampleSpec;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { example as default };
|
|
7
7
|
//# sourceMappingURL=example.d.ts.map
|
package/dist/example.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";;;cAEM,
|
|
1
|
+
{"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";;;cAEM,SAoCJ,6BAAA,CApCW"}
|
package/dist/example.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { defineExample } from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
1
3
|
//#region src/example.ts
|
|
2
|
-
const example = {
|
|
4
|
+
const example = defineExample({
|
|
3
5
|
meta: {
|
|
4
6
|
key: "integration-hub",
|
|
5
7
|
version: "1.0.0",
|
|
@@ -48,7 +50,7 @@ const example = {
|
|
|
48
50
|
},
|
|
49
51
|
mcp: { enabled: true }
|
|
50
52
|
}
|
|
51
|
-
};
|
|
53
|
+
});
|
|
52
54
|
var example_default = example;
|
|
53
55
|
|
|
54
56
|
//#endregion
|
package/dist/example.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example.js","names":[
|
|
1
|
+
{"version":3,"file":"example.js","names":[],"sources":["../src/example.ts"],"sourcesContent":["import { defineExample } from '@contractspec/lib.contracts';\n\nconst example = defineExample({\n meta: {\n key: 'integration-hub',\n version: '1.0.0',\n title: 'Integration Hub',\n description:\n 'Provider-agnostic integration center with connectors, connections, field mappings, and sync logs.',\n kind: 'template',\n visibility: 'public',\n stability: 'experimental',\n owners: ['@platform.core'],\n tags: ['integrations', 'sync', 'etl', 'connectors'],\n },\n docs: {\n rootDocId: 'docs.examples.integration-hub',\n goalDocId: 'docs.examples.integration-hub.goal',\n usageDocId: 'docs.examples.integration-hub.usage',\n constraintsDocId: 'docs.examples.integration-hub.constraints',\n },\n entrypoints: {\n packageName: '@contractspec/example.integration-hub',\n feature: './feature',\n contracts: './contracts',\n presentations: './presentations',\n handlers: './handlers',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: {\n enabled: true,\n modes: ['playground', 'specs', 'builder', 'markdown', 'evolution'],\n },\n studio: { enabled: true, installable: true },\n mcp: { enabled: true },\n },\n});\n\nexport default example;\n"],"mappings":";;;AAEA,MAAM,UAAU,cAAc;CAC5B,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,MAAM;EACN,YAAY;EACZ,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAgB;GAAQ;GAAO;GAAa;EACpD;CACD,MAAM;EACJ,WAAW;EACX,WAAW;EACX,YAAY;EACZ,kBAAkB;EACnB;CACD,aAAa;EACX,aAAa;EACb,SAAS;EACT,WAAW;EACX,eAAe;EACf,UAAU;EACV,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GACP,SAAS;GACT,OAAO;IAAC;IAAc;IAAS;IAAW;IAAY;IAAY;GACnE;EACD,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF,CAAC;AAEF,sBAAe"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ConfigureSyncInput, ConnectServiceInput, Connection, CreateIntegrationInput, FieldMapping, Integration, IntegrationHandlers, ListConnectionsInput, ListConnectionsOutput, ListIntegrationsInput, ListIntegrationsOutput, ListSyncConfigsInput, ListSyncConfigsOutput, MapFieldsInput, SyncConfig, createIntegrationHandlers } from "./integration.handlers.js";
|
|
2
|
+
export { ConfigureSyncInput, ConnectServiceInput, Connection, CreateIntegrationInput, FieldMapping, Integration, IntegrationHandlers, ListConnectionsInput, ListConnectionsOutput, ListIntegrationsInput, ListIntegrationsOutput, ListSyncConfigsInput, ListSyncConfigsOutput, MapFieldsInput, SyncConfig, createIntegrationHandlers };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { DatabasePort } from "@contractspec/lib.runtime-sandbox";
|
|
2
|
+
|
|
3
|
+
//#region src/handlers/integration.handlers.d.ts
|
|
4
|
+
|
|
5
|
+
interface Integration {
|
|
6
|
+
id: string;
|
|
7
|
+
projectId: string;
|
|
8
|
+
organizationId: string;
|
|
9
|
+
name: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
type: 'CRM' | 'MARKETING' | 'PAYMENT' | 'COMMUNICATION' | 'DATA' | 'CUSTOM';
|
|
12
|
+
status: 'ACTIVE' | 'INACTIVE';
|
|
13
|
+
iconUrl?: string;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
}
|
|
17
|
+
interface Connection {
|
|
18
|
+
id: string;
|
|
19
|
+
integrationId: string;
|
|
20
|
+
name: string;
|
|
21
|
+
status: 'CONNECTED' | 'DISCONNECTED' | 'ERROR' | 'PENDING';
|
|
22
|
+
credentials?: Record<string, unknown>;
|
|
23
|
+
config?: Record<string, unknown>;
|
|
24
|
+
lastSyncAt?: Date;
|
|
25
|
+
errorMessage?: string;
|
|
26
|
+
createdAt: Date;
|
|
27
|
+
updatedAt: Date;
|
|
28
|
+
}
|
|
29
|
+
interface SyncConfig {
|
|
30
|
+
id: string;
|
|
31
|
+
connectionId: string;
|
|
32
|
+
name: string;
|
|
33
|
+
sourceEntity: string;
|
|
34
|
+
targetEntity: string;
|
|
35
|
+
frequency: 'REALTIME' | 'HOURLY' | 'DAILY' | 'WEEKLY' | 'MANUAL';
|
|
36
|
+
status: 'ACTIVE' | 'PAUSED' | 'ERROR';
|
|
37
|
+
lastRunAt?: Date;
|
|
38
|
+
lastRunStatus?: 'SUCCESS' | 'FAILED' | 'PARTIAL';
|
|
39
|
+
recordsSynced: number;
|
|
40
|
+
createdAt: Date;
|
|
41
|
+
updatedAt: Date;
|
|
42
|
+
}
|
|
43
|
+
interface FieldMapping {
|
|
44
|
+
id: string;
|
|
45
|
+
syncConfigId: string;
|
|
46
|
+
sourceField: string;
|
|
47
|
+
targetField: string;
|
|
48
|
+
transformType?: 'DIRECT' | 'FORMAT' | 'LOOKUP' | 'CUSTOM';
|
|
49
|
+
transformConfig?: Record<string, unknown>;
|
|
50
|
+
createdAt: Date;
|
|
51
|
+
}
|
|
52
|
+
interface CreateIntegrationInput {
|
|
53
|
+
name: string;
|
|
54
|
+
description?: string;
|
|
55
|
+
type: Integration['type'];
|
|
56
|
+
iconUrl?: string;
|
|
57
|
+
}
|
|
58
|
+
interface ConnectServiceInput {
|
|
59
|
+
integrationId: string;
|
|
60
|
+
name: string;
|
|
61
|
+
credentials?: Record<string, unknown>;
|
|
62
|
+
config?: Record<string, unknown>;
|
|
63
|
+
}
|
|
64
|
+
interface ConfigureSyncInput {
|
|
65
|
+
connectionId: string;
|
|
66
|
+
name: string;
|
|
67
|
+
sourceEntity: string;
|
|
68
|
+
targetEntity: string;
|
|
69
|
+
frequency?: SyncConfig['frequency'];
|
|
70
|
+
}
|
|
71
|
+
interface MapFieldsInput {
|
|
72
|
+
syncConfigId: string;
|
|
73
|
+
mappings: {
|
|
74
|
+
sourceField: string;
|
|
75
|
+
targetField: string;
|
|
76
|
+
transformType?: FieldMapping['transformType'];
|
|
77
|
+
transformConfig?: Record<string, unknown>;
|
|
78
|
+
}[];
|
|
79
|
+
}
|
|
80
|
+
interface ListIntegrationsInput {
|
|
81
|
+
projectId: string;
|
|
82
|
+
type?: Integration['type'] | 'all';
|
|
83
|
+
status?: 'ACTIVE' | 'INACTIVE' | 'all';
|
|
84
|
+
search?: string;
|
|
85
|
+
limit?: number;
|
|
86
|
+
offset?: number;
|
|
87
|
+
}
|
|
88
|
+
interface ListIntegrationsOutput {
|
|
89
|
+
integrations: Integration[];
|
|
90
|
+
total: number;
|
|
91
|
+
}
|
|
92
|
+
interface ListConnectionsInput {
|
|
93
|
+
integrationId?: string;
|
|
94
|
+
status?: Connection['status'] | 'all';
|
|
95
|
+
limit?: number;
|
|
96
|
+
offset?: number;
|
|
97
|
+
}
|
|
98
|
+
interface ListConnectionsOutput {
|
|
99
|
+
connections: Connection[];
|
|
100
|
+
total: number;
|
|
101
|
+
}
|
|
102
|
+
interface ListSyncConfigsInput {
|
|
103
|
+
connectionId?: string;
|
|
104
|
+
status?: SyncConfig['status'] | 'all';
|
|
105
|
+
limit?: number;
|
|
106
|
+
offset?: number;
|
|
107
|
+
}
|
|
108
|
+
interface ListSyncConfigsOutput {
|
|
109
|
+
configs: SyncConfig[];
|
|
110
|
+
total: number;
|
|
111
|
+
}
|
|
112
|
+
declare function createIntegrationHandlers(db: DatabasePort): {
|
|
113
|
+
listIntegrations: (input: ListIntegrationsInput) => Promise<ListIntegrationsOutput>;
|
|
114
|
+
createIntegration: (input: CreateIntegrationInput, context: {
|
|
115
|
+
projectId: string;
|
|
116
|
+
organizationId: string;
|
|
117
|
+
}) => Promise<Integration>;
|
|
118
|
+
listConnections: (input: ListConnectionsInput) => Promise<ListConnectionsOutput>;
|
|
119
|
+
connectService: (input: ConnectServiceInput) => Promise<Connection>;
|
|
120
|
+
disconnectService: (connectionId: string) => Promise<Connection>;
|
|
121
|
+
listSyncConfigs: (input: ListSyncConfigsInput) => Promise<ListSyncConfigsOutput>;
|
|
122
|
+
configureSync: (input: ConfigureSyncInput) => Promise<SyncConfig>;
|
|
123
|
+
mapFields: (input: MapFieldsInput) => Promise<FieldMapping[]>;
|
|
124
|
+
getFieldMappings: (syncConfigId: string) => Promise<FieldMapping[]>;
|
|
125
|
+
runSync: (syncConfigId: string) => Promise<SyncConfig>;
|
|
126
|
+
};
|
|
127
|
+
type IntegrationHandlers = ReturnType<typeof createIntegrationHandlers>;
|
|
128
|
+
//#endregion
|
|
129
|
+
export { ConfigureSyncInput, ConnectServiceInput, Connection, CreateIntegrationInput, FieldMapping, Integration, IntegrationHandlers, ListConnectionsInput, ListConnectionsOutput, ListIntegrationsInput, ListIntegrationsOutput, ListSyncConfigsInput, ListSyncConfigsOutput, MapFieldsInput, SyncConfig, createIntegrationHandlers };
|
|
130
|
+
//# sourceMappingURL=integration.handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration.handlers.d.ts","names":[],"sources":["../../src/handlers/integration.handlers.ts"],"sourcesContent":[],"mappings":";;;;AA+BW,UAnBM,WAAA,CAmBN;EACI,EAAA,EAAA,MAAA;EAEF,SAAA,EAAA,MAAA;EACA,cAAA,EAAA,MAAA;EAAI,IAAA,EAAA,MAAA;EAGA,WAAA,CAAA,EAAU,MAAA;EAQb,IAAA,EAAA,KAAA,GAAA,WAAA,GAAA,SAAA,GAAA,eAAA,GAAA,MAAA,GAAA,QAAA;EAGD,MAAA,EAAA,QAAA,GAAA,UAAA;EACA,OAAA,CAAA,EAAA,MAAA;EAAI,SAAA,EA7BJ,IA6BI;EAGA,SAAA,EA/BJ,IA+BgB;AAU7B;AAOiB,UA7CA,UAAA,CA6CmB;EAOnB,EAAA,EAAA,MAAA;EAQA,aAAA,EAAA,MAAc;EAUd,IAAA,EAAA,MAAA;EASA,MAAA,EAAA,WAAA,GAAA,cAAsB,GACvB,OAAA,GAAW,SAAA;EAIV,WAAA,CAAA,EA/ED,MA+EC,CAAA,MAAoB,EAAA,OAE1B,CAAA;EAKM,MAAA,CAAA,EArFN,MAqFM,CAAA,MAAA,EAAqB,OAAA,CAAA;EAKrB,UAAA,CAAA,EAzFF,IAyFE;EAOA,YAAA,CAAA,EAAA,MAAA;EA2HD,SAAA,EAzNH,IAyNG;EAA8B,SAAA,EAxNjC,IAwNiC;;AAMjC,UA3NI,UAAA,CA2NJ;EAAR,EAAA,EAAA,MAAA;EA8CM,YAAA,EAAA,MAAA;EAEE,IAAA,EAAA,MAAA;EAAR,YAAA,EAAA,MAAA;EAgCM,YAAA,EAAA,MAAA;EACE,SAAA,EAAA,UAAA,GAAA,QAAA,GAAA,OAAA,GAAA,QAAA,GAAA,QAAA;EAAR,MAAA,EAAA,QAAA,GAAA,QAAA,GAAA,OAAA;EAyCM,SAAA,CAAA,EA7UG,IA6UH;EACE,aAAA,CAAA,EAAA,SAAA,GAAA,QAAA,GAAA,SAAA;EAAR,aAAA,EAAA,MAAA;EAyC6D,SAAA,EApXrD,IAoXqD;EAAR,SAAA,EAnX7C,IAmX6C;;AAsB7C,UAtYI,YAAA,CAsYJ;EAAR,EAAA,EAAA,MAAA;EAwCiC,YAAA,EAAA,MAAA;EAA6B,WAAA,EAAA,MAAA;EAAR,WAAA,EAAA,MAAA;EA+BzB,aAAA,CAAA,EAAA,QAAA,GAAA,QAAA,GAAA,QAAA,GAAA,QAAA;EAAyB,eAAA,CAAA,EAvcvC,MAucuC,CAAA,MAAA,EAAA,OAAA,CAAA;EAAR,SAAA,EAtctC,IAscsC;;AA8C9C,UAjfY,sBAAA,CAifZ;EAcmD,IAAA,EAAA,MAAA;EAAR,WAAA,CAAA,EAAA,MAAA;EAAO,IAAA,EA5f/C,WA4f+C,CAAA,MAAA,CAAA;EAgD3C,OAAA,CAAA,EAAA,MAAA;;UAxiBK,mBAAA;;;gBAGD;WACL;;UAGM,kBAAA;;;;;cAKH;;UAGG,cAAA;;;;;oBAKG;sBACE;;;UAIL,qBAAA;;SAER;;;;;;UAOQ,sBAAA;gBACD;;;UAIC,oBAAA;;WAEN;;;;UAKM,qBAAA;eACF;;;UAIE,oBAAA;;WAEN;;;;UAKM,qBAAA;WACN;;;iBA0HK,yBAAA,KAA8B;4BAKnC,0BACN,QAAQ;6BA8CF;;;QAEN,QAAQ;2BAgCF,yBACN,QAAQ;0BAyCF,wBACN,QAAQ;+CAyC6C,QAAQ;2BAqBvD,yBACN,QAAQ;yBAwCyB,uBAAqB,QAAQ;qBA+BjC,mBAAiB,QAAQ;8CA8CtD,QAAQ;qCAcmC,QAAQ;;KAgD5C,mBAAA,GAAsB,kBAAkB"}
|