@volontariapp/contracts-nest 3.3.2 → 3.3.3-snap-1c3f241

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Auto-generated proto typings update for both pure contracts and NestJS integration.
8
+
3
9
  ## 3.3.2
4
10
 
5
11
  ### Patch Changes
@@ -5,6 +5,9 @@ export interface GenerateUploadUrlCommand {
5
5
  entityType: EntityType;
6
6
  isPublic: boolean;
7
7
  }
8
+ export interface ConfirmUploadCommand {
9
+ fileId: string;
10
+ }
8
11
  export interface ConfirmFileAttachmentCommand {
9
12
  fileIds: string[];
10
13
  entityType: EntityType;
@@ -1 +1 @@
1
- {"version":3,"file":"storage.command.d.ts","sourceRoot":"","sources":["../../src/storage/storage.command.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;CAChB"}
1
+ {"version":3,"file":"storage.command.d.ts","sourceRoot":"","sources":["../../src/storage/storage.command.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IAMvB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -4,10 +4,21 @@ export interface GenerateUploadUrlResponse {
4
4
  fileId: string;
5
5
  uploadUrl: string;
6
6
  expiresAt: Timestamp | undefined;
7
+ uploadFields: {
8
+ [key: string]: string;
9
+ };
10
+ }
11
+ export interface GenerateUploadUrlResponse_UploadFieldsEntry {
12
+ key: string;
13
+ value: string;
14
+ }
15
+ export interface ConfirmUploadResponse {
16
+ file: FileMetadata | undefined;
7
17
  }
8
18
  export interface ConfirmFileAttachmentResponse {
9
19
  success: boolean;
10
20
  updatedCount: number;
21
+ files: FileMetadata[];
11
22
  }
12
23
  export interface DeleteFileResponse {
13
24
  success: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"storage.responses.d.ts","sourceRoot":"","sources":["../../src/storage/storage.responses.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;CAClC;AAED,MAAM,WAAW,6BAA6B;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,YAAY,GAAG,SAAS,CAAC;CAChC;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B"}
1
+ {"version":3,"file":"storage.responses.d.ts","sourceRoot":"","sources":["../../src/storage/storage.responses.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EACL,SAAS,GACT,SAAS,CAAC;IAEd,YAAY,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACzC;AAED,MAAM,WAAW,2CAA2C;IAC1D,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IAEpC,IAAI,EAAE,YAAY,GAAG,SAAS,CAAC;CAChC;AAED,MAAM,WAAW,6BAA6B;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,YAAY,GAAG,SAAS,CAAC;CAChC;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B"}
@@ -1,9 +1,10 @@
1
1
  import { Observable } from "rxjs";
2
- import { ConfirmFileAttachmentCommand, DeleteFileCommand, GenerateUploadUrlCommand } from "./storage.command.js";
2
+ import { ConfirmFileAttachmentCommand, ConfirmUploadCommand, DeleteFileCommand, GenerateUploadUrlCommand } from "./storage.command.js";
3
3
  import { GetFileMetadataQuery, VerifyFilesExistQuery } from "./storage.query.js";
4
- import { ConfirmFileAttachmentResponse, DeleteFileResponse, FileMetadataResponse, GenerateUploadUrlResponse, VerifyFilesExistResponse } from "./storage.responses.js";
4
+ import { ConfirmFileAttachmentResponse, ConfirmUploadResponse, DeleteFileResponse, FileMetadataResponse, GenerateUploadUrlResponse, VerifyFilesExistResponse } from "./storage.responses.js";
5
5
  export interface StorageServiceClient {
6
6
  generateUploadUrl(request: GenerateUploadUrlCommand): Observable<GenerateUploadUrlResponse>;
7
+ confirmUpload(request: ConfirmUploadCommand): Observable<ConfirmUploadResponse>;
7
8
  confirmFileAttachment(request: ConfirmFileAttachmentCommand): Observable<ConfirmFileAttachmentResponse>;
8
9
  deleteFile(request: DeleteFileCommand): Observable<DeleteFileResponse>;
9
10
  getFileMetadata(request: GetFileMetadataQuery): Observable<FileMetadataResponse>;
@@ -11,6 +12,7 @@ export interface StorageServiceClient {
11
12
  }
12
13
  export interface StorageServiceController {
13
14
  generateUploadUrl(request: GenerateUploadUrlCommand): Promise<GenerateUploadUrlResponse> | Observable<GenerateUploadUrlResponse> | GenerateUploadUrlResponse;
15
+ confirmUpload(request: ConfirmUploadCommand): Promise<ConfirmUploadResponse> | Observable<ConfirmUploadResponse> | ConfirmUploadResponse;
14
16
  confirmFileAttachment(request: ConfirmFileAttachmentCommand): Promise<ConfirmFileAttachmentResponse> | Observable<ConfirmFileAttachmentResponse> | ConfirmFileAttachmentResponse;
15
17
  deleteFile(request: DeleteFileCommand): Promise<DeleteFileResponse> | Observable<DeleteFileResponse> | DeleteFileResponse;
16
18
  getFileMetadata(request: GetFileMetadataQuery): Promise<FileMetadataResponse> | Observable<FileMetadataResponse> | FileMetadataResponse;
@@ -1 +1 @@
1
- {"version":3,"file":"storage.services.d.ts","sourceRoot":"","sources":["../../src/storage/storage.services.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EA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B,CAAC,GAAG,yBAAyB,CAAC;IAE1G,aAAa,CACX,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,qBAAqB,CAAC,GAAG,UAAU,CAAC,qBAAqB,CAAC,GAAG,qBAAqB,CAAC;IAE9F,qBAAqB,CACnB,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,6BAA6B,CAAC,GAAG,UAAU,CAAC,6BAA6B,CAAC,GAAG,6BAA6B,CAAC;IAEtH,UAAU,CACR,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,kBAAkB,CAAC,GAAG,UAAU,CAAC,kBAAkB,CAAC,GAAG,kBAAkB,CAAC;IAErF,eAAe,CACb,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,oBAAoB,CAAC,GAAG,UAAU,CAAC,oBAAoB,CAAC,GAAG,oBAAoB,CAAC;IAE3F,gBAAgB,CACd,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,wBAAwB,CAAC,GAAG,UAAU,CAAC,wBAAwB,CAAC,GAAG,wBAAwB,CAAC;CACxG;AAED,wBAAgB,+BAA+B,kBACf,QAAQ,UAqBvC;AAED,eAAO,MAAM,oBAAoB,mBAAmB,CAAC"}
@@ -3,6 +3,7 @@ export function StorageServiceControllerMethods() {
3
3
  return function (constructor) {
4
4
  const grpcMethods = [
5
5
  "generateUploadUrl",
6
+ "confirmUpload",
6
7
  "confirmFileAttachment",
7
8
  "deleteFile",
8
9
  "getFileMetadata",
@@ -1 +1 @@
1
- {"version":3,"file":"storage.services.js","sourceRoot":"","sources":["../../src/storage/storage.services.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AA8CrE,MAAM,UAAU,+BAA+B;IAC7C,OAAO,UAAU,WAAqB;QACpC,MAAM,WAAW,GAAa;YAC5B,mBAAmB;YACnB,uBAAuB;YACvB,YAAY;YACZ,iBAAiB;YACjB,kBAAkB;SACnB,CAAC;QACF,K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AAC,wBAAwB,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YACxF,UAAU,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;YACxF,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;QACnE,CAAC;QACD,MAAM,iBAAiB,GAAa,EAAE,CAAC;QACvC,KAAK,MAAM,MAAM,IAAI,iBAAiB,EAAE,CAAC;YACvC,MAAM,UAAU,GAAQ,OAAO,CAAC,wBAAwB,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YACxF,gBAAgB,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;YAC9F,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;QACnE,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volontariapp/contracts-nest",
3
- "version": "3.3.2",
3
+ "version": "3.3.3-snap-1c3f241",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -8,7 +8,12 @@ message GenerateUploadUrlCommand {
8
8
  string mime_type = 1;
9
9
  int64 size_bytes = 2;
10
10
  EntityType entity_type = 3;
11
- bool is_public = 4;
11
+ // Deprecated: ignored, visibility is derived from the scan result.
12
+ bool is_public = 4 [deprecated = true];
13
+ }
14
+
15
+ message ConfirmUploadCommand {
16
+ string file_id = 1;
12
17
  }
13
18
 
14
19
  message ConfirmFileAttachmentCommand {
@@ -9,11 +9,19 @@ message GenerateUploadUrlResponse {
9
9
  string file_id = 1;
10
10
  string upload_url = 2;
11
11
  google.protobuf.Timestamp expires_at = 3;
12
+ // Fields of the signed POST form.
13
+ map<string, string> upload_fields = 4;
14
+ }
15
+
16
+ message ConfirmUploadResponse {
17
+ // SCANNING (ASYNC) or final state (SYNC).
18
+ FileMetadata file = 1;
12
19
  }
13
20
 
14
21
  message ConfirmFileAttachmentResponse {
15
22
  bool success = 1;
16
23
  int32 updated_count = 2;
24
+ repeated FileMetadata files = 3;
17
25
  }
18
26
 
19
27
  message DeleteFileResponse {
@@ -8,9 +8,12 @@ import "volontariapp/storage/storage.responses.proto";
8
8
 
9
9
  service StorageService {
10
10
  rpc GenerateUploadUrl (GenerateUploadUrlCommand) returns (GenerateUploadUrlResponse) {}
11
+ rpc ConfirmUpload (ConfirmUploadCommand) returns (ConfirmUploadResponse) {}
11
12
  rpc ConfirmFileAttachment (ConfirmFileAttachmentCommand) returns (ConfirmFileAttachmentResponse) {}
12
13
  rpc DeleteFile (DeleteFileCommand) returns (DeleteFileResponse) {}
13
14
  rpc GetFileMetadata (GetFileMetadataQuery) returns (FileMetadataResponse) {}
14
- rpc VerifyFilesExist (VerifyFilesExistQuery) returns (VerifyFilesExistResponse) {}
15
+ rpc VerifyFilesExist (VerifyFilesExistQuery) returns (VerifyFilesExistResponse) {
16
+ option deprecated = true;
17
+ }
15
18
  }
16
19