@squidcloud/client 1.0.3 → 1.0.5

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 (84) hide show
  1. package/{common → dist/common}/src/api.types.d.ts +0 -0
  2. package/{common → dist/common}/src/application.schemas.d.ts +0 -0
  3. package/{common → dist/common}/src/application.types.d.ts +0 -0
  4. package/{common → dist/common}/src/backend-function.schemas.d.ts +0 -0
  5. package/{common → dist/common}/src/backend-function.types.d.ts +0 -0
  6. package/{common → dist/common}/src/bundle-api.types.d.ts +0 -0
  7. package/{common → dist/common}/src/bundle-data.types.d.ts +0 -0
  8. package/{common → dist/common}/src/communication.types.d.ts +0 -0
  9. package/{common → dist/common}/src/context.types.d.ts +0 -0
  10. package/{common → dist/common}/src/document.types.d.ts +0 -0
  11. package/{common → dist/common}/src/graphql.types.d.ts +0 -0
  12. package/{common → dist/common}/src/http-status.enum.d.ts +0 -0
  13. package/{common → dist/common}/src/index.d.ts +2 -1
  14. package/{common → dist/common}/src/integration.types.d.ts +0 -0
  15. package/{common → dist/common}/src/logger.types.d.ts +0 -0
  16. package/{common → dist/common}/src/metrics.schemas.d.ts +0 -0
  17. package/{common → dist/common}/src/metrics.types.d.ts +0 -0
  18. package/{common → dist/common}/src/mutation.context.d.ts +0 -0
  19. package/{common → dist/common}/src/mutation.schemas.d.ts +0 -0
  20. package/{common → dist/common}/src/mutation.types.d.ts +6 -2
  21. package/{common → dist/common}/src/named-query.schemas.d.ts +0 -0
  22. package/{common → dist/common}/src/named-query.types.d.ts +0 -0
  23. package/{common → dist/common}/src/query/index.d.ts +0 -0
  24. package/{common → dist/common}/src/query/query-context.d.ts +0 -0
  25. package/{common → dist/common}/src/query/simple-query-builder.d.ts +0 -0
  26. package/{common → dist/common}/src/query.schemas.d.ts +0 -0
  27. package/{common → dist/common}/src/query.types.d.ts +0 -0
  28. package/{common → dist/common}/src/schema/schema.types.d.ts +10 -0
  29. package/{common → dist/common}/src/secret.schemas.d.ts +0 -0
  30. package/{common → dist/common}/src/secret.types.d.ts +0 -0
  31. package/{common → dist/common}/src/socket.schemas.d.ts +0 -0
  32. package/{common → dist/common}/src/socket.types.d.ts +0 -0
  33. package/{common → dist/common}/src/time-units.d.ts +0 -0
  34. package/{common → dist/common}/src/trigger.types.d.ts +0 -0
  35. package/{common → dist/common}/src/types.d.ts +0 -0
  36. package/{common → dist/common}/src/utils/array.d.ts +0 -0
  37. package/{common → dist/common}/src/utils/assert.d.ts +0 -0
  38. package/{common → dist/common}/src/utils/error.d.ts +0 -0
  39. package/dist/common/src/utils/isDefined.d.ts +1 -0
  40. package/{common → dist/common}/src/utils/lock.manager.d.ts +0 -0
  41. package/{common → dist/common}/src/utils/object.d.ts +2 -0
  42. package/{common → dist/common}/src/utils/serialization.d.ts +0 -0
  43. package/{common → dist/common}/src/utils/url.d.ts +0 -0
  44. package/{common → dist/common}/src/utils/validation.d.ts +0 -0
  45. package/dist/index.js +12 -0
  46. package/dist/index.js.LICENSE.txt +47 -0
  47. package/dist/node_modules/json-schema-typed/draft-2020-12.d.ts +1239 -0
  48. package/dist/package.json +68 -0
  49. package/{typescript-client → dist/typescript-client}/src/api.manager.d.ts +0 -0
  50. package/{typescript-client → dist/typescript-client}/src/backend-function.manager.d.ts +0 -0
  51. package/{typescript-client → dist/typescript-client}/src/collection-reference.d.ts +3 -2
  52. package/{typescript-client → dist/typescript-client}/src/collection-reference.factory.d.ts +4 -1
  53. package/{typescript-client → dist/typescript-client}/src/data.manager.d.ts +9 -2
  54. package/{typescript-client → dist/typescript-client}/src/db.dao.d.ts +1 -0
  55. package/{typescript-client → dist/typescript-client}/src/destruct.manager.d.ts +0 -0
  56. package/dist/typescript-client/src/document-identity.service.d.ts +12 -0
  57. package/{typescript-client → dist/typescript-client}/src/document-reference.d.ts +5 -3
  58. package/{typescript-client → dist/typescript-client}/src/document-reference.factory.d.ts +0 -0
  59. package/{typescript-client → dist/typescript-client}/src/graphql-client.d.ts +0 -0
  60. package/{typescript-client → dist/typescript-client}/src/graphql-client.factory.d.ts +0 -0
  61. package/{typescript-client → dist/typescript-client}/src/index.d.ts +0 -0
  62. package/{typescript-client → dist/typescript-client}/src/mutation/mutation-sender.d.ts +3 -3
  63. package/{typescript-client → dist/typescript-client}/src/mutation/mutation.spec.d.ts +0 -0
  64. package/{typescript-client → dist/typescript-client}/src/named-query.manager.d.ts +0 -0
  65. package/{typescript-client → dist/typescript-client}/src/query/query-builder.factory.d.ts +5 -2
  66. package/{typescript-client → dist/typescript-client}/src/query/query-subscription.manager.d.ts +4 -1
  67. package/{typescript-client → dist/typescript-client}/src/query/query-subscription.manager.spec.d.ts +0 -0
  68. package/{typescript-client → dist/typescript-client}/src/query/query.spec.d.ts +0 -0
  69. package/{typescript-client → dist/typescript-client}/src/query/query.types.d.ts +0 -0
  70. package/{typescript-client → dist/typescript-client}/src/rpc.manager.d.ts +0 -0
  71. package/{typescript-client → dist/typescript-client}/src/socket.manager.d.ts +0 -0
  72. package/{typescript-client → dist/typescript-client}/src/squid.d.ts +2 -1
  73. package/{typescript-client → dist/typescript-client}/src/state/action.applier.d.ts +0 -0
  74. package/{typescript-client → dist/typescript-client}/src/state/actions.d.ts +0 -0
  75. package/{typescript-client → dist/typescript-client}/src/state/path_trie.d.ts +0 -0
  76. package/{typescript-client → dist/typescript-client}/src/state/state.service.d.ts +0 -0
  77. package/{typescript-client → dist/typescript-client}/src/state/state.service.spec.d.ts +0 -0
  78. package/{typescript-client → dist/typescript-client}/src/testing/fake-rpc.manager.d.ts +0 -0
  79. package/{typescript-client → dist/typescript-client}/src/testing/fake-socket.manager.d.ts +0 -0
  80. package/{typescript-client → dist/typescript-client}/src/testing/setup-tests.d.ts +0 -0
  81. package/{typescript-client → dist/typescript-client}/src/testing/squid-env-setup.d.ts +2 -0
  82. package/{typescript-client → dist/typescript-client}/src/types.d.ts +0 -0
  83. package/package.json +12 -7
  84. package/index.js +0 -12
File without changes
File without changes
File without changes
File without changes
@@ -32,9 +32,10 @@ export * from './trigger.types';
32
32
  export * from './types';
33
33
  export * from './utils/array';
34
34
  export * from './utils/assert';
35
+ export * from './utils/error';
36
+ export * from './utils/isDefined';
35
37
  export * from './utils/lock.manager';
36
38
  export * from './utils/object';
37
39
  export * from './utils/serialization';
38
40
  export * from './utils/validation';
39
- export * from './utils/error';
40
41
  export * from './utils/url';
File without changes
File without changes
File without changes
@@ -1,13 +1,17 @@
1
1
  import { ClientId, IntegrationId } from './communication.types';
2
- import { DocTimestamp, DocType, FieldName, FullDocId } from './document.types';
2
+ import { DocTimestamp, DocType, FieldName, FullDocId, FullDocIdStr } from './document.types';
3
3
  export interface MutateRequest<T = any> {
4
4
  clientId: ClientId;
5
5
  integrationId: IntegrationId;
6
6
  mutations: Array<Mutation<T>>;
7
7
  }
8
- export interface MutateResponse {
8
+ export interface ExecuteMutationsResponse {
9
9
  timestamp: DocTimestamp;
10
+ idResolutionMap?: IdResolutionMap;
11
+ afterDocs: Record<FullDocIdStr, DocType>;
10
12
  }
13
+ export type MutateResponse = Omit<ExecuteMutationsResponse, 'afterDocs'>;
14
+ export type IdResolutionMap = Record<FullDocIdStr, FullDocIdStr>;
11
15
  export type Mutation<T = any> = UpdateMutation<T> | InsertMutation<T> | DeleteMutation;
12
16
  export type MutationType = 'insert' | 'update' | 'delete';
13
17
  interface BaseMutation {
File without changes
File without changes
File without changes
@@ -24,6 +24,16 @@ type ConvertDeep<T extends JSONSchema> = Exclude<T, boolean> & {
24
24
  export type PropertySchema = ConvertDeep<JSONSchema>;
25
25
  export type TopLevelPropertySchema = PropertySchema & {
26
26
  primaryKey?: boolean;
27
+ /**
28
+ * Whether the property is computed based on other properties or some formula.
29
+ * If true, readonly also needs to be true and this field should not be part of an insert statement.
30
+ */
31
+ isComputed?: boolean;
32
+ /**
33
+ * Whether the default value generated by the database. CURRENT_DATE is something generated by the database vs
34
+ * 'Hello' which is a constant.
35
+ */
36
+ isDefaultComputed?: boolean;
27
37
  };
28
38
  export type CollectionSchema = ConvertDeep<JSONSchema> & {
29
39
  properties?: Record<string, TopLevelPropertySchema>;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1 @@
1
+ export declare function isDefined<T>(t: T | undefined | null): t is T;
@@ -2,3 +2,5 @@ export declare function getInPath(obj: any, path: string): any;
2
2
  export declare function setInPath(obj: any, path: string, value: any): void;
3
3
  export declare function deleteInPath(obj: any, path: string): void;
4
4
  export declare function deepReplace(obj: any, keyName: string, replacer: (from: any) => any): void;
5
+ export declare function replaceKeyInMap<K, T>(map: Map<K, T | undefined>, a: K, b: K): void;
6
+ export declare function replaceKeyInRecord<K extends keyof any, T>(record: Record<K, T>, a: K, b: K): void;
File without changes