@membranehq/sdk 0.17.5 → 0.18.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/bundle.d.ts +21 -10
- package/dist/bundle.js +5198 -5182
- package/dist/bundle.js.map +1 -1
- package/dist/dts/accessors/action-instances-accessors.d.ts +1 -1
- package/dist/dts/accessors/actions-accessors.d.ts +1 -1
- package/dist/dts/accessors/app-data-schema-instances-accessors.d.ts +1 -1
- package/dist/dts/accessors/app-data-schemas-accessors.d.ts +1 -1
- package/dist/dts/accessors/app-event-subscriptions-accessors.d.ts +1 -1
- package/dist/dts/accessors/app-event-types-accessors.d.ts +1 -1
- package/dist/dts/accessors/connections-accessors.d.ts +5 -5
- package/dist/dts/accessors/customers-accessors.d.ts +1 -1
- package/dist/dts/accessors/data-link-table-instances-accessors.d.ts +1 -1
- package/dist/dts/accessors/data-link-tables-accessors.d.ts +1 -1
- package/dist/dts/accessors/data-sources-accessors.d.ts +1 -1
- package/dist/dts/accessors/external-event-subscriptions-accessors.d.ts +1 -1
- package/dist/dts/accessors/field-mapping-instances-accessors.d.ts +1 -1
- package/dist/dts/accessors/field-mappings-accessors.d.ts +1 -1
- package/dist/dts/accessors/flow-instances-accessors.d.ts +1 -1
- package/dist/dts/accessors/flows-accessors.d.ts +1 -1
- package/dist/dts/accessors/integrations-accessors.d.ts +5 -5
- package/dist/dts/accessors/scenarios-accessors.d.ts +1 -1
- package/dist/dts/accessors/screens-accessors.d.ts +1 -1
- package/dist/dts/agent/session.d.ts +2 -0
- package/dist/dts/alerts/utils.d.ts +1 -1
- package/dist/dts/client-tokens/types.d.ts +5 -5
- package/dist/dts/client.d.ts +1 -1
- package/dist/dts/data-filter/index.d.ts +1 -1
- package/dist/dts/formulas/base.d.ts +1 -1
- package/dist/dts/formulas/eval.d.ts +1 -1
- package/dist/dts/formulas/findAppRecordId.d.ts +1 -1
- package/dist/dts/formulas/findExternalRecordId.d.ts +1 -1
- package/dist/dts/formulas/record.d.ts +1 -1
- package/dist/dts/stats/index.d.ts +8 -5
- package/dist/dts/ui.d.ts +5 -0
- package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +3 -0
- package/dist/dts/workspace-elements/api/actions-api.d.ts +1 -1
- package/dist/dts/workspace-elements/api/connected-products-api.d.ts +2 -1
- package/dist/dts/workspace-elements/api/connections-api.d.ts +1 -1
- package/dist/dts/workspace-elements/api/data-link-table-instances-api.d.ts +1 -1
- package/dist/dts/workspace-elements/api/data-sources-api.d.ts +4 -4
- package/dist/dts/workspace-elements/api/external-api-logs-api.d.ts +2 -0
- package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +2 -0
- package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +2 -0
- package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/external-events-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/field-mapping-instances-api.d.ts +1 -1
- package/dist/dts/workspace-elements/api/field-mappings-api.d.ts +3 -3
- package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +3 -0
- package/dist/dts/workspace-elements/api/flows-api.d.ts +2 -2
- package/dist/dts/workspace-elements/api/incoming-webhooks-api.d.ts +2 -0
- package/dist/dts/workspace-elements/base/action-run-log-records/index.d.ts +1 -0
- package/dist/dts/workspace-elements/base/actions/index.d.ts +2 -2
- package/dist/dts/workspace-elements/base/connectors/auth.d.ts +1 -1
- package/dist/dts/workspace-elements/base/connectors/functions.d.ts +1 -1
- package/dist/dts/workspace-elements/base/connectors/index.d.ts +1 -0
- package/dist/dts/workspace-elements/base/connectors/operations/handlers.d.ts +1 -1
- package/dist/dts/workspace-elements/base/data-collections/data-locations/collections/events/methods.d.ts +1 -1
- package/dist/dts/workspace-elements/base/data-collections/schemas.d.ts +1 -1
- package/dist/dts/workspace-elements/base/data-collections/udm/index.d.ts +1 -1
- package/dist/dts/workspace-elements/base/data-collections/utils.d.ts +1 -1
- package/dist/dts/workspace-elements/base/external-event-log-records/index.d.ts +1 -0
- package/dist/dts/workspace-elements/base/external-event-pulls/index.d.ts +1 -0
- package/dist/dts/workspace-elements/base/flow-runs/index.d.ts +1 -0
- package/dist/dts/workspace-elements/types.d.ts +3 -0
- package/dist/dts/workspace-elements-catalog/index.d.ts +3 -0
- package/dist/dts/workspaces/compare.d.ts +1 -1
- package/dist/index.browser.d.mts +731 -694
- package/dist/index.browser.d.ts +731 -694
- package/dist/index.browser.js +1247 -1076
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +1247 -1076
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +731 -694
- package/dist/index.node.d.ts +731 -694
- package/dist/index.node.js +1247 -1076
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +1247 -1076
- package/dist/index.node.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.node.js
CHANGED
|
@@ -3496,6 +3496,8 @@ exports.WorkspaceElementType = void 0;
|
|
|
3496
3496
|
WorkspaceElementType["ExternalEventPull"] = "external-event-pull";
|
|
3497
3497
|
WorkspaceElementType["Screen"] = "screen";
|
|
3498
3498
|
WorkspaceElementType["ActionRunLogRecord"] = "action-run-log-record";
|
|
3499
|
+
WorkspaceElementType["ExternalApiLogRecord"] = "external-api-log-record";
|
|
3500
|
+
WorkspaceElementType["IncomingWebhookLogRecord"] = "incoming-webhook-log-record";
|
|
3499
3501
|
WorkspaceElementType["ConnectedProduct"] = "connected-product";
|
|
3500
3502
|
})(exports.WorkspaceElementType || (exports.WorkspaceElementType = {}));
|
|
3501
3503
|
exports.WorkspaceEventType = void 0;
|
|
@@ -3694,6 +3696,7 @@ const ActivityLogRecord = TenantLayerElement.extend({
|
|
|
3694
3696
|
id: z.z.string(),
|
|
3695
3697
|
integrationId: z.z.string().optional(),
|
|
3696
3698
|
connectionId: z.z.string().optional(),
|
|
3699
|
+
externalAppId: z.z.string().optional(),
|
|
3697
3700
|
});
|
|
3698
3701
|
const WorkspaceElementSearchQuery = z.z.object({
|
|
3699
3702
|
q: z.z.string().min(1).max(200),
|
|
@@ -4028,6 +4031,97 @@ class ConnectionSpec {
|
|
|
4028
4031
|
}
|
|
4029
4032
|
}
|
|
4030
4033
|
|
|
4034
|
+
exports.FunctionType = void 0;
|
|
4035
|
+
(function (FunctionType) {
|
|
4036
|
+
FunctionType["mapping"] = "mapping";
|
|
4037
|
+
FunctionType["operationMapping"] = "operation-mapping";
|
|
4038
|
+
FunctionType["restApiMapping"] = "rest-api-mapping";
|
|
4039
|
+
FunctionType["graphqlApiMapping"] = "graphql-api-mapping";
|
|
4040
|
+
FunctionType["javascript"] = "javascript";
|
|
4041
|
+
})(exports.FunctionType || (exports.FunctionType = {}));
|
|
4042
|
+
const BaseFunctionDefinition = z.z.object({
|
|
4043
|
+
type: z.z.enum([
|
|
4044
|
+
exports.FunctionType.mapping,
|
|
4045
|
+
exports.FunctionType.operationMapping,
|
|
4046
|
+
exports.FunctionType.restApiMapping,
|
|
4047
|
+
exports.FunctionType.graphqlApiMapping,
|
|
4048
|
+
exports.FunctionType.javascript,
|
|
4049
|
+
]),
|
|
4050
|
+
});
|
|
4051
|
+
const GenericFunctionDefinition = z.z
|
|
4052
|
+
.object({
|
|
4053
|
+
type: z.z.enum(['mapping', 'operation-mapping', 'rest-api-mapping', 'graphql-api-mapping', 'javascript']).optional(),
|
|
4054
|
+
})
|
|
4055
|
+
.loose();
|
|
4056
|
+
|
|
4057
|
+
const GraphQLFieldMappingSchema = z.z.lazy(() => z.z.object({
|
|
4058
|
+
field: z.z.string(),
|
|
4059
|
+
args: z.z.record(z.z.string(), z.z.any()).optional(),
|
|
4060
|
+
subFields: z.z.array(GraphQLFieldMappingSchema).optional(),
|
|
4061
|
+
}));
|
|
4062
|
+
const GraphQLApiMappingSchema = z.z.object({
|
|
4063
|
+
path: z.z.string(),
|
|
4064
|
+
operationType: z.z.enum(['query', 'mutation']),
|
|
4065
|
+
requestMapping: z.z.array(GraphQLFieldMappingSchema),
|
|
4066
|
+
responseMapping: z.z.any().optional(),
|
|
4067
|
+
});
|
|
4068
|
+
const GraphqlApiMappingFunction = z.z.object({
|
|
4069
|
+
type: z.z.literal(exports.FunctionType.graphqlApiMapping),
|
|
4070
|
+
mapping: GraphQLApiMappingSchema,
|
|
4071
|
+
});
|
|
4072
|
+
|
|
4073
|
+
const JavascriptFunction = z.z.object({
|
|
4074
|
+
type: z.z.literal(exports.FunctionType.javascript),
|
|
4075
|
+
code: z.z.string(),
|
|
4076
|
+
});
|
|
4077
|
+
|
|
4078
|
+
const MappingSchema = z.z.any();
|
|
4079
|
+
const MappingFunction = z.z.object({
|
|
4080
|
+
type: z.z.literal(exports.FunctionType.mapping),
|
|
4081
|
+
mapping: MappingSchema,
|
|
4082
|
+
});
|
|
4083
|
+
|
|
4084
|
+
const OperationMappingSchema = z.z.object({
|
|
4085
|
+
operationKey: z.z.string(),
|
|
4086
|
+
inputMapping: z.z.any().optional(),
|
|
4087
|
+
outputMapping: z.z.any().optional(),
|
|
4088
|
+
});
|
|
4089
|
+
const OperationMappingFunction = z.z.object({
|
|
4090
|
+
type: z.z.literal(exports.FunctionType.operationMapping),
|
|
4091
|
+
mapping: OperationMappingSchema,
|
|
4092
|
+
});
|
|
4093
|
+
|
|
4094
|
+
const RequestMappingSchema = z.z.object({
|
|
4095
|
+
pathParameters: z.z.any().optional(),
|
|
4096
|
+
query: z.z.any().optional(),
|
|
4097
|
+
data: z.z.any().optional(),
|
|
4098
|
+
headers: z.z.any().optional(),
|
|
4099
|
+
});
|
|
4100
|
+
const RestApiMappingSchema = z.z.object({
|
|
4101
|
+
path: z.z.string(),
|
|
4102
|
+
method: z.z.string(),
|
|
4103
|
+
requestMapping: RequestMappingSchema,
|
|
4104
|
+
responseMapping: z.z.any().optional(),
|
|
4105
|
+
});
|
|
4106
|
+
const OpenapiMappingSchema = z.z.object({
|
|
4107
|
+
path: z.z.string(),
|
|
4108
|
+
method: z.z.string(),
|
|
4109
|
+
requestMapping: RequestMappingSchema,
|
|
4110
|
+
responseMapping: z.z.any().optional(),
|
|
4111
|
+
});
|
|
4112
|
+
const RestApiMappingFunction = z.z.object({
|
|
4113
|
+
type: z.z.literal(exports.FunctionType.restApiMapping),
|
|
4114
|
+
mapping: RestApiMappingSchema,
|
|
4115
|
+
});
|
|
4116
|
+
|
|
4117
|
+
const FunctionDefinition = z.z.union([
|
|
4118
|
+
MappingFunction,
|
|
4119
|
+
OperationMappingFunction,
|
|
4120
|
+
RestApiMappingFunction,
|
|
4121
|
+
GraphqlApiMappingFunction,
|
|
4122
|
+
JavascriptFunction,
|
|
4123
|
+
]);
|
|
4124
|
+
|
|
4031
4125
|
exports.ConnectorMethodImplementationType = void 0;
|
|
4032
4126
|
(function (ConnectorMethodImplementationType) {
|
|
4033
4127
|
ConnectorMethodImplementationType["mapping"] = "mapping";
|
|
@@ -4424,97 +4518,6 @@ const REST_API_CLIENT_SCHEMA$1 = {
|
|
|
4424
4518
|
},
|
|
4425
4519
|
};
|
|
4426
4520
|
|
|
4427
|
-
exports.FunctionType = void 0;
|
|
4428
|
-
(function (FunctionType) {
|
|
4429
|
-
FunctionType["mapping"] = "mapping";
|
|
4430
|
-
FunctionType["operationMapping"] = "operation-mapping";
|
|
4431
|
-
FunctionType["restApiMapping"] = "rest-api-mapping";
|
|
4432
|
-
FunctionType["graphqlApiMapping"] = "graphql-api-mapping";
|
|
4433
|
-
FunctionType["javascript"] = "javascript";
|
|
4434
|
-
})(exports.FunctionType || (exports.FunctionType = {}));
|
|
4435
|
-
const BaseFunctionDefinition = z.z.object({
|
|
4436
|
-
type: z.z.enum([
|
|
4437
|
-
exports.FunctionType.mapping,
|
|
4438
|
-
exports.FunctionType.operationMapping,
|
|
4439
|
-
exports.FunctionType.restApiMapping,
|
|
4440
|
-
exports.FunctionType.graphqlApiMapping,
|
|
4441
|
-
exports.FunctionType.javascript,
|
|
4442
|
-
]),
|
|
4443
|
-
});
|
|
4444
|
-
const GenericFunctionDefinition = z.z
|
|
4445
|
-
.object({
|
|
4446
|
-
type: z.z.enum(['mapping', 'operation-mapping', 'rest-api-mapping', 'graphql-api-mapping', 'javascript']).optional(),
|
|
4447
|
-
})
|
|
4448
|
-
.loose();
|
|
4449
|
-
|
|
4450
|
-
const GraphQLFieldMappingSchema = z.z.lazy(() => z.z.object({
|
|
4451
|
-
field: z.z.string(),
|
|
4452
|
-
args: z.z.record(z.z.string(), z.z.any()).optional(),
|
|
4453
|
-
subFields: z.z.array(GraphQLFieldMappingSchema).optional(),
|
|
4454
|
-
}));
|
|
4455
|
-
const GraphQLApiMappingSchema = z.z.object({
|
|
4456
|
-
path: z.z.string(),
|
|
4457
|
-
operationType: z.z.enum(['query', 'mutation']),
|
|
4458
|
-
requestMapping: z.z.array(GraphQLFieldMappingSchema),
|
|
4459
|
-
responseMapping: z.z.any().optional(),
|
|
4460
|
-
});
|
|
4461
|
-
const GraphqlApiMappingFunction = z.z.object({
|
|
4462
|
-
type: z.z.literal(exports.FunctionType.graphqlApiMapping),
|
|
4463
|
-
mapping: GraphQLApiMappingSchema,
|
|
4464
|
-
});
|
|
4465
|
-
|
|
4466
|
-
const JavascriptFunction = z.z.object({
|
|
4467
|
-
type: z.z.literal(exports.FunctionType.javascript),
|
|
4468
|
-
code: z.z.string(),
|
|
4469
|
-
});
|
|
4470
|
-
|
|
4471
|
-
const MappingSchema = z.z.any();
|
|
4472
|
-
const MappingFunction = z.z.object({
|
|
4473
|
-
type: z.z.literal(exports.FunctionType.mapping),
|
|
4474
|
-
mapping: MappingSchema,
|
|
4475
|
-
});
|
|
4476
|
-
|
|
4477
|
-
const OperationMappingSchema = z.z.object({
|
|
4478
|
-
operationKey: z.z.string(),
|
|
4479
|
-
inputMapping: z.z.any().optional(),
|
|
4480
|
-
outputMapping: z.z.any().optional(),
|
|
4481
|
-
});
|
|
4482
|
-
const OperationMappingFunction = z.z.object({
|
|
4483
|
-
type: z.z.literal(exports.FunctionType.operationMapping),
|
|
4484
|
-
mapping: OperationMappingSchema,
|
|
4485
|
-
});
|
|
4486
|
-
|
|
4487
|
-
const RequestMappingSchema = z.z.object({
|
|
4488
|
-
pathParameters: z.z.any().optional(),
|
|
4489
|
-
query: z.z.any().optional(),
|
|
4490
|
-
data: z.z.any().optional(),
|
|
4491
|
-
headers: z.z.any().optional(),
|
|
4492
|
-
});
|
|
4493
|
-
const RestApiMappingSchema = z.z.object({
|
|
4494
|
-
path: z.z.string(),
|
|
4495
|
-
method: z.z.string(),
|
|
4496
|
-
requestMapping: RequestMappingSchema,
|
|
4497
|
-
responseMapping: z.z.any().optional(),
|
|
4498
|
-
});
|
|
4499
|
-
const OpenapiMappingSchema = z.z.object({
|
|
4500
|
-
path: z.z.string(),
|
|
4501
|
-
method: z.z.string(),
|
|
4502
|
-
requestMapping: RequestMappingSchema,
|
|
4503
|
-
responseMapping: z.z.any().optional(),
|
|
4504
|
-
});
|
|
4505
|
-
const RestApiMappingFunction = z.z.object({
|
|
4506
|
-
type: z.z.literal(exports.FunctionType.restApiMapping),
|
|
4507
|
-
mapping: RestApiMappingSchema,
|
|
4508
|
-
});
|
|
4509
|
-
|
|
4510
|
-
const FunctionDefinition = z.z.union([
|
|
4511
|
-
MappingFunction,
|
|
4512
|
-
OperationMappingFunction,
|
|
4513
|
-
RestApiMappingFunction,
|
|
4514
|
-
GraphqlApiMappingFunction,
|
|
4515
|
-
JavascriptFunction,
|
|
4516
|
-
]);
|
|
4517
|
-
|
|
4518
4521
|
const CONNECTOR_DATA_DIR = 'data';
|
|
4519
4522
|
const CONNECTOR_OPERATIONS_DIR = 'operations';
|
|
4520
4523
|
const CONNECTOR_DOCS_DIR = 'docs';
|
|
@@ -4690,369 +4693,528 @@ exports.DataCollectionEventType = void 0;
|
|
|
4690
4693
|
DataCollectionEventType["DELETED"] = "deleted";
|
|
4691
4694
|
})(exports.DataCollectionEventType || (exports.DataCollectionEventType = {}));
|
|
4692
4695
|
|
|
4693
|
-
const
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
];
|
|
4696
|
+
const structuredClone$1 = (structuredClonePolyfill === null || structuredClonePolyfill === void 0 ? void 0 : structuredClonePolyfill.default) || structuredClonePolyfill;
|
|
4697
|
+
function isNil(value) {
|
|
4698
|
+
return value == null;
|
|
4699
|
+
}
|
|
4700
|
+
function omitBy(obj, check) {
|
|
4701
|
+
obj = { ...obj };
|
|
4702
|
+
Object.entries(obj).forEach(([key, value]) => check(value) && delete obj[key]);
|
|
4703
|
+
return obj;
|
|
4704
|
+
}
|
|
4705
|
+
function isEmptyValue(value) {
|
|
4706
|
+
if (isNil(value)) {
|
|
4707
|
+
return true;
|
|
4708
|
+
}
|
|
4709
|
+
if (typeof value === 'symbol') {
|
|
4710
|
+
return true;
|
|
4711
|
+
}
|
|
4712
|
+
if (typeof value === 'boolean') {
|
|
4713
|
+
return false;
|
|
4714
|
+
}
|
|
4715
|
+
if (typeof value === 'number') {
|
|
4716
|
+
return isNaN(value);
|
|
4717
|
+
}
|
|
4718
|
+
if (typeof value === 'string') {
|
|
4719
|
+
return value.trim().length === 0;
|
|
4720
|
+
}
|
|
4721
|
+
const tag = value.toString();
|
|
4722
|
+
if (tag === '[object Map]' || tag === '[object Set]') {
|
|
4723
|
+
return !value.size;
|
|
4724
|
+
}
|
|
4725
|
+
return typeof value === 'object' && Object.keys(value).length === 0;
|
|
4726
|
+
}
|
|
4727
|
+
const simpleUniqueId = () => {
|
|
4728
|
+
return Math.floor(Math.random() * Number.MAX_SAFE_INTEGER)
|
|
4729
|
+
.toString(36)
|
|
4730
|
+
.padStart(11, '0')
|
|
4731
|
+
.substring(0, 11);
|
|
4732
|
+
};
|
|
4700
4733
|
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
}
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4734
|
+
function getDataLocationMethodPath(locationKey, methodKey) {
|
|
4735
|
+
return `data/${locationKey}/${jsConvertCase.toKebabCase(methodKey)}`;
|
|
4736
|
+
}
|
|
4737
|
+
function dataLocationParametersMatch({ locationParameters, targetParameters, }) {
|
|
4738
|
+
targetParameters = typeof targetParameters === 'object' && targetParameters ? targetParameters : {};
|
|
4739
|
+
locationParameters = typeof locationParameters === 'object' && locationParameters ? locationParameters : {};
|
|
4740
|
+
for (const [key, value] of Object.entries(targetParameters)) {
|
|
4741
|
+
if (locationParameters[key] !== value) {
|
|
4742
|
+
return false;
|
|
4743
|
+
}
|
|
4744
|
+
}
|
|
4745
|
+
return true;
|
|
4746
|
+
}
|
|
4747
|
+
function parseDataLocationPath(path) {
|
|
4748
|
+
if (!path) {
|
|
4749
|
+
return undefined;
|
|
4750
|
+
}
|
|
4751
|
+
if (path.startsWith('/')) {
|
|
4752
|
+
path = path.slice(1);
|
|
4753
|
+
}
|
|
4754
|
+
if (!path.startsWith('data/')) {
|
|
4755
|
+
throw new Error(`Invalid data location path: ${path}. It should start with "data/"`);
|
|
4756
|
+
}
|
|
4757
|
+
path = path.slice(5);
|
|
4758
|
+
const [key, query] = path.split('?');
|
|
4759
|
+
const parameters = Object.fromEntries(new URLSearchParams(query).entries());
|
|
4760
|
+
return { key, parameters };
|
|
4761
|
+
}
|
|
4762
|
+
function makeDataLocationPath(pointer) {
|
|
4763
|
+
var _a;
|
|
4764
|
+
const normalizedPointer = normalizePointer(pointer);
|
|
4765
|
+
if (normalizedPointer === null || normalizedPointer === void 0 ? void 0 : normalizedPointer.key) {
|
|
4766
|
+
let path = `/data/${normalizedPointer.key}`;
|
|
4767
|
+
const parameters = omitBy((_a = normalizedPointer.parameters) !== null && _a !== void 0 ? _a : {}, isNil);
|
|
4768
|
+
if (Object.keys(parameters).length > 0) {
|
|
4769
|
+
path += `?${new URLSearchParams(parameters).toString()}`;
|
|
4770
|
+
}
|
|
4771
|
+
return path;
|
|
4772
|
+
}
|
|
4773
|
+
else {
|
|
4774
|
+
return undefined;
|
|
4775
|
+
}
|
|
4776
|
+
}
|
|
4777
|
+
function normalizePointer(pointer) {
|
|
4778
|
+
if (typeof pointer === 'string' && pointer.startsWith('/data/')) {
|
|
4730
4779
|
return {
|
|
4731
|
-
|
|
4732
|
-
properties: nonEmptyObjectProperties({
|
|
4733
|
-
fields: (_a = transformVariablesWith(fieldsSchema, (locator) => `fields.${locatorToField(locator)}`)) !== null && _a !== void 0 ? _a : {
|
|
4734
|
-
type: 'object',
|
|
4735
|
-
},
|
|
4736
|
-
credentials: credentialsSchema,
|
|
4737
|
-
}),
|
|
4780
|
+
key: pointer.slice(6),
|
|
4738
4781
|
};
|
|
4739
|
-
}
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4782
|
+
}
|
|
4783
|
+
return pointer;
|
|
4784
|
+
}
|
|
4785
|
+
function makeDataLocationOperationPath(collectionPath, operation) {
|
|
4786
|
+
const [path, query] = (collectionPath !== null && collectionPath !== void 0 ? collectionPath : '').split('?');
|
|
4787
|
+
return urljoin(path, operation, query ? `?${query}` : '');
|
|
4788
|
+
}
|
|
4789
|
+
function isSameDataLocation(location1, location2) {
|
|
4790
|
+
if (location1.key !== location2.key) {
|
|
4791
|
+
return false;
|
|
4792
|
+
}
|
|
4793
|
+
const cleanParameters1 = location1.parameters && Object.keys(location1.parameters).length > 0 ? location1.parameters : undefined;
|
|
4794
|
+
const cleanParameters2 = location2.parameters && Object.keys(location2.parameters).length > 0 ? location2.parameters : undefined;
|
|
4795
|
+
if (!deepEqual(cleanParameters1, cleanParameters2)) {
|
|
4796
|
+
return false;
|
|
4797
|
+
}
|
|
4798
|
+
return true;
|
|
4799
|
+
}
|
|
4800
|
+
function isDataLocationMethodSupported(location, methodKey) {
|
|
4801
|
+
var _a;
|
|
4802
|
+
const method = (_a = location === null || location === void 0 ? void 0 : location.methods) === null || _a === void 0 ? void 0 : _a[methodKey];
|
|
4803
|
+
return method && method.implementationType !== exports.ConnectorMethodImplementationType.notSupported;
|
|
4804
|
+
}
|
|
4805
|
+
function getDataCollectionCreateFields(spec) {
|
|
4806
|
+
if (!spec)
|
|
4807
|
+
return undefined;
|
|
4808
|
+
if (!spec.fieldsSchema)
|
|
4809
|
+
return undefined;
|
|
4810
|
+
if (!spec.create)
|
|
4811
|
+
return undefined;
|
|
4812
|
+
let schema = excludeReadOnlyFieldsFromSchema(spec.fieldsSchema);
|
|
4813
|
+
if (spec.create.fields) {
|
|
4814
|
+
schema = pickFieldsFromSchema(schema, spec.create.fields);
|
|
4815
|
+
}
|
|
4816
|
+
if (spec.create.excludedFields) {
|
|
4817
|
+
schema = excludeFieldsFromSchema(schema, spec.create.excludedFields);
|
|
4818
|
+
}
|
|
4819
|
+
return schema;
|
|
4820
|
+
}
|
|
4821
|
+
function getDataCollectionUpdateFields(spec) {
|
|
4822
|
+
if (!spec)
|
|
4823
|
+
return undefined;
|
|
4824
|
+
if (!spec.fieldsSchema)
|
|
4825
|
+
return undefined;
|
|
4826
|
+
if (!spec.update)
|
|
4827
|
+
return undefined;
|
|
4828
|
+
let schema = excludeReadOnlyFieldsFromSchema(spec.fieldsSchema);
|
|
4829
|
+
if (spec.update.fields) {
|
|
4830
|
+
schema = pickFieldsFromSchema(schema, spec.update.fields);
|
|
4831
|
+
}
|
|
4832
|
+
if (spec.update.excludedFields) {
|
|
4833
|
+
schema = excludeFieldsFromSchema(schema, spec.update.excludedFields);
|
|
4834
|
+
}
|
|
4835
|
+
return schema;
|
|
4836
|
+
}
|
|
4837
|
+
function getWritableFieldsSchema(spec) {
|
|
4838
|
+
if (!spec)
|
|
4839
|
+
return undefined;
|
|
4840
|
+
if (!spec.fieldsSchema)
|
|
4841
|
+
return undefined;
|
|
4842
|
+
return mergeSchemas([getDataCollectionCreateFields(spec), getDataCollectionUpdateFields(spec)]);
|
|
4843
|
+
}
|
|
4844
|
+
function getReferenceCollectionPointerForSchema(schema) {
|
|
4845
|
+
if ((schema === null || schema === void 0 ? void 0 : schema.referenceCollection) && schema.referenceCollection.key) {
|
|
4846
|
+
return schema.referenceCollection;
|
|
4847
|
+
}
|
|
4848
|
+
else if (schema === null || schema === void 0 ? void 0 : schema.referenceCollectionPath) {
|
|
4849
|
+
return parseDataLocationPath(schema.referenceCollectionPath);
|
|
4850
|
+
}
|
|
4851
|
+
else if (schema === null || schema === void 0 ? void 0 : schema.referenceCollectionUri) {
|
|
4852
|
+
return parseDataLocationPath(schema.referenceCollectionUri);
|
|
4853
|
+
}
|
|
4854
|
+
else {
|
|
4855
|
+
return undefined;
|
|
4856
|
+
}
|
|
4857
|
+
}
|
|
4858
|
+
function getReferenceCollectionPathForSchema(schema) {
|
|
4859
|
+
const pointer = getReferenceCollectionPointerForSchema(schema);
|
|
4860
|
+
return makeDataLocationPath(pointer);
|
|
4861
|
+
}
|
|
4748
4862
|
|
|
4749
|
-
const
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4863
|
+
const FIELDS_SCHEMA$G = {
|
|
4864
|
+
type: 'object',
|
|
4865
|
+
properties: {
|
|
4866
|
+
id: { type: 'string', readOnly: true },
|
|
4867
|
+
title: { type: 'string' },
|
|
4868
|
+
description: { type: 'string' },
|
|
4869
|
+
type: { type: 'string' },
|
|
4870
|
+
durationSeconds: { type: 'number' },
|
|
4871
|
+
location: { type: 'string' },
|
|
4872
|
+
isRecurrent: { type: 'boolean' },
|
|
4873
|
+
participants: {
|
|
4874
|
+
type: 'array',
|
|
4875
|
+
items: {
|
|
4876
|
+
type: 'object',
|
|
4877
|
+
properties: {
|
|
4878
|
+
userId: { type: 'string' },
|
|
4879
|
+
contactId: { type: 'string' },
|
|
4759
4880
|
},
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
}
|
|
4881
|
+
},
|
|
4882
|
+
},
|
|
4883
|
+
status: { type: 'string' },
|
|
4884
|
+
contactId: {
|
|
4885
|
+
type: 'string',
|
|
4886
|
+
referenceUdm: 'contacts',
|
|
4887
|
+
},
|
|
4888
|
+
companyId: {
|
|
4889
|
+
type: 'string',
|
|
4890
|
+
referenceUdm: 'companies',
|
|
4891
|
+
},
|
|
4892
|
+
dealId: {
|
|
4893
|
+
type: 'string',
|
|
4894
|
+
referenceUdm: 'deals',
|
|
4895
|
+
},
|
|
4896
|
+
leadId: {
|
|
4897
|
+
type: 'string',
|
|
4898
|
+
referenceUdm: 'leads',
|
|
4899
|
+
},
|
|
4900
|
+
ownerId: {
|
|
4901
|
+
type: 'string',
|
|
4902
|
+
referenceUdm: 'users',
|
|
4903
|
+
},
|
|
4904
|
+
startTime: {
|
|
4905
|
+
type: 'string',
|
|
4906
|
+
format: 'date-time',
|
|
4907
|
+
},
|
|
4908
|
+
endTime: {
|
|
4909
|
+
type: 'string',
|
|
4910
|
+
format: 'date-time',
|
|
4911
|
+
},
|
|
4912
|
+
dueTime: {
|
|
4913
|
+
type: 'string',
|
|
4914
|
+
format: 'date-time',
|
|
4915
|
+
},
|
|
4916
|
+
createdTime: {
|
|
4917
|
+
type: 'string',
|
|
4918
|
+
format: 'date-time',
|
|
4919
|
+
readOnly: true,
|
|
4920
|
+
},
|
|
4921
|
+
createdBy: {
|
|
4922
|
+
type: 'string',
|
|
4923
|
+
referenceUdm: 'users',
|
|
4924
|
+
readOnly: true,
|
|
4925
|
+
},
|
|
4926
|
+
updatedTime: {
|
|
4927
|
+
type: 'string',
|
|
4928
|
+
format: 'date-time',
|
|
4929
|
+
readOnly: true,
|
|
4930
|
+
},
|
|
4931
|
+
updatedBy: {
|
|
4932
|
+
type: 'string',
|
|
4933
|
+
referenceUdm: 'users',
|
|
4934
|
+
readOnly: true,
|
|
4935
|
+
},
|
|
4763
4936
|
},
|
|
4764
|
-
getOutputSchema: () => null,
|
|
4765
|
-
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
4766
4937
|
};
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
return {
|
|
4776
|
-
type: 'object',
|
|
4777
|
-
properties: {
|
|
4778
|
-
queryFields: {
|
|
4779
|
-
type: 'array',
|
|
4780
|
-
items: { type: 'string', enum: fields },
|
|
4781
|
-
},
|
|
4782
|
-
},
|
|
4783
|
-
};
|
|
4938
|
+
const FallbackFieldsMap = {
|
|
4939
|
+
fromActivitiesToTasks: {
|
|
4940
|
+
subject: {
|
|
4941
|
+
$var: 'title',
|
|
4942
|
+
},
|
|
4943
|
+
content: {
|
|
4944
|
+
$var: 'description',
|
|
4945
|
+
},
|
|
4784
4946
|
},
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
}),
|
|
4793
|
-
};
|
|
4794
|
-
if (queryFieldsSchema === null || queryFieldsSchema === void 0 ? void 0 : queryFieldsSchema.properties) {
|
|
4795
|
-
schema.properties = {
|
|
4796
|
-
...schema.properties,
|
|
4797
|
-
query: transformVariablesWith(queryFieldsSchema, (locator) => `query.${locatorToField(locator)}`),
|
|
4798
|
-
};
|
|
4799
|
-
}
|
|
4800
|
-
return schema;
|
|
4947
|
+
fromTasksToActivities: {
|
|
4948
|
+
title: {
|
|
4949
|
+
$var: 'subject',
|
|
4950
|
+
},
|
|
4951
|
+
description: {
|
|
4952
|
+
$var: 'content',
|
|
4953
|
+
},
|
|
4801
4954
|
},
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
}
|
|
4955
|
+
fromActivitiesToNotes: {
|
|
4956
|
+
content: {
|
|
4957
|
+
$var: 'description',
|
|
4958
|
+
},
|
|
4959
|
+
},
|
|
4960
|
+
fromNotesToActivities: {
|
|
4961
|
+
description: {
|
|
4962
|
+
$var: 'content',
|
|
4963
|
+
},
|
|
4964
|
+
},
|
|
4965
|
+
fromActivitiesToEmails: {
|
|
4966
|
+
subject: {
|
|
4967
|
+
$var: 'title',
|
|
4968
|
+
},
|
|
4969
|
+
body: {
|
|
4970
|
+
$var: 'description',
|
|
4971
|
+
},
|
|
4972
|
+
},
|
|
4973
|
+
fromEmailsToActivities: {
|
|
4974
|
+
title: {
|
|
4975
|
+
$var: 'subject',
|
|
4976
|
+
},
|
|
4977
|
+
description: {
|
|
4978
|
+
$var: 'body',
|
|
4979
|
+
},
|
|
4816
4980
|
},
|
|
4817
|
-
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
4818
4981
|
};
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
properties: nonEmptyObjectProperties({
|
|
4826
|
-
id: {
|
|
4827
|
-
type: 'string',
|
|
4828
|
-
referenceCollection: { key: collectionHandler === null || collectionHandler === void 0 ? void 0 : collectionHandler.key, parameters },
|
|
4829
|
-
},
|
|
4830
|
-
credentials: credentialsSchema,
|
|
4831
|
-
}),
|
|
4832
|
-
}),
|
|
4833
|
-
getOutputSchema: ({ collectionSpec }) => {
|
|
4834
|
-
var _a;
|
|
4835
|
-
return ({
|
|
4836
|
-
type: 'object',
|
|
4837
|
-
properties: {
|
|
4838
|
-
record: (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) !== null && _a !== void 0 ? _a : { type: 'object' },
|
|
4839
|
-
},
|
|
4840
|
-
});
|
|
4982
|
+
const udm$G = {
|
|
4983
|
+
singularName: 'activity',
|
|
4984
|
+
pluralName: 'activities',
|
|
4985
|
+
fieldsSchema: FIELDS_SCHEMA$G,
|
|
4986
|
+
list: {
|
|
4987
|
+
filterFields: ['type', 'companyId', 'contactId', 'dealId', 'leadId', 'ownerId'],
|
|
4841
4988
|
},
|
|
4842
|
-
|
|
4989
|
+
match: {
|
|
4990
|
+
fields: ['type', 'companyId', 'contactId', 'dealId', 'leadId', 'ownerId'],
|
|
4991
|
+
},
|
|
4992
|
+
populateFields,
|
|
4993
|
+
udmFallbacks: [
|
|
4994
|
+
{
|
|
4995
|
+
udm: 'tasks',
|
|
4996
|
+
importFields: FallbackFieldsMap.fromTasksToActivities,
|
|
4997
|
+
exportFields: FallbackFieldsMap.fromActivitiesToTasks,
|
|
4998
|
+
},
|
|
4999
|
+
{
|
|
5000
|
+
udm: 'meetings',
|
|
5001
|
+
},
|
|
5002
|
+
{
|
|
5003
|
+
udm: 'notes',
|
|
5004
|
+
importFields: FallbackFieldsMap.fromNotesToActivities,
|
|
5005
|
+
exportFields: FallbackFieldsMap.fromActivitiesToNotes,
|
|
5006
|
+
},
|
|
5007
|
+
{
|
|
5008
|
+
udm: 'emails',
|
|
5009
|
+
importFields: FallbackFieldsMap.fromEmailsToActivities,
|
|
5010
|
+
exportFields: FallbackFieldsMap.fromActivitiesToEmails,
|
|
5011
|
+
},
|
|
5012
|
+
],
|
|
4843
5013
|
};
|
|
5014
|
+
function populateFields(fields) {
|
|
5015
|
+
const result = JSON.parse(JSON.stringify(fields));
|
|
5016
|
+
if (!result.dueTime) {
|
|
5017
|
+
result.dueTime = result.endTime || result.startTime;
|
|
5018
|
+
}
|
|
5019
|
+
if (!result.startTime) {
|
|
5020
|
+
result.startTime = result.dueTime || result.endTime;
|
|
5021
|
+
}
|
|
5022
|
+
if (!result.endTime) {
|
|
5023
|
+
result.endTime = result.dueTime || result.startTime;
|
|
5024
|
+
}
|
|
5025
|
+
return result;
|
|
5026
|
+
}
|
|
4844
5027
|
|
|
4845
|
-
const
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
5028
|
+
const FIELDS_SCHEMA$F = {
|
|
5029
|
+
type: 'object',
|
|
5030
|
+
properties: {
|
|
5031
|
+
id: { type: 'string', readOnly: true },
|
|
5032
|
+
number: { type: 'string' },
|
|
5033
|
+
name: { type: 'string' },
|
|
5034
|
+
memo: { type: 'string' },
|
|
5035
|
+
status: { type: 'string' },
|
|
5036
|
+
paymentMethod: { type: 'string' },
|
|
5037
|
+
supplierId: { type: 'string', referenceUdm: 'suppliers' },
|
|
5038
|
+
currency: { type: 'string' },
|
|
5039
|
+
payments: {
|
|
5040
|
+
type: 'array',
|
|
5041
|
+
items: {
|
|
5042
|
+
type: 'string',
|
|
5043
|
+
referenceUdm: 'payments',
|
|
5044
|
+
},
|
|
5045
|
+
},
|
|
5046
|
+
lineItems: {
|
|
5047
|
+
type: 'array',
|
|
5048
|
+
items: {
|
|
5049
|
+
type: 'object',
|
|
5050
|
+
properties: {
|
|
5051
|
+
id: { type: 'string' },
|
|
5052
|
+
itemName: { type: 'string' },
|
|
5053
|
+
description: { type: 'string' },
|
|
5054
|
+
code: { type: 'string' },
|
|
5055
|
+
type: { type: 'string' },
|
|
5056
|
+
companyId: { type: 'string', referenceUdm: 'companies' },
|
|
5057
|
+
ledgerAccountId: { type: 'string', referenceUdm: 'ledger-accounts' },
|
|
5058
|
+
quantity: { type: 'number' },
|
|
5059
|
+
unitPrice: { type: 'number' },
|
|
5060
|
+
unitOfMeasure: { type: 'string' },
|
|
5061
|
+
purchasePrice: { type: 'number' },
|
|
5062
|
+
salesPrice: { type: 'number' },
|
|
5063
|
+
taxable: { type: 'boolean' },
|
|
5064
|
+
taxAmount: { type: 'number' },
|
|
5065
|
+
totalAmount: { type: 'number' },
|
|
4857
5066
|
},
|
|
4858
5067
|
},
|
|
4859
|
-
}
|
|
5068
|
+
},
|
|
5069
|
+
totalAmount: { type: 'number' },
|
|
5070
|
+
totalTax: { type: 'number' },
|
|
5071
|
+
exchangeRate: { type: 'number' },
|
|
5072
|
+
totalDiscount: { type: 'number' },
|
|
5073
|
+
subTotal: { type: 'number' },
|
|
5074
|
+
balance: { type: 'number' },
|
|
5075
|
+
ledgerAccountId: { type: 'string', referenceUdm: 'ledger-accounts' },
|
|
5076
|
+
issueDate: {
|
|
5077
|
+
type: 'string',
|
|
5078
|
+
format: 'date-time',
|
|
5079
|
+
},
|
|
5080
|
+
dueDate: {
|
|
5081
|
+
type: 'string',
|
|
5082
|
+
format: 'date-time',
|
|
5083
|
+
},
|
|
5084
|
+
paidOnDate: {
|
|
5085
|
+
type: 'string',
|
|
5086
|
+
format: 'date-time',
|
|
5087
|
+
},
|
|
5088
|
+
createdTime: { type: 'string', format: 'date-time', readOnly: true },
|
|
5089
|
+
createdBy: { type: 'string', referenceUdm: 'users', readOnly: true },
|
|
5090
|
+
updatedTime: { type: 'string', format: 'date-time', readOnly: true },
|
|
5091
|
+
updatedBy: { type: 'string', referenceUdm: 'users', readOnly: true },
|
|
4860
5092
|
},
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
type: 'object',
|
|
4869
|
-
properties: nonEmptyObjectProperties({
|
|
4870
|
-
filter: filterSchema,
|
|
4871
|
-
cursor: {
|
|
4872
|
-
type: 'string',
|
|
4873
|
-
description: 'Cursor returned in response to the previous "list" request',
|
|
4874
|
-
},
|
|
4875
|
-
credentials: credentialsSchema,
|
|
4876
|
-
}),
|
|
4877
|
-
};
|
|
5093
|
+
};
|
|
5094
|
+
const udm$F = {
|
|
5095
|
+
singularName: 'bill',
|
|
5096
|
+
pluralName: 'bills',
|
|
5097
|
+
fieldsSchema: FIELDS_SCHEMA$F,
|
|
5098
|
+
list: {
|
|
5099
|
+
filterFields: ['name', 'number', 'status', 'supplierId'],
|
|
4878
5100
|
},
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
return ({
|
|
4882
|
-
type: 'object',
|
|
4883
|
-
properties: {
|
|
4884
|
-
records: {
|
|
4885
|
-
type: 'array',
|
|
4886
|
-
items: (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) !== null && _a !== void 0 ? _a : { type: 'object' },
|
|
4887
|
-
},
|
|
4888
|
-
cursor: {
|
|
4889
|
-
type: 'string',
|
|
4890
|
-
description: 'Cursor to request the next page of results',
|
|
4891
|
-
},
|
|
4892
|
-
},
|
|
4893
|
-
});
|
|
5101
|
+
match: {
|
|
5102
|
+
fields: ['name', 'number', 'status', 'supplierId'],
|
|
4894
5103
|
},
|
|
4895
|
-
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
4896
5104
|
};
|
|
4897
5105
|
|
|
4898
|
-
const
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
type: '
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
}
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
}),
|
|
4946
|
-
}),
|
|
4947
|
-
getOutputSchema: ({ collectionSpec }) => {
|
|
4948
|
-
var _a;
|
|
4949
|
-
return ({
|
|
4950
|
-
type: 'object',
|
|
4951
|
-
properties: {
|
|
4952
|
-
records: {
|
|
4953
|
-
type: 'array',
|
|
4954
|
-
items: (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) !== null && _a !== void 0 ? _a : { type: 'object' },
|
|
4955
|
-
},
|
|
4956
|
-
cursor: { type: 'string' },
|
|
4957
|
-
},
|
|
4958
|
-
});
|
|
5106
|
+
const FIELDS_SCHEMA$E = {
|
|
5107
|
+
type: 'object',
|
|
5108
|
+
properties: {
|
|
5109
|
+
id: { type: 'string', readOnly: true },
|
|
5110
|
+
fullName: { type: 'string' },
|
|
5111
|
+
firstName: { type: 'string' },
|
|
5112
|
+
lastName: { type: 'string' },
|
|
5113
|
+
primaryEmail: { type: 'string' },
|
|
5114
|
+
campaignId: {
|
|
5115
|
+
type: 'string',
|
|
5116
|
+
referenceUdm: 'campaigns',
|
|
5117
|
+
},
|
|
5118
|
+
contactId: {
|
|
5119
|
+
type: 'string',
|
|
5120
|
+
referenceUdm: 'contacts',
|
|
5121
|
+
},
|
|
5122
|
+
leadId: {
|
|
5123
|
+
type: 'string',
|
|
5124
|
+
referenceUdm: 'leads',
|
|
5125
|
+
},
|
|
5126
|
+
source: { type: 'string' },
|
|
5127
|
+
status: { type: 'string' },
|
|
5128
|
+
companyId: {
|
|
5129
|
+
type: 'string',
|
|
5130
|
+
referenceUdm: 'companies',
|
|
5131
|
+
},
|
|
5132
|
+
jobTitle: { type: 'string' },
|
|
5133
|
+
hasOptedOutOfEmail: { type: 'boolean' },
|
|
5134
|
+
createdTime: {
|
|
5135
|
+
type: 'string',
|
|
5136
|
+
format: 'date-time',
|
|
5137
|
+
},
|
|
5138
|
+
createdBy: {
|
|
5139
|
+
type: 'string',
|
|
5140
|
+
readOnly: true,
|
|
5141
|
+
referenceUdm: 'users',
|
|
5142
|
+
},
|
|
5143
|
+
updatedTime: {
|
|
5144
|
+
type: 'string',
|
|
5145
|
+
readOnly: true,
|
|
5146
|
+
format: 'date-time',
|
|
5147
|
+
},
|
|
5148
|
+
updatedBy: {
|
|
5149
|
+
type: 'string',
|
|
5150
|
+
readOnly: true,
|
|
5151
|
+
referenceUdm: 'users',
|
|
5152
|
+
},
|
|
4959
5153
|
},
|
|
4960
|
-
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
4961
5154
|
};
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
type: 'array',
|
|
4978
|
-
items: { type: 'string', enum: fields },
|
|
4979
|
-
},
|
|
4980
|
-
},
|
|
4981
|
-
};
|
|
5155
|
+
const udm$E = {
|
|
5156
|
+
singularName: 'campaign-member',
|
|
5157
|
+
pluralName: 'campaign-members',
|
|
5158
|
+
fieldsSchema: FIELDS_SCHEMA$E,
|
|
5159
|
+
list: {
|
|
5160
|
+
filterFields: [
|
|
5161
|
+
'primaryEmail',
|
|
5162
|
+
'fullName',
|
|
5163
|
+
'firstName',
|
|
5164
|
+
'lastName',
|
|
5165
|
+
'campaignId',
|
|
5166
|
+
'contactId',
|
|
5167
|
+
'leadId',
|
|
5168
|
+
'companyId',
|
|
5169
|
+
],
|
|
4982
5170
|
},
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
let fieldsSchema = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema;
|
|
4986
|
-
if (method === null || method === void 0 ? void 0 : method.fields) {
|
|
4987
|
-
fieldsSchema = pickFieldsFromSchema(fieldsSchema, method.fields);
|
|
4988
|
-
}
|
|
4989
|
-
if (method === null || method === void 0 ? void 0 : method.excludedFields) {
|
|
4990
|
-
fieldsSchema = excludeFieldsFromSchema(fieldsSchema, method.excludedFields);
|
|
4991
|
-
}
|
|
4992
|
-
return {
|
|
4993
|
-
type: 'object',
|
|
4994
|
-
properties: nonEmptyObjectProperties({
|
|
4995
|
-
id: {
|
|
4996
|
-
type: 'string',
|
|
4997
|
-
referenceCollection: { key: collectionHandler === null || collectionHandler === void 0 ? void 0 : collectionHandler.key, parameters },
|
|
4998
|
-
},
|
|
4999
|
-
fields: (_a = transformVariablesWith(fieldsSchema, (locator) => `fields.${locatorToField(locator)}`)) !== null && _a !== void 0 ? _a : {
|
|
5000
|
-
type: 'object',
|
|
5001
|
-
},
|
|
5002
|
-
credentials: credentialsSchema,
|
|
5003
|
-
}),
|
|
5004
|
-
};
|
|
5171
|
+
match: {
|
|
5172
|
+
fields: ['primaryEmail', 'fullName', 'firstName', 'lastName', 'campaignId', 'contactId', 'leadId', 'companyId'],
|
|
5005
5173
|
},
|
|
5006
|
-
getOutputSchema: ({}) => ({
|
|
5007
|
-
type: 'object',
|
|
5008
|
-
properties: {
|
|
5009
|
-
id: { type: 'string' },
|
|
5010
|
-
},
|
|
5011
|
-
}),
|
|
5012
|
-
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
5013
5174
|
};
|
|
5014
5175
|
|
|
5015
|
-
const FIELDS_SCHEMA$
|
|
5176
|
+
const FIELDS_SCHEMA$D = {
|
|
5016
5177
|
type: 'object',
|
|
5017
5178
|
properties: {
|
|
5018
5179
|
id: { type: 'string', readOnly: true },
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
type: { type: 'string' },
|
|
5022
|
-
durationSeconds: { type: 'number' },
|
|
5023
|
-
location: { type: 'string' },
|
|
5024
|
-
isRecurrent: { type: 'boolean' },
|
|
5025
|
-
participants: {
|
|
5026
|
-
type: 'array',
|
|
5027
|
-
items: {
|
|
5028
|
-
type: 'object',
|
|
5029
|
-
properties: {
|
|
5030
|
-
userId: { type: 'string' },
|
|
5031
|
-
contactId: { type: 'string' },
|
|
5032
|
-
},
|
|
5033
|
-
},
|
|
5180
|
+
name: {
|
|
5181
|
+
type: 'string',
|
|
5034
5182
|
},
|
|
5035
|
-
|
|
5036
|
-
|
|
5183
|
+
cost: {
|
|
5184
|
+
type: 'number',
|
|
5185
|
+
},
|
|
5186
|
+
description: {
|
|
5037
5187
|
type: 'string',
|
|
5038
|
-
referenceUdm: 'contacts',
|
|
5039
5188
|
},
|
|
5040
|
-
|
|
5189
|
+
source: {
|
|
5041
5190
|
type: 'string',
|
|
5042
|
-
referenceUdm: 'companies',
|
|
5043
5191
|
},
|
|
5044
|
-
|
|
5192
|
+
stage: {
|
|
5045
5193
|
type: 'string',
|
|
5046
|
-
referenceUdm: 'deals',
|
|
5047
5194
|
},
|
|
5048
|
-
|
|
5195
|
+
type: {
|
|
5049
5196
|
type: 'string',
|
|
5050
|
-
referenceUdm: 'leads',
|
|
5051
5197
|
},
|
|
5052
5198
|
ownerId: {
|
|
5053
5199
|
type: 'string',
|
|
5054
5200
|
referenceUdm: 'users',
|
|
5055
5201
|
},
|
|
5202
|
+
sentCount: {
|
|
5203
|
+
type: 'number',
|
|
5204
|
+
readOnly: true,
|
|
5205
|
+
},
|
|
5206
|
+
replyCount: {
|
|
5207
|
+
type: 'number',
|
|
5208
|
+
readOnly: true,
|
|
5209
|
+
},
|
|
5210
|
+
openCount: {
|
|
5211
|
+
type: 'number',
|
|
5212
|
+
readOnly: true,
|
|
5213
|
+
},
|
|
5214
|
+
clickCount: {
|
|
5215
|
+
type: 'number',
|
|
5216
|
+
readOnly: true,
|
|
5217
|
+
},
|
|
5056
5218
|
startTime: {
|
|
5057
5219
|
type: 'string',
|
|
5058
5220
|
format: 'date-time',
|
|
@@ -5061,10 +5223,6 @@ const FIELDS_SCHEMA$G = {
|
|
|
5061
5223
|
type: 'string',
|
|
5062
5224
|
format: 'date-time',
|
|
5063
5225
|
},
|
|
5064
|
-
dueTime: {
|
|
5065
|
-
type: 'string',
|
|
5066
|
-
format: 'date-time',
|
|
5067
|
-
},
|
|
5068
5226
|
createdTime: {
|
|
5069
5227
|
type: 'string',
|
|
5070
5228
|
format: 'date-time',
|
|
@@ -5085,477 +5243,167 @@ const FIELDS_SCHEMA$G = {
|
|
|
5085
5243
|
referenceUdm: 'users',
|
|
5086
5244
|
readOnly: true,
|
|
5087
5245
|
},
|
|
5246
|
+
lastActivityTime: {
|
|
5247
|
+
type: 'string',
|
|
5248
|
+
format: 'date-time',
|
|
5249
|
+
readOnly: true,
|
|
5250
|
+
},
|
|
5088
5251
|
},
|
|
5089
5252
|
};
|
|
5090
|
-
const
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5253
|
+
const MODIFIABLE_FIELDS$2 = ['name', 'description', 'ownerId', 'startTime', 'endTime', 'cost', 'source', 'stage', 'type'];
|
|
5254
|
+
const udm$D = {
|
|
5255
|
+
singularName: 'campaign',
|
|
5256
|
+
pluralName: 'campaigns',
|
|
5257
|
+
fieldsSchema: FIELDS_SCHEMA$D,
|
|
5258
|
+
categories: ['Marketing Automation', 'Sales', 'CRM', 'Ads'],
|
|
5259
|
+
list: {
|
|
5260
|
+
filterFields: ['name', 'source', 'stage', 'type', 'ownerId'],
|
|
5098
5261
|
},
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
$var: 'subject',
|
|
5102
|
-
},
|
|
5103
|
-
description: {
|
|
5104
|
-
$var: 'content',
|
|
5105
|
-
},
|
|
5262
|
+
find: {
|
|
5263
|
+
queryFields: ['name', 'source', 'stage', 'type', 'ownerId'],
|
|
5106
5264
|
},
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
$var: 'description',
|
|
5110
|
-
},
|
|
5265
|
+
match: {
|
|
5266
|
+
fields: ['name', 'source', 'stage', 'type', 'ownerId'],
|
|
5111
5267
|
},
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
$var: 'content',
|
|
5115
|
-
},
|
|
5116
|
-
},
|
|
5117
|
-
fromActivitiesToEmails: {
|
|
5118
|
-
subject: {
|
|
5119
|
-
$var: 'title',
|
|
5120
|
-
},
|
|
5121
|
-
body: {
|
|
5122
|
-
$var: 'description',
|
|
5123
|
-
},
|
|
5268
|
+
create: {
|
|
5269
|
+
fields: MODIFIABLE_FIELDS$2,
|
|
5124
5270
|
},
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
$var: 'subject',
|
|
5128
|
-
},
|
|
5129
|
-
description: {
|
|
5130
|
-
$var: 'body',
|
|
5131
|
-
},
|
|
5271
|
+
update: {
|
|
5272
|
+
fields: MODIFIABLE_FIELDS$2,
|
|
5132
5273
|
},
|
|
5133
5274
|
};
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5275
|
+
|
|
5276
|
+
const AddressSchema = {
|
|
5277
|
+
type: 'object',
|
|
5278
|
+
properties: {
|
|
5279
|
+
type: { type: 'string' },
|
|
5280
|
+
full: { type: 'string' },
|
|
5281
|
+
street: { type: 'string' },
|
|
5282
|
+
city: { type: 'string' },
|
|
5283
|
+
state: { type: 'string' },
|
|
5284
|
+
country: { type: 'string' },
|
|
5285
|
+
zip: { type: 'string' },
|
|
5140
5286
|
},
|
|
5141
|
-
|
|
5142
|
-
|
|
5287
|
+
};
|
|
5288
|
+
const PhoneEmailSchema = {
|
|
5289
|
+
type: 'object',
|
|
5290
|
+
properties: {
|
|
5291
|
+
value: { type: 'string' },
|
|
5292
|
+
type: { type: 'string' },
|
|
5143
5293
|
},
|
|
5144
|
-
populateFields,
|
|
5145
|
-
udmFallbacks: [
|
|
5146
|
-
{
|
|
5147
|
-
udm: 'tasks',
|
|
5148
|
-
importFields: FallbackFieldsMap.fromTasksToActivities,
|
|
5149
|
-
exportFields: FallbackFieldsMap.fromActivitiesToTasks,
|
|
5150
|
-
},
|
|
5151
|
-
{
|
|
5152
|
-
udm: 'meetings',
|
|
5153
|
-
},
|
|
5154
|
-
{
|
|
5155
|
-
udm: 'notes',
|
|
5156
|
-
importFields: FallbackFieldsMap.fromNotesToActivities,
|
|
5157
|
-
exportFields: FallbackFieldsMap.fromActivitiesToNotes,
|
|
5158
|
-
},
|
|
5159
|
-
{
|
|
5160
|
-
udm: 'emails',
|
|
5161
|
-
importFields: FallbackFieldsMap.fromEmailsToActivities,
|
|
5162
|
-
exportFields: FallbackFieldsMap.fromActivitiesToEmails,
|
|
5163
|
-
},
|
|
5164
|
-
],
|
|
5165
5294
|
};
|
|
5166
|
-
function populateFields(fields) {
|
|
5167
|
-
const result = JSON.parse(JSON.stringify(fields));
|
|
5168
|
-
if (!result.dueTime) {
|
|
5169
|
-
result.dueTime = result.endTime || result.startTime;
|
|
5170
|
-
}
|
|
5171
|
-
if (!result.startTime) {
|
|
5172
|
-
result.startTime = result.dueTime || result.endTime;
|
|
5173
|
-
}
|
|
5174
|
-
if (!result.endTime) {
|
|
5175
|
-
result.endTime = result.dueTime || result.startTime;
|
|
5176
|
-
}
|
|
5177
|
-
return result;
|
|
5178
|
-
}
|
|
5179
5295
|
|
|
5180
|
-
const FIELDS_SCHEMA$
|
|
5296
|
+
const FIELDS_SCHEMA$C = {
|
|
5181
5297
|
type: 'object',
|
|
5182
5298
|
properties: {
|
|
5183
5299
|
id: { type: 'string', readOnly: true },
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
memo: { type: 'string' },
|
|
5187
|
-
status: { type: 'string' },
|
|
5188
|
-
paymentMethod: { type: 'string' },
|
|
5189
|
-
supplierId: { type: 'string', referenceUdm: 'suppliers' },
|
|
5190
|
-
currency: { type: 'string' },
|
|
5191
|
-
payments: {
|
|
5192
|
-
type: 'array',
|
|
5193
|
-
items: {
|
|
5194
|
-
type: 'string',
|
|
5195
|
-
referenceUdm: 'payments',
|
|
5196
|
-
},
|
|
5300
|
+
name: {
|
|
5301
|
+
type: 'string',
|
|
5197
5302
|
},
|
|
5198
|
-
|
|
5303
|
+
websiteUrl: {
|
|
5304
|
+
type: 'string',
|
|
5305
|
+
},
|
|
5306
|
+
phones: {
|
|
5199
5307
|
type: 'array',
|
|
5200
|
-
items:
|
|
5201
|
-
type: 'object',
|
|
5202
|
-
properties: {
|
|
5203
|
-
id: { type: 'string' },
|
|
5204
|
-
itemName: { type: 'string' },
|
|
5205
|
-
description: { type: 'string' },
|
|
5206
|
-
code: { type: 'string' },
|
|
5207
|
-
type: { type: 'string' },
|
|
5208
|
-
companyId: { type: 'string', referenceUdm: 'companies' },
|
|
5209
|
-
ledgerAccountId: { type: 'string', referenceUdm: 'ledger-accounts' },
|
|
5210
|
-
quantity: { type: 'number' },
|
|
5211
|
-
unitPrice: { type: 'number' },
|
|
5212
|
-
unitOfMeasure: { type: 'string' },
|
|
5213
|
-
purchasePrice: { type: 'number' },
|
|
5214
|
-
salesPrice: { type: 'number' },
|
|
5215
|
-
taxable: { type: 'boolean' },
|
|
5216
|
-
taxAmount: { type: 'number' },
|
|
5217
|
-
totalAmount: { type: 'number' },
|
|
5218
|
-
},
|
|
5219
|
-
},
|
|
5308
|
+
items: PhoneEmailSchema,
|
|
5220
5309
|
},
|
|
5221
|
-
|
|
5222
|
-
totalTax: { type: 'number' },
|
|
5223
|
-
exchangeRate: { type: 'number' },
|
|
5224
|
-
totalDiscount: { type: 'number' },
|
|
5225
|
-
subTotal: { type: 'number' },
|
|
5226
|
-
balance: { type: 'number' },
|
|
5227
|
-
ledgerAccountId: { type: 'string', referenceUdm: 'ledger-accounts' },
|
|
5228
|
-
issueDate: {
|
|
5310
|
+
primaryPhone: {
|
|
5229
5311
|
type: 'string',
|
|
5230
|
-
format: 'date-time',
|
|
5231
5312
|
},
|
|
5232
|
-
|
|
5313
|
+
description: {
|
|
5233
5314
|
type: 'string',
|
|
5234
|
-
format: 'date-time',
|
|
5235
5315
|
},
|
|
5236
|
-
|
|
5316
|
+
currency: {
|
|
5237
5317
|
type: 'string',
|
|
5238
|
-
format: 'date-time',
|
|
5239
5318
|
},
|
|
5240
|
-
|
|
5241
|
-
createdBy: { type: 'string', referenceUdm: 'users', readOnly: true },
|
|
5242
|
-
updatedTime: { type: 'string', format: 'date-time', readOnly: true },
|
|
5243
|
-
updatedBy: { type: 'string', referenceUdm: 'users', readOnly: true },
|
|
5244
|
-
},
|
|
5245
|
-
};
|
|
5246
|
-
const udm$F = {
|
|
5247
|
-
singularName: 'bill',
|
|
5248
|
-
pluralName: 'bills',
|
|
5249
|
-
fieldsSchema: FIELDS_SCHEMA$F,
|
|
5250
|
-
list: {
|
|
5251
|
-
filterFields: ['name', 'number', 'status', 'supplierId'],
|
|
5252
|
-
},
|
|
5253
|
-
match: {
|
|
5254
|
-
fields: ['name', 'number', 'status', 'supplierId'],
|
|
5255
|
-
},
|
|
5256
|
-
};
|
|
5257
|
-
|
|
5258
|
-
const FIELDS_SCHEMA$E = {
|
|
5259
|
-
type: 'object',
|
|
5260
|
-
properties: {
|
|
5261
|
-
id: { type: 'string', readOnly: true },
|
|
5262
|
-
fullName: { type: 'string' },
|
|
5263
|
-
firstName: { type: 'string' },
|
|
5264
|
-
lastName: { type: 'string' },
|
|
5265
|
-
primaryEmail: { type: 'string' },
|
|
5266
|
-
campaignId: {
|
|
5319
|
+
industry: {
|
|
5267
5320
|
type: 'string',
|
|
5268
|
-
referenceUdm: 'campaigns',
|
|
5269
5321
|
},
|
|
5270
|
-
|
|
5322
|
+
ownerId: {
|
|
5271
5323
|
type: 'string',
|
|
5272
|
-
referenceUdm: '
|
|
5324
|
+
referenceUdm: 'users',
|
|
5273
5325
|
},
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5326
|
+
primaryAddress: AddressSchema,
|
|
5327
|
+
addresses: {
|
|
5328
|
+
type: 'array',
|
|
5329
|
+
items: AddressSchema,
|
|
5277
5330
|
},
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
companyId: {
|
|
5281
|
-
type: 'string',
|
|
5282
|
-
referenceUdm: 'companies',
|
|
5331
|
+
numberOfEmployees: {
|
|
5332
|
+
type: 'number',
|
|
5283
5333
|
},
|
|
5284
|
-
jobTitle: { type: 'string' },
|
|
5285
|
-
hasOptedOutOfEmail: { type: 'boolean' },
|
|
5286
5334
|
createdTime: {
|
|
5287
5335
|
type: 'string',
|
|
5288
5336
|
format: 'date-time',
|
|
5289
5337
|
},
|
|
5290
5338
|
createdBy: {
|
|
5291
5339
|
type: 'string',
|
|
5292
|
-
readOnly: true,
|
|
5293
5340
|
referenceUdm: 'users',
|
|
5341
|
+
readOnly: true,
|
|
5294
5342
|
},
|
|
5295
5343
|
updatedTime: {
|
|
5296
5344
|
type: 'string',
|
|
5297
|
-
readOnly: true,
|
|
5298
5345
|
format: 'date-time',
|
|
5346
|
+
readOnly: true,
|
|
5299
5347
|
},
|
|
5300
5348
|
updatedBy: {
|
|
5301
5349
|
type: 'string',
|
|
5302
|
-
readOnly: true,
|
|
5303
5350
|
referenceUdm: 'users',
|
|
5351
|
+
readOnly: true,
|
|
5352
|
+
},
|
|
5353
|
+
lastActivityTime: {
|
|
5354
|
+
type: 'string',
|
|
5355
|
+
format: 'date-time',
|
|
5356
|
+
readOnly: true,
|
|
5304
5357
|
},
|
|
5305
5358
|
},
|
|
5306
5359
|
};
|
|
5307
|
-
const udm$
|
|
5308
|
-
singularName: '
|
|
5309
|
-
pluralName: '
|
|
5310
|
-
fieldsSchema: FIELDS_SCHEMA$
|
|
5360
|
+
const udm$C = {
|
|
5361
|
+
singularName: 'company',
|
|
5362
|
+
pluralName: 'companies',
|
|
5363
|
+
fieldsSchema: FIELDS_SCHEMA$C,
|
|
5311
5364
|
list: {
|
|
5312
|
-
filterFields: [
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
'lastName',
|
|
5317
|
-
'campaignId',
|
|
5318
|
-
'contactId',
|
|
5319
|
-
'leadId',
|
|
5320
|
-
'companyId',
|
|
5321
|
-
],
|
|
5365
|
+
filterFields: ['ownerId', 'name', 'websiteUrl', 'industry'],
|
|
5366
|
+
},
|
|
5367
|
+
find: {
|
|
5368
|
+
queryFields: ['ownerId', 'name', 'websiteUrl', 'industry'],
|
|
5322
5369
|
},
|
|
5323
5370
|
match: {
|
|
5324
|
-
fields: ['
|
|
5371
|
+
fields: ['ownerId', 'name', 'websiteUrl', 'industry'],
|
|
5372
|
+
},
|
|
5373
|
+
fieldFallbacks: {
|
|
5374
|
+
'primaryAddress.full': [
|
|
5375
|
+
{
|
|
5376
|
+
$concat: {
|
|
5377
|
+
values: [
|
|
5378
|
+
{ $var: 'primaryAddress.street' },
|
|
5379
|
+
{ $var: 'primaryAddress.city' },
|
|
5380
|
+
{ $var: 'primaryAddress.state' },
|
|
5381
|
+
{ $var: 'primaryAddress.zip' },
|
|
5382
|
+
{ $var: 'primaryAddress.country' },
|
|
5383
|
+
],
|
|
5384
|
+
delimiter: ', ',
|
|
5385
|
+
},
|
|
5386
|
+
},
|
|
5387
|
+
],
|
|
5325
5388
|
},
|
|
5326
5389
|
};
|
|
5327
5390
|
|
|
5328
|
-
const FIELDS_SCHEMA$
|
|
5391
|
+
const FIELDS_SCHEMA$B = {
|
|
5329
5392
|
type: 'object',
|
|
5330
5393
|
properties: {
|
|
5331
5394
|
id: { type: 'string', readOnly: true },
|
|
5332
|
-
name: {
|
|
5395
|
+
name: { type: 'string' },
|
|
5396
|
+
description: { type: 'string' },
|
|
5397
|
+
source: { type: 'string' },
|
|
5398
|
+
type: { type: 'string' },
|
|
5399
|
+
ownerId: {
|
|
5333
5400
|
type: 'string',
|
|
5401
|
+
referenceUdm: 'users',
|
|
5334
5402
|
},
|
|
5335
|
-
|
|
5336
|
-
type: 'number',
|
|
5337
|
-
},
|
|
5338
|
-
description: {
|
|
5403
|
+
createdTime: {
|
|
5339
5404
|
type: 'string',
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
type: 'string',
|
|
5343
|
-
},
|
|
5344
|
-
stage: {
|
|
5345
|
-
type: 'string',
|
|
5346
|
-
},
|
|
5347
|
-
type: {
|
|
5348
|
-
type: 'string',
|
|
5349
|
-
},
|
|
5350
|
-
ownerId: {
|
|
5351
|
-
type: 'string',
|
|
5352
|
-
referenceUdm: 'users',
|
|
5353
|
-
},
|
|
5354
|
-
sentCount: {
|
|
5355
|
-
type: 'number',
|
|
5356
|
-
readOnly: true,
|
|
5357
|
-
},
|
|
5358
|
-
replyCount: {
|
|
5359
|
-
type: 'number',
|
|
5360
|
-
readOnly: true,
|
|
5361
|
-
},
|
|
5362
|
-
openCount: {
|
|
5363
|
-
type: 'number',
|
|
5364
|
-
readOnly: true,
|
|
5365
|
-
},
|
|
5366
|
-
clickCount: {
|
|
5367
|
-
type: 'number',
|
|
5368
|
-
readOnly: true,
|
|
5369
|
-
},
|
|
5370
|
-
startTime: {
|
|
5371
|
-
type: 'string',
|
|
5372
|
-
format: 'date-time',
|
|
5373
|
-
},
|
|
5374
|
-
endTime: {
|
|
5375
|
-
type: 'string',
|
|
5376
|
-
format: 'date-time',
|
|
5377
|
-
},
|
|
5378
|
-
createdTime: {
|
|
5379
|
-
type: 'string',
|
|
5380
|
-
format: 'date-time',
|
|
5381
|
-
readOnly: true,
|
|
5382
|
-
},
|
|
5383
|
-
createdBy: {
|
|
5384
|
-
type: 'string',
|
|
5385
|
-
referenceUdm: 'users',
|
|
5386
|
-
readOnly: true,
|
|
5387
|
-
},
|
|
5388
|
-
updatedTime: {
|
|
5389
|
-
type: 'string',
|
|
5390
|
-
format: 'date-time',
|
|
5391
|
-
readOnly: true,
|
|
5392
|
-
},
|
|
5393
|
-
updatedBy: {
|
|
5394
|
-
type: 'string',
|
|
5395
|
-
referenceUdm: 'users',
|
|
5396
|
-
readOnly: true,
|
|
5397
|
-
},
|
|
5398
|
-
lastActivityTime: {
|
|
5399
|
-
type: 'string',
|
|
5400
|
-
format: 'date-time',
|
|
5401
|
-
readOnly: true,
|
|
5402
|
-
},
|
|
5403
|
-
},
|
|
5404
|
-
};
|
|
5405
|
-
const MODIFIABLE_FIELDS$2 = ['name', 'description', 'ownerId', 'startTime', 'endTime', 'cost', 'source', 'stage', 'type'];
|
|
5406
|
-
const udm$D = {
|
|
5407
|
-
singularName: 'campaign',
|
|
5408
|
-
pluralName: 'campaigns',
|
|
5409
|
-
fieldsSchema: FIELDS_SCHEMA$D,
|
|
5410
|
-
categories: ['Marketing Automation', 'Sales', 'CRM', 'Ads'],
|
|
5411
|
-
list: {
|
|
5412
|
-
filterFields: ['name', 'source', 'stage', 'type', 'ownerId'],
|
|
5413
|
-
},
|
|
5414
|
-
find: {
|
|
5415
|
-
queryFields: ['name', 'source', 'stage', 'type', 'ownerId'],
|
|
5416
|
-
},
|
|
5417
|
-
match: {
|
|
5418
|
-
fields: ['name', 'source', 'stage', 'type', 'ownerId'],
|
|
5419
|
-
},
|
|
5420
|
-
create: {
|
|
5421
|
-
fields: MODIFIABLE_FIELDS$2,
|
|
5422
|
-
},
|
|
5423
|
-
update: {
|
|
5424
|
-
fields: MODIFIABLE_FIELDS$2,
|
|
5425
|
-
},
|
|
5426
|
-
};
|
|
5427
|
-
|
|
5428
|
-
const AddressSchema = {
|
|
5429
|
-
type: 'object',
|
|
5430
|
-
properties: {
|
|
5431
|
-
type: { type: 'string' },
|
|
5432
|
-
full: { type: 'string' },
|
|
5433
|
-
street: { type: 'string' },
|
|
5434
|
-
city: { type: 'string' },
|
|
5435
|
-
state: { type: 'string' },
|
|
5436
|
-
country: { type: 'string' },
|
|
5437
|
-
zip: { type: 'string' },
|
|
5438
|
-
},
|
|
5439
|
-
};
|
|
5440
|
-
const PhoneEmailSchema = {
|
|
5441
|
-
type: 'object',
|
|
5442
|
-
properties: {
|
|
5443
|
-
value: { type: 'string' },
|
|
5444
|
-
type: { type: 'string' },
|
|
5445
|
-
},
|
|
5446
|
-
};
|
|
5447
|
-
|
|
5448
|
-
const FIELDS_SCHEMA$C = {
|
|
5449
|
-
type: 'object',
|
|
5450
|
-
properties: {
|
|
5451
|
-
id: { type: 'string', readOnly: true },
|
|
5452
|
-
name: {
|
|
5453
|
-
type: 'string',
|
|
5454
|
-
},
|
|
5455
|
-
websiteUrl: {
|
|
5456
|
-
type: 'string',
|
|
5457
|
-
},
|
|
5458
|
-
phones: {
|
|
5459
|
-
type: 'array',
|
|
5460
|
-
items: PhoneEmailSchema,
|
|
5461
|
-
},
|
|
5462
|
-
primaryPhone: {
|
|
5463
|
-
type: 'string',
|
|
5464
|
-
},
|
|
5465
|
-
description: {
|
|
5466
|
-
type: 'string',
|
|
5467
|
-
},
|
|
5468
|
-
currency: {
|
|
5469
|
-
type: 'string',
|
|
5470
|
-
},
|
|
5471
|
-
industry: {
|
|
5472
|
-
type: 'string',
|
|
5473
|
-
},
|
|
5474
|
-
ownerId: {
|
|
5475
|
-
type: 'string',
|
|
5476
|
-
referenceUdm: 'users',
|
|
5477
|
-
},
|
|
5478
|
-
primaryAddress: AddressSchema,
|
|
5479
|
-
addresses: {
|
|
5480
|
-
type: 'array',
|
|
5481
|
-
items: AddressSchema,
|
|
5482
|
-
},
|
|
5483
|
-
numberOfEmployees: {
|
|
5484
|
-
type: 'number',
|
|
5485
|
-
},
|
|
5486
|
-
createdTime: {
|
|
5487
|
-
type: 'string',
|
|
5488
|
-
format: 'date-time',
|
|
5489
|
-
},
|
|
5490
|
-
createdBy: {
|
|
5491
|
-
type: 'string',
|
|
5492
|
-
referenceUdm: 'users',
|
|
5493
|
-
readOnly: true,
|
|
5494
|
-
},
|
|
5495
|
-
updatedTime: {
|
|
5496
|
-
type: 'string',
|
|
5497
|
-
format: 'date-time',
|
|
5498
|
-
readOnly: true,
|
|
5499
|
-
},
|
|
5500
|
-
updatedBy: {
|
|
5501
|
-
type: 'string',
|
|
5502
|
-
referenceUdm: 'users',
|
|
5503
|
-
readOnly: true,
|
|
5504
|
-
},
|
|
5505
|
-
lastActivityTime: {
|
|
5506
|
-
type: 'string',
|
|
5507
|
-
format: 'date-time',
|
|
5508
|
-
readOnly: true,
|
|
5509
|
-
},
|
|
5510
|
-
},
|
|
5511
|
-
};
|
|
5512
|
-
const udm$C = {
|
|
5513
|
-
singularName: 'company',
|
|
5514
|
-
pluralName: 'companies',
|
|
5515
|
-
fieldsSchema: FIELDS_SCHEMA$C,
|
|
5516
|
-
list: {
|
|
5517
|
-
filterFields: ['ownerId', 'name', 'websiteUrl', 'industry'],
|
|
5518
|
-
},
|
|
5519
|
-
find: {
|
|
5520
|
-
queryFields: ['ownerId', 'name', 'websiteUrl', 'industry'],
|
|
5521
|
-
},
|
|
5522
|
-
match: {
|
|
5523
|
-
fields: ['ownerId', 'name', 'websiteUrl', 'industry'],
|
|
5524
|
-
},
|
|
5525
|
-
fieldFallbacks: {
|
|
5526
|
-
'primaryAddress.full': [
|
|
5527
|
-
{
|
|
5528
|
-
$concat: {
|
|
5529
|
-
values: [
|
|
5530
|
-
{ $var: 'primaryAddress.street' },
|
|
5531
|
-
{ $var: 'primaryAddress.city' },
|
|
5532
|
-
{ $var: 'primaryAddress.state' },
|
|
5533
|
-
{ $var: 'primaryAddress.zip' },
|
|
5534
|
-
{ $var: 'primaryAddress.country' },
|
|
5535
|
-
],
|
|
5536
|
-
delimiter: ', ',
|
|
5537
|
-
},
|
|
5538
|
-
},
|
|
5539
|
-
],
|
|
5540
|
-
},
|
|
5541
|
-
};
|
|
5542
|
-
|
|
5543
|
-
const FIELDS_SCHEMA$B = {
|
|
5544
|
-
type: 'object',
|
|
5545
|
-
properties: {
|
|
5546
|
-
id: { type: 'string', readOnly: true },
|
|
5547
|
-
name: { type: 'string' },
|
|
5548
|
-
description: { type: 'string' },
|
|
5549
|
-
source: { type: 'string' },
|
|
5550
|
-
type: { type: 'string' },
|
|
5551
|
-
ownerId: {
|
|
5552
|
-
type: 'string',
|
|
5553
|
-
referenceUdm: 'users',
|
|
5554
|
-
},
|
|
5555
|
-
createdTime: {
|
|
5556
|
-
type: 'string',
|
|
5557
|
-
format: 'date-time',
|
|
5558
|
-
readOnly: true,
|
|
5405
|
+
format: 'date-time',
|
|
5406
|
+
readOnly: true,
|
|
5559
5407
|
},
|
|
5560
5408
|
createdBy: {
|
|
5561
5409
|
type: 'string',
|
|
@@ -7973,173 +7821,6 @@ const udm = {
|
|
|
7973
7821
|
},
|
|
7974
7822
|
};
|
|
7975
7823
|
|
|
7976
|
-
const structuredClone$1 = (structuredClonePolyfill === null || structuredClonePolyfill === void 0 ? void 0 : structuredClonePolyfill.default) || structuredClonePolyfill;
|
|
7977
|
-
function isNil(value) {
|
|
7978
|
-
return value == null;
|
|
7979
|
-
}
|
|
7980
|
-
function omitBy(obj, check) {
|
|
7981
|
-
obj = { ...obj };
|
|
7982
|
-
Object.entries(obj).forEach(([key, value]) => check(value) && delete obj[key]);
|
|
7983
|
-
return obj;
|
|
7984
|
-
}
|
|
7985
|
-
function isEmptyValue(value) {
|
|
7986
|
-
if (isNil(value)) {
|
|
7987
|
-
return true;
|
|
7988
|
-
}
|
|
7989
|
-
if (typeof value === 'symbol') {
|
|
7990
|
-
return true;
|
|
7991
|
-
}
|
|
7992
|
-
if (typeof value === 'boolean') {
|
|
7993
|
-
return false;
|
|
7994
|
-
}
|
|
7995
|
-
if (typeof value === 'number') {
|
|
7996
|
-
return isNaN(value);
|
|
7997
|
-
}
|
|
7998
|
-
if (typeof value === 'string') {
|
|
7999
|
-
return value.trim().length === 0;
|
|
8000
|
-
}
|
|
8001
|
-
const tag = value.toString();
|
|
8002
|
-
if (tag === '[object Map]' || tag === '[object Set]') {
|
|
8003
|
-
return !value.size;
|
|
8004
|
-
}
|
|
8005
|
-
return typeof value === 'object' && Object.keys(value).length === 0;
|
|
8006
|
-
}
|
|
8007
|
-
const simpleUniqueId = () => {
|
|
8008
|
-
return Math.floor(Math.random() * Number.MAX_SAFE_INTEGER)
|
|
8009
|
-
.toString(36)
|
|
8010
|
-
.padStart(11, '0')
|
|
8011
|
-
.substring(0, 11);
|
|
8012
|
-
};
|
|
8013
|
-
|
|
8014
|
-
function getDataLocationMethodPath(locationKey, methodKey) {
|
|
8015
|
-
return `data/${locationKey}/${jsConvertCase.toKebabCase(methodKey)}`;
|
|
8016
|
-
}
|
|
8017
|
-
function dataLocationParametersMatch({ locationParameters, targetParameters, }) {
|
|
8018
|
-
targetParameters = typeof targetParameters === 'object' && targetParameters ? targetParameters : {};
|
|
8019
|
-
locationParameters = typeof locationParameters === 'object' && locationParameters ? locationParameters : {};
|
|
8020
|
-
for (const [key, value] of Object.entries(targetParameters)) {
|
|
8021
|
-
if (locationParameters[key] !== value) {
|
|
8022
|
-
return false;
|
|
8023
|
-
}
|
|
8024
|
-
}
|
|
8025
|
-
return true;
|
|
8026
|
-
}
|
|
8027
|
-
function parseDataLocationPath(path) {
|
|
8028
|
-
if (!path) {
|
|
8029
|
-
return undefined;
|
|
8030
|
-
}
|
|
8031
|
-
if (path.startsWith('/')) {
|
|
8032
|
-
path = path.slice(1);
|
|
8033
|
-
}
|
|
8034
|
-
if (!path.startsWith('data/')) {
|
|
8035
|
-
throw new Error(`Invalid data location path: ${path}. It should start with "data/"`);
|
|
8036
|
-
}
|
|
8037
|
-
path = path.slice(5);
|
|
8038
|
-
const [key, query] = path.split('?');
|
|
8039
|
-
const parameters = Object.fromEntries(new URLSearchParams(query).entries());
|
|
8040
|
-
return { key, parameters };
|
|
8041
|
-
}
|
|
8042
|
-
function makeDataLocationPath(pointer) {
|
|
8043
|
-
var _a;
|
|
8044
|
-
const normalizedPointer = normalizePointer(pointer);
|
|
8045
|
-
if (normalizedPointer === null || normalizedPointer === void 0 ? void 0 : normalizedPointer.key) {
|
|
8046
|
-
let path = `/data/${normalizedPointer.key}`;
|
|
8047
|
-
const parameters = omitBy((_a = normalizedPointer.parameters) !== null && _a !== void 0 ? _a : {}, isNil);
|
|
8048
|
-
if (Object.keys(parameters).length > 0) {
|
|
8049
|
-
path += `?${new URLSearchParams(parameters).toString()}`;
|
|
8050
|
-
}
|
|
8051
|
-
return path;
|
|
8052
|
-
}
|
|
8053
|
-
else {
|
|
8054
|
-
return undefined;
|
|
8055
|
-
}
|
|
8056
|
-
}
|
|
8057
|
-
function normalizePointer(pointer) {
|
|
8058
|
-
if (typeof pointer === 'string' && pointer.startsWith('/data/')) {
|
|
8059
|
-
return {
|
|
8060
|
-
key: pointer.slice(6),
|
|
8061
|
-
};
|
|
8062
|
-
}
|
|
8063
|
-
return pointer;
|
|
8064
|
-
}
|
|
8065
|
-
function makeDataLocationOperationPath(collectionPath, operation) {
|
|
8066
|
-
const [path, query] = (collectionPath !== null && collectionPath !== void 0 ? collectionPath : '').split('?');
|
|
8067
|
-
return urljoin(path, operation, query ? `?${query}` : '');
|
|
8068
|
-
}
|
|
8069
|
-
function isSameDataLocation(location1, location2) {
|
|
8070
|
-
if (location1.key !== location2.key) {
|
|
8071
|
-
return false;
|
|
8072
|
-
}
|
|
8073
|
-
const cleanParameters1 = location1.parameters && Object.keys(location1.parameters).length > 0 ? location1.parameters : undefined;
|
|
8074
|
-
const cleanParameters2 = location2.parameters && Object.keys(location2.parameters).length > 0 ? location2.parameters : undefined;
|
|
8075
|
-
if (!deepEqual(cleanParameters1, cleanParameters2)) {
|
|
8076
|
-
return false;
|
|
8077
|
-
}
|
|
8078
|
-
return true;
|
|
8079
|
-
}
|
|
8080
|
-
function isDataLocationMethodSupported(location, methodKey) {
|
|
8081
|
-
var _a;
|
|
8082
|
-
const method = (_a = location === null || location === void 0 ? void 0 : location.methods) === null || _a === void 0 ? void 0 : _a[methodKey];
|
|
8083
|
-
return method && method.implementationType !== exports.ConnectorMethodImplementationType.notSupported;
|
|
8084
|
-
}
|
|
8085
|
-
function getDataCollectionCreateFields(spec) {
|
|
8086
|
-
if (!spec)
|
|
8087
|
-
return undefined;
|
|
8088
|
-
if (!spec.fieldsSchema)
|
|
8089
|
-
return undefined;
|
|
8090
|
-
if (!spec.create)
|
|
8091
|
-
return undefined;
|
|
8092
|
-
let schema = excludeReadOnlyFieldsFromSchema(spec.fieldsSchema);
|
|
8093
|
-
if (spec.create.fields) {
|
|
8094
|
-
schema = pickFieldsFromSchema(schema, spec.create.fields);
|
|
8095
|
-
}
|
|
8096
|
-
if (spec.create.excludedFields) {
|
|
8097
|
-
schema = excludeFieldsFromSchema(schema, spec.create.excludedFields);
|
|
8098
|
-
}
|
|
8099
|
-
return schema;
|
|
8100
|
-
}
|
|
8101
|
-
function getDataCollectionUpdateFields(spec) {
|
|
8102
|
-
if (!spec)
|
|
8103
|
-
return undefined;
|
|
8104
|
-
if (!spec.fieldsSchema)
|
|
8105
|
-
return undefined;
|
|
8106
|
-
if (!spec.update)
|
|
8107
|
-
return undefined;
|
|
8108
|
-
let schema = excludeReadOnlyFieldsFromSchema(spec.fieldsSchema);
|
|
8109
|
-
if (spec.update.fields) {
|
|
8110
|
-
schema = pickFieldsFromSchema(schema, spec.update.fields);
|
|
8111
|
-
}
|
|
8112
|
-
if (spec.update.excludedFields) {
|
|
8113
|
-
schema = excludeFieldsFromSchema(schema, spec.update.excludedFields);
|
|
8114
|
-
}
|
|
8115
|
-
return schema;
|
|
8116
|
-
}
|
|
8117
|
-
function getWritableFieldsSchema(spec) {
|
|
8118
|
-
if (!spec)
|
|
8119
|
-
return undefined;
|
|
8120
|
-
if (!spec.fieldsSchema)
|
|
8121
|
-
return undefined;
|
|
8122
|
-
return mergeSchemas([getDataCollectionCreateFields(spec), getDataCollectionUpdateFields(spec)]);
|
|
8123
|
-
}
|
|
8124
|
-
function getReferenceCollectionPointerForSchema(schema) {
|
|
8125
|
-
if ((schema === null || schema === void 0 ? void 0 : schema.referenceCollection) && schema.referenceCollection.key) {
|
|
8126
|
-
return schema.referenceCollection;
|
|
8127
|
-
}
|
|
8128
|
-
else if (schema === null || schema === void 0 ? void 0 : schema.referenceCollectionPath) {
|
|
8129
|
-
return parseDataLocationPath(schema.referenceCollectionPath);
|
|
8130
|
-
}
|
|
8131
|
-
else if (schema === null || schema === void 0 ? void 0 : schema.referenceCollectionUri) {
|
|
8132
|
-
return parseDataLocationPath(schema.referenceCollectionUri);
|
|
8133
|
-
}
|
|
8134
|
-
else {
|
|
8135
|
-
return undefined;
|
|
8136
|
-
}
|
|
8137
|
-
}
|
|
8138
|
-
function getReferenceCollectionPathForSchema(schema) {
|
|
8139
|
-
const pointer = getReferenceCollectionPointerForSchema(schema);
|
|
8140
|
-
return makeDataLocationPath(pointer);
|
|
8141
|
-
}
|
|
8142
|
-
|
|
8143
7824
|
exports.UDM = void 0;
|
|
8144
7825
|
(function (UDM) {
|
|
8145
7826
|
UDM["ACTIVITIES"] = "activities";
|
|
@@ -8324,63 +8005,385 @@ function addUdmFallbackFields(fields, udm) {
|
|
|
8324
8005
|
return result;
|
|
8325
8006
|
}
|
|
8326
8007
|
|
|
8327
|
-
const DATA_RECORD_SCHEMA = {
|
|
8328
|
-
type: 'object',
|
|
8329
|
-
properties: {
|
|
8330
|
-
id: {
|
|
8331
|
-
type: 'string',
|
|
8332
|
-
},
|
|
8333
|
-
name: {
|
|
8334
|
-
type: 'string',
|
|
8335
|
-
},
|
|
8336
|
-
uri: {
|
|
8337
|
-
type: 'string',
|
|
8338
|
-
format: 'url',
|
|
8339
|
-
},
|
|
8340
|
-
createdTime: {
|
|
8341
|
-
type: 'string',
|
|
8342
|
-
format: 'datetime',
|
|
8343
|
-
},
|
|
8344
|
-
updatedTime: {
|
|
8345
|
-
type: 'string',
|
|
8346
|
-
format: 'datetime',
|
|
8347
|
-
},
|
|
8348
|
-
deletedTime: {
|
|
8349
|
-
type: 'string',
|
|
8350
|
-
format: 'datetime',
|
|
8351
|
-
},
|
|
8352
|
-
createdById: {
|
|
8353
|
-
type: 'string',
|
|
8354
|
-
},
|
|
8355
|
-
updatedById: {
|
|
8356
|
-
type: 'string',
|
|
8357
|
-
},
|
|
8008
|
+
const DATA_RECORD_SCHEMA = {
|
|
8009
|
+
type: 'object',
|
|
8010
|
+
properties: {
|
|
8011
|
+
id: {
|
|
8012
|
+
type: 'string',
|
|
8013
|
+
},
|
|
8014
|
+
name: {
|
|
8015
|
+
type: 'string',
|
|
8016
|
+
},
|
|
8017
|
+
uri: {
|
|
8018
|
+
type: 'string',
|
|
8019
|
+
format: 'url',
|
|
8020
|
+
},
|
|
8021
|
+
createdTime: {
|
|
8022
|
+
type: 'string',
|
|
8023
|
+
format: 'datetime',
|
|
8024
|
+
},
|
|
8025
|
+
updatedTime: {
|
|
8026
|
+
type: 'string',
|
|
8027
|
+
format: 'datetime',
|
|
8028
|
+
},
|
|
8029
|
+
deletedTime: {
|
|
8030
|
+
type: 'string',
|
|
8031
|
+
format: 'datetime',
|
|
8032
|
+
},
|
|
8033
|
+
createdById: {
|
|
8034
|
+
type: 'string',
|
|
8035
|
+
},
|
|
8036
|
+
updatedById: {
|
|
8037
|
+
type: 'string',
|
|
8038
|
+
},
|
|
8039
|
+
},
|
|
8040
|
+
};
|
|
8041
|
+
function makeDataRecordSchema({ fieldsSchema, udm, rawFieldsSchema, }) {
|
|
8042
|
+
var _a, _b, _c;
|
|
8043
|
+
const schema = structuredClone$1(DATA_RECORD_SCHEMA);
|
|
8044
|
+
schema.properties = {
|
|
8045
|
+
...((_a = schema.properties) !== null && _a !== void 0 ? _a : {}),
|
|
8046
|
+
fields: fieldsSchema !== null && fieldsSchema !== void 0 ? fieldsSchema : { type: 'object' },
|
|
8047
|
+
};
|
|
8048
|
+
if (udm) {
|
|
8049
|
+
const unifiedModel = UNIFIED_DATA_MODELS[udm];
|
|
8050
|
+
if (unifiedModel === null || unifiedModel === void 0 ? void 0 : unifiedModel.fieldsSchema) {
|
|
8051
|
+
schema.properties = {
|
|
8052
|
+
...((_b = schema.properties) !== null && _b !== void 0 ? _b : {}),
|
|
8053
|
+
unifiedFields: unifiedModel.fieldsSchema,
|
|
8054
|
+
};
|
|
8055
|
+
}
|
|
8056
|
+
}
|
|
8057
|
+
if (rawFieldsSchema) {
|
|
8058
|
+
schema.properties = {
|
|
8059
|
+
...((_c = schema.properties) !== null && _c !== void 0 ? _c : {}),
|
|
8060
|
+
rawFields: rawFieldsSchema,
|
|
8061
|
+
};
|
|
8062
|
+
}
|
|
8063
|
+
return schema;
|
|
8064
|
+
}
|
|
8065
|
+
|
|
8066
|
+
const DataLocationMethodImplementationTypes = [
|
|
8067
|
+
exports.ConnectorMethodImplementationType.operationMapping,
|
|
8068
|
+
exports.ConnectorMethodImplementationType.restApiMapping,
|
|
8069
|
+
exports.ConnectorMethodImplementationType.graphqlApiMapping,
|
|
8070
|
+
exports.ConnectorMethodImplementationType.javascript,
|
|
8071
|
+
exports.ConnectorMethodImplementationType.notSupported,
|
|
8072
|
+
];
|
|
8073
|
+
|
|
8074
|
+
const DataCollectionMethodCreate = {
|
|
8075
|
+
name: 'Create',
|
|
8076
|
+
description: 'Create a new data record in the collection',
|
|
8077
|
+
getConfigSchema: ({ collectionSpec }) => {
|
|
8078
|
+
var _a, _b;
|
|
8079
|
+
const fields = Object.keys((_b = (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) === null || _a === void 0 ? void 0 : _a.properties) !== null && _b !== void 0 ? _b : {}).map(locatorToField);
|
|
8080
|
+
return {
|
|
8081
|
+
type: 'object',
|
|
8082
|
+
properties: {
|
|
8083
|
+
fields: {
|
|
8084
|
+
type: 'array',
|
|
8085
|
+
items: { type: 'string', enum: fields },
|
|
8086
|
+
},
|
|
8087
|
+
excludedFields: {
|
|
8088
|
+
type: 'array',
|
|
8089
|
+
items: { type: 'string', enum: fields },
|
|
8090
|
+
},
|
|
8091
|
+
},
|
|
8092
|
+
};
|
|
8093
|
+
},
|
|
8094
|
+
getInputSchema: ({ collectionSpec, method, credentialsSchema }) => {
|
|
8095
|
+
var _a;
|
|
8096
|
+
let fieldsSchema = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema;
|
|
8097
|
+
if (method === null || method === void 0 ? void 0 : method.fields) {
|
|
8098
|
+
fieldsSchema = pickFieldsFromSchema(fieldsSchema, method.fields);
|
|
8099
|
+
}
|
|
8100
|
+
if (method === null || method === void 0 ? void 0 : method.excludedFields) {
|
|
8101
|
+
fieldsSchema = excludeFieldsFromSchema(fieldsSchema, method.excludedFields);
|
|
8102
|
+
}
|
|
8103
|
+
return {
|
|
8104
|
+
type: 'object',
|
|
8105
|
+
properties: nonEmptyObjectProperties({
|
|
8106
|
+
fields: (_a = transformVariablesWith(fieldsSchema, (locator) => `fields.${locatorToField(locator)}`)) !== null && _a !== void 0 ? _a : {
|
|
8107
|
+
type: 'object',
|
|
8108
|
+
},
|
|
8109
|
+
credentials: credentialsSchema,
|
|
8110
|
+
}),
|
|
8111
|
+
};
|
|
8112
|
+
},
|
|
8113
|
+
getOutputSchema: ({}) => ({
|
|
8114
|
+
type: 'object',
|
|
8115
|
+
properties: {
|
|
8116
|
+
id: { type: 'string' },
|
|
8117
|
+
},
|
|
8118
|
+
}),
|
|
8119
|
+
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
8120
|
+
};
|
|
8121
|
+
|
|
8122
|
+
const DataCollectionMethodDelete = {
|
|
8123
|
+
name: 'Delete',
|
|
8124
|
+
description: 'Delete a data record from the collection by id',
|
|
8125
|
+
getInputSchema: ({ collectionHandler, parameters, credentialsSchema }) => {
|
|
8126
|
+
return {
|
|
8127
|
+
type: 'object',
|
|
8128
|
+
properties: nonEmptyObjectProperties({
|
|
8129
|
+
id: {
|
|
8130
|
+
type: 'string',
|
|
8131
|
+
referenceCollection: { key: collectionHandler === null || collectionHandler === void 0 ? void 0 : collectionHandler.key, parameters },
|
|
8132
|
+
},
|
|
8133
|
+
credentials: credentialsSchema,
|
|
8134
|
+
}),
|
|
8135
|
+
};
|
|
8136
|
+
},
|
|
8137
|
+
getOutputSchema: () => null,
|
|
8138
|
+
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
8139
|
+
};
|
|
8140
|
+
|
|
8141
|
+
const DataCollectionMethodFind = {
|
|
8142
|
+
isDeprecated: true,
|
|
8143
|
+
name: 'Find',
|
|
8144
|
+
description: 'Find a list of data records in the collection',
|
|
8145
|
+
getConfigSchema: ({ collectionSpec }) => {
|
|
8146
|
+
var _a, _b;
|
|
8147
|
+
const fields = Object.keys((_b = (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) === null || _a === void 0 ? void 0 : _a.properties) !== null && _b !== void 0 ? _b : {}).map(locatorToField);
|
|
8148
|
+
return {
|
|
8149
|
+
type: 'object',
|
|
8150
|
+
properties: {
|
|
8151
|
+
queryFields: {
|
|
8152
|
+
type: 'array',
|
|
8153
|
+
items: { type: 'string', enum: fields },
|
|
8154
|
+
},
|
|
8155
|
+
},
|
|
8156
|
+
};
|
|
8157
|
+
},
|
|
8158
|
+
getInputSchema: ({ collectionSpec, method, credentialsSchema }) => {
|
|
8159
|
+
const queryFieldsSchema = pickFieldsFromSchema(collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema, method === null || method === void 0 ? void 0 : method.queryFields);
|
|
8160
|
+
const schema = {
|
|
8161
|
+
type: 'object',
|
|
8162
|
+
properties: nonEmptyObjectProperties({
|
|
8163
|
+
cursor: { type: 'string' },
|
|
8164
|
+
credentials: credentialsSchema,
|
|
8165
|
+
}),
|
|
8166
|
+
};
|
|
8167
|
+
if (queryFieldsSchema === null || queryFieldsSchema === void 0 ? void 0 : queryFieldsSchema.properties) {
|
|
8168
|
+
schema.properties = {
|
|
8169
|
+
...schema.properties,
|
|
8170
|
+
query: transformVariablesWith(queryFieldsSchema, (locator) => `query.${locatorToField(locator)}`),
|
|
8171
|
+
};
|
|
8172
|
+
}
|
|
8173
|
+
return schema;
|
|
8174
|
+
},
|
|
8175
|
+
getOutputSchema: ({ collectionSpec }) => {
|
|
8176
|
+
var _a;
|
|
8177
|
+
return ({
|
|
8178
|
+
type: 'object',
|
|
8179
|
+
properties: {
|
|
8180
|
+
records: {
|
|
8181
|
+
type: 'array',
|
|
8182
|
+
items: (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) !== null && _a !== void 0 ? _a : { type: 'object' },
|
|
8183
|
+
},
|
|
8184
|
+
cursor: {
|
|
8185
|
+
type: 'string',
|
|
8186
|
+
},
|
|
8187
|
+
},
|
|
8188
|
+
});
|
|
8189
|
+
},
|
|
8190
|
+
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
8191
|
+
};
|
|
8192
|
+
|
|
8193
|
+
const DataCollectionMethodFindById = {
|
|
8194
|
+
name: 'Find by ID',
|
|
8195
|
+
description: 'Find a single data record in the collection by its id',
|
|
8196
|
+
getInputSchema: ({ collectionHandler, parameters, credentialsSchema }) => ({
|
|
8197
|
+
type: 'object',
|
|
8198
|
+
properties: nonEmptyObjectProperties({
|
|
8199
|
+
id: {
|
|
8200
|
+
type: 'string',
|
|
8201
|
+
referenceCollection: { key: collectionHandler === null || collectionHandler === void 0 ? void 0 : collectionHandler.key, parameters },
|
|
8202
|
+
},
|
|
8203
|
+
credentials: credentialsSchema,
|
|
8204
|
+
}),
|
|
8205
|
+
}),
|
|
8206
|
+
getOutputSchema: ({ collectionSpec }) => {
|
|
8207
|
+
var _a;
|
|
8208
|
+
return ({
|
|
8209
|
+
type: 'object',
|
|
8210
|
+
properties: {
|
|
8211
|
+
record: (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) !== null && _a !== void 0 ? _a : { type: 'object' },
|
|
8212
|
+
},
|
|
8213
|
+
});
|
|
8214
|
+
},
|
|
8215
|
+
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
8216
|
+
};
|
|
8217
|
+
|
|
8218
|
+
const DataCollectionMethodList = {
|
|
8219
|
+
name: 'List',
|
|
8220
|
+
description: 'Return all data records from the collection',
|
|
8221
|
+
getConfigSchema: ({ collectionSpec }) => {
|
|
8222
|
+
var _a, _b;
|
|
8223
|
+
const fields = Object.keys((_b = (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) === null || _a === void 0 ? void 0 : _a.properties) !== null && _b !== void 0 ? _b : {}).map(locatorToField);
|
|
8224
|
+
return {
|
|
8225
|
+
type: 'object',
|
|
8226
|
+
properties: {
|
|
8227
|
+
filterFields: {
|
|
8228
|
+
type: 'array',
|
|
8229
|
+
items: { type: 'string', enum: fields },
|
|
8230
|
+
},
|
|
8231
|
+
},
|
|
8232
|
+
};
|
|
8233
|
+
},
|
|
8234
|
+
getInputSchema: ({ method, collectionSpec, credentialsSchema }) => {
|
|
8235
|
+
const fieldsSchema = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema;
|
|
8236
|
+
let filterSchema;
|
|
8237
|
+
if (method === null || method === void 0 ? void 0 : method.filterFields) {
|
|
8238
|
+
filterSchema = pickFieldsFromSchema(fieldsSchema, method.filterFields);
|
|
8239
|
+
}
|
|
8240
|
+
return {
|
|
8241
|
+
type: 'object',
|
|
8242
|
+
properties: nonEmptyObjectProperties({
|
|
8243
|
+
filter: filterSchema,
|
|
8244
|
+
cursor: {
|
|
8245
|
+
type: 'string',
|
|
8246
|
+
description: 'Cursor returned in response to the previous "list" request',
|
|
8247
|
+
},
|
|
8248
|
+
credentials: credentialsSchema,
|
|
8249
|
+
}),
|
|
8250
|
+
};
|
|
8251
|
+
},
|
|
8252
|
+
getOutputSchema: ({ collectionSpec }) => {
|
|
8253
|
+
var _a;
|
|
8254
|
+
return ({
|
|
8255
|
+
type: 'object',
|
|
8256
|
+
properties: {
|
|
8257
|
+
records: {
|
|
8258
|
+
type: 'array',
|
|
8259
|
+
items: (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) !== null && _a !== void 0 ? _a : { type: 'object' },
|
|
8260
|
+
},
|
|
8261
|
+
cursor: {
|
|
8262
|
+
type: 'string',
|
|
8263
|
+
description: 'Cursor to request the next page of results',
|
|
8264
|
+
},
|
|
8265
|
+
},
|
|
8266
|
+
});
|
|
8267
|
+
},
|
|
8268
|
+
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
8269
|
+
};
|
|
8270
|
+
|
|
8271
|
+
const DataCollectionMethodMatch = {
|
|
8272
|
+
name: 'Match',
|
|
8273
|
+
description: 'Find a single matching record in a data collection by a set of fields',
|
|
8274
|
+
getConfigSchema: ({ collectionSpec }) => {
|
|
8275
|
+
var _a, _b;
|
|
8276
|
+
const fields = Object.keys((_b = (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) === null || _a === void 0 ? void 0 : _a.properties) !== null && _b !== void 0 ? _b : {}).map(locatorToField);
|
|
8277
|
+
return {
|
|
8278
|
+
type: 'object',
|
|
8279
|
+
properties: {
|
|
8280
|
+
fields: {
|
|
8281
|
+
type: 'array',
|
|
8282
|
+
items: { type: 'string', enum: fields },
|
|
8283
|
+
},
|
|
8284
|
+
},
|
|
8285
|
+
};
|
|
8286
|
+
},
|
|
8287
|
+
getInputSchema: ({ collectionSpec, method, credentialsSchema }) => {
|
|
8288
|
+
const fieldsSchema = pickFieldsFromSchema(collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema, method === null || method === void 0 ? void 0 : method.fields);
|
|
8289
|
+
return {
|
|
8290
|
+
type: 'object',
|
|
8291
|
+
properties: nonEmptyObjectProperties({
|
|
8292
|
+
query: transformVariablesWith(fieldsSchema !== null && fieldsSchema !== void 0 ? fieldsSchema : {}, (locator) => `query.${locatorToField(locator)}`),
|
|
8293
|
+
credentials: credentialsSchema,
|
|
8294
|
+
}),
|
|
8295
|
+
};
|
|
8296
|
+
},
|
|
8297
|
+
getOutputSchema: ({ collectionSpec }) => {
|
|
8298
|
+
var _a;
|
|
8299
|
+
return ({
|
|
8300
|
+
type: 'object',
|
|
8301
|
+
properties: {
|
|
8302
|
+
record: (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) !== null && _a !== void 0 ? _a : { type: 'object' },
|
|
8303
|
+
},
|
|
8304
|
+
});
|
|
8305
|
+
},
|
|
8306
|
+
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
8307
|
+
};
|
|
8308
|
+
|
|
8309
|
+
const DataCollectionMethodSearch = {
|
|
8310
|
+
name: 'Search',
|
|
8311
|
+
description: 'Find data records in a collection by a string query',
|
|
8312
|
+
getInputSchema: ({ credentialsSchema }) => ({
|
|
8313
|
+
type: 'object',
|
|
8314
|
+
properties: nonEmptyObjectProperties({
|
|
8315
|
+
query: { type: 'string' },
|
|
8316
|
+
cursor: { type: 'string' },
|
|
8317
|
+
credentials: credentialsSchema,
|
|
8318
|
+
}),
|
|
8319
|
+
}),
|
|
8320
|
+
getOutputSchema: ({ collectionSpec }) => {
|
|
8321
|
+
var _a;
|
|
8322
|
+
return ({
|
|
8323
|
+
type: 'object',
|
|
8324
|
+
properties: {
|
|
8325
|
+
records: {
|
|
8326
|
+
type: 'array',
|
|
8327
|
+
items: (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) !== null && _a !== void 0 ? _a : { type: 'object' },
|
|
8328
|
+
},
|
|
8329
|
+
cursor: { type: 'string' },
|
|
8330
|
+
},
|
|
8331
|
+
});
|
|
8358
8332
|
},
|
|
8333
|
+
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
8359
8334
|
};
|
|
8360
|
-
|
|
8361
|
-
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8335
|
+
|
|
8336
|
+
const DataCollectionMethodUpdate = {
|
|
8337
|
+
name: 'Update',
|
|
8338
|
+
description: 'Update one data record in the collection by its id',
|
|
8339
|
+
getConfigSchema: ({ collectionSpec }) => {
|
|
8340
|
+
var _a, _b;
|
|
8341
|
+
const fields = Object.keys((_b = (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) === null || _a === void 0 ? void 0 : _a.properties) !== null && _b !== void 0 ? _b : {}).map(locatorToField);
|
|
8342
|
+
return {
|
|
8343
|
+
type: 'object',
|
|
8344
|
+
properties: {
|
|
8345
|
+
fields: {
|
|
8346
|
+
type: 'array',
|
|
8347
|
+
items: { type: 'string', enum: fields },
|
|
8348
|
+
},
|
|
8349
|
+
excludedFields: {
|
|
8350
|
+
type: 'array',
|
|
8351
|
+
items: { type: 'string', enum: fields },
|
|
8352
|
+
},
|
|
8353
|
+
},
|
|
8354
|
+
};
|
|
8355
|
+
},
|
|
8356
|
+
getInputSchema: ({ collectionSpec, collectionHandler, credentialsSchema, method, parameters }) => {
|
|
8357
|
+
var _a;
|
|
8358
|
+
let fieldsSchema = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema;
|
|
8359
|
+
if (method === null || method === void 0 ? void 0 : method.fields) {
|
|
8360
|
+
fieldsSchema = pickFieldsFromSchema(fieldsSchema, method.fields);
|
|
8374
8361
|
}
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8362
|
+
if (method === null || method === void 0 ? void 0 : method.excludedFields) {
|
|
8363
|
+
fieldsSchema = excludeFieldsFromSchema(fieldsSchema, method.excludedFields);
|
|
8364
|
+
}
|
|
8365
|
+
return {
|
|
8366
|
+
type: 'object',
|
|
8367
|
+
properties: nonEmptyObjectProperties({
|
|
8368
|
+
id: {
|
|
8369
|
+
type: 'string',
|
|
8370
|
+
referenceCollection: { key: collectionHandler === null || collectionHandler === void 0 ? void 0 : collectionHandler.key, parameters },
|
|
8371
|
+
},
|
|
8372
|
+
fields: (_a = transformVariablesWith(fieldsSchema, (locator) => `fields.${locatorToField(locator)}`)) !== null && _a !== void 0 ? _a : {
|
|
8373
|
+
type: 'object',
|
|
8374
|
+
},
|
|
8375
|
+
credentials: credentialsSchema,
|
|
8376
|
+
}),
|
|
8380
8377
|
};
|
|
8381
|
-
}
|
|
8382
|
-
|
|
8383
|
-
|
|
8378
|
+
},
|
|
8379
|
+
getOutputSchema: ({}) => ({
|
|
8380
|
+
type: 'object',
|
|
8381
|
+
properties: {
|
|
8382
|
+
id: { type: 'string' },
|
|
8383
|
+
},
|
|
8384
|
+
}),
|
|
8385
|
+
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
8386
|
+
};
|
|
8384
8387
|
|
|
8385
8388
|
const GetEventConfig = {
|
|
8386
8389
|
fileKey: 'connector-event-get-event-config',
|
|
@@ -9129,6 +9132,7 @@ const GeneratedConnectorOption = z.z.object({
|
|
|
9129
9132
|
description: z.z.string().optional(),
|
|
9130
9133
|
inputSchema: DataSchema.optional(),
|
|
9131
9134
|
connectorParametersSchema: DataSchema.optional(),
|
|
9135
|
+
oAuthCallbackUri: z.z.string().optional(),
|
|
9132
9136
|
});
|
|
9133
9137
|
const ConnectorOptions = z.z.record(z.z.string(), ConnectorOption);
|
|
9134
9138
|
const WritableConnectorVersionData = ConnectorAuthWithFunctions.extend({
|
|
@@ -10281,6 +10285,9 @@ const FindActionRunLogsQuery = PaginationQuery.extend({
|
|
|
10281
10285
|
.meta({
|
|
10282
10286
|
filterTitle: 'Status',
|
|
10283
10287
|
}),
|
|
10288
|
+
externalAppId: z.z.string().optional().meta({
|
|
10289
|
+
hidden: true,
|
|
10290
|
+
}),
|
|
10284
10291
|
from: z.z
|
|
10285
10292
|
.string()
|
|
10286
10293
|
.optional()
|
|
@@ -10321,6 +10328,13 @@ const FindConnectionsQuery = PaginationQuery.merge(SearchQuery)
|
|
|
10321
10328
|
.meta({
|
|
10322
10329
|
filterTitle: 'Connector',
|
|
10323
10330
|
}),
|
|
10331
|
+
externalAppId: z.z
|
|
10332
|
+
.string()
|
|
10333
|
+
.optional()
|
|
10334
|
+
.meta({
|
|
10335
|
+
filterTitle: 'External App',
|
|
10336
|
+
referenceElementType: exports.WorkspaceElementType.App,
|
|
10337
|
+
}),
|
|
10324
10338
|
disconnected: zodBooleanCoercion()
|
|
10325
10339
|
.optional()
|
|
10326
10340
|
.meta({
|
|
@@ -10341,10 +10355,6 @@ const FindConnectionsQuery = PaginationQuery.merge(SearchQuery)
|
|
|
10341
10355
|
.string()
|
|
10342
10356
|
.optional()
|
|
10343
10357
|
.meta({ hidden: true }),
|
|
10344
|
-
externalAppId: z.z.string().optional().meta({
|
|
10345
|
-
filterTitle: 'External App',
|
|
10346
|
-
referenceElementType: exports.WorkspaceElementType.App,
|
|
10347
|
-
}),
|
|
10348
10358
|
integrationKey: z.z
|
|
10349
10359
|
.string()
|
|
10350
10360
|
.optional()
|
|
@@ -10467,6 +10477,13 @@ const DataSourceInstanceApiResponse = DataSourceApiResponse;
|
|
|
10467
10477
|
const FindDataSourcesQuery = FindIntegrationLevelMembraneInterfaceQuery.omit({ parentId: true }).extend({
|
|
10468
10478
|
dataSourceId: z.z.string().optional(),
|
|
10469
10479
|
universalDataSourceId: z.z.string().optional(),
|
|
10480
|
+
externalAppId: z.z
|
|
10481
|
+
.string()
|
|
10482
|
+
.optional()
|
|
10483
|
+
.meta({
|
|
10484
|
+
filterTitle: 'External App',
|
|
10485
|
+
referenceElementType: exports.WorkspaceElementType.App,
|
|
10486
|
+
}),
|
|
10470
10487
|
});
|
|
10471
10488
|
const FindDataSourceInstancesQuery = FindDataSourcesQuery;
|
|
10472
10489
|
const CreateDataSourceRequest = DataSourceEditableProperties;
|
|
@@ -10550,6 +10567,13 @@ const FlowInstanceApiResponse = FlowApiResponse;
|
|
|
10550
10567
|
const FindFlowsQuery = FindIntegrationLevelMembraneInterfaceQuery.omit({ parentId: true }).extend({
|
|
10551
10568
|
flowId: z.z.string().optional(),
|
|
10552
10569
|
universalFlowId: z.z.string().optional(),
|
|
10570
|
+
externalAppId: z.z
|
|
10571
|
+
.string()
|
|
10572
|
+
.optional()
|
|
10573
|
+
.meta({
|
|
10574
|
+
filterTitle: 'External App',
|
|
10575
|
+
referenceElementType: exports.WorkspaceElementType.App,
|
|
10576
|
+
}),
|
|
10553
10577
|
});
|
|
10554
10578
|
const CreateFlowRequest = FlowEditableProperties;
|
|
10555
10579
|
const UpdateFlowRequest = CreateFlowRequest.extend({}).partial();
|
|
@@ -10627,6 +10651,9 @@ const FindFlowRunsQuery = PaginationQuery.extend({
|
|
|
10627
10651
|
filterTitle: 'Connection',
|
|
10628
10652
|
referenceElementType: exports.WorkspaceElementType.Connection,
|
|
10629
10653
|
}),
|
|
10654
|
+
externalAppId: z.z.string().optional().meta({
|
|
10655
|
+
hidden: true,
|
|
10656
|
+
}),
|
|
10630
10657
|
from: z.z
|
|
10631
10658
|
.string()
|
|
10632
10659
|
.optional()
|
|
@@ -10789,6 +10816,13 @@ const FieldMappingInstanceApiResponse = FieldMappingApiResponse;
|
|
|
10789
10816
|
const FindFieldMappingsQuery = FindIntegrationLevelMembraneInterfaceQuery.omit({ parentId: true }).extend({
|
|
10790
10817
|
fieldMappingId: z.z.string().optional(),
|
|
10791
10818
|
universalFieldMappingId: z.z.string().optional(),
|
|
10819
|
+
externalAppId: z.z
|
|
10820
|
+
.string()
|
|
10821
|
+
.optional()
|
|
10822
|
+
.meta({
|
|
10823
|
+
filterTitle: 'External App',
|
|
10824
|
+
referenceElementType: exports.WorkspaceElementType.App,
|
|
10825
|
+
}),
|
|
10792
10826
|
});
|
|
10793
10827
|
const FindFieldMappingInstancesQuery = FindFieldMappingsQuery;
|
|
10794
10828
|
const CreateFieldMappingRequest = FieldMappingEditableProperties;
|
|
@@ -11060,6 +11094,9 @@ const ListExternalEventLogRecordsQuery = PaginationQuery.extend({
|
|
|
11060
11094
|
.meta({
|
|
11061
11095
|
filterTitle: 'Status',
|
|
11062
11096
|
}),
|
|
11097
|
+
externalAppId: z.z.string().optional().meta({
|
|
11098
|
+
hidden: true,
|
|
11099
|
+
}),
|
|
11063
11100
|
from: z.z
|
|
11064
11101
|
.string()
|
|
11065
11102
|
.optional()
|
|
@@ -11149,6 +11186,9 @@ const FindExternalEventPullsQuery = PaginationQuery.extend({
|
|
|
11149
11186
|
.meta({
|
|
11150
11187
|
filterTitle: 'Status',
|
|
11151
11188
|
}),
|
|
11189
|
+
externalAppId: z.z.string().optional().meta({
|
|
11190
|
+
hidden: true,
|
|
11191
|
+
}),
|
|
11152
11192
|
from: z.z
|
|
11153
11193
|
.string()
|
|
11154
11194
|
.optional()
|
|
@@ -11196,6 +11236,9 @@ const ListExternalEventSubscriptionsQuery = PaginationQuery.merge(IncludeArchive
|
|
|
11196
11236
|
filterTitle: 'Integration',
|
|
11197
11237
|
referenceElementType: exports.WorkspaceElementType.Integration,
|
|
11198
11238
|
}),
|
|
11239
|
+
externalAppId: z.z.string().optional().meta({
|
|
11240
|
+
hidden: true,
|
|
11241
|
+
}),
|
|
11199
11242
|
});
|
|
11200
11243
|
const ExternalEventSubscriptionApiResponse = BaseExternalEventSubscription.extend({
|
|
11201
11244
|
user: BaseCustomer.optional(),
|
|
@@ -11278,6 +11321,9 @@ const ListExternalApiLogsQuery = PaginationQuery.extend({
|
|
|
11278
11321
|
filterTitle: 'Status',
|
|
11279
11322
|
isFlag: true,
|
|
11280
11323
|
}),
|
|
11324
|
+
externalAppId: z.z.string().optional().meta({
|
|
11325
|
+
hidden: true,
|
|
11326
|
+
}),
|
|
11281
11327
|
from: z.z
|
|
11282
11328
|
.string()
|
|
11283
11329
|
.optional()
|
|
@@ -11302,6 +11348,7 @@ const ExternalApiLogApiResponse = z.z.object({
|
|
|
11302
11348
|
customerId: z.z.string(),
|
|
11303
11349
|
integrationId: z.z.string(),
|
|
11304
11350
|
connectionId: z.z.string(),
|
|
11351
|
+
externalAppId: z.z.string().optional(),
|
|
11305
11352
|
statusCode: z.z.number(),
|
|
11306
11353
|
isSuccess: z.z.boolean(),
|
|
11307
11354
|
s3Uri: z.z.string(),
|
|
@@ -11341,6 +11388,9 @@ const ListIncomingWebhooksQuery = PaginationQuery.extend({
|
|
|
11341
11388
|
.meta({
|
|
11342
11389
|
filterTitle: 'Status',
|
|
11343
11390
|
}),
|
|
11391
|
+
externalAppId: z.z.string().optional().meta({
|
|
11392
|
+
hidden: true,
|
|
11393
|
+
}),
|
|
11344
11394
|
from: z.z
|
|
11345
11395
|
.string()
|
|
11346
11396
|
.optional()
|
|
@@ -11363,6 +11413,7 @@ const IncomingWebhookApiResponse = z.z.object({
|
|
|
11363
11413
|
customerId: z.z.string(),
|
|
11364
11414
|
integrationId: z.z.string(),
|
|
11365
11415
|
connectionId: z.z.string(),
|
|
11416
|
+
externalAppId: z.z.string().optional(),
|
|
11366
11417
|
subscriptionId: z.z.string(),
|
|
11367
11418
|
userId: z.z.string(),
|
|
11368
11419
|
uuid: z.z.string(),
|
|
@@ -11376,12 +11427,14 @@ const IncomingWebhookApiResponse = z.z.object({
|
|
|
11376
11427
|
|
|
11377
11428
|
const CreateConnectedProductRequest = z.z.object({
|
|
11378
11429
|
name: z.z.string(),
|
|
11430
|
+
key: z.z.string().optional(),
|
|
11379
11431
|
type: ConnectedProductType,
|
|
11380
11432
|
audience: ConnectedProductAudience.optional(),
|
|
11381
11433
|
parameters: AiAgentParameters.optional(),
|
|
11382
11434
|
});
|
|
11383
11435
|
const UpdateConnectedProductRequest = z.z.object({
|
|
11384
11436
|
name: z.z.string().optional(),
|
|
11437
|
+
key: z.z.string().optional(),
|
|
11385
11438
|
type: ConnectedProductType.optional(),
|
|
11386
11439
|
audience: ConnectedProductAudience.optional(),
|
|
11387
11440
|
parameters: AiAgentParameters.optional(),
|
|
@@ -11390,7 +11443,6 @@ const FindConnectedProductsQuery = z.z
|
|
|
11390
11443
|
.object({
|
|
11391
11444
|
type: ConnectedProductType.optional(),
|
|
11392
11445
|
audience: ConnectedProductAudience.optional(),
|
|
11393
|
-
key: z.z.string().optional(),
|
|
11394
11446
|
})
|
|
11395
11447
|
.merge(PaginationQuery)
|
|
11396
11448
|
.merge(SearchQuery)
|
|
@@ -11716,6 +11768,26 @@ const WorkspaceElementSpecs = {
|
|
|
11716
11768
|
apiPath: 'customers',
|
|
11717
11769
|
name: 'Customer',
|
|
11718
11770
|
namePlural: 'Customers',
|
|
11771
|
+
relatedIntegrationLayerElements: [
|
|
11772
|
+
exports.WorkspaceElementType.Connection,
|
|
11773
|
+
exports.WorkspaceElementType.Action,
|
|
11774
|
+
exports.WorkspaceElementType.Flow,
|
|
11775
|
+
exports.WorkspaceElementType.ExternalEventSubscription,
|
|
11776
|
+
exports.WorkspaceElementType.AppEventSubscription,
|
|
11777
|
+
exports.WorkspaceElementType.DataSource,
|
|
11778
|
+
exports.WorkspaceElementType.FieldMapping,
|
|
11779
|
+
exports.WorkspaceElementType.AppDataSchemaInstance,
|
|
11780
|
+
exports.WorkspaceElementType.DataLinkTableInstance,
|
|
11781
|
+
],
|
|
11782
|
+
relatedActivityLogElements: [
|
|
11783
|
+
exports.WorkspaceElementType.FlowRun,
|
|
11784
|
+
exports.WorkspaceElementType.ActionRunLogRecord,
|
|
11785
|
+
exports.WorkspaceElementType.ExternalApiLogRecord,
|
|
11786
|
+
exports.WorkspaceElementType.IncomingWebhookLogRecord,
|
|
11787
|
+
exports.WorkspaceElementType.ExternalEventLogRecord,
|
|
11788
|
+
exports.WorkspaceElementType.ExternalEventPull,
|
|
11789
|
+
exports.WorkspaceElementType.AppEventLogRecord,
|
|
11790
|
+
],
|
|
11719
11791
|
},
|
|
11720
11792
|
[exports.WorkspaceElementType.App]: {
|
|
11721
11793
|
type: exports.WorkspaceElementType.App,
|
|
@@ -11724,6 +11796,21 @@ const WorkspaceElementSpecs = {
|
|
|
11724
11796
|
namePlural: 'Apps',
|
|
11725
11797
|
hasKey: true,
|
|
11726
11798
|
hasPublicLayer: true,
|
|
11799
|
+
relatedIntegrationLayerElements: [
|
|
11800
|
+
exports.WorkspaceElementType.Connection,
|
|
11801
|
+
exports.WorkspaceElementType.Action,
|
|
11802
|
+
exports.WorkspaceElementType.Flow,
|
|
11803
|
+
exports.WorkspaceElementType.DataSource,
|
|
11804
|
+
exports.WorkspaceElementType.FieldMapping,
|
|
11805
|
+
],
|
|
11806
|
+
relatedActivityLogElements: [
|
|
11807
|
+
exports.WorkspaceElementType.FlowRun,
|
|
11808
|
+
exports.WorkspaceElementType.ActionRunLogRecord,
|
|
11809
|
+
exports.WorkspaceElementType.ExternalApiLogRecord,
|
|
11810
|
+
exports.WorkspaceElementType.IncomingWebhookLogRecord,
|
|
11811
|
+
exports.WorkspaceElementType.ExternalEventLogRecord,
|
|
11812
|
+
exports.WorkspaceElementType.ExternalEventPull,
|
|
11813
|
+
],
|
|
11727
11814
|
},
|
|
11728
11815
|
[exports.WorkspaceElementType.Integration]: {
|
|
11729
11816
|
type: exports.WorkspaceElementType.Integration,
|
|
@@ -11733,6 +11820,27 @@ const WorkspaceElementSpecs = {
|
|
|
11733
11820
|
editablePropertiesSchema: IntegrationEditableProperties,
|
|
11734
11821
|
exportPropertiesSchema: IntegrationExportProperties,
|
|
11735
11822
|
hasKey: true,
|
|
11823
|
+
relatedIntegrationLayerElements: [
|
|
11824
|
+
exports.WorkspaceElementType.Connection,
|
|
11825
|
+
exports.WorkspaceElementType.Package,
|
|
11826
|
+
exports.WorkspaceElementType.Action,
|
|
11827
|
+
exports.WorkspaceElementType.Flow,
|
|
11828
|
+
exports.WorkspaceElementType.ExternalEventSubscription,
|
|
11829
|
+
exports.WorkspaceElementType.AppEventSubscription,
|
|
11830
|
+
exports.WorkspaceElementType.DataSource,
|
|
11831
|
+
exports.WorkspaceElementType.FieldMapping,
|
|
11832
|
+
exports.WorkspaceElementType.AppDataSchemaInstance,
|
|
11833
|
+
exports.WorkspaceElementType.DataLinkTableInstance,
|
|
11834
|
+
],
|
|
11835
|
+
relatedActivityLogElements: [
|
|
11836
|
+
exports.WorkspaceElementType.FlowRun,
|
|
11837
|
+
exports.WorkspaceElementType.ActionRunLogRecord,
|
|
11838
|
+
exports.WorkspaceElementType.ExternalApiLogRecord,
|
|
11839
|
+
exports.WorkspaceElementType.IncomingWebhookLogRecord,
|
|
11840
|
+
exports.WorkspaceElementType.ExternalEventLogRecord,
|
|
11841
|
+
exports.WorkspaceElementType.ExternalEventPull,
|
|
11842
|
+
exports.WorkspaceElementType.AppEventLogRecord,
|
|
11843
|
+
],
|
|
11736
11844
|
},
|
|
11737
11845
|
[exports.WorkspaceElementType.Connector]: {
|
|
11738
11846
|
type: exports.WorkspaceElementType.Connector,
|
|
@@ -11751,6 +11859,26 @@ const WorkspaceElementSpecs = {
|
|
|
11751
11859
|
exportPropertiesSchema: ConnectionExportProperties,
|
|
11752
11860
|
hasKey: false,
|
|
11753
11861
|
hasUuid: false,
|
|
11862
|
+
statsKey: 'connections',
|
|
11863
|
+
relatedIntegrationLayerElements: [
|
|
11864
|
+
exports.WorkspaceElementType.Action,
|
|
11865
|
+
exports.WorkspaceElementType.Flow,
|
|
11866
|
+
exports.WorkspaceElementType.ExternalEventSubscription,
|
|
11867
|
+
exports.WorkspaceElementType.AppEventSubscription,
|
|
11868
|
+
exports.WorkspaceElementType.DataSource,
|
|
11869
|
+
exports.WorkspaceElementType.FieldMapping,
|
|
11870
|
+
exports.WorkspaceElementType.AppDataSchemaInstance,
|
|
11871
|
+
exports.WorkspaceElementType.DataLinkTableInstance,
|
|
11872
|
+
],
|
|
11873
|
+
relatedActivityLogElements: [
|
|
11874
|
+
exports.WorkspaceElementType.FlowRun,
|
|
11875
|
+
exports.WorkspaceElementType.ActionRunLogRecord,
|
|
11876
|
+
exports.WorkspaceElementType.ExternalApiLogRecord,
|
|
11877
|
+
exports.WorkspaceElementType.IncomingWebhookLogRecord,
|
|
11878
|
+
exports.WorkspaceElementType.ExternalEventLogRecord,
|
|
11879
|
+
exports.WorkspaceElementType.ExternalEventPull,
|
|
11880
|
+
exports.WorkspaceElementType.AppEventLogRecord,
|
|
11881
|
+
],
|
|
11754
11882
|
},
|
|
11755
11883
|
[exports.WorkspaceElementType.Package]: {
|
|
11756
11884
|
type: exports.WorkspaceElementType.Package,
|
|
@@ -11767,6 +11895,7 @@ const WorkspaceElementSpecs = {
|
|
|
11767
11895
|
hasParentChildRelationship: true,
|
|
11768
11896
|
hasPublicLayer: true,
|
|
11769
11897
|
isProOnly: true,
|
|
11898
|
+
statsKey: 'packages',
|
|
11770
11899
|
},
|
|
11771
11900
|
[exports.WorkspaceElementType.ActionInstance]: {
|
|
11772
11901
|
type: exports.WorkspaceElementType.ActionInstance,
|
|
@@ -11793,12 +11922,14 @@ const WorkspaceElementSpecs = {
|
|
|
11793
11922
|
hasParentChildRelationship: true,
|
|
11794
11923
|
hasKey: true,
|
|
11795
11924
|
hasPublicLayer: true,
|
|
11925
|
+
statsKey: 'actions',
|
|
11796
11926
|
},
|
|
11797
11927
|
[exports.WorkspaceElementType.ActionRunLogRecord]: {
|
|
11798
11928
|
type: exports.WorkspaceElementType.ActionRunLogRecord,
|
|
11799
11929
|
apiPath: 'action-run-logs',
|
|
11800
11930
|
name: 'Action Run Log Record',
|
|
11801
11931
|
namePlural: 'Action Run Log Records',
|
|
11932
|
+
statsKey: 'actionRunLogs',
|
|
11802
11933
|
},
|
|
11803
11934
|
[exports.WorkspaceElementType.Flow]: {
|
|
11804
11935
|
type: exports.WorkspaceElementType.Flow,
|
|
@@ -11816,6 +11947,7 @@ const WorkspaceElementSpecs = {
|
|
|
11816
11947
|
hasParentChildRelationship: true,
|
|
11817
11948
|
hasKey: true,
|
|
11818
11949
|
isProOnly: true,
|
|
11950
|
+
statsKey: 'flows',
|
|
11819
11951
|
},
|
|
11820
11952
|
[exports.WorkspaceElementType.FlowInstance]: {
|
|
11821
11953
|
type: exports.WorkspaceElementType.FlowInstance,
|
|
@@ -11836,6 +11968,7 @@ const WorkspaceElementSpecs = {
|
|
|
11836
11968
|
name: 'Flow run',
|
|
11837
11969
|
namePlural: 'Flow runs',
|
|
11838
11970
|
isProOnly: true,
|
|
11971
|
+
statsKey: 'flowRuns',
|
|
11839
11972
|
},
|
|
11840
11973
|
[exports.WorkspaceElementType.FieldMapping]: {
|
|
11841
11974
|
type: exports.WorkspaceElementType.FieldMapping,
|
|
@@ -11853,6 +11986,7 @@ const WorkspaceElementSpecs = {
|
|
|
11853
11986
|
hasParentChildRelationship: true,
|
|
11854
11987
|
hasKey: true,
|
|
11855
11988
|
isProOnly: true,
|
|
11989
|
+
statsKey: 'fieldMappings',
|
|
11856
11990
|
},
|
|
11857
11991
|
[exports.WorkspaceElementType.FieldMappingInstance]: {
|
|
11858
11992
|
type: exports.WorkspaceElementType.FieldMappingInstance,
|
|
@@ -11882,6 +12016,7 @@ const WorkspaceElementSpecs = {
|
|
|
11882
12016
|
hasParentChildRelationship: true,
|
|
11883
12017
|
hasKey: true,
|
|
11884
12018
|
isProOnly: true,
|
|
12019
|
+
statsKey: 'dataSources',
|
|
11885
12020
|
},
|
|
11886
12021
|
[exports.WorkspaceElementType.DataSourceInstance]: {
|
|
11887
12022
|
type: exports.WorkspaceElementType.DataSourceInstance,
|
|
@@ -11916,6 +12051,7 @@ const WorkspaceElementSpecs = {
|
|
|
11916
12051
|
parentFieldKey: 'dataLinkTableId',
|
|
11917
12052
|
isMembraneInterface: true,
|
|
11918
12053
|
isProOnly: true,
|
|
12054
|
+
statsKey: 'dataLinkTableInstances',
|
|
11919
12055
|
},
|
|
11920
12056
|
[exports.WorkspaceElementType.AppEventType]: {
|
|
11921
12057
|
type: exports.WorkspaceElementType.AppEventType,
|
|
@@ -11936,6 +12072,7 @@ const WorkspaceElementSpecs = {
|
|
|
11936
12072
|
namePlural: 'App Event Subscriptions',
|
|
11937
12073
|
isMembraneInterface: true,
|
|
11938
12074
|
isProOnly: true,
|
|
12075
|
+
statsKey: 'appEventSubscriptions',
|
|
11939
12076
|
},
|
|
11940
12077
|
[exports.WorkspaceElementType.AppEventLogRecord]: {
|
|
11941
12078
|
type: exports.WorkspaceElementType.AppEventLogRecord,
|
|
@@ -11943,6 +12080,7 @@ const WorkspaceElementSpecs = {
|
|
|
11943
12080
|
name: 'App Event Log Record',
|
|
11944
12081
|
namePlural: 'App Event Log Records',
|
|
11945
12082
|
isProOnly: true,
|
|
12083
|
+
statsKey: 'appEvents',
|
|
11946
12084
|
},
|
|
11947
12085
|
[exports.WorkspaceElementType.AppDataSchema]: {
|
|
11948
12086
|
type: exports.WorkspaceElementType.AppDataSchema,
|
|
@@ -11964,6 +12102,7 @@ const WorkspaceElementSpecs = {
|
|
|
11964
12102
|
parentFieldKey: 'appDataSchemaId',
|
|
11965
12103
|
isMembraneInterface: true,
|
|
11966
12104
|
isProOnly: true,
|
|
12105
|
+
statsKey: 'appDataSchemaInstances',
|
|
11967
12106
|
},
|
|
11968
12107
|
[exports.WorkspaceElementType.ExternalEventSubscription]: {
|
|
11969
12108
|
type: exports.WorkspaceElementType.ExternalEventSubscription,
|
|
@@ -11972,6 +12111,7 @@ const WorkspaceElementSpecs = {
|
|
|
11972
12111
|
namePlural: 'External Event Subscriptions',
|
|
11973
12112
|
isMembraneInterface: true,
|
|
11974
12113
|
isProOnly: true,
|
|
12114
|
+
statsKey: 'externalEventSubscriptions',
|
|
11975
12115
|
},
|
|
11976
12116
|
[exports.WorkspaceElementType.ExternalEventLogRecord]: {
|
|
11977
12117
|
type: exports.WorkspaceElementType.ExternalEventLogRecord,
|
|
@@ -11979,6 +12119,7 @@ const WorkspaceElementSpecs = {
|
|
|
11979
12119
|
name: 'External Event Log Record',
|
|
11980
12120
|
namePlural: 'External Event Log Records',
|
|
11981
12121
|
isProOnly: true,
|
|
12122
|
+
statsKey: 'externalEvents',
|
|
11982
12123
|
},
|
|
11983
12124
|
[exports.WorkspaceElementType.ExternalEventPull]: {
|
|
11984
12125
|
type: exports.WorkspaceElementType.ExternalEventPull,
|
|
@@ -11986,6 +12127,21 @@ const WorkspaceElementSpecs = {
|
|
|
11986
12127
|
name: 'External Event Pull',
|
|
11987
12128
|
namePlural: 'External Event Pulls',
|
|
11988
12129
|
isProOnly: true,
|
|
12130
|
+
statsKey: 'externalEventPulls',
|
|
12131
|
+
},
|
|
12132
|
+
[exports.WorkspaceElementType.ExternalApiLogRecord]: {
|
|
12133
|
+
type: exports.WorkspaceElementType.ExternalApiLogRecord,
|
|
12134
|
+
apiPath: 'external-api-logs',
|
|
12135
|
+
name: 'External API Log Record',
|
|
12136
|
+
namePlural: 'External API Log Records',
|
|
12137
|
+
statsKey: 'externalApiLogs',
|
|
12138
|
+
},
|
|
12139
|
+
[exports.WorkspaceElementType.IncomingWebhookLogRecord]: {
|
|
12140
|
+
type: exports.WorkspaceElementType.IncomingWebhookLogRecord,
|
|
12141
|
+
apiPath: 'incoming-webhooks',
|
|
12142
|
+
name: 'Incoming Webhook Log Record',
|
|
12143
|
+
namePlural: 'Incoming Webhook Log Records',
|
|
12144
|
+
statsKey: 'externalWebhookLogs',
|
|
11989
12145
|
},
|
|
11990
12146
|
[exports.WorkspaceElementType.Screen]: {
|
|
11991
12147
|
type: exports.WorkspaceElementType.Screen,
|
|
@@ -12389,20 +12545,21 @@ const StatsFilterQuery = z.z.object({
|
|
|
12389
12545
|
tenantId: z.z.string().optional(),
|
|
12390
12546
|
integrationId: z.z.string().optional(),
|
|
12391
12547
|
connectionId: z.z.string().optional(),
|
|
12548
|
+
externalAppId: z.z.string().optional(),
|
|
12392
12549
|
});
|
|
12393
12550
|
const ActivityStatsQuery = StatsFilterQuery.extend({
|
|
12394
12551
|
startDatetime: z.z.string().datetime({ offset: true }),
|
|
12552
|
+
elementType: z.z.enum(exports.WorkspaceElementType).optional(),
|
|
12553
|
+
});
|
|
12554
|
+
const IntegrationLayerStatsQuery = StatsFilterQuery.extend({
|
|
12555
|
+
elementType: z.z.enum(exports.WorkspaceElementType).optional(),
|
|
12395
12556
|
});
|
|
12396
|
-
const IntegrationLayerStatsQuery = StatsFilterQuery;
|
|
12397
12557
|
const ActionRunsStatsQuery = z.z.object({
|
|
12398
|
-
actionId: z.z.string()
|
|
12399
|
-
connectionActionId: z.z.string().optional(),
|
|
12558
|
+
actionId: z.z.string(),
|
|
12400
12559
|
startDatetime: z.z.string().datetime({ offset: true }),
|
|
12401
12560
|
});
|
|
12402
12561
|
const FlowRunsStatsQuery = z.z.object({
|
|
12403
|
-
|
|
12404
|
-
connectionFlowId: z.z.string().optional(),
|
|
12405
|
-
universalFlowId: z.z.string().optional(),
|
|
12562
|
+
flowId: z.z.string(),
|
|
12406
12563
|
startDatetime: z.z.string().datetime({ offset: true }),
|
|
12407
12564
|
});
|
|
12408
12565
|
const WORKSPACE_ELEMENTS_STATS_COLLECTIONS = [
|
|
@@ -12963,6 +13120,7 @@ const WORKSPACE_SIZE_LIMITS = [
|
|
|
12963
13120
|
const EDITABLE_LIMITS = [
|
|
12964
13121
|
'parallelApiRequestsPerCustomer',
|
|
12965
13122
|
'parallelBackgroundJobsPerCustomer',
|
|
13123
|
+
'parallelCustomCodeRunsPerCustomer',
|
|
12966
13124
|
'apiRequestsPerCustomerPerSecond',
|
|
12967
13125
|
'apiRequestsPerCustomerPerHour',
|
|
12968
13126
|
'externalEventsPerCustomerPerDay',
|
|
@@ -15336,6 +15494,7 @@ const AgentSession = z.z.object({
|
|
|
15336
15494
|
hasWorker: z.z.boolean(),
|
|
15337
15495
|
isExternal: z.z.boolean().optional(),
|
|
15338
15496
|
agentName: z.z.enum(exports.AgentName).optional(),
|
|
15497
|
+
output: z.z.record(z.z.string(), z.z.unknown()).optional(),
|
|
15339
15498
|
createdAt: z.z.iso.datetime(),
|
|
15340
15499
|
updatedAt: z.z.iso.datetime(),
|
|
15341
15500
|
});
|
|
@@ -15363,6 +15522,7 @@ const PatchAgentSessionSchema = z.z.object({
|
|
|
15363
15522
|
cost: z.z.number().optional(),
|
|
15364
15523
|
error: ErrorDataSchema.optional(),
|
|
15365
15524
|
opencodeSessionUuid: z.z.string().optional(),
|
|
15525
|
+
output: z.z.record(z.z.string(), z.z.unknown()).optional(),
|
|
15366
15526
|
status: z.z.enum(exports.AgentSessionStatus).optional(),
|
|
15367
15527
|
});
|
|
15368
15528
|
|
|
@@ -15495,25 +15655,6 @@ const CreateClusterRequest = z.z.object({
|
|
|
15495
15655
|
});
|
|
15496
15656
|
const ListClustersQuery = PaginationQuery;
|
|
15497
15657
|
|
|
15498
|
-
class UI {
|
|
15499
|
-
constructor(client) {
|
|
15500
|
-
this.client = client;
|
|
15501
|
-
}
|
|
15502
|
-
async connect(options = {}) {
|
|
15503
|
-
const { url, postData } = await this.client.getScreensPostData('connect', {
|
|
15504
|
-
...options,
|
|
15505
|
-
allowMultipleConnections: options.allowMultipleConnections ? '1' : '',
|
|
15506
|
-
connectorParameters: options.connectorParameters ? JSON.stringify(options.connectorParameters) : undefined,
|
|
15507
|
-
});
|
|
15508
|
-
return new Promise((resolve) => {
|
|
15509
|
-
return openIframeWithPost(url, postData, {
|
|
15510
|
-
onClose: () => resolve(null),
|
|
15511
|
-
onSuccess: (connection) => resolve(connection),
|
|
15512
|
-
});
|
|
15513
|
-
});
|
|
15514
|
-
}
|
|
15515
|
-
}
|
|
15516
|
-
|
|
15517
15658
|
const API_VERSIONS = {
|
|
15518
15659
|
LEGACY: 'legacy',
|
|
15519
15660
|
'2025-10-21': '2025-10-21',
|
|
@@ -15765,6 +15906,36 @@ class MembraneApiClient {
|
|
|
15765
15906
|
}
|
|
15766
15907
|
}
|
|
15767
15908
|
|
|
15909
|
+
class UI {
|
|
15910
|
+
constructor(client) {
|
|
15911
|
+
this.client = client;
|
|
15912
|
+
}
|
|
15913
|
+
async connect(options = {}) {
|
|
15914
|
+
const { url, postData } = await this.client.getScreensPostData('connect', {
|
|
15915
|
+
...options,
|
|
15916
|
+
allowMultipleConnections: options.allowMultipleConnections ? '1' : '',
|
|
15917
|
+
connectorParameters: options.connectorParameters ? JSON.stringify(options.connectorParameters) : undefined,
|
|
15918
|
+
});
|
|
15919
|
+
return new Promise((resolve) => {
|
|
15920
|
+
return openIframeWithPost(url, postData, {
|
|
15921
|
+
onClose: () => resolve(null),
|
|
15922
|
+
onSuccess: (connection) => resolve(connection),
|
|
15923
|
+
});
|
|
15924
|
+
});
|
|
15925
|
+
}
|
|
15926
|
+
async UNSAFE_agentSession(options) {
|
|
15927
|
+
const { url, postData } = await this.client.getScreensPostData('agent-session', {
|
|
15928
|
+
sessionId: options.sessionId,
|
|
15929
|
+
theme: options.theme,
|
|
15930
|
+
});
|
|
15931
|
+
return new Promise((resolve) => {
|
|
15932
|
+
return openIframeWithPost(url, postData, {
|
|
15933
|
+
onClose: () => resolve(),
|
|
15934
|
+
});
|
|
15935
|
+
});
|
|
15936
|
+
}
|
|
15937
|
+
}
|
|
15938
|
+
|
|
15768
15939
|
class MembraneClient extends MembraneApiClient {
|
|
15769
15940
|
constructor(options) {
|
|
15770
15941
|
super(options);
|