@contractspec/lib.files 1.44.1 → 1.45.1
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/dist/contracts/index.d.ts +3 -3
- package/dist/contracts/index.js +13 -13
- package/dist/contracts/index.js.map +1 -1
- package/dist/events.d.ts +2 -2
- package/dist/events.js +9 -9
- package/dist/events.js.map +1 -1
- package/dist/files.feature.js +24 -24
- package/dist/files.feature.js.map +1 -1
- package/package.json +5 -5
|
@@ -78,7 +78,7 @@ declare const FileVersionModel: _contractspec_lib_schema0.SchemaModel<{
|
|
|
78
78
|
isOptional: false;
|
|
79
79
|
};
|
|
80
80
|
version: {
|
|
81
|
-
type: _contractspec_lib_schema0.FieldType<
|
|
81
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
82
82
|
isOptional: false;
|
|
83
83
|
};
|
|
84
84
|
size: {
|
|
@@ -691,7 +691,7 @@ declare const CreateVersionContract: _contractspec_lib_contracts0.OperationSpec<
|
|
|
691
691
|
isOptional: false;
|
|
692
692
|
};
|
|
693
693
|
version: {
|
|
694
|
-
type: _contractspec_lib_schema0.FieldType<
|
|
694
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
695
695
|
isOptional: false;
|
|
696
696
|
};
|
|
697
697
|
size: {
|
|
@@ -747,7 +747,7 @@ declare const GetVersionsContract: _contractspec_lib_contracts0.OperationSpec<_c
|
|
|
747
747
|
isOptional: false;
|
|
748
748
|
};
|
|
749
749
|
version: {
|
|
750
|
-
type: _contractspec_lib_schema0.FieldType<
|
|
750
|
+
type: _contractspec_lib_schema0.FieldType<string, string>;
|
|
751
751
|
isOptional: false;
|
|
752
752
|
};
|
|
753
753
|
size: {
|
package/dist/contracts/index.js
CHANGED
|
@@ -86,7 +86,7 @@ const FileVersionModel = defineSchemaModel({
|
|
|
86
86
|
isOptional: false
|
|
87
87
|
},
|
|
88
88
|
version: {
|
|
89
|
-
type: ScalarTypeEnum.
|
|
89
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
90
90
|
isOptional: false
|
|
91
91
|
},
|
|
92
92
|
size: {
|
|
@@ -508,7 +508,7 @@ const SuccessOutput = defineSchemaModel({
|
|
|
508
508
|
const UploadFileContract = defineCommand({
|
|
509
509
|
meta: {
|
|
510
510
|
key: "file.upload",
|
|
511
|
-
version: 1,
|
|
511
|
+
version: "1.0.0",
|
|
512
512
|
stability: "stable",
|
|
513
513
|
owners: [...OWNERS],
|
|
514
514
|
tags: ["files", "upload"],
|
|
@@ -542,7 +542,7 @@ const UploadFileContract = defineCommand({
|
|
|
542
542
|
const UpdateFileContract = defineCommand({
|
|
543
543
|
meta: {
|
|
544
544
|
key: "file.update",
|
|
545
|
-
version: 1,
|
|
545
|
+
version: "1.0.0",
|
|
546
546
|
stability: "stable",
|
|
547
547
|
owners: [...OWNERS],
|
|
548
548
|
tags: ["files", "update"],
|
|
@@ -568,7 +568,7 @@ const UpdateFileContract = defineCommand({
|
|
|
568
568
|
const DeleteFileContract = defineCommand({
|
|
569
569
|
meta: {
|
|
570
570
|
key: "file.delete",
|
|
571
|
-
version: 1,
|
|
571
|
+
version: "1.0.0",
|
|
572
572
|
stability: "stable",
|
|
573
573
|
owners: [...OWNERS],
|
|
574
574
|
tags: ["files", "delete"],
|
|
@@ -594,7 +594,7 @@ const DeleteFileContract = defineCommand({
|
|
|
594
594
|
const GetFileContract = defineQuery({
|
|
595
595
|
meta: {
|
|
596
596
|
key: "file.get",
|
|
597
|
-
version: 1,
|
|
597
|
+
version: "1.0.0",
|
|
598
598
|
stability: "stable",
|
|
599
599
|
owners: [...OWNERS],
|
|
600
600
|
tags: ["files", "get"],
|
|
@@ -620,7 +620,7 @@ const GetFileContract = defineQuery({
|
|
|
620
620
|
const ListFilesContract = defineQuery({
|
|
621
621
|
meta: {
|
|
622
622
|
key: "file.list",
|
|
623
|
-
version: 1,
|
|
623
|
+
version: "1.0.0",
|
|
624
624
|
stability: "stable",
|
|
625
625
|
owners: [...OWNERS],
|
|
626
626
|
tags: ["files", "list"],
|
|
@@ -640,7 +640,7 @@ const ListFilesContract = defineQuery({
|
|
|
640
640
|
const GetDownloadUrlContract = defineQuery({
|
|
641
641
|
meta: {
|
|
642
642
|
key: "file.downloadUrl",
|
|
643
|
-
version: 1,
|
|
643
|
+
version: "1.0.0",
|
|
644
644
|
stability: "stable",
|
|
645
645
|
owners: [...OWNERS],
|
|
646
646
|
tags: ["files", "download"],
|
|
@@ -666,7 +666,7 @@ const GetDownloadUrlContract = defineQuery({
|
|
|
666
666
|
const CreateVersionContract = defineCommand({
|
|
667
667
|
meta: {
|
|
668
668
|
key: "file.version.create",
|
|
669
|
-
version: 1,
|
|
669
|
+
version: "1.0.0",
|
|
670
670
|
stability: "stable",
|
|
671
671
|
owners: [...OWNERS],
|
|
672
672
|
tags: [
|
|
@@ -696,7 +696,7 @@ const CreateVersionContract = defineCommand({
|
|
|
696
696
|
const GetVersionsContract = defineQuery({
|
|
697
697
|
meta: {
|
|
698
698
|
key: "file.version.list",
|
|
699
|
-
version: 1,
|
|
699
|
+
version: "1.0.0",
|
|
700
700
|
stability: "stable",
|
|
701
701
|
owners: [...OWNERS],
|
|
702
702
|
tags: [
|
|
@@ -726,7 +726,7 @@ const GetVersionsContract = defineQuery({
|
|
|
726
726
|
const AttachFileContract = defineCommand({
|
|
727
727
|
meta: {
|
|
728
728
|
key: "attachment.attach",
|
|
729
|
-
version: 1,
|
|
729
|
+
version: "1.0.0",
|
|
730
730
|
stability: "stable",
|
|
731
731
|
owners: [...OWNERS],
|
|
732
732
|
tags: [
|
|
@@ -764,7 +764,7 @@ const AttachFileContract = defineCommand({
|
|
|
764
764
|
const DetachFileContract = defineCommand({
|
|
765
765
|
meta: {
|
|
766
766
|
key: "attachment.detach",
|
|
767
|
-
version: 1,
|
|
767
|
+
version: "1.0.0",
|
|
768
768
|
stability: "stable",
|
|
769
769
|
owners: [...OWNERS],
|
|
770
770
|
tags: [
|
|
@@ -794,7 +794,7 @@ const DetachFileContract = defineCommand({
|
|
|
794
794
|
const ListAttachmentsContract = defineQuery({
|
|
795
795
|
meta: {
|
|
796
796
|
key: "attachment.list",
|
|
797
|
-
version: 1,
|
|
797
|
+
version: "1.0.0",
|
|
798
798
|
stability: "stable",
|
|
799
799
|
owners: [...OWNERS],
|
|
800
800
|
tags: [
|
|
@@ -818,7 +818,7 @@ const ListAttachmentsContract = defineQuery({
|
|
|
818
818
|
const CreatePresignedUrlContract = defineCommand({
|
|
819
819
|
meta: {
|
|
820
820
|
key: "file.presignedUrl.create",
|
|
821
|
-
version: 1,
|
|
821
|
+
version: "1.0.0",
|
|
822
822
|
stability: "stable",
|
|
823
823
|
owners: [...OWNERS],
|
|
824
824
|
tags: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/contracts/index.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineCommand, defineQuery } from '@contractspec/lib.contracts';\n\nconst OWNERS = ['platform.files'] as const;\n\n// ============ Schema Models ============\n\nexport const FileModel = defineSchemaModel({\n name: 'File',\n description: 'Represents an uploaded file',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n mimeType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n size: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n storageProvider: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n storagePath: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n checksum: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n isPublic: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n metadata: { type: ScalarTypeEnum.JSON(), isOptional: true },\n width: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n height: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const FileVersionModel = defineSchemaModel({\n name: 'FileVersion',\n description: 'Represents a file version',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n version: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n size: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n storagePath: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n checksum: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n comment: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const AttachmentModel = defineSchemaModel({\n name: 'Attachment',\n description: 'Represents an attachment',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n entityType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n entityId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n attachmentType: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n order: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n metadata: { type: ScalarTypeEnum.JSON(), isOptional: true },\n createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n file: { type: FileModel, isOptional: true },\n },\n});\n\nexport const PresignedUrlModel = defineSchemaModel({\n name: 'PresignedUrl',\n description: 'A presigned URL for file operations',\n fields: {\n url: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n fields: { type: ScalarTypeEnum.JSON(), isOptional: true },\n expiresAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n sessionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\n// ============ Input/Output Models ============\n\nconst UploadFileInput = defineSchemaModel({\n name: 'UploadFileInput',\n description: 'Input for uploading a file',\n fields: {\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n mimeType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n size: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n content: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }, // Base64 encoded\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n isPublic: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n metadata: { type: ScalarTypeEnum.JSON(), isOptional: true },\n tags: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\nconst UpdateFileInput = defineSchemaModel({\n name: 'UpdateFileInput',\n description: 'Input for updating a file',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n isPublic: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n metadata: { type: ScalarTypeEnum.JSON(), isOptional: true },\n tags: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\nconst DeleteFileInput = defineSchemaModel({\n name: 'DeleteFileInput',\n description: 'Input for deleting a file',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nconst GetFileInput = defineSchemaModel({\n name: 'GetFileInput',\n description: 'Input for getting a file',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nconst ListFilesInput = defineSchemaModel({\n name: 'ListFilesInput',\n description: 'Input for listing files',\n fields: {\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n mimeType: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n tags: { type: ScalarTypeEnum.JSON(), isOptional: true },\n limit: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n offset: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n});\n\nconst ListFilesOutput = defineSchemaModel({\n name: 'ListFilesOutput',\n description: 'Output for listing files',\n fields: {\n files: { type: FileModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n});\n\nconst GetDownloadUrlInput = defineSchemaModel({\n name: 'GetDownloadUrlInput',\n description: 'Input for getting a download URL',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n expiresInSeconds: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n});\n\nconst CreateVersionInput = defineSchemaModel({\n name: 'CreateVersionInput',\n description: 'Input for creating a file version',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n content: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }, // Base64 encoded\n comment: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nconst GetVersionsInput = defineSchemaModel({\n name: 'GetVersionsInput',\n description: 'Input for getting file versions',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n limit: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n offset: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n});\n\nconst GetVersionsOutput = defineSchemaModel({\n name: 'GetVersionsOutput',\n description: 'Output for getting file versions',\n fields: {\n versions: { type: FileVersionModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n});\n\nconst AttachFileInput = defineSchemaModel({\n name: 'AttachFileInput',\n description: 'Input for attaching a file to an entity',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n entityType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n entityId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n attachmentType: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n order: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n metadata: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\nconst DetachFileInput = defineSchemaModel({\n name: 'DetachFileInput',\n description: 'Input for detaching a file',\n fields: {\n attachmentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nconst ListAttachmentsInput = defineSchemaModel({\n name: 'ListAttachmentsInput',\n description: 'Input for listing attachments',\n fields: {\n entityType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n entityId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n attachmentType: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n },\n});\n\nconst ListAttachmentsOutput = defineSchemaModel({\n name: 'ListAttachmentsOutput',\n description: 'Output for listing attachments',\n fields: {\n attachments: { type: AttachmentModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n});\n\nconst CreatePresignedUrlInput = defineSchemaModel({\n name: 'CreatePresignedUrlInput',\n description: 'Input for creating a presigned upload URL',\n fields: {\n fileName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n mimeType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n size: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n expiresInSeconds: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n});\n\nconst SuccessOutput = defineSchemaModel({\n name: 'SuccessOutput',\n description: 'Generic success output',\n fields: {\n success: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n },\n});\n\n// ============ Contracts ============\n\n/**\n * Upload a file.\n */\nexport const UploadFileContract = defineCommand({\n meta: {\n key: 'file.upload',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'upload'],\n description: 'Upload a new file.',\n goal: 'Store a file and create a file record.',\n context: 'Called when uploading files directly.',\n },\n io: {\n input: UploadFileInput,\n output: FileModel,\n errors: {\n FILE_TOO_LARGE: {\n description: 'File exceeds size limit',\n http: 413,\n gqlCode: 'FILE_TOO_LARGE',\n when: 'File size exceeds configured limit',\n },\n INVALID_MIME_TYPE: {\n description: 'MIME type not allowed',\n http: 415,\n gqlCode: 'INVALID_MIME_TYPE',\n when: 'File type is not in allowed list',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * Update a file.\n */\nexport const UpdateFileContract = defineCommand({\n meta: {\n key: 'file.update',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'update'],\n description: 'Update file metadata.',\n goal: 'Modify file properties without replacing content.',\n context: 'Called when renaming or updating file metadata.',\n },\n io: {\n input: UpdateFileInput,\n output: FileModel,\n errors: {\n FILE_NOT_FOUND: {\n description: 'File does not exist',\n http: 404,\n gqlCode: 'FILE_NOT_FOUND',\n when: 'File ID is invalid',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * Delete a file.\n */\nexport const DeleteFileContract = defineCommand({\n meta: {\n key: 'file.delete',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'delete'],\n description: 'Delete a file.',\n goal: 'Remove a file and all its versions and attachments.',\n context: 'Called when removing a file permanently.',\n },\n io: {\n input: DeleteFileInput,\n output: SuccessOutput,\n errors: {\n FILE_NOT_FOUND: {\n description: 'File does not exist',\n http: 404,\n gqlCode: 'FILE_NOT_FOUND',\n when: 'File ID is invalid',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * Get a file by ID.\n */\nexport const GetFileContract = defineQuery({\n meta: {\n key: 'file.get',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'get'],\n description: 'Get a file by ID.',\n goal: 'Retrieve file metadata.',\n context: 'Called to inspect file details.',\n },\n io: {\n input: GetFileInput,\n output: FileModel,\n errors: {\n FILE_NOT_FOUND: {\n description: 'File does not exist',\n http: 404,\n gqlCode: 'FILE_NOT_FOUND',\n when: 'File ID is invalid',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * List files.\n */\nexport const ListFilesContract = defineQuery({\n meta: {\n key: 'file.list',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'list'],\n description: 'List files with filtering.',\n goal: 'Browse uploaded files.',\n context: 'Called to browse file library.',\n },\n io: {\n input: ListFilesInput,\n output: ListFilesOutput,\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * Get download URL.\n */\nexport const GetDownloadUrlContract = defineQuery({\n meta: {\n key: 'file.downloadUrl',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'download'],\n description: 'Get a presigned download URL.',\n goal: 'Generate a temporary URL for downloading.',\n context: 'Called when user wants to download a file.',\n },\n io: {\n input: GetDownloadUrlInput,\n output: PresignedUrlModel,\n errors: {\n FILE_NOT_FOUND: {\n description: 'File does not exist',\n http: 404,\n gqlCode: 'FILE_NOT_FOUND',\n when: 'File ID is invalid',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * Create a file version.\n */\nexport const CreateVersionContract = defineCommand({\n meta: {\n key: 'file.version.create',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'version', 'create'],\n description: 'Create a new version of a file.',\n goal: 'Upload a new version while preserving history.',\n context: 'Called when updating a document.',\n },\n io: {\n input: CreateVersionInput,\n output: FileVersionModel,\n errors: {\n FILE_NOT_FOUND: {\n description: 'File does not exist',\n http: 404,\n gqlCode: 'FILE_NOT_FOUND',\n when: 'File ID is invalid',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * Get file versions.\n */\nexport const GetVersionsContract = defineQuery({\n meta: {\n key: 'file.version.list',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'version', 'list'],\n description: 'Get file version history.',\n goal: 'View all versions of a file.',\n context: 'Called to browse file history.',\n },\n io: {\n input: GetVersionsInput,\n output: GetVersionsOutput,\n errors: {\n FILE_NOT_FOUND: {\n description: 'File does not exist',\n http: 404,\n gqlCode: 'FILE_NOT_FOUND',\n when: 'File ID is invalid',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * Attach a file to an entity.\n */\nexport const AttachFileContract = defineCommand({\n meta: {\n key: 'attachment.attach',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'attachment', 'attach'],\n description: 'Attach a file to an entity.',\n goal: 'Link a file to a business entity.',\n context: 'Called when associating files with entities.',\n },\n io: {\n input: AttachFileInput,\n output: AttachmentModel,\n errors: {\n FILE_NOT_FOUND: {\n description: 'File does not exist',\n http: 404,\n gqlCode: 'FILE_NOT_FOUND',\n when: 'File ID is invalid',\n },\n ATTACHMENT_EXISTS: {\n description: 'Attachment already exists',\n http: 409,\n gqlCode: 'ATTACHMENT_EXISTS',\n when: 'File is already attached to this entity',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * Detach a file from an entity.\n */\nexport const DetachFileContract = defineCommand({\n meta: {\n key: 'attachment.detach',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'attachment', 'detach'],\n description: 'Detach a file from an entity.',\n goal: 'Remove a file association.',\n context: 'Called when removing file from entity.',\n },\n io: {\n input: DetachFileInput,\n output: SuccessOutput,\n errors: {\n ATTACHMENT_NOT_FOUND: {\n description: 'Attachment does not exist',\n http: 404,\n gqlCode: 'ATTACHMENT_NOT_FOUND',\n when: 'Attachment ID is invalid',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * List attachments for an entity.\n */\nexport const ListAttachmentsContract = defineQuery({\n meta: {\n key: 'attachment.list',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'attachment', 'list'],\n description: 'List attachments for an entity.',\n goal: 'Get all files attached to an entity.',\n context: 'Called to display attached files.',\n },\n io: {\n input: ListAttachmentsInput,\n output: ListAttachmentsOutput,\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * Create a presigned upload URL.\n */\nexport const CreatePresignedUrlContract = defineCommand({\n meta: {\n key: 'file.presignedUrl.create',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'presigned', 'upload'],\n description: 'Create a presigned URL for direct upload.',\n goal: 'Enable direct-to-storage uploads.',\n context: 'Called for large file uploads.',\n },\n io: {\n input: CreatePresignedUrlInput,\n output: PresignedUrlModel,\n errors: {\n FILE_TOO_LARGE: {\n description: 'File exceeds size limit',\n http: 413,\n gqlCode: 'FILE_TOO_LARGE',\n when: 'Requested file size exceeds limit',\n },\n INVALID_MIME_TYPE: {\n description: 'MIME type not allowed',\n http: 415,\n gqlCode: 'INVALID_MIME_TYPE',\n when: 'File type is not in allowed list',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n"],"mappings":";;;;AAGA,MAAM,SAAS,CAAC,iBAAiB;AAIjC,MAAa,YAAY,kBAAkB;CACzC,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,UAAU;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACvE,MAAM;GAAE,MAAM,eAAe,cAAc;GAAE,YAAY;GAAO;EAChE,iBAAiB;GACf,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb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EACP,QAAQ;EACR,QAAQ,EACN,sBAAsB;GACpB,aAAa;GACb,MAAM;GACN,SAAS;GACT,MAAM;GACP,EACF;EACF;CACD,QAAQ,EACN,MAAM,QACP;CACF,CAAC;;;;AAKF,MAAa,0BAA0B,YAAY;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAS;GAAc;GAAO;EACrC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EACN,MAAM,QACP;CACF,CAAC;;;;AAKF,MAAa,6BAA6B,cAAc;CACtD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAS;GAAa;GAAS;EACtC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACR,QAAQ;GACN,gBAAgB;IACd,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACD,mBAAmB;IACjB,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACF;EACF;CACD,QAAQ,EACN,MAAM,QACP;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/contracts/index.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineCommand, defineQuery } from '@contractspec/lib.contracts';\n\nconst OWNERS = ['platform.files'] as const;\n\n// ============ Schema Models ============\n\nexport const FileModel = defineSchemaModel({\n name: 'File',\n description: 'Represents an uploaded file',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n mimeType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n size: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n storageProvider: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n storagePath: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n checksum: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n isPublic: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n metadata: { type: ScalarTypeEnum.JSON(), isOptional: true },\n width: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n height: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const FileVersionModel = defineSchemaModel({\n name: 'FileVersion',\n description: 'Represents a file version',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n version: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n size: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n storagePath: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n checksum: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n comment: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nexport const AttachmentModel = defineSchemaModel({\n name: 'Attachment',\n description: 'Represents an attachment',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n entityType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n entityId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n attachmentType: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n order: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n metadata: { type: ScalarTypeEnum.JSON(), isOptional: true },\n createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n file: { type: FileModel, isOptional: true },\n },\n});\n\nexport const PresignedUrlModel = defineSchemaModel({\n name: 'PresignedUrl',\n description: 'A presigned URL for file operations',\n fields: {\n url: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n fields: { type: ScalarTypeEnum.JSON(), isOptional: true },\n expiresAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n sessionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\n// ============ Input/Output Models ============\n\nconst UploadFileInput = defineSchemaModel({\n name: 'UploadFileInput',\n description: 'Input for uploading a file',\n fields: {\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n mimeType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n size: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n content: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }, // Base64 encoded\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n isPublic: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n metadata: { type: ScalarTypeEnum.JSON(), isOptional: true },\n tags: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\nconst UpdateFileInput = defineSchemaModel({\n name: 'UpdateFileInput',\n description: 'Input for updating a file',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n isPublic: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n metadata: { type: ScalarTypeEnum.JSON(), isOptional: true },\n tags: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\nconst DeleteFileInput = defineSchemaModel({\n name: 'DeleteFileInput',\n description: 'Input for deleting a file',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nconst GetFileInput = defineSchemaModel({\n name: 'GetFileInput',\n description: 'Input for getting a file',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nconst ListFilesInput = defineSchemaModel({\n name: 'ListFilesInput',\n description: 'Input for listing files',\n fields: {\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n mimeType: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n tags: { type: ScalarTypeEnum.JSON(), isOptional: true },\n limit: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n offset: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n});\n\nconst ListFilesOutput = defineSchemaModel({\n name: 'ListFilesOutput',\n description: 'Output for listing files',\n fields: {\n files: { type: FileModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n});\n\nconst GetDownloadUrlInput = defineSchemaModel({\n name: 'GetDownloadUrlInput',\n description: 'Input for getting a download URL',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n expiresInSeconds: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n});\n\nconst CreateVersionInput = defineSchemaModel({\n name: 'CreateVersionInput',\n description: 'Input for creating a file version',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n content: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }, // Base64 encoded\n comment: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n});\n\nconst GetVersionsInput = defineSchemaModel({\n name: 'GetVersionsInput',\n description: 'Input for getting file versions',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n limit: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n offset: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n});\n\nconst GetVersionsOutput = defineSchemaModel({\n name: 'GetVersionsOutput',\n description: 'Output for getting file versions',\n fields: {\n versions: { type: FileVersionModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n});\n\nconst AttachFileInput = defineSchemaModel({\n name: 'AttachFileInput',\n description: 'Input for attaching a file to an entity',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n entityType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n entityId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n attachmentType: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n order: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n metadata: { type: ScalarTypeEnum.JSON(), isOptional: true },\n },\n});\n\nconst DetachFileInput = defineSchemaModel({\n name: 'DetachFileInput',\n description: 'Input for detaching a file',\n fields: {\n attachmentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\nconst ListAttachmentsInput = defineSchemaModel({\n name: 'ListAttachmentsInput',\n description: 'Input for listing attachments',\n fields: {\n entityType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n entityId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n attachmentType: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n },\n});\n\nconst ListAttachmentsOutput = defineSchemaModel({\n name: 'ListAttachmentsOutput',\n description: 'Output for listing attachments',\n fields: {\n attachments: { type: AttachmentModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n});\n\nconst CreatePresignedUrlInput = defineSchemaModel({\n name: 'CreatePresignedUrlInput',\n description: 'Input for creating a presigned upload URL',\n fields: {\n fileName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n mimeType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n size: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n expiresInSeconds: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n});\n\nconst SuccessOutput = defineSchemaModel({\n name: 'SuccessOutput',\n description: 'Generic success output',\n fields: {\n success: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n },\n});\n\n// ============ Contracts ============\n\n/**\n * Upload a file.\n */\nexport const UploadFileContract = defineCommand({\n meta: {\n key: 'file.upload',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'upload'],\n description: 'Upload a new file.',\n goal: 'Store a file and create a file record.',\n context: 'Called when uploading files directly.',\n },\n io: {\n input: UploadFileInput,\n output: FileModel,\n errors: {\n FILE_TOO_LARGE: {\n description: 'File exceeds size limit',\n http: 413,\n gqlCode: 'FILE_TOO_LARGE',\n when: 'File size exceeds configured limit',\n },\n INVALID_MIME_TYPE: {\n description: 'MIME type not allowed',\n http: 415,\n gqlCode: 'INVALID_MIME_TYPE',\n when: 'File type is not in allowed list',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * Update a file.\n */\nexport const UpdateFileContract = defineCommand({\n meta: {\n key: 'file.update',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'update'],\n description: 'Update file metadata.',\n goal: 'Modify file properties without replacing content.',\n context: 'Called when renaming or updating file metadata.',\n },\n io: {\n input: UpdateFileInput,\n output: FileModel,\n errors: {\n FILE_NOT_FOUND: {\n description: 'File does not exist',\n http: 404,\n gqlCode: 'FILE_NOT_FOUND',\n when: 'File ID is invalid',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * Delete a file.\n */\nexport const DeleteFileContract = defineCommand({\n meta: {\n key: 'file.delete',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'delete'],\n description: 'Delete a file.',\n goal: 'Remove a file and all its versions and attachments.',\n context: 'Called when removing a file permanently.',\n },\n io: {\n input: DeleteFileInput,\n output: SuccessOutput,\n errors: {\n FILE_NOT_FOUND: {\n description: 'File does not exist',\n http: 404,\n gqlCode: 'FILE_NOT_FOUND',\n when: 'File ID is invalid',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * Get a file by ID.\n */\nexport const GetFileContract = defineQuery({\n meta: {\n key: 'file.get',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'get'],\n description: 'Get a file by ID.',\n goal: 'Retrieve file metadata.',\n context: 'Called to inspect file details.',\n },\n io: {\n input: GetFileInput,\n output: FileModel,\n errors: {\n FILE_NOT_FOUND: {\n description: 'File does not exist',\n http: 404,\n gqlCode: 'FILE_NOT_FOUND',\n when: 'File ID is invalid',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * List files.\n */\nexport const ListFilesContract = defineQuery({\n meta: {\n key: 'file.list',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'list'],\n description: 'List files with filtering.',\n goal: 'Browse uploaded files.',\n context: 'Called to browse file library.',\n },\n io: {\n input: ListFilesInput,\n output: ListFilesOutput,\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * Get download URL.\n */\nexport const GetDownloadUrlContract = defineQuery({\n meta: {\n key: 'file.downloadUrl',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'download'],\n description: 'Get a presigned download URL.',\n goal: 'Generate a temporary URL for downloading.',\n context: 'Called when user wants to download a file.',\n },\n io: {\n input: GetDownloadUrlInput,\n output: PresignedUrlModel,\n errors: {\n FILE_NOT_FOUND: {\n description: 'File does not exist',\n http: 404,\n gqlCode: 'FILE_NOT_FOUND',\n when: 'File ID is invalid',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * Create a file version.\n */\nexport const CreateVersionContract = defineCommand({\n meta: {\n key: 'file.version.create',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'version', 'create'],\n description: 'Create a new version of a file.',\n goal: 'Upload a new version while preserving history.',\n context: 'Called when updating a document.',\n },\n io: {\n input: CreateVersionInput,\n output: FileVersionModel,\n errors: {\n FILE_NOT_FOUND: {\n description: 'File does not exist',\n http: 404,\n gqlCode: 'FILE_NOT_FOUND',\n when: 'File ID is invalid',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * Get file versions.\n */\nexport const GetVersionsContract = defineQuery({\n meta: {\n key: 'file.version.list',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'version', 'list'],\n description: 'Get file version history.',\n goal: 'View all versions of a file.',\n context: 'Called to browse file history.',\n },\n io: {\n input: GetVersionsInput,\n output: GetVersionsOutput,\n errors: {\n FILE_NOT_FOUND: {\n description: 'File does not exist',\n http: 404,\n gqlCode: 'FILE_NOT_FOUND',\n when: 'File ID is invalid',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * Attach a file to an entity.\n */\nexport const AttachFileContract = defineCommand({\n meta: {\n key: 'attachment.attach',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'attachment', 'attach'],\n description: 'Attach a file to an entity.',\n goal: 'Link a file to a business entity.',\n context: 'Called when associating files with entities.',\n },\n io: {\n input: AttachFileInput,\n output: AttachmentModel,\n errors: {\n FILE_NOT_FOUND: {\n description: 'File does not exist',\n http: 404,\n gqlCode: 'FILE_NOT_FOUND',\n when: 'File ID is invalid',\n },\n ATTACHMENT_EXISTS: {\n description: 'Attachment already exists',\n http: 409,\n gqlCode: 'ATTACHMENT_EXISTS',\n when: 'File is already attached to this entity',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * Detach a file from an entity.\n */\nexport const DetachFileContract = defineCommand({\n meta: {\n key: 'attachment.detach',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'attachment', 'detach'],\n description: 'Detach a file from an entity.',\n goal: 'Remove a file association.',\n context: 'Called when removing file from entity.',\n },\n io: {\n input: DetachFileInput,\n output: SuccessOutput,\n errors: {\n ATTACHMENT_NOT_FOUND: {\n description: 'Attachment does not exist',\n http: 404,\n gqlCode: 'ATTACHMENT_NOT_FOUND',\n when: 'Attachment ID is invalid',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * List attachments for an entity.\n */\nexport const ListAttachmentsContract = defineQuery({\n meta: {\n key: 'attachment.list',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'attachment', 'list'],\n description: 'List attachments for an entity.',\n goal: 'Get all files attached to an entity.',\n context: 'Called to display attached files.',\n },\n io: {\n input: ListAttachmentsInput,\n output: ListAttachmentsOutput,\n },\n policy: {\n auth: 'user',\n },\n});\n\n/**\n * Create a presigned upload URL.\n */\nexport const CreatePresignedUrlContract = defineCommand({\n meta: {\n key: 'file.presignedUrl.create',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['files', 'presigned', 'upload'],\n description: 'Create a presigned URL for direct upload.',\n goal: 'Enable direct-to-storage uploads.',\n context: 'Called for large file uploads.',\n },\n io: {\n input: CreatePresignedUrlInput,\n output: PresignedUrlModel,\n errors: {\n FILE_TOO_LARGE: {\n description: 'File exceeds size limit',\n http: 413,\n gqlCode: 'FILE_TOO_LARGE',\n when: 'Requested file size exceeds limit',\n },\n INVALID_MIME_TYPE: {\n description: 'MIME type not allowed',\n http: 415,\n gqlCode: 'INVALID_MIME_TYPE',\n when: 'File type is not in allowed list',\n },\n },\n },\n policy: {\n auth: 'user',\n },\n});\n"],"mapp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QAAQ;GACN,gBAAgB;IACd,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACD,mBAAmB;IACjB,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACF;EACF;CACD,QAAQ,EACN,MAAM,QACP;CACF,CAAC;;;;AAKF,MAAa,qBAAqB,cAAc;CAC9C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAS;GAAc;GAAS;EACvC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACR,QAAQ,EACN,sBAAsB;GACpB,aAAa;GACb,MAAM;GACN,SAAS;GACT,MAAM;GACP,EACF;EACF;CACD,QAAQ,EACN,MAAM,QACP;CACF,CAAC;;;;AAKF,MAAa,0BAA0B,YAAY;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAS;GAAc;GAAO;EACrC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EACN,MAAM,QACP;CACF,CAAC;;;;AAKF,MAAa,6BAA6B,cAAc;CACtD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAS;GAAa;GAAS;EACtC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACR,QAAQ;GACN,gBAAgB;IACd,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACD,mBAAmB;IACjB,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACF;EACF;CACD,QAAQ,EACN,MAAM,QACP;CACF,CAAC"}
|
package/dist/events.d.ts
CHANGED
|
@@ -106,7 +106,7 @@ declare const FileVersionCreatedEvent: _contractspec_lib_contracts11.EventSpec<_
|
|
|
106
106
|
isOptional: false;
|
|
107
107
|
};
|
|
108
108
|
version: {
|
|
109
|
-
type: _contractspec_lib_schema420.FieldType<
|
|
109
|
+
type: _contractspec_lib_schema420.FieldType<string, string>;
|
|
110
110
|
isOptional: false;
|
|
111
111
|
};
|
|
112
112
|
size: {
|
|
@@ -338,7 +338,7 @@ declare const FileEvents: {
|
|
|
338
338
|
isOptional: false;
|
|
339
339
|
};
|
|
340
340
|
version: {
|
|
341
|
-
type: _contractspec_lib_schema420.FieldType<
|
|
341
|
+
type: _contractspec_lib_schema420.FieldType<string, string>;
|
|
342
342
|
isOptional: false;
|
|
343
343
|
};
|
|
344
344
|
size: {
|
package/dist/events.js
CHANGED
|
@@ -109,7 +109,7 @@ const FileVersionCreatedPayload = defineSchemaModel({
|
|
|
109
109
|
isOptional: false
|
|
110
110
|
},
|
|
111
111
|
version: {
|
|
112
|
-
type: ScalarTypeEnum.
|
|
112
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
113
113
|
isOptional: false
|
|
114
114
|
},
|
|
115
115
|
size: {
|
|
@@ -256,7 +256,7 @@ const UploadSessionCompletedPayload = defineSchemaModel({
|
|
|
256
256
|
const FileUploadedEvent = defineEvent({
|
|
257
257
|
meta: {
|
|
258
258
|
key: "file.uploaded",
|
|
259
|
-
version: 1,
|
|
259
|
+
version: "1.0.0",
|
|
260
260
|
description: "A file has been uploaded.",
|
|
261
261
|
stability: "stable",
|
|
262
262
|
owners: ["@platform.files"],
|
|
@@ -270,7 +270,7 @@ const FileUploadedEvent = defineEvent({
|
|
|
270
270
|
const FileUpdatedEvent = defineEvent({
|
|
271
271
|
meta: {
|
|
272
272
|
key: "file.updated",
|
|
273
|
-
version: 1,
|
|
273
|
+
version: "1.0.0",
|
|
274
274
|
description: "A file has been updated.",
|
|
275
275
|
stability: "stable",
|
|
276
276
|
owners: ["@platform.files"],
|
|
@@ -284,7 +284,7 @@ const FileUpdatedEvent = defineEvent({
|
|
|
284
284
|
const FileDeletedEvent = defineEvent({
|
|
285
285
|
meta: {
|
|
286
286
|
key: "file.deleted",
|
|
287
|
-
version: 1,
|
|
287
|
+
version: "1.0.0",
|
|
288
288
|
description: "A file has been deleted.",
|
|
289
289
|
stability: "stable",
|
|
290
290
|
owners: ["@platform.files"],
|
|
@@ -298,7 +298,7 @@ const FileDeletedEvent = defineEvent({
|
|
|
298
298
|
const FileVersionCreatedEvent = defineEvent({
|
|
299
299
|
meta: {
|
|
300
300
|
key: "file.version_created",
|
|
301
|
-
version: 1,
|
|
301
|
+
version: "1.0.0",
|
|
302
302
|
description: "A new file version has been created.",
|
|
303
303
|
stability: "stable",
|
|
304
304
|
owners: ["@platform.files"],
|
|
@@ -316,7 +316,7 @@ const FileVersionCreatedEvent = defineEvent({
|
|
|
316
316
|
const AttachmentAttachedEvent = defineEvent({
|
|
317
317
|
meta: {
|
|
318
318
|
key: "attachment.attached",
|
|
319
|
-
version: 1,
|
|
319
|
+
version: "1.0.0",
|
|
320
320
|
description: "A file has been attached to an entity.",
|
|
321
321
|
stability: "stable",
|
|
322
322
|
owners: ["@platform.files"],
|
|
@@ -334,7 +334,7 @@ const AttachmentAttachedEvent = defineEvent({
|
|
|
334
334
|
const AttachmentDetachedEvent = defineEvent({
|
|
335
335
|
meta: {
|
|
336
336
|
key: "attachment.detached",
|
|
337
|
-
version: 1,
|
|
337
|
+
version: "1.0.0",
|
|
338
338
|
description: "A file has been detached from an entity.",
|
|
339
339
|
stability: "stable",
|
|
340
340
|
owners: ["@platform.files"],
|
|
@@ -352,7 +352,7 @@ const AttachmentDetachedEvent = defineEvent({
|
|
|
352
352
|
const UploadSessionStartedEvent = defineEvent({
|
|
353
353
|
meta: {
|
|
354
354
|
key: "upload.session_started",
|
|
355
|
-
version: 1,
|
|
355
|
+
version: "1.0.0",
|
|
356
356
|
description: "An upload session has started.",
|
|
357
357
|
stability: "stable",
|
|
358
358
|
owners: ["@platform.files"],
|
|
@@ -371,7 +371,7 @@ const UploadSessionStartedEvent = defineEvent({
|
|
|
371
371
|
const UploadSessionCompletedEvent = defineEvent({
|
|
372
372
|
meta: {
|
|
373
373
|
key: "upload.session_completed",
|
|
374
|
-
version: 1,
|
|
374
|
+
version: "1.0.0",
|
|
375
375
|
description: "An upload session has completed.",
|
|
376
376
|
stability: "stable",
|
|
377
377
|
owners: ["@platform.files"],
|
package/dist/events.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","names":[],"sources":["../src/events.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineEvent } from '@contractspec/lib.contracts';\n\n// ============ Event Payloads ============\n\nconst FileUploadedPayload = defineSchemaModel({\n name: 'FileUploadedEventPayload',\n description: 'Payload when a file is uploaded',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n mimeType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n size: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n storageProvider: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n uploadedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst FileUpdatedPayload = defineSchemaModel({\n name: 'FileUpdatedEventPayload',\n description: 'Payload when a file is updated',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n changes: { type: ScalarTypeEnum.JSON(), isOptional: false },\n updatedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst FileDeletedPayload = defineSchemaModel({\n name: 'FileDeletedEventPayload',\n description: 'Payload when a file is deleted',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n storageProvider: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n storagePath: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n deletedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n deletedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst FileVersionCreatedPayload = defineSchemaModel({\n name: 'FileVersionCreatedEventPayload',\n description: 'Payload when a file version is created',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n versionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n version: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n size: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n comment: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst AttachmentAttachedPayload = defineSchemaModel({\n name: 'AttachmentAttachedEventPayload',\n description: 'Payload when a file is attached to an entity',\n fields: {\n attachmentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n entityType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n entityId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n attachmentType: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n attachedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n attachedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst AttachmentDetachedPayload = defineSchemaModel({\n name: 'AttachmentDetachedEventPayload',\n description: 'Payload when a file is detached from an entity',\n fields: {\n attachmentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n entityType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n entityId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n detachedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n detachedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst UploadSessionStartedPayload = defineSchemaModel({\n name: 'UploadSessionStartedEventPayload',\n description: 'Payload when an upload session starts',\n fields: {\n sessionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n fileName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n mimeType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n totalSize: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n startedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst UploadSessionCompletedPayload = defineSchemaModel({\n name: 'UploadSessionCompletedEventPayload',\n description: 'Payload when an upload session completes',\n fields: {\n sessionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n fileName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n size: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n// ============ Events ============\n\n/**\n * Emitted when a file is uploaded.\n */\nexport const FileUploadedEvent = defineEvent({\n meta: {\n key: 'file.uploaded',\n version: 1,\n description: 'A file has been uploaded.',\n stability: 'stable',\n owners: ['@platform.files'],\n tags: ['files', 'upload'],\n },\n payload: FileUploadedPayload,\n});\n\n/**\n * Emitted when a file is updated.\n */\nexport const FileUpdatedEvent = defineEvent({\n meta: {\n key: 'file.updated',\n version: 1,\n description: 'A file has been updated.',\n stability: 'stable',\n owners: ['@platform.files'],\n tags: ['files', 'update'],\n },\n payload: FileUpdatedPayload,\n});\n\n/**\n * Emitted when a file is deleted.\n */\nexport const FileDeletedEvent = defineEvent({\n meta: {\n key: 'file.deleted',\n version: 1,\n description: 'A file has been deleted.',\n stability: 'stable',\n owners: ['@platform.files'],\n tags: ['files', 'delete'],\n },\n payload: FileDeletedPayload,\n});\n\n/**\n * Emitted when a file version is created.\n */\nexport const FileVersionCreatedEvent = defineEvent({\n meta: {\n key: 'file.version_created',\n version: 1,\n description: 'A new file version has been created.',\n stability: 'stable',\n owners: ['@platform.files'],\n tags: ['files', 'version', 'create'],\n },\n payload: FileVersionCreatedPayload,\n});\n\n/**\n * Emitted when a file is attached to an entity.\n */\nexport const AttachmentAttachedEvent = defineEvent({\n meta: {\n key: 'attachment.attached',\n version: 1,\n description: 'A file has been attached to an entity.',\n stability: 'stable',\n owners: ['@platform.files'],\n tags: ['files', 'attachment', 'attach'],\n },\n payload: AttachmentAttachedPayload,\n});\n\n/**\n * Emitted when a file is detached from an entity.\n */\nexport const AttachmentDetachedEvent = defineEvent({\n meta: {\n key: 'attachment.detached',\n version: 1,\n description: 'A file has been detached from an entity.',\n stability: 'stable',\n owners: ['@platform.files'],\n tags: ['files', 'attachment', 'detach'],\n },\n payload: AttachmentDetachedPayload,\n});\n\n/**\n * Emitted when an upload session starts.\n */\nexport const UploadSessionStartedEvent = defineEvent({\n meta: {\n key: 'upload.session_started',\n version: 1,\n description: 'An upload session has started.',\n stability: 'stable',\n owners: ['@platform.files'],\n tags: ['files', 'upload', 'session', 'start'],\n },\n payload: UploadSessionStartedPayload,\n});\n\n/**\n * Emitted when an upload session completes.\n */\nexport const UploadSessionCompletedEvent = defineEvent({\n meta: {\n key: 'upload.session_completed',\n version: 1,\n description: 'An upload session has completed.',\n stability: 'stable',\n owners: ['@platform.files'],\n tags: ['files', 'upload', 'session', 'complete'],\n },\n payload: UploadSessionCompletedPayload,\n});\n\n/**\n * All file events.\n */\nexport const FileEvents = {\n FileUploadedEvent,\n FileUpdatedEvent,\n FileDeletedEvent,\n FileVersionCreatedEvent,\n A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AW;EACjD;CACD,SAAS;CACV,CAAC;;;;AAKF,MAAa,aAAa;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD"}
|
|
1
|
+
{"version":3,"file":"events.js","names":[],"sources":["../src/events.ts"],"sourcesContent":["import { ScalarTypeEnum, defineSchemaModel } from '@contractspec/lib.schema';\nimport { defineEvent } from '@contractspec/lib.contracts';\n\n// ============ Event Payloads ============\n\nconst FileUploadedPayload = defineSchemaModel({\n name: 'FileUploadedEventPayload',\n description: 'Payload when a file is uploaded',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n mimeType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n size: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n storageProvider: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n uploadedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst FileUpdatedPayload = defineSchemaModel({\n name: 'FileUpdatedEventPayload',\n description: 'Payload when a file is updated',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n changes: { type: ScalarTypeEnum.JSON(), isOptional: false },\n updatedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst FileDeletedPayload = defineSchemaModel({\n name: 'FileDeletedEventPayload',\n description: 'Payload when a file is deleted',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n storageProvider: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n storagePath: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n deletedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n deletedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst FileVersionCreatedPayload = defineSchemaModel({\n name: 'FileVersionCreatedEventPayload',\n description: 'Payload when a file version is created',\n fields: {\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n versionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n version: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n size: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n comment: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst AttachmentAttachedPayload = defineSchemaModel({\n name: 'AttachmentAttachedEventPayload',\n description: 'Payload when a file is attached to an entity',\n fields: {\n attachmentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n entityType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n entityId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n attachmentType: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n attachedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n attachedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst AttachmentDetachedPayload = defineSchemaModel({\n name: 'AttachmentDetachedEventPayload',\n description: 'Payload when a file is detached from an entity',\n fields: {\n attachmentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n entityType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n entityId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n detachedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n detachedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst UploadSessionStartedPayload = defineSchemaModel({\n name: 'UploadSessionStartedEventPayload',\n description: 'Payload when an upload session starts',\n fields: {\n sessionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n fileName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n mimeType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n totalSize: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n startedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\nconst UploadSessionCompletedPayload = defineSchemaModel({\n name: 'UploadSessionCompletedEventPayload',\n description: 'Payload when an upload session completes',\n fields: {\n sessionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n fileId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n fileName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n size: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n completedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n// ============ Events ============\n\n/**\n * Emitted when a file is uploaded.\n */\nexport const FileUploadedEvent = defineEvent({\n meta: {\n key: 'file.uploaded',\n version: '1.0.0',\n description: 'A file has been uploaded.',\n stability: 'stable',\n owners: ['@platform.files'],\n tags: ['files', 'upload'],\n },\n payload: FileUploadedPayload,\n});\n\n/**\n * Emitted when a file is updated.\n */\nexport const FileUpdatedEvent = defineEvent({\n meta: {\n key: 'file.updated',\n version: '1.0.0',\n description: 'A file has been updated.',\n stability: 'stable',\n owners: ['@platform.files'],\n tags: ['files', 'update'],\n },\n payload: FileUpdatedPayload,\n});\n\n/**\n * Emitted when a file is deleted.\n */\nexport const FileDeletedEvent = defineEvent({\n meta: {\n key: 'file.deleted',\n version: '1.0.0',\n description: 'A file has been deleted.',\n stability: 'stable',\n owners: ['@platform.files'],\n tags: ['files', 'delete'],\n },\n payload: FileDeletedPayload,\n});\n\n/**\n * Emitted when a file version is created.\n */\nexport const FileVersionCreatedEvent = defineEvent({\n meta: {\n key: 'file.version_created',\n version: '1.0.0',\n description: 'A new file version has been created.',\n stability: 'stable',\n owners: ['@platform.files'],\n tags: ['files', 'version', 'create'],\n },\n payload: FileVersionCreatedPayload,\n});\n\n/**\n * Emitted when a file is attached to an entity.\n */\nexport const AttachmentAttachedEvent = defineEvent({\n meta: {\n key: 'attachment.attached',\n version: '1.0.0',\n description: 'A file has been attached to an entity.',\n stability: 'stable',\n owners: ['@platform.files'],\n tags: ['files', 'attachment', 'attach'],\n },\n payload: AttachmentAttachedPayload,\n});\n\n/**\n * Emitted when a file is detached from an entity.\n */\nexport const AttachmentDetachedEvent = defineEvent({\n meta: {\n key: 'attachment.detached',\n version: '1.0.0',\n description: 'A file has been detached from an entity.',\n stability: 'stable',\n owners: ['@platform.files'],\n tags: ['files', 'attachment', 'detach'],\n },\n payload: AttachmentDetachedPayload,\n});\n\n/**\n * Emitted when an upload session starts.\n */\nexport const UploadSessionStartedEvent = defineEvent({\n meta: {\n key: 'upload.session_started',\n version: '1.0.0',\n description: 'An upload session has started.',\n stability: 'stable',\n owners: ['@platform.files'],\n tags: ['files', 'upload', 'session', 'start'],\n },\n payload: UploadSessionStartedPayload,\n});\n\n/**\n * Emitted when an upload session completes.\n */\nexport const UploadSessionCompletedEvent = defineEvent({\n meta: {\n key: 'upload.session_completed',\n version: '1.0.0',\n description: 'An upload session has completed.',\n stability: 'stable',\n owners: ['@platform.files'],\n tags: ['files', 'upload', 'session', 'complete'],\n },\n payload: UploadSessionCompletedPayload,\n});\n\n/**\n * All file events.\n */\nexport const FileEvents = {\n FileUploadedEvent,\n FileUpdatedEvent,\n FileDeletedEvent,\n FileVersionCreatedEvent,\n AttachmentAttachedEvent,\n AttachmentDetachedEvent,\n UploadSessionStartedEvent,\n UploadSessionCompletedEvent,\n};\n"],"mappings":";;;;AAKA,MAAM,sBAAsB,kBAAkB;CAC5C,MAAM;CACN,aAAa;CACb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@
|
|
|
6
6
|
const FilesFeature = {
|
|
7
7
|
meta: {
|
|
8
8
|
key: "files",
|
|
9
|
-
version: 1,
|
|
9
|
+
version: "1.0.0",
|
|
10
10
|
title: "File Management",
|
|
11
11
|
description: "File upload, versioning, and attachment management with presigned URLs",
|
|
12
12
|
domain: "platform",
|
|
@@ -22,85 +22,85 @@ const FilesFeature = {
|
|
|
22
22
|
operations: [
|
|
23
23
|
{
|
|
24
24
|
key: "file.upload",
|
|
25
|
-
version: 1
|
|
25
|
+
version: "1.0.0"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
key: "file.update",
|
|
29
|
-
version: 1
|
|
29
|
+
version: "1.0.0"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
key: "file.delete",
|
|
33
|
-
version: 1
|
|
33
|
+
version: "1.0.0"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
key: "file.get",
|
|
37
|
-
version: 1
|
|
37
|
+
version: "1.0.0"
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
key: "file.list",
|
|
41
|
-
version: 1
|
|
41
|
+
version: "1.0.0"
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
key: "file.downloadUrl",
|
|
45
|
-
version: 1
|
|
45
|
+
version: "1.0.0"
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
key: "file.presignedUrl.create",
|
|
49
|
-
version: 1
|
|
49
|
+
version: "1.0.0"
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
key: "file.version.create",
|
|
53
|
-
version: 1
|
|
53
|
+
version: "1.0.0"
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
key: "file.version.list",
|
|
57
|
-
version: 1
|
|
57
|
+
version: "1.0.0"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
key: "attachment.attach",
|
|
61
|
-
version: 1
|
|
61
|
+
version: "1.0.0"
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
key: "attachment.detach",
|
|
65
|
-
version: 1
|
|
65
|
+
version: "1.0.0"
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
key: "attachment.list",
|
|
69
|
-
version: 1
|
|
69
|
+
version: "1.0.0"
|
|
70
70
|
}
|
|
71
71
|
],
|
|
72
72
|
events: [
|
|
73
73
|
{
|
|
74
74
|
key: "file.uploaded",
|
|
75
|
-
version: 1
|
|
75
|
+
version: "1.0.0"
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
key: "file.updated",
|
|
79
|
-
version: 1
|
|
79
|
+
version: "1.0.0"
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
key: "file.deleted",
|
|
83
|
-
version: 1
|
|
83
|
+
version: "1.0.0"
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
key: "file.version_created",
|
|
87
|
-
version: 1
|
|
87
|
+
version: "1.0.0"
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
key: "attachment.attached",
|
|
91
|
-
version: 1
|
|
91
|
+
version: "1.0.0"
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
key: "attachment.detached",
|
|
95
|
-
version: 1
|
|
95
|
+
version: "1.0.0"
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
key: "upload.session_started",
|
|
99
|
-
version: 1
|
|
99
|
+
version: "1.0.0"
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
key: "upload.session_completed",
|
|
103
|
-
version: 1
|
|
103
|
+
version: "1.0.0"
|
|
104
104
|
}
|
|
105
105
|
],
|
|
106
106
|
presentations: [],
|
|
@@ -109,14 +109,14 @@ const FilesFeature = {
|
|
|
109
109
|
capabilities: {
|
|
110
110
|
provides: [{
|
|
111
111
|
key: "files",
|
|
112
|
-
version: 1
|
|
112
|
+
version: "1.0.0"
|
|
113
113
|
}, {
|
|
114
114
|
key: "attachments",
|
|
115
|
-
version: 1
|
|
115
|
+
version: "1.0.0"
|
|
116
116
|
}],
|
|
117
117
|
requires: [{
|
|
118
118
|
key: "identity",
|
|
119
|
-
version: 1
|
|
119
|
+
version: "1.0.0"
|
|
120
120
|
}]
|
|
121
121
|
}
|
|
122
122
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.feature.js","names":["FilesFeature: FeatureModuleSpec"],"sources":["../src/files.feature.ts"],"sourcesContent":["/**\n * Files Feature Module Specification\n *\n * Defines the feature module for file management capabilities.\n */\nimport type { FeatureModuleSpec } from '@contractspec/lib.contracts';\n\n/**\n * Files feature module that bundles file upload, versioning,\n * and attachment management capabilities.\n */\nexport const FilesFeature: FeatureModuleSpec = {\n meta: {\n key: 'files',\n version: 1,\n title: 'File Management',\n description:\n 'File upload, versioning, and attachment management with presigned URLs',\n domain: 'platform',\n owners: ['@platform.files'],\n tags: ['files', 'upload', 'attachments', 'storage'],\n stability: 'stable',\n },\n\n // All contract operations included in this feature\n operations: [\n // File CRUD operations\n { key: 'file.upload', version: 1 },\n { key: 'file.update', version: 1 },\n { key: 'file.delete', version: 1 },\n { key: 'file.get', version: 1 },\n { key: 'file.list', version: 1 },\n { key: 'file.downloadUrl', version: 1 },\n { key: 'file.presignedUrl.create', version: 1 },\n\n // Version operations\n { key: 'file.version.create', version: 1 },\n { key: 'file.version.list', version: 1 },\n\n // Attachment operations\n { key: 'attachment.attach', version: 1 },\n { key: 'attachment.detach', version: 1 },\n { key: 'attachment.list', version: 1 },\n ],\n\n // Events emitted by this feature\n events: [\n // File events\n { key: 'file.uploaded', version: 1 },\n { key: 'file.updated', version: 1 },\n { key: 'file.deleted', version: 1 },\n { key: 'file.version_created', version: 1 },\n\n // Attachment events\n { key: 'attachment.attached', version: 1 },\n { key: 'attachment.detached', version: 1 },\n\n // Upload session events\n { key: 'upload.session_started', version: 1 },\n { key: 'upload.session_completed', version: 1 },\n ],\n\n // No presentations for this library feature\n presentations: [],\n opToPresentation: [],\n presentationsTargets: [],\n\n // Capability definitions\n capabilities: {\n provides: [\n { key: 'files', version: 1 },\n { key: 'attachments', version: 1 },\n ],\n requires: [{ key: 'identity', version: 1 }],\n },\n};\n"],"mappings":";;;;;AAWA,MAAaA,eAAkC;CAC7C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,kBAAkB;EAC3B,MAAM;GAAC;GAAS;GAAU;GAAe;GAAU;EACnD,WAAW;EACZ;CAGD,YAAY;EAEV;GAAE,KAAK;GAAe,SAAS;
|
|
1
|
+
{"version":3,"file":"files.feature.js","names":["FilesFeature: FeatureModuleSpec"],"sources":["../src/files.feature.ts"],"sourcesContent":["/**\n * Files Feature Module Specification\n *\n * Defines the feature module for file management capabilities.\n */\nimport type { FeatureModuleSpec } from '@contractspec/lib.contracts';\n\n/**\n * Files feature module that bundles file upload, versioning,\n * and attachment management capabilities.\n */\nexport const FilesFeature: FeatureModuleSpec = {\n meta: {\n key: 'files',\n version: '1.0.0',\n title: 'File Management',\n description:\n 'File upload, versioning, and attachment management with presigned URLs',\n domain: 'platform',\n owners: ['@platform.files'],\n tags: ['files', 'upload', 'attachments', 'storage'],\n stability: 'stable',\n },\n\n // All contract operations included in this feature\n operations: [\n // File CRUD operations\n { key: 'file.upload', version: '1.0.0' },\n { key: 'file.update', version: '1.0.0' },\n { key: 'file.delete', version: '1.0.0' },\n { key: 'file.get', version: '1.0.0' },\n { key: 'file.list', version: '1.0.0' },\n { key: 'file.downloadUrl', version: '1.0.0' },\n { key: 'file.presignedUrl.create', version: '1.0.0' },\n\n // Version operations\n { key: 'file.version.create', version: '1.0.0' },\n { key: 'file.version.list', version: '1.0.0' },\n\n // Attachment operations\n { key: 'attachment.attach', version: '1.0.0' },\n { key: 'attachment.detach', version: '1.0.0' },\n { key: 'attachment.list', version: '1.0.0' },\n ],\n\n // Events emitted by this feature\n events: [\n // File events\n { key: 'file.uploaded', version: '1.0.0' },\n { key: 'file.updated', version: '1.0.0' },\n { key: 'file.deleted', version: '1.0.0' },\n { key: 'file.version_created', version: '1.0.0' },\n\n // Attachment events\n { key: 'attachment.attached', version: '1.0.0' },\n { key: 'attachment.detached', version: '1.0.0' },\n\n // Upload session events\n { key: 'upload.session_started', version: '1.0.0' },\n { key: 'upload.session_completed', version: '1.0.0' },\n ],\n\n // No presentations for this library feature\n presentations: [],\n opToPresentation: [],\n presentationsTargets: [],\n\n // Capability definitions\n capabilities: {\n provides: [\n { key: 'files', version: '1.0.0' },\n { key: 'attachments', version: '1.0.0' },\n ],\n requires: [{ key: 'identity', version: '1.0.0' }],\n },\n};\n"],"mappings":";;;;;AAWA,MAAaA,eAAkC;CAC7C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,kBAAkB;EAC3B,MAAM;GAAC;GAAS;GAAU;GAAe;GAAU;EACnD,WAAW;EACZ;CAGD,YAAY;EAEV;GAAE,KAAK;GAAe,SAAS;GAAS;EACxC;GAAE,KAAK;GAAe,SAAS;GAAS;EACxC;GAAE,KAAK;GAAe,SAAS;GAAS;EACxC;GAAE,KAAK;GAAY,SAAS;GAAS;EACrC;GAAE,KAAK;GAAa,SAAS;GAAS;EACtC;GAAE,KAAK;GAAoB,SAAS;GAAS;EAC7C;GAAE,KAAK;GAA4B,SAAS;GAAS;EAGrD;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAAqB,SAAS;GAAS;EAG9C;GAAE,KAAK;GAAqB,SAAS;GAAS;EAC9C;GAAE,KAAK;GAAqB,SAAS;GAAS;EAC9C;GAAE,KAAK;GAAmB,SAAS;GAAS;EAC7C;CAGD,QAAQ;EAEN;GAAE,KAAK;GAAiB,SAAS;GAAS;EAC1C;GAAE,KAAK;GAAgB,SAAS;GAAS;EACzC;GAAE,KAAK;GAAgB,SAAS;GAAS;EACzC;GAAE,KAAK;GAAwB,SAAS;GAAS;EAGjD;GAAE,KAAK;GAAuB,SAAS;GAAS;EAChD;GAAE,KAAK;GAAuB,SAAS;GAAS;EAGhD;GAAE,KAAK;GAA0B,SAAS;GAAS;EACnD;GAAE,KAAK;GAA4B,SAAS;GAAS;EACtD;CAGD,eAAe,EAAE;CACjB,kBAAkB,EAAE;CACpB,sBAAsB,EAAE;CAGxB,cAAc;EACZ,UAAU,CACR;GAAE,KAAK;GAAS,SAAS;GAAS,EAClC;GAAE,KAAK;GAAe,SAAS;GAAS,CACzC;EACD,UAAU,CAAC;GAAE,KAAK;GAAY,SAAS;GAAS,CAAC;EAClD;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/lib.files",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.45.1",
|
|
4
4
|
"description": "Files, documents and attachments module for ContractSpec applications",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"contractspec",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"lint:check": "eslint src"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@contractspec/lib.schema": "1.
|
|
30
|
-
"@contractspec/lib.contracts": "1.
|
|
29
|
+
"@contractspec/lib.schema": "1.45.1",
|
|
30
|
+
"@contractspec/lib.contracts": "1.45.1",
|
|
31
31
|
"zod": "^4.1.13"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@contractspec/tool.typescript": "1.
|
|
35
|
-
"@contractspec/tool.tsdown": "1.
|
|
34
|
+
"@contractspec/tool.typescript": "1.45.1",
|
|
35
|
+
"@contractspec/tool.tsdown": "1.45.1",
|
|
36
36
|
"typescript": "^5.9.3"
|
|
37
37
|
},
|
|
38
38
|
"exports": {
|