@squidcloud/local-backend 1.0.65 → 1.0.67
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/ai-assistant.context.d.ts +13 -13
- package/dist/common/src/ai-assistant.context.js +19 -19
- package/dist/common/src/ai-assistant.schemas.d.ts +243 -243
- package/dist/common/src/ai-assistant.schemas.js +210 -210
- package/dist/common/src/ai-assistant.types.d.ts +90 -90
- package/dist/common/src/ai-assistant.types.js +11 -11
- package/dist/common/src/api-call.context.d.ts +13 -13
- package/dist/common/src/api-call.context.js +16 -16
- package/dist/common/src/api.types.d.ts +23 -23
- package/dist/common/src/api.types.js +2 -2
- package/dist/common/src/application.schemas.d.ts +1312 -1312
- package/dist/common/src/application.schemas.js +860 -860
- package/dist/common/src/application.types.d.ts +186 -186
- package/dist/common/src/application.types.js +89 -89
- package/dist/common/src/backend-function.schemas.d.ts +3 -3
- package/dist/common/src/backend-function.schemas.js +12 -12
- package/dist/common/src/backend-function.types.d.ts +6 -6
- package/dist/common/src/backend-function.types.js +2 -2
- package/dist/common/src/backend-run.types.d.ts +54 -54
- package/dist/common/src/backend-run.types.js +96 -96
- package/dist/common/src/bundle-api.types.d.ts +63 -63
- package/dist/common/src/bundle-api.types.js +2 -2
- package/dist/common/src/bundle-data.types.d.ts +59 -59
- package/dist/common/src/bundle-data.types.js +2 -2
- package/dist/common/src/communication.types.d.ts +18 -18
- package/dist/common/src/communication.types.js +40 -40
- package/dist/common/src/context.types.d.ts +24 -24
- package/dist/common/src/context.types.js +2 -2
- package/dist/common/src/distributed-lock.context.d.ts +5 -5
- package/dist/common/src/distributed-lock.context.js +10 -10
- package/dist/common/src/document.types.d.ts +32 -32
- package/dist/common/src/document.types.js +50 -50
- package/dist/common/src/graphql.context.d.ts +14 -14
- package/dist/common/src/graphql.context.js +12 -12
- package/dist/common/src/graphql.types.d.ts +11 -11
- package/dist/common/src/graphql.types.js +34 -34
- package/dist/common/src/heartbeat.types.d.ts +4 -4
- package/dist/common/src/heartbeat.types.js +16 -16
- package/dist/common/src/http-status.enum.d.ts +50 -50
- package/dist/common/src/http-status.enum.js +54 -54
- package/dist/common/src/index.d.ts +55 -55
- package/dist/common/src/index.js +71 -71
- package/dist/common/src/integrations/ai_assistant.types.d.ts +24 -24
- package/dist/common/src/integrations/ai_assistant.types.js +2 -2
- package/dist/common/src/integrations/api.types.d.ts +80 -80
- package/dist/common/src/integrations/api.types.js +2 -2
- package/dist/common/src/integrations/auth.types.d.ts +39 -39
- package/dist/common/src/integrations/auth.types.js +2 -2
- package/dist/common/src/integrations/database.types.d.ts +231 -231
- package/dist/common/src/integrations/database.types.js +2 -2
- package/dist/common/src/integrations/index.d.ts +124 -124
- package/dist/common/src/integrations/index.js +111 -111
- package/dist/common/src/integrations/observability.types.d.ts +23 -23
- package/dist/common/src/integrations/observability.types.js +23 -23
- package/dist/common/src/logger.types.d.ts +21 -21
- package/dist/common/src/logger.types.js +11 -11
- package/dist/common/src/metrics.types.d.ts +73 -73
- package/dist/common/src/metrics.types.js +11 -11
- package/dist/common/src/mutation.context.d.ts +13 -13
- package/dist/common/src/mutation.context.js +26 -26
- package/dist/common/src/mutation.schemas.d.ts +5 -5
- package/dist/common/src/mutation.schemas.js +114 -114
- package/dist/common/src/mutation.types.d.ts +63 -63
- package/dist/common/src/mutation.types.js +142 -142
- package/dist/common/src/named-query.context.d.ts +4 -4
- package/dist/common/src/named-query.context.js +9 -9
- package/dist/common/src/named-query.schemas.d.ts +3 -3
- package/dist/common/src/named-query.schemas.js +13 -13
- package/dist/common/src/named-query.types.d.ts +8 -8
- package/dist/common/src/named-query.types.js +2 -2
- package/dist/common/src/query/base-query-builder.d.ts +37 -37
- package/dist/common/src/query/base-query-builder.js +36 -36
- package/dist/common/src/query/index.d.ts +4 -4
- package/dist/common/src/query/index.js +20 -20
- package/dist/common/src/query/pagination.d.ts +42 -42
- package/dist/common/src/query/pagination.js +164 -164
- package/dist/common/src/query/query-context.d.ts +47 -47
- package/dist/common/src/query/query-context.js +159 -159
- package/dist/common/src/query/serialized-query.types.d.ts +24 -24
- package/dist/common/src/query/serialized-query.types.js +2 -2
- package/dist/common/src/query.types.d.ts +86 -86
- package/dist/common/src/query.types.js +153 -153
- package/dist/common/src/regions.d.ts +21 -21
- package/dist/common/src/regions.js +46 -46
- package/dist/common/src/schema/schema.types.d.ts +30 -30
- package/dist/common/src/schema/schema.types.js +172 -172
- package/dist/common/src/secret.schemas.d.ts +6 -6
- package/dist/common/src/secret.schemas.js +38 -32
- package/dist/common/src/secret.schemas.js.map +1 -1
- package/dist/common/src/secret.types.d.ts +49 -49
- package/dist/common/src/secret.types.js +5 -5
- package/dist/common/src/security.types.d.ts +3 -3
- package/dist/common/src/security.types.js +2 -2
- package/dist/common/src/socket.schemas.d.ts +3 -3
- package/dist/common/src/socket.schemas.js +58 -58
- package/dist/common/src/socket.types.d.ts +112 -112
- package/dist/common/src/socket.types.js +2 -2
- package/dist/common/src/time-units.d.ts +5 -5
- package/dist/common/src/time-units.js +8 -8
- package/dist/common/src/trigger.types.d.ts +15 -15
- package/dist/common/src/trigger.types.js +2 -2
- package/dist/common/src/types.d.ts +21 -21
- package/dist/common/src/types.js +2 -2
- package/dist/common/src/utils/array.d.ts +8 -8
- package/dist/common/src/utils/array.js +54 -54
- package/dist/common/src/utils/assert.d.ts +8 -8
- package/dist/common/src/utils/assert.js +49 -49
- package/dist/common/src/utils/error.d.ts +4 -4
- package/dist/common/src/utils/error.js +10 -10
- package/dist/common/src/utils/global.utils.d.ts +10 -10
- package/dist/common/src/utils/global.utils.js +46 -46
- package/dist/common/src/utils/http.d.ts +2 -2
- package/dist/common/src/utils/http.js +41 -40
- package/dist/common/src/utils/http.js.map +1 -1
- package/dist/common/src/utils/id.d.ts +2 -2
- package/dist/common/src/utils/id.js +21 -21
- package/dist/common/src/utils/lock.manager.d.ts +9 -9
- package/dist/common/src/utils/lock.manager.js +39 -39
- package/dist/common/src/utils/nullish.d.ts +2 -2
- package/dist/common/src/utils/nullish.js +11 -11
- package/dist/common/src/utils/object.d.ts +5 -5
- package/dist/common/src/utils/object.js +75 -75
- package/dist/common/src/utils/serialization.d.ts +6 -6
- package/dist/common/src/utils/serialization.js +77 -77
- package/dist/common/src/utils/transforms.d.ts +18 -18
- package/dist/common/src/utils/transforms.js +92 -92
- package/dist/common/src/utils/url.d.ts +1 -1
- package/dist/common/src/utils/url.js +15 -15
- package/dist/common/src/utils/validation.d.ts +17 -17
- package/dist/common/src/utils/validation.js +209 -209
- package/dist/common/src/webhook-response.d.ts +6 -6
- package/dist/common/src/webhook-response.js +2 -2
- package/dist/common/src/websocket.impl.d.ts +21 -21
- package/dist/common/src/websocket.impl.js +76 -76
- package/dist/internal-common/src/async-queue.d.ts +4 -4
- package/dist/internal-common/src/async-queue.js +17 -17
- package/dist/internal-common/src/code-executor.types.d.ts +13 -13
- package/dist/internal-common/src/code-executor.types.js +2 -2
- package/dist/internal-common/src/dao.types.d.ts +46 -46
- package/dist/internal-common/src/dao.types.js +2 -2
- package/dist/internal-common/src/environment/environment.types.d.ts +74 -74
- package/dist/internal-common/src/environment/environment.types.js +2 -2
- package/dist/internal-common/src/environment/index.d.ts +6 -6
- package/dist/internal-common/src/environment/index.js +27 -27
- package/dist/internal-common/src/environment/local.environment.d.ts +2 -2
- package/dist/internal-common/src/environment/local.environment.js +62 -62
- package/dist/internal-common/src/filters/custom-exception.filter.d.ts +6 -6
- package/dist/internal-common/src/filters/custom-exception.filter.js +44 -44
- package/dist/internal-common/src/index.d.ts +14 -14
- package/dist/internal-common/src/index.js +32 -32
- package/dist/internal-common/src/interceptors/body.interceptor.d.ts +5 -5
- package/dist/internal-common/src/interceptors/body.interceptor.js +24 -24
- package/dist/internal-common/src/kafka/kafka.manager.d.ts +22 -22
- package/dist/internal-common/src/kafka/kafka.manager.js +129 -129
- package/dist/internal-common/src/kafka/kafka.types.d.ts +17 -17
- package/dist/internal-common/src/kafka/kafka.types.js +2 -2
- package/dist/internal-common/src/kafka-observability-publisher.d.ts +11 -11
- package/dist/internal-common/src/kafka-observability-publisher.js +20 -20
- package/dist/internal-common/src/local-dev.types.d.ts +35 -35
- package/dist/internal-common/src/local-dev.types.js +2 -2
- package/dist/internal-common/src/observability-publisher.d.ts +9 -9
- package/dist/internal-common/src/observability-publisher.js +58 -58
- package/dist/internal-common/src/observability.types.d.ts +17 -17
- package/dist/internal-common/src/observability.types.js +2 -2
- package/dist/internal-common/src/shutdown.manager.d.ts +20 -20
- package/dist/internal-common/src/shutdown.manager.js +75 -75
- package/dist/internal-common/src/utils.d.ts +5 -5
- package/dist/internal-common/src/utils.js +29 -29
- package/dist/local-backend/src/index.d.ts +4 -4
- package/dist/local-backend/src/index.js +20 -20
- package/dist/local-backend/src/local-backend-socket.service.d.ts +19 -19
- package/dist/local-backend/src/local-backend-socket.service.js +110 -110
- package/dist/local-backend/src/local-backend.app.d.ts +2 -2
- package/dist/local-backend/src/local-backend.app.js +19 -19
- package/dist/local-backend/src/local-backend.controller.d.ts +8 -8
- package/dist/local-backend/src/local-backend.controller.js +49 -49
- package/dist/local-backend/src/local-backend.module.d.ts +8 -8
- package/dist/local-backend/src/local-backend.module.js +53 -53
- package/dist/local-backend/src/local-backend.service.d.ts +15 -15
- package/dist/local-backend/src/local-backend.service.js +165 -165
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MessageFromClientSchema = void 0;
|
|
4
|
-
exports.MessageFromClientSchema = {
|
|
5
|
-
type: 'object',
|
|
6
|
-
required: ['type'],
|
|
7
|
-
oneOf: [
|
|
8
|
-
{
|
|
9
|
-
required: ['payload'],
|
|
10
|
-
properties: {
|
|
11
|
-
type: { const: 'acknowledge' },
|
|
12
|
-
payload: {
|
|
13
|
-
type: 'array',
|
|
14
|
-
nullable: false,
|
|
15
|
-
minItems: 1,
|
|
16
|
-
items: { type: 'string', nullable: false },
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
properties: {
|
|
22
|
-
type: { const: 'catchup' },
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
properties: {
|
|
27
|
-
type: { const: 'kill' },
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
properties: {
|
|
32
|
-
type: { const: 'acquireLock' },
|
|
33
|
-
payload: {
|
|
34
|
-
type: 'object',
|
|
35
|
-
required: ['mutex', 'exclusive', 'clientRequestId'],
|
|
36
|
-
properties: {
|
|
37
|
-
mutex: { type: 'string' },
|
|
38
|
-
exclusive: { type: 'boolean' },
|
|
39
|
-
clientRequestId: { type: 'string' },
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
properties: {
|
|
46
|
-
type: { const: 'releaseLock' },
|
|
47
|
-
payload: {
|
|
48
|
-
type: 'object',
|
|
49
|
-
required: ['lockId', 'clientRequestId'],
|
|
50
|
-
properties: {
|
|
51
|
-
lockId: { type: 'string' },
|
|
52
|
-
clientRequestId: { type: 'string' },
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
],
|
|
58
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MessageFromClientSchema = void 0;
|
|
4
|
+
exports.MessageFromClientSchema = {
|
|
5
|
+
type: 'object',
|
|
6
|
+
required: ['type'],
|
|
7
|
+
oneOf: [
|
|
8
|
+
{
|
|
9
|
+
required: ['payload'],
|
|
10
|
+
properties: {
|
|
11
|
+
type: { const: 'acknowledge' },
|
|
12
|
+
payload: {
|
|
13
|
+
type: 'array',
|
|
14
|
+
nullable: false,
|
|
15
|
+
minItems: 1,
|
|
16
|
+
items: { type: 'string', nullable: false },
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
properties: {
|
|
22
|
+
type: { const: 'catchup' },
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
properties: {
|
|
27
|
+
type: { const: 'kill' },
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
properties: {
|
|
32
|
+
type: { const: 'acquireLock' },
|
|
33
|
+
payload: {
|
|
34
|
+
type: 'object',
|
|
35
|
+
required: ['mutex', 'exclusive', 'clientRequestId'],
|
|
36
|
+
properties: {
|
|
37
|
+
mutex: { type: 'string' },
|
|
38
|
+
exclusive: { type: 'boolean' },
|
|
39
|
+
clientRequestId: { type: 'string' },
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
properties: {
|
|
46
|
+
type: { const: 'releaseLock' },
|
|
47
|
+
payload: {
|
|
48
|
+
type: 'object',
|
|
49
|
+
required: ['lockId', 'clientRequestId'],
|
|
50
|
+
properties: {
|
|
51
|
+
lockId: { type: 'string' },
|
|
52
|
+
clientRequestId: { type: 'string' },
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
};
|
|
59
59
|
//# sourceMappingURL=socket.schemas.js.map
|
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
import { ClientId, ClientRequestId, IntegrationId } from './communication.types';
|
|
2
|
-
import { AuthToken } from './context.types';
|
|
3
|
-
import { CollectionName, DocTimestamp, SquidDocId, SquidDocument } from './document.types';
|
|
4
|
-
import { MutationType } from './mutation.types';
|
|
5
|
-
export type MessageId = string;
|
|
6
|
-
export type MessageFromClientType = 'acknowledge' | 'catchup' | 'kill' | 'acquireLock' | 'releaseLock' | 'pong';
|
|
7
|
-
interface BaseMessageFromClient {
|
|
8
|
-
type: MessageFromClientType;
|
|
9
|
-
authToken?: AuthToken;
|
|
10
|
-
payload?: unknown;
|
|
11
|
-
}
|
|
12
|
-
export interface AcknowledgeMessage extends BaseMessageFromClient {
|
|
13
|
-
type: 'acknowledge';
|
|
14
|
-
payload: Array<MessageId>;
|
|
15
|
-
}
|
|
16
|
-
export interface CatchupMessage extends BaseMessageFromClient {
|
|
17
|
-
type: 'catchup';
|
|
18
|
-
}
|
|
19
|
-
export interface KillMessage extends BaseMessageFromClient {
|
|
20
|
-
type: 'kill';
|
|
21
|
-
}
|
|
22
|
-
export interface AcquireLockMessage extends BaseMessageFromClient {
|
|
23
|
-
type: 'acquireLock';
|
|
24
|
-
payload: {
|
|
25
|
-
mutex: string;
|
|
26
|
-
exclusive: boolean;
|
|
27
|
-
clientRequestId: ClientRequestId;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
export interface ReleaseLockMessage extends BaseMessageFromClient {
|
|
31
|
-
type: 'releaseLock';
|
|
32
|
-
payload: {
|
|
33
|
-
lockId: string;
|
|
34
|
-
clientRequestId: ClientRequestId;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export type MessageFromClient = AcknowledgeMessage | CatchupMessage | KillMessage | AcquireLockMessage | ReleaseLockMessage;
|
|
38
|
-
export type MessageToClientType = 'mutations' | 'query' | 'backendFunction' | 'api' | 'namedQuery' | 'lockAcquired' | 'lockReleased' | 'aiAssistant' | 'ping';
|
|
39
|
-
interface BaseMessageToClient {
|
|
40
|
-
type: MessageToClientType;
|
|
41
|
-
messageId: MessageId;
|
|
42
|
-
payload: unknown;
|
|
43
|
-
}
|
|
44
|
-
export interface BackendFunctionMessageToClient extends BaseMessageToClient {
|
|
45
|
-
type: 'backendFunction';
|
|
46
|
-
clientRequestId: ClientRequestId;
|
|
47
|
-
payload: string;
|
|
48
|
-
}
|
|
49
|
-
export interface NamedQueryMessageToClient extends BaseMessageToClient {
|
|
50
|
-
type: 'namedQuery';
|
|
51
|
-
clientRequestId: ClientRequestId;
|
|
52
|
-
payload: string;
|
|
53
|
-
}
|
|
54
|
-
export interface ApiResponseMessageToClient extends BaseMessageToClient {
|
|
55
|
-
type: 'api';
|
|
56
|
-
clientRequestId: ClientRequestId;
|
|
57
|
-
success: boolean;
|
|
58
|
-
httpStatus: number;
|
|
59
|
-
payload: string;
|
|
60
|
-
}
|
|
61
|
-
export interface LockAcquiredResponseMessageToClient extends BaseMessageToClient {
|
|
62
|
-
type: 'lockAcquired';
|
|
63
|
-
payload: {
|
|
64
|
-
clientRequestId: ClientRequestId;
|
|
65
|
-
lockId: string | undefined;
|
|
66
|
-
error?: string;
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
export interface LockReleasedResponseMessageToClient extends BaseMessageToClient {
|
|
70
|
-
type: 'lockReleased';
|
|
71
|
-
payload: {
|
|
72
|
-
clientRequestId: ClientRequestId;
|
|
73
|
-
lockId: string;
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
export interface AiAssistantMessageToClient extends BaseMessageToClient {
|
|
77
|
-
type: 'aiAssistant';
|
|
78
|
-
clientRequestId: ClientRequestId;
|
|
79
|
-
payload: {
|
|
80
|
-
token: string;
|
|
81
|
-
complete: boolean;
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
export type MessageToClient = MutationsMessageToClient | PingMessageToClient | QueryResultMessageToClient | BackendFunctionMessageToClient | NamedQueryMessageToClient | ApiResponseMessageToClient | LockAcquiredResponseMessageToClient | LockReleasedResponseMessageToClient | AiAssistantMessageToClient;
|
|
85
|
-
export interface MutationsMessageToClient extends BaseMessageToClient {
|
|
86
|
-
type: 'mutations';
|
|
87
|
-
payload: Array<MutationResultData>;
|
|
88
|
-
}
|
|
89
|
-
export interface PingMessageToClient extends BaseMessageToClient {
|
|
90
|
-
type: 'ping';
|
|
91
|
-
payload: unknown;
|
|
92
|
-
}
|
|
93
|
-
export interface MutationResultData {
|
|
94
|
-
squidDocId: SquidDocId;
|
|
95
|
-
clientRequestId: ClientRequestId;
|
|
96
|
-
mutationType: MutationType;
|
|
97
|
-
mutationTimestamp: DocTimestamp;
|
|
98
|
-
doc: SquidDocument | undefined;
|
|
99
|
-
}
|
|
100
|
-
export interface QueryResultData {
|
|
101
|
-
docs: Array<SquidDocument>;
|
|
102
|
-
integrationId: IntegrationId;
|
|
103
|
-
collectionName: CollectionName;
|
|
104
|
-
clientRequestId: ClientRequestId;
|
|
105
|
-
}
|
|
106
|
-
export interface QueryResultMessageToClient extends BaseMessageToClient {
|
|
107
|
-
type: 'query';
|
|
108
|
-
payload: QueryResultData;
|
|
109
|
-
}
|
|
110
|
-
export type PendingMessage = Omit<MessageToClient, 'messageId'>;
|
|
111
|
-
export type PendingMessages = Record<ClientId, Array<PendingMessage>>;
|
|
112
|
-
export {};
|
|
1
|
+
import { ClientId, ClientRequestId, IntegrationId } from './communication.types';
|
|
2
|
+
import { AuthToken } from './context.types';
|
|
3
|
+
import { CollectionName, DocTimestamp, SquidDocId, SquidDocument } from './document.types';
|
|
4
|
+
import { MutationType } from './mutation.types';
|
|
5
|
+
export type MessageId = string;
|
|
6
|
+
export type MessageFromClientType = 'acknowledge' | 'catchup' | 'kill' | 'acquireLock' | 'releaseLock' | 'pong';
|
|
7
|
+
interface BaseMessageFromClient {
|
|
8
|
+
type: MessageFromClientType;
|
|
9
|
+
authToken?: AuthToken;
|
|
10
|
+
payload?: unknown;
|
|
11
|
+
}
|
|
12
|
+
export interface AcknowledgeMessage extends BaseMessageFromClient {
|
|
13
|
+
type: 'acknowledge';
|
|
14
|
+
payload: Array<MessageId>;
|
|
15
|
+
}
|
|
16
|
+
export interface CatchupMessage extends BaseMessageFromClient {
|
|
17
|
+
type: 'catchup';
|
|
18
|
+
}
|
|
19
|
+
export interface KillMessage extends BaseMessageFromClient {
|
|
20
|
+
type: 'kill';
|
|
21
|
+
}
|
|
22
|
+
export interface AcquireLockMessage extends BaseMessageFromClient {
|
|
23
|
+
type: 'acquireLock';
|
|
24
|
+
payload: {
|
|
25
|
+
mutex: string;
|
|
26
|
+
exclusive: boolean;
|
|
27
|
+
clientRequestId: ClientRequestId;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface ReleaseLockMessage extends BaseMessageFromClient {
|
|
31
|
+
type: 'releaseLock';
|
|
32
|
+
payload: {
|
|
33
|
+
lockId: string;
|
|
34
|
+
clientRequestId: ClientRequestId;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export type MessageFromClient = AcknowledgeMessage | CatchupMessage | KillMessage | AcquireLockMessage | ReleaseLockMessage;
|
|
38
|
+
export type MessageToClientType = 'mutations' | 'query' | 'backendFunction' | 'api' | 'namedQuery' | 'lockAcquired' | 'lockReleased' | 'aiAssistant' | 'ping';
|
|
39
|
+
interface BaseMessageToClient {
|
|
40
|
+
type: MessageToClientType;
|
|
41
|
+
messageId: MessageId;
|
|
42
|
+
payload: unknown;
|
|
43
|
+
}
|
|
44
|
+
export interface BackendFunctionMessageToClient extends BaseMessageToClient {
|
|
45
|
+
type: 'backendFunction';
|
|
46
|
+
clientRequestId: ClientRequestId;
|
|
47
|
+
payload: string;
|
|
48
|
+
}
|
|
49
|
+
export interface NamedQueryMessageToClient extends BaseMessageToClient {
|
|
50
|
+
type: 'namedQuery';
|
|
51
|
+
clientRequestId: ClientRequestId;
|
|
52
|
+
payload: string;
|
|
53
|
+
}
|
|
54
|
+
export interface ApiResponseMessageToClient extends BaseMessageToClient {
|
|
55
|
+
type: 'api';
|
|
56
|
+
clientRequestId: ClientRequestId;
|
|
57
|
+
success: boolean;
|
|
58
|
+
httpStatus: number;
|
|
59
|
+
payload: string;
|
|
60
|
+
}
|
|
61
|
+
export interface LockAcquiredResponseMessageToClient extends BaseMessageToClient {
|
|
62
|
+
type: 'lockAcquired';
|
|
63
|
+
payload: {
|
|
64
|
+
clientRequestId: ClientRequestId;
|
|
65
|
+
lockId: string | undefined;
|
|
66
|
+
error?: string;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export interface LockReleasedResponseMessageToClient extends BaseMessageToClient {
|
|
70
|
+
type: 'lockReleased';
|
|
71
|
+
payload: {
|
|
72
|
+
clientRequestId: ClientRequestId;
|
|
73
|
+
lockId: string;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export interface AiAssistantMessageToClient extends BaseMessageToClient {
|
|
77
|
+
type: 'aiAssistant';
|
|
78
|
+
clientRequestId: ClientRequestId;
|
|
79
|
+
payload: {
|
|
80
|
+
token: string;
|
|
81
|
+
complete: boolean;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
export type MessageToClient = MutationsMessageToClient | PingMessageToClient | QueryResultMessageToClient | BackendFunctionMessageToClient | NamedQueryMessageToClient | ApiResponseMessageToClient | LockAcquiredResponseMessageToClient | LockReleasedResponseMessageToClient | AiAssistantMessageToClient;
|
|
85
|
+
export interface MutationsMessageToClient extends BaseMessageToClient {
|
|
86
|
+
type: 'mutations';
|
|
87
|
+
payload: Array<MutationResultData>;
|
|
88
|
+
}
|
|
89
|
+
export interface PingMessageToClient extends BaseMessageToClient {
|
|
90
|
+
type: 'ping';
|
|
91
|
+
payload: unknown;
|
|
92
|
+
}
|
|
93
|
+
export interface MutationResultData {
|
|
94
|
+
squidDocId: SquidDocId;
|
|
95
|
+
clientRequestId: ClientRequestId;
|
|
96
|
+
mutationType: MutationType;
|
|
97
|
+
mutationTimestamp: DocTimestamp;
|
|
98
|
+
doc: SquidDocument | undefined;
|
|
99
|
+
}
|
|
100
|
+
export interface QueryResultData {
|
|
101
|
+
docs: Array<SquidDocument>;
|
|
102
|
+
integrationId: IntegrationId;
|
|
103
|
+
collectionName: CollectionName;
|
|
104
|
+
clientRequestId: ClientRequestId;
|
|
105
|
+
}
|
|
106
|
+
export interface QueryResultMessageToClient extends BaseMessageToClient {
|
|
107
|
+
type: 'query';
|
|
108
|
+
payload: QueryResultData;
|
|
109
|
+
}
|
|
110
|
+
export type PendingMessage = Omit<MessageToClient, 'messageId'>;
|
|
111
|
+
export type PendingMessages = Record<ClientId, Array<PendingMessage>>;
|
|
112
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=socket.types.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const SECONDS_PER_MINUTE = 60;
|
|
2
|
-
export declare const SECONDS_PER_HOUR: number;
|
|
3
|
-
export declare const SECONDS_PER_DAY: number;
|
|
4
|
-
export declare const SECONDS_PER_WEEK: number;
|
|
5
|
-
export declare const SECONDS_PER_MONTH: number;
|
|
1
|
+
export declare const SECONDS_PER_MINUTE = 60;
|
|
2
|
+
export declare const SECONDS_PER_HOUR: number;
|
|
3
|
+
export declare const SECONDS_PER_DAY: number;
|
|
4
|
+
export declare const SECONDS_PER_WEEK: number;
|
|
5
|
+
export declare const SECONDS_PER_MONTH: number;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SECONDS_PER_MONTH = exports.SECONDS_PER_WEEK = exports.SECONDS_PER_DAY = exports.SECONDS_PER_HOUR = exports.SECONDS_PER_MINUTE = void 0;
|
|
4
|
-
exports.SECONDS_PER_MINUTE = 60;
|
|
5
|
-
exports.SECONDS_PER_HOUR = 60 * exports.SECONDS_PER_MINUTE;
|
|
6
|
-
exports.SECONDS_PER_DAY = 24 * exports.SECONDS_PER_HOUR;
|
|
7
|
-
exports.SECONDS_PER_WEEK = 7 * exports.SECONDS_PER_DAY;
|
|
8
|
-
exports.SECONDS_PER_MONTH = 30 * exports.SECONDS_PER_DAY;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SECONDS_PER_MONTH = exports.SECONDS_PER_WEEK = exports.SECONDS_PER_DAY = exports.SECONDS_PER_HOUR = exports.SECONDS_PER_MINUTE = void 0;
|
|
4
|
+
exports.SECONDS_PER_MINUTE = 60;
|
|
5
|
+
exports.SECONDS_PER_HOUR = 60 * exports.SECONDS_PER_MINUTE;
|
|
6
|
+
exports.SECONDS_PER_DAY = 24 * exports.SECONDS_PER_HOUR;
|
|
7
|
+
exports.SECONDS_PER_WEEK = 7 * exports.SECONDS_PER_DAY;
|
|
8
|
+
exports.SECONDS_PER_MONTH = 30 * exports.SECONDS_PER_DAY;
|
|
9
9
|
//# sourceMappingURL=time-units.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ServiceFunctionName } from './bundle-data.types';
|
|
2
|
-
import { AppId } from './communication.types';
|
|
3
|
-
import { SquidDocId, SquidDocument } from './document.types';
|
|
4
|
-
import { MutationType } from './mutation.types';
|
|
5
|
-
export interface DocTriggerParams {
|
|
6
|
-
squidDocId: SquidDocId;
|
|
7
|
-
mutationType: MutationType;
|
|
8
|
-
docBefore?: SquidDocument;
|
|
9
|
-
docAfter?: SquidDocument;
|
|
10
|
-
}
|
|
11
|
-
export interface TriggerMessage {
|
|
12
|
-
params: DocTriggerParams;
|
|
13
|
-
functionName: ServiceFunctionName;
|
|
14
|
-
appId: AppId;
|
|
15
|
-
}
|
|
1
|
+
import { ServiceFunctionName } from './bundle-data.types';
|
|
2
|
+
import { AppId } from './communication.types';
|
|
3
|
+
import { SquidDocId, SquidDocument } from './document.types';
|
|
4
|
+
import { MutationType } from './mutation.types';
|
|
5
|
+
export interface DocTriggerParams {
|
|
6
|
+
squidDocId: SquidDocId;
|
|
7
|
+
mutationType: MutationType;
|
|
8
|
+
docBefore?: SquidDocument;
|
|
9
|
+
docAfter?: SquidDocument;
|
|
10
|
+
}
|
|
11
|
+
export interface TriggerMessage {
|
|
12
|
+
params: DocTriggerParams;
|
|
13
|
+
functionName: ServiceFunctionName;
|
|
14
|
+
appId: AppId;
|
|
15
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=trigger.types.js.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
export interface Type<T> extends Function {
|
|
2
|
-
new (...args: any[]): T;
|
|
3
|
-
}
|
|
4
|
-
export type Replace<TypeToBeChecked, KeyToBeReplaced extends keyof TypeToBeChecked, NewValueToUse> = Omit<TypeToBeChecked, KeyToBeReplaced> & {
|
|
5
|
-
[P in KeyToBeReplaced]: NewValueToUse;
|
|
6
|
-
};
|
|
7
|
-
export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
8
|
-
export type WithRequired<T, K extends keyof T> = T & {
|
|
9
|
-
[P in K]-?: T[P];
|
|
10
|
-
};
|
|
11
|
-
type PropertiesWithPrefix<Prefix extends string> = {
|
|
12
|
-
[key in `${Prefix}${string}`]: any;
|
|
13
|
-
};
|
|
14
|
-
type Pred = [0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
15
|
-
export type DeepRecord<T, RemainingDepth extends number & keyof Pred = 5, Prefix extends string = ''> = RemainingDepth extends 0 ? PropertiesWithPrefix<Prefix> : {
|
|
16
|
-
[k in keyof T]-?: k extends string | number ? Record<`${Prefix}${k}`, T[k]> | (Required<T>[k] extends any[] ? never : Required<T>[k] extends object ? DeepRecord<Required<T>[k], Pred[RemainingDepth], `${Prefix}${k}.`> : never) : never;
|
|
17
|
-
}[keyof T];
|
|
18
|
-
export type UnionKeys<T> = T extends any ? keyof T : never;
|
|
19
|
-
export type FieldOf<T, K extends UnionKeys<T>> = Extract<T, Record<K, any>>[K];
|
|
20
|
-
export type Paths<T> = UnionKeys<DeepRecord<T>>;
|
|
21
|
-
export {};
|
|
1
|
+
export interface Type<T> extends Function {
|
|
2
|
+
new (...args: any[]): T;
|
|
3
|
+
}
|
|
4
|
+
export type Replace<TypeToBeChecked, KeyToBeReplaced extends keyof TypeToBeChecked, NewValueToUse> = Omit<TypeToBeChecked, KeyToBeReplaced> & {
|
|
5
|
+
[P in KeyToBeReplaced]: NewValueToUse;
|
|
6
|
+
};
|
|
7
|
+
export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
8
|
+
export type WithRequired<T, K extends keyof T> = T & {
|
|
9
|
+
[P in K]-?: T[P];
|
|
10
|
+
};
|
|
11
|
+
type PropertiesWithPrefix<Prefix extends string> = {
|
|
12
|
+
[key in `${Prefix}${string}`]: any;
|
|
13
|
+
};
|
|
14
|
+
type Pred = [0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
15
|
+
export type DeepRecord<T, RemainingDepth extends number & keyof Pred = 5, Prefix extends string = ''> = RemainingDepth extends 0 ? PropertiesWithPrefix<Prefix> : {
|
|
16
|
+
[k in keyof T]-?: k extends string | number ? Record<`${Prefix}${k}`, T[k]> | (Required<T>[k] extends any[] ? never : Required<T>[k] extends object ? DeepRecord<Required<T>[k], Pred[RemainingDepth], `${Prefix}${k}.`> : never) : never;
|
|
17
|
+
}[keyof T];
|
|
18
|
+
export type UnionKeys<T> = T extends any ? keyof T : never;
|
|
19
|
+
export type FieldOf<T, K extends UnionKeys<T>> = Extract<T, Record<K, any>>[K];
|
|
20
|
+
export type Paths<T> = UnionKeys<DeepRecord<T>>;
|
|
21
|
+
export {};
|
package/dist/common/src/types.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=types.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare function binarySearch<T>(arr: T[], key: T, comparator?: (a: T, b: T) => number, low?: number, high?: number): number;
|
|
2
|
-
export declare function insertSorted<T>(arr: T[], key: T, comparator?: (a: T, b: T) => number): void;
|
|
3
|
-
export declare function removeSorted<T>(arr: T[], key: T, comparator?: (a: T, b: T) => number): void;
|
|
4
|
-
export interface Grouped<T> {
|
|
5
|
-
[key: string]: T[];
|
|
6
|
-
}
|
|
7
|
-
export declare function asyncGroupBy<T>(arr: T[], groupNamer: (element: T) => Promise<string>): Promise<Grouped<T>>;
|
|
8
|
-
export declare const arrayMergeCustomizer: (a: any, b: any) => Array<any> | undefined;
|
|
1
|
+
export declare function binarySearch<T>(arr: T[], key: T, comparator?: (a: T, b: T) => number, low?: number, high?: number): number;
|
|
2
|
+
export declare function insertSorted<T>(arr: T[], key: T, comparator?: (a: T, b: T) => number): void;
|
|
3
|
+
export declare function removeSorted<T>(arr: T[], key: T, comparator?: (a: T, b: T) => number): void;
|
|
4
|
+
export interface Grouped<T> {
|
|
5
|
+
[key: string]: T[];
|
|
6
|
+
}
|
|
7
|
+
export declare function asyncGroupBy<T>(arr: T[], groupNamer: (element: T) => Promise<string>): Promise<Grouped<T>>;
|
|
8
|
+
export declare const arrayMergeCustomizer: (a: any, b: any) => Array<any> | undefined;
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.arrayMergeCustomizer = exports.asyncGroupBy = exports.removeSorted = exports.insertSorted = exports.binarySearch = void 0;
|
|
4
|
-
const lodash_1 = require("lodash");
|
|
5
|
-
function binarySearch(arr, key, comparator = (a, b) => (a > b ? 1 : a < b ? -1 : 0), low = 0, high = arr.length - 1) {
|
|
6
|
-
if (high < low)
|
|
7
|
-
return -1;
|
|
8
|
-
const mid = Math.trunc((low + high) / 2);
|
|
9
|
-
if (comparator(key, arr[mid]) === 0)
|
|
10
|
-
return mid;
|
|
11
|
-
if (comparator(key, arr[mid]) > 0)
|
|
12
|
-
return binarySearch(arr, key, comparator, mid + 1, high);
|
|
13
|
-
return binarySearch(arr, key, comparator, low, mid - 1);
|
|
14
|
-
}
|
|
15
|
-
exports.binarySearch = binarySearch;
|
|
16
|
-
function insertSorted(arr, key, comparator = (a, b) => (a > b ? 1 : a < b ? -1 : 0)) {
|
|
17
|
-
if (binarySearch(arr, key, comparator) !== -1) {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
const len = arr.length;
|
|
21
|
-
let i;
|
|
22
|
-
for (i = len - 1; i >= 0 && comparator(arr[i], key) > 0; i--)
|
|
23
|
-
arr[i + 1] = arr[i];
|
|
24
|
-
arr[i + 1] = key;
|
|
25
|
-
}
|
|
26
|
-
exports.insertSorted = insertSorted;
|
|
27
|
-
function removeSorted(arr, key, comparator = (a, b) => (a > b ? 1 : a < b ? -1 : 0)) {
|
|
28
|
-
const index = binarySearch(arr, key, comparator);
|
|
29
|
-
if (index > -1) {
|
|
30
|
-
arr.splice(index, 1);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.removeSorted = removeSorted;
|
|
34
|
-
async function asyncGroupBy(arr, groupNamer) {
|
|
35
|
-
const groups = {};
|
|
36
|
-
for (const element of arr) {
|
|
37
|
-
const key = await groupNamer(element);
|
|
38
|
-
if (!groups[key]) {
|
|
39
|
-
groups[key] = [];
|
|
40
|
-
}
|
|
41
|
-
groups[key].push(element);
|
|
42
|
-
}
|
|
43
|
-
return groups;
|
|
44
|
-
}
|
|
45
|
-
exports.asyncGroupBy = asyncGroupBy;
|
|
46
|
-
const arrayMergeCustomizer = (a, b) => {
|
|
47
|
-
if ((0, lodash_1.isArray)(a)) {
|
|
48
|
-
return a.concat(b);
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
return undefined;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
exports.arrayMergeCustomizer = arrayMergeCustomizer;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.arrayMergeCustomizer = exports.asyncGroupBy = exports.removeSorted = exports.insertSorted = exports.binarySearch = void 0;
|
|
4
|
+
const lodash_1 = require("lodash");
|
|
5
|
+
function binarySearch(arr, key, comparator = (a, b) => (a > b ? 1 : a < b ? -1 : 0), low = 0, high = arr.length - 1) {
|
|
6
|
+
if (high < low)
|
|
7
|
+
return -1;
|
|
8
|
+
const mid = Math.trunc((low + high) / 2);
|
|
9
|
+
if (comparator(key, arr[mid]) === 0)
|
|
10
|
+
return mid;
|
|
11
|
+
if (comparator(key, arr[mid]) > 0)
|
|
12
|
+
return binarySearch(arr, key, comparator, mid + 1, high);
|
|
13
|
+
return binarySearch(arr, key, comparator, low, mid - 1);
|
|
14
|
+
}
|
|
15
|
+
exports.binarySearch = binarySearch;
|
|
16
|
+
function insertSorted(arr, key, comparator = (a, b) => (a > b ? 1 : a < b ? -1 : 0)) {
|
|
17
|
+
if (binarySearch(arr, key, comparator) !== -1) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const len = arr.length;
|
|
21
|
+
let i;
|
|
22
|
+
for (i = len - 1; i >= 0 && comparator(arr[i], key) > 0; i--)
|
|
23
|
+
arr[i + 1] = arr[i];
|
|
24
|
+
arr[i + 1] = key;
|
|
25
|
+
}
|
|
26
|
+
exports.insertSorted = insertSorted;
|
|
27
|
+
function removeSorted(arr, key, comparator = (a, b) => (a > b ? 1 : a < b ? -1 : 0)) {
|
|
28
|
+
const index = binarySearch(arr, key, comparator);
|
|
29
|
+
if (index > -1) {
|
|
30
|
+
arr.splice(index, 1);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.removeSorted = removeSorted;
|
|
34
|
+
async function asyncGroupBy(arr, groupNamer) {
|
|
35
|
+
const groups = {};
|
|
36
|
+
for (const element of arr) {
|
|
37
|
+
const key = await groupNamer(element);
|
|
38
|
+
if (!groups[key]) {
|
|
39
|
+
groups[key] = [];
|
|
40
|
+
}
|
|
41
|
+
groups[key].push(element);
|
|
42
|
+
}
|
|
43
|
+
return groups;
|
|
44
|
+
}
|
|
45
|
+
exports.asyncGroupBy = asyncGroupBy;
|
|
46
|
+
const arrayMergeCustomizer = (a, b) => {
|
|
47
|
+
if ((0, lodash_1.isArray)(a)) {
|
|
48
|
+
return a.concat(b);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
exports.arrayMergeCustomizer = arrayMergeCustomizer;
|
|
55
55
|
//# sourceMappingURL=array.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { StatusCode } from './validation';
|
|
2
|
-
export type AssertErrorProvider = () => Error | string;
|
|
3
|
-
export declare function assertTruthy(value: unknown, error?: string | Error | AssertErrorProvider): asserts value;
|
|
4
|
-
export declare function assertNotNullish(value: unknown, error?: string | Error | AssertErrorProvider): asserts value;
|
|
5
|
-
export declare function assertValidateTruthy(value: unknown, message: string, statusCode?: StatusCode, details?: Record<string, any>): asserts value;
|
|
6
|
-
export declare function truthy<T>(value: T, error?: string | Error | AssertErrorProvider): NonNullable<T>;
|
|
7
|
-
export declare function notNullish<T>(value: T, error?: string | Error | AssertErrorProvider): NonNullable<T>;
|
|
8
|
-
export declare function validateTruthy<T>(value: T, message: string, statusCode?: StatusCode, details?: Record<string, any>): NonNullable<T>;
|
|
1
|
+
import { StatusCode } from './validation';
|
|
2
|
+
export type AssertErrorProvider = () => Error | string;
|
|
3
|
+
export declare function assertTruthy(value: unknown, error?: string | Error | AssertErrorProvider): asserts value;
|
|
4
|
+
export declare function assertNotNullish(value: unknown, error?: string | Error | AssertErrorProvider): asserts value;
|
|
5
|
+
export declare function assertValidateTruthy(value: unknown, message: string, statusCode?: StatusCode, details?: Record<string, any>): asserts value;
|
|
6
|
+
export declare function truthy<T>(value: T, error?: string | Error | AssertErrorProvider): NonNullable<T>;
|
|
7
|
+
export declare function notNullish<T>(value: T, error?: string | Error | AssertErrorProvider): NonNullable<T>;
|
|
8
|
+
export declare function validateTruthy<T>(value: T, message: string, statusCode?: StatusCode, details?: Record<string, any>): NonNullable<T>;
|