@lokalise/connector-api-contracts 1.28.0 → 1.29.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.
@@ -4,6 +4,15 @@ export declare const IMPORT_TAG_SCHEMA: z.ZodObject<{
4
4
  title: z.ZodString;
5
5
  }, z.core.$strip>;
6
6
  export type ImportTag = z.infer<typeof IMPORT_TAG_SCHEMA>;
7
+ export declare const CONNECTOR_ENV_FEATURES_SCHEMA: z.ZodObject<{
8
+ skippingEmptyTranslations: z.ZodOptional<z.ZodBoolean>;
9
+ showSkipEmptyOptionOnImport: z.ZodOptional<z.ZodBoolean>;
10
+ supportedImportTags: z.ZodOptional<z.ZodArray<z.ZodObject<{
11
+ id: z.ZodString;
12
+ title: z.ZodString;
13
+ }, z.core.$strip>>>;
14
+ }, z.core.$strip>;
15
+ export type ConnectorEnvFeatures = z.infer<typeof CONNECTOR_ENV_FEATURES_SCHEMA>;
7
16
  export declare const localeDefinition: z.ZodObject<{
8
17
  defaultLocale: z.ZodString;
9
18
  locales: z.ZodArray<z.ZodObject<{
@@ -11,10 +20,14 @@ export declare const localeDefinition: z.ZodObject<{
11
20
  code: z.ZodString;
12
21
  }, z.core.$strip>>;
13
22
  supportedContentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
14
- supportedImportTags: z.ZodOptional<z.ZodArray<z.ZodObject<{
15
- id: z.ZodString;
16
- title: z.ZodString;
17
- }, z.core.$strip>>>;
23
+ features: z.ZodOptional<z.ZodObject<{
24
+ skippingEmptyTranslations: z.ZodOptional<z.ZodBoolean>;
25
+ showSkipEmptyOptionOnImport: z.ZodOptional<z.ZodBoolean>;
26
+ supportedImportTags: z.ZodOptional<z.ZodArray<z.ZodObject<{
27
+ id: z.ZodString;
28
+ title: z.ZodString;
29
+ }, z.core.$strip>>>;
30
+ }, z.core.$strip>>;
18
31
  }, z.core.$strip>;
19
32
  export declare const envResponseBody: z.ZodObject<{
20
33
  defaultLocale: z.ZodString;
@@ -23,10 +36,14 @@ export declare const envResponseBody: z.ZodObject<{
23
36
  code: z.ZodString;
24
37
  }, z.core.$strip>>;
25
38
  supportedContentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
26
- supportedImportTags: z.ZodOptional<z.ZodArray<z.ZodObject<{
27
- id: z.ZodString;
28
- title: z.ZodString;
29
- }, z.core.$strip>>>;
39
+ features: z.ZodOptional<z.ZodObject<{
40
+ skippingEmptyTranslations: z.ZodOptional<z.ZodBoolean>;
41
+ showSkipEmptyOptionOnImport: z.ZodOptional<z.ZodBoolean>;
42
+ supportedImportTags: z.ZodOptional<z.ZodArray<z.ZodObject<{
43
+ id: z.ZodString;
44
+ title: z.ZodString;
45
+ }, z.core.$strip>>>;
46
+ }, z.core.$strip>>;
30
47
  cacheItemStructure: z.ZodRecord<z.ZodString, z.ZodString>;
31
48
  }, z.core.$strip>;
32
49
  export type EnvCacheItemStructure = {
@@ -43,10 +60,14 @@ export declare const getEnvContract: import("@lokalise/api-contracts").GetRouteD
43
60
  code: z.ZodString;
44
61
  }, z.core.$strip>>;
45
62
  supportedContentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
46
- supportedImportTags: z.ZodOptional<z.ZodArray<z.ZodObject<{
47
- id: z.ZodString;
48
- title: z.ZodString;
49
- }, z.core.$strip>>>;
63
+ features: z.ZodOptional<z.ZodObject<{
64
+ skippingEmptyTranslations: z.ZodOptional<z.ZodBoolean>;
65
+ showSkipEmptyOptionOnImport: z.ZodOptional<z.ZodBoolean>;
66
+ supportedImportTags: z.ZodOptional<z.ZodArray<z.ZodObject<{
67
+ id: z.ZodString;
68
+ title: z.ZodString;
69
+ }, z.core.$strip>>>;
70
+ }, z.core.$strip>>;
50
71
  cacheItemStructure: z.ZodRecord<z.ZodString, z.ZodString>;
51
72
  }, z.core.$strip>, undefined, undefined, z.ZodObject<{
52
73
  'ce-config': z.ZodString;
@@ -60,10 +81,14 @@ export declare const getEnvContract: import("@lokalise/api-contracts").GetRouteD
60
81
  code: z.ZodString;
61
82
  }, z.core.$strip>>;
62
83
  supportedContentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
63
- supportedImportTags: z.ZodOptional<z.ZodArray<z.ZodObject<{
64
- id: z.ZodString;
65
- title: z.ZodString;
66
- }, z.core.$strip>>>;
84
+ features: z.ZodOptional<z.ZodObject<{
85
+ skippingEmptyTranslations: z.ZodOptional<z.ZodBoolean>;
86
+ showSkipEmptyOptionOnImport: z.ZodOptional<z.ZodBoolean>;
87
+ supportedImportTags: z.ZodOptional<z.ZodArray<z.ZodObject<{
88
+ id: z.ZodString;
89
+ title: z.ZodString;
90
+ }, z.core.$strip>>>;
91
+ }, z.core.$strip>>;
67
92
  cacheItemStructure: z.ZodRecord<z.ZodString, z.ZodString>;
68
93
  }, z.core.$strip>;
69
94
  403: z.ZodUnion<readonly [z.ZodObject<{
@@ -5,6 +5,17 @@ export const IMPORT_TAG_SCHEMA = z.object({
5
5
  id: z.string().trim().min(1),
6
6
  title: z.string().trim().min(1),
7
7
  });
8
+ export const CONNECTOR_ENV_FEATURES_SCHEMA = z.object({
9
+ /** @deprecated Will be removed within next versions, use showSkipEmptyOptionOnImport */
10
+ skippingEmptyTranslations: z.boolean().optional(),
11
+ showSkipEmptyOptionOnImport: z.boolean().optional(),
12
+ supportedImportTags: z
13
+ .array(IMPORT_TAG_SCHEMA)
14
+ .optional()
15
+ .refine((tags) => !tags || new Set(tags.map((tag) => tag.id)).size === tags.length, {
16
+ message: 'supportedImportTags ids must be unique',
17
+ }),
18
+ });
8
19
  export const localeDefinition = z.object({
9
20
  defaultLocale: z.string(),
10
21
  locales: z.array(z.object({
@@ -12,12 +23,7 @@ export const localeDefinition = z.object({
12
23
  code: z.string(),
13
24
  })),
14
25
  supportedContentTypes: z.array(z.string()).optional(), // domain content types, e. g. "newsletters", "campaigns", "emails" etc
15
- supportedImportTags: z
16
- .array(IMPORT_TAG_SCHEMA)
17
- .optional()
18
- .refine((tags) => !tags || new Set(tags.map((tag) => tag.id)).size === tags.length, {
19
- message: 'supportedImportTags ids must be unique',
20
- }),
26
+ features: CONNECTOR_ENV_FEATURES_SCHEMA.optional(),
21
27
  });
22
28
  export const envResponseBody = localeDefinition.extend({
23
29
  cacheItemStructure: z.record(z.string(), z.string()),
@@ -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,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAChC,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,OAAO,EAAE,CAAC,CAAC,KAAK,CACd,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;KACjB,CAAC,CACH;IACD,qBAAqB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,uEAAuE;IAC9H,mBAAmB,EAAE,CAAC;SACnB,KAAK,CAAC,iBAAiB,CAAC;SACxB,QAAQ,EAAE;SACV,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,GAAG,CAAC,IAAI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C,2BAA2B,EAAE;QAC3B,GAAG,EAAE,eAAe;QACpB,GAAG,EAAE,kCAAkC;KACxC;IACD,mBAAmB,EAAE,gCAAgC;CACtD,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/connector-api-contracts",
3
- "version": "1.28.0",
3
+ "version": "1.29.1",
4
4
  "description": "Lokalise Connector API schemas and contracts",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",