@lokalise/connector-api-contracts 1.2.0 → 1.2.2
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/schemas/authSchemas.d.ts +17 -13
- package/dist/schemas/authSchemas.js +6 -6
- package/dist/schemas/authSchemas.js.map +1 -1
- package/dist/schemas/commonSchemas.d.ts +3 -3
- package/dist/schemas/commonSchemas.js +3 -3
- package/dist/schemas/envSchemas.d.ts +2 -2
- package/dist/schemas/itemListContract.d.ts +2 -2
- package/dist/schemas/publishSchemas.d.ts +2 -2
- package/dist/schemas/translateSchemas.d.ts +2 -2
- package/package.json +1 -1
|
@@ -12,30 +12,34 @@ export declare const getAuthContract: import("@lokalise/api-contracts").GetRoute
|
|
|
12
12
|
apiToken: "apiToken";
|
|
13
13
|
}>;
|
|
14
14
|
}, z.core.$strip>, undefined, undefined, z.ZodObject<{
|
|
15
|
-
'
|
|
16
|
-
'
|
|
15
|
+
'ce-config': z.ZodString;
|
|
16
|
+
'ce-auth': z.ZodString;
|
|
17
17
|
}, z.core.$strip>, false, false>;
|
|
18
18
|
export declare const postAuthResponseBody: z.ZodObject<{}, z.core.$loose>;
|
|
19
19
|
export type PostAuthResponseBody = Record<string, unknown> & {
|
|
20
20
|
url?: string;
|
|
21
21
|
};
|
|
22
22
|
export declare const postAuthContract: import("@lokalise/api-contracts").PayloadRouteDefinition<z.ZodNever, z.ZodObject<{}, z.core.$loose>, undefined, undefined, z.ZodObject<{
|
|
23
|
-
'
|
|
24
|
-
'
|
|
23
|
+
'ce-config': z.ZodString;
|
|
24
|
+
'ce-auth': z.ZodString;
|
|
25
25
|
}, z.core.$strip>, false, false>;
|
|
26
26
|
export declare const postAuthRefreshContract: import("@lokalise/api-contracts").PayloadRouteDefinition<z.ZodNever, z.ZodObject<{}, z.core.$loose>, undefined, undefined, z.ZodObject<{
|
|
27
|
-
'
|
|
28
|
-
'
|
|
27
|
+
'ce-config': z.ZodString;
|
|
28
|
+
'ce-auth': z.ZodString;
|
|
29
29
|
}, z.core.$strip>, false, false>;
|
|
30
|
-
export declare const
|
|
30
|
+
export declare const postAuthResponseRequestBody: z.ZodObject<{
|
|
31
31
|
query: z.ZodObject<{}, z.core.$loose>;
|
|
32
32
|
body: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
33
33
|
redirectUrl: z.ZodString;
|
|
34
34
|
}, z.core.$strip>;
|
|
35
|
-
export type
|
|
36
|
-
export declare const
|
|
37
|
-
export type
|
|
38
|
-
export declare const postAuthResponseContract: import("@lokalise/api-contracts").PayloadRouteDefinition<z.
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
export type PostAuthResponseRequestBody = z.infer<typeof postAuthResponseRequestBody>;
|
|
36
|
+
export declare const postAuthResponseResponseBody: z.ZodObject<{}, z.core.$loose>;
|
|
37
|
+
export type PostAuthResponseResponseBody = z.infer<typeof postAuthResponseResponseBody>;
|
|
38
|
+
export declare const postAuthResponseContract: import("@lokalise/api-contracts").PayloadRouteDefinition<z.ZodObject<{
|
|
39
|
+
query: z.ZodObject<{}, z.core.$loose>;
|
|
40
|
+
body: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
|
|
41
|
+
redirectUrl: z.ZodString;
|
|
42
|
+
}, z.core.$strip>, z.ZodObject<{}, z.core.$loose>, undefined, undefined, z.ZodObject<{
|
|
43
|
+
'ce-config': z.ZodString;
|
|
44
|
+
'ce-auth': z.ZodString;
|
|
41
45
|
}, z.core.$strip>, false, false>;
|
|
@@ -42,21 +42,21 @@ export const postAuthRefreshContract = buildPayloadRoute({
|
|
|
42
42
|
},
|
|
43
43
|
requestHeaderSchema: CONNECTOR_REQUEST_HEADERS_SCHEMA,
|
|
44
44
|
});
|
|
45
|
-
//
|
|
46
|
-
export const
|
|
45
|
+
// postAuthResponse
|
|
46
|
+
export const postAuthResponseRequestBody = z.object({
|
|
47
47
|
query: z.looseObject({}),
|
|
48
48
|
body: z.looseObject({}).optional(),
|
|
49
49
|
redirectUrl: z.string().max(255),
|
|
50
50
|
});
|
|
51
|
-
export const
|
|
51
|
+
export const postAuthResponseResponseBody = z.looseObject({});
|
|
52
52
|
export const postAuthResponseContract = buildPayloadRoute({
|
|
53
53
|
method: 'post',
|
|
54
|
-
requestBodySchema:
|
|
54
|
+
requestBodySchema: postAuthResponseRequestBody,
|
|
55
55
|
pathResolver: () => `/auth/response`,
|
|
56
56
|
description: 'Get auth configuration (applicable only for "OAuth" type)',
|
|
57
|
-
successResponseBodySchema:
|
|
57
|
+
successResponseBodySchema: postAuthResponseResponseBody,
|
|
58
58
|
responseSchemasByStatusCode: {
|
|
59
|
-
200:
|
|
59
|
+
200: postAuthResponseResponseBody,
|
|
60
60
|
403: authError,
|
|
61
61
|
},
|
|
62
62
|
requestHeaderSchema: CONNECTOR_REQUEST_HEADERS_SCHEMA,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authSchemas.js","sourceRoot":"","sources":["../../src/schemas/authSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC1E,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAA;AAE1F,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,UAAU,CAAU,CAAA;AAE3D,UAAU;AAEV,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC;CACnC,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC;IAC3C,YAAY,EAAE,GAAG,EAAE,CAAC,OAAO;IAC3B,WAAW,EAAE,gDAAgD;IAC7D,yBAAyB,EAAE,mBAAmB;IAC9C,2BAA2B,EAAE;QAC3B,GAAG,EAAE,mBAA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,CAAC,MAAM,CAAC;IAClD,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC;IACxB,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAClC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC;CACjC,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;AAG7D,MAAM,CAAC,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;IACxD,MAAM,EAAE,MAAM;IACd,iBAAiB,EAAE,2BAA2B;IAC9C,YAAY,EAAE,GAAG,EAAE,CAAC,gBAAgB;IACpC,WAAW,EAAE,2DAA2D;IACxE,yBAAyB,EAAE,4BAA4B;IACvD,2BAA2B,EAAE;QAC3B,GAAG,EAAE,4BAA4B;QACjC,GAAG,EAAE,SAAS;KACf;IACD,mBAAmB,EAAE,gCAAgC;CACtD,CAAC,CAAA"}
|
|
@@ -34,9 +34,9 @@ export type CommonErrorResponse = z.infer<typeof COMMON_ERROR_RESPONSE_SCHEMA>;
|
|
|
34
34
|
* These headers are used before the initial setup was established
|
|
35
35
|
*/
|
|
36
36
|
export declare const CONNECTOR_REQUEST_HEADERS_SCHEMA_PRE_SETUP: z.ZodObject<{
|
|
37
|
-
'
|
|
37
|
+
'ce-config': z.ZodString;
|
|
38
38
|
}, z.core.$strip>;
|
|
39
39
|
export declare const CONNECTOR_REQUEST_HEADERS_SCHEMA: z.ZodObject<{
|
|
40
|
-
'
|
|
41
|
-
'
|
|
40
|
+
'ce-config': z.ZodString;
|
|
41
|
+
'ce-auth': z.ZodString;
|
|
42
42
|
}, z.core.$strip>;
|
|
@@ -30,10 +30,10 @@ export const COMMON_ERROR_RESPONSE_SCHEMA = z.object({
|
|
|
30
30
|
* These headers are used before the initial setup was established
|
|
31
31
|
*/
|
|
32
32
|
export const CONNECTOR_REQUEST_HEADERS_SCHEMA_PRE_SETUP = z.object({
|
|
33
|
-
'
|
|
33
|
+
'ce-config': z.string(),
|
|
34
34
|
});
|
|
35
35
|
export const CONNECTOR_REQUEST_HEADERS_SCHEMA = z.object({
|
|
36
|
-
'
|
|
37
|
-
'
|
|
36
|
+
'ce-config': z.string(),
|
|
37
|
+
'ce-auth': z.string(),
|
|
38
38
|
});
|
|
39
39
|
//# sourceMappingURL=commonSchemas.js.map
|
|
@@ -29,6 +29,6 @@ export declare const getEnvContract: import("@lokalise/api-contracts").GetRouteD
|
|
|
29
29
|
}, z.core.$strip>>;
|
|
30
30
|
cacheItemStructure: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
31
31
|
}, z.core.$strip>, undefined, undefined, z.ZodObject<{
|
|
32
|
-
'
|
|
33
|
-
'
|
|
32
|
+
'ce-config': z.ZodString;
|
|
33
|
+
'ce-auth': z.ZodString;
|
|
34
34
|
}, z.core.$strip>, false, false>;
|
|
@@ -48,6 +48,6 @@ export declare const getItemListContract: import("@lokalise/api-contracts").GetR
|
|
|
48
48
|
limit: z.ZodOptional<z.ZodString>;
|
|
49
49
|
cursor: z.ZodOptional<z.ZodString>;
|
|
50
50
|
}, z.core.$strip>, z.ZodObject<{
|
|
51
|
-
'
|
|
52
|
-
'
|
|
51
|
+
'ce-config': z.ZodString;
|
|
52
|
+
'ce-auth': z.ZodString;
|
|
53
53
|
}, z.core.$strip>, false, false>;
|
|
@@ -40,6 +40,6 @@ export declare const postPublishContract: import("@lokalise/api-contracts").Payl
|
|
|
40
40
|
}, z.core.$strip>;
|
|
41
41
|
}, z.core.$strip>>;
|
|
42
42
|
}, z.core.$strip>, undefined, undefined, z.ZodObject<{
|
|
43
|
-
'
|
|
44
|
-
'
|
|
43
|
+
'ce-config': z.ZodString;
|
|
44
|
+
'ce-auth': z.ZodString;
|
|
45
45
|
}, z.core.$strip>, false, false>;
|
|
@@ -49,6 +49,6 @@ export declare const postTranslateContract: import("@lokalise/api-contracts").Pa
|
|
|
49
49
|
}, z.core.$strip>;
|
|
50
50
|
}, z.core.$strip>>;
|
|
51
51
|
}, z.core.$strip>, undefined, undefined, z.ZodObject<{
|
|
52
|
-
'
|
|
53
|
-
'
|
|
52
|
+
'ce-config': z.ZodString;
|
|
53
|
+
'ce-auth': z.ZodString;
|
|
54
54
|
}, z.core.$strip>, false, false>;
|