@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,65 +1,65 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema166 from "@contractspec/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/integration/integration.schema.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* An integration with an external system.
|
|
6
6
|
*/
|
|
7
|
-
declare const IntegrationModel:
|
|
7
|
+
declare const IntegrationModel: _contractspec_lib_schema166.SchemaModel<{
|
|
8
8
|
id: {
|
|
9
|
-
type:
|
|
9
|
+
type: _contractspec_lib_schema166.FieldType<string, string>;
|
|
10
10
|
isOptional: false;
|
|
11
11
|
};
|
|
12
12
|
name: {
|
|
13
|
-
type:
|
|
13
|
+
type: _contractspec_lib_schema166.FieldType<string, string>;
|
|
14
14
|
isOptional: false;
|
|
15
15
|
};
|
|
16
16
|
slug: {
|
|
17
|
-
type:
|
|
17
|
+
type: _contractspec_lib_schema166.FieldType<string, string>;
|
|
18
18
|
isOptional: false;
|
|
19
19
|
};
|
|
20
20
|
description: {
|
|
21
|
-
type:
|
|
21
|
+
type: _contractspec_lib_schema166.FieldType<string, string>;
|
|
22
22
|
isOptional: true;
|
|
23
23
|
};
|
|
24
24
|
provider: {
|
|
25
|
-
type:
|
|
25
|
+
type: _contractspec_lib_schema166.FieldType<string, string>;
|
|
26
26
|
isOptional: false;
|
|
27
27
|
};
|
|
28
28
|
status: {
|
|
29
|
-
type:
|
|
29
|
+
type: _contractspec_lib_schema166.EnumType<[string, string, string, string, string]>;
|
|
30
30
|
isOptional: false;
|
|
31
31
|
};
|
|
32
32
|
createdAt: {
|
|
33
|
-
type:
|
|
33
|
+
type: _contractspec_lib_schema166.FieldType<Date, string>;
|
|
34
34
|
isOptional: false;
|
|
35
35
|
};
|
|
36
36
|
}>;
|
|
37
37
|
/**
|
|
38
38
|
* Input for creating an integration.
|
|
39
39
|
*/
|
|
40
|
-
declare const CreateIntegrationInputModel:
|
|
40
|
+
declare const CreateIntegrationInputModel: _contractspec_lib_schema166.SchemaModel<{
|
|
41
41
|
name: {
|
|
42
|
-
type:
|
|
42
|
+
type: _contractspec_lib_schema166.FieldType<string, string>;
|
|
43
43
|
isOptional: false;
|
|
44
44
|
};
|
|
45
45
|
slug: {
|
|
46
|
-
type:
|
|
46
|
+
type: _contractspec_lib_schema166.FieldType<string, string>;
|
|
47
47
|
isOptional: false;
|
|
48
48
|
};
|
|
49
49
|
description: {
|
|
50
|
-
type:
|
|
50
|
+
type: _contractspec_lib_schema166.FieldType<string, string>;
|
|
51
51
|
isOptional: true;
|
|
52
52
|
};
|
|
53
53
|
provider: {
|
|
54
|
-
type:
|
|
54
|
+
type: _contractspec_lib_schema166.FieldType<string, string>;
|
|
55
55
|
isOptional: false;
|
|
56
56
|
};
|
|
57
57
|
config: {
|
|
58
|
-
type:
|
|
58
|
+
type: _contractspec_lib_schema166.FieldType<unknown, unknown>;
|
|
59
59
|
isOptional: true;
|
|
60
60
|
};
|
|
61
61
|
featureFlagKey: {
|
|
62
|
-
type:
|
|
62
|
+
type: _contractspec_lib_schema166.FieldType<string, string>;
|
|
63
63
|
isOptional: true;
|
|
64
64
|
};
|
|
65
65
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.schema.d.ts","names":[],"sources":["../../src/integration/integration.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAMa,cAAA,gBAWX,
|
|
1
|
+
{"version":3,"file":"integration.schema.d.ts","names":[],"sources":["../../src/integration/integration.schema.ts"],"sourcesContent":[],"mappings":";;;;;;AAMa,cAAA,gBAWX,8BAX2B,WAW3B,CAAA;EAAA,EAAA,EAAA;UAAA,2BAAA,CAAA;;;;;;;;IAX2B,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAgBhB,UAAA,EAAA,KAAA;EAaX,CAAA;;;;;;+CAbsC,CAAA,MAAA,EAAA,MAAA,CAAA;IAAA,UAAA,EAAA,KAAA;;;;;;;;;;;;;;cAA3B,yDAA2B;;UAatC,2BAAA,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as _contractspec_lib_contracts11 from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/integration-hub.capability.d.ts
|
|
4
|
+
declare const IntegrationCapability: _contractspec_lib_contracts11.CapabilitySpec;
|
|
5
|
+
declare const SyncCapability: _contractspec_lib_contracts11.CapabilitySpec;
|
|
6
|
+
declare const EtlCapability: _contractspec_lib_contracts11.CapabilitySpec;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { EtlCapability, IntegrationCapability, SyncCapability };
|
|
9
|
+
//# sourceMappingURL=integration-hub.capability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-hub.capability.d.ts","names":[],"sources":["../src/integration-hub.capability.ts"],"sourcesContent":[],"mappings":";;;cAEa,uBAUX,6BAAA,CAVgC;cAYrB,gBAUX,6BAAA,CAVyB;cAYd,eAUX,6BAAA,CAVwB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { StabilityEnum, defineCapability } from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/integration-hub.capability.ts
|
|
4
|
+
const IntegrationCapability = defineCapability({ meta: {
|
|
5
|
+
key: "integration",
|
|
6
|
+
version: "1.0.0",
|
|
7
|
+
kind: "integration",
|
|
8
|
+
stability: StabilityEnum.Experimental,
|
|
9
|
+
description: "Third-party integration connections",
|
|
10
|
+
owners: ["platform.core"],
|
|
11
|
+
tags: ["integration", "connections"]
|
|
12
|
+
} });
|
|
13
|
+
const SyncCapability = defineCapability({ meta: {
|
|
14
|
+
key: "sync",
|
|
15
|
+
version: "1.0.0",
|
|
16
|
+
kind: "api",
|
|
17
|
+
stability: StabilityEnum.Experimental,
|
|
18
|
+
description: "Data synchronization between systems",
|
|
19
|
+
owners: ["platform.core"],
|
|
20
|
+
tags: ["sync", "data"]
|
|
21
|
+
} });
|
|
22
|
+
const EtlCapability = defineCapability({ meta: {
|
|
23
|
+
key: "etl",
|
|
24
|
+
version: "1.0.0",
|
|
25
|
+
kind: "api",
|
|
26
|
+
stability: StabilityEnum.Experimental,
|
|
27
|
+
description: "Extract, transform, load data pipelines",
|
|
28
|
+
owners: ["platform.core"],
|
|
29
|
+
tags: [
|
|
30
|
+
"etl",
|
|
31
|
+
"data",
|
|
32
|
+
"pipeline"
|
|
33
|
+
]
|
|
34
|
+
} });
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { EtlCapability, IntegrationCapability, SyncCapability };
|
|
38
|
+
//# sourceMappingURL=integration-hub.capability.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-hub.capability.js","names":[],"sources":["../src/integration-hub.capability.ts"],"sourcesContent":["import { defineCapability, StabilityEnum } from '@contractspec/lib.contracts';\n\nexport const IntegrationCapability = defineCapability({\n meta: {\n key: 'integration',\n version: '1.0.0',\n kind: 'integration',\n stability: StabilityEnum.Experimental,\n description: 'Third-party integration connections',\n owners: ['platform.core'],\n tags: ['integration', 'connections'],\n },\n});\n\nexport const SyncCapability = defineCapability({\n meta: {\n key: 'sync',\n version: '1.0.0',\n kind: 'api',\n stability: StabilityEnum.Experimental,\n description: 'Data synchronization between systems',\n owners: ['platform.core'],\n tags: ['sync', 'data'],\n },\n});\n\nexport const EtlCapability = defineCapability({\n meta: {\n key: 'etl',\n version: '1.0.0',\n kind: 'api',\n stability: StabilityEnum.Experimental,\n description: 'Extract, transform, load data pipelines',\n owners: ['platform.core'],\n tags: ['etl', 'data', 'pipeline'],\n },\n});\n"],"mappings":";;;AAEA,MAAa,wBAAwB,iBAAiB,EACpD,MAAM;CACJ,KAAK;CACL,SAAS;CACT,MAAM;CACN,WAAW,cAAc;CACzB,aAAa;CACb,QAAQ,CAAC,gBAAgB;CACzB,MAAM,CAAC,eAAe,cAAc;CACrC,EACF,CAAC;AAEF,MAAa,iBAAiB,iBAAiB,EAC7C,MAAM;CACJ,KAAK;CACL,SAAS;CACT,MAAM;CACN,WAAW,cAAc;CACzB,aAAa;CACb,QAAQ,CAAC,gBAAgB;CACzB,MAAM,CAAC,QAAQ,OAAO;CACvB,EACF,CAAC;AAEF,MAAa,gBAAgB,iBAAiB,EAC5C,MAAM;CACJ,KAAK;CACL,SAAS;CACT,MAAM;CACN,WAAW,cAAc;CACzB,aAAa;CACb,QAAQ,CAAC,gBAAgB;CACzB,MAAM;EAAC;EAAO;EAAQ;EAAW;CAClC,EACF,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as _contractspec_lib_contracts14 from "@contractspec/lib.contracts";
|
|
2
2
|
|
|
3
3
|
//#region src/integration-hub.feature.d.ts
|
|
4
|
-
|
|
5
|
-
declare const IntegrationHubFeature: FeatureModuleSpec;
|
|
4
|
+
declare const IntegrationHubFeature: _contractspec_lib_contracts14.FeatureModuleSpec;
|
|
6
5
|
//#endregion
|
|
7
6
|
export { IntegrationHubFeature };
|
|
8
7
|
//# sourceMappingURL=integration-hub.feature.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-hub.feature.d.ts","names":[],"sources":["../src/integration-hub.feature.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integration-hub.feature.d.ts","names":[],"sources":["../src/integration-hub.feature.ts"],"sourcesContent":[],"mappings":";;;cAKa,uBAmHX,6BAAA,CAnHgC"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import { defineFeature } from "@contractspec/lib.contracts";
|
|
2
|
+
|
|
1
3
|
//#region src/integration-hub.feature.ts
|
|
2
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Integration Hub Feature Module Specification
|
|
6
|
+
*/
|
|
7
|
+
const IntegrationHubFeature = defineFeature({
|
|
3
8
|
meta: {
|
|
4
9
|
key: "integration-hub",
|
|
5
10
|
version: "1.0.0",
|
|
@@ -232,7 +237,7 @@ const IntegrationHubFeature = {
|
|
|
232
237
|
}
|
|
233
238
|
]
|
|
234
239
|
}
|
|
235
|
-
};
|
|
240
|
+
});
|
|
236
241
|
|
|
237
242
|
//#endregion
|
|
238
243
|
export { IntegrationHubFeature };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-hub.feature.js","names":[
|
|
1
|
+
{"version":3,"file":"integration-hub.feature.js","names":[],"sources":["../src/integration-hub.feature.ts"],"sourcesContent":["/**\n * Integration Hub Feature Module Specification\n */\nimport { defineFeature } from '@contractspec/lib.contracts';\n\nexport const IntegrationHubFeature = defineFeature({\n meta: {\n key: 'integration-hub',\n version: '1.0.0',\n title: 'Integration Hub',\n description:\n 'Connect and sync data with external systems through configurable integrations',\n domain: 'integration',\n owners: ['@integration-team'],\n tags: ['integration', 'sync', 'etl', 'connectors'],\n stability: 'experimental',\n },\n\n operations: [\n { key: 'integration.create', version: '1.0.0' },\n { key: 'integration.connection.create', version: '1.0.0' },\n { key: 'integration.syncConfig.create', version: '1.0.0' },\n { key: 'integration.fieldMapping.add', version: '1.0.0' },\n { key: 'integration.sync.trigger', version: '1.0.0' },\n { key: 'integration.syncRun.list', version: '1.0.0' },\n ],\n\n events: [\n { key: 'integration.created', version: '1.0.0' },\n { key: 'integration.connection.created', version: '1.0.0' },\n { key: 'integration.connection.statusChanged', version: '1.0.0' },\n { key: 'integration.syncConfig.created', version: '1.0.0' },\n { key: 'integration.sync.started', version: '1.0.0' },\n { key: 'integration.sync.completed', version: '1.0.0' },\n { key: 'integration.sync.failed', version: '1.0.0' },\n { key: 'integration.record.synced', version: '1.0.0' },\n { key: 'integration.fieldMapping.added', version: '1.0.0' },\n ],\n\n presentations: [\n { key: 'integration.list', version: '1.0.0' },\n { key: 'integration.detail', version: '1.0.0' },\n { key: 'integration.connection.list', version: '1.0.0' },\n { key: 'integration.connection.setup', version: '1.0.0' },\n { key: 'integration.syncConfig.list', version: '1.0.0' },\n { key: 'integration.syncConfig.editor', version: '1.0.0' },\n { key: 'integration.fieldMapping.editor', version: '1.0.0' },\n { key: 'integration.syncRun.list', version: '1.0.0' },\n { key: 'integration.syncRun.detail', version: '1.0.0' },\n { key: 'integration.health', version: '1.0.0' },\n { key: 'integration.sync.activity', version: '1.0.0' },\n ],\n\n opToPresentation: [\n {\n op: { key: 'integration.syncConfig.create', version: '1.0.0' },\n pres: { key: 'integration.syncConfig.editor', version: '1.0.0' },\n },\n {\n op: { key: 'integration.fieldMapping.add', version: '1.0.0' },\n pres: { key: 'integration.fieldMapping.editor', version: '1.0.0' },\n },\n {\n op: { key: 'integration.syncRun.list', version: '1.0.0' },\n pres: { key: 'integration.syncRun.list', version: '1.0.0' },\n },\n ],\n\n presentationsTargets: [\n {\n key: 'integration.list',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'integration.detail',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'integration.syncConfig.list',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'integration.syncConfig.editor',\n version: '1.0.0',\n targets: ['react'],\n },\n {\n key: 'integration.fieldMapping.editor',\n version: '1.0.0',\n targets: ['react'],\n },\n {\n key: 'integration.syncRun.list',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n {\n key: 'integration.syncRun.detail',\n version: '1.0.0',\n targets: ['react', 'markdown'],\n },\n ],\n\n capabilities: {\n requires: [\n { key: 'identity', version: '1.0.0' },\n { key: 'audit-trail', version: '1.0.0' },\n { key: 'feature-flags', version: '1.0.0' },\n { key: 'jobs', version: '1.0.0' },\n { key: 'files', version: '1.0.0' },\n ],\n provides: [\n { key: 'integration', version: '1.0.0' },\n { key: 'sync', version: '1.0.0' },\n { key: 'etl', version: '1.0.0' },\n ],\n },\n});\n"],"mappings":"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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DatabasePort } from "@contractspec/lib.runtime-sandbox";
|
|
2
|
+
|
|
3
|
+
//#region src/seeders/index.d.ts
|
|
4
|
+
declare function seedIntegrationHub(params: {
|
|
5
|
+
projectId: string;
|
|
6
|
+
db: DatabasePort;
|
|
7
|
+
}): Promise<void>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { seedIntegrationHub };
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/seeders/index.ts"],"sourcesContent":[],"mappings":";;;iBAEsB,kBAAA;;EAAA,EAAA,EAEhB,YAFgB;IAGrB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/seeders/index.ts
|
|
2
|
+
async function seedIntegrationHub(params) {
|
|
3
|
+
const { projectId, db } = params;
|
|
4
|
+
if ((await db.query(`SELECT COUNT(*) as count FROM integration WHERE "projectId" = $1`, [projectId])).rows[0]?.count > 0) return;
|
|
5
|
+
await db.execute(`INSERT INTO integration (id, "projectId", "organizationId", name, description, type, status)
|
|
6
|
+
VALUES ($1, $2, $3, $4, $5, $6, $7)`, [
|
|
7
|
+
"int_1",
|
|
8
|
+
projectId,
|
|
9
|
+
"org_demo",
|
|
10
|
+
"Salesforce",
|
|
11
|
+
"Salesforce CRM integration",
|
|
12
|
+
"CRM",
|
|
13
|
+
"ACTIVE"
|
|
14
|
+
]);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { seedIntegrationHub };
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/seeders/index.ts"],"sourcesContent":["import type { DatabasePort } from '@contractspec/lib.runtime-sandbox';\n\nexport async function seedIntegrationHub(params: {\n projectId: string;\n db: DatabasePort;\n}) {\n const { projectId, db } = params;\n\n const existing = await db.query(\n `SELECT COUNT(*) as count FROM integration WHERE \"projectId\" = $1`,\n [projectId]\n );\n if ((existing.rows[0]?.count as number) > 0) return;\n\n await db.execute(\n `INSERT INTO integration (id, \"projectId\", \"organizationId\", name, description, type, status)\n VALUES ($1, $2, $3, $4, $5, $6, $7)`,\n [\n 'int_1',\n projectId,\n 'org_demo',\n 'Salesforce',\n 'Salesforce CRM integration',\n 'CRM',\n 'ACTIVE',\n ]\n );\n}\n"],"mappings":";AAEA,eAAsB,mBAAmB,QAGtC;CACD,MAAM,EAAE,WAAW,OAAO;AAM1B,MAJiB,MAAM,GAAG,MACxB,oEACA,CAAC,UAAU,CACZ,EACa,KAAK,IAAI,QAAmB,EAAG;AAE7C,OAAM,GAAG,QACP;2CAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF"}
|
package/dist/sync/sync.enum.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema181 from "@contractspec/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/sync/sync.enum.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Sync direction enum.
|
|
6
6
|
*/
|
|
7
|
-
declare const SyncDirectionEnum:
|
|
7
|
+
declare const SyncDirectionEnum: _contractspec_lib_schema181.EnumType<[string, string, string]>;
|
|
8
8
|
/**
|
|
9
9
|
* Sync status enum.
|
|
10
10
|
*/
|
|
11
|
-
declare const SyncStatusEnum:
|
|
11
|
+
declare const SyncStatusEnum: _contractspec_lib_schema181.EnumType<[string, string, string, string, string]>;
|
|
12
12
|
/**
|
|
13
13
|
* Mapping type enum.
|
|
14
14
|
*/
|
|
15
|
-
declare const MappingTypeEnum:
|
|
15
|
+
declare const MappingTypeEnum: _contractspec_lib_schema181.EnumType<[string, string, string, string, string]>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { MappingTypeEnum, SyncDirectionEnum, SyncStatusEnum };
|
|
18
18
|
//# sourceMappingURL=sync.enum.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.enum.d.ts","names":[],"sources":["../../src/sync/sync.enum.ts"],"sourcesContent":[],"mappings":";;;;;;AAKa,cAAA,iBAIX,EAAA,
|
|
1
|
+
{"version":3,"file":"sync.enum.d.ts","names":[],"sources":["../../src/sync/sync.enum.ts"],"sourcesContent":[],"mappings":";;;;;;AAKa,cAAA,iBAIX,EAAA,2BAAA,CAJ4B,QAAA,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA;AAS9B;AAWA;;cAXa,gBAMX,2BAAA,CANyB;;;;cAWd,iBAMX,2BAAA,CAN0B"}
|