@drawcall/market 0.7.1 → 0.8.0
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/v1/contract.d.ts +2 -37
- package/dist/v1/contract.d.ts.map +1 -1
- package/dist/v1/contract.js +1 -20
- package/dist/v1/contract.js.map +1 -1
- package/package.json +1 -1
- package/src/v1/contract.ts +1 -28
package/dist/v1/contract.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { AssetDependencies
|
|
3
|
-
import type {
|
|
2
|
+
import type { AssetDependencies } from '../schemas.js';
|
|
3
|
+
import type { AssetFileEntry, AssetInstallMetadata, AssetSearchResult, AssetVersion, PaginatedList, User } from '../contract.js';
|
|
4
4
|
/**
|
|
5
5
|
* The v1 manifest of an asset version — the one linkable, cacheable answer to "what is this
|
|
6
6
|
* version": its metadata plus every stored file with a fetch-ready content-plane URL, the preview
|
|
@@ -63,41 +63,6 @@ export declare const contract: {
|
|
|
63
63
|
relevance: "relevance";
|
|
64
64
|
}>>;
|
|
65
65
|
}, z.core.$strip>]>, z.ZodCustom<AssetRefsResult | PaginatedList<AssetSearchResult>, AssetRefsResult | PaginatedList<AssetSearchResult>>, Record<never, never>, Record<never, never>>;
|
|
66
|
-
exact: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
67
|
-
name: z.ZodString;
|
|
68
|
-
type: z.ZodOptional<z.ZodEnum<{
|
|
69
|
-
model: "model";
|
|
70
|
-
"humanoid-model": "humanoid-model";
|
|
71
|
-
texture: "texture";
|
|
72
|
-
"humanoid-animation": "humanoid-animation";
|
|
73
|
-
template: "template";
|
|
74
|
-
"sound-effect": "sound-effect";
|
|
75
|
-
"background-music": "background-music";
|
|
76
|
-
environment: "environment";
|
|
77
|
-
flipbook: "flipbook";
|
|
78
|
-
}>>;
|
|
79
|
-
version: z.ZodOptional<z.ZodString>;
|
|
80
|
-
includeUnapproved: z.ZodDefault<z.ZodBoolean>;
|
|
81
|
-
key: z.ZodOptional<z.ZodString>;
|
|
82
|
-
}, z.core.$strip>, z.ZodCustom<AssetExactResult | null, AssetExactResult | null>, Record<never, never>, Record<never, never>>;
|
|
83
|
-
manifest: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
84
|
-
name: z.ZodString;
|
|
85
|
-
version: z.ZodString;
|
|
86
|
-
key: z.ZodOptional<z.ZodString>;
|
|
87
|
-
}, z.core.$strip>, z.ZodCustom<AssetVersionManifest, AssetVersionManifest>, Record<never, never>, Record<never, never>>;
|
|
88
|
-
files: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
89
|
-
name: z.ZodString;
|
|
90
|
-
version: z.ZodString;
|
|
91
|
-
key: z.ZodOptional<z.ZodString>;
|
|
92
|
-
}, z.core.$strip>, z.ZodCustom<{
|
|
93
|
-
files: AssetFileEntry[];
|
|
94
|
-
}, {
|
|
95
|
-
files: AssetFileEntry[];
|
|
96
|
-
}>, Record<never, never>, Record<never, never>>;
|
|
97
|
-
versions: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
98
|
-
name: z.ZodString;
|
|
99
|
-
key: z.ZodOptional<z.ZodString>;
|
|
100
|
-
}, z.core.$strip>, z.ZodCustom<AssetVersionsResult, AssetVersionsResult>, Record<never, never>, Record<never, never>>;
|
|
101
66
|
uploadZip: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
102
67
|
name: z.ZodString;
|
|
103
68
|
type: z.ZodEnum<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/v1/contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","s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M;uBAAa,IAAI;;;;;;;CAMvD,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,OAAO,QAAQ,CAAA"}
|
package/dist/v1/contract.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { oc } from '@orpc/contract';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { MAX_UPLOAD_ZIP_SIZE_BYTES, agentRunStatusSchema, agentStartSchema, agentStatusSchema,
|
|
3
|
+
import { MAX_UPLOAD_ZIP_SIZE_BYTES, agentRunStatusSchema, agentStartSchema, agentStatusSchema, assetRefsSchema, generateAssetSchema, generateJobStatusSchema, generateResponseSchema, generateStatusInputSchema, listAssetsSchema, updateProfileSchema, uploadZipSchema, } from '../schemas.js';
|
|
4
4
|
/**
|
|
5
5
|
* The v1 contract: the same procedure tree as the legacy RPC surface (so call sites migrate by
|
|
6
6
|
* swapping only the client), with HTTP routes attached — served as plain REST under `/api/v1`.
|
|
@@ -15,25 +15,6 @@ export const contract = {
|
|
|
15
15
|
.route({ method: 'GET', path: '/assets' })
|
|
16
16
|
.input(z.union([assetRefsSchema, listAssetsSchema]))
|
|
17
17
|
.output(z.custom()),
|
|
18
|
-
exact: oc
|
|
19
|
-
.route({ method: 'GET', path: '/assets/{name}' })
|
|
20
|
-
.input(exactAssetSchema)
|
|
21
|
-
.output(z.custom()),
|
|
22
|
-
// The manifest is new in v1 — it merges the legacy `files` + metadata into one GET.
|
|
23
|
-
manifest: oc
|
|
24
|
-
.route({ method: 'GET', path: '/assets/{name}/{version}' })
|
|
25
|
-
.input(assetFilesSchema)
|
|
26
|
-
.output(z.custom()),
|
|
27
|
-
files: oc
|
|
28
|
-
.route({ method: 'GET', path: '/assets/{name}/{version}/files' })
|
|
29
|
-
.input(assetFilesSchema)
|
|
30
|
-
.output(z.custom()),
|
|
31
|
-
// Every published version of an asset. Feeds multi-version content matching: without a local
|
|
32
|
-
// lockfile the installed version is unknown, so clients merge hashes across the range.
|
|
33
|
-
versions: oc
|
|
34
|
-
.route({ method: 'GET', path: '/assets/{name}/versions' })
|
|
35
|
-
.input(assetVersionsSchema)
|
|
36
|
-
.output(z.custom()),
|
|
37
18
|
uploadZip: oc
|
|
38
19
|
.route({ method: 'PUT', path: '/assets/{name}/{version}' })
|
|
39
20
|
.input(uploadZipSchema
|
package/dist/v1/contract.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../src/v1/contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AACnC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../src/v1/contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AACnC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAUvB,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,GAChB,MAAM,eAAe,CAAA;AAkCtB;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,KAAK,EAAE;QACL,6EAA6E;QAC7E,wEAAwE;QACxE,mEAAmE;QACnE,MAAM,EAAE,EAAE;aACP,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;aACzC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC,CAAC;aACnD,MAAM,CAAC,CAAC,CAAC,MAAM,EAAsD,CAAC;QAEzE,SAAS,EAAE,EAAE;aACV,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,0BAA0B,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B,CAAC;iBACxB,MAAM,CAAC,oBAAoB,CAAC;SAChC;KACF;IAED,IAAI,EAAE;QACJ,UAAU,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAe,CAAC;QAEpF,aAAa,EAAE,EAAE;aACd,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;aACvC,KAAK,CAAC,mBAAmB,CAAC;aAC1B,MAAM,CAAC,CAAC,CAAC,MAAM,EAAQ,CAAC;QAE3B,YAAY,EAAE,EAAE;aACb,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;aAChD,MAAM,CAAC,CAAC,CAAC,MAAM,EAA8C,CAAC;QAEjE,eAAe,EAAE,EAAE;aAChB,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;aACjD,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;KAC/D;CACF,CAAA"}
|
package/package.json
CHANGED
package/src/v1/contract.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { oc } from '@orpc/contract'
|
|
2
2
|
import { z } from 'zod'
|
|
3
|
-
import type { AssetDependencies
|
|
3
|
+
import type { AssetDependencies } from '../schemas.js'
|
|
4
4
|
import type {
|
|
5
|
-
AssetExactResult,
|
|
6
5
|
AssetFileEntry,
|
|
7
6
|
AssetInstallMetadata,
|
|
8
7
|
AssetSearchResult,
|
|
@@ -15,10 +14,7 @@ import {
|
|
|
15
14
|
agentRunStatusSchema,
|
|
16
15
|
agentStartSchema,
|
|
17
16
|
agentStatusSchema,
|
|
18
|
-
assetFilesSchema,
|
|
19
17
|
assetRefsSchema,
|
|
20
|
-
assetVersionsSchema,
|
|
21
|
-
exactAssetSchema,
|
|
22
18
|
generateAssetSchema,
|
|
23
19
|
generateJobStatusSchema,
|
|
24
20
|
generateResponseSchema,
|
|
@@ -75,29 +71,6 @@ export const contract = {
|
|
|
75
71
|
.input(z.union([assetRefsSchema, listAssetsSchema]))
|
|
76
72
|
.output(z.custom<PaginatedList<AssetSearchResult> | AssetRefsResult>()),
|
|
77
73
|
|
|
78
|
-
exact: oc
|
|
79
|
-
.route({ method: 'GET', path: '/assets/{name}' })
|
|
80
|
-
.input(exactAssetSchema)
|
|
81
|
-
.output(z.custom<AssetExactResult | null>()),
|
|
82
|
-
|
|
83
|
-
// The manifest is new in v1 — it merges the legacy `files` + metadata into one GET.
|
|
84
|
-
manifest: oc
|
|
85
|
-
.route({ method: 'GET', path: '/assets/{name}/{version}' })
|
|
86
|
-
.input(assetFilesSchema)
|
|
87
|
-
.output(z.custom<AssetVersionManifest>()),
|
|
88
|
-
|
|
89
|
-
files: oc
|
|
90
|
-
.route({ method: 'GET', path: '/assets/{name}/{version}/files' })
|
|
91
|
-
.input(assetFilesSchema)
|
|
92
|
-
.output(z.custom<{ files: AssetFileEntry[] }>()),
|
|
93
|
-
|
|
94
|
-
// Every published version of an asset. Feeds multi-version content matching: without a local
|
|
95
|
-
// lockfile the installed version is unknown, so clients merge hashes across the range.
|
|
96
|
-
versions: oc
|
|
97
|
-
.route({ method: 'GET', path: '/assets/{name}/versions' })
|
|
98
|
-
.input(assetVersionsSchema)
|
|
99
|
-
.output(z.custom<AssetVersionsResult>()),
|
|
100
|
-
|
|
101
74
|
uploadZip: oc
|
|
102
75
|
.route({ method: 'PUT', path: '/assets/{name}/{version}' })
|
|
103
76
|
.input(
|