@localness/contract 0.0.0-stage → 0.1.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/README.md CHANGED
@@ -1,3 +1,25 @@
1
- # Temporary Holding Version
1
+ # @localness/contract
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Response contracts of the Localness public `/api/v1`: [zod](https://zod.dev) schemas and the TypeScript types inferred from them. Meant for callers outside the Localness repo, such as a design-tool plugin or build tooling.
4
+
5
+ ```ts
6
+ import { deliveryMetaSchema, type DeliveryMeta } from '@localness/contract'
7
+
8
+ const meta: DeliveryMeta = deliveryMetaSchema.parse(await res.json())
9
+ ```
10
+
11
+ `zod` ^4 is a peer dependency.
12
+
13
+ ## Versioning
14
+
15
+ Independent of the Localness server version.
16
+
17
+ - A new optional field: minor.
18
+ - A removed, renamed, or retyped field, or a field that stops being optional: major.
19
+ - While the version is `0.x`, breaking changes bump the minor.
20
+
21
+ The schemas are not strict: an unknown field from a newer server is stripped rather than rejected, so an older client keeps working.
22
+
23
+ ## Release
24
+
25
+ Push a tag `contract-v<semver>`. The `contract-release` workflow type-checks, tests, and publishes with npm provenance.
@@ -0,0 +1,272 @@
1
+ import { z } from "zod/v4";
2
+ /** A row id, which the API sends as a number but the UI also carries as text. */
3
+ export declare const idSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
4
+ /**
5
+ * A release label on a project. Filter-only: it groups a project's pages and
6
+ * entries by the version they shipped in, and never carries a second copy of
7
+ * any text.
8
+ */
9
+ export declare const projectReleaseSchema: z.ZodObject<{
10
+ id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
11
+ name: z.ZodString;
12
+ sort: z.ZodNumber;
13
+ createdAt: z.ZodOptional<z.ZodString>;
14
+ updatedAt: z.ZodOptional<z.ZodString>;
15
+ }, z.core.$strip>;
16
+ export type ProjectRelease = z.infer<typeof projectReleaseSchema>;
17
+ /** `POST /api/v1/release-membership` */
18
+ export declare const releaseMembershipResultSchema: z.ZodObject<{
19
+ ok: z.ZodBoolean;
20
+ changed: z.ZodNumber;
21
+ }, z.core.$strip>;
22
+ export type ReleaseMembershipResult = z.infer<typeof releaseMembershipResultSchema>;
23
+ /**
24
+ * Response shapes of the public `/api/v1` delivery API. Callers outside the
25
+ * Localness repo (the design-tool plugin, build tooling) validate against
26
+ * these, so changing a field is a breaking change for them: a removed or
27
+ * retyped field is a major version, a new optional field is a minor one.
28
+ */
29
+ /** Published copy only: `{ locale: { key: text } }`, the map the JSON export uses. */
30
+ export declare const deliveryBundleSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>;
31
+ export type DeliveryBundle = z.infer<typeof deliveryBundleSchema>;
32
+ /** `GET /api/v1/locales/:locale` — `{ key: text }` for one locale. */
33
+ export declare const deliveryLocaleSchema: z.ZodRecord<z.ZodString, z.ZodString>;
34
+ export type DeliveryLocale = z.infer<typeof deliveryLocaleSchema>;
35
+ /** `GET /api/v1/outdated` — locales whose published translation lags the source sentence. */
36
+ export declare const deliveryOutdatedSchema: z.ZodObject<{
37
+ outdated: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
38
+ }, z.core.$strip>;
39
+ export type DeliveryOutdated = z.infer<typeof deliveryOutdatedSchema>;
40
+ /** `GET /api/v1/meta` — what a caller holding only a token learns first. */
41
+ export declare const deliveryMetaSchema: z.ZodObject<{
42
+ project: z.ZodObject<{
43
+ id: z.ZodNumber;
44
+ name: z.ZodString;
45
+ }, z.core.$strip>;
46
+ locales: z.ZodArray<z.ZodString>;
47
+ localeFallback: z.ZodString;
48
+ release: z.ZodNullable<z.ZodNumber>;
49
+ releases: z.ZodArray<z.ZodObject<{
50
+ id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
51
+ name: z.ZodString;
52
+ sort: z.ZodNumber;
53
+ createdAt: z.ZodOptional<z.ZodString>;
54
+ updatedAt: z.ZodOptional<z.ZodString>;
55
+ }, z.core.$strip>>;
56
+ coverage: z.ZodObject<{
57
+ keys: z.ZodNumber;
58
+ projectKeys: z.ZodNumber;
59
+ publishedPerLocale: z.ZodRecord<z.ZodString, z.ZodNumber>;
60
+ }, z.core.$strip>;
61
+ canManageReleases: z.ZodBoolean;
62
+ instance: z.ZodOptional<z.ZodObject<{
63
+ version: z.ZodString;
64
+ plus: z.ZodBoolean;
65
+ }, z.core.$strip>>;
66
+ generatedAt: z.ZodString;
67
+ }, z.core.$strip>;
68
+ export type DeliveryMeta = z.infer<typeof deliveryMetaSchema>;
69
+ /** One project a token may address. */
70
+ export declare const deliveryProjectRefSchema: z.ZodObject<{
71
+ id: z.ZodNumber;
72
+ name: z.ZodString;
73
+ }, z.core.$strip>;
74
+ export type DeliveryProjectRef = z.infer<typeof deliveryProjectRefSchema>;
75
+ /**
76
+ * `GET /api/v1/projects` — which projects this credential can address *now*.
77
+ *
78
+ * A token belongs to a person and may name several projects, so this is the
79
+ * discovery step when the credential itself cannot answer "which one": it is
80
+ * also the list `?project=` accepts. Projects whose team the owner has left are
81
+ * absent, so an empty list means the credential is spent.
82
+ */
83
+ export declare const deliveryProjectsSchema: z.ZodObject<{
84
+ projects: z.ZodArray<z.ZodObject<{
85
+ id: z.ZodNumber;
86
+ name: z.ZodString;
87
+ }, z.core.$strip>>;
88
+ generatedAt: z.ZodString;
89
+ }, z.core.$strip>;
90
+ export type DeliveryProjects = z.infer<typeof deliveryProjectsSchema>;
91
+ /**
92
+ * `GET /api/v1/keys` — names only; text is `/bundle`'s job. Load-bearing as a
93
+ * superset of that bundle's keys: omitting one there breaks a tie silently.
94
+ */
95
+ export declare const deliveryKeysSchema: z.ZodObject<{
96
+ keys: z.ZodArray<z.ZodString>;
97
+ generatedAt: z.ZodString;
98
+ }, z.core.$strip>;
99
+ export type DeliveryKeys = z.infer<typeof deliveryKeysSchema>;
100
+ /**
101
+ * Response shapes of the write half of the public `/api/v1` API, plus the
102
+ * capture reads a design tool needs. Same versioning rule as `delivery.ts`:
103
+ * new fields are additions, removing or retyping one is a major version.
104
+ *
105
+ * `delivery` stays published copy. These shapes are how a plugin sees drafts.
106
+ */
107
+ /** One rectangle as the import API sees it. */
108
+ export declare const importedTagSchema: z.ZodObject<{
109
+ id: z.ZodNumber;
110
+ figmaNodeId: z.ZodNullable<z.ZodString>;
111
+ x: z.ZodNumber;
112
+ y: z.ZodNumber;
113
+ width: z.ZodNumber;
114
+ height: z.ZodNumber;
115
+ i18nKey: z.ZodNullable<z.ZodString>;
116
+ i18nKeyId: z.ZodNullable<z.ZodNumber>;
117
+ }, z.core.$strip>;
118
+ export type ImportedTag = z.infer<typeof importedTagSchema>;
119
+ /** `POST /api/v1/uploads` */
120
+ export declare const uploadResultSchema: z.ZodObject<{
121
+ key: z.ZodString;
122
+ }, z.core.$strip>;
123
+ export type UploadResult = z.infer<typeof uploadResultSchema>;
124
+ /** `POST /api/v1/pages` */
125
+ export declare const createPageResultSchema: z.ZodObject<{
126
+ id: z.ZodNumber;
127
+ name: z.ZodString;
128
+ image: z.ZodNullable<z.ZodString>;
129
+ tags: z.ZodArray<z.ZodObject<{
130
+ id: z.ZodNumber;
131
+ figmaNodeId: z.ZodNullable<z.ZodString>;
132
+ x: z.ZodNumber;
133
+ y: z.ZodNumber;
134
+ width: z.ZodNumber;
135
+ height: z.ZodNumber;
136
+ i18nKey: z.ZodNullable<z.ZodString>;
137
+ i18nKeyId: z.ZodNullable<z.ZodNumber>;
138
+ }, z.core.$strip>>;
139
+ }, z.core.$strip>;
140
+ export type CreatePageResult = z.infer<typeof createPageResultSchema>;
141
+ /**
142
+ * `PATCH /api/v1/pages/:id`. `stale` are tags whose node was not in the request
143
+ * — reported, never deleted; the caller decides. Deleting them is a separate,
144
+ * explicit call.
145
+ */
146
+ export declare const importPageResultSchema: z.ZodObject<{
147
+ pageId: z.ZodNumber;
148
+ name: z.ZodString;
149
+ image: z.ZodNullable<z.ZodString>;
150
+ created: z.ZodNumber;
151
+ updated: z.ZodNumber;
152
+ stale: z.ZodArray<z.ZodObject<{
153
+ id: z.ZodNumber;
154
+ figmaNodeId: z.ZodNullable<z.ZodString>;
155
+ x: z.ZodNumber;
156
+ y: z.ZodNumber;
157
+ width: z.ZodNumber;
158
+ height: z.ZodNumber;
159
+ i18nKey: z.ZodNullable<z.ZodString>;
160
+ i18nKeyId: z.ZodNullable<z.ZodNumber>;
161
+ }, z.core.$strip>>;
162
+ tags: z.ZodArray<z.ZodObject<{
163
+ id: z.ZodNumber;
164
+ figmaNodeId: z.ZodNullable<z.ZodString>;
165
+ x: z.ZodNumber;
166
+ y: z.ZodNumber;
167
+ width: z.ZodNumber;
168
+ height: z.ZodNumber;
169
+ i18nKey: z.ZodNullable<z.ZodString>;
170
+ i18nKeyId: z.ZodNullable<z.ZodNumber>;
171
+ }, z.core.$strip>>;
172
+ }, z.core.$strip>;
173
+ export type ImportPageResult = z.infer<typeof importPageResultSchema>;
174
+ /** `GET /api/v1/pages/:id/tags` */
175
+ export declare const importPageTagsSchema: z.ZodObject<{
176
+ pageId: z.ZodNumber;
177
+ tags: z.ZodArray<z.ZodObject<{
178
+ id: z.ZodNumber;
179
+ figmaNodeId: z.ZodNullable<z.ZodString>;
180
+ x: z.ZodNumber;
181
+ y: z.ZodNumber;
182
+ width: z.ZodNumber;
183
+ height: z.ZodNumber;
184
+ i18nKey: z.ZodNullable<z.ZodString>;
185
+ i18nKeyId: z.ZodNullable<z.ZodNumber>;
186
+ }, z.core.$strip>>;
187
+ }, z.core.$strip>;
188
+ export type ImportPageTags = z.infer<typeof importPageTagsSchema>;
189
+ /**
190
+ * `POST /api/v1/pages/:id/tags/delete`. `ignored` counts ids that were not tags
191
+ * of this page, so a caller that mixed up ids can see it rather than guess.
192
+ */
193
+ export declare const deleteTagsResultSchema: z.ZodObject<{
194
+ deleted: z.ZodNumber;
195
+ ignored: z.ZodNumber;
196
+ }, z.core.$strip>;
197
+ export type DeleteTagsResult = z.infer<typeof deleteTagsResultSchema>;
198
+ /** A key the capture picker and the text match can both return. Drafts included. */
199
+ export declare const captureKeyHitSchema: z.ZodObject<{
200
+ id: z.ZodNumber;
201
+ key: z.ZodString;
202
+ sourceText: z.ZodString;
203
+ draft: z.ZodBoolean;
204
+ releaseIds: z.ZodArray<z.ZodNumber>;
205
+ }, z.core.$strip>;
206
+ export type CaptureKeyHit = z.infer<typeof captureKeyHitSchema>;
207
+ /** `GET /api/v1/keys/search` */
208
+ export declare const captureKeySearchSchema: z.ZodObject<{
209
+ keys: z.ZodArray<z.ZodObject<{
210
+ id: z.ZodNumber;
211
+ key: z.ZodString;
212
+ sourceText: z.ZodString;
213
+ draft: z.ZodBoolean;
214
+ releaseIds: z.ZodArray<z.ZodNumber>;
215
+ }, z.core.$strip>>;
216
+ total: z.ZodNumber;
217
+ }, z.core.$strip>;
218
+ export type CaptureKeySearch = z.infer<typeof captureKeySearchSchema>;
219
+ /** `POST /api/v1/match`. One entry per submitted text, in the same order. */
220
+ export declare const captureMatchSchema: z.ZodObject<{
221
+ matches: z.ZodArray<z.ZodObject<{
222
+ text: z.ZodString;
223
+ keys: z.ZodArray<z.ZodObject<{
224
+ id: z.ZodNumber;
225
+ key: z.ZodString;
226
+ sourceText: z.ZodString;
227
+ draft: z.ZodBoolean;
228
+ releaseIds: z.ZodArray<z.ZodNumber>;
229
+ }, z.core.$strip>>;
230
+ }, z.core.$strip>>;
231
+ }, z.core.$strip>;
232
+ export type CaptureMatch = z.infer<typeof captureMatchSchema>;
233
+ /**
234
+ * `GET /api/v1/pages/:id`. The page as capture sees it: draft source text and
235
+ * the release labels on the page and on each tag's key. A tag has no labels of
236
+ * its own — `releaseIds` are the bound key's.
237
+ */
238
+ export declare const captureTagSchema: z.ZodObject<{
239
+ id: z.ZodNumber;
240
+ figmaNodeId: z.ZodNullable<z.ZodString>;
241
+ x: z.ZodNumber;
242
+ y: z.ZodNumber;
243
+ width: z.ZodNumber;
244
+ height: z.ZodNumber;
245
+ i18nKey: z.ZodNullable<z.ZodString>;
246
+ i18nKeyId: z.ZodNullable<z.ZodNumber>;
247
+ draftText: z.ZodNullable<z.ZodString>;
248
+ publishedText: z.ZodNullable<z.ZodString>;
249
+ releaseIds: z.ZodArray<z.ZodNumber>;
250
+ }, z.core.$strip>;
251
+ export type CaptureTag = z.infer<typeof captureTagSchema>;
252
+ export declare const capturePageSchema: z.ZodObject<{
253
+ pageId: z.ZodNumber;
254
+ projectId: z.ZodNumber;
255
+ name: z.ZodString;
256
+ image: z.ZodNullable<z.ZodString>;
257
+ releaseIds: z.ZodArray<z.ZodNumber>;
258
+ tags: z.ZodArray<z.ZodObject<{
259
+ id: z.ZodNumber;
260
+ figmaNodeId: z.ZodNullable<z.ZodString>;
261
+ x: z.ZodNumber;
262
+ y: z.ZodNumber;
263
+ width: z.ZodNumber;
264
+ height: z.ZodNumber;
265
+ i18nKey: z.ZodNullable<z.ZodString>;
266
+ i18nKeyId: z.ZodNullable<z.ZodNumber>;
267
+ draftText: z.ZodNullable<z.ZodString>;
268
+ publishedText: z.ZodNullable<z.ZodString>;
269
+ releaseIds: z.ZodArray<z.ZodNumber>;
270
+ }, z.core.$strip>>;
271
+ }, z.core.$strip>;
272
+ export type CapturePage = z.infer<typeof capturePageSchema>;
package/dist/index.mjs ADDED
@@ -0,0 +1,193 @@
1
+ import { z } from "zod/v4";
2
+ // ../../shared/contract/release.ts
3
+ /** A row id, which the API sends as a number but the UI also carries as text. */
4
+ const idSchema = z.union([z.string(), z.number()]);
5
+ /**
6
+ * A release label on a project. Filter-only: it groups a project's pages and
7
+ * entries by the version they shipped in, and never carries a second copy of
8
+ * any text.
9
+ */
10
+ const projectReleaseSchema = z.object({
11
+ id: idSchema,
12
+ name: z.string(),
13
+ sort: z.number(),
14
+ createdAt: z.string().optional(),
15
+ updatedAt: z.string().optional()
16
+ });
17
+ /** `POST /api/v1/release-membership` */
18
+ const releaseMembershipResultSchema = z.object({
19
+ ok: z.boolean(),
20
+ /** How many ids actually changed; repeating an add reports 0. */
21
+ changed: z.number()
22
+ });
23
+ // ../../shared/contract/delivery.ts
24
+ /**
25
+ * Response shapes of the public `/api/v1` delivery API. Callers outside the
26
+ * Localness repo (the design-tool plugin, build tooling) validate against
27
+ * these, so changing a field is a breaking change for them: a removed or
28
+ * retyped field is a major version, a new optional field is a minor one.
29
+ */
30
+ /** Published copy only: `{ locale: { key: text } }`, the map the JSON export uses. */
31
+ const deliveryBundleSchema = z.record(z.string(), z.record(z.string(), z.string()));
32
+ /** `GET /api/v1/locales/:locale` — `{ key: text }` for one locale. */
33
+ const deliveryLocaleSchema = z.record(z.string(), z.string());
34
+ /** `GET /api/v1/outdated` — locales whose published translation lags the source sentence. */
35
+ const deliveryOutdatedSchema = z.object({
36
+ /** locale → keys */
37
+ outdated: z.record(z.string(), z.array(z.string())) });
38
+ /** `GET /api/v1/meta` — what a caller holding only a token learns first. */
39
+ const deliveryMetaSchema = z.object({
40
+ project: z.object({
41
+ id: z.number(),
42
+ name: z.string()
43
+ }),
44
+ locales: z.array(z.string()),
45
+ localeFallback: z.string(),
46
+ /** The release the response is scoped to, or null for all keys. */
47
+ release: z.number().nullable(),
48
+ /** The names `?release=` accepts, which a caller cannot otherwise discover. */
49
+ releases: z.array(projectReleaseSchema),
50
+ coverage: z.object({
51
+ keys: z.number(),
52
+ projectKeys: z.number(),
53
+ publishedPerLocale: z.record(z.string(), z.number())
54
+ }),
55
+ /**
56
+ * Whether this token's owner may define release labels on the project.
57
+ * Attaching a label to a page or a key is separate, and does not need this.
58
+ */
59
+ canManageReleases: z.boolean(),
60
+ /**
61
+ * Instance-level facts. Seed of capability negotiation: `plus` gates
62
+ * features, `version` lets a caller adapt. Never carries the customer or the
63
+ * expiry date.
64
+ */
65
+ instance: z.object({
66
+ version: z.string(),
67
+ plus: z.boolean()
68
+ }).optional(),
69
+ /** ISO 8601. */
70
+ generatedAt: z.string()
71
+ });
72
+ /** One project a token may address. */
73
+ const deliveryProjectRefSchema = z.object({
74
+ id: z.number(),
75
+ name: z.string()
76
+ });
77
+ /**
78
+ * `GET /api/v1/projects` — which projects this credential can address *now*.
79
+ *
80
+ * A token belongs to a person and may name several projects, so this is the
81
+ * discovery step when the credential itself cannot answer "which one": it is
82
+ * also the list `?project=` accepts. Projects whose team the owner has left are
83
+ * absent, so an empty list means the credential is spent.
84
+ */
85
+ const deliveryProjectsSchema = z.object({
86
+ projects: z.array(deliveryProjectRefSchema),
87
+ /** ISO 8601. */
88
+ generatedAt: z.string()
89
+ });
90
+ /**
91
+ * `GET /api/v1/keys` — names only; text is `/bundle`'s job. Load-bearing as a
92
+ * superset of that bundle's keys: omitting one there breaks a tie silently.
93
+ */
94
+ const deliveryKeysSchema = z.object({
95
+ keys: z.array(z.string()),
96
+ /** ISO 8601. */
97
+ generatedAt: z.string()
98
+ });
99
+ // ../../shared/contract/import.ts
100
+ /**
101
+ * Response shapes of the write half of the public `/api/v1` API, plus the
102
+ * capture reads a design tool needs. Same versioning rule as `delivery.ts`:
103
+ * new fields are additions, removing or retyping one is a major version.
104
+ *
105
+ * `delivery` stays published copy. These shapes are how a plugin sees drafts.
106
+ */
107
+ /** One rectangle as the import API sees it. */
108
+ const importedTagSchema = z.object({
109
+ id: z.number(),
110
+ /** The design-tool node it was drawn from; null for tags drawn by hand. */
111
+ figmaNodeId: z.string().nullable(),
112
+ x: z.number(),
113
+ y: z.number(),
114
+ width: z.number(),
115
+ height: z.number(),
116
+ i18nKey: z.string().nullable(),
117
+ i18nKeyId: z.number().nullable()
118
+ });
119
+ /** `POST /api/v1/uploads` */
120
+ const uploadResultSchema = z.object({ key: z.string() });
121
+ /** `POST /api/v1/pages` */
122
+ const createPageResultSchema = z.object({
123
+ id: z.number(),
124
+ name: z.string(),
125
+ image: z.string().nullable(),
126
+ tags: z.array(importedTagSchema)
127
+ });
128
+ /**
129
+ * `PATCH /api/v1/pages/:id`. `stale` are tags whose node was not in the request
130
+ * — reported, never deleted; the caller decides. Deleting them is a separate,
131
+ * explicit call.
132
+ */
133
+ const importPageResultSchema = z.object({
134
+ pageId: z.number(),
135
+ name: z.string(),
136
+ image: z.string().nullable(),
137
+ created: z.number(),
138
+ updated: z.number(),
139
+ stale: z.array(importedTagSchema),
140
+ tags: z.array(importedTagSchema)
141
+ });
142
+ /** `GET /api/v1/pages/:id/tags` */
143
+ const importPageTagsSchema = z.object({
144
+ pageId: z.number(),
145
+ tags: z.array(importedTagSchema)
146
+ });
147
+ /**
148
+ * `POST /api/v1/pages/:id/tags/delete`. `ignored` counts ids that were not tags
149
+ * of this page, so a caller that mixed up ids can see it rather than guess.
150
+ */
151
+ const deleteTagsResultSchema = z.object({
152
+ deleted: z.number(),
153
+ ignored: z.number()
154
+ });
155
+ /** A key the capture picker and the text match can both return. Drafts included. */
156
+ const captureKeyHitSchema = z.object({
157
+ id: z.number(),
158
+ key: z.string(),
159
+ /** Source-language text: the draft when one exists, otherwise the published text. */
160
+ sourceText: z.string(),
161
+ /** The source language has no published text yet. */
162
+ draft: z.boolean(),
163
+ releaseIds: z.array(z.number())
164
+ });
165
+ /** `GET /api/v1/keys/search` */
166
+ const captureKeySearchSchema = z.object({
167
+ keys: z.array(captureKeyHitSchema),
168
+ total: z.number()
169
+ });
170
+ /** `POST /api/v1/match`. One entry per submitted text, in the same order. */
171
+ const captureMatchSchema = z.object({ matches: z.array(z.object({
172
+ text: z.string(),
173
+ keys: z.array(captureKeyHitSchema)
174
+ })) });
175
+ /**
176
+ * `GET /api/v1/pages/:id`. The page as capture sees it: draft source text and
177
+ * the release labels on the page and on each tag's key. A tag has no labels of
178
+ * its own — `releaseIds` are the bound key's.
179
+ */
180
+ const captureTagSchema = importedTagSchema.extend({
181
+ draftText: z.string().nullable(),
182
+ publishedText: z.string().nullable(),
183
+ releaseIds: z.array(z.number())
184
+ });
185
+ const capturePageSchema = z.object({
186
+ pageId: z.number(),
187
+ projectId: z.number(),
188
+ name: z.string(),
189
+ image: z.string().nullable(),
190
+ releaseIds: z.array(z.number()),
191
+ tags: z.array(captureTagSchema)
192
+ });
193
+ export { captureKeyHitSchema, captureKeySearchSchema, captureMatchSchema, capturePageSchema, captureTagSchema, createPageResultSchema, deleteTagsResultSchema, deliveryBundleSchema, deliveryKeysSchema, deliveryLocaleSchema, deliveryMetaSchema, deliveryOutdatedSchema, deliveryProjectRefSchema, deliveryProjectsSchema, idSchema, importPageResultSchema, importPageTagsSchema, importedTagSchema, projectReleaseSchema, releaseMembershipResultSchema, uploadResultSchema };
package/package.json CHANGED
@@ -1,6 +1,39 @@
1
1
  {
2
2
  "name": "@localness/contract",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.1",
4
+ "description": "Response contracts of the Localness public /api/v1: zod schemas and the types inferred from them.",
5
+ "license": "Elastic-2.0",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/Hwacc/localness.git",
10
+ "directory": "packages/contract"
11
+ },
12
+ "sideEffects": false,
13
+ "files": [
14
+ "dist"
15
+ ],
16
+ "main": "./dist/index.mjs",
17
+ "types": "./dist/index.d.mts",
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.mts",
21
+ "default": "./dist/index.mjs"
22
+ }
23
+ },
24
+ "publishConfig": {
25
+ "access": "public",
26
+ "provenance": true
27
+ },
28
+ "scripts": {
29
+ "build": "tsdown"
30
+ },
31
+ "peerDependencies": {
32
+ "zod": "^4.0.0"
33
+ },
34
+ "devDependencies": {
35
+ "tsdown": "^0.23.2",
36
+ "typescript": "^5.9.3",
37
+ "zod": "^4.5.4"
38
+ }
39
+ }