@yargote/artifacts-contracts 0.1.0-beta.1 → 0.1.0-beta.3
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/README.md +1 -1
- package/package.json +1 -1
- package/src/index.d.ts +11 -0
- package/src/index.js +2 -0
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
`@yargote/artifacts-contracts` contains strict domain schemas, types, `ArtifactError`, snapshot serialization, and pure retained-edit helpers. It has no database, ZIP, server, or CLI dependency. Node 24 or later is required.
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
|
-
npm install @yargote/artifacts-contracts@0.1.0-beta.
|
|
6
|
+
npm install @yargote/artifacts-contracts@0.1.0-beta.3
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
The root export contains domain schemas and types. `/workflow` contains `prepareArtifactEdit`, revision comparison, and compact projections. `/serialization` contains canonical JSON and SHA-256. `/http` contains HTTP response schemas, identity, canonical resource validation, and route URL helpers.
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -101,6 +101,17 @@ export declare const publishSchema: z.ZodObject<{
|
|
|
101
101
|
revisionId: z.ZodString;
|
|
102
102
|
expectedPublicationVersion: z.ZodNumber;
|
|
103
103
|
}, z.core.$strict>;
|
|
104
|
+
export declare const deleteSchema: z.ZodObject<{
|
|
105
|
+
requestId: z.ZodString;
|
|
106
|
+
artifactId: z.ZodString;
|
|
107
|
+
expectedRevisionId: z.ZodString;
|
|
108
|
+
expectedPublicationVersion: z.ZodNumber;
|
|
109
|
+
}, z.core.$strict>;
|
|
110
|
+
export declare const deleteResultSchema: z.ZodObject<{
|
|
111
|
+
artifactId: z.ZodString;
|
|
112
|
+
}, z.core.$strict>;
|
|
113
|
+
export type DeleteInput = z.infer<typeof deleteSchema>;
|
|
114
|
+
export type DeleteResult = z.infer<typeof deleteResultSchema>;
|
|
104
115
|
export declare const exportSchema: z.ZodObject<{
|
|
105
116
|
artifactId: z.ZodString;
|
|
106
117
|
revisionId: z.ZodString;
|
package/src/index.js
CHANGED
|
@@ -27,6 +27,8 @@ export const createSchema = z.strictObject({ requestId, snapshot: snapshotSchema
|
|
|
27
27
|
export const readSchema = z.strictObject({ artifactId: identifier, revisionId: identifier.optional(), response });
|
|
28
28
|
export const updateSchema = z.strictObject({ requestId, artifactId: identifier, expectedRevisionId: identifier, snapshot: snapshotSchema, response });
|
|
29
29
|
export const publishSchema = z.strictObject({ requestId, artifactId: identifier, revisionId: identifier, expectedPublicationVersion: z.number().int().nonnegative() });
|
|
30
|
+
export const deleteSchema = z.strictObject({ requestId, artifactId: identifier, expectedRevisionId: identifier, expectedPublicationVersion: z.number().int().nonnegative() });
|
|
31
|
+
export const deleteResultSchema = z.strictObject({ artifactId: identifier });
|
|
30
32
|
export const exportSchema = z.strictObject({ artifactId: identifier, revisionId: identifier });
|
|
31
33
|
export const listSchema = z.strictObject({ limit: z.number().int().min(1).max(100).default(25), cursor: identifier.optional() });
|
|
32
34
|
export const libraryQuerySchema = z.strictObject({
|