@lokalise/maestro-nextgen-tenant-lib 4.1.0 → 4.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.
@@ -0,0 +1,112 @@
1
+ import { type SegmentBulkUpdatedConsumerEvent, type SegmentBulkUpdatedPublisherEvent } from '@lokalise/translation-storage-events-schemas';
2
+ import { z } from 'zod/v4';
3
+ export declare const AutopilotSegmentEvents: {
4
+ 'segment.bulk.updated': {
5
+ producedBy: string[];
6
+ snsTopic: string;
7
+ consumerSchema: z.ZodObject<{
8
+ id: z.ZodString;
9
+ timestamp: z.ZodISODateTime;
10
+ type: z.ZodLiteral<"segment.bulk.updated">;
11
+ deduplicationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ deduplicationOptions: z.ZodOptional<z.ZodNullable<typeof import("@message-queue-toolkit/schemas").MESSAGE_DEDUPLICATION_OPTIONS_SCHEMA>>;
13
+ payload: z.ZodObject<{
14
+ projectId: z.ZodGUID;
15
+ userId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
16
+ workspaceId: z.ZodGUID;
17
+ updateType: z.ZodEnum<{
18
+ readonly MANUAL_TRANSLATION: "MANUAL_TRANSLATION";
19
+ readonly MANUAL_STATUS_UPDATE: "MANUAL_STATUS_UPDATE";
20
+ readonly AI_TRANSLATION: "AI_TRANSLATION";
21
+ readonly AI_STATUS_UPDATE: "AI_STATUS_UPDATE";
22
+ readonly TRANSLATION_MEMORY_MATCH: "TRANSLATION_MEMORY_MATCH";
23
+ readonly IMPORT: "IMPORT";
24
+ }>;
25
+ segments: z.ZodArray<z.ZodObject<{
26
+ id: z.ZodGUID;
27
+ number: z.ZodNumber;
28
+ value: z.ZodString;
29
+ status: z.ZodEnum<{
30
+ readonly TRANSLATING: "TRANSLATING";
31
+ readonly TRANSLATION_FAILED: "TRANSLATION_FAILED";
32
+ readonly LQA_IN_PROGRESS: "LQA_IN_PROGRESS";
33
+ readonly PENDING_REVIEW: "PENDING_REVIEW";
34
+ readonly APPROVED: "APPROVED";
35
+ }>;
36
+ contentLanguageId: z.ZodGUID;
37
+ contentUnitId: z.ZodGUID;
38
+ projectId: z.ZodGUID;
39
+ translatableWordsCount: z.ZodInt;
40
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{
41
+ prefix: z.ZodOptional<z.ZodString>;
42
+ suffix: z.ZodOptional<z.ZodString>;
43
+ }, z.core.$strip>>>;
44
+ }, z.core.$strip>>;
45
+ }, z.core.$strip>;
46
+ metadata: import("@message-queue-toolkit/schemas").MetadataObject;
47
+ }, z.core.$strip>;
48
+ publisherSchema: z.ZodObject<{
49
+ id: z.ZodOptional<z.ZodString>;
50
+ timestamp: z.ZodOptional<z.ZodISODateTime>;
51
+ type: z.ZodLiteral<"segment.bulk.updated">;
52
+ deduplicationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
+ deduplicationOptions: z.ZodOptional<z.ZodNullable<typeof import("@message-queue-toolkit/schemas").MESSAGE_DEDUPLICATION_OPTIONS_SCHEMA>>;
54
+ payload: z.ZodObject<{
55
+ projectId: z.ZodGUID;
56
+ userId: z.ZodOptional<z.ZodNullable<z.ZodGUID>>;
57
+ workspaceId: z.ZodGUID;
58
+ updateType: z.ZodEnum<{
59
+ readonly MANUAL_TRANSLATION: "MANUAL_TRANSLATION";
60
+ readonly MANUAL_STATUS_UPDATE: "MANUAL_STATUS_UPDATE";
61
+ readonly AI_TRANSLATION: "AI_TRANSLATION";
62
+ readonly AI_STATUS_UPDATE: "AI_STATUS_UPDATE";
63
+ readonly TRANSLATION_MEMORY_MATCH: "TRANSLATION_MEMORY_MATCH";
64
+ readonly IMPORT: "IMPORT";
65
+ }>;
66
+ segments: z.ZodArray<z.ZodObject<{
67
+ id: z.ZodGUID;
68
+ number: z.ZodNumber;
69
+ value: z.ZodString;
70
+ status: z.ZodEnum<{
71
+ readonly TRANSLATING: "TRANSLATING";
72
+ readonly TRANSLATION_FAILED: "TRANSLATION_FAILED";
73
+ readonly LQA_IN_PROGRESS: "LQA_IN_PROGRESS";
74
+ readonly PENDING_REVIEW: "PENDING_REVIEW";
75
+ readonly APPROVED: "APPROVED";
76
+ }>;
77
+ contentLanguageId: z.ZodGUID;
78
+ contentUnitId: z.ZodGUID;
79
+ projectId: z.ZodGUID;
80
+ translatableWordsCount: z.ZodInt;
81
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{
82
+ prefix: z.ZodOptional<z.ZodString>;
83
+ suffix: z.ZodOptional<z.ZodString>;
84
+ }, z.core.$strip>>>;
85
+ }, z.core.$strip>>;
86
+ }, z.core.$strip>;
87
+ metadata: z.ZodOptional<z.ZodObject<{
88
+ schemaVersion: z.ZodOptional<z.ZodString>;
89
+ producedBy: z.ZodOptional<z.ZodString>;
90
+ originatedFrom: z.ZodOptional<z.ZodString>;
91
+ correlationId: z.ZodOptional<z.ZodString>;
92
+ }>>;
93
+ }, z.core.$strip>;
94
+ };
95
+ };
96
+ export declare const AutopilotSegmentUpdateTypeEnum: {
97
+ readonly MANUAL_TRANSLATION: "MANUAL_TRANSLATION";
98
+ readonly MANUAL_STATUS_UPDATE: "MANUAL_STATUS_UPDATE";
99
+ readonly AI_TRANSLATION: "AI_TRANSLATION";
100
+ readonly AI_STATUS_UPDATE: "AI_STATUS_UPDATE";
101
+ readonly TRANSLATION_MEMORY_MATCH: "TRANSLATION_MEMORY_MATCH";
102
+ readonly IMPORT: "IMPORT";
103
+ };
104
+ export declare const TASK_PROGRESS_UPDATE_EVENT_PAYLOAD_SCHEMA: z.ZodObject<{
105
+ projectId: z.ZodString;
106
+ segments: z.ZodArray<z.ZodObject<{
107
+ id: z.ZodString;
108
+ status: z.ZodString;
109
+ }, z.core.$strip>>;
110
+ }, z.core.$strip>;
111
+ export type AutopilotSegmentBulkUpdateConsumerEvent = SegmentBulkUpdatedConsumerEvent;
112
+ export type AutopilotSegmentBulkUpdatePublisherEvent = SegmentBulkUpdatedPublisherEvent;
@@ -0,0 +1,12 @@
1
+ import { SegmentEvents, SegmentUpdateTypeEnum, } from '@lokalise/translation-storage-events-schemas';
2
+ import { z } from 'zod/v4';
3
+ export const AutopilotSegmentEvents = SegmentEvents;
4
+ export const AutopilotSegmentUpdateTypeEnum = SegmentUpdateTypeEnum;
5
+ export const TASK_PROGRESS_UPDATE_EVENT_PAYLOAD_SCHEMA = z.object({
6
+ projectId: z.string(),
7
+ segments: z.array(z.object({
8
+ id: z.string(),
9
+ status: z.string(),
10
+ })),
11
+ });
12
+ //# sourceMappingURL=segment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segment.js","sourceRoot":"","sources":["../../src/event-schemas/segment.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,aAAa,EACb,qBAAqB,GACtB,MAAM,8CAA8C,CAAA;AAErD,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,MAAM,CAAC,MAAM,sBAAsB,GAAG,aAAa,CAAA;AAEnD,MAAM,CAAC,MAAM,8BAA8B,GAAG,qBAAqB,CAAA;AAEnE,MAAM,CAAC,MAAM,yCAAyC,GAAG,CAAC,CAAC,MAAM,CAAC;IAChE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,QAAQ,EAAE,CAAC,CAAC,KAAK,CACf,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;QACd,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;KACnB,CAAC,CACH;CACF,CAAC,CAAA"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './apiContract/schemas.js';
2
2
  export * from './apiContract/taskContracts.js';
3
3
  export * from './common.js';
4
+ export * from './event-schemas/segment.js';
4
5
  export * from './event-schemas/task.js';
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './apiContract/schemas.js';
2
2
  export * from './apiContract/taskContracts.js';
3
3
  export * from './common.js';
4
+ export * from './event-schemas/segment.js';
4
5
  export * from './event-schemas/task.js';
5
6
  //# 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,cAAc,0BAA0B,CAAA;AACxC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,aAAa,CAAA;AAC3B,cAAc,yBAAyB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,aAAa,CAAA;AAC3B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/maestro-nextgen-tenant-lib",
3
- "version": "4.1.0",
3
+ "version": "4.2.0",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://github.com/lokalise/maestro",
6
6
  "description": "This library provides objects, types and zod schemas for NextGen tenant to work with Maestro",