@lokalise/content-conversion-schemas 11.0.2 → 11.2.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/README.md +9 -3
- package/dist/index.d.ts +2 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -18
- package/dist/index.js.map +1 -1
- package/package.json +6 -9
- package/dist/api/common.d.ts +0 -34
- package/dist/api/common.d.ts.map +0 -1
- package/dist/api/common.js +0 -30
- package/dist/api/common.js.map +0 -1
- package/dist/api/contentObjects.d.ts +0 -556
- package/dist/api/contentObjects.d.ts.map +0 -1
- package/dist/api/contentObjects.js +0 -93
- package/dist/api/contentObjects.js.map +0 -1
- package/dist/api/contentObjectsNew.d.ts +0 -1563
- package/dist/api/contentObjectsNew.d.ts.map +0 -1
- package/dist/api/contentObjectsNew.js +0 -121
- package/dist/api/contentObjectsNew.js.map +0 -1
- package/dist/api/enums.d.ts +0 -38
- package/dist/api/enums.d.ts.map +0 -1
- package/dist/api/enums.js +0 -32
- package/dist/api/enums.js.map +0 -1
- package/dist/api/exportObjects.d.ts +0 -546
- package/dist/api/exportObjects.d.ts.map +0 -1
- package/dist/api/exportObjects.js +0 -205
- package/dist/api/exportObjects.js.map +0 -1
- package/dist/api/generationObjects.d.ts +0 -1451
- package/dist/api/generationObjects.d.ts.map +0 -1
- package/dist/api/generationObjects.js +0 -43
- package/dist/api/generationObjects.js.map +0 -1
- package/dist/api/pluralForm.d.ts +0 -10
- package/dist/api/pluralForm.d.ts.map +0 -1
- package/dist/api/pluralForm.js +0 -9
- package/dist/api/pluralForm.js.map +0 -1
- package/dist/api/pptx.d.ts +0 -24
- package/dist/api/pptx.d.ts.map +0 -1
- package/dist/api/pptx.js +0 -21
- package/dist/api/pptx.js.map +0 -1
- package/dist/api/textSegment.d.ts +0 -4
- package/dist/api/textSegment.d.ts.map +0 -1
- package/dist/api/textSegment.js +0 -5
- package/dist/api/textSegment.js.map +0 -1
- package/dist/api/textUnit.d.ts +0 -477
- package/dist/api/textUnit.d.ts.map +0 -1
- package/dist/api/textUnit.js +0 -65
- package/dist/api/textUnit.js.map +0 -1
- package/dist/api/textUnitMetadata.d.ts +0 -47
- package/dist/api/textUnitMetadata.d.ts.map +0 -1
- package/dist/api/textUnitMetadata.js +0 -9
- package/dist/api/textUnitMetadata.js.map +0 -1
- package/dist/api/textUnitTarget.d.ts +0 -69
- package/dist/api/textUnitTarget.d.ts.map +0 -1
- package/dist/api/textUnitTarget.js +0 -30
- package/dist/api/textUnitTarget.js.map +0 -1
- package/dist/api/translationObjects.d.ts +0 -286
- package/dist/api/translationObjects.d.ts.map +0 -1
- package/dist/api/translationObjects.js +0 -58
- package/dist/api/translationObjects.js.map +0 -1
- package/dist/api/xcstrings.d.ts +0 -51
- package/dist/api/xcstrings.d.ts.map +0 -1
- package/dist/api/xcstrings.js +0 -52
- package/dist/api/xcstrings.js.map +0 -1
- package/dist/common.d.ts +0 -51
- package/dist/common.d.ts.map +0 -1
- package/dist/common.js +0 -45
- package/dist/common.js.map +0 -1
- package/dist/events/conversion.d.ts +0 -4699
- package/dist/events/conversion.d.ts.map +0 -1
- package/dist/events/conversion.js +0 -148
- package/dist/events/conversion.js.map +0 -1
- package/dist/events/export.d.ts +0 -154
- package/dist/events/export.d.ts.map +0 -1
- package/dist/events/export.js +0 -65
- package/dist/events/export.js.map +0 -1
- package/dist/events/upload.d.ts +0 -329
- package/dist/events/upload.d.ts.map +0 -1
- package/dist/events/upload.js +0 -137
- package/dist/events/upload.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
# Content-conversion events schemas
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# Content-conversion events schemas
|
|
2
|
+
|
|
3
|
+
> **Deprecated** — this package is a re-export barrel kept for backward compatibility only.
|
|
4
|
+
> New consumers should depend directly on the focused packages instead:
|
|
5
|
+
>
|
|
6
|
+
> - **`@lokalise/content-conversion-api-schemas`** — domain/API schemas (frontend-safe, no messaging dependencies)
|
|
7
|
+
> - **`@lokalise/content-conversion-event-schemas`** — SNS/SQS event contracts (backend-only)
|
|
8
|
+
|
|
9
|
+
This library contains schemas and types related to content-conversion events.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from '
|
|
3
|
-
export * from './api/contentObjectsNew.ts';
|
|
4
|
-
export * from './api/enums.ts';
|
|
5
|
-
export * from './api/exportObjects.ts';
|
|
6
|
-
export * from './api/generationObjects.ts';
|
|
7
|
-
export * from './api/pluralForm.ts';
|
|
8
|
-
export * from './api/pptx.ts';
|
|
9
|
-
export * from './api/textUnit.ts';
|
|
10
|
-
export * from './api/textUnitMetadata.ts';
|
|
11
|
-
export * from './api/textUnitTarget.ts';
|
|
12
|
-
export * from './api/translationObjects.ts';
|
|
13
|
-
export * from './api/xcstrings.ts';
|
|
14
|
-
export * from './common.ts';
|
|
15
|
-
export * from './events/conversion.ts';
|
|
16
|
-
export * from './events/export.ts';
|
|
17
|
-
export * from './events/upload.ts';
|
|
1
|
+
export * from '@lokalise/content-conversion-api-schemas';
|
|
2
|
+
export * from '@lokalise/content-conversion-event-schemas';
|
|
18
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,0CAA0C,CAAA;AACxD,cAAc,4CAA4C,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
// biome-ignore lint/performance/noBarrelFile:
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from "./api/contentObjectsNew.js";
|
|
5
|
-
export * from "./api/enums.js";
|
|
6
|
-
export * from "./api/exportObjects.js";
|
|
7
|
-
export * from "./api/generationObjects.js";
|
|
8
|
-
export * from "./api/pluralForm.js";
|
|
9
|
-
export * from "./api/pptx.js";
|
|
10
|
-
export * from "./api/textUnit.js";
|
|
11
|
-
export * from "./api/textUnitMetadata.js";
|
|
12
|
-
export * from "./api/textUnitTarget.js";
|
|
13
|
-
export * from "./api/translationObjects.js";
|
|
14
|
-
export * from "./api/xcstrings.js";
|
|
15
|
-
export * from "./common.js";
|
|
16
|
-
export * from "./events/conversion.js";
|
|
17
|
-
export * from "./events/export.js";
|
|
18
|
-
export * from "./events/upload.js";
|
|
1
|
+
// biome-ignore lint/performance/noBarrelFile: re-export barrel for backward compatibility
|
|
2
|
+
export * from '@lokalise/content-conversion-api-schemas';
|
|
3
|
+
export * from '@lokalise/content-conversion-event-schemas';
|
|
19
4
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,cAAc,0CAA0C,CAAA;AACxD,cAAc,4CAA4C,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lokalise/content-conversion-schemas",
|
|
3
|
-
"version": "11.0
|
|
3
|
+
"version": "11.2.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"README.md"
|
|
@@ -19,18 +19,15 @@
|
|
|
19
19
|
"clean": "rimraf dist",
|
|
20
20
|
"lint": "biome check . && tsc",
|
|
21
21
|
"lint:fix": "biome check --write",
|
|
22
|
-
"package-version": "echo $npm_package_version"
|
|
22
|
+
"package-version": "echo $npm_package_version",
|
|
23
|
+
"prepublishOnly": "npm run build"
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {
|
|
25
|
-
"@lokalise/
|
|
26
|
-
"@lokalise/
|
|
27
|
-
"@lokalise/supported-languages": "^3.1.1",
|
|
28
|
-
"@lokalise/zod-extras": "^3.0.0",
|
|
29
|
-
"@lokalise/data-storage-schemas": "^1.1.1",
|
|
30
|
-
"@message-queue-toolkit/schemas": "^7.1.0"
|
|
26
|
+
"@lokalise/content-conversion-api-schemas": "*",
|
|
27
|
+
"@lokalise/content-conversion-event-schemas": "*"
|
|
31
28
|
},
|
|
32
29
|
"devDependencies": {
|
|
33
|
-
"@biomejs/biome": "^2.4.
|
|
30
|
+
"@biomejs/biome": "^2.4.7",
|
|
34
31
|
"@lokalise/biome-config": "^3.1.0",
|
|
35
32
|
"@lokalise/tsconfig": "^3.0.0",
|
|
36
33
|
"@lokalise/zod-extras": "^3.0.0",
|
package/dist/api/common.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const LOCALE_BCP47_TAG: z.ZodString;
|
|
3
|
-
export declare const OWNER_ID_DESCRIPTION = "Owner ID (ownerId or projectId) that the resource belongs to";
|
|
4
|
-
export declare const PROJECT_ID_DESCRIPTION = "Project ID that the resource belongs to (deprecated, use ownerId)";
|
|
5
|
-
export declare const OWNER_ID_NEW_DESCRIPTION = "Owner ID that the resource belongs to";
|
|
6
|
-
/**
|
|
7
|
-
* Base object schema for owner identification fields.
|
|
8
|
-
* Use this with .merge() to add owner fields to other schemas, then apply OWNER_IDENTIFIER_REFINE.
|
|
9
|
-
*/
|
|
10
|
-
export declare const OWNER_IDENTIFIER_FIELDS: z.ZodObject<{
|
|
11
|
-
ownerId: z.ZodOptional<z.ZodGUID>;
|
|
12
|
-
projectId: z.ZodOptional<z.ZodGUID>;
|
|
13
|
-
}, z.core.$strip>;
|
|
14
|
-
/**
|
|
15
|
-
* Refinement function to ensure at least one of ownerId or projectId is provided.
|
|
16
|
-
* Use after merging OWNER_IDENTIFIER_FIELDS: schema.merge(OWNER_IDENTIFIER_FIELDS).refine(OWNER_IDENTIFIER_REFINE)
|
|
17
|
-
*/
|
|
18
|
-
export declare const OWNER_IDENTIFIER_REFINE: (data: {
|
|
19
|
-
ownerId?: string;
|
|
20
|
-
projectId?: string;
|
|
21
|
-
}) => boolean;
|
|
22
|
-
export declare const OWNER_IDENTIFIER_REFINE_MESSAGE = "Either ownerId or projectId must be provided";
|
|
23
|
-
/**
|
|
24
|
-
* Complete schema for owner identification with backward compatibility.
|
|
25
|
-
* - ownerId: New generic owner identifier (optional for backward compatibility)
|
|
26
|
-
* - projectId: Legacy project identifier (optional, deprecated)
|
|
27
|
-
* At least one of ownerId or projectId must be provided.
|
|
28
|
-
*/
|
|
29
|
-
export declare const OWNER_IDENTIFIER_SCHEMA: z.ZodObject<{
|
|
30
|
-
ownerId: z.ZodOptional<z.ZodGUID>;
|
|
31
|
-
projectId: z.ZodOptional<z.ZodGUID>;
|
|
32
|
-
}, z.core.$strip>;
|
|
33
|
-
export type OwnerIdentifier = z.infer<typeof OWNER_IDENTIFIER_SCHEMA>;
|
|
34
|
-
//# sourceMappingURL=common.d.ts.map
|
package/dist/api/common.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/api/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,gBAAgB,aAA4B,CAAA;AAGzD,eAAO,MAAM,oBAAoB,iEAAiE,CAAA;AAClG,eAAO,MAAM,sBAAsB,sEACkC,CAAA;AACrE,eAAO,MAAM,wBAAwB,0CAA0C,CAAA;AAE/E;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;iBAGlC,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,GAAI,MAAM;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,YAC1B,CAAA;AAE5D,eAAO,MAAM,+BAA+B,iDAAiD,CAAA;AAE7F;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB;;;iBAElC,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA"}
|
package/dist/api/common.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export const LOCALE_BCP47_TAG = z.string().min(2).max(35);
|
|
3
|
-
// Owner identifier schema - supports both ownerId (new) and projectId (legacy) for backward compatibility
|
|
4
|
-
export const OWNER_ID_DESCRIPTION = 'Owner ID (ownerId or projectId) that the resource belongs to';
|
|
5
|
-
export const PROJECT_ID_DESCRIPTION = 'Project ID that the resource belongs to (deprecated, use ownerId)';
|
|
6
|
-
export const OWNER_ID_NEW_DESCRIPTION = 'Owner ID that the resource belongs to';
|
|
7
|
-
/**
|
|
8
|
-
* Base object schema for owner identification fields.
|
|
9
|
-
* Use this with .merge() to add owner fields to other schemas, then apply OWNER_IDENTIFIER_REFINE.
|
|
10
|
-
*/
|
|
11
|
-
export const OWNER_IDENTIFIER_FIELDS = z.object({
|
|
12
|
-
ownerId: z.guid().optional().describe(OWNER_ID_NEW_DESCRIPTION),
|
|
13
|
-
projectId: z.guid().optional().describe(PROJECT_ID_DESCRIPTION),
|
|
14
|
-
});
|
|
15
|
-
/**
|
|
16
|
-
* Refinement function to ensure at least one of ownerId or projectId is provided.
|
|
17
|
-
* Use after merging OWNER_IDENTIFIER_FIELDS: schema.merge(OWNER_IDENTIFIER_FIELDS).refine(OWNER_IDENTIFIER_REFINE)
|
|
18
|
-
*/
|
|
19
|
-
export const OWNER_IDENTIFIER_REFINE = (data) => data.ownerId !== undefined || data.projectId !== undefined;
|
|
20
|
-
export const OWNER_IDENTIFIER_REFINE_MESSAGE = 'Either ownerId or projectId must be provided';
|
|
21
|
-
/**
|
|
22
|
-
* Complete schema for owner identification with backward compatibility.
|
|
23
|
-
* - ownerId: New generic owner identifier (optional for backward compatibility)
|
|
24
|
-
* - projectId: Legacy project identifier (optional, deprecated)
|
|
25
|
-
* At least one of ownerId or projectId must be provided.
|
|
26
|
-
*/
|
|
27
|
-
export const OWNER_IDENTIFIER_SCHEMA = OWNER_IDENTIFIER_FIELDS.refine(OWNER_IDENTIFIER_REFINE, {
|
|
28
|
-
message: OWNER_IDENTIFIER_REFINE_MESSAGE,
|
|
29
|
-
});
|
|
30
|
-
//# sourceMappingURL=common.js.map
|
package/dist/api/common.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/api/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;AAEzD,0GAA0G;AAC1G,MAAM,CAAC,MAAM,oBAAoB,GAAG,8DAA8D,CAAA;AAClG,MAAM,CAAC,MAAM,sBAAsB,GACjC,mEAAmE,CAAA;AACrE,MAAM,CAAC,MAAM,wBAAwB,GAAG,uCAAuC,CAAA;AAE/E;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;IAC/D,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;CAChE,CAAC,CAAA;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,IAA8C,EAAE,EAAE,CACxF,IAAI,CAAC,OAAO,KAAK,SAAS,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,CAAA;AAE5D,MAAM,CAAC,MAAM,+BAA+B,GAAG,8CAA8C,CAAA;AAE7F;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,uBAAuB,CAAC,MAAM,CAAC,uBAAuB,EAAE;IAC7F,OAAO,EAAE,+BAA+B;CACzC,CAAC,CAAA"}
|