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