@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.browser.mjs
CHANGED
|
@@ -3471,6 +3471,8 @@ var WorkspaceElementType;
|
|
|
3471
3471
|
WorkspaceElementType["ExternalEventPull"] = "external-event-pull";
|
|
3472
3472
|
WorkspaceElementType["Screen"] = "screen";
|
|
3473
3473
|
WorkspaceElementType["ActionRunLogRecord"] = "action-run-log-record";
|
|
3474
|
+
WorkspaceElementType["ExternalApiLogRecord"] = "external-api-log-record";
|
|
3475
|
+
WorkspaceElementType["IncomingWebhookLogRecord"] = "incoming-webhook-log-record";
|
|
3474
3476
|
WorkspaceElementType["ConnectedProduct"] = "connected-product";
|
|
3475
3477
|
})(WorkspaceElementType || (WorkspaceElementType = {}));
|
|
3476
3478
|
var WorkspaceEventType;
|
|
@@ -3669,6 +3671,7 @@ const ActivityLogRecord = TenantLayerElement.extend({
|
|
|
3669
3671
|
id: z.string(),
|
|
3670
3672
|
integrationId: z.string().optional(),
|
|
3671
3673
|
connectionId: z.string().optional(),
|
|
3674
|
+
externalAppId: z.string().optional(),
|
|
3672
3675
|
});
|
|
3673
3676
|
const WorkspaceElementSearchQuery = z.object({
|
|
3674
3677
|
q: z.string().min(1).max(200),
|
|
@@ -4003,6 +4006,97 @@ class ConnectionSpec {
|
|
|
4003
4006
|
}
|
|
4004
4007
|
}
|
|
4005
4008
|
|
|
4009
|
+
var FunctionType;
|
|
4010
|
+
(function (FunctionType) {
|
|
4011
|
+
FunctionType["mapping"] = "mapping";
|
|
4012
|
+
FunctionType["operationMapping"] = "operation-mapping";
|
|
4013
|
+
FunctionType["restApiMapping"] = "rest-api-mapping";
|
|
4014
|
+
FunctionType["graphqlApiMapping"] = "graphql-api-mapping";
|
|
4015
|
+
FunctionType["javascript"] = "javascript";
|
|
4016
|
+
})(FunctionType || (FunctionType = {}));
|
|
4017
|
+
const BaseFunctionDefinition = z.object({
|
|
4018
|
+
type: z.enum([
|
|
4019
|
+
FunctionType.mapping,
|
|
4020
|
+
FunctionType.operationMapping,
|
|
4021
|
+
FunctionType.restApiMapping,
|
|
4022
|
+
FunctionType.graphqlApiMapping,
|
|
4023
|
+
FunctionType.javascript,
|
|
4024
|
+
]),
|
|
4025
|
+
});
|
|
4026
|
+
const GenericFunctionDefinition = z
|
|
4027
|
+
.object({
|
|
4028
|
+
type: z.enum(['mapping', 'operation-mapping', 'rest-api-mapping', 'graphql-api-mapping', 'javascript']).optional(),
|
|
4029
|
+
})
|
|
4030
|
+
.loose();
|
|
4031
|
+
|
|
4032
|
+
const GraphQLFieldMappingSchema = z.lazy(() => z.object({
|
|
4033
|
+
field: z.string(),
|
|
4034
|
+
args: z.record(z.string(), z.any()).optional(),
|
|
4035
|
+
subFields: z.array(GraphQLFieldMappingSchema).optional(),
|
|
4036
|
+
}));
|
|
4037
|
+
const GraphQLApiMappingSchema = z.object({
|
|
4038
|
+
path: z.string(),
|
|
4039
|
+
operationType: z.enum(['query', 'mutation']),
|
|
4040
|
+
requestMapping: z.array(GraphQLFieldMappingSchema),
|
|
4041
|
+
responseMapping: z.any().optional(),
|
|
4042
|
+
});
|
|
4043
|
+
const GraphqlApiMappingFunction = z.object({
|
|
4044
|
+
type: z.literal(FunctionType.graphqlApiMapping),
|
|
4045
|
+
mapping: GraphQLApiMappingSchema,
|
|
4046
|
+
});
|
|
4047
|
+
|
|
4048
|
+
const JavascriptFunction = z.object({
|
|
4049
|
+
type: z.literal(FunctionType.javascript),
|
|
4050
|
+
code: z.string(),
|
|
4051
|
+
});
|
|
4052
|
+
|
|
4053
|
+
const MappingSchema = z.any();
|
|
4054
|
+
const MappingFunction = z.object({
|
|
4055
|
+
type: z.literal(FunctionType.mapping),
|
|
4056
|
+
mapping: MappingSchema,
|
|
4057
|
+
});
|
|
4058
|
+
|
|
4059
|
+
const OperationMappingSchema = z.object({
|
|
4060
|
+
operationKey: z.string(),
|
|
4061
|
+
inputMapping: z.any().optional(),
|
|
4062
|
+
outputMapping: z.any().optional(),
|
|
4063
|
+
});
|
|
4064
|
+
const OperationMappingFunction = z.object({
|
|
4065
|
+
type: z.literal(FunctionType.operationMapping),
|
|
4066
|
+
mapping: OperationMappingSchema,
|
|
4067
|
+
});
|
|
4068
|
+
|
|
4069
|
+
const RequestMappingSchema = z.object({
|
|
4070
|
+
pathParameters: z.any().optional(),
|
|
4071
|
+
query: z.any().optional(),
|
|
4072
|
+
data: z.any().optional(),
|
|
4073
|
+
headers: z.any().optional(),
|
|
4074
|
+
});
|
|
4075
|
+
const RestApiMappingSchema = z.object({
|
|
4076
|
+
path: z.string(),
|
|
4077
|
+
method: z.string(),
|
|
4078
|
+
requestMapping: RequestMappingSchema,
|
|
4079
|
+
responseMapping: z.any().optional(),
|
|
4080
|
+
});
|
|
4081
|
+
const OpenapiMappingSchema = z.object({
|
|
4082
|
+
path: z.string(),
|
|
4083
|
+
method: z.string(),
|
|
4084
|
+
requestMapping: RequestMappingSchema,
|
|
4085
|
+
responseMapping: z.any().optional(),
|
|
4086
|
+
});
|
|
4087
|
+
const RestApiMappingFunction = z.object({
|
|
4088
|
+
type: z.literal(FunctionType.restApiMapping),
|
|
4089
|
+
mapping: RestApiMappingSchema,
|
|
4090
|
+
});
|
|
4091
|
+
|
|
4092
|
+
const FunctionDefinition = z.union([
|
|
4093
|
+
MappingFunction,
|
|
4094
|
+
OperationMappingFunction,
|
|
4095
|
+
RestApiMappingFunction,
|
|
4096
|
+
GraphqlApiMappingFunction,
|
|
4097
|
+
JavascriptFunction,
|
|
4098
|
+
]);
|
|
4099
|
+
|
|
4006
4100
|
var ConnectorMethodImplementationType;
|
|
4007
4101
|
(function (ConnectorMethodImplementationType) {
|
|
4008
4102
|
ConnectorMethodImplementationType["mapping"] = "mapping";
|
|
@@ -4399,97 +4493,6 @@ const REST_API_CLIENT_SCHEMA$1 = {
|
|
|
4399
4493
|
},
|
|
4400
4494
|
};
|
|
4401
4495
|
|
|
4402
|
-
var FunctionType;
|
|
4403
|
-
(function (FunctionType) {
|
|
4404
|
-
FunctionType["mapping"] = "mapping";
|
|
4405
|
-
FunctionType["operationMapping"] = "operation-mapping";
|
|
4406
|
-
FunctionType["restApiMapping"] = "rest-api-mapping";
|
|
4407
|
-
FunctionType["graphqlApiMapping"] = "graphql-api-mapping";
|
|
4408
|
-
FunctionType["javascript"] = "javascript";
|
|
4409
|
-
})(FunctionType || (FunctionType = {}));
|
|
4410
|
-
const BaseFunctionDefinition = z.object({
|
|
4411
|
-
type: z.enum([
|
|
4412
|
-
FunctionType.mapping,
|
|
4413
|
-
FunctionType.operationMapping,
|
|
4414
|
-
FunctionType.restApiMapping,
|
|
4415
|
-
FunctionType.graphqlApiMapping,
|
|
4416
|
-
FunctionType.javascript,
|
|
4417
|
-
]),
|
|
4418
|
-
});
|
|
4419
|
-
const GenericFunctionDefinition = z
|
|
4420
|
-
.object({
|
|
4421
|
-
type: z.enum(['mapping', 'operation-mapping', 'rest-api-mapping', 'graphql-api-mapping', 'javascript']).optional(),
|
|
4422
|
-
})
|
|
4423
|
-
.loose();
|
|
4424
|
-
|
|
4425
|
-
const GraphQLFieldMappingSchema = z.lazy(() => z.object({
|
|
4426
|
-
field: z.string(),
|
|
4427
|
-
args: z.record(z.string(), z.any()).optional(),
|
|
4428
|
-
subFields: z.array(GraphQLFieldMappingSchema).optional(),
|
|
4429
|
-
}));
|
|
4430
|
-
const GraphQLApiMappingSchema = z.object({
|
|
4431
|
-
path: z.string(),
|
|
4432
|
-
operationType: z.enum(['query', 'mutation']),
|
|
4433
|
-
requestMapping: z.array(GraphQLFieldMappingSchema),
|
|
4434
|
-
responseMapping: z.any().optional(),
|
|
4435
|
-
});
|
|
4436
|
-
const GraphqlApiMappingFunction = z.object({
|
|
4437
|
-
type: z.literal(FunctionType.graphqlApiMapping),
|
|
4438
|
-
mapping: GraphQLApiMappingSchema,
|
|
4439
|
-
});
|
|
4440
|
-
|
|
4441
|
-
const JavascriptFunction = z.object({
|
|
4442
|
-
type: z.literal(FunctionType.javascript),
|
|
4443
|
-
code: z.string(),
|
|
4444
|
-
});
|
|
4445
|
-
|
|
4446
|
-
const MappingSchema = z.any();
|
|
4447
|
-
const MappingFunction = z.object({
|
|
4448
|
-
type: z.literal(FunctionType.mapping),
|
|
4449
|
-
mapping: MappingSchema,
|
|
4450
|
-
});
|
|
4451
|
-
|
|
4452
|
-
const OperationMappingSchema = z.object({
|
|
4453
|
-
operationKey: z.string(),
|
|
4454
|
-
inputMapping: z.any().optional(),
|
|
4455
|
-
outputMapping: z.any().optional(),
|
|
4456
|
-
});
|
|
4457
|
-
const OperationMappingFunction = z.object({
|
|
4458
|
-
type: z.literal(FunctionType.operationMapping),
|
|
4459
|
-
mapping: OperationMappingSchema,
|
|
4460
|
-
});
|
|
4461
|
-
|
|
4462
|
-
const RequestMappingSchema = z.object({
|
|
4463
|
-
pathParameters: z.any().optional(),
|
|
4464
|
-
query: z.any().optional(),
|
|
4465
|
-
data: z.any().optional(),
|
|
4466
|
-
headers: z.any().optional(),
|
|
4467
|
-
});
|
|
4468
|
-
const RestApiMappingSchema = z.object({
|
|
4469
|
-
path: z.string(),
|
|
4470
|
-
method: z.string(),
|
|
4471
|
-
requestMapping: RequestMappingSchema,
|
|
4472
|
-
responseMapping: z.any().optional(),
|
|
4473
|
-
});
|
|
4474
|
-
const OpenapiMappingSchema = z.object({
|
|
4475
|
-
path: z.string(),
|
|
4476
|
-
method: z.string(),
|
|
4477
|
-
requestMapping: RequestMappingSchema,
|
|
4478
|
-
responseMapping: z.any().optional(),
|
|
4479
|
-
});
|
|
4480
|
-
const RestApiMappingFunction = z.object({
|
|
4481
|
-
type: z.literal(FunctionType.restApiMapping),
|
|
4482
|
-
mapping: RestApiMappingSchema,
|
|
4483
|
-
});
|
|
4484
|
-
|
|
4485
|
-
const FunctionDefinition = z.union([
|
|
4486
|
-
MappingFunction,
|
|
4487
|
-
OperationMappingFunction,
|
|
4488
|
-
RestApiMappingFunction,
|
|
4489
|
-
GraphqlApiMappingFunction,
|
|
4490
|
-
JavascriptFunction,
|
|
4491
|
-
]);
|
|
4492
|
-
|
|
4493
4496
|
const CONNECTOR_DATA_DIR = 'data';
|
|
4494
4497
|
const CONNECTOR_OPERATIONS_DIR = 'operations';
|
|
4495
4498
|
const CONNECTOR_DOCS_DIR = 'docs';
|
|
@@ -4665,369 +4668,528 @@ var DataCollectionEventType;
|
|
|
4665
4668
|
DataCollectionEventType["DELETED"] = "deleted";
|
|
4666
4669
|
})(DataCollectionEventType || (DataCollectionEventType = {}));
|
|
4667
4670
|
|
|
4668
|
-
const
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
];
|
|
4671
|
+
const structuredClone$1 = (structuredClonePolyfill === null || structuredClonePolyfill === void 0 ? void 0 : structuredClonePolyfill.default) || structuredClonePolyfill;
|
|
4672
|
+
function isNil(value) {
|
|
4673
|
+
return value == null;
|
|
4674
|
+
}
|
|
4675
|
+
function omitBy(obj, check) {
|
|
4676
|
+
obj = { ...obj };
|
|
4677
|
+
Object.entries(obj).forEach(([key, value]) => check(value) && delete obj[key]);
|
|
4678
|
+
return obj;
|
|
4679
|
+
}
|
|
4680
|
+
function isEmptyValue(value) {
|
|
4681
|
+
if (isNil(value)) {
|
|
4682
|
+
return true;
|
|
4683
|
+
}
|
|
4684
|
+
if (typeof value === 'symbol') {
|
|
4685
|
+
return true;
|
|
4686
|
+
}
|
|
4687
|
+
if (typeof value === 'boolean') {
|
|
4688
|
+
return false;
|
|
4689
|
+
}
|
|
4690
|
+
if (typeof value === 'number') {
|
|
4691
|
+
return isNaN(value);
|
|
4692
|
+
}
|
|
4693
|
+
if (typeof value === 'string') {
|
|
4694
|
+
return value.trim().length === 0;
|
|
4695
|
+
}
|
|
4696
|
+
const tag = value.toString();
|
|
4697
|
+
if (tag === '[object Map]' || tag === '[object Set]') {
|
|
4698
|
+
return !value.size;
|
|
4699
|
+
}
|
|
4700
|
+
return typeof value === 'object' && Object.keys(value).length === 0;
|
|
4701
|
+
}
|
|
4702
|
+
const simpleUniqueId = () => {
|
|
4703
|
+
return Math.floor(Math.random() * Number.MAX_SAFE_INTEGER)
|
|
4704
|
+
.toString(36)
|
|
4705
|
+
.padStart(11, '0')
|
|
4706
|
+
.substring(0, 11);
|
|
4707
|
+
};
|
|
4675
4708
|
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
}
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4709
|
+
function getDataLocationMethodPath(locationKey, methodKey) {
|
|
4710
|
+
return `data/${locationKey}/${toKebabCase(methodKey)}`;
|
|
4711
|
+
}
|
|
4712
|
+
function dataLocationParametersMatch({ locationParameters, targetParameters, }) {
|
|
4713
|
+
targetParameters = typeof targetParameters === 'object' && targetParameters ? targetParameters : {};
|
|
4714
|
+
locationParameters = typeof locationParameters === 'object' && locationParameters ? locationParameters : {};
|
|
4715
|
+
for (const [key, value] of Object.entries(targetParameters)) {
|
|
4716
|
+
if (locationParameters[key] !== value) {
|
|
4717
|
+
return false;
|
|
4718
|
+
}
|
|
4719
|
+
}
|
|
4720
|
+
return true;
|
|
4721
|
+
}
|
|
4722
|
+
function parseDataLocationPath(path) {
|
|
4723
|
+
if (!path) {
|
|
4724
|
+
return undefined;
|
|
4725
|
+
}
|
|
4726
|
+
if (path.startsWith('/')) {
|
|
4727
|
+
path = path.slice(1);
|
|
4728
|
+
}
|
|
4729
|
+
if (!path.startsWith('data/')) {
|
|
4730
|
+
throw new Error(`Invalid data location path: ${path}. It should start with "data/"`);
|
|
4731
|
+
}
|
|
4732
|
+
path = path.slice(5);
|
|
4733
|
+
const [key, query] = path.split('?');
|
|
4734
|
+
const parameters = Object.fromEntries(new URLSearchParams(query).entries());
|
|
4735
|
+
return { key, parameters };
|
|
4736
|
+
}
|
|
4737
|
+
function makeDataLocationPath(pointer) {
|
|
4738
|
+
var _a;
|
|
4739
|
+
const normalizedPointer = normalizePointer(pointer);
|
|
4740
|
+
if (normalizedPointer === null || normalizedPointer === void 0 ? void 0 : normalizedPointer.key) {
|
|
4741
|
+
let path = `/data/${normalizedPointer.key}`;
|
|
4742
|
+
const parameters = omitBy((_a = normalizedPointer.parameters) !== null && _a !== void 0 ? _a : {}, isNil);
|
|
4743
|
+
if (Object.keys(parameters).length > 0) {
|
|
4744
|
+
path += `?${new URLSearchParams(parameters).toString()}`;
|
|
4745
|
+
}
|
|
4746
|
+
return path;
|
|
4747
|
+
}
|
|
4748
|
+
else {
|
|
4749
|
+
return undefined;
|
|
4750
|
+
}
|
|
4751
|
+
}
|
|
4752
|
+
function normalizePointer(pointer) {
|
|
4753
|
+
if (typeof pointer === 'string' && pointer.startsWith('/data/')) {
|
|
4705
4754
|
return {
|
|
4706
|
-
|
|
4707
|
-
properties: nonEmptyObjectProperties({
|
|
4708
|
-
fields: (_a = transformVariablesWith(fieldsSchema, (locator) => `fields.${locatorToField(locator)}`)) !== null && _a !== void 0 ? _a : {
|
|
4709
|
-
type: 'object',
|
|
4710
|
-
},
|
|
4711
|
-
credentials: credentialsSchema,
|
|
4712
|
-
}),
|
|
4755
|
+
key: pointer.slice(6),
|
|
4713
4756
|
};
|
|
4714
|
-
}
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4757
|
+
}
|
|
4758
|
+
return pointer;
|
|
4759
|
+
}
|
|
4760
|
+
function makeDataLocationOperationPath(collectionPath, operation) {
|
|
4761
|
+
const [path, query] = (collectionPath !== null && collectionPath !== void 0 ? collectionPath : '').split('?');
|
|
4762
|
+
return urljoin(path, operation, query ? `?${query}` : '');
|
|
4763
|
+
}
|
|
4764
|
+
function isSameDataLocation(location1, location2) {
|
|
4765
|
+
if (location1.key !== location2.key) {
|
|
4766
|
+
return false;
|
|
4767
|
+
}
|
|
4768
|
+
const cleanParameters1 = location1.parameters && Object.keys(location1.parameters).length > 0 ? location1.parameters : undefined;
|
|
4769
|
+
const cleanParameters2 = location2.parameters && Object.keys(location2.parameters).length > 0 ? location2.parameters : undefined;
|
|
4770
|
+
if (!deepEqual(cleanParameters1, cleanParameters2)) {
|
|
4771
|
+
return false;
|
|
4772
|
+
}
|
|
4773
|
+
return true;
|
|
4774
|
+
}
|
|
4775
|
+
function isDataLocationMethodSupported(location, methodKey) {
|
|
4776
|
+
var _a;
|
|
4777
|
+
const method = (_a = location === null || location === void 0 ? void 0 : location.methods) === null || _a === void 0 ? void 0 : _a[methodKey];
|
|
4778
|
+
return method && method.implementationType !== ConnectorMethodImplementationType.notSupported;
|
|
4779
|
+
}
|
|
4780
|
+
function getDataCollectionCreateFields(spec) {
|
|
4781
|
+
if (!spec)
|
|
4782
|
+
return undefined;
|
|
4783
|
+
if (!spec.fieldsSchema)
|
|
4784
|
+
return undefined;
|
|
4785
|
+
if (!spec.create)
|
|
4786
|
+
return undefined;
|
|
4787
|
+
let schema = excludeReadOnlyFieldsFromSchema(spec.fieldsSchema);
|
|
4788
|
+
if (spec.create.fields) {
|
|
4789
|
+
schema = pickFieldsFromSchema(schema, spec.create.fields);
|
|
4790
|
+
}
|
|
4791
|
+
if (spec.create.excludedFields) {
|
|
4792
|
+
schema = excludeFieldsFromSchema(schema, spec.create.excludedFields);
|
|
4793
|
+
}
|
|
4794
|
+
return schema;
|
|
4795
|
+
}
|
|
4796
|
+
function getDataCollectionUpdateFields(spec) {
|
|
4797
|
+
if (!spec)
|
|
4798
|
+
return undefined;
|
|
4799
|
+
if (!spec.fieldsSchema)
|
|
4800
|
+
return undefined;
|
|
4801
|
+
if (!spec.update)
|
|
4802
|
+
return undefined;
|
|
4803
|
+
let schema = excludeReadOnlyFieldsFromSchema(spec.fieldsSchema);
|
|
4804
|
+
if (spec.update.fields) {
|
|
4805
|
+
schema = pickFieldsFromSchema(schema, spec.update.fields);
|
|
4806
|
+
}
|
|
4807
|
+
if (spec.update.excludedFields) {
|
|
4808
|
+
schema = excludeFieldsFromSchema(schema, spec.update.excludedFields);
|
|
4809
|
+
}
|
|
4810
|
+
return schema;
|
|
4811
|
+
}
|
|
4812
|
+
function getWritableFieldsSchema(spec) {
|
|
4813
|
+
if (!spec)
|
|
4814
|
+
return undefined;
|
|
4815
|
+
if (!spec.fieldsSchema)
|
|
4816
|
+
return undefined;
|
|
4817
|
+
return mergeSchemas([getDataCollectionCreateFields(spec), getDataCollectionUpdateFields(spec)]);
|
|
4818
|
+
}
|
|
4819
|
+
function getReferenceCollectionPointerForSchema(schema) {
|
|
4820
|
+
if ((schema === null || schema === void 0 ? void 0 : schema.referenceCollection) && schema.referenceCollection.key) {
|
|
4821
|
+
return schema.referenceCollection;
|
|
4822
|
+
}
|
|
4823
|
+
else if (schema === null || schema === void 0 ? void 0 : schema.referenceCollectionPath) {
|
|
4824
|
+
return parseDataLocationPath(schema.referenceCollectionPath);
|
|
4825
|
+
}
|
|
4826
|
+
else if (schema === null || schema === void 0 ? void 0 : schema.referenceCollectionUri) {
|
|
4827
|
+
return parseDataLocationPath(schema.referenceCollectionUri);
|
|
4828
|
+
}
|
|
4829
|
+
else {
|
|
4830
|
+
return undefined;
|
|
4831
|
+
}
|
|
4832
|
+
}
|
|
4833
|
+
function getReferenceCollectionPathForSchema(schema) {
|
|
4834
|
+
const pointer = getReferenceCollectionPointerForSchema(schema);
|
|
4835
|
+
return makeDataLocationPath(pointer);
|
|
4836
|
+
}
|
|
4723
4837
|
|
|
4724
|
-
const
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4838
|
+
const FIELDS_SCHEMA$G = {
|
|
4839
|
+
type: 'object',
|
|
4840
|
+
properties: {
|
|
4841
|
+
id: { type: 'string', readOnly: true },
|
|
4842
|
+
title: { type: 'string' },
|
|
4843
|
+
description: { type: 'string' },
|
|
4844
|
+
type: { type: 'string' },
|
|
4845
|
+
durationSeconds: { type: 'number' },
|
|
4846
|
+
location: { type: 'string' },
|
|
4847
|
+
isRecurrent: { type: 'boolean' },
|
|
4848
|
+
participants: {
|
|
4849
|
+
type: 'array',
|
|
4850
|
+
items: {
|
|
4851
|
+
type: 'object',
|
|
4852
|
+
properties: {
|
|
4853
|
+
userId: { type: 'string' },
|
|
4854
|
+
contactId: { type: 'string' },
|
|
4734
4855
|
},
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
}
|
|
4856
|
+
},
|
|
4857
|
+
},
|
|
4858
|
+
status: { type: 'string' },
|
|
4859
|
+
contactId: {
|
|
4860
|
+
type: 'string',
|
|
4861
|
+
referenceUdm: 'contacts',
|
|
4862
|
+
},
|
|
4863
|
+
companyId: {
|
|
4864
|
+
type: 'string',
|
|
4865
|
+
referenceUdm: 'companies',
|
|
4866
|
+
},
|
|
4867
|
+
dealId: {
|
|
4868
|
+
type: 'string',
|
|
4869
|
+
referenceUdm: 'deals',
|
|
4870
|
+
},
|
|
4871
|
+
leadId: {
|
|
4872
|
+
type: 'string',
|
|
4873
|
+
referenceUdm: 'leads',
|
|
4874
|
+
},
|
|
4875
|
+
ownerId: {
|
|
4876
|
+
type: 'string',
|
|
4877
|
+
referenceUdm: 'users',
|
|
4878
|
+
},
|
|
4879
|
+
startTime: {
|
|
4880
|
+
type: 'string',
|
|
4881
|
+
format: 'date-time',
|
|
4882
|
+
},
|
|
4883
|
+
endTime: {
|
|
4884
|
+
type: 'string',
|
|
4885
|
+
format: 'date-time',
|
|
4886
|
+
},
|
|
4887
|
+
dueTime: {
|
|
4888
|
+
type: 'string',
|
|
4889
|
+
format: 'date-time',
|
|
4890
|
+
},
|
|
4891
|
+
createdTime: {
|
|
4892
|
+
type: 'string',
|
|
4893
|
+
format: 'date-time',
|
|
4894
|
+
readOnly: true,
|
|
4895
|
+
},
|
|
4896
|
+
createdBy: {
|
|
4897
|
+
type: 'string',
|
|
4898
|
+
referenceUdm: 'users',
|
|
4899
|
+
readOnly: true,
|
|
4900
|
+
},
|
|
4901
|
+
updatedTime: {
|
|
4902
|
+
type: 'string',
|
|
4903
|
+
format: 'date-time',
|
|
4904
|
+
readOnly: true,
|
|
4905
|
+
},
|
|
4906
|
+
updatedBy: {
|
|
4907
|
+
type: 'string',
|
|
4908
|
+
referenceUdm: 'users',
|
|
4909
|
+
readOnly: true,
|
|
4910
|
+
},
|
|
4738
4911
|
},
|
|
4739
|
-
getOutputSchema: () => null,
|
|
4740
|
-
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
4741
4912
|
};
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
return {
|
|
4751
|
-
type: 'object',
|
|
4752
|
-
properties: {
|
|
4753
|
-
queryFields: {
|
|
4754
|
-
type: 'array',
|
|
4755
|
-
items: { type: 'string', enum: fields },
|
|
4756
|
-
},
|
|
4757
|
-
},
|
|
4758
|
-
};
|
|
4913
|
+
const FallbackFieldsMap = {
|
|
4914
|
+
fromActivitiesToTasks: {
|
|
4915
|
+
subject: {
|
|
4916
|
+
$var: 'title',
|
|
4917
|
+
},
|
|
4918
|
+
content: {
|
|
4919
|
+
$var: 'description',
|
|
4920
|
+
},
|
|
4759
4921
|
},
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
}),
|
|
4768
|
-
};
|
|
4769
|
-
if (queryFieldsSchema === null || queryFieldsSchema === void 0 ? void 0 : queryFieldsSchema.properties) {
|
|
4770
|
-
schema.properties = {
|
|
4771
|
-
...schema.properties,
|
|
4772
|
-
query: transformVariablesWith(queryFieldsSchema, (locator) => `query.${locatorToField(locator)}`),
|
|
4773
|
-
};
|
|
4774
|
-
}
|
|
4775
|
-
return schema;
|
|
4922
|
+
fromTasksToActivities: {
|
|
4923
|
+
title: {
|
|
4924
|
+
$var: 'subject',
|
|
4925
|
+
},
|
|
4926
|
+
description: {
|
|
4927
|
+
$var: 'content',
|
|
4928
|
+
},
|
|
4776
4929
|
},
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
}
|
|
4930
|
+
fromActivitiesToNotes: {
|
|
4931
|
+
content: {
|
|
4932
|
+
$var: 'description',
|
|
4933
|
+
},
|
|
4934
|
+
},
|
|
4935
|
+
fromNotesToActivities: {
|
|
4936
|
+
description: {
|
|
4937
|
+
$var: 'content',
|
|
4938
|
+
},
|
|
4939
|
+
},
|
|
4940
|
+
fromActivitiesToEmails: {
|
|
4941
|
+
subject: {
|
|
4942
|
+
$var: 'title',
|
|
4943
|
+
},
|
|
4944
|
+
body: {
|
|
4945
|
+
$var: 'description',
|
|
4946
|
+
},
|
|
4947
|
+
},
|
|
4948
|
+
fromEmailsToActivities: {
|
|
4949
|
+
title: {
|
|
4950
|
+
$var: 'subject',
|
|
4951
|
+
},
|
|
4952
|
+
description: {
|
|
4953
|
+
$var: 'body',
|
|
4954
|
+
},
|
|
4791
4955
|
},
|
|
4792
|
-
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
4793
4956
|
};
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
properties: nonEmptyObjectProperties({
|
|
4801
|
-
id: {
|
|
4802
|
-
type: 'string',
|
|
4803
|
-
referenceCollection: { key: collectionHandler === null || collectionHandler === void 0 ? void 0 : collectionHandler.key, parameters },
|
|
4804
|
-
},
|
|
4805
|
-
credentials: credentialsSchema,
|
|
4806
|
-
}),
|
|
4807
|
-
}),
|
|
4808
|
-
getOutputSchema: ({ collectionSpec }) => {
|
|
4809
|
-
var _a;
|
|
4810
|
-
return ({
|
|
4811
|
-
type: 'object',
|
|
4812
|
-
properties: {
|
|
4813
|
-
record: (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) !== null && _a !== void 0 ? _a : { type: 'object' },
|
|
4814
|
-
},
|
|
4815
|
-
});
|
|
4957
|
+
const udm$G = {
|
|
4958
|
+
singularName: 'activity',
|
|
4959
|
+
pluralName: 'activities',
|
|
4960
|
+
fieldsSchema: FIELDS_SCHEMA$G,
|
|
4961
|
+
list: {
|
|
4962
|
+
filterFields: ['type', 'companyId', 'contactId', 'dealId', 'leadId', 'ownerId'],
|
|
4816
4963
|
},
|
|
4817
|
-
|
|
4964
|
+
match: {
|
|
4965
|
+
fields: ['type', 'companyId', 'contactId', 'dealId', 'leadId', 'ownerId'],
|
|
4966
|
+
},
|
|
4967
|
+
populateFields,
|
|
4968
|
+
udmFallbacks: [
|
|
4969
|
+
{
|
|
4970
|
+
udm: 'tasks',
|
|
4971
|
+
importFields: FallbackFieldsMap.fromTasksToActivities,
|
|
4972
|
+
exportFields: FallbackFieldsMap.fromActivitiesToTasks,
|
|
4973
|
+
},
|
|
4974
|
+
{
|
|
4975
|
+
udm: 'meetings',
|
|
4976
|
+
},
|
|
4977
|
+
{
|
|
4978
|
+
udm: 'notes',
|
|
4979
|
+
importFields: FallbackFieldsMap.fromNotesToActivities,
|
|
4980
|
+
exportFields: FallbackFieldsMap.fromActivitiesToNotes,
|
|
4981
|
+
},
|
|
4982
|
+
{
|
|
4983
|
+
udm: 'emails',
|
|
4984
|
+
importFields: FallbackFieldsMap.fromEmailsToActivities,
|
|
4985
|
+
exportFields: FallbackFieldsMap.fromActivitiesToEmails,
|
|
4986
|
+
},
|
|
4987
|
+
],
|
|
4818
4988
|
};
|
|
4989
|
+
function populateFields(fields) {
|
|
4990
|
+
const result = JSON.parse(JSON.stringify(fields));
|
|
4991
|
+
if (!result.dueTime) {
|
|
4992
|
+
result.dueTime = result.endTime || result.startTime;
|
|
4993
|
+
}
|
|
4994
|
+
if (!result.startTime) {
|
|
4995
|
+
result.startTime = result.dueTime || result.endTime;
|
|
4996
|
+
}
|
|
4997
|
+
if (!result.endTime) {
|
|
4998
|
+
result.endTime = result.dueTime || result.startTime;
|
|
4999
|
+
}
|
|
5000
|
+
return result;
|
|
5001
|
+
}
|
|
4819
5002
|
|
|
4820
|
-
const
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
5003
|
+
const FIELDS_SCHEMA$F = {
|
|
5004
|
+
type: 'object',
|
|
5005
|
+
properties: {
|
|
5006
|
+
id: { type: 'string', readOnly: true },
|
|
5007
|
+
number: { type: 'string' },
|
|
5008
|
+
name: { type: 'string' },
|
|
5009
|
+
memo: { type: 'string' },
|
|
5010
|
+
status: { type: 'string' },
|
|
5011
|
+
paymentMethod: { type: 'string' },
|
|
5012
|
+
supplierId: { type: 'string', referenceUdm: 'suppliers' },
|
|
5013
|
+
currency: { type: 'string' },
|
|
5014
|
+
payments: {
|
|
5015
|
+
type: 'array',
|
|
5016
|
+
items: {
|
|
5017
|
+
type: 'string',
|
|
5018
|
+
referenceUdm: 'payments',
|
|
5019
|
+
},
|
|
5020
|
+
},
|
|
5021
|
+
lineItems: {
|
|
5022
|
+
type: 'array',
|
|
5023
|
+
items: {
|
|
5024
|
+
type: 'object',
|
|
5025
|
+
properties: {
|
|
5026
|
+
id: { type: 'string' },
|
|
5027
|
+
itemName: { type: 'string' },
|
|
5028
|
+
description: { type: 'string' },
|
|
5029
|
+
code: { type: 'string' },
|
|
5030
|
+
type: { type: 'string' },
|
|
5031
|
+
companyId: { type: 'string', referenceUdm: 'companies' },
|
|
5032
|
+
ledgerAccountId: { type: 'string', referenceUdm: 'ledger-accounts' },
|
|
5033
|
+
quantity: { type: 'number' },
|
|
5034
|
+
unitPrice: { type: 'number' },
|
|
5035
|
+
unitOfMeasure: { type: 'string' },
|
|
5036
|
+
purchasePrice: { type: 'number' },
|
|
5037
|
+
salesPrice: { type: 'number' },
|
|
5038
|
+
taxable: { type: 'boolean' },
|
|
5039
|
+
taxAmount: { type: 'number' },
|
|
5040
|
+
totalAmount: { type: 'number' },
|
|
4832
5041
|
},
|
|
4833
5042
|
},
|
|
4834
|
-
}
|
|
5043
|
+
},
|
|
5044
|
+
totalAmount: { type: 'number' },
|
|
5045
|
+
totalTax: { type: 'number' },
|
|
5046
|
+
exchangeRate: { type: 'number' },
|
|
5047
|
+
totalDiscount: { type: 'number' },
|
|
5048
|
+
subTotal: { type: 'number' },
|
|
5049
|
+
balance: { type: 'number' },
|
|
5050
|
+
ledgerAccountId: { type: 'string', referenceUdm: 'ledger-accounts' },
|
|
5051
|
+
issueDate: {
|
|
5052
|
+
type: 'string',
|
|
5053
|
+
format: 'date-time',
|
|
5054
|
+
},
|
|
5055
|
+
dueDate: {
|
|
5056
|
+
type: 'string',
|
|
5057
|
+
format: 'date-time',
|
|
5058
|
+
},
|
|
5059
|
+
paidOnDate: {
|
|
5060
|
+
type: 'string',
|
|
5061
|
+
format: 'date-time',
|
|
5062
|
+
},
|
|
5063
|
+
createdTime: { type: 'string', format: 'date-time', readOnly: true },
|
|
5064
|
+
createdBy: { type: 'string', referenceUdm: 'users', readOnly: true },
|
|
5065
|
+
updatedTime: { type: 'string', format: 'date-time', readOnly: true },
|
|
5066
|
+
updatedBy: { type: 'string', referenceUdm: 'users', readOnly: true },
|
|
4835
5067
|
},
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
type: 'object',
|
|
4844
|
-
properties: nonEmptyObjectProperties({
|
|
4845
|
-
filter: filterSchema,
|
|
4846
|
-
cursor: {
|
|
4847
|
-
type: 'string',
|
|
4848
|
-
description: 'Cursor returned in response to the previous "list" request',
|
|
4849
|
-
},
|
|
4850
|
-
credentials: credentialsSchema,
|
|
4851
|
-
}),
|
|
4852
|
-
};
|
|
5068
|
+
};
|
|
5069
|
+
const udm$F = {
|
|
5070
|
+
singularName: 'bill',
|
|
5071
|
+
pluralName: 'bills',
|
|
5072
|
+
fieldsSchema: FIELDS_SCHEMA$F,
|
|
5073
|
+
list: {
|
|
5074
|
+
filterFields: ['name', 'number', 'status', 'supplierId'],
|
|
4853
5075
|
},
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
return ({
|
|
4857
|
-
type: 'object',
|
|
4858
|
-
properties: {
|
|
4859
|
-
records: {
|
|
4860
|
-
type: 'array',
|
|
4861
|
-
items: (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) !== null && _a !== void 0 ? _a : { type: 'object' },
|
|
4862
|
-
},
|
|
4863
|
-
cursor: {
|
|
4864
|
-
type: 'string',
|
|
4865
|
-
description: 'Cursor to request the next page of results',
|
|
4866
|
-
},
|
|
4867
|
-
},
|
|
4868
|
-
});
|
|
5076
|
+
match: {
|
|
5077
|
+
fields: ['name', 'number', 'status', 'supplierId'],
|
|
4869
5078
|
},
|
|
4870
|
-
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
4871
5079
|
};
|
|
4872
5080
|
|
|
4873
|
-
const
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
type: '
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
}
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
}),
|
|
4921
|
-
}),
|
|
4922
|
-
getOutputSchema: ({ collectionSpec }) => {
|
|
4923
|
-
var _a;
|
|
4924
|
-
return ({
|
|
4925
|
-
type: 'object',
|
|
4926
|
-
properties: {
|
|
4927
|
-
records: {
|
|
4928
|
-
type: 'array',
|
|
4929
|
-
items: (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) !== null && _a !== void 0 ? _a : { type: 'object' },
|
|
4930
|
-
},
|
|
4931
|
-
cursor: { type: 'string' },
|
|
4932
|
-
},
|
|
4933
|
-
});
|
|
5081
|
+
const FIELDS_SCHEMA$E = {
|
|
5082
|
+
type: 'object',
|
|
5083
|
+
properties: {
|
|
5084
|
+
id: { type: 'string', readOnly: true },
|
|
5085
|
+
fullName: { type: 'string' },
|
|
5086
|
+
firstName: { type: 'string' },
|
|
5087
|
+
lastName: { type: 'string' },
|
|
5088
|
+
primaryEmail: { type: 'string' },
|
|
5089
|
+
campaignId: {
|
|
5090
|
+
type: 'string',
|
|
5091
|
+
referenceUdm: 'campaigns',
|
|
5092
|
+
},
|
|
5093
|
+
contactId: {
|
|
5094
|
+
type: 'string',
|
|
5095
|
+
referenceUdm: 'contacts',
|
|
5096
|
+
},
|
|
5097
|
+
leadId: {
|
|
5098
|
+
type: 'string',
|
|
5099
|
+
referenceUdm: 'leads',
|
|
5100
|
+
},
|
|
5101
|
+
source: { type: 'string' },
|
|
5102
|
+
status: { type: 'string' },
|
|
5103
|
+
companyId: {
|
|
5104
|
+
type: 'string',
|
|
5105
|
+
referenceUdm: 'companies',
|
|
5106
|
+
},
|
|
5107
|
+
jobTitle: { type: 'string' },
|
|
5108
|
+
hasOptedOutOfEmail: { type: 'boolean' },
|
|
5109
|
+
createdTime: {
|
|
5110
|
+
type: 'string',
|
|
5111
|
+
format: 'date-time',
|
|
5112
|
+
},
|
|
5113
|
+
createdBy: {
|
|
5114
|
+
type: 'string',
|
|
5115
|
+
readOnly: true,
|
|
5116
|
+
referenceUdm: 'users',
|
|
5117
|
+
},
|
|
5118
|
+
updatedTime: {
|
|
5119
|
+
type: 'string',
|
|
5120
|
+
readOnly: true,
|
|
5121
|
+
format: 'date-time',
|
|
5122
|
+
},
|
|
5123
|
+
updatedBy: {
|
|
5124
|
+
type: 'string',
|
|
5125
|
+
readOnly: true,
|
|
5126
|
+
referenceUdm: 'users',
|
|
5127
|
+
},
|
|
4934
5128
|
},
|
|
4935
|
-
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
4936
5129
|
};
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
type: 'array',
|
|
4953
|
-
items: { type: 'string', enum: fields },
|
|
4954
|
-
},
|
|
4955
|
-
},
|
|
4956
|
-
};
|
|
5130
|
+
const udm$E = {
|
|
5131
|
+
singularName: 'campaign-member',
|
|
5132
|
+
pluralName: 'campaign-members',
|
|
5133
|
+
fieldsSchema: FIELDS_SCHEMA$E,
|
|
5134
|
+
list: {
|
|
5135
|
+
filterFields: [
|
|
5136
|
+
'primaryEmail',
|
|
5137
|
+
'fullName',
|
|
5138
|
+
'firstName',
|
|
5139
|
+
'lastName',
|
|
5140
|
+
'campaignId',
|
|
5141
|
+
'contactId',
|
|
5142
|
+
'leadId',
|
|
5143
|
+
'companyId',
|
|
5144
|
+
],
|
|
4957
5145
|
},
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
let fieldsSchema = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema;
|
|
4961
|
-
if (method === null || method === void 0 ? void 0 : method.fields) {
|
|
4962
|
-
fieldsSchema = pickFieldsFromSchema(fieldsSchema, method.fields);
|
|
4963
|
-
}
|
|
4964
|
-
if (method === null || method === void 0 ? void 0 : method.excludedFields) {
|
|
4965
|
-
fieldsSchema = excludeFieldsFromSchema(fieldsSchema, method.excludedFields);
|
|
4966
|
-
}
|
|
4967
|
-
return {
|
|
4968
|
-
type: 'object',
|
|
4969
|
-
properties: nonEmptyObjectProperties({
|
|
4970
|
-
id: {
|
|
4971
|
-
type: 'string',
|
|
4972
|
-
referenceCollection: { key: collectionHandler === null || collectionHandler === void 0 ? void 0 : collectionHandler.key, parameters },
|
|
4973
|
-
},
|
|
4974
|
-
fields: (_a = transformVariablesWith(fieldsSchema, (locator) => `fields.${locatorToField(locator)}`)) !== null && _a !== void 0 ? _a : {
|
|
4975
|
-
type: 'object',
|
|
4976
|
-
},
|
|
4977
|
-
credentials: credentialsSchema,
|
|
4978
|
-
}),
|
|
4979
|
-
};
|
|
5146
|
+
match: {
|
|
5147
|
+
fields: ['primaryEmail', 'fullName', 'firstName', 'lastName', 'campaignId', 'contactId', 'leadId', 'companyId'],
|
|
4980
5148
|
},
|
|
4981
|
-
getOutputSchema: ({}) => ({
|
|
4982
|
-
type: 'object',
|
|
4983
|
-
properties: {
|
|
4984
|
-
id: { type: 'string' },
|
|
4985
|
-
},
|
|
4986
|
-
}),
|
|
4987
|
-
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
4988
5149
|
};
|
|
4989
5150
|
|
|
4990
|
-
const FIELDS_SCHEMA$
|
|
5151
|
+
const FIELDS_SCHEMA$D = {
|
|
4991
5152
|
type: 'object',
|
|
4992
5153
|
properties: {
|
|
4993
5154
|
id: { type: 'string', readOnly: true },
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
type: { type: 'string' },
|
|
4997
|
-
durationSeconds: { type: 'number' },
|
|
4998
|
-
location: { type: 'string' },
|
|
4999
|
-
isRecurrent: { type: 'boolean' },
|
|
5000
|
-
participants: {
|
|
5001
|
-
type: 'array',
|
|
5002
|
-
items: {
|
|
5003
|
-
type: 'object',
|
|
5004
|
-
properties: {
|
|
5005
|
-
userId: { type: 'string' },
|
|
5006
|
-
contactId: { type: 'string' },
|
|
5007
|
-
},
|
|
5008
|
-
},
|
|
5155
|
+
name: {
|
|
5156
|
+
type: 'string',
|
|
5009
5157
|
},
|
|
5010
|
-
|
|
5011
|
-
|
|
5158
|
+
cost: {
|
|
5159
|
+
type: 'number',
|
|
5160
|
+
},
|
|
5161
|
+
description: {
|
|
5012
5162
|
type: 'string',
|
|
5013
|
-
referenceUdm: 'contacts',
|
|
5014
5163
|
},
|
|
5015
|
-
|
|
5164
|
+
source: {
|
|
5016
5165
|
type: 'string',
|
|
5017
|
-
referenceUdm: 'companies',
|
|
5018
5166
|
},
|
|
5019
|
-
|
|
5167
|
+
stage: {
|
|
5020
5168
|
type: 'string',
|
|
5021
|
-
referenceUdm: 'deals',
|
|
5022
5169
|
},
|
|
5023
|
-
|
|
5170
|
+
type: {
|
|
5024
5171
|
type: 'string',
|
|
5025
|
-
referenceUdm: 'leads',
|
|
5026
5172
|
},
|
|
5027
5173
|
ownerId: {
|
|
5028
5174
|
type: 'string',
|
|
5029
5175
|
referenceUdm: 'users',
|
|
5030
5176
|
},
|
|
5177
|
+
sentCount: {
|
|
5178
|
+
type: 'number',
|
|
5179
|
+
readOnly: true,
|
|
5180
|
+
},
|
|
5181
|
+
replyCount: {
|
|
5182
|
+
type: 'number',
|
|
5183
|
+
readOnly: true,
|
|
5184
|
+
},
|
|
5185
|
+
openCount: {
|
|
5186
|
+
type: 'number',
|
|
5187
|
+
readOnly: true,
|
|
5188
|
+
},
|
|
5189
|
+
clickCount: {
|
|
5190
|
+
type: 'number',
|
|
5191
|
+
readOnly: true,
|
|
5192
|
+
},
|
|
5031
5193
|
startTime: {
|
|
5032
5194
|
type: 'string',
|
|
5033
5195
|
format: 'date-time',
|
|
@@ -5036,10 +5198,6 @@ const FIELDS_SCHEMA$G = {
|
|
|
5036
5198
|
type: 'string',
|
|
5037
5199
|
format: 'date-time',
|
|
5038
5200
|
},
|
|
5039
|
-
dueTime: {
|
|
5040
|
-
type: 'string',
|
|
5041
|
-
format: 'date-time',
|
|
5042
|
-
},
|
|
5043
5201
|
createdTime: {
|
|
5044
5202
|
type: 'string',
|
|
5045
5203
|
format: 'date-time',
|
|
@@ -5060,477 +5218,167 @@ const FIELDS_SCHEMA$G = {
|
|
|
5060
5218
|
referenceUdm: 'users',
|
|
5061
5219
|
readOnly: true,
|
|
5062
5220
|
},
|
|
5221
|
+
lastActivityTime: {
|
|
5222
|
+
type: 'string',
|
|
5223
|
+
format: 'date-time',
|
|
5224
|
+
readOnly: true,
|
|
5225
|
+
},
|
|
5063
5226
|
},
|
|
5064
5227
|
};
|
|
5065
|
-
const
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5228
|
+
const MODIFIABLE_FIELDS$2 = ['name', 'description', 'ownerId', 'startTime', 'endTime', 'cost', 'source', 'stage', 'type'];
|
|
5229
|
+
const udm$D = {
|
|
5230
|
+
singularName: 'campaign',
|
|
5231
|
+
pluralName: 'campaigns',
|
|
5232
|
+
fieldsSchema: FIELDS_SCHEMA$D,
|
|
5233
|
+
categories: ['Marketing Automation', 'Sales', 'CRM', 'Ads'],
|
|
5234
|
+
list: {
|
|
5235
|
+
filterFields: ['name', 'source', 'stage', 'type', 'ownerId'],
|
|
5073
5236
|
},
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
$var: 'subject',
|
|
5077
|
-
},
|
|
5078
|
-
description: {
|
|
5079
|
-
$var: 'content',
|
|
5080
|
-
},
|
|
5237
|
+
find: {
|
|
5238
|
+
queryFields: ['name', 'source', 'stage', 'type', 'ownerId'],
|
|
5081
5239
|
},
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
$var: 'description',
|
|
5085
|
-
},
|
|
5240
|
+
match: {
|
|
5241
|
+
fields: ['name', 'source', 'stage', 'type', 'ownerId'],
|
|
5086
5242
|
},
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
$var: 'content',
|
|
5090
|
-
},
|
|
5091
|
-
},
|
|
5092
|
-
fromActivitiesToEmails: {
|
|
5093
|
-
subject: {
|
|
5094
|
-
$var: 'title',
|
|
5095
|
-
},
|
|
5096
|
-
body: {
|
|
5097
|
-
$var: 'description',
|
|
5098
|
-
},
|
|
5243
|
+
create: {
|
|
5244
|
+
fields: MODIFIABLE_FIELDS$2,
|
|
5099
5245
|
},
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
$var: 'subject',
|
|
5103
|
-
},
|
|
5104
|
-
description: {
|
|
5105
|
-
$var: 'body',
|
|
5106
|
-
},
|
|
5246
|
+
update: {
|
|
5247
|
+
fields: MODIFIABLE_FIELDS$2,
|
|
5107
5248
|
},
|
|
5108
5249
|
};
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5250
|
+
|
|
5251
|
+
const AddressSchema = {
|
|
5252
|
+
type: 'object',
|
|
5253
|
+
properties: {
|
|
5254
|
+
type: { type: 'string' },
|
|
5255
|
+
full: { type: 'string' },
|
|
5256
|
+
street: { type: 'string' },
|
|
5257
|
+
city: { type: 'string' },
|
|
5258
|
+
state: { type: 'string' },
|
|
5259
|
+
country: { type: 'string' },
|
|
5260
|
+
zip: { type: 'string' },
|
|
5115
5261
|
},
|
|
5116
|
-
|
|
5117
|
-
|
|
5262
|
+
};
|
|
5263
|
+
const PhoneEmailSchema = {
|
|
5264
|
+
type: 'object',
|
|
5265
|
+
properties: {
|
|
5266
|
+
value: { type: 'string' },
|
|
5267
|
+
type: { type: 'string' },
|
|
5118
5268
|
},
|
|
5119
|
-
populateFields,
|
|
5120
|
-
udmFallbacks: [
|
|
5121
|
-
{
|
|
5122
|
-
udm: 'tasks',
|
|
5123
|
-
importFields: FallbackFieldsMap.fromTasksToActivities,
|
|
5124
|
-
exportFields: FallbackFieldsMap.fromActivitiesToTasks,
|
|
5125
|
-
},
|
|
5126
|
-
{
|
|
5127
|
-
udm: 'meetings',
|
|
5128
|
-
},
|
|
5129
|
-
{
|
|
5130
|
-
udm: 'notes',
|
|
5131
|
-
importFields: FallbackFieldsMap.fromNotesToActivities,
|
|
5132
|
-
exportFields: FallbackFieldsMap.fromActivitiesToNotes,
|
|
5133
|
-
},
|
|
5134
|
-
{
|
|
5135
|
-
udm: 'emails',
|
|
5136
|
-
importFields: FallbackFieldsMap.fromEmailsToActivities,
|
|
5137
|
-
exportFields: FallbackFieldsMap.fromActivitiesToEmails,
|
|
5138
|
-
},
|
|
5139
|
-
],
|
|
5140
5269
|
};
|
|
5141
|
-
function populateFields(fields) {
|
|
5142
|
-
const result = JSON.parse(JSON.stringify(fields));
|
|
5143
|
-
if (!result.dueTime) {
|
|
5144
|
-
result.dueTime = result.endTime || result.startTime;
|
|
5145
|
-
}
|
|
5146
|
-
if (!result.startTime) {
|
|
5147
|
-
result.startTime = result.dueTime || result.endTime;
|
|
5148
|
-
}
|
|
5149
|
-
if (!result.endTime) {
|
|
5150
|
-
result.endTime = result.dueTime || result.startTime;
|
|
5151
|
-
}
|
|
5152
|
-
return result;
|
|
5153
|
-
}
|
|
5154
5270
|
|
|
5155
|
-
const FIELDS_SCHEMA$
|
|
5271
|
+
const FIELDS_SCHEMA$C = {
|
|
5156
5272
|
type: 'object',
|
|
5157
5273
|
properties: {
|
|
5158
5274
|
id: { type: 'string', readOnly: true },
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
memo: { type: 'string' },
|
|
5162
|
-
status: { type: 'string' },
|
|
5163
|
-
paymentMethod: { type: 'string' },
|
|
5164
|
-
supplierId: { type: 'string', referenceUdm: 'suppliers' },
|
|
5165
|
-
currency: { type: 'string' },
|
|
5166
|
-
payments: {
|
|
5167
|
-
type: 'array',
|
|
5168
|
-
items: {
|
|
5169
|
-
type: 'string',
|
|
5170
|
-
referenceUdm: 'payments',
|
|
5171
|
-
},
|
|
5275
|
+
name: {
|
|
5276
|
+
type: 'string',
|
|
5172
5277
|
},
|
|
5173
|
-
|
|
5278
|
+
websiteUrl: {
|
|
5279
|
+
type: 'string',
|
|
5280
|
+
},
|
|
5281
|
+
phones: {
|
|
5174
5282
|
type: 'array',
|
|
5175
|
-
items:
|
|
5176
|
-
type: 'object',
|
|
5177
|
-
properties: {
|
|
5178
|
-
id: { type: 'string' },
|
|
5179
|
-
itemName: { type: 'string' },
|
|
5180
|
-
description: { type: 'string' },
|
|
5181
|
-
code: { type: 'string' },
|
|
5182
|
-
type: { type: 'string' },
|
|
5183
|
-
companyId: { type: 'string', referenceUdm: 'companies' },
|
|
5184
|
-
ledgerAccountId: { type: 'string', referenceUdm: 'ledger-accounts' },
|
|
5185
|
-
quantity: { type: 'number' },
|
|
5186
|
-
unitPrice: { type: 'number' },
|
|
5187
|
-
unitOfMeasure: { type: 'string' },
|
|
5188
|
-
purchasePrice: { type: 'number' },
|
|
5189
|
-
salesPrice: { type: 'number' },
|
|
5190
|
-
taxable: { type: 'boolean' },
|
|
5191
|
-
taxAmount: { type: 'number' },
|
|
5192
|
-
totalAmount: { type: 'number' },
|
|
5193
|
-
},
|
|
5194
|
-
},
|
|
5283
|
+
items: PhoneEmailSchema,
|
|
5195
5284
|
},
|
|
5196
|
-
|
|
5197
|
-
totalTax: { type: 'number' },
|
|
5198
|
-
exchangeRate: { type: 'number' },
|
|
5199
|
-
totalDiscount: { type: 'number' },
|
|
5200
|
-
subTotal: { type: 'number' },
|
|
5201
|
-
balance: { type: 'number' },
|
|
5202
|
-
ledgerAccountId: { type: 'string', referenceUdm: 'ledger-accounts' },
|
|
5203
|
-
issueDate: {
|
|
5285
|
+
primaryPhone: {
|
|
5204
5286
|
type: 'string',
|
|
5205
|
-
format: 'date-time',
|
|
5206
5287
|
},
|
|
5207
|
-
|
|
5288
|
+
description: {
|
|
5208
5289
|
type: 'string',
|
|
5209
|
-
format: 'date-time',
|
|
5210
5290
|
},
|
|
5211
|
-
|
|
5291
|
+
currency: {
|
|
5212
5292
|
type: 'string',
|
|
5213
|
-
format: 'date-time',
|
|
5214
5293
|
},
|
|
5215
|
-
|
|
5216
|
-
createdBy: { type: 'string', referenceUdm: 'users', readOnly: true },
|
|
5217
|
-
updatedTime: { type: 'string', format: 'date-time', readOnly: true },
|
|
5218
|
-
updatedBy: { type: 'string', referenceUdm: 'users', readOnly: true },
|
|
5219
|
-
},
|
|
5220
|
-
};
|
|
5221
|
-
const udm$F = {
|
|
5222
|
-
singularName: 'bill',
|
|
5223
|
-
pluralName: 'bills',
|
|
5224
|
-
fieldsSchema: FIELDS_SCHEMA$F,
|
|
5225
|
-
list: {
|
|
5226
|
-
filterFields: ['name', 'number', 'status', 'supplierId'],
|
|
5227
|
-
},
|
|
5228
|
-
match: {
|
|
5229
|
-
fields: ['name', 'number', 'status', 'supplierId'],
|
|
5230
|
-
},
|
|
5231
|
-
};
|
|
5232
|
-
|
|
5233
|
-
const FIELDS_SCHEMA$E = {
|
|
5234
|
-
type: 'object',
|
|
5235
|
-
properties: {
|
|
5236
|
-
id: { type: 'string', readOnly: true },
|
|
5237
|
-
fullName: { type: 'string' },
|
|
5238
|
-
firstName: { type: 'string' },
|
|
5239
|
-
lastName: { type: 'string' },
|
|
5240
|
-
primaryEmail: { type: 'string' },
|
|
5241
|
-
campaignId: {
|
|
5294
|
+
industry: {
|
|
5242
5295
|
type: 'string',
|
|
5243
|
-
referenceUdm: 'campaigns',
|
|
5244
5296
|
},
|
|
5245
|
-
|
|
5297
|
+
ownerId: {
|
|
5246
5298
|
type: 'string',
|
|
5247
|
-
referenceUdm: '
|
|
5299
|
+
referenceUdm: 'users',
|
|
5248
5300
|
},
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5301
|
+
primaryAddress: AddressSchema,
|
|
5302
|
+
addresses: {
|
|
5303
|
+
type: 'array',
|
|
5304
|
+
items: AddressSchema,
|
|
5252
5305
|
},
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
companyId: {
|
|
5256
|
-
type: 'string',
|
|
5257
|
-
referenceUdm: 'companies',
|
|
5306
|
+
numberOfEmployees: {
|
|
5307
|
+
type: 'number',
|
|
5258
5308
|
},
|
|
5259
|
-
jobTitle: { type: 'string' },
|
|
5260
|
-
hasOptedOutOfEmail: { type: 'boolean' },
|
|
5261
5309
|
createdTime: {
|
|
5262
5310
|
type: 'string',
|
|
5263
5311
|
format: 'date-time',
|
|
5264
5312
|
},
|
|
5265
5313
|
createdBy: {
|
|
5266
5314
|
type: 'string',
|
|
5267
|
-
readOnly: true,
|
|
5268
5315
|
referenceUdm: 'users',
|
|
5316
|
+
readOnly: true,
|
|
5269
5317
|
},
|
|
5270
5318
|
updatedTime: {
|
|
5271
5319
|
type: 'string',
|
|
5272
|
-
readOnly: true,
|
|
5273
5320
|
format: 'date-time',
|
|
5321
|
+
readOnly: true,
|
|
5274
5322
|
},
|
|
5275
5323
|
updatedBy: {
|
|
5276
5324
|
type: 'string',
|
|
5277
|
-
readOnly: true,
|
|
5278
5325
|
referenceUdm: 'users',
|
|
5326
|
+
readOnly: true,
|
|
5327
|
+
},
|
|
5328
|
+
lastActivityTime: {
|
|
5329
|
+
type: 'string',
|
|
5330
|
+
format: 'date-time',
|
|
5331
|
+
readOnly: true,
|
|
5279
5332
|
},
|
|
5280
5333
|
},
|
|
5281
5334
|
};
|
|
5282
|
-
const udm$
|
|
5283
|
-
singularName: '
|
|
5284
|
-
pluralName: '
|
|
5285
|
-
fieldsSchema: FIELDS_SCHEMA$
|
|
5335
|
+
const udm$C = {
|
|
5336
|
+
singularName: 'company',
|
|
5337
|
+
pluralName: 'companies',
|
|
5338
|
+
fieldsSchema: FIELDS_SCHEMA$C,
|
|
5286
5339
|
list: {
|
|
5287
|
-
filterFields: [
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
'lastName',
|
|
5292
|
-
'campaignId',
|
|
5293
|
-
'contactId',
|
|
5294
|
-
'leadId',
|
|
5295
|
-
'companyId',
|
|
5296
|
-
],
|
|
5340
|
+
filterFields: ['ownerId', 'name', 'websiteUrl', 'industry'],
|
|
5341
|
+
},
|
|
5342
|
+
find: {
|
|
5343
|
+
queryFields: ['ownerId', 'name', 'websiteUrl', 'industry'],
|
|
5297
5344
|
},
|
|
5298
5345
|
match: {
|
|
5299
|
-
fields: ['
|
|
5346
|
+
fields: ['ownerId', 'name', 'websiteUrl', 'industry'],
|
|
5347
|
+
},
|
|
5348
|
+
fieldFallbacks: {
|
|
5349
|
+
'primaryAddress.full': [
|
|
5350
|
+
{
|
|
5351
|
+
$concat: {
|
|
5352
|
+
values: [
|
|
5353
|
+
{ $var: 'primaryAddress.street' },
|
|
5354
|
+
{ $var: 'primaryAddress.city' },
|
|
5355
|
+
{ $var: 'primaryAddress.state' },
|
|
5356
|
+
{ $var: 'primaryAddress.zip' },
|
|
5357
|
+
{ $var: 'primaryAddress.country' },
|
|
5358
|
+
],
|
|
5359
|
+
delimiter: ', ',
|
|
5360
|
+
},
|
|
5361
|
+
},
|
|
5362
|
+
],
|
|
5300
5363
|
},
|
|
5301
5364
|
};
|
|
5302
5365
|
|
|
5303
|
-
const FIELDS_SCHEMA$
|
|
5366
|
+
const FIELDS_SCHEMA$B = {
|
|
5304
5367
|
type: 'object',
|
|
5305
5368
|
properties: {
|
|
5306
5369
|
id: { type: 'string', readOnly: true },
|
|
5307
|
-
name: {
|
|
5370
|
+
name: { type: 'string' },
|
|
5371
|
+
description: { type: 'string' },
|
|
5372
|
+
source: { type: 'string' },
|
|
5373
|
+
type: { type: 'string' },
|
|
5374
|
+
ownerId: {
|
|
5308
5375
|
type: 'string',
|
|
5376
|
+
referenceUdm: 'users',
|
|
5309
5377
|
},
|
|
5310
|
-
|
|
5311
|
-
type: 'number',
|
|
5312
|
-
},
|
|
5313
|
-
description: {
|
|
5378
|
+
createdTime: {
|
|
5314
5379
|
type: 'string',
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
type: 'string',
|
|
5318
|
-
},
|
|
5319
|
-
stage: {
|
|
5320
|
-
type: 'string',
|
|
5321
|
-
},
|
|
5322
|
-
type: {
|
|
5323
|
-
type: 'string',
|
|
5324
|
-
},
|
|
5325
|
-
ownerId: {
|
|
5326
|
-
type: 'string',
|
|
5327
|
-
referenceUdm: 'users',
|
|
5328
|
-
},
|
|
5329
|
-
sentCount: {
|
|
5330
|
-
type: 'number',
|
|
5331
|
-
readOnly: true,
|
|
5332
|
-
},
|
|
5333
|
-
replyCount: {
|
|
5334
|
-
type: 'number',
|
|
5335
|
-
readOnly: true,
|
|
5336
|
-
},
|
|
5337
|
-
openCount: {
|
|
5338
|
-
type: 'number',
|
|
5339
|
-
readOnly: true,
|
|
5340
|
-
},
|
|
5341
|
-
clickCount: {
|
|
5342
|
-
type: 'number',
|
|
5343
|
-
readOnly: true,
|
|
5344
|
-
},
|
|
5345
|
-
startTime: {
|
|
5346
|
-
type: 'string',
|
|
5347
|
-
format: 'date-time',
|
|
5348
|
-
},
|
|
5349
|
-
endTime: {
|
|
5350
|
-
type: 'string',
|
|
5351
|
-
format: 'date-time',
|
|
5352
|
-
},
|
|
5353
|
-
createdTime: {
|
|
5354
|
-
type: 'string',
|
|
5355
|
-
format: 'date-time',
|
|
5356
|
-
readOnly: true,
|
|
5357
|
-
},
|
|
5358
|
-
createdBy: {
|
|
5359
|
-
type: 'string',
|
|
5360
|
-
referenceUdm: 'users',
|
|
5361
|
-
readOnly: true,
|
|
5362
|
-
},
|
|
5363
|
-
updatedTime: {
|
|
5364
|
-
type: 'string',
|
|
5365
|
-
format: 'date-time',
|
|
5366
|
-
readOnly: true,
|
|
5367
|
-
},
|
|
5368
|
-
updatedBy: {
|
|
5369
|
-
type: 'string',
|
|
5370
|
-
referenceUdm: 'users',
|
|
5371
|
-
readOnly: true,
|
|
5372
|
-
},
|
|
5373
|
-
lastActivityTime: {
|
|
5374
|
-
type: 'string',
|
|
5375
|
-
format: 'date-time',
|
|
5376
|
-
readOnly: true,
|
|
5377
|
-
},
|
|
5378
|
-
},
|
|
5379
|
-
};
|
|
5380
|
-
const MODIFIABLE_FIELDS$2 = ['name', 'description', 'ownerId', 'startTime', 'endTime', 'cost', 'source', 'stage', 'type'];
|
|
5381
|
-
const udm$D = {
|
|
5382
|
-
singularName: 'campaign',
|
|
5383
|
-
pluralName: 'campaigns',
|
|
5384
|
-
fieldsSchema: FIELDS_SCHEMA$D,
|
|
5385
|
-
categories: ['Marketing Automation', 'Sales', 'CRM', 'Ads'],
|
|
5386
|
-
list: {
|
|
5387
|
-
filterFields: ['name', 'source', 'stage', 'type', 'ownerId'],
|
|
5388
|
-
},
|
|
5389
|
-
find: {
|
|
5390
|
-
queryFields: ['name', 'source', 'stage', 'type', 'ownerId'],
|
|
5391
|
-
},
|
|
5392
|
-
match: {
|
|
5393
|
-
fields: ['name', 'source', 'stage', 'type', 'ownerId'],
|
|
5394
|
-
},
|
|
5395
|
-
create: {
|
|
5396
|
-
fields: MODIFIABLE_FIELDS$2,
|
|
5397
|
-
},
|
|
5398
|
-
update: {
|
|
5399
|
-
fields: MODIFIABLE_FIELDS$2,
|
|
5400
|
-
},
|
|
5401
|
-
};
|
|
5402
|
-
|
|
5403
|
-
const AddressSchema = {
|
|
5404
|
-
type: 'object',
|
|
5405
|
-
properties: {
|
|
5406
|
-
type: { type: 'string' },
|
|
5407
|
-
full: { type: 'string' },
|
|
5408
|
-
street: { type: 'string' },
|
|
5409
|
-
city: { type: 'string' },
|
|
5410
|
-
state: { type: 'string' },
|
|
5411
|
-
country: { type: 'string' },
|
|
5412
|
-
zip: { type: 'string' },
|
|
5413
|
-
},
|
|
5414
|
-
};
|
|
5415
|
-
const PhoneEmailSchema = {
|
|
5416
|
-
type: 'object',
|
|
5417
|
-
properties: {
|
|
5418
|
-
value: { type: 'string' },
|
|
5419
|
-
type: { type: 'string' },
|
|
5420
|
-
},
|
|
5421
|
-
};
|
|
5422
|
-
|
|
5423
|
-
const FIELDS_SCHEMA$C = {
|
|
5424
|
-
type: 'object',
|
|
5425
|
-
properties: {
|
|
5426
|
-
id: { type: 'string', readOnly: true },
|
|
5427
|
-
name: {
|
|
5428
|
-
type: 'string',
|
|
5429
|
-
},
|
|
5430
|
-
websiteUrl: {
|
|
5431
|
-
type: 'string',
|
|
5432
|
-
},
|
|
5433
|
-
phones: {
|
|
5434
|
-
type: 'array',
|
|
5435
|
-
items: PhoneEmailSchema,
|
|
5436
|
-
},
|
|
5437
|
-
primaryPhone: {
|
|
5438
|
-
type: 'string',
|
|
5439
|
-
},
|
|
5440
|
-
description: {
|
|
5441
|
-
type: 'string',
|
|
5442
|
-
},
|
|
5443
|
-
currency: {
|
|
5444
|
-
type: 'string',
|
|
5445
|
-
},
|
|
5446
|
-
industry: {
|
|
5447
|
-
type: 'string',
|
|
5448
|
-
},
|
|
5449
|
-
ownerId: {
|
|
5450
|
-
type: 'string',
|
|
5451
|
-
referenceUdm: 'users',
|
|
5452
|
-
},
|
|
5453
|
-
primaryAddress: AddressSchema,
|
|
5454
|
-
addresses: {
|
|
5455
|
-
type: 'array',
|
|
5456
|
-
items: AddressSchema,
|
|
5457
|
-
},
|
|
5458
|
-
numberOfEmployees: {
|
|
5459
|
-
type: 'number',
|
|
5460
|
-
},
|
|
5461
|
-
createdTime: {
|
|
5462
|
-
type: 'string',
|
|
5463
|
-
format: 'date-time',
|
|
5464
|
-
},
|
|
5465
|
-
createdBy: {
|
|
5466
|
-
type: 'string',
|
|
5467
|
-
referenceUdm: 'users',
|
|
5468
|
-
readOnly: true,
|
|
5469
|
-
},
|
|
5470
|
-
updatedTime: {
|
|
5471
|
-
type: 'string',
|
|
5472
|
-
format: 'date-time',
|
|
5473
|
-
readOnly: true,
|
|
5474
|
-
},
|
|
5475
|
-
updatedBy: {
|
|
5476
|
-
type: 'string',
|
|
5477
|
-
referenceUdm: 'users',
|
|
5478
|
-
readOnly: true,
|
|
5479
|
-
},
|
|
5480
|
-
lastActivityTime: {
|
|
5481
|
-
type: 'string',
|
|
5482
|
-
format: 'date-time',
|
|
5483
|
-
readOnly: true,
|
|
5484
|
-
},
|
|
5485
|
-
},
|
|
5486
|
-
};
|
|
5487
|
-
const udm$C = {
|
|
5488
|
-
singularName: 'company',
|
|
5489
|
-
pluralName: 'companies',
|
|
5490
|
-
fieldsSchema: FIELDS_SCHEMA$C,
|
|
5491
|
-
list: {
|
|
5492
|
-
filterFields: ['ownerId', 'name', 'websiteUrl', 'industry'],
|
|
5493
|
-
},
|
|
5494
|
-
find: {
|
|
5495
|
-
queryFields: ['ownerId', 'name', 'websiteUrl', 'industry'],
|
|
5496
|
-
},
|
|
5497
|
-
match: {
|
|
5498
|
-
fields: ['ownerId', 'name', 'websiteUrl', 'industry'],
|
|
5499
|
-
},
|
|
5500
|
-
fieldFallbacks: {
|
|
5501
|
-
'primaryAddress.full': [
|
|
5502
|
-
{
|
|
5503
|
-
$concat: {
|
|
5504
|
-
values: [
|
|
5505
|
-
{ $var: 'primaryAddress.street' },
|
|
5506
|
-
{ $var: 'primaryAddress.city' },
|
|
5507
|
-
{ $var: 'primaryAddress.state' },
|
|
5508
|
-
{ $var: 'primaryAddress.zip' },
|
|
5509
|
-
{ $var: 'primaryAddress.country' },
|
|
5510
|
-
],
|
|
5511
|
-
delimiter: ', ',
|
|
5512
|
-
},
|
|
5513
|
-
},
|
|
5514
|
-
],
|
|
5515
|
-
},
|
|
5516
|
-
};
|
|
5517
|
-
|
|
5518
|
-
const FIELDS_SCHEMA$B = {
|
|
5519
|
-
type: 'object',
|
|
5520
|
-
properties: {
|
|
5521
|
-
id: { type: 'string', readOnly: true },
|
|
5522
|
-
name: { type: 'string' },
|
|
5523
|
-
description: { type: 'string' },
|
|
5524
|
-
source: { type: 'string' },
|
|
5525
|
-
type: { type: 'string' },
|
|
5526
|
-
ownerId: {
|
|
5527
|
-
type: 'string',
|
|
5528
|
-
referenceUdm: 'users',
|
|
5529
|
-
},
|
|
5530
|
-
createdTime: {
|
|
5531
|
-
type: 'string',
|
|
5532
|
-
format: 'date-time',
|
|
5533
|
-
readOnly: true,
|
|
5380
|
+
format: 'date-time',
|
|
5381
|
+
readOnly: true,
|
|
5534
5382
|
},
|
|
5535
5383
|
createdBy: {
|
|
5536
5384
|
type: 'string',
|
|
@@ -7948,173 +7796,6 @@ const udm = {
|
|
|
7948
7796
|
},
|
|
7949
7797
|
};
|
|
7950
7798
|
|
|
7951
|
-
const structuredClone$1 = (structuredClonePolyfill === null || structuredClonePolyfill === void 0 ? void 0 : structuredClonePolyfill.default) || structuredClonePolyfill;
|
|
7952
|
-
function isNil(value) {
|
|
7953
|
-
return value == null;
|
|
7954
|
-
}
|
|
7955
|
-
function omitBy(obj, check) {
|
|
7956
|
-
obj = { ...obj };
|
|
7957
|
-
Object.entries(obj).forEach(([key, value]) => check(value) && delete obj[key]);
|
|
7958
|
-
return obj;
|
|
7959
|
-
}
|
|
7960
|
-
function isEmptyValue(value) {
|
|
7961
|
-
if (isNil(value)) {
|
|
7962
|
-
return true;
|
|
7963
|
-
}
|
|
7964
|
-
if (typeof value === 'symbol') {
|
|
7965
|
-
return true;
|
|
7966
|
-
}
|
|
7967
|
-
if (typeof value === 'boolean') {
|
|
7968
|
-
return false;
|
|
7969
|
-
}
|
|
7970
|
-
if (typeof value === 'number') {
|
|
7971
|
-
return isNaN(value);
|
|
7972
|
-
}
|
|
7973
|
-
if (typeof value === 'string') {
|
|
7974
|
-
return value.trim().length === 0;
|
|
7975
|
-
}
|
|
7976
|
-
const tag = value.toString();
|
|
7977
|
-
if (tag === '[object Map]' || tag === '[object Set]') {
|
|
7978
|
-
return !value.size;
|
|
7979
|
-
}
|
|
7980
|
-
return typeof value === 'object' && Object.keys(value).length === 0;
|
|
7981
|
-
}
|
|
7982
|
-
const simpleUniqueId = () => {
|
|
7983
|
-
return Math.floor(Math.random() * Number.MAX_SAFE_INTEGER)
|
|
7984
|
-
.toString(36)
|
|
7985
|
-
.padStart(11, '0')
|
|
7986
|
-
.substring(0, 11);
|
|
7987
|
-
};
|
|
7988
|
-
|
|
7989
|
-
function getDataLocationMethodPath(locationKey, methodKey) {
|
|
7990
|
-
return `data/${locationKey}/${toKebabCase(methodKey)}`;
|
|
7991
|
-
}
|
|
7992
|
-
function dataLocationParametersMatch({ locationParameters, targetParameters, }) {
|
|
7993
|
-
targetParameters = typeof targetParameters === 'object' && targetParameters ? targetParameters : {};
|
|
7994
|
-
locationParameters = typeof locationParameters === 'object' && locationParameters ? locationParameters : {};
|
|
7995
|
-
for (const [key, value] of Object.entries(targetParameters)) {
|
|
7996
|
-
if (locationParameters[key] !== value) {
|
|
7997
|
-
return false;
|
|
7998
|
-
}
|
|
7999
|
-
}
|
|
8000
|
-
return true;
|
|
8001
|
-
}
|
|
8002
|
-
function parseDataLocationPath(path) {
|
|
8003
|
-
if (!path) {
|
|
8004
|
-
return undefined;
|
|
8005
|
-
}
|
|
8006
|
-
if (path.startsWith('/')) {
|
|
8007
|
-
path = path.slice(1);
|
|
8008
|
-
}
|
|
8009
|
-
if (!path.startsWith('data/')) {
|
|
8010
|
-
throw new Error(`Invalid data location path: ${path}. It should start with "data/"`);
|
|
8011
|
-
}
|
|
8012
|
-
path = path.slice(5);
|
|
8013
|
-
const [key, query] = path.split('?');
|
|
8014
|
-
const parameters = Object.fromEntries(new URLSearchParams(query).entries());
|
|
8015
|
-
return { key, parameters };
|
|
8016
|
-
}
|
|
8017
|
-
function makeDataLocationPath(pointer) {
|
|
8018
|
-
var _a;
|
|
8019
|
-
const normalizedPointer = normalizePointer(pointer);
|
|
8020
|
-
if (normalizedPointer === null || normalizedPointer === void 0 ? void 0 : normalizedPointer.key) {
|
|
8021
|
-
let path = `/data/${normalizedPointer.key}`;
|
|
8022
|
-
const parameters = omitBy((_a = normalizedPointer.parameters) !== null && _a !== void 0 ? _a : {}, isNil);
|
|
8023
|
-
if (Object.keys(parameters).length > 0) {
|
|
8024
|
-
path += `?${new URLSearchParams(parameters).toString()}`;
|
|
8025
|
-
}
|
|
8026
|
-
return path;
|
|
8027
|
-
}
|
|
8028
|
-
else {
|
|
8029
|
-
return undefined;
|
|
8030
|
-
}
|
|
8031
|
-
}
|
|
8032
|
-
function normalizePointer(pointer) {
|
|
8033
|
-
if (typeof pointer === 'string' && pointer.startsWith('/data/')) {
|
|
8034
|
-
return {
|
|
8035
|
-
key: pointer.slice(6),
|
|
8036
|
-
};
|
|
8037
|
-
}
|
|
8038
|
-
return pointer;
|
|
8039
|
-
}
|
|
8040
|
-
function makeDataLocationOperationPath(collectionPath, operation) {
|
|
8041
|
-
const [path, query] = (collectionPath !== null && collectionPath !== void 0 ? collectionPath : '').split('?');
|
|
8042
|
-
return urljoin(path, operation, query ? `?${query}` : '');
|
|
8043
|
-
}
|
|
8044
|
-
function isSameDataLocation(location1, location2) {
|
|
8045
|
-
if (location1.key !== location2.key) {
|
|
8046
|
-
return false;
|
|
8047
|
-
}
|
|
8048
|
-
const cleanParameters1 = location1.parameters && Object.keys(location1.parameters).length > 0 ? location1.parameters : undefined;
|
|
8049
|
-
const cleanParameters2 = location2.parameters && Object.keys(location2.parameters).length > 0 ? location2.parameters : undefined;
|
|
8050
|
-
if (!deepEqual(cleanParameters1, cleanParameters2)) {
|
|
8051
|
-
return false;
|
|
8052
|
-
}
|
|
8053
|
-
return true;
|
|
8054
|
-
}
|
|
8055
|
-
function isDataLocationMethodSupported(location, methodKey) {
|
|
8056
|
-
var _a;
|
|
8057
|
-
const method = (_a = location === null || location === void 0 ? void 0 : location.methods) === null || _a === void 0 ? void 0 : _a[methodKey];
|
|
8058
|
-
return method && method.implementationType !== ConnectorMethodImplementationType.notSupported;
|
|
8059
|
-
}
|
|
8060
|
-
function getDataCollectionCreateFields(spec) {
|
|
8061
|
-
if (!spec)
|
|
8062
|
-
return undefined;
|
|
8063
|
-
if (!spec.fieldsSchema)
|
|
8064
|
-
return undefined;
|
|
8065
|
-
if (!spec.create)
|
|
8066
|
-
return undefined;
|
|
8067
|
-
let schema = excludeReadOnlyFieldsFromSchema(spec.fieldsSchema);
|
|
8068
|
-
if (spec.create.fields) {
|
|
8069
|
-
schema = pickFieldsFromSchema(schema, spec.create.fields);
|
|
8070
|
-
}
|
|
8071
|
-
if (spec.create.excludedFields) {
|
|
8072
|
-
schema = excludeFieldsFromSchema(schema, spec.create.excludedFields);
|
|
8073
|
-
}
|
|
8074
|
-
return schema;
|
|
8075
|
-
}
|
|
8076
|
-
function getDataCollectionUpdateFields(spec) {
|
|
8077
|
-
if (!spec)
|
|
8078
|
-
return undefined;
|
|
8079
|
-
if (!spec.fieldsSchema)
|
|
8080
|
-
return undefined;
|
|
8081
|
-
if (!spec.update)
|
|
8082
|
-
return undefined;
|
|
8083
|
-
let schema = excludeReadOnlyFieldsFromSchema(spec.fieldsSchema);
|
|
8084
|
-
if (spec.update.fields) {
|
|
8085
|
-
schema = pickFieldsFromSchema(schema, spec.update.fields);
|
|
8086
|
-
}
|
|
8087
|
-
if (spec.update.excludedFields) {
|
|
8088
|
-
schema = excludeFieldsFromSchema(schema, spec.update.excludedFields);
|
|
8089
|
-
}
|
|
8090
|
-
return schema;
|
|
8091
|
-
}
|
|
8092
|
-
function getWritableFieldsSchema(spec) {
|
|
8093
|
-
if (!spec)
|
|
8094
|
-
return undefined;
|
|
8095
|
-
if (!spec.fieldsSchema)
|
|
8096
|
-
return undefined;
|
|
8097
|
-
return mergeSchemas([getDataCollectionCreateFields(spec), getDataCollectionUpdateFields(spec)]);
|
|
8098
|
-
}
|
|
8099
|
-
function getReferenceCollectionPointerForSchema(schema) {
|
|
8100
|
-
if ((schema === null || schema === void 0 ? void 0 : schema.referenceCollection) && schema.referenceCollection.key) {
|
|
8101
|
-
return schema.referenceCollection;
|
|
8102
|
-
}
|
|
8103
|
-
else if (schema === null || schema === void 0 ? void 0 : schema.referenceCollectionPath) {
|
|
8104
|
-
return parseDataLocationPath(schema.referenceCollectionPath);
|
|
8105
|
-
}
|
|
8106
|
-
else if (schema === null || schema === void 0 ? void 0 : schema.referenceCollectionUri) {
|
|
8107
|
-
return parseDataLocationPath(schema.referenceCollectionUri);
|
|
8108
|
-
}
|
|
8109
|
-
else {
|
|
8110
|
-
return undefined;
|
|
8111
|
-
}
|
|
8112
|
-
}
|
|
8113
|
-
function getReferenceCollectionPathForSchema(schema) {
|
|
8114
|
-
const pointer = getReferenceCollectionPointerForSchema(schema);
|
|
8115
|
-
return makeDataLocationPath(pointer);
|
|
8116
|
-
}
|
|
8117
|
-
|
|
8118
7799
|
var UDM;
|
|
8119
7800
|
(function (UDM) {
|
|
8120
7801
|
UDM["ACTIVITIES"] = "activities";
|
|
@@ -8299,63 +7980,385 @@ function addUdmFallbackFields(fields, udm) {
|
|
|
8299
7980
|
return result;
|
|
8300
7981
|
}
|
|
8301
7982
|
|
|
8302
|
-
const DATA_RECORD_SCHEMA = {
|
|
8303
|
-
type: 'object',
|
|
8304
|
-
properties: {
|
|
8305
|
-
id: {
|
|
8306
|
-
type: 'string',
|
|
8307
|
-
},
|
|
8308
|
-
name: {
|
|
8309
|
-
type: 'string',
|
|
8310
|
-
},
|
|
8311
|
-
uri: {
|
|
8312
|
-
type: 'string',
|
|
8313
|
-
format: 'url',
|
|
8314
|
-
},
|
|
8315
|
-
createdTime: {
|
|
8316
|
-
type: 'string',
|
|
8317
|
-
format: 'datetime',
|
|
8318
|
-
},
|
|
8319
|
-
updatedTime: {
|
|
8320
|
-
type: 'string',
|
|
8321
|
-
format: 'datetime',
|
|
8322
|
-
},
|
|
8323
|
-
deletedTime: {
|
|
8324
|
-
type: 'string',
|
|
8325
|
-
format: 'datetime',
|
|
8326
|
-
},
|
|
8327
|
-
createdById: {
|
|
8328
|
-
type: 'string',
|
|
8329
|
-
},
|
|
8330
|
-
updatedById: {
|
|
8331
|
-
type: 'string',
|
|
8332
|
-
},
|
|
7983
|
+
const DATA_RECORD_SCHEMA = {
|
|
7984
|
+
type: 'object',
|
|
7985
|
+
properties: {
|
|
7986
|
+
id: {
|
|
7987
|
+
type: 'string',
|
|
7988
|
+
},
|
|
7989
|
+
name: {
|
|
7990
|
+
type: 'string',
|
|
7991
|
+
},
|
|
7992
|
+
uri: {
|
|
7993
|
+
type: 'string',
|
|
7994
|
+
format: 'url',
|
|
7995
|
+
},
|
|
7996
|
+
createdTime: {
|
|
7997
|
+
type: 'string',
|
|
7998
|
+
format: 'datetime',
|
|
7999
|
+
},
|
|
8000
|
+
updatedTime: {
|
|
8001
|
+
type: 'string',
|
|
8002
|
+
format: 'datetime',
|
|
8003
|
+
},
|
|
8004
|
+
deletedTime: {
|
|
8005
|
+
type: 'string',
|
|
8006
|
+
format: 'datetime',
|
|
8007
|
+
},
|
|
8008
|
+
createdById: {
|
|
8009
|
+
type: 'string',
|
|
8010
|
+
},
|
|
8011
|
+
updatedById: {
|
|
8012
|
+
type: 'string',
|
|
8013
|
+
},
|
|
8014
|
+
},
|
|
8015
|
+
};
|
|
8016
|
+
function makeDataRecordSchema({ fieldsSchema, udm, rawFieldsSchema, }) {
|
|
8017
|
+
var _a, _b, _c;
|
|
8018
|
+
const schema = structuredClone$1(DATA_RECORD_SCHEMA);
|
|
8019
|
+
schema.properties = {
|
|
8020
|
+
...((_a = schema.properties) !== null && _a !== void 0 ? _a : {}),
|
|
8021
|
+
fields: fieldsSchema !== null && fieldsSchema !== void 0 ? fieldsSchema : { type: 'object' },
|
|
8022
|
+
};
|
|
8023
|
+
if (udm) {
|
|
8024
|
+
const unifiedModel = UNIFIED_DATA_MODELS[udm];
|
|
8025
|
+
if (unifiedModel === null || unifiedModel === void 0 ? void 0 : unifiedModel.fieldsSchema) {
|
|
8026
|
+
schema.properties = {
|
|
8027
|
+
...((_b = schema.properties) !== null && _b !== void 0 ? _b : {}),
|
|
8028
|
+
unifiedFields: unifiedModel.fieldsSchema,
|
|
8029
|
+
};
|
|
8030
|
+
}
|
|
8031
|
+
}
|
|
8032
|
+
if (rawFieldsSchema) {
|
|
8033
|
+
schema.properties = {
|
|
8034
|
+
...((_c = schema.properties) !== null && _c !== void 0 ? _c : {}),
|
|
8035
|
+
rawFields: rawFieldsSchema,
|
|
8036
|
+
};
|
|
8037
|
+
}
|
|
8038
|
+
return schema;
|
|
8039
|
+
}
|
|
8040
|
+
|
|
8041
|
+
const DataLocationMethodImplementationTypes = [
|
|
8042
|
+
ConnectorMethodImplementationType.operationMapping,
|
|
8043
|
+
ConnectorMethodImplementationType.restApiMapping,
|
|
8044
|
+
ConnectorMethodImplementationType.graphqlApiMapping,
|
|
8045
|
+
ConnectorMethodImplementationType.javascript,
|
|
8046
|
+
ConnectorMethodImplementationType.notSupported,
|
|
8047
|
+
];
|
|
8048
|
+
|
|
8049
|
+
const DataCollectionMethodCreate = {
|
|
8050
|
+
name: 'Create',
|
|
8051
|
+
description: 'Create a new data record in the collection',
|
|
8052
|
+
getConfigSchema: ({ collectionSpec }) => {
|
|
8053
|
+
var _a, _b;
|
|
8054
|
+
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);
|
|
8055
|
+
return {
|
|
8056
|
+
type: 'object',
|
|
8057
|
+
properties: {
|
|
8058
|
+
fields: {
|
|
8059
|
+
type: 'array',
|
|
8060
|
+
items: { type: 'string', enum: fields },
|
|
8061
|
+
},
|
|
8062
|
+
excludedFields: {
|
|
8063
|
+
type: 'array',
|
|
8064
|
+
items: { type: 'string', enum: fields },
|
|
8065
|
+
},
|
|
8066
|
+
},
|
|
8067
|
+
};
|
|
8068
|
+
},
|
|
8069
|
+
getInputSchema: ({ collectionSpec, method, credentialsSchema }) => {
|
|
8070
|
+
var _a;
|
|
8071
|
+
let fieldsSchema = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema;
|
|
8072
|
+
if (method === null || method === void 0 ? void 0 : method.fields) {
|
|
8073
|
+
fieldsSchema = pickFieldsFromSchema(fieldsSchema, method.fields);
|
|
8074
|
+
}
|
|
8075
|
+
if (method === null || method === void 0 ? void 0 : method.excludedFields) {
|
|
8076
|
+
fieldsSchema = excludeFieldsFromSchema(fieldsSchema, method.excludedFields);
|
|
8077
|
+
}
|
|
8078
|
+
return {
|
|
8079
|
+
type: 'object',
|
|
8080
|
+
properties: nonEmptyObjectProperties({
|
|
8081
|
+
fields: (_a = transformVariablesWith(fieldsSchema, (locator) => `fields.${locatorToField(locator)}`)) !== null && _a !== void 0 ? _a : {
|
|
8082
|
+
type: 'object',
|
|
8083
|
+
},
|
|
8084
|
+
credentials: credentialsSchema,
|
|
8085
|
+
}),
|
|
8086
|
+
};
|
|
8087
|
+
},
|
|
8088
|
+
getOutputSchema: ({}) => ({
|
|
8089
|
+
type: 'object',
|
|
8090
|
+
properties: {
|
|
8091
|
+
id: { type: 'string' },
|
|
8092
|
+
},
|
|
8093
|
+
}),
|
|
8094
|
+
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
8095
|
+
};
|
|
8096
|
+
|
|
8097
|
+
const DataCollectionMethodDelete = {
|
|
8098
|
+
name: 'Delete',
|
|
8099
|
+
description: 'Delete a data record from the collection by id',
|
|
8100
|
+
getInputSchema: ({ collectionHandler, parameters, credentialsSchema }) => {
|
|
8101
|
+
return {
|
|
8102
|
+
type: 'object',
|
|
8103
|
+
properties: nonEmptyObjectProperties({
|
|
8104
|
+
id: {
|
|
8105
|
+
type: 'string',
|
|
8106
|
+
referenceCollection: { key: collectionHandler === null || collectionHandler === void 0 ? void 0 : collectionHandler.key, parameters },
|
|
8107
|
+
},
|
|
8108
|
+
credentials: credentialsSchema,
|
|
8109
|
+
}),
|
|
8110
|
+
};
|
|
8111
|
+
},
|
|
8112
|
+
getOutputSchema: () => null,
|
|
8113
|
+
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
8114
|
+
};
|
|
8115
|
+
|
|
8116
|
+
const DataCollectionMethodFind = {
|
|
8117
|
+
isDeprecated: true,
|
|
8118
|
+
name: 'Find',
|
|
8119
|
+
description: 'Find a list of data records in the collection',
|
|
8120
|
+
getConfigSchema: ({ collectionSpec }) => {
|
|
8121
|
+
var _a, _b;
|
|
8122
|
+
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);
|
|
8123
|
+
return {
|
|
8124
|
+
type: 'object',
|
|
8125
|
+
properties: {
|
|
8126
|
+
queryFields: {
|
|
8127
|
+
type: 'array',
|
|
8128
|
+
items: { type: 'string', enum: fields },
|
|
8129
|
+
},
|
|
8130
|
+
},
|
|
8131
|
+
};
|
|
8132
|
+
},
|
|
8133
|
+
getInputSchema: ({ collectionSpec, method, credentialsSchema }) => {
|
|
8134
|
+
const queryFieldsSchema = pickFieldsFromSchema(collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema, method === null || method === void 0 ? void 0 : method.queryFields);
|
|
8135
|
+
const schema = {
|
|
8136
|
+
type: 'object',
|
|
8137
|
+
properties: nonEmptyObjectProperties({
|
|
8138
|
+
cursor: { type: 'string' },
|
|
8139
|
+
credentials: credentialsSchema,
|
|
8140
|
+
}),
|
|
8141
|
+
};
|
|
8142
|
+
if (queryFieldsSchema === null || queryFieldsSchema === void 0 ? void 0 : queryFieldsSchema.properties) {
|
|
8143
|
+
schema.properties = {
|
|
8144
|
+
...schema.properties,
|
|
8145
|
+
query: transformVariablesWith(queryFieldsSchema, (locator) => `query.${locatorToField(locator)}`),
|
|
8146
|
+
};
|
|
8147
|
+
}
|
|
8148
|
+
return schema;
|
|
8149
|
+
},
|
|
8150
|
+
getOutputSchema: ({ collectionSpec }) => {
|
|
8151
|
+
var _a;
|
|
8152
|
+
return ({
|
|
8153
|
+
type: 'object',
|
|
8154
|
+
properties: {
|
|
8155
|
+
records: {
|
|
8156
|
+
type: 'array',
|
|
8157
|
+
items: (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) !== null && _a !== void 0 ? _a : { type: 'object' },
|
|
8158
|
+
},
|
|
8159
|
+
cursor: {
|
|
8160
|
+
type: 'string',
|
|
8161
|
+
},
|
|
8162
|
+
},
|
|
8163
|
+
});
|
|
8164
|
+
},
|
|
8165
|
+
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
8166
|
+
};
|
|
8167
|
+
|
|
8168
|
+
const DataCollectionMethodFindById = {
|
|
8169
|
+
name: 'Find by ID',
|
|
8170
|
+
description: 'Find a single data record in the collection by its id',
|
|
8171
|
+
getInputSchema: ({ collectionHandler, parameters, credentialsSchema }) => ({
|
|
8172
|
+
type: 'object',
|
|
8173
|
+
properties: nonEmptyObjectProperties({
|
|
8174
|
+
id: {
|
|
8175
|
+
type: 'string',
|
|
8176
|
+
referenceCollection: { key: collectionHandler === null || collectionHandler === void 0 ? void 0 : collectionHandler.key, parameters },
|
|
8177
|
+
},
|
|
8178
|
+
credentials: credentialsSchema,
|
|
8179
|
+
}),
|
|
8180
|
+
}),
|
|
8181
|
+
getOutputSchema: ({ collectionSpec }) => {
|
|
8182
|
+
var _a;
|
|
8183
|
+
return ({
|
|
8184
|
+
type: 'object',
|
|
8185
|
+
properties: {
|
|
8186
|
+
record: (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) !== null && _a !== void 0 ? _a : { type: 'object' },
|
|
8187
|
+
},
|
|
8188
|
+
});
|
|
8189
|
+
},
|
|
8190
|
+
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
8191
|
+
};
|
|
8192
|
+
|
|
8193
|
+
const DataCollectionMethodList = {
|
|
8194
|
+
name: 'List',
|
|
8195
|
+
description: 'Return all data records from the collection',
|
|
8196
|
+
getConfigSchema: ({ collectionSpec }) => {
|
|
8197
|
+
var _a, _b;
|
|
8198
|
+
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);
|
|
8199
|
+
return {
|
|
8200
|
+
type: 'object',
|
|
8201
|
+
properties: {
|
|
8202
|
+
filterFields: {
|
|
8203
|
+
type: 'array',
|
|
8204
|
+
items: { type: 'string', enum: fields },
|
|
8205
|
+
},
|
|
8206
|
+
},
|
|
8207
|
+
};
|
|
8208
|
+
},
|
|
8209
|
+
getInputSchema: ({ method, collectionSpec, credentialsSchema }) => {
|
|
8210
|
+
const fieldsSchema = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema;
|
|
8211
|
+
let filterSchema;
|
|
8212
|
+
if (method === null || method === void 0 ? void 0 : method.filterFields) {
|
|
8213
|
+
filterSchema = pickFieldsFromSchema(fieldsSchema, method.filterFields);
|
|
8214
|
+
}
|
|
8215
|
+
return {
|
|
8216
|
+
type: 'object',
|
|
8217
|
+
properties: nonEmptyObjectProperties({
|
|
8218
|
+
filter: filterSchema,
|
|
8219
|
+
cursor: {
|
|
8220
|
+
type: 'string',
|
|
8221
|
+
description: 'Cursor returned in response to the previous "list" request',
|
|
8222
|
+
},
|
|
8223
|
+
credentials: credentialsSchema,
|
|
8224
|
+
}),
|
|
8225
|
+
};
|
|
8226
|
+
},
|
|
8227
|
+
getOutputSchema: ({ collectionSpec }) => {
|
|
8228
|
+
var _a;
|
|
8229
|
+
return ({
|
|
8230
|
+
type: 'object',
|
|
8231
|
+
properties: {
|
|
8232
|
+
records: {
|
|
8233
|
+
type: 'array',
|
|
8234
|
+
items: (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) !== null && _a !== void 0 ? _a : { type: 'object' },
|
|
8235
|
+
},
|
|
8236
|
+
cursor: {
|
|
8237
|
+
type: 'string',
|
|
8238
|
+
description: 'Cursor to request the next page of results',
|
|
8239
|
+
},
|
|
8240
|
+
},
|
|
8241
|
+
});
|
|
8242
|
+
},
|
|
8243
|
+
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
8244
|
+
};
|
|
8245
|
+
|
|
8246
|
+
const DataCollectionMethodMatch = {
|
|
8247
|
+
name: 'Match',
|
|
8248
|
+
description: 'Find a single matching record in a data collection by a set of fields',
|
|
8249
|
+
getConfigSchema: ({ collectionSpec }) => {
|
|
8250
|
+
var _a, _b;
|
|
8251
|
+
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);
|
|
8252
|
+
return {
|
|
8253
|
+
type: 'object',
|
|
8254
|
+
properties: {
|
|
8255
|
+
fields: {
|
|
8256
|
+
type: 'array',
|
|
8257
|
+
items: { type: 'string', enum: fields },
|
|
8258
|
+
},
|
|
8259
|
+
},
|
|
8260
|
+
};
|
|
8261
|
+
},
|
|
8262
|
+
getInputSchema: ({ collectionSpec, method, credentialsSchema }) => {
|
|
8263
|
+
const fieldsSchema = pickFieldsFromSchema(collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema, method === null || method === void 0 ? void 0 : method.fields);
|
|
8264
|
+
return {
|
|
8265
|
+
type: 'object',
|
|
8266
|
+
properties: nonEmptyObjectProperties({
|
|
8267
|
+
query: transformVariablesWith(fieldsSchema !== null && fieldsSchema !== void 0 ? fieldsSchema : {}, (locator) => `query.${locatorToField(locator)}`),
|
|
8268
|
+
credentials: credentialsSchema,
|
|
8269
|
+
}),
|
|
8270
|
+
};
|
|
8271
|
+
},
|
|
8272
|
+
getOutputSchema: ({ collectionSpec }) => {
|
|
8273
|
+
var _a;
|
|
8274
|
+
return ({
|
|
8275
|
+
type: 'object',
|
|
8276
|
+
properties: {
|
|
8277
|
+
record: (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) !== null && _a !== void 0 ? _a : { type: 'object' },
|
|
8278
|
+
},
|
|
8279
|
+
});
|
|
8280
|
+
},
|
|
8281
|
+
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
8282
|
+
};
|
|
8283
|
+
|
|
8284
|
+
const DataCollectionMethodSearch = {
|
|
8285
|
+
name: 'Search',
|
|
8286
|
+
description: 'Find data records in a collection by a string query',
|
|
8287
|
+
getInputSchema: ({ credentialsSchema }) => ({
|
|
8288
|
+
type: 'object',
|
|
8289
|
+
properties: nonEmptyObjectProperties({
|
|
8290
|
+
query: { type: 'string' },
|
|
8291
|
+
cursor: { type: 'string' },
|
|
8292
|
+
credentials: credentialsSchema,
|
|
8293
|
+
}),
|
|
8294
|
+
}),
|
|
8295
|
+
getOutputSchema: ({ collectionSpec }) => {
|
|
8296
|
+
var _a;
|
|
8297
|
+
return ({
|
|
8298
|
+
type: 'object',
|
|
8299
|
+
properties: {
|
|
8300
|
+
records: {
|
|
8301
|
+
type: 'array',
|
|
8302
|
+
items: (_a = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema) !== null && _a !== void 0 ? _a : { type: 'object' },
|
|
8303
|
+
},
|
|
8304
|
+
cursor: { type: 'string' },
|
|
8305
|
+
},
|
|
8306
|
+
});
|
|
8333
8307
|
},
|
|
8308
|
+
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
8334
8309
|
};
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
|
|
8346
|
-
|
|
8347
|
-
|
|
8348
|
-
|
|
8310
|
+
|
|
8311
|
+
const DataCollectionMethodUpdate = {
|
|
8312
|
+
name: 'Update',
|
|
8313
|
+
description: 'Update one data record in the collection by its id',
|
|
8314
|
+
getConfigSchema: ({ collectionSpec }) => {
|
|
8315
|
+
var _a, _b;
|
|
8316
|
+
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);
|
|
8317
|
+
return {
|
|
8318
|
+
type: 'object',
|
|
8319
|
+
properties: {
|
|
8320
|
+
fields: {
|
|
8321
|
+
type: 'array',
|
|
8322
|
+
items: { type: 'string', enum: fields },
|
|
8323
|
+
},
|
|
8324
|
+
excludedFields: {
|
|
8325
|
+
type: 'array',
|
|
8326
|
+
items: { type: 'string', enum: fields },
|
|
8327
|
+
},
|
|
8328
|
+
},
|
|
8329
|
+
};
|
|
8330
|
+
},
|
|
8331
|
+
getInputSchema: ({ collectionSpec, collectionHandler, credentialsSchema, method, parameters }) => {
|
|
8332
|
+
var _a;
|
|
8333
|
+
let fieldsSchema = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema;
|
|
8334
|
+
if (method === null || method === void 0 ? void 0 : method.fields) {
|
|
8335
|
+
fieldsSchema = pickFieldsFromSchema(fieldsSchema, method.fields);
|
|
8349
8336
|
}
|
|
8350
|
-
|
|
8351
|
-
|
|
8352
|
-
|
|
8353
|
-
|
|
8354
|
-
|
|
8337
|
+
if (method === null || method === void 0 ? void 0 : method.excludedFields) {
|
|
8338
|
+
fieldsSchema = excludeFieldsFromSchema(fieldsSchema, method.excludedFields);
|
|
8339
|
+
}
|
|
8340
|
+
return {
|
|
8341
|
+
type: 'object',
|
|
8342
|
+
properties: nonEmptyObjectProperties({
|
|
8343
|
+
id: {
|
|
8344
|
+
type: 'string',
|
|
8345
|
+
referenceCollection: { key: collectionHandler === null || collectionHandler === void 0 ? void 0 : collectionHandler.key, parameters },
|
|
8346
|
+
},
|
|
8347
|
+
fields: (_a = transformVariablesWith(fieldsSchema, (locator) => `fields.${locatorToField(locator)}`)) !== null && _a !== void 0 ? _a : {
|
|
8348
|
+
type: 'object',
|
|
8349
|
+
},
|
|
8350
|
+
credentials: credentialsSchema,
|
|
8351
|
+
}),
|
|
8355
8352
|
};
|
|
8356
|
-
}
|
|
8357
|
-
|
|
8358
|
-
|
|
8353
|
+
},
|
|
8354
|
+
getOutputSchema: ({}) => ({
|
|
8355
|
+
type: 'object',
|
|
8356
|
+
properties: {
|
|
8357
|
+
id: { type: 'string' },
|
|
8358
|
+
},
|
|
8359
|
+
}),
|
|
8360
|
+
supportedImplementationTypes: DataLocationMethodImplementationTypes,
|
|
8361
|
+
};
|
|
8359
8362
|
|
|
8360
8363
|
const GetEventConfig = {
|
|
8361
8364
|
fileKey: 'connector-event-get-event-config',
|
|
@@ -9104,6 +9107,7 @@ const GeneratedConnectorOption = z.object({
|
|
|
9104
9107
|
description: z.string().optional(),
|
|
9105
9108
|
inputSchema: DataSchema.optional(),
|
|
9106
9109
|
connectorParametersSchema: DataSchema.optional(),
|
|
9110
|
+
oAuthCallbackUri: z.string().optional(),
|
|
9107
9111
|
});
|
|
9108
9112
|
const ConnectorOptions = z.record(z.string(), ConnectorOption);
|
|
9109
9113
|
const WritableConnectorVersionData = ConnectorAuthWithFunctions.extend({
|
|
@@ -10256,6 +10260,9 @@ const FindActionRunLogsQuery = PaginationQuery.extend({
|
|
|
10256
10260
|
.meta({
|
|
10257
10261
|
filterTitle: 'Status',
|
|
10258
10262
|
}),
|
|
10263
|
+
externalAppId: z.string().optional().meta({
|
|
10264
|
+
hidden: true,
|
|
10265
|
+
}),
|
|
10259
10266
|
from: z
|
|
10260
10267
|
.string()
|
|
10261
10268
|
.optional()
|
|
@@ -10296,6 +10303,13 @@ const FindConnectionsQuery = PaginationQuery.merge(SearchQuery)
|
|
|
10296
10303
|
.meta({
|
|
10297
10304
|
filterTitle: 'Connector',
|
|
10298
10305
|
}),
|
|
10306
|
+
externalAppId: z
|
|
10307
|
+
.string()
|
|
10308
|
+
.optional()
|
|
10309
|
+
.meta({
|
|
10310
|
+
filterTitle: 'External App',
|
|
10311
|
+
referenceElementType: WorkspaceElementType.App,
|
|
10312
|
+
}),
|
|
10299
10313
|
disconnected: zodBooleanCoercion()
|
|
10300
10314
|
.optional()
|
|
10301
10315
|
.meta({
|
|
@@ -10316,10 +10330,6 @@ const FindConnectionsQuery = PaginationQuery.merge(SearchQuery)
|
|
|
10316
10330
|
.string()
|
|
10317
10331
|
.optional()
|
|
10318
10332
|
.meta({ hidden: true }),
|
|
10319
|
-
externalAppId: z.string().optional().meta({
|
|
10320
|
-
filterTitle: 'External App',
|
|
10321
|
-
referenceElementType: WorkspaceElementType.App,
|
|
10322
|
-
}),
|
|
10323
10333
|
integrationKey: z
|
|
10324
10334
|
.string()
|
|
10325
10335
|
.optional()
|
|
@@ -10442,6 +10452,13 @@ const DataSourceInstanceApiResponse = DataSourceApiResponse;
|
|
|
10442
10452
|
const FindDataSourcesQuery = FindIntegrationLevelMembraneInterfaceQuery.omit({ parentId: true }).extend({
|
|
10443
10453
|
dataSourceId: z.string().optional(),
|
|
10444
10454
|
universalDataSourceId: z.string().optional(),
|
|
10455
|
+
externalAppId: z
|
|
10456
|
+
.string()
|
|
10457
|
+
.optional()
|
|
10458
|
+
.meta({
|
|
10459
|
+
filterTitle: 'External App',
|
|
10460
|
+
referenceElementType: WorkspaceElementType.App,
|
|
10461
|
+
}),
|
|
10445
10462
|
});
|
|
10446
10463
|
const FindDataSourceInstancesQuery = FindDataSourcesQuery;
|
|
10447
10464
|
const CreateDataSourceRequest = DataSourceEditableProperties;
|
|
@@ -10525,6 +10542,13 @@ const FlowInstanceApiResponse = FlowApiResponse;
|
|
|
10525
10542
|
const FindFlowsQuery = FindIntegrationLevelMembraneInterfaceQuery.omit({ parentId: true }).extend({
|
|
10526
10543
|
flowId: z.string().optional(),
|
|
10527
10544
|
universalFlowId: z.string().optional(),
|
|
10545
|
+
externalAppId: z
|
|
10546
|
+
.string()
|
|
10547
|
+
.optional()
|
|
10548
|
+
.meta({
|
|
10549
|
+
filterTitle: 'External App',
|
|
10550
|
+
referenceElementType: WorkspaceElementType.App,
|
|
10551
|
+
}),
|
|
10528
10552
|
});
|
|
10529
10553
|
const CreateFlowRequest = FlowEditableProperties;
|
|
10530
10554
|
const UpdateFlowRequest = CreateFlowRequest.extend({}).partial();
|
|
@@ -10602,6 +10626,9 @@ const FindFlowRunsQuery = PaginationQuery.extend({
|
|
|
10602
10626
|
filterTitle: 'Connection',
|
|
10603
10627
|
referenceElementType: WorkspaceElementType.Connection,
|
|
10604
10628
|
}),
|
|
10629
|
+
externalAppId: z.string().optional().meta({
|
|
10630
|
+
hidden: true,
|
|
10631
|
+
}),
|
|
10605
10632
|
from: z
|
|
10606
10633
|
.string()
|
|
10607
10634
|
.optional()
|
|
@@ -10764,6 +10791,13 @@ const FieldMappingInstanceApiResponse = FieldMappingApiResponse;
|
|
|
10764
10791
|
const FindFieldMappingsQuery = FindIntegrationLevelMembraneInterfaceQuery.omit({ parentId: true }).extend({
|
|
10765
10792
|
fieldMappingId: z.string().optional(),
|
|
10766
10793
|
universalFieldMappingId: z.string().optional(),
|
|
10794
|
+
externalAppId: z
|
|
10795
|
+
.string()
|
|
10796
|
+
.optional()
|
|
10797
|
+
.meta({
|
|
10798
|
+
filterTitle: 'External App',
|
|
10799
|
+
referenceElementType: WorkspaceElementType.App,
|
|
10800
|
+
}),
|
|
10767
10801
|
});
|
|
10768
10802
|
const FindFieldMappingInstancesQuery = FindFieldMappingsQuery;
|
|
10769
10803
|
const CreateFieldMappingRequest = FieldMappingEditableProperties;
|
|
@@ -11035,6 +11069,9 @@ const ListExternalEventLogRecordsQuery = PaginationQuery.extend({
|
|
|
11035
11069
|
.meta({
|
|
11036
11070
|
filterTitle: 'Status',
|
|
11037
11071
|
}),
|
|
11072
|
+
externalAppId: z.string().optional().meta({
|
|
11073
|
+
hidden: true,
|
|
11074
|
+
}),
|
|
11038
11075
|
from: z
|
|
11039
11076
|
.string()
|
|
11040
11077
|
.optional()
|
|
@@ -11124,6 +11161,9 @@ const FindExternalEventPullsQuery = PaginationQuery.extend({
|
|
|
11124
11161
|
.meta({
|
|
11125
11162
|
filterTitle: 'Status',
|
|
11126
11163
|
}),
|
|
11164
|
+
externalAppId: z.string().optional().meta({
|
|
11165
|
+
hidden: true,
|
|
11166
|
+
}),
|
|
11127
11167
|
from: z
|
|
11128
11168
|
.string()
|
|
11129
11169
|
.optional()
|
|
@@ -11171,6 +11211,9 @@ const ListExternalEventSubscriptionsQuery = PaginationQuery.merge(IncludeArchive
|
|
|
11171
11211
|
filterTitle: 'Integration',
|
|
11172
11212
|
referenceElementType: WorkspaceElementType.Integration,
|
|
11173
11213
|
}),
|
|
11214
|
+
externalAppId: z.string().optional().meta({
|
|
11215
|
+
hidden: true,
|
|
11216
|
+
}),
|
|
11174
11217
|
});
|
|
11175
11218
|
const ExternalEventSubscriptionApiResponse = BaseExternalEventSubscription.extend({
|
|
11176
11219
|
user: BaseCustomer.optional(),
|
|
@@ -11253,6 +11296,9 @@ const ListExternalApiLogsQuery = PaginationQuery.extend({
|
|
|
11253
11296
|
filterTitle: 'Status',
|
|
11254
11297
|
isFlag: true,
|
|
11255
11298
|
}),
|
|
11299
|
+
externalAppId: z.string().optional().meta({
|
|
11300
|
+
hidden: true,
|
|
11301
|
+
}),
|
|
11256
11302
|
from: z
|
|
11257
11303
|
.string()
|
|
11258
11304
|
.optional()
|
|
@@ -11277,6 +11323,7 @@ const ExternalApiLogApiResponse = z.object({
|
|
|
11277
11323
|
customerId: z.string(),
|
|
11278
11324
|
integrationId: z.string(),
|
|
11279
11325
|
connectionId: z.string(),
|
|
11326
|
+
externalAppId: z.string().optional(),
|
|
11280
11327
|
statusCode: z.number(),
|
|
11281
11328
|
isSuccess: z.boolean(),
|
|
11282
11329
|
s3Uri: z.string(),
|
|
@@ -11316,6 +11363,9 @@ const ListIncomingWebhooksQuery = PaginationQuery.extend({
|
|
|
11316
11363
|
.meta({
|
|
11317
11364
|
filterTitle: 'Status',
|
|
11318
11365
|
}),
|
|
11366
|
+
externalAppId: z.string().optional().meta({
|
|
11367
|
+
hidden: true,
|
|
11368
|
+
}),
|
|
11319
11369
|
from: z
|
|
11320
11370
|
.string()
|
|
11321
11371
|
.optional()
|
|
@@ -11338,6 +11388,7 @@ const IncomingWebhookApiResponse = z.object({
|
|
|
11338
11388
|
customerId: z.string(),
|
|
11339
11389
|
integrationId: z.string(),
|
|
11340
11390
|
connectionId: z.string(),
|
|
11391
|
+
externalAppId: z.string().optional(),
|
|
11341
11392
|
subscriptionId: z.string(),
|
|
11342
11393
|
userId: z.string(),
|
|
11343
11394
|
uuid: z.string(),
|
|
@@ -11351,12 +11402,14 @@ const IncomingWebhookApiResponse = z.object({
|
|
|
11351
11402
|
|
|
11352
11403
|
const CreateConnectedProductRequest = z.object({
|
|
11353
11404
|
name: z.string(),
|
|
11405
|
+
key: z.string().optional(),
|
|
11354
11406
|
type: ConnectedProductType,
|
|
11355
11407
|
audience: ConnectedProductAudience.optional(),
|
|
11356
11408
|
parameters: AiAgentParameters.optional(),
|
|
11357
11409
|
});
|
|
11358
11410
|
const UpdateConnectedProductRequest = z.object({
|
|
11359
11411
|
name: z.string().optional(),
|
|
11412
|
+
key: z.string().optional(),
|
|
11360
11413
|
type: ConnectedProductType.optional(),
|
|
11361
11414
|
audience: ConnectedProductAudience.optional(),
|
|
11362
11415
|
parameters: AiAgentParameters.optional(),
|
|
@@ -11365,7 +11418,6 @@ const FindConnectedProductsQuery = z
|
|
|
11365
11418
|
.object({
|
|
11366
11419
|
type: ConnectedProductType.optional(),
|
|
11367
11420
|
audience: ConnectedProductAudience.optional(),
|
|
11368
|
-
key: z.string().optional(),
|
|
11369
11421
|
})
|
|
11370
11422
|
.merge(PaginationQuery)
|
|
11371
11423
|
.merge(SearchQuery)
|
|
@@ -11691,6 +11743,26 @@ const WorkspaceElementSpecs = {
|
|
|
11691
11743
|
apiPath: 'customers',
|
|
11692
11744
|
name: 'Customer',
|
|
11693
11745
|
namePlural: 'Customers',
|
|
11746
|
+
relatedIntegrationLayerElements: [
|
|
11747
|
+
WorkspaceElementType.Connection,
|
|
11748
|
+
WorkspaceElementType.Action,
|
|
11749
|
+
WorkspaceElementType.Flow,
|
|
11750
|
+
WorkspaceElementType.ExternalEventSubscription,
|
|
11751
|
+
WorkspaceElementType.AppEventSubscription,
|
|
11752
|
+
WorkspaceElementType.DataSource,
|
|
11753
|
+
WorkspaceElementType.FieldMapping,
|
|
11754
|
+
WorkspaceElementType.AppDataSchemaInstance,
|
|
11755
|
+
WorkspaceElementType.DataLinkTableInstance,
|
|
11756
|
+
],
|
|
11757
|
+
relatedActivityLogElements: [
|
|
11758
|
+
WorkspaceElementType.FlowRun,
|
|
11759
|
+
WorkspaceElementType.ActionRunLogRecord,
|
|
11760
|
+
WorkspaceElementType.ExternalApiLogRecord,
|
|
11761
|
+
WorkspaceElementType.IncomingWebhookLogRecord,
|
|
11762
|
+
WorkspaceElementType.ExternalEventLogRecord,
|
|
11763
|
+
WorkspaceElementType.ExternalEventPull,
|
|
11764
|
+
WorkspaceElementType.AppEventLogRecord,
|
|
11765
|
+
],
|
|
11694
11766
|
},
|
|
11695
11767
|
[WorkspaceElementType.App]: {
|
|
11696
11768
|
type: WorkspaceElementType.App,
|
|
@@ -11699,6 +11771,21 @@ const WorkspaceElementSpecs = {
|
|
|
11699
11771
|
namePlural: 'Apps',
|
|
11700
11772
|
hasKey: true,
|
|
11701
11773
|
hasPublicLayer: true,
|
|
11774
|
+
relatedIntegrationLayerElements: [
|
|
11775
|
+
WorkspaceElementType.Connection,
|
|
11776
|
+
WorkspaceElementType.Action,
|
|
11777
|
+
WorkspaceElementType.Flow,
|
|
11778
|
+
WorkspaceElementType.DataSource,
|
|
11779
|
+
WorkspaceElementType.FieldMapping,
|
|
11780
|
+
],
|
|
11781
|
+
relatedActivityLogElements: [
|
|
11782
|
+
WorkspaceElementType.FlowRun,
|
|
11783
|
+
WorkspaceElementType.ActionRunLogRecord,
|
|
11784
|
+
WorkspaceElementType.ExternalApiLogRecord,
|
|
11785
|
+
WorkspaceElementType.IncomingWebhookLogRecord,
|
|
11786
|
+
WorkspaceElementType.ExternalEventLogRecord,
|
|
11787
|
+
WorkspaceElementType.ExternalEventPull,
|
|
11788
|
+
],
|
|
11702
11789
|
},
|
|
11703
11790
|
[WorkspaceElementType.Integration]: {
|
|
11704
11791
|
type: WorkspaceElementType.Integration,
|
|
@@ -11708,6 +11795,27 @@ const WorkspaceElementSpecs = {
|
|
|
11708
11795
|
editablePropertiesSchema: IntegrationEditableProperties,
|
|
11709
11796
|
exportPropertiesSchema: IntegrationExportProperties,
|
|
11710
11797
|
hasKey: true,
|
|
11798
|
+
relatedIntegrationLayerElements: [
|
|
11799
|
+
WorkspaceElementType.Connection,
|
|
11800
|
+
WorkspaceElementType.Package,
|
|
11801
|
+
WorkspaceElementType.Action,
|
|
11802
|
+
WorkspaceElementType.Flow,
|
|
11803
|
+
WorkspaceElementType.ExternalEventSubscription,
|
|
11804
|
+
WorkspaceElementType.AppEventSubscription,
|
|
11805
|
+
WorkspaceElementType.DataSource,
|
|
11806
|
+
WorkspaceElementType.FieldMapping,
|
|
11807
|
+
WorkspaceElementType.AppDataSchemaInstance,
|
|
11808
|
+
WorkspaceElementType.DataLinkTableInstance,
|
|
11809
|
+
],
|
|
11810
|
+
relatedActivityLogElements: [
|
|
11811
|
+
WorkspaceElementType.FlowRun,
|
|
11812
|
+
WorkspaceElementType.ActionRunLogRecord,
|
|
11813
|
+
WorkspaceElementType.ExternalApiLogRecord,
|
|
11814
|
+
WorkspaceElementType.IncomingWebhookLogRecord,
|
|
11815
|
+
WorkspaceElementType.ExternalEventLogRecord,
|
|
11816
|
+
WorkspaceElementType.ExternalEventPull,
|
|
11817
|
+
WorkspaceElementType.AppEventLogRecord,
|
|
11818
|
+
],
|
|
11711
11819
|
},
|
|
11712
11820
|
[WorkspaceElementType.Connector]: {
|
|
11713
11821
|
type: WorkspaceElementType.Connector,
|
|
@@ -11726,6 +11834,26 @@ const WorkspaceElementSpecs = {
|
|
|
11726
11834
|
exportPropertiesSchema: ConnectionExportProperties,
|
|
11727
11835
|
hasKey: false,
|
|
11728
11836
|
hasUuid: false,
|
|
11837
|
+
statsKey: 'connections',
|
|
11838
|
+
relatedIntegrationLayerElements: [
|
|
11839
|
+
WorkspaceElementType.Action,
|
|
11840
|
+
WorkspaceElementType.Flow,
|
|
11841
|
+
WorkspaceElementType.ExternalEventSubscription,
|
|
11842
|
+
WorkspaceElementType.AppEventSubscription,
|
|
11843
|
+
WorkspaceElementType.DataSource,
|
|
11844
|
+
WorkspaceElementType.FieldMapping,
|
|
11845
|
+
WorkspaceElementType.AppDataSchemaInstance,
|
|
11846
|
+
WorkspaceElementType.DataLinkTableInstance,
|
|
11847
|
+
],
|
|
11848
|
+
relatedActivityLogElements: [
|
|
11849
|
+
WorkspaceElementType.FlowRun,
|
|
11850
|
+
WorkspaceElementType.ActionRunLogRecord,
|
|
11851
|
+
WorkspaceElementType.ExternalApiLogRecord,
|
|
11852
|
+
WorkspaceElementType.IncomingWebhookLogRecord,
|
|
11853
|
+
WorkspaceElementType.ExternalEventLogRecord,
|
|
11854
|
+
WorkspaceElementType.ExternalEventPull,
|
|
11855
|
+
WorkspaceElementType.AppEventLogRecord,
|
|
11856
|
+
],
|
|
11729
11857
|
},
|
|
11730
11858
|
[WorkspaceElementType.Package]: {
|
|
11731
11859
|
type: WorkspaceElementType.Package,
|
|
@@ -11742,6 +11870,7 @@ const WorkspaceElementSpecs = {
|
|
|
11742
11870
|
hasParentChildRelationship: true,
|
|
11743
11871
|
hasPublicLayer: true,
|
|
11744
11872
|
isProOnly: true,
|
|
11873
|
+
statsKey: 'packages',
|
|
11745
11874
|
},
|
|
11746
11875
|
[WorkspaceElementType.ActionInstance]: {
|
|
11747
11876
|
type: WorkspaceElementType.ActionInstance,
|
|
@@ -11768,12 +11897,14 @@ const WorkspaceElementSpecs = {
|
|
|
11768
11897
|
hasParentChildRelationship: true,
|
|
11769
11898
|
hasKey: true,
|
|
11770
11899
|
hasPublicLayer: true,
|
|
11900
|
+
statsKey: 'actions',
|
|
11771
11901
|
},
|
|
11772
11902
|
[WorkspaceElementType.ActionRunLogRecord]: {
|
|
11773
11903
|
type: WorkspaceElementType.ActionRunLogRecord,
|
|
11774
11904
|
apiPath: 'action-run-logs',
|
|
11775
11905
|
name: 'Action Run Log Record',
|
|
11776
11906
|
namePlural: 'Action Run Log Records',
|
|
11907
|
+
statsKey: 'actionRunLogs',
|
|
11777
11908
|
},
|
|
11778
11909
|
[WorkspaceElementType.Flow]: {
|
|
11779
11910
|
type: WorkspaceElementType.Flow,
|
|
@@ -11791,6 +11922,7 @@ const WorkspaceElementSpecs = {
|
|
|
11791
11922
|
hasParentChildRelationship: true,
|
|
11792
11923
|
hasKey: true,
|
|
11793
11924
|
isProOnly: true,
|
|
11925
|
+
statsKey: 'flows',
|
|
11794
11926
|
},
|
|
11795
11927
|
[WorkspaceElementType.FlowInstance]: {
|
|
11796
11928
|
type: WorkspaceElementType.FlowInstance,
|
|
@@ -11811,6 +11943,7 @@ const WorkspaceElementSpecs = {
|
|
|
11811
11943
|
name: 'Flow run',
|
|
11812
11944
|
namePlural: 'Flow runs',
|
|
11813
11945
|
isProOnly: true,
|
|
11946
|
+
statsKey: 'flowRuns',
|
|
11814
11947
|
},
|
|
11815
11948
|
[WorkspaceElementType.FieldMapping]: {
|
|
11816
11949
|
type: WorkspaceElementType.FieldMapping,
|
|
@@ -11828,6 +11961,7 @@ const WorkspaceElementSpecs = {
|
|
|
11828
11961
|
hasParentChildRelationship: true,
|
|
11829
11962
|
hasKey: true,
|
|
11830
11963
|
isProOnly: true,
|
|
11964
|
+
statsKey: 'fieldMappings',
|
|
11831
11965
|
},
|
|
11832
11966
|
[WorkspaceElementType.FieldMappingInstance]: {
|
|
11833
11967
|
type: WorkspaceElementType.FieldMappingInstance,
|
|
@@ -11857,6 +11991,7 @@ const WorkspaceElementSpecs = {
|
|
|
11857
11991
|
hasParentChildRelationship: true,
|
|
11858
11992
|
hasKey: true,
|
|
11859
11993
|
isProOnly: true,
|
|
11994
|
+
statsKey: 'dataSources',
|
|
11860
11995
|
},
|
|
11861
11996
|
[WorkspaceElementType.DataSourceInstance]: {
|
|
11862
11997
|
type: WorkspaceElementType.DataSourceInstance,
|
|
@@ -11891,6 +12026,7 @@ const WorkspaceElementSpecs = {
|
|
|
11891
12026
|
parentFieldKey: 'dataLinkTableId',
|
|
11892
12027
|
isMembraneInterface: true,
|
|
11893
12028
|
isProOnly: true,
|
|
12029
|
+
statsKey: 'dataLinkTableInstances',
|
|
11894
12030
|
},
|
|
11895
12031
|
[WorkspaceElementType.AppEventType]: {
|
|
11896
12032
|
type: WorkspaceElementType.AppEventType,
|
|
@@ -11911,6 +12047,7 @@ const WorkspaceElementSpecs = {
|
|
|
11911
12047
|
namePlural: 'App Event Subscriptions',
|
|
11912
12048
|
isMembraneInterface: true,
|
|
11913
12049
|
isProOnly: true,
|
|
12050
|
+
statsKey: 'appEventSubscriptions',
|
|
11914
12051
|
},
|
|
11915
12052
|
[WorkspaceElementType.AppEventLogRecord]: {
|
|
11916
12053
|
type: WorkspaceElementType.AppEventLogRecord,
|
|
@@ -11918,6 +12055,7 @@ const WorkspaceElementSpecs = {
|
|
|
11918
12055
|
name: 'App Event Log Record',
|
|
11919
12056
|
namePlural: 'App Event Log Records',
|
|
11920
12057
|
isProOnly: true,
|
|
12058
|
+
statsKey: 'appEvents',
|
|
11921
12059
|
},
|
|
11922
12060
|
[WorkspaceElementType.AppDataSchema]: {
|
|
11923
12061
|
type: WorkspaceElementType.AppDataSchema,
|
|
@@ -11939,6 +12077,7 @@ const WorkspaceElementSpecs = {
|
|
|
11939
12077
|
parentFieldKey: 'appDataSchemaId',
|
|
11940
12078
|
isMembraneInterface: true,
|
|
11941
12079
|
isProOnly: true,
|
|
12080
|
+
statsKey: 'appDataSchemaInstances',
|
|
11942
12081
|
},
|
|
11943
12082
|
[WorkspaceElementType.ExternalEventSubscription]: {
|
|
11944
12083
|
type: WorkspaceElementType.ExternalEventSubscription,
|
|
@@ -11947,6 +12086,7 @@ const WorkspaceElementSpecs = {
|
|
|
11947
12086
|
namePlural: 'External Event Subscriptions',
|
|
11948
12087
|
isMembraneInterface: true,
|
|
11949
12088
|
isProOnly: true,
|
|
12089
|
+
statsKey: 'externalEventSubscriptions',
|
|
11950
12090
|
},
|
|
11951
12091
|
[WorkspaceElementType.ExternalEventLogRecord]: {
|
|
11952
12092
|
type: WorkspaceElementType.ExternalEventLogRecord,
|
|
@@ -11954,6 +12094,7 @@ const WorkspaceElementSpecs = {
|
|
|
11954
12094
|
name: 'External Event Log Record',
|
|
11955
12095
|
namePlural: 'External Event Log Records',
|
|
11956
12096
|
isProOnly: true,
|
|
12097
|
+
statsKey: 'externalEvents',
|
|
11957
12098
|
},
|
|
11958
12099
|
[WorkspaceElementType.ExternalEventPull]: {
|
|
11959
12100
|
type: WorkspaceElementType.ExternalEventPull,
|
|
@@ -11961,6 +12102,21 @@ const WorkspaceElementSpecs = {
|
|
|
11961
12102
|
name: 'External Event Pull',
|
|
11962
12103
|
namePlural: 'External Event Pulls',
|
|
11963
12104
|
isProOnly: true,
|
|
12105
|
+
statsKey: 'externalEventPulls',
|
|
12106
|
+
},
|
|
12107
|
+
[WorkspaceElementType.ExternalApiLogRecord]: {
|
|
12108
|
+
type: WorkspaceElementType.ExternalApiLogRecord,
|
|
12109
|
+
apiPath: 'external-api-logs',
|
|
12110
|
+
name: 'External API Log Record',
|
|
12111
|
+
namePlural: 'External API Log Records',
|
|
12112
|
+
statsKey: 'externalApiLogs',
|
|
12113
|
+
},
|
|
12114
|
+
[WorkspaceElementType.IncomingWebhookLogRecord]: {
|
|
12115
|
+
type: WorkspaceElementType.IncomingWebhookLogRecord,
|
|
12116
|
+
apiPath: 'incoming-webhooks',
|
|
12117
|
+
name: 'Incoming Webhook Log Record',
|
|
12118
|
+
namePlural: 'Incoming Webhook Log Records',
|
|
12119
|
+
statsKey: 'externalWebhookLogs',
|
|
11964
12120
|
},
|
|
11965
12121
|
[WorkspaceElementType.Screen]: {
|
|
11966
12122
|
type: WorkspaceElementType.Screen,
|
|
@@ -12364,20 +12520,21 @@ const StatsFilterQuery = z.object({
|
|
|
12364
12520
|
tenantId: z.string().optional(),
|
|
12365
12521
|
integrationId: z.string().optional(),
|
|
12366
12522
|
connectionId: z.string().optional(),
|
|
12523
|
+
externalAppId: z.string().optional(),
|
|
12367
12524
|
});
|
|
12368
12525
|
const ActivityStatsQuery = StatsFilterQuery.extend({
|
|
12369
12526
|
startDatetime: z.string().datetime({ offset: true }),
|
|
12527
|
+
elementType: z.enum(WorkspaceElementType).optional(),
|
|
12528
|
+
});
|
|
12529
|
+
const IntegrationLayerStatsQuery = StatsFilterQuery.extend({
|
|
12530
|
+
elementType: z.enum(WorkspaceElementType).optional(),
|
|
12370
12531
|
});
|
|
12371
|
-
const IntegrationLayerStatsQuery = StatsFilterQuery;
|
|
12372
12532
|
const ActionRunsStatsQuery = z.object({
|
|
12373
|
-
actionId: z.string()
|
|
12374
|
-
connectionActionId: z.string().optional(),
|
|
12533
|
+
actionId: z.string(),
|
|
12375
12534
|
startDatetime: z.string().datetime({ offset: true }),
|
|
12376
12535
|
});
|
|
12377
12536
|
const FlowRunsStatsQuery = z.object({
|
|
12378
|
-
|
|
12379
|
-
connectionFlowId: z.string().optional(),
|
|
12380
|
-
universalFlowId: z.string().optional(),
|
|
12537
|
+
flowId: z.string(),
|
|
12381
12538
|
startDatetime: z.string().datetime({ offset: true }),
|
|
12382
12539
|
});
|
|
12383
12540
|
const WORKSPACE_ELEMENTS_STATS_COLLECTIONS = [
|
|
@@ -12938,6 +13095,7 @@ const WORKSPACE_SIZE_LIMITS = [
|
|
|
12938
13095
|
const EDITABLE_LIMITS = [
|
|
12939
13096
|
'parallelApiRequestsPerCustomer',
|
|
12940
13097
|
'parallelBackgroundJobsPerCustomer',
|
|
13098
|
+
'parallelCustomCodeRunsPerCustomer',
|
|
12941
13099
|
'apiRequestsPerCustomerPerSecond',
|
|
12942
13100
|
'apiRequestsPerCustomerPerHour',
|
|
12943
13101
|
'externalEventsPerCustomerPerDay',
|
|
@@ -15311,6 +15469,7 @@ const AgentSession = z.object({
|
|
|
15311
15469
|
hasWorker: z.boolean(),
|
|
15312
15470
|
isExternal: z.boolean().optional(),
|
|
15313
15471
|
agentName: z.enum(AgentName).optional(),
|
|
15472
|
+
output: z.record(z.string(), z.unknown()).optional(),
|
|
15314
15473
|
createdAt: z.iso.datetime(),
|
|
15315
15474
|
updatedAt: z.iso.datetime(),
|
|
15316
15475
|
});
|
|
@@ -15338,6 +15497,7 @@ const PatchAgentSessionSchema = z.object({
|
|
|
15338
15497
|
cost: z.number().optional(),
|
|
15339
15498
|
error: ErrorDataSchema.optional(),
|
|
15340
15499
|
opencodeSessionUuid: z.string().optional(),
|
|
15500
|
+
output: z.record(z.string(), z.unknown()).optional(),
|
|
15341
15501
|
status: z.enum(AgentSessionStatus).optional(),
|
|
15342
15502
|
});
|
|
15343
15503
|
|
|
@@ -15470,25 +15630,6 @@ const CreateClusterRequest = z.object({
|
|
|
15470
15630
|
});
|
|
15471
15631
|
const ListClustersQuery = PaginationQuery;
|
|
15472
15632
|
|
|
15473
|
-
class UI {
|
|
15474
|
-
constructor(client) {
|
|
15475
|
-
this.client = client;
|
|
15476
|
-
}
|
|
15477
|
-
async connect(options = {}) {
|
|
15478
|
-
const { url, postData } = await this.client.getScreensPostData('connect', {
|
|
15479
|
-
...options,
|
|
15480
|
-
allowMultipleConnections: options.allowMultipleConnections ? '1' : '',
|
|
15481
|
-
connectorParameters: options.connectorParameters ? JSON.stringify(options.connectorParameters) : undefined,
|
|
15482
|
-
});
|
|
15483
|
-
return new Promise((resolve) => {
|
|
15484
|
-
return openIframeWithPost(url, postData, {
|
|
15485
|
-
onClose: () => resolve(null),
|
|
15486
|
-
onSuccess: (connection) => resolve(connection),
|
|
15487
|
-
});
|
|
15488
|
-
});
|
|
15489
|
-
}
|
|
15490
|
-
}
|
|
15491
|
-
|
|
15492
15633
|
const API_VERSIONS = {
|
|
15493
15634
|
LEGACY: 'legacy',
|
|
15494
15635
|
'2025-10-21': '2025-10-21',
|
|
@@ -15740,6 +15881,36 @@ class MembraneApiClient {
|
|
|
15740
15881
|
}
|
|
15741
15882
|
}
|
|
15742
15883
|
|
|
15884
|
+
class UI {
|
|
15885
|
+
constructor(client) {
|
|
15886
|
+
this.client = client;
|
|
15887
|
+
}
|
|
15888
|
+
async connect(options = {}) {
|
|
15889
|
+
const { url, postData } = await this.client.getScreensPostData('connect', {
|
|
15890
|
+
...options,
|
|
15891
|
+
allowMultipleConnections: options.allowMultipleConnections ? '1' : '',
|
|
15892
|
+
connectorParameters: options.connectorParameters ? JSON.stringify(options.connectorParameters) : undefined,
|
|
15893
|
+
});
|
|
15894
|
+
return new Promise((resolve) => {
|
|
15895
|
+
return openIframeWithPost(url, postData, {
|
|
15896
|
+
onClose: () => resolve(null),
|
|
15897
|
+
onSuccess: (connection) => resolve(connection),
|
|
15898
|
+
});
|
|
15899
|
+
});
|
|
15900
|
+
}
|
|
15901
|
+
async UNSAFE_agentSession(options) {
|
|
15902
|
+
const { url, postData } = await this.client.getScreensPostData('agent-session', {
|
|
15903
|
+
sessionId: options.sessionId,
|
|
15904
|
+
theme: options.theme,
|
|
15905
|
+
});
|
|
15906
|
+
return new Promise((resolve) => {
|
|
15907
|
+
return openIframeWithPost(url, postData, {
|
|
15908
|
+
onClose: () => resolve(),
|
|
15909
|
+
});
|
|
15910
|
+
});
|
|
15911
|
+
}
|
|
15912
|
+
}
|
|
15913
|
+
|
|
15743
15914
|
class MembraneClient extends MembraneApiClient {
|
|
15744
15915
|
constructor(options) {
|
|
15745
15916
|
super(options);
|