@conduitplatform/grpc-sdk 0.16.17 → 0.16.19

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.
@@ -12,7 +12,7 @@ export type RawMongoQuery = {
12
12
  find?: object;
13
13
  insertOne?: object;
14
14
  insertMany?: object | object[];
15
- updateOne?: object;
15
+ updateOne?: object | object[];
16
16
  updateMany?: object | object[];
17
17
  options?: object;
18
18
  };
@@ -1,6 +1,11 @@
1
1
  import { allowedTypes, ConduitModel, TYPE } from './Model.js';
2
2
  import { Indexable } from './Indexable.js';
3
- import { ModuleErrorDefinition } from '@conduitplatform/module-tools';
3
+ export interface ModuleErrorDefinition {
4
+ grpcCode: number;
5
+ conduitCode: string;
6
+ message: string;
7
+ description: string;
8
+ }
4
9
  export interface ConduitRouteParameters {
5
10
  params?: Indexable;
6
11
  path?: string;
@@ -1,5 +1,5 @@
1
1
  import { ConduitModule } from '../../classes/index.js';
2
- import { AuthenticationDefinition, TeamDeleteResponse, UserCreateResponse, UserDeleteResponse, UserLoginResponse, Team, ValidateAccessTokenResponse, UserModifyStatusResponse, InvitationDeleteResponse } from '../../protoUtils/index.js';
2
+ import { AuthenticationDefinition, TeamDeleteResponse, UserCreateResponse, UserDeleteResponse, UserLoginResponse, Team, ValidateAccessTokenResponse, UserModifyStatusResponse, InvitationDeleteResponse, InviteUserToTeamResponse } from '../../protoUtils/index.js';
3
3
  import { Indexable } from '../../interfaces';
4
4
  export declare class Authentication extends ConduitModule<typeof AuthenticationDefinition> {
5
5
  private readonly moduleName;
@@ -18,4 +18,6 @@ export declare class Authentication extends ConduitModule<typeof AuthenticationD
18
18
  validateAccessToken(accessToken: string, path?: string): Promise<ValidateAccessTokenResponse>;
19
19
  userModifyStatus(userId: string, active: boolean): Promise<UserModifyStatusResponse>;
20
20
  invitationDelete(teamId: string, email: string): Promise<InvitationDeleteResponse>;
21
+ inviteUserToTeam(teamId: string, email: string, role: string, inviterUserId: string, redirectUri?: string, userData?: Indexable): Promise<InviteUserToTeamResponse>;
22
+ updateTeam(teamId: string, name?: string, newParentTeamId?: string): Promise<Team>;
21
23
  }
@@ -91,6 +91,22 @@ export interface InvitationDeleteRequest {
91
91
  export interface InvitationDeleteResponse {
92
92
  message: string;
93
93
  }
94
+ export interface InviteUserToTeamRequest {
95
+ teamId: string;
96
+ email: string;
97
+ role: string;
98
+ inviterUserId: string;
99
+ redirectUri?: string | undefined;
100
+ userData?: string | undefined;
101
+ }
102
+ export interface InviteUserToTeamResponse {
103
+ invitationToken: string;
104
+ }
105
+ export interface UpdateTeamRequest {
106
+ teamId: string;
107
+ name?: string | undefined;
108
+ newParentTeamId?: string | undefined;
109
+ }
94
110
  export declare const UserLoginRequest: {
95
111
  encode(message: UserLoginRequest, writer?: _m0.Writer): _m0.Writer;
96
112
  decode(input: _m0.Reader | Uint8Array, length?: number): UserLoginRequest;
@@ -259,6 +275,30 @@ export declare const InvitationDeleteResponse: {
259
275
  create(base?: DeepPartial<InvitationDeleteResponse>): InvitationDeleteResponse;
260
276
  fromPartial(object: DeepPartial<InvitationDeleteResponse>): InvitationDeleteResponse;
261
277
  };
278
+ export declare const InviteUserToTeamRequest: {
279
+ encode(message: InviteUserToTeamRequest, writer?: _m0.Writer): _m0.Writer;
280
+ decode(input: _m0.Reader | Uint8Array, length?: number): InviteUserToTeamRequest;
281
+ fromJSON(object: any): InviteUserToTeamRequest;
282
+ toJSON(message: InviteUserToTeamRequest): unknown;
283
+ create(base?: DeepPartial<InviteUserToTeamRequest>): InviteUserToTeamRequest;
284
+ fromPartial(object: DeepPartial<InviteUserToTeamRequest>): InviteUserToTeamRequest;
285
+ };
286
+ export declare const InviteUserToTeamResponse: {
287
+ encode(message: InviteUserToTeamResponse, writer?: _m0.Writer): _m0.Writer;
288
+ decode(input: _m0.Reader | Uint8Array, length?: number): InviteUserToTeamResponse;
289
+ fromJSON(object: any): InviteUserToTeamResponse;
290
+ toJSON(message: InviteUserToTeamResponse): unknown;
291
+ create(base?: DeepPartial<InviteUserToTeamResponse>): InviteUserToTeamResponse;
292
+ fromPartial(object: DeepPartial<InviteUserToTeamResponse>): InviteUserToTeamResponse;
293
+ };
294
+ export declare const UpdateTeamRequest: {
295
+ encode(message: UpdateTeamRequest, writer?: _m0.Writer): _m0.Writer;
296
+ decode(input: _m0.Reader | Uint8Array, length?: number): UpdateTeamRequest;
297
+ fromJSON(object: any): UpdateTeamRequest;
298
+ toJSON(message: UpdateTeamRequest): unknown;
299
+ create(base?: DeepPartial<UpdateTeamRequest>): UpdateTeamRequest;
300
+ fromPartial(object: DeepPartial<UpdateTeamRequest>): UpdateTeamRequest;
301
+ };
262
302
  export type AuthenticationDefinition = typeof AuthenticationDefinition;
263
303
  export declare const AuthenticationDefinition: {
264
304
  readonly name: "Authentication";
@@ -572,6 +612,50 @@ export declare const AuthenticationDefinition: {
572
612
  readonly responseStream: false;
573
613
  readonly options: {};
574
614
  };
615
+ readonly inviteUserToTeam: {
616
+ readonly name: "InviteUserToTeam";
617
+ readonly requestType: {
618
+ encode(message: InviteUserToTeamRequest, writer?: _m0.Writer): _m0.Writer;
619
+ decode(input: _m0.Reader | Uint8Array, length?: number): InviteUserToTeamRequest;
620
+ fromJSON(object: any): InviteUserToTeamRequest;
621
+ toJSON(message: InviteUserToTeamRequest): unknown;
622
+ create(base?: DeepPartial<InviteUserToTeamRequest>): InviteUserToTeamRequest;
623
+ fromPartial(object: DeepPartial<InviteUserToTeamRequest>): InviteUserToTeamRequest;
624
+ };
625
+ readonly requestStream: false;
626
+ readonly responseType: {
627
+ encode(message: InviteUserToTeamResponse, writer?: _m0.Writer): _m0.Writer;
628
+ decode(input: _m0.Reader | Uint8Array, length?: number): InviteUserToTeamResponse;
629
+ fromJSON(object: any): InviteUserToTeamResponse;
630
+ toJSON(message: InviteUserToTeamResponse): unknown;
631
+ create(base?: DeepPartial<InviteUserToTeamResponse>): InviteUserToTeamResponse;
632
+ fromPartial(object: DeepPartial<InviteUserToTeamResponse>): InviteUserToTeamResponse;
633
+ };
634
+ readonly responseStream: false;
635
+ readonly options: {};
636
+ };
637
+ readonly updateTeam: {
638
+ readonly name: "UpdateTeam";
639
+ readonly requestType: {
640
+ encode(message: UpdateTeamRequest, writer?: _m0.Writer): _m0.Writer;
641
+ decode(input: _m0.Reader | Uint8Array, length?: number): UpdateTeamRequest;
642
+ fromJSON(object: any): UpdateTeamRequest;
643
+ toJSON(message: UpdateTeamRequest): unknown;
644
+ create(base?: DeepPartial<UpdateTeamRequest>): UpdateTeamRequest;
645
+ fromPartial(object: DeepPartial<UpdateTeamRequest>): UpdateTeamRequest;
646
+ };
647
+ readonly requestStream: false;
648
+ readonly responseType: {
649
+ encode(message: Team, writer?: _m0.Writer): _m0.Writer;
650
+ decode(input: _m0.Reader | Uint8Array, length?: number): Team;
651
+ fromJSON(object: any): Team;
652
+ toJSON(message: Team): unknown;
653
+ create(base?: DeepPartial<Team>): Team;
654
+ fromPartial(object: DeepPartial<Team>): Team;
655
+ };
656
+ readonly responseStream: false;
657
+ readonly options: {};
658
+ };
575
659
  };
576
660
  };
577
661
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
@@ -5,6 +5,7 @@ export interface RegisterTemplateRequest {
5
5
  body: string;
6
6
  variables: string[];
7
7
  sender?: string | undefined;
8
+ jsonTemplate?: string | undefined;
8
9
  }
9
10
  export interface UpdateTemplateRequest {
10
11
  id: string;
@@ -7,8 +7,6 @@ import _m0 from "protobufjs/minimal.js";
7
7
  * service Foo {
8
8
  * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
9
9
  * }
10
- *
11
- * The JSON representation for `Empty` is empty JSON object `{}`.
12
10
  */
13
11
  export interface Empty {
14
12
  }
@@ -8,6 +8,7 @@ export interface GetFileUrlRequest {
8
8
  id: string;
9
9
  userId?: string | undefined;
10
10
  scope?: string | undefined;
11
+ download?: boolean | undefined;
11
12
  }
12
13
  export interface GetFileUrlResponse {
13
14
  url: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conduitplatform/grpc-sdk",
3
- "version": "0.16.17",
3
+ "version": "0.16.19",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",
@@ -36,7 +36,7 @@
36
36
  "abort-controller-x": "^0.4.3",
37
37
  "convict": "^6.2.4",
38
38
  "express": "^4.21.1",
39
- "fast-jwt": "^5.0.6",
39
+ "fast-jwt": "^6.0.2",
40
40
  "fs-extra": "^11.2.0",
41
41
  "ioredis": "^5.3.2",
42
42
  "lodash": "^4.17.21",