@lokalise/content-type-app-engine-contracts 6.11.0 → 6.12.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/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/schemas/connector/connectorApiSchemas.d.ts +0 -6
- package/dist/schemas/connector/connectorSchemas.d.ts +0 -3
- package/dist/schemas/integration/integrationApiSchemas.d.ts +0 -6
- package/dist/schemas/integration/integrationSchemas.d.ts +0 -3
- package/dist/schemas/link/linkApiSchemas.d.ts +0 -6
- package/dist/schemas/link/linkSchemas.d.ts +0 -3
- package/package.json +2 -2
- package/dist/schemas/preview/integrationPreviewApiSchemas.d.ts +0 -145
- package/dist/schemas/preview/integrationPreviewApiSchemas.js +0 -53
- package/dist/schemas/preview/integrationPreviewApiSchemas.js.map +0 -1
- package/dist/schemas/preview/integrationPreviewSchemas.d.ts +0 -13
- package/dist/schemas/preview/integrationPreviewSchemas.js +0 -8
- package/dist/schemas/preview/integrationPreviewSchemas.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -32,8 +32,6 @@ export * from './schemas/language/languageApiSchemas.ts';
|
|
|
32
32
|
export * from './schemas/language/languageSchemas.ts';
|
|
33
33
|
export * from './schemas/link/linkApiSchemas.ts';
|
|
34
34
|
export * from './schemas/link/linkSchemas.ts';
|
|
35
|
-
export * from './schemas/preview/integrationPreviewApiSchemas.ts';
|
|
36
|
-
export * from './schemas/preview/integrationPreviewSchemas.ts';
|
|
37
35
|
export * from './schemas/processResult/integrationProcessResultsApiSchemas.ts';
|
|
38
36
|
export * from './schemas/processResult/integrationProcessResultsSchemas.ts';
|
|
39
37
|
export * from './schemas/project/projectApiSchemas.ts';
|
package/dist/index.js
CHANGED
|
@@ -32,8 +32,6 @@ export * from './schemas/language/languageApiSchemas.js';
|
|
|
32
32
|
export * from './schemas/language/languageSchemas.js';
|
|
33
33
|
export * from './schemas/link/linkApiSchemas.js';
|
|
34
34
|
export * from './schemas/link/linkSchemas.js';
|
|
35
|
-
export * from './schemas/preview/integrationPreviewApiSchemas.js';
|
|
36
|
-
export * from './schemas/preview/integrationPreviewSchemas.js';
|
|
37
35
|
export * from './schemas/processResult/integrationProcessResultsApiSchemas.js';
|
|
38
36
|
export * from './schemas/processResult/integrationProcessResultsSchemas.js';
|
|
39
37
|
export * from './schemas/project/projectApiSchemas.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAA;AAChD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6CAA6C,CAAA;AAC3D,cAAc,0CAA0C,CAAA;AACxD,cAAc,oCAAoC,CAAA;AAClD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,mCAAmC,CAAA;AACjD,cAAc,iDAAiD,CAAA;AAC/D,cAAc,8CAA8C,CAAA;AAC5D,cAAc,4CAA4C,CAAA;AAC1D,cAAc,yCAAyC,CAAA;AACvD,cAAc,4CAA4C,CAAA;AAC1D,cAAc,wCAAwC,CAAA;AACtD,cAAc,8CAA8C,CAAA;AAC5D,cAAc,2CAA2C,CAAA;AACzD,cAAc,qCAAqC,CAAA;AACnD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,sCAAsC,CAAA;AACpD,cAAc,mCAAmC,CAAA;AACjD,cAAc,gDAAgD,CAAA;AAC9D,cAAc,6CAA6C,CAAA;AAC3D,cAAc,8DAA8D,CAAA;AAC5E,cAAc,2DAA2D,CAAA;AACzE,cAAc,uDAAuD,CAAA;AACrE,cAAc,oDAAoD,CAAA;AAClE,cAAc,gDAAgD,CAAA;AAC9D,cAAc,qDAAqD,CAAA;AACnE,cAAc,kDAAkD,CAAA;AAChE,cAAc,yCAAyC,CAAA;AACvD,cAAc,0CAA0C,CAAA;AACxD,cAAc,uCAAuC,CAAA;AACrD,cAAc,kCAAkC,CAAA;AAChD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAA;AAChD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6CAA6C,CAAA;AAC3D,cAAc,0CAA0C,CAAA;AACxD,cAAc,oCAAoC,CAAA;AAClD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,mCAAmC,CAAA;AACjD,cAAc,iDAAiD,CAAA;AAC/D,cAAc,8CAA8C,CAAA;AAC5D,cAAc,4CAA4C,CAAA;AAC1D,cAAc,yCAAyC,CAAA;AACvD,cAAc,4CAA4C,CAAA;AAC1D,cAAc,wCAAwC,CAAA;AACtD,cAAc,8CAA8C,CAAA;AAC5D,cAAc,2CAA2C,CAAA;AACzD,cAAc,qCAAqC,CAAA;AACnD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,sCAAsC,CAAA;AACpD,cAAc,mCAAmC,CAAA;AACjD,cAAc,gDAAgD,CAAA;AAC9D,cAAc,6CAA6C,CAAA;AAC3D,cAAc,8DAA8D,CAAA;AAC5E,cAAc,2DAA2D,CAAA;AACzE,cAAc,uDAAuD,CAAA;AACrE,cAAc,oDAAoD,CAAA;AAClE,cAAc,gDAAgD,CAAA;AAC9D,cAAc,qDAAqD,CAAA;AACnE,cAAc,kDAAkD,CAAA;AAChE,cAAc,yCAAyC,CAAA;AACvD,cAAc,0CAA0C,CAAA;AACxD,cAAc,uCAAuC,CAAA;AACrD,cAAc,kCAAkC,CAAA;AAChD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gEAAgE,CAAA;AAC9E,cAAc,6DAA6D,CAAA;AAC3E,cAAc,wCAAwC,CAAA;AACtD,cAAc,qCAAqC,CAAA;AACnD,cAAc,0CAA0C,CAAA;AACxD,cAAc,uCAAuC,CAAA;AACrD,cAAc,0CAA0C,CAAA;AACxD,cAAc,uCAAuC,CAAA;AACrD,cAAc,sCAAsC,CAAA;AACpD,cAAc,mCAAmC,CAAA"}
|
|
@@ -651,9 +651,6 @@ export declare const getConnectorManifest: import("@lokalise/api-contracts").Get
|
|
|
651
651
|
version: z.ZodNumber;
|
|
652
652
|
data: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
653
653
|
}, z.core.$strip>>;
|
|
654
|
-
preview: z.ZodOptional<z.ZodObject<{
|
|
655
|
-
enabled: z.ZodBoolean;
|
|
656
|
-
}, z.core.$strip>>;
|
|
657
654
|
columns: z.ZodRecord<z.ZodEnum<{
|
|
658
655
|
projectSetupList: "projectSetupList";
|
|
659
656
|
importModalList: "importModalList";
|
|
@@ -1323,9 +1320,6 @@ export declare const getConnectorManifest: import("@lokalise/api-contracts").Get
|
|
|
1323
1320
|
version: z.ZodNumber;
|
|
1324
1321
|
data: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
1325
1322
|
}, z.core.$strip>>;
|
|
1326
|
-
preview: z.ZodOptional<z.ZodObject<{
|
|
1327
|
-
enabled: z.ZodBoolean;
|
|
1328
|
-
}, z.core.$strip>>;
|
|
1329
1323
|
columns: z.ZodRecord<z.ZodEnum<{
|
|
1330
1324
|
projectSetupList: "projectSetupList";
|
|
1331
1325
|
importModalList: "importModalList";
|
|
@@ -615,9 +615,6 @@ export declare const GET_CONNECTOR_MANIFEST_RESPONSE_SCHEMA: z.ZodObject<{
|
|
|
615
615
|
version: z.ZodNumber;
|
|
616
616
|
data: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
617
617
|
}, z.core.$strip>>;
|
|
618
|
-
preview: z.ZodOptional<z.ZodObject<{
|
|
619
|
-
enabled: z.ZodBoolean;
|
|
620
|
-
}, z.core.$strip>>;
|
|
621
618
|
columns: z.ZodRecord<z.ZodEnum<{
|
|
622
619
|
projectSetupList: "projectSetupList";
|
|
623
620
|
importModalList: "importModalList";
|
|
@@ -655,9 +655,6 @@ export declare const getIntegrationManifestContract: import("@lokalise/api-contr
|
|
|
655
655
|
version: z.ZodNumber;
|
|
656
656
|
data: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
657
657
|
}, z.core.$strip>>;
|
|
658
|
-
preview: z.ZodOptional<z.ZodObject<{
|
|
659
|
-
enabled: z.ZodBoolean;
|
|
660
|
-
}, z.core.$strip>>;
|
|
661
658
|
columns: z.ZodRecord<z.ZodEnum<{
|
|
662
659
|
projectSetupList: "projectSetupList";
|
|
663
660
|
importModalList: "importModalList";
|
|
@@ -1324,9 +1321,6 @@ export declare const getIntegrationManifestContract: import("@lokalise/api-contr
|
|
|
1324
1321
|
version: z.ZodNumber;
|
|
1325
1322
|
data: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
1326
1323
|
}, z.core.$strip>>;
|
|
1327
|
-
preview: z.ZodOptional<z.ZodObject<{
|
|
1328
|
-
enabled: z.ZodBoolean;
|
|
1329
|
-
}, z.core.$strip>>;
|
|
1330
1324
|
columns: z.ZodRecord<z.ZodEnum<{
|
|
1331
1325
|
projectSetupList: "projectSetupList";
|
|
1332
1326
|
importModalList: "importModalList";
|
|
@@ -652,9 +652,6 @@ export declare const GET_INTEGRATION_MANIFEST_RESPONSE_SCHEMA: z.ZodObject<{
|
|
|
652
652
|
version: z.ZodNumber;
|
|
653
653
|
data: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
654
654
|
}, z.core.$strip>>;
|
|
655
|
-
preview: z.ZodOptional<z.ZodObject<{
|
|
656
|
-
enabled: z.ZodBoolean;
|
|
657
|
-
}, z.core.$strip>>;
|
|
658
655
|
columns: z.ZodRecord<z.ZodEnum<{
|
|
659
656
|
projectSetupList: "projectSetupList";
|
|
660
657
|
importModalList: "importModalList";
|
|
@@ -576,9 +576,6 @@ export declare const getLinkManifest: import("@lokalise/api-contracts").GetRoute
|
|
|
576
576
|
version: import("zod").ZodNumber;
|
|
577
577
|
data: import("zod").ZodOptional<import("zod").ZodObject<{}, import("zod/v4/core").$loose>>;
|
|
578
578
|
}, import("zod/v4/core").$strip>>;
|
|
579
|
-
preview: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
580
|
-
enabled: import("zod").ZodBoolean;
|
|
581
|
-
}, import("zod/v4/core").$strip>>;
|
|
582
579
|
columns: import("zod").ZodRecord<import("zod").ZodEnum<{
|
|
583
580
|
projectSetupList: "projectSetupList";
|
|
584
581
|
importModalList: "importModalList";
|
|
@@ -1243,9 +1240,6 @@ export declare const getLinkManifest: import("@lokalise/api-contracts").GetRoute
|
|
|
1243
1240
|
version: import("zod").ZodNumber;
|
|
1244
1241
|
data: import("zod").ZodOptional<import("zod").ZodObject<{}, import("zod/v4/core").$loose>>;
|
|
1245
1242
|
}, import("zod/v4/core").$strip>>;
|
|
1246
|
-
preview: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1247
|
-
enabled: import("zod").ZodBoolean;
|
|
1248
|
-
}, import("zod/v4/core").$strip>>;
|
|
1249
1243
|
columns: import("zod").ZodRecord<import("zod").ZodEnum<{
|
|
1250
1244
|
projectSetupList: "projectSetupList";
|
|
1251
1245
|
importModalList: "importModalList";
|
|
@@ -577,9 +577,6 @@ export declare const GET_LINK_MANIFEST_RESPONSE_SCHEMA: z.ZodObject<{
|
|
|
577
577
|
version: z.ZodNumber;
|
|
578
578
|
data: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
579
579
|
}, z.core.$strip>>;
|
|
580
|
-
preview: z.ZodOptional<z.ZodObject<{
|
|
581
|
-
enabled: z.ZodBoolean;
|
|
582
|
-
}, z.core.$strip>>;
|
|
583
580
|
columns: z.ZodRecord<z.ZodEnum<{
|
|
584
581
|
projectSetupList: "projectSetupList";
|
|
585
582
|
importModalList: "importModalList";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lokalise/content-type-app-engine-contracts",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.12.0",
|
|
4
4
|
"description": "Content Type App Engine service contracts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"zod": ">=4.5.0 <5.0.0"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@lokalise/connector-api-contracts": "^11.
|
|
20
|
+
"@lokalise/connector-api-contracts": "^11.10.0",
|
|
21
21
|
"@lokalise/content-conversion-api-schemas": "^1.1.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Contract for resolving the connected site and its staging origin for in-context preview
|
|
3
|
-
* GET /v1/integrations/{integrationId}/preview-site
|
|
4
|
-
*
|
|
5
|
-
* Proxies the connector's `GET /v1/preview-site` with the integration's stored auth.
|
|
6
|
-
* The response is the connector contract's typed `available` / `unavailable` state;
|
|
7
|
-
* connectors without preview support answer 400 `PREVIEW_NOT_SUPPORTED`.
|
|
8
|
-
*
|
|
9
|
-
* Accepts service-to-service tokens (the preview proxy) as well as user tokens
|
|
10
|
-
* with access to the integration.
|
|
11
|
-
*/
|
|
12
|
-
export declare const getIntegrationPreviewSiteContract: import("@lokalise/api-contracts").GetRouteDefinition<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
13
|
-
state: import("zod").ZodLiteral<"available">;
|
|
14
|
-
site: import("zod").ZodObject<{
|
|
15
|
-
id: import("zod").ZodString;
|
|
16
|
-
name: import("zod").ZodString;
|
|
17
|
-
stagingOrigin: import("zod").ZodString;
|
|
18
|
-
lastPublishedAt: import("zod").ZodNullable<import("zod").ZodISODateTime>;
|
|
19
|
-
assetOrigins: import("zod").ZodArray<import("zod").ZodString>;
|
|
20
|
-
}, import("zod/v4/core").$strip>;
|
|
21
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
22
|
-
state: import("zod").ZodLiteral<"unavailable">;
|
|
23
|
-
reason: import("zod").ZodEnum<{
|
|
24
|
-
SITE_NOT_FOUND: "SITE_NOT_FOUND";
|
|
25
|
-
SITE_NOT_PUBLISHED: "SITE_NOT_PUBLISHED";
|
|
26
|
-
NO_STAGING_ORIGIN: "NO_STAGING_ORIGIN";
|
|
27
|
-
}>;
|
|
28
|
-
}, import("zod/v4/core").$strip>], "state">, import("zod").ZodObject<{
|
|
29
|
-
integrationId: import("zod").ZodGUID;
|
|
30
|
-
}, import("zod/v4/core").$strip>, undefined, import("zod").ZodObject<{
|
|
31
|
-
authorization: import("zod").ZodOptional<import("zod").ZodString>;
|
|
32
|
-
}, import("zod/v4/core").$strip>, undefined, false, false, {
|
|
33
|
-
200: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
34
|
-
state: import("zod").ZodLiteral<"available">;
|
|
35
|
-
site: import("zod").ZodObject<{
|
|
36
|
-
id: import("zod").ZodString;
|
|
37
|
-
name: import("zod").ZodString;
|
|
38
|
-
stagingOrigin: import("zod").ZodString;
|
|
39
|
-
lastPublishedAt: import("zod").ZodNullable<import("zod").ZodISODateTime>;
|
|
40
|
-
assetOrigins: import("zod").ZodArray<import("zod").ZodString>;
|
|
41
|
-
}, import("zod/v4/core").$strip>;
|
|
42
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
43
|
-
state: import("zod").ZodLiteral<"unavailable">;
|
|
44
|
-
reason: import("zod").ZodEnum<{
|
|
45
|
-
SITE_NOT_FOUND: "SITE_NOT_FOUND";
|
|
46
|
-
SITE_NOT_PUBLISHED: "SITE_NOT_PUBLISHED";
|
|
47
|
-
NO_STAGING_ORIGIN: "NO_STAGING_ORIGIN";
|
|
48
|
-
}>;
|
|
49
|
-
}, import("zod/v4/core").$strip>], "state">;
|
|
50
|
-
400: import("zod").ZodObject<{
|
|
51
|
-
message: import("zod").ZodString;
|
|
52
|
-
code: import("zod").ZodString;
|
|
53
|
-
errorCode: import("zod").ZodString;
|
|
54
|
-
details: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
55
|
-
}, import("zod/v4/core").$strip>;
|
|
56
|
-
401: import("zod").ZodObject<{
|
|
57
|
-
message: import("zod").ZodString;
|
|
58
|
-
code: import("zod").ZodString;
|
|
59
|
-
errorCode: import("zod").ZodString;
|
|
60
|
-
details: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
61
|
-
}, import("zod/v4/core").$strip>;
|
|
62
|
-
404: import("zod").ZodObject<{
|
|
63
|
-
message: import("zod").ZodString;
|
|
64
|
-
code: import("zod").ZodString;
|
|
65
|
-
errorCode: import("zod").ZodString;
|
|
66
|
-
details: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
67
|
-
}, import("zod/v4/core").$strip>;
|
|
68
|
-
}>;
|
|
69
|
-
/**
|
|
70
|
-
* Contract for resolving the pages that render an item, for in-context preview
|
|
71
|
-
* GET /v1/integrations/{integrationId}/preview-targets?itemId=
|
|
72
|
-
*
|
|
73
|
-
* `itemId` is the connector item identifier (`ItemIdentifier.groupId`), which
|
|
74
|
-
* autopilot stores as the content item `sourceId`. Paths are relative to the
|
|
75
|
-
* staging origin returned by the preview-site endpoint.
|
|
76
|
-
*/
|
|
77
|
-
export declare const getIntegrationPreviewTargetsContract: import("@lokalise/api-contracts").GetRouteDefinition<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
78
|
-
state: import("zod").ZodLiteral<"resolved">;
|
|
79
|
-
siteId: import("zod").ZodString;
|
|
80
|
-
targets: import("zod").ZodArray<import("zod").ZodObject<{
|
|
81
|
-
id: import("zod").ZodString;
|
|
82
|
-
path: import("zod").ZodString;
|
|
83
|
-
label: import("zod").ZodString;
|
|
84
|
-
kind: import("zod").ZodEnum<{
|
|
85
|
-
page: "page";
|
|
86
|
-
collection_index: "collection_index";
|
|
87
|
-
collection_detail: "collection_detail";
|
|
88
|
-
}>;
|
|
89
|
-
}, import("zod/v4/core").$strip>>;
|
|
90
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
91
|
-
state: import("zod").ZodLiteral<"unsupported">;
|
|
92
|
-
siteId: import("zod").ZodString;
|
|
93
|
-
reason: import("zod").ZodEnum<{
|
|
94
|
-
ITEM_NOT_FOUND: "ITEM_NOT_FOUND";
|
|
95
|
-
ITEM_NOT_PREVIEWABLE: "ITEM_NOT_PREVIEWABLE";
|
|
96
|
-
ITEM_NOT_PUBLISHED: "ITEM_NOT_PUBLISHED";
|
|
97
|
-
}>;
|
|
98
|
-
}, import("zod/v4/core").$strip>], "state">, import("zod").ZodObject<{
|
|
99
|
-
integrationId: import("zod").ZodGUID;
|
|
100
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
101
|
-
itemId: import("zod").ZodString;
|
|
102
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
103
|
-
authorization: import("zod").ZodOptional<import("zod").ZodString>;
|
|
104
|
-
}, import("zod/v4/core").$strip>, undefined, false, false, {
|
|
105
|
-
200: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
106
|
-
state: import("zod").ZodLiteral<"resolved">;
|
|
107
|
-
siteId: import("zod").ZodString;
|
|
108
|
-
targets: import("zod").ZodArray<import("zod").ZodObject<{
|
|
109
|
-
id: import("zod").ZodString;
|
|
110
|
-
path: import("zod").ZodString;
|
|
111
|
-
label: import("zod").ZodString;
|
|
112
|
-
kind: import("zod").ZodEnum<{
|
|
113
|
-
page: "page";
|
|
114
|
-
collection_index: "collection_index";
|
|
115
|
-
collection_detail: "collection_detail";
|
|
116
|
-
}>;
|
|
117
|
-
}, import("zod/v4/core").$strip>>;
|
|
118
|
-
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
119
|
-
state: import("zod").ZodLiteral<"unsupported">;
|
|
120
|
-
siteId: import("zod").ZodString;
|
|
121
|
-
reason: import("zod").ZodEnum<{
|
|
122
|
-
ITEM_NOT_FOUND: "ITEM_NOT_FOUND";
|
|
123
|
-
ITEM_NOT_PREVIEWABLE: "ITEM_NOT_PREVIEWABLE";
|
|
124
|
-
ITEM_NOT_PUBLISHED: "ITEM_NOT_PUBLISHED";
|
|
125
|
-
}>;
|
|
126
|
-
}, import("zod/v4/core").$strip>], "state">;
|
|
127
|
-
400: import("zod").ZodObject<{
|
|
128
|
-
message: import("zod").ZodString;
|
|
129
|
-
code: import("zod").ZodString;
|
|
130
|
-
errorCode: import("zod").ZodString;
|
|
131
|
-
details: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
132
|
-
}, import("zod/v4/core").$strip>;
|
|
133
|
-
401: import("zod").ZodObject<{
|
|
134
|
-
message: import("zod").ZodString;
|
|
135
|
-
code: import("zod").ZodString;
|
|
136
|
-
errorCode: import("zod").ZodString;
|
|
137
|
-
details: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
138
|
-
}, import("zod/v4/core").$strip>;
|
|
139
|
-
404: import("zod").ZodObject<{
|
|
140
|
-
message: import("zod").ZodString;
|
|
141
|
-
code: import("zod").ZodString;
|
|
142
|
-
errorCode: import("zod").ZodString;
|
|
143
|
-
details: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
144
|
-
}, import("zod/v4/core").$strip>;
|
|
145
|
-
}>;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { buildGetRoute } from '@lokalise/api-contracts';
|
|
2
|
-
import { previewSiteResponseBody, previewTargetsRequestQueryString, previewTargetsResponseBody, } from '@lokalise/connector-api-contracts';
|
|
3
|
-
import { AUTHORIZATION_HEADER_SCHEMA, COMMON_ERROR_RESPONSE_SCHEMA_V2, } from '../commonRequestSchemas.js';
|
|
4
|
-
import { INTEGRATION_PREVIEW_PATH_PARAMS_SCHEMA } from './integrationPreviewSchemas.js';
|
|
5
|
-
/**
|
|
6
|
-
* Contract for resolving the connected site and its staging origin for in-context preview
|
|
7
|
-
* GET /v1/integrations/{integrationId}/preview-site
|
|
8
|
-
*
|
|
9
|
-
* Proxies the connector's `GET /v1/preview-site` with the integration's stored auth.
|
|
10
|
-
* The response is the connector contract's typed `available` / `unavailable` state;
|
|
11
|
-
* connectors without preview support answer 400 `PREVIEW_NOT_SUPPORTED`.
|
|
12
|
-
*
|
|
13
|
-
* Accepts service-to-service tokens (the preview proxy) as well as user tokens
|
|
14
|
-
* with access to the integration.
|
|
15
|
-
*/
|
|
16
|
-
export const getIntegrationPreviewSiteContract = buildGetRoute({
|
|
17
|
-
visibility: 'internal',
|
|
18
|
-
pathResolver: (params) => `/v1/integrations/${params.integrationId}/preview-site`,
|
|
19
|
-
description: 'Resolve the connected site and its HTTPS staging origin for in-context preview',
|
|
20
|
-
requestPathParamsSchema: INTEGRATION_PREVIEW_PATH_PARAMS_SCHEMA,
|
|
21
|
-
successResponseBodySchema: previewSiteResponseBody,
|
|
22
|
-
responseSchemasByStatusCode: {
|
|
23
|
-
200: previewSiteResponseBody,
|
|
24
|
-
400: COMMON_ERROR_RESPONSE_SCHEMA_V2,
|
|
25
|
-
401: COMMON_ERROR_RESPONSE_SCHEMA_V2,
|
|
26
|
-
404: COMMON_ERROR_RESPONSE_SCHEMA_V2,
|
|
27
|
-
},
|
|
28
|
-
requestHeaderSchema: AUTHORIZATION_HEADER_SCHEMA,
|
|
29
|
-
});
|
|
30
|
-
/**
|
|
31
|
-
* Contract for resolving the pages that render an item, for in-context preview
|
|
32
|
-
* GET /v1/integrations/{integrationId}/preview-targets?itemId=
|
|
33
|
-
*
|
|
34
|
-
* `itemId` is the connector item identifier (`ItemIdentifier.groupId`), which
|
|
35
|
-
* autopilot stores as the content item `sourceId`. Paths are relative to the
|
|
36
|
-
* staging origin returned by the preview-site endpoint.
|
|
37
|
-
*/
|
|
38
|
-
export const getIntegrationPreviewTargetsContract = buildGetRoute({
|
|
39
|
-
visibility: 'internal',
|
|
40
|
-
pathResolver: (params) => `/v1/integrations/${params.integrationId}/preview-targets`,
|
|
41
|
-
description: 'Resolve the pages that render an item as paths under the staging origin',
|
|
42
|
-
requestPathParamsSchema: INTEGRATION_PREVIEW_PATH_PARAMS_SCHEMA,
|
|
43
|
-
requestQuerySchema: previewTargetsRequestQueryString,
|
|
44
|
-
successResponseBodySchema: previewTargetsResponseBody,
|
|
45
|
-
responseSchemasByStatusCode: {
|
|
46
|
-
200: previewTargetsResponseBody,
|
|
47
|
-
400: COMMON_ERROR_RESPONSE_SCHEMA_V2,
|
|
48
|
-
401: COMMON_ERROR_RESPONSE_SCHEMA_V2,
|
|
49
|
-
404: COMMON_ERROR_RESPONSE_SCHEMA_V2,
|
|
50
|
-
},
|
|
51
|
-
requestHeaderSchema: AUTHORIZATION_HEADER_SCHEMA,
|
|
52
|
-
});
|
|
53
|
-
//# sourceMappingURL=integrationPreviewApiSchemas.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integrationPreviewApiSchemas.js","sourceRoot":"","sources":["../../../src/schemas/preview/integrationPreviewApiSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EACL,uBAAuB,EACvB,gCAAgC,EAChC,0BAA0B,GAC3B,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,sCAAsC,EAAE,MAAM,gCAAgC,CAAA;AAEvF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,aAAa,CAAC;IAC7D,UAAU,EAAE,UAAU;IACtB,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,oBAAoB,MAAM,CAAC,aAAa,eAAe;IACjF,WAAW,EAAE,gFAAgF;IAC7F,uBAAuB,EAAE,sCAAsC;IAC/D,yBAAyB,EAAE,uBAAuB;IAClD,2BAA2B,EAAE;QAC3B,GAAG,EAAE,uBAAuB;QAC5B,GAAG,EAAE,+BAA+B;QACpC,GAAG,EAAE,+BAA+B;QACpC,GAAG,EAAE,+BAA+B;KACrC;IACD,mBAAmB,EAAE,2BAA2B;CACjD,CAAC,CAAA;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,aAAa,CAAC;IAChE,UAAU,EAAE,UAAU;IACtB,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,oBAAoB,MAAM,CAAC,aAAa,kBAAkB;IACpF,WAAW,EAAE,yEAAyE;IACtF,uBAAuB,EAAE,sCAAsC;IAC/D,kBAAkB,EAAE,gCAAgC;IACpD,yBAAyB,EAAE,0BAA0B;IACrD,2BAA2B,EAAE;QAC3B,GAAG,EAAE,0BAA0B;QAC/B,GAAG,EAAE,+BAA+B;QACpC,GAAG,EAAE,+BAA+B;QACpC,GAAG,EAAE,+BAA+B;KACrC;IACD,mBAAmB,EAAE,2BAA2B;CACjD,CAAC,CAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { PreviewSiteResponseBody, PreviewTargetsRequestQueryString, PreviewTargetsResponseBody } from '@lokalise/connector-api-contracts';
|
|
2
|
-
import { z } from 'zod/v4';
|
|
3
|
-
/**
|
|
4
|
-
* Path parameters for the integration preview endpoints
|
|
5
|
-
*/
|
|
6
|
-
export declare const INTEGRATION_PREVIEW_PATH_PARAMS_SCHEMA: z.ZodObject<{
|
|
7
|
-
integrationId: z.ZodGUID;
|
|
8
|
-
}, z.core.$strip>;
|
|
9
|
-
export type IntegrationPreviewPathParams = z.infer<typeof INTEGRATION_PREVIEW_PATH_PARAMS_SCHEMA>;
|
|
10
|
-
/**
|
|
11
|
-
* Re-export types from connector-api-contracts for convenience
|
|
12
|
-
*/
|
|
13
|
-
export type { PreviewSiteResponseBody, PreviewTargetsRequestQueryString, PreviewTargetsResponseBody, };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integrationPreviewSchemas.js","sourceRoot":"","sources":["../../../src/schemas/preview/integrationPreviewSchemas.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7D,aAAa,EAAE,CAAC,CAAC,IAAI,EAAE;CACxB,CAAC,CAAA"}
|