@squidcloud/local-backend 1.0.158 → 1.0.159

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.
Files changed (160) hide show
  1. package/package.json +1 -1
  2. package/dist/internal-common/src/code-executor.types.d.ts +0 -15
  3. package/dist/internal-common/src/code-executor.types.js +0 -3
  4. package/dist/internal-common/src/code-executor.types.js.map +0 -1
  5. package/dist/internal-common/src/local-dev.types.d.ts +0 -54
  6. package/dist/internal-common/src/local-dev.types.js +0 -11
  7. package/dist/internal-common/src/local-dev.types.js.map +0 -1
  8. package/dist/internal-common/src/public-types/ai-chatbot.context.d.ts +0 -13
  9. package/dist/internal-common/src/public-types/ai-chatbot.context.js +0 -20
  10. package/dist/internal-common/src/public-types/ai-chatbot.context.js.map +0 -1
  11. package/dist/internal-common/src/public-types/ai-chatbot.types.d.ts +0 -126
  12. package/dist/internal-common/src/public-types/ai-chatbot.types.js +0 -28
  13. package/dist/internal-common/src/public-types/ai-chatbot.types.js.map +0 -1
  14. package/dist/internal-common/src/public-types/api-call.context.d.ts +0 -13
  15. package/dist/internal-common/src/public-types/api-call.context.js +0 -17
  16. package/dist/internal-common/src/public-types/api-call.context.js.map +0 -1
  17. package/dist/internal-common/src/public-types/api.types.d.ts +0 -22
  18. package/dist/internal-common/src/public-types/api.types.js +0 -3
  19. package/dist/internal-common/src/public-types/api.types.js.map +0 -1
  20. package/dist/internal-common/src/public-types/application.types.d.ts +0 -199
  21. package/dist/internal-common/src/public-types/application.types.js +0 -90
  22. package/dist/internal-common/src/public-types/application.types.js.map +0 -1
  23. package/dist/internal-common/src/public-types/backend-run.types.d.ts +0 -52
  24. package/dist/internal-common/src/public-types/backend-run.types.js +0 -28
  25. package/dist/internal-common/src/public-types/backend-run.types.js.map +0 -1
  26. package/dist/internal-common/src/public-types/bundle-api.types.d.ts +0 -53
  27. package/dist/internal-common/src/public-types/bundle-api.types.js +0 -3
  28. package/dist/internal-common/src/public-types/bundle-api.types.js.map +0 -1
  29. package/dist/internal-common/src/public-types/bundle-data.types.d.ts +0 -75
  30. package/dist/internal-common/src/public-types/bundle-data.types.js +0 -3
  31. package/dist/internal-common/src/public-types/bundle-data.types.js.map +0 -1
  32. package/dist/internal-common/src/public-types/communication.types.d.ts +0 -20
  33. package/dist/internal-common/src/public-types/communication.types.js +0 -42
  34. package/dist/internal-common/src/public-types/communication.types.js.map +0 -1
  35. package/dist/internal-common/src/public-types/context.types.d.ts +0 -24
  36. package/dist/internal-common/src/public-types/context.types.js +0 -3
  37. package/dist/internal-common/src/public-types/context.types.js.map +0 -1
  38. package/dist/internal-common/src/public-types/distributed-lock.context.d.ts +0 -4
  39. package/dist/internal-common/src/public-types/distributed-lock.context.js +0 -10
  40. package/dist/internal-common/src/public-types/distributed-lock.context.js.map +0 -1
  41. package/dist/internal-common/src/public-types/document.types.d.ts +0 -32
  42. package/dist/internal-common/src/public-types/document.types.js +0 -51
  43. package/dist/internal-common/src/public-types/document.types.js.map +0 -1
  44. package/dist/internal-common/src/public-types/graphql.context.d.ts +0 -14
  45. package/dist/internal-common/src/public-types/graphql.context.js +0 -13
  46. package/dist/internal-common/src/public-types/graphql.context.js.map +0 -1
  47. package/dist/internal-common/src/public-types/graphql.types.d.ts +0 -11
  48. package/dist/internal-common/src/public-types/graphql.types.js +0 -35
  49. package/dist/internal-common/src/public-types/graphql.types.js.map +0 -1
  50. package/dist/internal-common/src/public-types/http-status.enum.d.ts +0 -50
  51. package/dist/internal-common/src/public-types/http-status.enum.js +0 -55
  52. package/dist/internal-common/src/public-types/http-status.enum.js.map +0 -1
  53. package/dist/internal-common/src/public-types/integration-types.d.ts +0 -58
  54. package/dist/internal-common/src/public-types/integration-types.js +0 -65
  55. package/dist/internal-common/src/public-types/integration-types.js.map +0 -1
  56. package/dist/internal-common/src/public-types/integrations/ai_chatbot.types.d.ts +0 -32
  57. package/dist/internal-common/src/public-types/integrations/ai_chatbot.types.js +0 -3
  58. package/dist/internal-common/src/public-types/integrations/ai_chatbot.types.js.map +0 -1
  59. package/dist/internal-common/src/public-types/integrations/api.types.d.ts +0 -81
  60. package/dist/internal-common/src/public-types/integrations/api.types.js +0 -3
  61. package/dist/internal-common/src/public-types/integrations/api.types.js.map +0 -1
  62. package/dist/internal-common/src/public-types/integrations/auth.types.d.ts +0 -46
  63. package/dist/internal-common/src/public-types/integrations/auth.types.js +0 -3
  64. package/dist/internal-common/src/public-types/integrations/auth.types.js.map +0 -1
  65. package/dist/internal-common/src/public-types/integrations/database.types.d.ts +0 -275
  66. package/dist/internal-common/src/public-types/integrations/database.types.js +0 -3
  67. package/dist/internal-common/src/public-types/integrations/database.types.js.map +0 -1
  68. package/dist/internal-common/src/public-types/integrations/observability.types.d.ts +0 -24
  69. package/dist/internal-common/src/public-types/integrations/observability.types.js +0 -24
  70. package/dist/internal-common/src/public-types/integrations/observability.types.js.map +0 -1
  71. package/dist/internal-common/src/public-types/integrations/schemas.d.ts +0 -74
  72. package/dist/internal-common/src/public-types/integrations/schemas.js +0 -43
  73. package/dist/internal-common/src/public-types/integrations/schemas.js.map +0 -1
  74. package/dist/internal-common/src/public-types/logger.types.d.ts +0 -21
  75. package/dist/internal-common/src/public-types/logger.types.js +0 -12
  76. package/dist/internal-common/src/public-types/logger.types.js.map +0 -1
  77. package/dist/internal-common/src/public-types/mutation.context.d.ts +0 -13
  78. package/dist/internal-common/src/public-types/mutation.context.js +0 -27
  79. package/dist/internal-common/src/public-types/mutation.context.js.map +0 -1
  80. package/dist/internal-common/src/public-types/mutation.types.d.ts +0 -63
  81. package/dist/internal-common/src/public-types/mutation.types.js +0 -143
  82. package/dist/internal-common/src/public-types/mutation.types.js.map +0 -1
  83. package/dist/internal-common/src/public-types/native-query.context.d.ts +0 -7
  84. package/dist/internal-common/src/public-types/native-query.context.js +0 -12
  85. package/dist/internal-common/src/public-types/native-query.context.js.map +0 -1
  86. package/dist/internal-common/src/public-types/openapi.types.d.ts +0 -26
  87. package/dist/internal-common/src/public-types/openapi.types.js +0 -3
  88. package/dist/internal-common/src/public-types/openapi.types.js.map +0 -1
  89. package/dist/internal-common/src/public-types/query-context.d.ts +0 -47
  90. package/dist/internal-common/src/public-types/query-context.js +0 -160
  91. package/dist/internal-common/src/public-types/query-context.js.map +0 -1
  92. package/dist/internal-common/src/public-types/query.types.d.ts +0 -86
  93. package/dist/internal-common/src/public-types/query.types.js +0 -98
  94. package/dist/internal-common/src/public-types/query.types.js.map +0 -1
  95. package/dist/internal-common/src/public-types/secret.types.d.ts +0 -68
  96. package/dist/internal-common/src/public-types/secret.types.js +0 -6
  97. package/dist/internal-common/src/public-types/secret.types.js.map +0 -1
  98. package/dist/internal-common/src/public-types/socket.types.d.ts +0 -126
  99. package/dist/internal-common/src/public-types/socket.types.js +0 -10
  100. package/dist/internal-common/src/public-types/socket.types.js.map +0 -1
  101. package/dist/internal-common/src/public-types/types.d.ts +0 -21
  102. package/dist/internal-common/src/public-types/types.js +0 -3
  103. package/dist/internal-common/src/public-types/types.js.map +0 -1
  104. package/dist/internal-common/src/schema/schema.types.d.ts +0 -30
  105. package/dist/internal-common/src/schema/schema.types.js +0 -167
  106. package/dist/internal-common/src/schema/schema.types.js.map +0 -1
  107. package/dist/internal-common/src/types/openapi-response.d.ts +0 -6
  108. package/dist/internal-common/src/types/openapi-response.js +0 -3
  109. package/dist/internal-common/src/types/openapi-response.js.map +0 -1
  110. package/dist/internal-common/src/types/security-internal.types.d.ts +0 -20
  111. package/dist/internal-common/src/types/security-internal.types.js +0 -3
  112. package/dist/internal-common/src/types/security-internal.types.js.map +0 -1
  113. package/dist/internal-common/src/utils/assert.d.ts +0 -3
  114. package/dist/internal-common/src/utils/assert.js +0 -15
  115. package/dist/internal-common/src/utils/assert.js.map +0 -1
  116. package/dist/internal-common/src/utils/backend-transforms.d.ts +0 -3
  117. package/dist/internal-common/src/utils/backend-transforms.js +0 -91
  118. package/dist/internal-common/src/utils/backend-transforms.js.map +0 -1
  119. package/dist/internal-common/src/utils/global.utils.d.ts +0 -11
  120. package/dist/internal-common/src/utils/global.utils.js +0 -51
  121. package/dist/internal-common/src/utils/global.utils.js.map +0 -1
  122. package/dist/internal-common/src/utils/http.d.ts +0 -2
  123. package/dist/internal-common/src/utils/http.js +0 -55
  124. package/dist/internal-common/src/utils/http.js.map +0 -1
  125. package/dist/internal-common/src/utils/object.d.ts +0 -5
  126. package/dist/internal-common/src/utils/object.js +0 -76
  127. package/dist/internal-common/src/utils/object.js.map +0 -1
  128. package/dist/internal-common/src/utils/serialization.d.ts +0 -5
  129. package/dist/internal-common/src/utils/serialization.js +0 -74
  130. package/dist/internal-common/src/utils/serialization.js.map +0 -1
  131. package/dist/internal-common/src/utils/validation.d.ts +0 -19
  132. package/dist/internal-common/src/utils/validation.js +0 -210
  133. package/dist/internal-common/src/utils/validation.js.map +0 -1
  134. package/dist/internal-common/src/websocket.impl.d.ts +0 -21
  135. package/dist/internal-common/src/websocket.impl.js +0 -80
  136. package/dist/internal-common/src/websocket.impl.js.map +0 -1
  137. package/dist/local-backend/openapi-template.hbs +0 -1
  138. package/dist/local-backend/package.json +0 -54
  139. package/dist/local-backend/src/index.d.ts +0 -4
  140. package/dist/local-backend/src/index.js.map +0 -1
  141. package/dist/local-backend/src/local-backend-socket.service.d.ts +0 -22
  142. package/dist/local-backend/src/local-backend-socket.service.js +0 -212
  143. package/dist/local-backend/src/local-backend-socket.service.js.map +0 -1
  144. package/dist/local-backend/src/local-backend.app.d.ts +0 -2
  145. package/dist/local-backend/src/local-backend.app.js +0 -26
  146. package/dist/local-backend/src/local-backend.app.js.map +0 -1
  147. package/dist/local-backend/src/local-backend.controller.d.ts +0 -8
  148. package/dist/local-backend/src/local-backend.controller.js +0 -49
  149. package/dist/local-backend/src/local-backend.controller.js.map +0 -1
  150. package/dist/local-backend/src/local-backend.module.d.ts +0 -8
  151. package/dist/local-backend/src/local-backend.module.js +0 -52
  152. package/dist/local-backend/src/local-backend.module.js.map +0 -1
  153. package/dist/local-backend/src/local-backend.service.d.ts +0 -17
  154. package/dist/local-backend/src/local-backend.service.js +0 -175
  155. package/dist/local-backend/src/local-backend.service.js.map +0 -1
  156. package/dist/local-backend/src/utils/shell-runner.d.ts +0 -4
  157. package/dist/local-backend/src/utils/shell-runner.js +0 -28
  158. package/dist/local-backend/src/utils/shell-runner.js.map +0 -1
  159. package/dist/local-backend/tsoa.json +0 -15
  160. package/dist/tsconfig.build.tsbuildinfo +0 -1
@@ -1,24 +0,0 @@
1
- import { BaseIntegrationConfig } from './schemas';
2
- import { IntegrationType } from '../integration-types';
3
- export interface DatadogIntegrationConfig extends BaseIntegrationConfig {
4
- type: IntegrationType.datadog;
5
- configuration: DatadogIntegrationConfiguration;
6
- }
7
- export interface DatadogIntegrationConfiguration {
8
- apiKey: string;
9
- appKey: string;
10
- datadogRegion: DatadogRegion;
11
- }
12
- export type DatadogRegion = 'us1' | 'us3' | 'us5' | 'eu1' | 'us1-fed' | 'ap1';
13
- export interface NewRelicIntegrationConfig extends BaseIntegrationConfig {
14
- type: IntegrationType.newrelic;
15
- configuration: NewRelicIntegrationConfiguration;
16
- }
17
- export declare const datadogRegionMap: Record<DatadogRegion, string>;
18
- export declare const datadogLogsUrlMap: Record<DatadogRegion, string>;
19
- export type NewRelicRegion = 'worldwide' | 'eu';
20
- export interface NewRelicIntegrationConfiguration {
21
- apiKey: string;
22
- newRelicRegion: NewRelicRegion;
23
- }
24
- export declare const newRelicRegionMap: Record<NewRelicRegion, string>;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newRelicRegionMap = exports.datadogLogsUrlMap = exports.datadogRegionMap = void 0;
4
- exports.datadogRegionMap = {
5
- us1: 'US1 - East',
6
- us3: 'US3 - West',
7
- us5: 'US5 - Central',
8
- eu1: 'EU1 - Europe',
9
- ap1: 'AP1 - Asia',
10
- 'us1-fed': 'US1-FED (FedRamp)',
11
- };
12
- exports.datadogLogsUrlMap = {
13
- us1: 'https://http-intake.logs.datadoghq.com',
14
- us3: 'https://http-intake.logs.us3.datadoghq.com',
15
- us5: 'https://http-intake.logs.us5.datadoghq.com',
16
- eu1: 'https://http-intake.logs.datadoghq.eu',
17
- ap1: 'https://http-intake.logs.ap1.datadoghq.com',
18
- 'us1-fed': 'https://http-intake.logs.ddog-gov.com',
19
- };
20
- exports.newRelicRegionMap = {
21
- worldwide: 'Worldwide',
22
- eu: 'Europe',
23
- };
24
- //# sourceMappingURL=observability.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"observability.types.js","sourceRoot":"","sources":["../../../../../../internal-common/src/public-types/integrations/observability.types.ts"],"names":[],"mappings":";;;AAqBa,QAAA,gBAAgB,GAAkC;IAC7D,GAAG,EAAE,YAAY;IACjB,GAAG,EAAE,YAAY;IACjB,GAAG,EAAE,eAAe;IACpB,GAAG,EAAE,cAAc;IACnB,GAAG,EAAE,YAAY;IACjB,SAAS,EAAE,mBAAmB;CAC/B,CAAC;AAEW,QAAA,iBAAiB,GAAkC;IAC9D,GAAG,EAAE,wCAAwC;IAC7C,GAAG,EAAE,4CAA4C;IACjD,GAAG,EAAE,4CAA4C;IACjD,GAAG,EAAE,uCAAuC;IAC5C,GAAG,EAAE,4CAA4C;IACjD,SAAS,EAAE,uCAAuC;CACnD,CAAC;AASW,QAAA,iBAAiB,GAAmC;IAC/D,SAAS,EAAE,WAAW;IACtB,EAAE,EAAE,QAAQ;CACb,CAAC"}
@@ -1,74 +0,0 @@
1
- import { AiChatbotIntegrationConfig } from './ai_chatbot.types';
2
- import { GraphQLIntegrationConfig, HttpApiIntegrationConfig, IntegrationApiSchema, IntegrationGraphQLSchema, TestGraphQLDataConnectionRequest } from './api.types';
3
- import { Auth0IntegrationConfig, CognitoIntegrationConfig, DescopeIntegrationConfig, JwtHmacIntegrationConfig, JwtRsaIntegrationConfig, OktaIntegrationConfig } from './auth.types';
4
- import { BaseDatabaseIntegrationConfig, BigQueryIntegrationConfig, CockroachIntegrationConfig, IntegrationDataSchema, InternalIntegrationConfig, MongoIntegrationConfig, MssqlIntegrationConfig, MySqlIntegrationConfig, OracleIntegrationConfig, PinotIntegrationConfig, PostgresIntegrationConfig, SnowflakeIntegrationConfig, TestDataConnectionRequest } from './database.types';
5
- import { DatadogIntegrationConfig, NewRelicIntegrationConfig } from './observability.types';
6
- import { IntegrationId } from '../communication.types';
7
- import { IntegrationSchemaType, IntegrationType } from '../integration-types';
8
- export interface IntegrationConfigTypes {
9
- [IntegrationType.built_in_db]: InternalIntegrationConfig;
10
- [IntegrationType.mongo]: MongoIntegrationConfig;
11
- [IntegrationType.mysql]: MySqlIntegrationConfig;
12
- [IntegrationType.bigquery]: BigQueryIntegrationConfig;
13
- [IntegrationType.oracledb]: OracleIntegrationConfig;
14
- [IntegrationType.pinot]: PinotIntegrationConfig;
15
- [IntegrationType.mssql]: MssqlIntegrationConfig;
16
- [IntegrationType.postgres]: PostgresIntegrationConfig;
17
- [IntegrationType.cockroach]: CockroachIntegrationConfig;
18
- [IntegrationType.snowflake]: SnowflakeIntegrationConfig;
19
- [IntegrationType.api]: HttpApiIntegrationConfig;
20
- [IntegrationType.graphql]: GraphQLIntegrationConfig;
21
- [IntegrationType.datadog]: DatadogIntegrationConfig;
22
- [IntegrationType.newrelic]: NewRelicIntegrationConfig;
23
- [IntegrationType.auth0]: Auth0IntegrationConfig;
24
- [IntegrationType.jwt_rsa]: JwtRsaIntegrationConfig;
25
- [IntegrationType.jwt_hmac]: JwtHmacIntegrationConfig;
26
- [IntegrationType.ai_chatbot]: AiChatbotIntegrationConfig;
27
- [IntegrationType.cognito]: CognitoIntegrationConfig;
28
- [IntegrationType.okta]: OktaIntegrationConfig;
29
- [IntegrationType.descope]: DescopeIntegrationConfig;
30
- }
31
- export interface IntegrationSchemaTypes {
32
- [IntegrationType.built_in_db]: IntegrationDataSchema;
33
- [IntegrationType.mongo]: IntegrationDataSchema;
34
- [IntegrationType.mysql]: IntegrationDataSchema;
35
- [IntegrationType.oracledb]: IntegrationDataSchema;
36
- [IntegrationType.bigquery]: IntegrationDataSchema;
37
- [IntegrationType.pinot]: IntegrationDataSchema;
38
- [IntegrationType.mssql]: IntegrationDataSchema;
39
- [IntegrationType.postgres]: IntegrationDataSchema;
40
- [IntegrationType.cockroach]: IntegrationDataSchema;
41
- [IntegrationType.snowflake]: IntegrationDataSchema;
42
- [IntegrationType.api]: IntegrationApiSchema;
43
- [IntegrationType.graphql]: IntegrationGraphQLSchema;
44
- }
45
- export type IntegrationTypeWithConfig = keyof IntegrationConfigTypes;
46
- export type IntegrationSchemaKeys = keyof IntegrationSchemaTypes;
47
- export type IntegrationConfig = IntegrationConfigTypes[IntegrationTypeWithConfig];
48
- export type IntegrationSchema = IntegrationSchemaTypes[IntegrationSchemaKeys];
49
- export declare const DatabaseIntegrationTypes: readonly [IntegrationType.built_in_db, IntegrationType.mongo, IntegrationType.mysql, IntegrationType.bigquery, IntegrationType.mssql, IntegrationType.postgres, IntegrationType.cockroach, IntegrationType.snowflake, IntegrationType.oracledb, IntegrationType.pinot];
50
- export type DatabaseIntegrationType = (typeof DatabaseIntegrationTypes)[number];
51
- export type DatabaseIntegrationConfig = IntegrationConfigTypes[DatabaseIntegrationType];
52
- export declare const ApiIntegrationTypes: readonly [IntegrationType.api, IntegrationType.graphql];
53
- export declare const ObservabilityIntegrationTypes: readonly [IntegrationType.datadog, IntegrationType.newrelic];
54
- export declare const AuthIntegrationTypes: readonly [IntegrationType.auth0, IntegrationType.jwt_rsa, IntegrationType.jwt_hmac, IntegrationType.cognito, IntegrationType.okta, IntegrationType.descope];
55
- export type ApiIntegrationType = (typeof ApiIntegrationTypes)[number];
56
- export type ApiIntegrationConfig = IntegrationConfigTypes[ApiIntegrationType];
57
- export type ObservabilityIntegrationType = (typeof ObservabilityIntegrationTypes)[number];
58
- export type ObservabilityIntegrationConfig = IntegrationConfigTypes[ObservabilityIntegrationType];
59
- export type AuthIntegrationType = (typeof AuthIntegrationTypes)[number];
60
- export type AuthIntegrationConfig = IntegrationConfigTypes[AuthIntegrationType];
61
- export declare function isDataIntegrationType(type: unknown): type is DatabaseIntegrationType;
62
- export declare function isDataIntegration(integration: any): integration is BaseDatabaseIntegrationConfig;
63
- export declare function isAuthIntegrationType(type: IntegrationType): type is AuthIntegrationType;
64
- export declare function isAuthIntegration(integration: any): integration is AuthIntegrationConfig;
65
- export interface BaseIntegrationConfig {
66
- id: IntegrationId;
67
- type: IntegrationTypeWithConfig;
68
- creationDate: Date;
69
- updateDate: Date;
70
- }
71
- export interface BaseIntegrationSchema {
72
- type: IntegrationSchemaType;
73
- }
74
- export type TestConnectionRequest = TestDataConnectionRequest | TestGraphQLDataConnectionRequest;
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isAuthIntegration = exports.isAuthIntegrationType = exports.isDataIntegration = exports.isDataIntegrationType = exports.AuthIntegrationTypes = exports.ObservabilityIntegrationTypes = exports.ApiIntegrationTypes = exports.DatabaseIntegrationTypes = void 0;
4
- const integration_types_1 = require("../integration-types");
5
- exports.DatabaseIntegrationTypes = [
6
- integration_types_1.IntegrationType.built_in_db,
7
- integration_types_1.IntegrationType.mongo,
8
- integration_types_1.IntegrationType.mysql,
9
- integration_types_1.IntegrationType.bigquery,
10
- integration_types_1.IntegrationType.mssql,
11
- integration_types_1.IntegrationType.postgres,
12
- integration_types_1.IntegrationType.cockroach,
13
- integration_types_1.IntegrationType.snowflake,
14
- integration_types_1.IntegrationType.oracledb,
15
- integration_types_1.IntegrationType.pinot,
16
- ];
17
- exports.ApiIntegrationTypes = [integration_types_1.IntegrationType.api, integration_types_1.IntegrationType.graphql];
18
- exports.ObservabilityIntegrationTypes = [integration_types_1.IntegrationType.datadog, integration_types_1.IntegrationType.newrelic];
19
- exports.AuthIntegrationTypes = [
20
- integration_types_1.IntegrationType.auth0,
21
- integration_types_1.IntegrationType.jwt_rsa,
22
- integration_types_1.IntegrationType.jwt_hmac,
23
- integration_types_1.IntegrationType.cognito,
24
- integration_types_1.IntegrationType.okta,
25
- integration_types_1.IntegrationType.descope,
26
- ];
27
- function isDataIntegrationType(type) {
28
- return exports.DatabaseIntegrationTypes.includes(type);
29
- }
30
- exports.isDataIntegrationType = isDataIntegrationType;
31
- function isDataIntegration(integration) {
32
- return isDataIntegrationType(integration.type);
33
- }
34
- exports.isDataIntegration = isDataIntegration;
35
- function isAuthIntegrationType(type) {
36
- return exports.AuthIntegrationTypes.includes(type);
37
- }
38
- exports.isAuthIntegrationType = isAuthIntegrationType;
39
- function isAuthIntegration(integration) {
40
- return isAuthIntegrationType(integration.type);
41
- }
42
- exports.isAuthIntegration = isAuthIntegration;
43
- //# sourceMappingURL=schemas.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../../../../internal-common/src/public-types/integrations/schemas.ts"],"names":[],"mappings":";;;AAiCA,4DAA8E;AA+CjE,QAAA,wBAAwB,GAAG;IACtC,mCAAe,CAAC,WAAW;IAC3B,mCAAe,CAAC,KAAK;IACrB,mCAAe,CAAC,KAAK;IACrB,mCAAe,CAAC,QAAQ;IACxB,mCAAe,CAAC,KAAK;IACrB,mCAAe,CAAC,QAAQ;IACxB,mCAAe,CAAC,SAAS;IACzB,mCAAe,CAAC,SAAS;IACzB,mCAAe,CAAC,QAAQ;IACxB,mCAAe,CAAC,KAAK;CACb,CAAC;AAIE,QAAA,mBAAmB,GAAG,CAAC,mCAAe,CAAC,GAAG,EAAE,mCAAe,CAAC,OAAO,CAAU,CAAC;AAE9E,QAAA,6BAA6B,GAAG,CAAC,mCAAe,CAAC,OAAO,EAAE,mCAAe,CAAC,QAAQ,CAAU,CAAC;AAE7F,QAAA,oBAAoB,GAAG;IAClC,mCAAe,CAAC,KAAK;IACrB,mCAAe,CAAC,OAAO;IACvB,mCAAe,CAAC,QAAQ;IACxB,mCAAe,CAAC,OAAO;IACvB,mCAAe,CAAC,IAAI;IACpB,mCAAe,CAAC,OAAO;CACf,CAAC;AAWX,SAAgB,qBAAqB,CAAC,IAAa;IACjD,OAAO,gCAAwB,CAAC,QAAQ,CAAC,IAA+B,CAAC,CAAC;AAC5E,CAAC;AAFD,sDAEC;AAED,SAAgB,iBAAiB,CAAC,WAAgB;IAChD,OAAO,qBAAqB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AACjD,CAAC;AAFD,8CAEC;AAED,SAAgB,qBAAqB,CAAC,IAAqB;IACzD,OAAQ,4BAAmD,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC7E,CAAC;AAFD,sDAEC;AAED,SAAgB,iBAAiB,CAAC,WAAgB;IAChD,OAAO,qBAAqB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AACjD,CAAC;AAFD,8CAEC"}
@@ -1,21 +0,0 @@
1
- export type LoggerContext = Record<string, any>;
2
- export interface Logger {
3
- trace(message: string, context?: LoggerContext): void;
4
- debug(message: string, context?: LoggerContext): void;
5
- info(message: string, context?: LoggerContext): void;
6
- warn(message: string, context?: LoggerContext): void;
7
- error(message: string, context?: LoggerContext): void;
8
- log(record: LogRecord): void;
9
- }
10
- export declare enum LogLevel {
11
- TRACE = "trace",
12
- DEBUG = "debug",
13
- INFO = "info",
14
- WARN = "warn",
15
- ERROR = "error"
16
- }
17
- export interface LogRecord {
18
- level?: LogLevel;
19
- message?: string;
20
- [key: string]: any;
21
- }
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LogLevel = void 0;
4
- var LogLevel;
5
- (function (LogLevel) {
6
- LogLevel["TRACE"] = "trace";
7
- LogLevel["DEBUG"] = "debug";
8
- LogLevel["INFO"] = "info";
9
- LogLevel["WARN"] = "warn";
10
- LogLevel["ERROR"] = "error";
11
- })(LogLevel || (exports.LogLevel = LogLevel = {}));
12
- //# sourceMappingURL=logger.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/logger.types.ts"],"names":[],"mappings":";;;AAgBA,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,2BAAe,CAAA;IACf,2BAAe,CAAA;IACf,yBAAa,CAAA;IACb,yBAAa,CAAA;IACb,2BAAe,CAAA;AACjB,CAAC,EANW,QAAQ,wBAAR,QAAQ,QAMnB"}
@@ -1,13 +0,0 @@
1
- import { Mutation, MutationType } from './mutation.types';
2
- import { BeforeAndAfterDocs } from './document.types';
3
- import { Paths } from './types';
4
- export declare class MutationContext<T = any> {
5
- readonly mutation: Mutation<T>;
6
- readonly beforeAndAfterDocs: BeforeAndAfterDocs<T>;
7
- readonly serverTimeStamp: Date;
8
- constructor(mutation: Mutation<T>, beforeAndAfterDocs: BeforeAndAfterDocs<T>, serverTimeStamp: Date);
9
- getMutationType(): MutationType;
10
- get before(): T | undefined;
11
- get after(): T | undefined;
12
- affectsPath(path: Paths<T>): boolean;
13
- }
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MutationContext = void 0;
4
- const _ = require("lodash");
5
- class MutationContext {
6
- constructor(mutation, beforeAndAfterDocs, serverTimeStamp) {
7
- this.mutation = mutation;
8
- this.beforeAndAfterDocs = beforeAndAfterDocs;
9
- this.serverTimeStamp = serverTimeStamp;
10
- }
11
- getMutationType() {
12
- return this.mutation.type;
13
- }
14
- get before() {
15
- return this.beforeAndAfterDocs.before;
16
- }
17
- get after() {
18
- return this.beforeAndAfterDocs.after;
19
- }
20
- affectsPath(path) {
21
- const before = this.before ? _.get(this.before, path) : undefined;
22
- const after = this.after ? _.get(this.after, path) : undefined;
23
- return !_.isEqual(before, after);
24
- }
25
- }
26
- exports.MutationContext = MutationContext;
27
- //# sourceMappingURL=mutation.context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mutation.context.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/mutation.context.ts"],"names":[],"mappings":";;;AAAA,4BAA4B;AAM5B,MAAa,eAAe;IAI1B,YACW,QAAqB,EACrB,kBAAyC,EACzC,eAAqB;QAFrB,aAAQ,GAAR,QAAQ,CAAa;QACrB,uBAAkB,GAAlB,kBAAkB,CAAuB;QACzC,oBAAe,GAAf,eAAe,CAAM;IAC7B,CAAC;IAEJ,eAAe;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC5B,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC;IACxC,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC;IACvC,CAAC;IAGD,WAAW,CAAC,IAAc;QACxB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAClE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC/D,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC;CACF;AA5BD,0CA4BC"}
@@ -1,63 +0,0 @@
1
- import { IntegrationId } from './communication.types';
2
- import { DocTimestamp, FieldName, SquidDocId, SquidDocIdObj, SquidDocument } from './document.types';
3
- export interface MutateRequest<T = any> {
4
- integrationId: IntegrationId;
5
- mutations: Array<Mutation<T>>;
6
- }
7
- export interface ExecuteMutationsResponse {
8
- timestamp: DocTimestamp;
9
- idResolutionMap?: IdResolutionMap;
10
- afterDocs: Record<SquidDocId, SquidDocument>;
11
- }
12
- export interface MutateResponse extends Omit<ExecuteMutationsResponse, 'afterDocs'> {
13
- refreshList: Array<SquidDocId>;
14
- }
15
- export type IdResolutionMap = Record<SquidDocId, SquidDocId>;
16
- export type Mutation<T = any> = UpdateMutation<T> | InsertMutation<T> | DeleteMutation;
17
- export type MutationType = 'insert' | 'update' | 'delete';
18
- interface BaseMutation {
19
- type: MutationType;
20
- squidDocIdObj: SquidDocIdObj;
21
- }
22
- export interface DeleteMutation extends BaseMutation {
23
- type: 'delete';
24
- }
25
- export interface UpdateMutation<T = any> extends BaseMutation {
26
- type: 'update';
27
- properties: {
28
- [key in keyof T & string]?: Array<PropertyMutation<T[key]>>;
29
- };
30
- }
31
- export interface InsertMutation<T = any> extends BaseMutation {
32
- type: 'insert';
33
- properties: T;
34
- }
35
- export type PropertyMutation<Value = any> = ApplyNumericFnPropertyMutation | ApplyStringFnPropertyMutation | ValueUpdatePropertyMutation<Value> | RemovePropertyMutation;
36
- export interface ValueUpdatePropertyMutation<Value = any> {
37
- type: 'update';
38
- value: Value;
39
- }
40
- export interface ApplyNumericFnPropertyMutation {
41
- type: 'applyNumericFn';
42
- fn: 'increment';
43
- value: number;
44
- }
45
- export interface RemovePropertyMutation {
46
- type: 'removeProperty';
47
- }
48
- interface ApplyExtendString {
49
- type: 'applyStringFn';
50
- fn: 'extendString';
51
- value: string;
52
- }
53
- interface ApplyTrimString {
54
- type: 'applyStringFn';
55
- fn: 'trim';
56
- }
57
- export type ApplyStringFnPropertyMutation = ApplyExtendString | ApplyTrimString;
58
- export declare function sortUpdateMutationProperties(updateMutation: UpdateMutation): Array<[FieldName, Array<PropertyMutation>]>;
59
- export declare function mergeMutations(mutationA: Mutation, mutationB: Mutation): Mutation;
60
- export declare function applyUpdateMutation<T extends SquidDocument>(doc: T, updateMutation: UpdateMutation<T>): T | undefined;
61
- export declare function convertInsertToUpdate(insertMutation: InsertMutation): UpdateMutation;
62
- export declare function reduceMutations(mutations: Array<Mutation<unknown>>): Array<Mutation<unknown>>;
63
- export {};
@@ -1,143 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.reduceMutations = exports.convertInsertToUpdate = exports.applyUpdateMutation = exports.mergeMutations = exports.sortUpdateMutationProperties = void 0;
4
- const assertic_1 = require("assertic");
5
- const _ = require("lodash");
6
- const rxjs_1 = require("rxjs");
7
- const object_1 = require("../utils/object");
8
- function applyStringFn(initialValue, propertyMutation) {
9
- switch (propertyMutation.fn) {
10
- case 'trim':
11
- if (typeof initialValue !== 'string')
12
- return initialValue;
13
- return initialValue.trim();
14
- case 'extendString':
15
- if (initialValue === null || initialValue === undefined)
16
- return propertyMutation.value;
17
- return initialValue + propertyMutation.value;
18
- default:
19
- throw new Error('Unknown string function: ' + JSON.stringify(propertyMutation));
20
- }
21
- }
22
- function applyNumericFn(initialValue, propertyMutation) {
23
- switch (propertyMutation.fn) {
24
- case 'increment':
25
- if (initialValue === null || initialValue === undefined)
26
- return propertyMutation.value;
27
- return initialValue + propertyMutation.value;
28
- default:
29
- throw new Error('Unknown numeric function: ' + JSON.stringify(propertyMutation));
30
- }
31
- }
32
- function applyPropertyMutation(property, propertyMutation) {
33
- switch (propertyMutation.type) {
34
- case 'applyNumericFn':
35
- return applyNumericFn(property, propertyMutation);
36
- case 'applyStringFn':
37
- return applyStringFn(property, propertyMutation);
38
- case 'update':
39
- return typeof propertyMutation.value === 'object' ? _.cloneDeep(propertyMutation.value) : propertyMutation.value;
40
- case 'removeProperty':
41
- return undefined;
42
- default:
43
- throw new Error('Unknown property mutation type: ' + JSON.stringify(propertyMutation));
44
- }
45
- }
46
- function sortUpdateMutationProperties(updateMutation) {
47
- return Object.entries(updateMutation.properties).sort(([propA], [propB]) => {
48
- const propADots = propA.split('.').length;
49
- const propBDots = propB.split('.').length;
50
- return propADots - propBDots;
51
- });
52
- }
53
- exports.sortUpdateMutationProperties = sortUpdateMutationProperties;
54
- function mergeMutations(mutationA, mutationB) {
55
- if (mutationB.type === 'insert')
56
- return mutationB;
57
- if (mutationB.type === 'delete')
58
- return mutationB;
59
- if (mutationA.type === 'delete')
60
- throw new Error('Cannot delete and then update');
61
- (0, assertic_1.assertTruthy)(mutationB.type === 'update', 'Invalid mutation type');
62
- if (mutationA.type === 'update')
63
- return mergeUpdateMutations(mutationA, mutationB);
64
- const result = _.cloneDeep(mutationA);
65
- for (const [fieldName, propertyMutationsAr] of sortUpdateMutationProperties(mutationB)) {
66
- const propertyMutations = propertyMutationsAr;
67
- for (const propertyMutation of propertyMutations) {
68
- const value = applyPropertyMutation((0, object_1.getInPath)(result.properties, fieldName), propertyMutation);
69
- if (value === undefined) {
70
- (0, object_1.deleteInPath)(result.properties, fieldName);
71
- }
72
- else {
73
- (0, object_1.setInPath)(result.properties, fieldName, value);
74
- }
75
- }
76
- }
77
- return result;
78
- }
79
- exports.mergeMutations = mergeMutations;
80
- function mergeUpdateMutations(mutationA, mutationB) {
81
- const result = _.cloneDeep(mutationA);
82
- mutationB = _.cloneDeep(mutationB);
83
- for (const [aPropName] of sortUpdateMutationProperties(result)) {
84
- const aPropNameDots = aPropName.split('.').length;
85
- const isOverriddenByMutationB = Object.entries(mutationB.properties).some(([bPropName]) => {
86
- return aPropName.startsWith(bPropName + '.') && aPropNameDots > bPropName.split('.').length;
87
- });
88
- if (isOverriddenByMutationB) {
89
- delete result.properties[aPropName];
90
- }
91
- }
92
- for (const [bPropName, bPropValues] of sortUpdateMutationProperties(mutationB)) {
93
- result.properties[bPropName] = [...(result.properties[bPropName] || []), ...bPropValues];
94
- }
95
- return result;
96
- }
97
- function applyUpdateMutation(doc, updateMutation) {
98
- if (!doc)
99
- return undefined;
100
- const result = Object.assign({}, doc);
101
- const entries = sortUpdateMutationProperties(updateMutation);
102
- for (const [fieldName, propertyMutationsAr] of entries) {
103
- const propertyMutations = propertyMutationsAr;
104
- for (const propertyMutation of propertyMutations) {
105
- const value = applyPropertyMutation((0, object_1.getInPath)(result, fieldName), propertyMutation);
106
- if (value === undefined) {
107
- (0, object_1.deleteInPath)(result, fieldName);
108
- }
109
- else {
110
- (0, object_1.setInPath)(result, fieldName, value);
111
- }
112
- }
113
- }
114
- return result;
115
- }
116
- exports.applyUpdateMutation = applyUpdateMutation;
117
- function convertInsertToUpdate(insertMutation) {
118
- const result = {
119
- type: 'update',
120
- squidDocIdObj: insertMutation.squidDocIdObj,
121
- properties: {},
122
- };
123
- for (const [key, value] of Object.entries(insertMutation.properties)) {
124
- result.properties[key] = [{ type: 'update', value }];
125
- }
126
- return result;
127
- }
128
- exports.convertInsertToUpdate = convertInsertToUpdate;
129
- function reduceMutations(mutations) {
130
- let result = [];
131
- (0, rxjs_1.from)(mutations)
132
- .pipe((0, rxjs_1.groupBy)(mutation => {
133
- return `${mutation.squidDocIdObj.integrationId}${mutation.squidDocIdObj.collectionName}/${mutation.squidDocIdObj.docId}`;
134
- }), (0, rxjs_1.mergeMap)(mutationsGroup => mutationsGroup.pipe((0, rxjs_1.reduce)((mutationA, mutationB) => {
135
- return mergeMutations(mutationA, mutationB);
136
- }))), (0, rxjs_1.toArray)())
137
- .subscribe(value => {
138
- result = value;
139
- });
140
- return result;
141
- }
142
- exports.reduceMutations = reduceMutations;
143
- //# sourceMappingURL=mutation.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mutation.types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/mutation.types.ts"],"names":[],"mappings":";;;AAAA,uCAAwC;AACxC,4BAA4B;AAC5B,+BAAgE;AAGhE,4CAAqE;AAyFrE,SAAS,aAAa,CACpB,YAAgC,EAChC,gBAA+C;IAE/C,QAAQ,gBAAgB,CAAC,EAAE,EAAE;QAC3B,KAAK,MAAM;YACT,IAAI,OAAO,YAAY,KAAK,QAAQ;gBAAE,OAAO,YAAY,CAAC;YAC1D,OAAO,YAAY,CAAC,IAAI,EAAE,CAAC;QAC7B,KAAK,cAAc;YACjB,IAAI,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,SAAS;gBAAE,OAAO,gBAAgB,CAAC,KAAK,CAAC;YACvF,OAAO,YAAY,GAAG,gBAAgB,CAAC,KAAK,CAAC;QAC/C;YACE,MAAM,IAAI,KAAK,CAAC,2BAA2B,GAAG,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC;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AAQ,EAAC,cAAc,CAAC,EAAE,CACxB,cAAc,CAAC,IAAI,CACjB,IAAA,aAAM,EAAC,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE;QAC9B,OAAO,cAAc,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAC9C,CAAC,CAAC,CACH,CACF,EACD,IAAA,cAAO,GAAE,CACV;SACA,SAAS,CAAC,KAAK,CAAC,EAAE;QACjB,MAAM,GAAG,KAAK,CAAC;IACjB,CAAC,CAAC,CAAC;IACL,OAAO,MAAM,CAAC;AAChB,CAAC;AApBD,0CAoBC"}
@@ -1,7 +0,0 @@
1
- import { ClientId } from './communication.types';
2
- export declare class NativeQueryContext {
3
- readonly query: string;
4
- readonly params: Record<string, any>;
5
- readonly clientId: ClientId;
6
- constructor(query: string, params: Record<string, any>, clientId: ClientId);
7
- }
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NativeQueryContext = void 0;
4
- class NativeQueryContext {
5
- constructor(query, params, clientId) {
6
- this.query = query;
7
- this.params = params;
8
- this.clientId = clientId;
9
- }
10
- }
11
- exports.NativeQueryContext = NativeQueryContext;
12
- //# sourceMappingURL=native-query.context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"native-query.context.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/native-query.context.ts"],"names":[],"mappings":";;;AAGA,MAAa,kBAAkB;IAE7B,YAAqB,KAAa,EAAW,MAA2B,EAAW,QAAkB;QAAhF,UAAK,GAAL,KAAK,CAAQ;QAAW,WAAM,GAAN,MAAM,CAAqB;QAAW,aAAQ,GAAR,QAAQ,CAAU;IAAG,CAAC;CAC1G;AAHD,gDAGC"}
@@ -1,26 +0,0 @@
1
- export interface OpenApiController {
2
- actions: OpenApiAction[];
3
- modulePath: string;
4
- name: string;
5
- path: string;
6
- }
7
- export interface OpenApiAction {
8
- fullPath: string;
9
- method: OpenApiHttpMethod;
10
- name: string;
11
- parameters: Record<string, OpenApiParameter>;
12
- path: string;
13
- uploadFile: boolean;
14
- uploadFiles: boolean;
15
- security: any[];
16
- successStatus: string | null;
17
- }
18
- export interface OpenApiParameter {
19
- in: OpenApiParameterLocation;
20
- name: string;
21
- required?: boolean;
22
- dataType?: string;
23
- ref?: string;
24
- }
25
- export type OpenApiHttpMethod = 'get' | 'post' | 'put' | 'delete';
26
- export type OpenApiParameterLocation = 'path' | 'query' | 'header' | 'body';
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=openapi.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"openapi.types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/openapi.types.ts"],"names":[],"mappings":""}
@@ -1,47 +0,0 @@
1
- import { FieldSort, Operator, Query, SimpleCondition } from './query.types';
2
- import { DeepRecord, FieldOf, PartialBy, Paths } from './types';
3
- import { CollectionName, DocumentData } from './document.types';
4
- import { IntegrationId } from './communication.types';
5
- export declare class QueryContext<T extends DocumentData = any> {
6
- readonly query: Query<T>;
7
- private readonly parsedConditions;
8
- constructor(query: Query<T>);
9
- get integrationId(): IntegrationId;
10
- get collectionName(): CollectionName;
11
- get limit(): number;
12
- sortedBy(sorts: Array<PartialBy<FieldSort<T>, 'asc'>>): boolean;
13
- sortedByExact(sorts: Array<PartialBy<FieldSort<T>, 'asc'>>): boolean;
14
- isSubqueryOf<F extends Paths<T>, O extends AllOperators>(fieldName: F, operator: O, value: GenericValue<T, F, O> | null): boolean;
15
- isSubqueryOfCondition(condition: GeneralCondition<T>): boolean;
16
- isSubqueryOfConditions(conditions: GeneralConditions<T>): boolean;
17
- isSubqueryOfQuery(query: Query<T>): boolean;
18
- getConditionsFor<K extends Paths<T>>(...fieldNames: Array<K>): ContextConditions<T, K>;
19
- getConditionsForField<K extends Paths<T>>(fieldName: K): ContextConditions<T>;
20
- documentMatchesQuery(doc: DocumentData): boolean;
21
- private evaluateSubset;
22
- private evaluateIncludes;
23
- private parseConditions;
24
- }
25
- export type ContextConditions<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> = Array<ContextCondition<Doc, F>>;
26
- type ContextCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> = InContextCondition<Doc, F> | NotInContextCondition<Doc, F> | OtherContextCondition<Doc, F>;
27
- interface InContextCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> extends SimpleCondition<Doc, F, 'in'> {
28
- operator: 'in';
29
- value: Array<FieldOf<DeepRecord<Doc>, Paths<Doc>> | any>;
30
- }
31
- interface NotInContextCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> extends SimpleCondition<Doc, F, 'not in'> {
32
- operator: 'not in';
33
- value: Array<FieldOf<DeepRecord<Doc>, Paths<Doc>> | any>;
34
- }
35
- interface OtherContextCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> extends SimpleCondition<Doc, F, Exclude<ContextOperator, 'in' | 'not in'>> {
36
- operator: Exclude<ContextOperator, 'in' | 'not in'>;
37
- value: FieldOf<DeepRecord<Doc>, Paths<Doc>> | any;
38
- }
39
- interface GeneralCondition<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> extends SimpleCondition<Doc, F, AllOperators> {
40
- operator: AllOperators;
41
- value: any;
42
- }
43
- type GeneralConditions<Doc extends DocumentData = any, F extends Paths<Doc> = Paths<Doc>> = Array<GeneralCondition<Doc, F>>;
44
- type ContextOperator = Exclude<Operator, '==' | '!='> | 'in' | 'not in';
45
- type AllOperators = Operator | 'in' | 'not in';
46
- type GenericValue<Doc = any, F extends Paths<Doc> = Paths<Doc>, O extends AllOperators = any> = O extends 'in' ? Array<DeepRecord<Doc>[F]> | null : O extends 'not in' ? Array<DeepRecord<Doc>[F]> | null : DeepRecord<Doc>[F] | null;
47
- export {};