@squidcloud/client 1.0.9 → 1.0.10
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/common/src/application.types.d.ts +13 -21
- package/dist/common/src/index.d.ts +1 -0
- package/dist/common/src/integration.types.d.ts +3 -1
- package/dist/common/src/metrics.types.d.ts +1 -1
- package/dist/common/src/utils/id.d.ts +1 -0
- package/dist/index.js +4 -4
- package/dist/package.json +2 -3
- package/dist/typescript-client/src/data.manager.d.ts +3 -0
- package/dist/typescript-client/src/db.dao.d.ts +2 -1
- package/dist/typescript-client/src/document-reference.d.ts +1 -0
- package/dist/typescript-client/src/testing/fake-rpc.manager.d.ts +1 -0
- package/dist/typescript-client/src/testing/squid-env-setup.d.ts +1 -0
- package/package.json +2 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApplicationBundleData, ServiceFunctionName } from './bundle-data.types';
|
|
2
2
|
import { AppId, IntegrationId } from './communication.types';
|
|
3
3
|
import { CollectionName } from './document.types';
|
|
4
|
-
import { ApiEndpoint, ApiEndpointId, GraphQLConnectionOptions, Integration, IntegrationDataSchema, IntegrationGraphQLSchema, IntegrationType,
|
|
4
|
+
import { ApiEndpoint, ApiEndpointId, GraphQLConnectionOptions, Integration, IntegrationDataSchema, IntegrationGraphQLSchema, IntegrationType, MongoConnectionOptions, MssqlConnectionOptions, MySqlConnectionOptions, PostgresConnectionOptions } from './integration.types';
|
|
5
5
|
export type WebhookId = string;
|
|
6
6
|
export type QueryName = string;
|
|
7
7
|
export type TriggerId = string;
|
|
@@ -33,6 +33,7 @@ export interface Application {
|
|
|
33
33
|
allowedHosts: string[];
|
|
34
34
|
openIdProvider?: OpenIdProvider;
|
|
35
35
|
integrations: Record<IntegrationId, Integration>;
|
|
36
|
+
codeUrl?: string;
|
|
36
37
|
bundleMetadata?: ApplicationBundleData;
|
|
37
38
|
}
|
|
38
39
|
export interface UpdateOpenIdProviderRequest {
|
|
@@ -41,7 +42,8 @@ export interface UpdateOpenIdProviderRequest {
|
|
|
41
42
|
export interface CreateApplicationResponse {
|
|
42
43
|
appId: AppId;
|
|
43
44
|
}
|
|
44
|
-
export type UpsertIntegrationRequest =
|
|
45
|
+
export type UpsertIntegrationRequest = UpsertDataIntegrationRequest | UpsertGraphQLIntegrationRequest | UpsertApiIntegrationRequest;
|
|
46
|
+
export type UpsertDataIntegrationRequest = UpsertInternalIntegrationRequest | UpsertMongoDbIntegrationRequest | UpsertMssqlIntegrationRequest | UpsertMySqlIntegrationRequest | UpsertPostgresIntegrationRequest | UpsertCockroachIntegrationRequest;
|
|
45
47
|
interface BaseUpsertIntegrationRequest {
|
|
46
48
|
id: IntegrationId;
|
|
47
49
|
type: IntegrationType;
|
|
@@ -50,53 +52,43 @@ interface BaseUpsertIntegrationRequest {
|
|
|
50
52
|
interface BaseUpsertDataIntegrationRequest extends BaseUpsertIntegrationRequest {
|
|
51
53
|
supportsExternalChanges?: boolean;
|
|
52
54
|
}
|
|
55
|
+
export interface UpsertInternalIntegrationRequest extends BaseUpsertDataIntegrationRequest {
|
|
56
|
+
type: IntegrationType.internal;
|
|
57
|
+
schema?: IntegrationDataSchema;
|
|
58
|
+
}
|
|
53
59
|
export interface UpsertMongoDbIntegrationRequest extends BaseUpsertDataIntegrationRequest {
|
|
54
60
|
type: IntegrationType.mongo;
|
|
55
61
|
schema?: IntegrationDataSchema;
|
|
56
62
|
configuration: {
|
|
57
|
-
connectionOptions:
|
|
58
|
-
secrets: MongoConnectionSecretOptions;
|
|
59
|
-
ssl?: {
|
|
60
|
-
certificateFile: string;
|
|
61
|
-
validate: boolean;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
63
|
+
connectionOptions: MongoConnectionOptions;
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
export interface UpsertMySqlIntegrationRequest extends BaseUpsertDataIntegrationRequest {
|
|
67
67
|
type: IntegrationType.mysql;
|
|
68
68
|
schema?: IntegrationDataSchema;
|
|
69
69
|
configuration: {
|
|
70
|
-
connectionOptions:
|
|
71
|
-
secrets: MySqlConnectionSecretOptions;
|
|
72
|
-
};
|
|
70
|
+
connectionOptions: MySqlConnectionOptions;
|
|
73
71
|
};
|
|
74
72
|
}
|
|
75
73
|
export interface UpsertMssqlIntegrationRequest extends BaseUpsertDataIntegrationRequest {
|
|
76
74
|
type: IntegrationType.mssql;
|
|
77
75
|
schema?: IntegrationDataSchema;
|
|
78
76
|
configuration: {
|
|
79
|
-
connectionOptions:
|
|
80
|
-
secrets: MssqlConnectionSecretOptions;
|
|
81
|
-
};
|
|
77
|
+
connectionOptions: MssqlConnectionOptions;
|
|
82
78
|
};
|
|
83
79
|
}
|
|
84
80
|
export interface UpsertPostgresIntegrationRequest extends BaseUpsertDataIntegrationRequest {
|
|
85
81
|
type: IntegrationType.postgres;
|
|
86
82
|
schema?: IntegrationDataSchema;
|
|
87
83
|
configuration: {
|
|
88
|
-
connectionOptions:
|
|
89
|
-
secrets: PostgresConnectionSecretOptions;
|
|
90
|
-
};
|
|
84
|
+
connectionOptions: PostgresConnectionOptions;
|
|
91
85
|
};
|
|
92
86
|
}
|
|
93
87
|
export interface UpsertCockroachIntegrationRequest extends BaseUpsertDataIntegrationRequest {
|
|
94
88
|
type: IntegrationType.cockroach;
|
|
95
89
|
schema?: IntegrationDataSchema;
|
|
96
90
|
configuration: {
|
|
97
|
-
connectionOptions:
|
|
98
|
-
secrets: PostgresConnectionSecretOptions;
|
|
99
|
-
};
|
|
91
|
+
connectionOptions: PostgresConnectionOptions;
|
|
100
92
|
};
|
|
101
93
|
}
|
|
102
94
|
export interface UpsertGraphQLIntegrationRequest extends BaseUpsertIntegrationRequest {
|
|
@@ -77,6 +77,7 @@ export interface IntegrationDataSchema {
|
|
|
77
77
|
export interface IntegrationGraphQLSchema {
|
|
78
78
|
introspection: IntrospectionQuery;
|
|
79
79
|
}
|
|
80
|
+
export type IntegrationApiEndpoints = Record<ApiEndpointId, ApiEndpoint>;
|
|
80
81
|
export type IntegrationSchema = IntegrationDataSchema | IntegrationGraphQLSchema;
|
|
81
82
|
interface BaseIntegration {
|
|
82
83
|
id: IntegrationId;
|
|
@@ -90,6 +91,7 @@ export interface BaseDataIntegration extends BaseIntegration {
|
|
|
90
91
|
supportsExternalChanges: boolean;
|
|
91
92
|
}
|
|
92
93
|
export declare function isDataIntegration(integration: any): integration is BaseDataIntegration;
|
|
94
|
+
export declare function isDataIntegrationType(type: IntegrationType): boolean;
|
|
93
95
|
export type HttpMethod = 'post' | 'get' | 'delete' | 'patch' | 'put';
|
|
94
96
|
export type ApiEndpointId = string;
|
|
95
97
|
export type ApiParameterLocation = 'query' | 'body' | 'header' | 'path';
|
|
@@ -111,7 +113,7 @@ export interface ApiEndpoint {
|
|
|
111
113
|
export interface ApiIntegration extends BaseIntegration {
|
|
112
114
|
type: IntegrationType.api;
|
|
113
115
|
baseUrl: string;
|
|
114
|
-
endpoints:
|
|
116
|
+
endpoints: IntegrationApiEndpoints;
|
|
115
117
|
}
|
|
116
118
|
export interface GraphQLIntegration extends BaseIntegration {
|
|
117
119
|
type: IntegrationType.graphql;
|
|
@@ -4,7 +4,7 @@ export type MetricTimeWindow = {
|
|
|
4
4
|
startTime?: number;
|
|
5
5
|
endTime?: number;
|
|
6
6
|
};
|
|
7
|
-
export type MetricName = '
|
|
7
|
+
export type MetricName = 'backendBootstrapLatency' | 'backendFailureCount' | 'backendFailureFunctionCallCount' | 'backendSuccessFunctionCallCount' | 'backendFunctionCallCount' | 'backendFunctionCallLatency' | 'integrationConnectAttemptLatency' | 'integrationConnectionErrorCount' | 'integrationReadOperationLatency' | 'integrationWriteOperationLatency' | 'integrationOperationErrorCount';
|
|
8
8
|
export type MetricAggregationFunction = 'sum' | 'avg';
|
|
9
9
|
export type MetricAggregation = 'none' | {
|
|
10
10
|
groupByFields: string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function generateId(): string;
|