@lokalise/connector-api-contracts 1.46.0 → 2.0.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.
@@ -11,23 +11,34 @@ export declare const ITEM_IDENTIFIER_SCHEMA: z.ZodObject<{
11
11
  metadata: z.ZodRecord<z.ZodAny, z.ZodAny>;
12
12
  }, z.core.$strip>;
13
13
  export type ItemIdentifier = z.infer<typeof ITEM_IDENTIFIER_SCHEMA>;
14
- export { CONTENT_UNIT_SOURCE, type ContentUnitSource } from '@lokalise/content-conversion-schemas';
14
+ export declare const CONTENT_UNIT_SOURCE: z.ZodUnion<readonly [z.ZodObject<{
15
+ type: z.ZodLiteral<"inline">;
16
+ value: z.ZodString;
17
+ fileUrl: z.ZodOptional<z.ZodNever>;
18
+ }, z.core.$strip>, z.ZodObject<{
19
+ type: z.ZodLiteral<"remote">;
20
+ fileUrl: z.ZodString;
21
+ contentSize: z.ZodOptional<z.ZodString>;
22
+ filePath: z.ZodOptional<z.ZodString>;
23
+ value: z.ZodOptional<z.ZodNever>;
24
+ }, z.core.$strip>]>;
25
+ export type ContentUnitSource = z.infer<typeof CONTENT_UNIT_SOURCE>;
15
26
  export declare const CONTENT_ITEM_SCHEMA: z.ZodObject<{
16
27
  uniqueId: z.ZodString;
17
28
  groupId: z.ZodString;
18
29
  metadata: z.ZodRecord<z.ZodAny, z.ZodAny>;
19
30
  translations: z.ZodRecord<z.ZodString, z.ZodString>;
20
- translatedSource: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
31
+ translatedSourceMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
21
32
  type: z.ZodLiteral<"inline">;
22
33
  value: z.ZodString;
23
- storageId: z.ZodOptional<z.ZodNever>;
34
+ fileUrl: z.ZodOptional<z.ZodNever>;
24
35
  }, z.core.$strip>, z.ZodObject<{
25
36
  type: z.ZodLiteral<"remote">;
26
- storageId: z.ZodString;
37
+ fileUrl: z.ZodString;
27
38
  contentSize: z.ZodOptional<z.ZodString>;
28
39
  filePath: z.ZodOptional<z.ZodString>;
29
40
  value: z.ZodOptional<z.ZodNever>;
30
- }, z.core.$strip>]>>;
41
+ }, z.core.$strip>]>>>;
31
42
  }, z.core.$strip>;
32
43
  export type ContentItem = z.infer<typeof CONTENT_ITEM_SCHEMA>;
33
44
  export declare const apiError: z.ZodObject<{
@@ -1,4 +1,3 @@
1
- import { CONTENT_UNIT_SOURCE } from '@lokalise/content-conversion-schemas';
2
1
  import { z } from 'zod/v4';
3
2
  import { CONNECTOR_ID_HEADER } from "./connectorApiConstants.js";
4
3
  export const ERROR_RESPONSE_SCHEMA = z.object({
@@ -11,10 +10,26 @@ export const ITEM_IDENTIFIER_SCHEMA = z.object({
11
10
  groupId: z.string(),
12
11
  metadata: z.record(z.any(), z.any()),
13
12
  });
14
- export { CONTENT_UNIT_SOURCE } from '@lokalise/content-conversion-schemas';
13
+ export const CONTENT_UNIT_SOURCE = z.union([
14
+ z.object({
15
+ type: z.literal('inline'),
16
+ value: z.string().describe('The source text of the unit.'),
17
+ fileUrl: z.never().optional(),
18
+ }),
19
+ z.object({
20
+ type: z.literal('remote'),
21
+ fileUrl: z.string().describe('External downloadable file url'),
22
+ contentSize: z.string().optional().describe('Offloaded content size in bytes'),
23
+ filePath: z.string().describe('System file path provided with file content').optional(),
24
+ value: z.never().optional(),
25
+ }),
26
+ ]);
15
27
  export const CONTENT_ITEM_SCHEMA = ITEM_IDENTIFIER_SCHEMA.extend({
16
28
  translations: z.record(z.string(), z.string()),
17
- translatedSource: CONTENT_UNIT_SOURCE.optional().describe('Structured source reference; when type is remote, connector should download content from FSS'),
29
+ translatedSourceMap: z
30
+ .record(z.string(), CONTENT_UNIT_SOURCE)
31
+ .optional()
32
+ .describe('Structured source reference; when type is remote, connector should download content via URL'),
18
33
  });
19
34
  export const apiError = z.object({
20
35
  message: z.string(),
@@ -1 +1 @@
1
- {"version":3,"file":"commonSchemas.js","sourceR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AAC,CAAC,MAAM,EAAE;IACrB,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;CAClC,CAAC,CAAA;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAA;AAI/C,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CAAC;IACzD;;;;OAIG;IACH,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAA"}
@@ -8,7 +8,6 @@ export declare const IMPORT_TAG_SCHEMA: z.ZodObject<{
8
8
  }, z.core.$strip>;
9
9
  export type ImportTag = z.infer<typeof IMPORT_TAG_SCHEMA>;
10
10
  export declare const CONNECTOR_ENV_FEATURES_SCHEMA: z.ZodObject<{
11
- skippingEmptyTranslations: z.ZodOptional<z.ZodBoolean>;
12
11
  showSkipEmptyOptionOnImport: z.ZodOptional<z.ZodBoolean>;
13
12
  supportedImportTags: z.ZodOptional<z.ZodArray<z.ZodObject<{
14
13
  id: z.ZodString;
@@ -24,7 +23,6 @@ export declare const localeDefinition: z.ZodObject<{
24
23
  }, z.core.$strip>>;
25
24
  supportedContentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
26
25
  features: z.ZodOptional<z.ZodObject<{
27
- skippingEmptyTranslations: z.ZodOptional<z.ZodBoolean>;
28
26
  showSkipEmptyOptionOnImport: z.ZodOptional<z.ZodBoolean>;
29
27
  supportedImportTags: z.ZodOptional<z.ZodArray<z.ZodObject<{
30
28
  id: z.ZodString;
@@ -32,24 +30,18 @@ export declare const localeDefinition: z.ZodObject<{
32
30
  }, z.core.$strip>>>;
33
31
  }, z.core.$strip>>;
34
32
  }, z.core.$strip>;
35
- /**
36
- * @deprecated 'TAGS' value is deprecated. Use the top-level `tags` field on ContentItem in the translate response instead.
37
- */
38
33
  export declare const FIELD_TYPES: z.ZodEnum<{
39
34
  FOLDER_HIERARCHY: "FOLDER_HIERARCHY";
40
- TAGS: "TAGS";
41
35
  }>;
42
36
  export declare const METADATA_TYPE_SCHEMAS: z.ZodObject<{
43
37
  FOLDER_HIERARCHY: z.ZodArray<z.ZodObject<{
44
38
  id: z.ZodString;
45
39
  name: z.ZodString;
46
40
  }, z.core.$strip>>;
47
- TAGS: z.ZodArray<z.ZodString>;
48
41
  }, z.core.$strip>;
49
42
  export declare const METADATA_FIELDS: z.ZodRecord<z.ZodString, z.ZodObject<{
50
43
  type: z.ZodEnum<{
51
44
  FOLDER_HIERARCHY: "FOLDER_HIERARCHY";
52
- TAGS: "TAGS";
53
45
  }>;
54
46
  }, z.core.$strip>>;
55
47
  export type MetadataTypeSchemas = z.infer<typeof METADATA_TYPE_SCHEMAS>;
@@ -86,7 +78,6 @@ export declare const envResponseBody: z.ZodObject<{
86
78
  }, z.core.$strip>>;
87
79
  supportedContentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
88
80
  features: z.ZodOptional<z.ZodObject<{
89
- skippingEmptyTranslations: z.ZodOptional<z.ZodBoolean>;
90
81
  showSkipEmptyOptionOnImport: z.ZodOptional<z.ZodBoolean>;
91
82
  supportedImportTags: z.ZodOptional<z.ZodArray<z.ZodObject<{
92
83
  id: z.ZodString;
@@ -97,7 +88,6 @@ export declare const envResponseBody: z.ZodObject<{
97
88
  metadataFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
98
89
  type: z.ZodEnum<{
99
90
  FOLDER_HIERARCHY: "FOLDER_HIERARCHY";
100
- TAGS: "TAGS";
101
91
  }>;
102
92
  }, z.core.$strip>>>;
103
93
  fieldDefinitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -124,7 +114,6 @@ export declare const getEnvContract: import("@lokalise/api-contracts").GetRouteD
124
114
  }, z.core.$strip>>;
125
115
  supportedContentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
126
116
  features: z.ZodOptional<z.ZodObject<{
127
- skippingEmptyTranslations: z.ZodOptional<z.ZodBoolean>;
128
117
  showSkipEmptyOptionOnImport: z.ZodOptional<z.ZodBoolean>;
129
118
  supportedImportTags: z.ZodOptional<z.ZodArray<z.ZodObject<{
130
119
  id: z.ZodString;
@@ -135,7 +124,6 @@ export declare const getEnvContract: import("@lokalise/api-contracts").GetRouteD
135
124
  metadataFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
136
125
  type: z.ZodEnum<{
137
126
  FOLDER_HIERARCHY: "FOLDER_HIERARCHY";
138
- TAGS: "TAGS";
139
127
  }>;
140
128
  }, z.core.$strip>>>;
141
129
  fieldDefinitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -161,7 +149,6 @@ export declare const getEnvContract: import("@lokalise/api-contracts").GetRouteD
161
149
  }, z.core.$strip>>;
162
150
  supportedContentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
163
151
  features: z.ZodOptional<z.ZodObject<{
164
- skippingEmptyTranslations: z.ZodOptional<z.ZodBoolean>;
165
152
  showSkipEmptyOptionOnImport: z.ZodOptional<z.ZodBoolean>;
166
153
  supportedImportTags: z.ZodOptional<z.ZodArray<z.ZodObject<{
167
154
  id: z.ZodString;
@@ -172,7 +159,6 @@ export declare const getEnvContract: import("@lokalise/api-contracts").GetRouteD
172
159
  metadataFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
173
160
  type: z.ZodEnum<{
174
161
  FOLDER_HIERARCHY: "FOLDER_HIERARCHY";
175
- TAGS: "TAGS";
176
162
  }>;
177
163
  }, z.core.$strip>>>;
178
164
  fieldDefinitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -9,8 +9,6 @@ export const IMPORT_TAG_SCHEMA = z.object({
9
9
  title: z.string().trim().min(1),
10
10
  });
11
11
  export const CONNECTOR_ENV_FEATURES_SCHEMA = z.object({
12
- /** @deprecated Will be removed within next versions, use showSkipEmptyOptionOnImport */
13
- skippingEmptyTranslations: z.boolean().optional(),
14
12
  showSkipEmptyOptionOnImport: z.boolean().optional(),
15
13
  supportedImportTags: z
16
14
  .array(IMPORT_TAG_SCHEMA)
@@ -28,19 +26,12 @@ export const localeDefinition = z.object({
28
26
  supportedContentTypes: z.array(z.string()).optional(), // domain content types, e. g. "newsletters", "campaigns", "emails" etc
29
27
  features: CONNECTOR_ENV_FEATURES_SCHEMA.optional(),
30
28
  });
31
- /**
32
- * @deprecated 'TAGS' value is deprecated. Use the top-level `tags` field on ContentItem in the translate response instead.
33
- */
34
- export const FIELD_TYPES = z.enum(['FOLDER_HIERARCHY', 'TAGS']);
29
+ export const FIELD_TYPES = z.enum(['FOLDER_HIERARCHY']);
35
30
  export const METADATA_TYPE_SCHEMAS = z.object({
36
31
  [FIELD_TYPES.enum.FOLDER_HIERARCHY]: z.array(z.object({
37
32
  id: z.string(),
38
33
  name: z.string(),
39
34
  })),
40
- /**
41
- * @deprecated Use the top-level `tags` field on ContentItem in the translate response instead.
42
- */
43
- [FIELD_TYPES.enum.TAGS]: z.array(z.string()),
44
35
  });
45
36
  export const METADATA_FIELDS = z.record(z.string(), z.object({
46
37
  type: FIELD_TYPES,
@@ -1 +1 @@
1
- {"version":3,"file":"envContracts.js","sourceRoot":"","sources":["../../src/contracts/envContracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EACL,kCAAkC,EAClC,gCAAgC,GACjC,MAAM,oBAAoB,CAAA;AAE3B,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,C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,CAAC,CACH,CAAA;AAOD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAA;AAC/D,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;IAC3C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/B,IAAI,EAAE,qBAAqB;CAC5B,CAAC,CAAA;AACF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAA;AAKjE,MAAM,CAAC,MAAM,eAAe,GAAG,gBAAgB,CAAC,MAAM,CAAC;IACrD,kBAAkB,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;IACpD,cAAc,EAAE,eAAe,CAAC,QAAQ,EAAE;IAC1C,gBAAgB,EAAE,iBAAiB,CAAC,QAAQ,EAAE;CAC/C,CAAC,CAAA;AAYF,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC;IAC1C,YAAY,EAAE,GAAG,EAAE,CAAC,MAAM;IAC1B,WAAW,EACT,uIAAuI;IACzI,yBAAyB,EAAE,eAAe;IAC1C,kBAAkB,EAAE,qBAAqB;IACzC,2BAA2B,EAAE;QAC3B,GAAG,EAAE,eAAe;QACpB,GAAG,EAAE,kCAAkC;KACxC;IACD,mBAAmB,EAAE,gCAAgC;CACtD,CAAC,CAAA"}
@@ -12,17 +12,17 @@ export declare const publishRequestBody: z.ZodObject<{
12
12
  groupId: z.ZodString;
13
13
  metadata: z.ZodRecord<z.ZodAny, z.ZodAny>;
14
14
  translations: z.ZodRecord<z.ZodString, z.ZodString>;
15
- translatedSource: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
15
+ translatedSourceMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
16
16
  type: z.ZodLiteral<"inline">;
17
17
  value: z.ZodString;
18
- storageId: z.ZodOptional<z.ZodNever>;
18
+ fileUrl: z.ZodOptional<z.ZodNever>;
19
19
  }, z.core.$strip>, z.ZodObject<{
20
20
  type: z.ZodLiteral<"remote">;
21
- storageId: z.ZodString;
21
+ fileUrl: z.ZodString;
22
22
  contentSize: z.ZodOptional<z.ZodString>;
23
23
  filePath: z.ZodOptional<z.ZodString>;
24
24
  value: z.ZodOptional<z.ZodNever>;
25
- }, z.core.$strip>]>>;
25
+ }, z.core.$strip>]>>>;
26
26
  }, z.core.$strip>>;
27
27
  defaultLocale: z.ZodString;
28
28
  exportOptions: z.ZodOptional<z.ZodObject<{
@@ -51,17 +51,17 @@ export declare const postPublishContract: import("@lokalise/api-contracts").Payl
51
51
  groupId: z.ZodString;
52
52
  metadata: z.ZodRecord<z.ZodAny, z.ZodAny>;
53
53
  translations: z.ZodRecord<z.ZodString, z.ZodString>;
54
- translatedSource: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
54
+ translatedSourceMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
55
55
  type: z.ZodLiteral<"inline">;
56
56
  value: z.ZodString;
57
- storageId: z.ZodOptional<z.ZodNever>;
57
+ fileUrl: z.ZodOptional<z.ZodNever>;
58
58
  }, z.core.$strip>, z.ZodObject<{
59
59
  type: z.ZodLiteral<"remote">;
60
- storageId: z.ZodString;
60
+ fileUrl: z.ZodString;
61
61
  contentSize: z.ZodOptional<z.ZodString>;
62
62
  filePath: z.ZodOptional<z.ZodString>;
63
63
  value: z.ZodOptional<z.ZodNever>;
64
- }, z.core.$strip>]>>;
64
+ }, z.core.$strip>]>>>;
65
65
  }, z.core.$strip>>;
66
66
  defaultLocale: z.ZodString;
67
67
  exportOptions: z.ZodOptional<z.ZodObject<{
@@ -46,17 +46,17 @@ export declare const TRANSLATE_CONTENT_ITEM_SCHEMA: z.ZodObject<{
46
46
  groupId: z.ZodString;
47
47
  metadata: z.ZodRecord<z.ZodAny, z.ZodAny>;
48
48
  translations: z.ZodRecord<z.ZodString, z.ZodString>;
49
- translatedSource: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
49
+ translatedSourceMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
50
50
  type: z.ZodLiteral<"inline">;
51
51
  value: z.ZodString;
52
- storageId: z.ZodOptional<z.ZodNever>;
52
+ fileUrl: z.ZodOptional<z.ZodNever>;
53
53
  }, z.core.$strip>, z.ZodObject<{
54
54
  type: z.ZodLiteral<"remote">;
55
- storageId: z.ZodString;
55
+ fileUrl: z.ZodString;
56
56
  contentSize: z.ZodOptional<z.ZodString>;
57
57
  filePath: z.ZodOptional<z.ZodString>;
58
58
  value: z.ZodOptional<z.ZodNever>;
59
- }, z.core.$strip>]>>;
59
+ }, z.core.$strip>]>>>;
60
60
  itemGroups: z.ZodOptional<z.ZodArray<z.ZodObject<{
61
61
  id: z.ZodString;
62
62
  name: z.ZodString;
@@ -72,17 +72,17 @@ export declare const translateResponseBody: z.ZodObject<{
72
72
  groupId: z.ZodString;
73
73
  metadata: z.ZodRecord<z.ZodAny, z.ZodAny>;
74
74
  translations: z.ZodRecord<z.ZodString, z.ZodString>;
75
- translatedSource: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
75
+ translatedSourceMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
76
76
  type: z.ZodLiteral<"inline">;
77
77
  value: z.ZodString;
78
- storageId: z.ZodOptional<z.ZodNever>;
78
+ fileUrl: z.ZodOptional<z.ZodNever>;
79
79
  }, z.core.$strip>, z.ZodObject<{
80
80
  type: z.ZodLiteral<"remote">;
81
- storageId: z.ZodString;
81
+ fileUrl: z.ZodString;
82
82
  contentSize: z.ZodOptional<z.ZodString>;
83
83
  filePath: z.ZodOptional<z.ZodString>;
84
84
  value: z.ZodOptional<z.ZodNever>;
85
- }, z.core.$strip>]>>;
85
+ }, z.core.$strip>]>>>;
86
86
  itemGroups: z.ZodOptional<z.ZodArray<z.ZodObject<{
87
87
  id: z.ZodString;
88
88
  name: z.ZodString;
@@ -121,17 +121,17 @@ export declare const postTranslateContract: import("@lokalise/api-contracts").Pa
121
121
  groupId: z.ZodString;
122
122
  metadata: z.ZodRecord<z.ZodAny, z.ZodAny>;
123
123
  translations: z.ZodRecord<z.ZodString, z.ZodString>;
124
- translatedSource: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
124
+ translatedSourceMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
125
125
  type: z.ZodLiteral<"inline">;
126
126
  value: z.ZodString;
127
- storageId: z.ZodOptional<z.ZodNever>;
127
+ fileUrl: z.ZodOptional<z.ZodNever>;
128
128
  }, z.core.$strip>, z.ZodObject<{
129
129
  type: z.ZodLiteral<"remote">;
130
- storageId: z.ZodString;
130
+ fileUrl: z.ZodString;
131
131
  contentSize: z.ZodOptional<z.ZodString>;
132
132
  filePath: z.ZodOptional<z.ZodString>;
133
133
  value: z.ZodOptional<z.ZodNever>;
134
- }, z.core.$strip>]>>;
134
+ }, z.core.$strip>]>>>;
135
135
  itemGroups: z.ZodOptional<z.ZodArray<z.ZodObject<{
136
136
  id: z.ZodString;
137
137
  name: z.ZodString;
@@ -162,17 +162,17 @@ export declare const postTranslateContract: import("@lokalise/api-contracts").Pa
162
162
  groupId: z.ZodString;
163
163
  metadata: z.ZodRecord<z.ZodAny, z.ZodAny>;
164
164
  translations: z.ZodRecord<z.ZodString, z.ZodString>;
165
- translatedSource: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
165
+ translatedSourceMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
166
166
  type: z.ZodLiteral<"inline">;
167
167
  value: z.ZodString;
168
- storageId: z.ZodOptional<z.ZodNever>;
168
+ fileUrl: z.ZodOptional<z.ZodNever>;
169
169
  }, z.core.$strip>, z.ZodObject<{
170
170
  type: z.ZodLiteral<"remote">;
171
- storageId: z.ZodString;
171
+ fileUrl: z.ZodString;
172
172
  contentSize: z.ZodOptional<z.ZodString>;
173
173
  filePath: z.ZodOptional<z.ZodString>;
174
174
  value: z.ZodOptional<z.ZodNever>;
175
- }, z.core.$strip>]>>;
175
+ }, z.core.$strip>]>>>;
176
176
  itemGroups: z.ZodOptional<z.ZodArray<z.ZodObject<{
177
177
  id: z.ZodString;
178
178
  name: z.ZodString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/connector-api-contracts",
3
- "version": "1.46.0",
3
+ "version": "2.0.0",
4
4
  "description": "Lokalise Connector API schemas and contracts",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",