@lokalise/translation-storage-api-schemas 12.0.0 → 12.1.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/api/contracts/editor/bulk-actions/get-editor-bulk-actions.d.ts +70 -5
- package/dist/api/contracts/editor/bulk-actions/get-editor-bulk-actions.d.ts.map +1 -1
- package/dist/api/contracts/editor/bulk-actions/get-editor-bulk-actions.js +11 -3
- package/dist/api/contracts/editor/bulk-actions/get-editor-bulk-actions.js.map +1 -1
- package/package.json +1 -1
|
@@ -35,8 +35,8 @@ declare const GET_EDITOR_BULK_ACTIONS_RESPONSE_SCHEMA: z.ZodObject<{
|
|
|
35
35
|
}, z.core.$strip>>;
|
|
36
36
|
}, z.core.$strip>;
|
|
37
37
|
export type GetEditorBulkActionsResponse = z.infer<typeof GET_EDITOR_BULK_ACTIONS_RESPONSE_SCHEMA>;
|
|
38
|
-
export declare const
|
|
39
|
-
|
|
38
|
+
export declare const BULK_ACTION_SSE_SCHEMA: z.ZodObject<{
|
|
39
|
+
bulkAction: z.ZodObject<{
|
|
40
40
|
id: z.ZodGUID;
|
|
41
41
|
projectId: z.ZodGUID;
|
|
42
42
|
operation: z.ZodEnum<{
|
|
@@ -54,8 +54,10 @@ export declare const getEditorBulkActionsContract: import("@lokalise/api-contrac
|
|
|
54
54
|
createdBy: z.ZodGUID;
|
|
55
55
|
startedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
56
56
|
completedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
57
|
-
}, z.core.$strip
|
|
58
|
-
}, z.core.$strip
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
export type BulkActionSSE = z.infer<typeof BULK_ACTION_SSE_SCHEMA>;
|
|
60
|
+
export declare const getEditorBulkActionsContract: import("@lokalise/api-contracts").DualModeContractDefinition<"get", z.ZodObject<{
|
|
59
61
|
projectId: z.ZodGUID;
|
|
60
62
|
}, z.core.$strip>, z.ZodObject<{
|
|
61
63
|
after: z.ZodOptional<z.ZodString>;
|
|
@@ -65,7 +67,70 @@ export declare const getEditorBulkActionsContract: import("@lokalise/api-contrac
|
|
|
65
67
|
readonly IN_PROGRESS: 'IN_PROGRESS';
|
|
66
68
|
readonly COMPLETED: 'COMPLETED';
|
|
67
69
|
}>>;
|
|
68
|
-
}, z.core.$strip>, z.ZodAny, undefined,
|
|
70
|
+
}, z.core.$strip>, z.ZodAny, undefined, z.ZodObject<{
|
|
71
|
+
data: z.ZodArray<z.ZodObject<{
|
|
72
|
+
id: z.ZodGUID;
|
|
73
|
+
projectId: z.ZodGUID;
|
|
74
|
+
operation: z.ZodEnum<{
|
|
75
|
+
readonly APPROVE_SEGMENT: 'APPROVE_SEGMENT';
|
|
76
|
+
readonly UNAPPROVE_SEGMENT: 'UNAPPROVE_SEGMENT';
|
|
77
|
+
}>;
|
|
78
|
+
status: z.ZodEnum<{
|
|
79
|
+
readonly PENDING: 'PENDING';
|
|
80
|
+
readonly IN_PROGRESS: 'IN_PROGRESS';
|
|
81
|
+
readonly COMPLETED: 'COMPLETED';
|
|
82
|
+
}>;
|
|
83
|
+
totalCount: z.ZodInt;
|
|
84
|
+
succeededCount: z.ZodInt;
|
|
85
|
+
failedCount: z.ZodInt;
|
|
86
|
+
createdBy: z.ZodGUID;
|
|
87
|
+
startedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
88
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
89
|
+
}, z.core.$strip>>;
|
|
90
|
+
}, z.core.$strip>, {
|
|
91
|
+
'bulk_action.created': z.ZodObject<{
|
|
92
|
+
bulkAction: z.ZodObject<{
|
|
93
|
+
id: z.ZodGUID;
|
|
94
|
+
projectId: z.ZodGUID;
|
|
95
|
+
operation: z.ZodEnum<{
|
|
96
|
+
readonly APPROVE_SEGMENT: 'APPROVE_SEGMENT';
|
|
97
|
+
readonly UNAPPROVE_SEGMENT: 'UNAPPROVE_SEGMENT';
|
|
98
|
+
}>;
|
|
99
|
+
status: z.ZodEnum<{
|
|
100
|
+
readonly PENDING: 'PENDING';
|
|
101
|
+
readonly IN_PROGRESS: 'IN_PROGRESS';
|
|
102
|
+
readonly COMPLETED: 'COMPLETED';
|
|
103
|
+
}>;
|
|
104
|
+
totalCount: z.ZodInt;
|
|
105
|
+
succeededCount: z.ZodInt;
|
|
106
|
+
failedCount: z.ZodInt;
|
|
107
|
+
createdBy: z.ZodGUID;
|
|
108
|
+
startedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
109
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
}, z.core.$strip>;
|
|
112
|
+
'bulk_action.updated': z.ZodObject<{
|
|
113
|
+
bulkAction: z.ZodObject<{
|
|
114
|
+
id: z.ZodGUID;
|
|
115
|
+
projectId: z.ZodGUID;
|
|
116
|
+
operation: z.ZodEnum<{
|
|
117
|
+
readonly APPROVE_SEGMENT: 'APPROVE_SEGMENT';
|
|
118
|
+
readonly UNAPPROVE_SEGMENT: 'UNAPPROVE_SEGMENT';
|
|
119
|
+
}>;
|
|
120
|
+
status: z.ZodEnum<{
|
|
121
|
+
readonly PENDING: 'PENDING';
|
|
122
|
+
readonly IN_PROGRESS: 'IN_PROGRESS';
|
|
123
|
+
readonly COMPLETED: 'COMPLETED';
|
|
124
|
+
}>;
|
|
125
|
+
totalCount: z.ZodInt;
|
|
126
|
+
succeededCount: z.ZodInt;
|
|
127
|
+
failedCount: z.ZodInt;
|
|
128
|
+
createdBy: z.ZodGUID;
|
|
129
|
+
startedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
130
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
}, z.core.$strip>;
|
|
133
|
+
}, undefined, {
|
|
69
134
|
400: z.ZodObject<{
|
|
70
135
|
message: z.ZodString;
|
|
71
136
|
errorCode: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-editor-bulk-actions.d.ts","sourceRoot":"","sources":["../../../../../src/api/contracts/editor/bulk-actions/get-editor-bulk-actions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAM1B,QAAA,MAAM,6CAA6C;;iBAEjD,CAAA;AACF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,6CAA6C,CACrD,CAAA;AAGD,QAAA,MAAM,4CAA4C;;;;;;;;iBAUhD,CAAA;AACF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,4CAA4C,CACpD,CAAA;AAED,QAAA,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;;;iBAE3C,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"get-editor-bulk-actions.d.ts","sourceRoot":"","sources":["../../../../../src/api/contracts/editor/bulk-actions/get-editor-bulk-actions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAM1B,QAAA,MAAM,6CAA6C;;iBAEjD,CAAA;AACF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,6CAA6C,CACrD,CAAA;AAGD,QAAA,MAAM,4CAA4C;;;;;;;;iBAUhD,CAAA;AACF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,4CAA4C,CACpD,CAAA;AAED,QAAA,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;;;iBAE3C,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAA;AAGlG,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;iBAEjC,CAAA;AACF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAElE,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBvC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AFTER_PAGINATION_CONFIG_SCHEMA } from '@lokalise/api-common';
|
|
2
|
-
import {
|
|
2
|
+
import { buildSseContract } from '@lokalise/api-contracts';
|
|
3
3
|
import { DEFAULT_ALLOWED_ROLES } from '@lokalise/autopilot-common-api-schemas';
|
|
4
4
|
import { commonErrorResponses } from '@lokalise/common-api-schemas';
|
|
5
5
|
import { z } from 'zod/v4';
|
|
@@ -25,7 +25,11 @@ const GET_EDITOR_BULK_ACTIONS_REQUEST_QUERY_SCHEMA = z.object({
|
|
|
25
25
|
const GET_EDITOR_BULK_ACTIONS_RESPONSE_SCHEMA = z.object({
|
|
26
26
|
data: z.array(BULK_ACTION_SCHEMA),
|
|
27
27
|
});
|
|
28
|
-
|
|
28
|
+
// ---- SSE ----
|
|
29
|
+
export const BULK_ACTION_SSE_SCHEMA = z.object({
|
|
30
|
+
bulkAction: BULK_ACTION_SCHEMA,
|
|
31
|
+
});
|
|
32
|
+
export const getEditorBulkActionsContract = buildSseContract({
|
|
29
33
|
method: 'get',
|
|
30
34
|
requestPathParamsSchema: GET_EDITOR_BULK_ACTIONS_REQUEST_PARAMS_SCHEMA,
|
|
31
35
|
requestQuerySchema: GET_EDITOR_BULK_ACTIONS_REQUEST_QUERY_SCHEMA,
|
|
@@ -34,9 +38,13 @@ export const getEditorBulkActionsContract = buildRestContract({
|
|
|
34
38
|
description: 'Get editor bulk actions',
|
|
35
39
|
successResponseBodySchema: GET_EDITOR_BULK_ACTIONS_RESPONSE_SCHEMA,
|
|
36
40
|
metadata: { allowedWorkspaceRoles: DEFAULT_ALLOWED_ROLES },
|
|
37
|
-
|
|
41
|
+
responseBodySchemasByStatusCode: {
|
|
38
42
|
...commonErrorResponses,
|
|
39
43
|
200: GET_EDITOR_BULK_ACTIONS_RESPONSE_SCHEMA,
|
|
40
44
|
},
|
|
45
|
+
serverSentEventSchemas: {
|
|
46
|
+
'bulk_action.created': BULK_ACTION_SSE_SCHEMA,
|
|
47
|
+
'bulk_action.updated': BULK_ACTION_SSE_SCHEMA,
|
|
48
|
+
},
|
|
41
49
|
});
|
|
42
50
|
//# sourceMappingURL=get-editor-bulk-actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-editor-bulk-actions.js","sourceRoot":"","sources":["../../../../../src/api/contracts/editor/bulk-actions/get-editor-bulk-actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAA;AACrE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"get-editor-bulk-actions.js","sourceRoot":"","sources":["../../../../../src/api/contracts/editor/bulk-actions/get-editor-bulk-actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAA;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAA;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAE1F,6CAA6C;AAC7C,kDAAkD;AAClD,6CAA6C;AAC7C,MAAM,6CAA6C,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7D,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