@mestra-dev/contract 0.0.91 → 0.0.93
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/index.d.ts +165 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -98,7 +98,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
readonly name: "Files";
|
|
101
|
-
readonly description: "S3 file upload (presigned POST to a temporary `.tmp` key), confirm (magic-byte validation then promote to final key), optional nested folder destination under `{workspace}/folders/{path}/`, profile and workspace picture upload/confirm/delete, comment attachment upload/confirm, list task comment files with download URLs, folder create/delete (nested paths), list (includes pin metadata; excludes `.tmp` objects), storage usage, pin/unpin, download by relative path, move, and file delete. General uploads accept JPEG/PNG/WebP/PDF; profile/workspace pictures accept JPEG/PNG only (0.5 MB). Workspace file routes require active collaborator status and crm::files access; comment attachments require crm::tasks write/read.";
|
|
101
|
+
readonly description: "S3 file upload (presigned POST to a temporary `.tmp` key), confirm (magic-byte validation then promote to final key), optional nested folder destination under `{workspace}/folders/{path}/`, profile and workspace picture upload/confirm/delete, comment attachment upload/confirm, list task comment files with download URLs, service file upload/confirm/delete, list service files with download URLs, folder create/delete (nested paths), list (includes pin metadata; excludes `.tmp` objects), storage usage, pin/unpin, download by relative path, move, and file delete. General uploads accept JPEG/PNG/WebP/PDF; profile/workspace pictures accept JPEG/PNG only (0.5 MB). Workspace file routes require active collaborator status and crm::files access; comment attachments require crm::tasks write/read; service files require crm::services write/read.";
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
readonly name: "Chat";
|
|
@@ -1939,6 +1939,64 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1939
1939
|
};
|
|
1940
1940
|
};
|
|
1941
1941
|
};
|
|
1942
|
+
readonly ServiceFile: {
|
|
1943
|
+
readonly type: "object";
|
|
1944
|
+
readonly required: readonly [
|
|
1945
|
+
"key",
|
|
1946
|
+
"filename",
|
|
1947
|
+
"commentId",
|
|
1948
|
+
"size",
|
|
1949
|
+
"downloadUrl"
|
|
1950
|
+
];
|
|
1951
|
+
readonly properties: {
|
|
1952
|
+
readonly key: {
|
|
1953
|
+
readonly type: "string";
|
|
1954
|
+
readonly description: "Full S3 object key.";
|
|
1955
|
+
};
|
|
1956
|
+
readonly filename: {
|
|
1957
|
+
readonly type: "string";
|
|
1958
|
+
readonly description: "File name segment after the first path component under the service prefix.";
|
|
1959
|
+
};
|
|
1960
|
+
readonly commentId: {
|
|
1961
|
+
readonly type: "string";
|
|
1962
|
+
readonly description: "First path segment under `{workspace}_services/{serviceId}/`. Kept as `commentId` to match the response payload.";
|
|
1963
|
+
};
|
|
1964
|
+
readonly size: {
|
|
1965
|
+
readonly type: "integer";
|
|
1966
|
+
readonly description: "Object size in bytes.";
|
|
1967
|
+
};
|
|
1968
|
+
readonly lastModified: {
|
|
1969
|
+
readonly type: "string";
|
|
1970
|
+
readonly format: "date-time";
|
|
1971
|
+
readonly nullable: true;
|
|
1972
|
+
readonly description: "Last modified timestamp from S3 (ISO string).";
|
|
1973
|
+
};
|
|
1974
|
+
readonly downloadUrl: {
|
|
1975
|
+
readonly type: "string";
|
|
1976
|
+
readonly description: "Presigned GET URL (5-minute expiry).";
|
|
1977
|
+
};
|
|
1978
|
+
};
|
|
1979
|
+
};
|
|
1980
|
+
readonly ListServiceFilesSuccess: {
|
|
1981
|
+
readonly type: "object";
|
|
1982
|
+
readonly required: readonly [
|
|
1983
|
+
"success",
|
|
1984
|
+
"files"
|
|
1985
|
+
];
|
|
1986
|
+
readonly properties: {
|
|
1987
|
+
readonly success: {
|
|
1988
|
+
readonly type: "boolean";
|
|
1989
|
+
readonly const: true;
|
|
1990
|
+
};
|
|
1991
|
+
readonly files: {
|
|
1992
|
+
readonly type: "array";
|
|
1993
|
+
readonly items: {
|
|
1994
|
+
readonly $ref: "#/components/schemas/ServiceFile";
|
|
1995
|
+
};
|
|
1996
|
+
readonly description: "All non-prefix, non-`.tmp` objects under `{workspace}_services/{serviceId}/`.";
|
|
1997
|
+
};
|
|
1998
|
+
};
|
|
1999
|
+
};
|
|
1942
2000
|
readonly UploadProfilePictureRequest: {
|
|
1943
2001
|
readonly type: "object";
|
|
1944
2002
|
readonly required: readonly [
|
|
@@ -3664,6 +3722,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
3664
3722
|
"id",
|
|
3665
3723
|
"workspaceId",
|
|
3666
3724
|
"workspaceName",
|
|
3725
|
+
"seats",
|
|
3667
3726
|
"planName",
|
|
3668
3727
|
"interval",
|
|
3669
3728
|
"billingCycles",
|
|
@@ -3684,6 +3743,9 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
3684
3743
|
readonly workspaceName: {
|
|
3685
3744
|
readonly type: "string";
|
|
3686
3745
|
};
|
|
3746
|
+
readonly seats: {
|
|
3747
|
+
readonly $ref: "#/components/schemas/WorkspaceMaxCollaborators";
|
|
3748
|
+
};
|
|
3687
3749
|
readonly planName: {
|
|
3688
3750
|
readonly type: "string";
|
|
3689
3751
|
};
|
|
@@ -12636,6 +12698,82 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12636
12698
|
};
|
|
12637
12699
|
};
|
|
12638
12700
|
};
|
|
12701
|
+
readonly "/files/download-from-service/{workspace}/{serviceId}": {
|
|
12702
|
+
readonly get: {
|
|
12703
|
+
readonly tags: readonly [
|
|
12704
|
+
"Files"
|
|
12705
|
+
];
|
|
12706
|
+
readonly summary: "List files for a service";
|
|
12707
|
+
readonly description: "Lists all objects under `{workspace}_services/{serviceId}/` (excluding `.tmp` keys) and returns each with a 5-minute presigned download URL. Requires workspace access and read access to crm::services.";
|
|
12708
|
+
readonly security: readonly [
|
|
12709
|
+
never
|
|
12710
|
+
];
|
|
12711
|
+
readonly parameters: readonly [
|
|
12712
|
+
{
|
|
12713
|
+
readonly name: "workspace";
|
|
12714
|
+
readonly in: "path";
|
|
12715
|
+
readonly required: true;
|
|
12716
|
+
readonly schema: {
|
|
12717
|
+
readonly type: "string";
|
|
12718
|
+
readonly format: "uuid";
|
|
12719
|
+
};
|
|
12720
|
+
readonly description: "Workspace identifier.";
|
|
12721
|
+
},
|
|
12722
|
+
{
|
|
12723
|
+
readonly name: "serviceId";
|
|
12724
|
+
readonly in: "path";
|
|
12725
|
+
readonly required: true;
|
|
12726
|
+
readonly schema: {
|
|
12727
|
+
readonly type: "string";
|
|
12728
|
+
readonly format: "uuid";
|
|
12729
|
+
};
|
|
12730
|
+
readonly description: "Service identifier whose files are listed.";
|
|
12731
|
+
}
|
|
12732
|
+
];
|
|
12733
|
+
readonly responses: {
|
|
12734
|
+
readonly 200: {
|
|
12735
|
+
readonly description: "Service files listed successfully.";
|
|
12736
|
+
readonly content: {
|
|
12737
|
+
readonly "application/json": {
|
|
12738
|
+
readonly schema: {
|
|
12739
|
+
readonly $ref: "#/components/schemas/ListServiceFilesSuccess";
|
|
12740
|
+
};
|
|
12741
|
+
};
|
|
12742
|
+
};
|
|
12743
|
+
};
|
|
12744
|
+
readonly 400: {
|
|
12745
|
+
readonly description: "Invalid workspace or service id.";
|
|
12746
|
+
readonly content: {
|
|
12747
|
+
readonly "application/json": {
|
|
12748
|
+
readonly schema: {
|
|
12749
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
12750
|
+
};
|
|
12751
|
+
};
|
|
12752
|
+
};
|
|
12753
|
+
};
|
|
12754
|
+
readonly 401: {
|
|
12755
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
12756
|
+
readonly content: {
|
|
12757
|
+
readonly "application/json": {
|
|
12758
|
+
readonly schema: {
|
|
12759
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
12760
|
+
};
|
|
12761
|
+
};
|
|
12762
|
+
};
|
|
12763
|
+
};
|
|
12764
|
+
readonly 403: {
|
|
12765
|
+
readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks read access to crm::services.";
|
|
12766
|
+
readonly content: {
|
|
12767
|
+
readonly "application/json": {
|
|
12768
|
+
readonly schema: {
|
|
12769
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
12770
|
+
};
|
|
12771
|
+
};
|
|
12772
|
+
};
|
|
12773
|
+
};
|
|
12774
|
+
};
|
|
12775
|
+
};
|
|
12776
|
+
};
|
|
12639
12777
|
readonly "/files/delete-service-file": {
|
|
12640
12778
|
readonly post: {
|
|
12641
12779
|
readonly tags: readonly [
|
|
@@ -19983,6 +20121,31 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
19983
20121
|
status: 400;
|
|
19984
20122
|
};
|
|
19985
20123
|
};
|
|
20124
|
+
} & {
|
|
20125
|
+
"/download-from-service/:workspace/:serviceId": {
|
|
20126
|
+
$get: {
|
|
20127
|
+
input: {
|
|
20128
|
+
param: {
|
|
20129
|
+
workspace: string;
|
|
20130
|
+
} & {
|
|
20131
|
+
serviceId: string;
|
|
20132
|
+
};
|
|
20133
|
+
};
|
|
20134
|
+
output: {
|
|
20135
|
+
success: true;
|
|
20136
|
+
files: {
|
|
20137
|
+
key: string;
|
|
20138
|
+
filename: string;
|
|
20139
|
+
commentId: string;
|
|
20140
|
+
size: number;
|
|
20141
|
+
lastModified: string | null;
|
|
20142
|
+
downloadUrl: string;
|
|
20143
|
+
}[];
|
|
20144
|
+
};
|
|
20145
|
+
outputFormat: "json";
|
|
20146
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
20147
|
+
};
|
|
20148
|
+
};
|
|
19986
20149
|
} & {
|
|
19987
20150
|
"/delete-service-file": {
|
|
19988
20151
|
$post: {
|
|
@@ -20218,6 +20381,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
20218
20381
|
id: string;
|
|
20219
20382
|
workspaceId: string;
|
|
20220
20383
|
workspaceName: string;
|
|
20384
|
+
seats: number;
|
|
20221
20385
|
planName: string;
|
|
20222
20386
|
interval: string;
|
|
20223
20387
|
billingCycles: number;
|