@fraym/projections 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { AuthData as PbAuthData } from "@fraym/projections-proto";
1
+ import { AuthData as PbAuthData } from "@fraym/proto/freym/projections/delivery";
2
2
  export interface AuthData {
3
3
  tenantId: string;
4
4
  scopes: string[];
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.newDeliveryClient = void 0;
4
- const projections_proto_1 = require("@fraym/projections-proto");
4
+ const delivery_1 = require("@fraym/proto/freym/projections/delivery");
5
5
  const grpc_js_1 = require("@grpc/grpc-js");
6
6
  const config_1 = require("../config/config");
7
7
  const getData_1 = require("./getData");
@@ -10,7 +10,7 @@ const upsert_1 = require("./upsert");
10
10
  const delete_1 = require("./delete");
11
11
  const newDeliveryClient = async (config) => {
12
12
  config = (0, config_1.useDeliveryConfigDefaults)(config);
13
- const serviceClient = new projections_proto_1.DeliveryServiceClient(config.serverAddress, grpc_js_1.credentials.createInsecure(), {
13
+ const serviceClient = new delivery_1.ServiceClient(config.serverAddress, grpc_js_1.credentials.createInsecure(), {
14
14
  "grpc.keepalive_time_ms": config.keepaliveInterval,
15
15
  "grpc.keepalive_timeout_ms": config.keepaliveTimeout,
16
16
  "grpc.keepalive_permit_without_calls": 1,
@@ -1,5 +1,5 @@
1
- import { DeliveryServiceClient } from "@fraym/projections-proto";
1
+ import { ServiceClient } from "@fraym/proto/freym/projections/delivery";
2
2
  import { AuthData } from "./auth";
3
3
  import { EventMetadata } from "./eventMetadata";
4
4
  import { Filter } from "./filter";
5
- export declare const deleteProjectionData: (projection: string, auth: AuthData, dataId: string, filter: Filter, eventMetadata: EventMetadata, serviceClient: DeliveryServiceClient) => Promise<number>;
5
+ export declare const deleteProjectionData: (projection: string, auth: AuthData, dataId: string, filter: Filter, eventMetadata: EventMetadata, serviceClient: ServiceClient) => Promise<number>;
@@ -1,4 +1,4 @@
1
- import { DataFilter } from "@fraym/projections-proto";
1
+ import { DataFilter } from "@fraym/proto/freym/projections/delivery";
2
2
  export interface Filter {
3
3
  fields: Record<string, FieldFilter>;
4
4
  and: Filter[];
@@ -1,5 +1,5 @@
1
- import { DeliveryServiceClient } from "@fraym/projections-proto";
1
+ import { ServiceClient } from "@fraym/proto/freym/projections/delivery";
2
2
  import { AuthData } from "./auth";
3
3
  import { Filter } from "./filter";
4
4
  import { Wait } from "./wait";
5
- export declare const getProjectionData: <T extends {}>(projection: string, auth: AuthData, dataId: string, filter: Filter, returnEmptyDataIfNotFound: boolean, serviceClient: DeliveryServiceClient, wait?: Wait) => Promise<T | null>;
5
+ export declare const getProjectionData: <T extends {}>(projection: string, auth: AuthData, dataId: string, filter: Filter, returnEmptyDataIfNotFound: boolean, serviceClient: ServiceClient, wait?: Wait) => Promise<T | null>;
@@ -1,4 +1,4 @@
1
- import { DeliveryServiceClient } from "@fraym/projections-proto";
1
+ import { ServiceClient } from "@fraym/proto/freym/projections/delivery";
2
2
  import { AuthData } from "./auth";
3
3
  import { Filter } from "./filter";
4
4
  import { Order } from "./order";
@@ -8,4 +8,4 @@ export interface GetProjectionDataList<T extends {}> {
8
8
  total: number;
9
9
  data: T[];
10
10
  }
11
- export declare const getProjectionDataList: <T extends {}>(projection: string, auth: AuthData, limit: number, page: number, filter: Filter, order: Order[], serviceClient: DeliveryServiceClient) => Promise<GetProjectionDataList<T> | null>;
11
+ export declare const getProjectionDataList: <T extends {}>(projection: string, auth: AuthData, limit: number, page: number, filter: Filter, order: Order[], serviceClient: ServiceClient) => Promise<GetProjectionDataList<T> | null>;
@@ -1,4 +1,4 @@
1
- import { DataOrder } from "@fraym/projections-proto";
1
+ import { DataOrder } from "@fraym/proto/freym/projections/delivery";
2
2
  export interface Order {
3
3
  field: string;
4
4
  descending?: boolean;
@@ -1,4 +1,4 @@
1
- import { DeliveryServiceClient } from "@fraym/projections-proto";
1
+ import { ServiceClient } from "@fraym/proto/freym/projections/delivery";
2
2
  import { AuthData } from "./auth";
3
3
  import { EventMetadata } from "./eventMetadata";
4
4
  export type UpsertResponse<T extends {}> = UpsertSuccessResponse<T> | UpsertValidationResponse;
@@ -12,4 +12,4 @@ export interface UpsertValidationResponse {
12
12
  }
13
13
  export declare const isUpsertSuccessResponse: <T extends {}>(response: UpsertResponse<T>) => response is UpsertSuccessResponse<T>;
14
14
  export declare const isUpsertValidationResponse: <T extends {}>(response: UpsertResponse<T>) => response is UpsertValidationResponse;
15
- export declare const upsertProjectionData: <T extends {}>(projection: string, auth: AuthData, dataId: string, payload: Record<string, any>, eventMetadata: EventMetadata, serviceClient: DeliveryServiceClient) => Promise<UpsertResponse<T>>;
15
+ export declare const upsertProjectionData: <T extends {}>(projection: string, auth: AuthData, dataId: string, payload: Record<string, any>, eventMetadata: EventMetadata, serviceClient: ServiceClient) => Promise<UpsertResponse<T>>;
@@ -1,4 +1,4 @@
1
- import { DataWait } from "@fraym/projections-proto";
1
+ import { DataWait } from "@fraym/proto/freym/projections/delivery";
2
2
  import { Filter } from "./filter";
3
3
  export interface Wait {
4
4
  timeout?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fraym/projections",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://github.com/fraym/projections-nodejs",
6
6
  "repository": {
@@ -20,24 +20,27 @@
20
20
  "files": [
21
21
  "dist/**/*"
22
22
  ],
23
+ "engines": {
24
+ "node": ">=16"
25
+ },
23
26
  "main": "dist/index.js",
24
27
  "types": "dist/index.d.ts",
25
28
  "dependencies": {
26
- "@fraym/projections-proto": "^1.0.0",
29
+ "@fraym/proto": "^0.3.0",
27
30
  "@graphql-tools/graphql-file-loader": "^7.5.17",
28
31
  "@graphql-tools/load": "^7.8.14",
29
- "@grpc/grpc-js": "^1.8.18",
32
+ "@grpc/grpc-js": "^1.9.7",
30
33
  "dotenv": "^16.3.1",
31
- "graphql": "^16.7.1",
34
+ "graphql": "^16.8.1",
32
35
  "yargs": "^17.7.2"
33
36
  },
34
37
  "devDependencies": {
35
38
  "@becklyn/prettier": "^1.0.2",
36
- "@types/uuid": "^9.0.2",
37
- "@types/yargs": "^17.0.24",
39
+ "@types/uuid": "^9.0.6",
40
+ "@types/yargs": "^17.0.29",
38
41
  "prettier": "^2.8.8",
39
- "typescript": "^5.1.6",
40
- "uuid": "^9.0.0"
42
+ "typescript": "^5.2.2",
43
+ "uuid": "^9.0.1"
41
44
  },
42
45
  "prettier": "@becklyn/prettier"
43
46
  }