@volontariapp/contracts 4.3.6 → 4.3.7-snap-aa7a1ea
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 +6 -0
- package/dist/storage/index.d.ts +5 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +5 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/storage.command.d.ts +16 -0
- package/dist/storage/storage.command.d.ts.map +1 -0
- package/dist/storage/storage.command.js +2 -0
- package/dist/storage/storage.command.js.map +1 -0
- package/dist/storage/storage.d.ts +31 -0
- package/dist/storage/storage.d.ts.map +1 -0
- package/dist/storage/storage.js +19 -0
- package/dist/storage/storage.js.map +1 -0
- package/dist/storage/storage.query.d.ts +4 -0
- package/dist/storage/storage.query.d.ts.map +1 -0
- package/dist/storage/storage.query.js +2 -0
- package/dist/storage/storage.query.js.map +1 -0
- package/dist/storage/storage.responses.d.ts +18 -0
- package/dist/storage/storage.responses.d.ts.map +1 -0
- package/dist/storage/storage.responses.js +2 -0
- package/dist/storage/storage.responses.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EntityType } from "./storage.js";
|
|
2
|
+
export interface GenerateUploadUrlCommand {
|
|
3
|
+
mimeType: string;
|
|
4
|
+
sizeBytes: number;
|
|
5
|
+
entityType: EntityType;
|
|
6
|
+
isPublic: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface ConfirmFileAttachmentCommand {
|
|
9
|
+
fileIds: string[];
|
|
10
|
+
entityType: EntityType;
|
|
11
|
+
entityId: string;
|
|
12
|
+
}
|
|
13
|
+
export interface DeleteFileCommand {
|
|
14
|
+
fileId: string;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=storage.command.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.command.js","sourceRoot":"","sources":["../../src/storage/storage.command.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Timestamp } from "../google/protobuf/timestamp.js";
|
|
2
|
+
export declare enum FileStatus {
|
|
3
|
+
FILE_STATUS_UNSPECIFIED = 0,
|
|
4
|
+
FILE_STATUS_PENDING = 1,
|
|
5
|
+
FILE_STATUS_ATTACHED = 2,
|
|
6
|
+
FILE_STATUS_ORPHANED = 3,
|
|
7
|
+
FILE_STATUS_DELETED = 4,
|
|
8
|
+
UNRECOGNIZED = -1
|
|
9
|
+
}
|
|
10
|
+
export declare enum EntityType {
|
|
11
|
+
ENTITY_TYPE_UNSPECIFIED = 0,
|
|
12
|
+
ENTITY_TYPE_POST = 1,
|
|
13
|
+
ENTITY_TYPE_USER_AVATAR = 2,
|
|
14
|
+
ENTITY_TYPE_BADGE_ICON = 3,
|
|
15
|
+
ENTITY_TYPE_EVENT_COVER = 4,
|
|
16
|
+
UNRECOGNIZED = -1
|
|
17
|
+
}
|
|
18
|
+
export interface FileMetadata {
|
|
19
|
+
id: string;
|
|
20
|
+
ownerId: string;
|
|
21
|
+
objectKey: string;
|
|
22
|
+
mimeType: string;
|
|
23
|
+
status: FileStatus;
|
|
24
|
+
entityType?: EntityType | undefined;
|
|
25
|
+
entityId?: string | undefined;
|
|
26
|
+
isPublic: boolean;
|
|
27
|
+
uploadExpiresAt: Timestamp | undefined;
|
|
28
|
+
createdAt: Timestamp | undefined;
|
|
29
|
+
updatedAt: Timestamp | undefined;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/storage/storage.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,oBAAY,UAAU;IACpB,uBAAuB,IAAI;IAC3B,mBAAmB,IAAI;IACvB,oBAAoB,IAAI;IACxB,oBAAoB,IAAI;IACxB,mBAAmB,IAAI;IACvB,YAAY,KAAK;CAClB;AAED,oBAAY,UAAU;IACpB,uBAAuB,IAAI;IAC3B,gBAAgB,IAAI;IACpB,uBAAuB,IAAI;IAC3B,sBAAsB,IAAI;IAC1B,uBAAuB,IAAI;IAC3B,YAAY,KAAK;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,SAAS,GAAG,SAAS,CAAC;IACvC,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;CAClC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export var FileStatus;
|
|
2
|
+
(function (FileStatus) {
|
|
3
|
+
FileStatus[FileStatus["FILE_STATUS_UNSPECIFIED"] = 0] = "FILE_STATUS_UNSPECIFIED";
|
|
4
|
+
FileStatus[FileStatus["FILE_STATUS_PENDING"] = 1] = "FILE_STATUS_PENDING";
|
|
5
|
+
FileStatus[FileStatus["FILE_STATUS_ATTACHED"] = 2] = "FILE_STATUS_ATTACHED";
|
|
6
|
+
FileStatus[FileStatus["FILE_STATUS_ORPHANED"] = 3] = "FILE_STATUS_ORPHANED";
|
|
7
|
+
FileStatus[FileStatus["FILE_STATUS_DELETED"] = 4] = "FILE_STATUS_DELETED";
|
|
8
|
+
FileStatus[FileStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
9
|
+
})(FileStatus || (FileStatus = {}));
|
|
10
|
+
export var EntityType;
|
|
11
|
+
(function (EntityType) {
|
|
12
|
+
EntityType[EntityType["ENTITY_TYPE_UNSPECIFIED"] = 0] = "ENTITY_TYPE_UNSPECIFIED";
|
|
13
|
+
EntityType[EntityType["ENTITY_TYPE_POST"] = 1] = "ENTITY_TYPE_POST";
|
|
14
|
+
EntityType[EntityType["ENTITY_TYPE_USER_AVATAR"] = 2] = "ENTITY_TYPE_USER_AVATAR";
|
|
15
|
+
EntityType[EntityType["ENTITY_TYPE_BADGE_ICON"] = 3] = "ENTITY_TYPE_BADGE_ICON";
|
|
16
|
+
EntityType[EntityType["ENTITY_TYPE_EVENT_COVER"] = 4] = "ENTITY_TYPE_EVENT_COVER";
|
|
17
|
+
EntityType[EntityType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
18
|
+
})(EntityType || (EntityType = {}));
|
|
19
|
+
//# sourceMappingURL=storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../src/storage/storage.ts"],"names":[],"mappings":"AASA,MAAM,CAAN,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,iFAA2B,CAAA;IAC3B,yEAAuB,CAAA;IACvB,2EAAwB,CAAA;IACxB,2EAAwB,CAAA;IACxB,yEAAuB,CAAA;IACvB,4DAAiB,CAAA;AACnB,CAAC,EAPW,UAAU,KAAV,UAAU,QAOrB;AAED,MAAM,CAAN,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,iFAA2B,CAAA;IAC3B,mEAAoB,CAAA;IACpB,iFAA2B,CAAA;IAC3B,+EAA0B,CAAA;IAC1B,iFAA2B,CAAA;IAC3B,4DAAiB,CAAA;AACnB,CAAC,EAPW,UAAU,KAAV,UAAU,QAOrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.query.d.ts","sourceRoot":"","sources":["../../src/storage/storage.query.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.query.js","sourceRoot":"","sources":["../../src/storage/storage.query.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Timestamp } from "../google/protobuf/timestamp.js";
|
|
2
|
+
import { FileMetadata } from "./storage.js";
|
|
3
|
+
export interface GenerateUploadUrlResponse {
|
|
4
|
+
fileId: string;
|
|
5
|
+
uploadUrl: string;
|
|
6
|
+
expiresAt: Timestamp | undefined;
|
|
7
|
+
}
|
|
8
|
+
export interface ConfirmFileAttachmentResponse {
|
|
9
|
+
success: boolean;
|
|
10
|
+
updatedCount: number;
|
|
11
|
+
}
|
|
12
|
+
export interface DeleteFileResponse {
|
|
13
|
+
success: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface FileMetadataResponse {
|
|
16
|
+
file: FileMetadata | undefined;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=storage.responses.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.responses.js","sourceRoot":"","sources":["../../src/storage/storage.responses.ts"],"names":[],"mappings":""}
|