@conduitplatform/grpc-sdk 0.16.8 → 0.16.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -128,10 +128,10 @@ export declare const RouterDefinition: {
128
128
  readonly requestStream: false;
129
129
  readonly responseType: {
130
130
  encode(_: Empty, writer?: _m0.Writer): _m0.Writer;
131
- decode(input: Uint8Array | _m0.Reader, length?: number | undefined): Empty;
131
+ decode(input: _m0.Reader | Uint8Array, length?: number): Empty;
132
132
  fromJSON(_: any): Empty;
133
133
  toJSON(_: Empty): unknown;
134
- create(base?: {} | undefined): Empty;
134
+ create(base?: {}): Empty;
135
135
  fromPartial(_: {}): Empty;
136
136
  };
137
137
  readonly responseStream: false;
@@ -150,10 +150,10 @@ export declare const RouterDefinition: {
150
150
  readonly requestStream: false;
151
151
  readonly responseType: {
152
152
  encode(_: Empty, writer?: _m0.Writer): _m0.Writer;
153
- decode(input: Uint8Array | _m0.Reader, length?: number | undefined): Empty;
153
+ decode(input: _m0.Reader | Uint8Array, length?: number): Empty;
154
154
  fromJSON(_: any): Empty;
155
155
  toJSON(_: Empty): unknown;
156
- create(base?: {} | undefined): Empty;
156
+ create(base?: {}): Empty;
157
157
  fromPartial(_: {}): Empty;
158
158
  };
159
159
  readonly responseStream: false;
@@ -172,10 +172,10 @@ export declare const RouterDefinition: {
172
172
  readonly requestStream: false;
173
173
  readonly responseType: {
174
174
  encode(_: Empty, writer?: _m0.Writer): _m0.Writer;
175
- decode(input: Uint8Array | _m0.Reader, length?: number | undefined): Empty;
175
+ decode(input: _m0.Reader | Uint8Array, length?: number): Empty;
176
176
  fromJSON(_: any): Empty;
177
177
  toJSON(_: Empty): unknown;
178
- create(base?: {} | undefined): Empty;
178
+ create(base?: {}): Empty;
179
179
  fromPartial(_: {}): Empty;
180
180
  };
181
181
  readonly responseStream: false;
@@ -13,7 +13,7 @@ export interface GetFileUrlResponse {
13
13
  url: string;
14
14
  }
15
15
  export interface CreateFileRequest {
16
- name: string;
16
+ name?: string | undefined;
17
17
  data: string;
18
18
  isPublic: boolean;
19
19
  folder?: string | undefined;
@@ -21,6 +21,7 @@ export interface CreateFileRequest {
21
21
  mimeType?: string | undefined;
22
22
  userId?: string | undefined;
23
23
  scope?: string | undefined;
24
+ alias?: string | undefined;
24
25
  }
25
26
  export interface UpdateFileRequest {
26
27
  id: string;
@@ -31,6 +32,7 @@ export interface UpdateFileRequest {
31
32
  mimeType?: string | undefined;
32
33
  userId?: string | undefined;
33
34
  scope?: string | undefined;
35
+ alias?: string | undefined;
34
36
  }
35
37
  export interface FileResponse {
36
38
  id: string;
@@ -44,7 +46,7 @@ export interface DeleteFileResponse {
44
46
  success: boolean;
45
47
  }
46
48
  export interface CreateFileByUrlRequest {
47
- name: string;
49
+ name?: string | undefined;
48
50
  isPublic: boolean;
49
51
  folder?: string | undefined;
50
52
  container?: string | undefined;
@@ -53,6 +55,7 @@ export interface CreateFileByUrlRequest {
53
55
  size?: number | undefined;
54
56
  userId?: string | undefined;
55
57
  scope?: string | undefined;
58
+ alias?: string | undefined;
56
59
  }
57
60
  export interface FileByUrlResponse {
58
61
  id: string;
@@ -70,6 +73,7 @@ export interface UpdateFileByUrlRequest {
70
73
  size?: number | undefined;
71
74
  userId?: string | undefined;
72
75
  scope?: string | undefined;
76
+ alias?: string | undefined;
73
77
  }
74
78
  export declare const GetFileRequest: {
75
79
  encode(message: GetFileRequest, writer?: _m0.Writer): _m0.Writer;
@@ -1,5 +1,6 @@
1
1
  import { Metadata, status } from '@grpc/grpc-js';
2
2
  export * from './db.js';
3
+ export * from './options.js';
3
4
  export type GrpcRequest<T> = {
4
5
  request: T;
5
6
  metadata?: Metadata;
@@ -0,0 +1,7 @@
1
+ export type AuthzOptions = {
2
+ userId?: string;
3
+ scope?: string;
4
+ };
5
+ export type PopulateAuthzOptions = {
6
+ populate?: string | string[];
7
+ } & AuthzOptions;
@@ -0,0 +1,3 @@
1
+ import { AuthzOptions, PopulateAuthzOptions } from '../types';
2
+ export declare function normalizeAuthzOptions(userIdOrOptions?: string | AuthzOptions, scope?: string): AuthzOptions;
3
+ export declare function normalizePopulateAuthzOptions(populateOrOptions?: string | string[] | PopulateAuthzOptions, userId?: string, scope?: string): PopulateAuthzOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conduitplatform/grpc-sdk",
3
- "version": "0.16.8",
3
+ "version": "0.16.10",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",
@@ -33,9 +33,9 @@
33
33
  "@grpc/grpc-js": "^1.10.9",
34
34
  "@grpc/proto-loader": "^0.7.6",
35
35
  "@sesamecare-oss/redlock": "^1.2.0",
36
- "abort-controller-x": "^0.4.1",
36
+ "abort-controller-x": "^0.4.3",
37
37
  "convict": "^6.2.4",
38
- "express": "^4.19.2",
38
+ "express": "^4.20.0",
39
39
  "fast-jwt": "^3.3.2",
40
40
  "fs-extra": "^11.2.0",
41
41
  "ioredis": "^5.3.2",
@@ -43,7 +43,7 @@
43
43
  "lodash-es": "^4.17.21",
44
44
  "nice-grpc": "^2.1.7",
45
45
  "nice-grpc-client-middleware-retry": "^3",
46
- "prom-client": "^15.1.0",
46
+ "prom-client": "^15.1.3",
47
47
  "protobufjs": "^7.2.6",
48
48
  "winston": "^3.12.0",
49
49
  "winston-loki": "^6.0.8"
@@ -74,11 +74,11 @@
74
74
  "@types/node": "20.11.24",
75
75
  "copyfiles": "^2.4.1",
76
76
  "rimraf": "^5.0.5",
77
- "rollup": "^4.18.0",
77
+ "rollup": "^4.22.4",
78
78
  "ts-node": "^10.9.2",
79
79
  "ts-proto": "^1.167.1",
80
80
  "tslib": "^2.6.3",
81
- "typescript": "~5.3.3"
81
+ "typescript": "~5.6.2"
82
82
  },
83
83
  "peerDependencies": {
84
84
  "@grpc/grpc-js": "^1.10.9"