@lokalise/content-type-app-engine-contracts 2.12.0 → 2.13.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.
Files changed (27) hide show
  1. package/dist/index.d.ts +6 -0
  2. package/dist/index.js +6 -0
  3. package/dist/index.js.map +1 -1
  4. package/dist/schemas/auth/integrationAuthApiSchemas.d.ts +116 -0
  5. package/dist/schemas/auth/integrationAuthApiSchemas.js +70 -0
  6. package/dist/schemas/auth/integrationAuthApiSchemas.js.map +1 -0
  7. package/dist/schemas/auth/integrationAuthSchemas.d.ts +75 -0
  8. package/dist/schemas/auth/integrationAuthSchemas.js +96 -0
  9. package/dist/schemas/auth/integrationAuthSchemas.js.map +1 -0
  10. package/dist/schemas/content/contentApiSchemas.d.ts +4 -4
  11. package/dist/schemas/content/contentSchemas.d.ts +4 -4
  12. package/dist/schemas/integration/integrationApiSchemas.d.ts +3 -0
  13. package/dist/schemas/integration/integrationApiSchemas.js +6 -0
  14. package/dist/schemas/integration/integrationApiSchemas.js.map +1 -1
  15. package/dist/schemas/itemGroup/integrationItemGroupApiSchemas.d.ts +48 -0
  16. package/dist/schemas/itemGroup/integrationItemGroupApiSchemas.js +23 -0
  17. package/dist/schemas/itemGroup/integrationItemGroupApiSchemas.js.map +1 -0
  18. package/dist/schemas/itemGroup/integrationItemGroupSchemas.d.ts +13 -0
  19. package/dist/schemas/itemGroup/integrationItemGroupSchemas.js +8 -0
  20. package/dist/schemas/itemGroup/integrationItemGroupSchemas.js.map +1 -0
  21. package/dist/schemas/itemList/integrationItemListApiSchemas.d.ts +58 -0
  22. package/dist/schemas/itemList/integrationItemListApiSchemas.js +23 -0
  23. package/dist/schemas/itemList/integrationItemListApiSchemas.js.map +1 -0
  24. package/dist/schemas/itemList/integrationItemListSchemas.d.ts +17 -0
  25. package/dist/schemas/itemList/integrationItemListSchemas.js +8 -0
  26. package/dist/schemas/itemList/integrationItemListSchemas.js.map +1 -0
  27. package/package.json +3 -2
package/dist/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  export * from './schemas/auth/authApiSchemas.ts';
2
2
  export * from './schemas/auth/authSchemas.ts';
3
+ export * from './schemas/auth/integrationAuthApiSchemas.ts';
4
+ export * from './schemas/auth/integrationAuthSchemas.ts';
3
5
  export * from './schemas/commonRequestSchemas.ts';
4
6
  export * from './schemas/content/contentApiSchemas.ts';
5
7
  export * from './schemas/content/contentSchemas.ts';
@@ -7,6 +9,10 @@ export * from './schemas/env/envApiSchemas.ts';
7
9
  export * from './schemas/env/envSchemas.ts';
8
10
  export * from './schemas/integration/integrationApiSchemas.ts';
9
11
  export * from './schemas/integration/integrationSchemas.ts';
12
+ export * from './schemas/itemGroup/integrationItemGroupApiSchemas.ts';
13
+ export * from './schemas/itemGroup/integrationItemGroupSchemas.ts';
14
+ export * from './schemas/itemList/integrationItemListApiSchemas.ts';
15
+ export * from './schemas/itemList/integrationItemListSchemas.ts';
10
16
  export * from './schemas/itemList/itemListContracts.ts';
11
17
  export * from './schemas/language/languageApiSchemas.ts';
12
18
  export * from './schemas/language/languageSchemas.ts';
package/dist/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  export * from "./schemas/auth/authApiSchemas.js";
2
2
  export * from "./schemas/auth/authSchemas.js";
3
+ export * from "./schemas/auth/integrationAuthApiSchemas.js";
4
+ export * from "./schemas/auth/integrationAuthSchemas.js";
3
5
  export * from "./schemas/commonRequestSchemas.js";
4
6
  export * from "./schemas/content/contentApiSchemas.js";
5
7
  export * from "./schemas/content/contentSchemas.js";
@@ -7,6 +9,10 @@ export * from "./schemas/env/envApiSchemas.js";
7
9
  export * from "./schemas/env/envSchemas.js";
8
10
  export * from "./schemas/integration/integrationApiSchemas.js";
9
11
  export * from "./schemas/integration/integrationSchemas.js";
12
+ export * from "./schemas/itemGroup/integrationItemGroupApiSchemas.js";
13
+ export * from "./schemas/itemGroup/integrationItemGroupSchemas.js";
14
+ export * from "./schemas/itemList/integrationItemListApiSchemas.js";
15
+ export * from "./schemas/itemList/integrationItemListSchemas.js";
10
16
  export * from "./schemas/itemList/itemListContracts.js";
11
17
  export * from "./schemas/language/languageApiSchemas.js";
12
18
  export * from "./schemas/language/languageSchemas.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,mCAAmC,CAAA;AAEjD,cAAc,wCAAwC,CAAA;AACtD,cAAc,qCAAqC,CAAA;AAEnD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA;AAE3C,cAAc,gDAAgD,CAAA;AAC9D,cAAc,6CAA6C,CAAA;AAE3D,cAAc,yCAAyC,CAAA;AACvD,cAAc,0CAA0C,CAAA;AACxD,cAAc,uCAAuC,CAAA;AACrD,cAAc,wCAAwC,CAAA;AACtD,cAAc,qCAAqC,CAAA;AACnD,cAAc,sCAAsC,CAAA;AACpD,cAAc,mCAAmC,CAAA"}
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,mCAAmC,CAAA;AAEjD,cAAc,wCAAwC,CAAA;AACtD,cAAc,qCAAqC,CAAA;AAEnD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA;AAE3C,cAAc,gDAAgD,CAAA;AAC9D,cAAc,6CAA6C,CAAA;AAE3D,cAAc,uDAAuD,CAAA;AACrE,cAAc,oDAAoD,CAAA;AAElE,cAAc,qDAAqD,CAAA;AACnE,cAAc,kDAAkD,CAAA;AAChE,cAAc,yCAAyC,CAAA;AACvD,cAAc,0CAA0C,CAAA;AACxD,cAAc,uCAAuC,CAAA;AACrD,cAAc,wCAAwC,CAAA;AACtD,cAAc,qCAAqC,CAAA;AACnD,cAAc,sCAAsC,CAAA;AACpD,cAAc,mCAAmC,CAAA"}
@@ -0,0 +1,116 @@
1
+ import { z } from 'zod/v4';
2
+ /**
3
+ * Contract for initiating OAuth authentication flow
4
+ * POST /v1/integrations/auth/initiate
5
+ *
6
+ * Note: This endpoint does not require integrationId in the path because
7
+ * the Integration and IntegrationUser records are created as part of this flow.
8
+ * The integrationId is returned in the response for use in subsequent calls.
9
+ */
10
+ export declare const postInitiateIntegrationAuthContract: import("@lokalise/api-contracts").PayloadRouteDefinition<z.ZodObject<{
11
+ connectorName: z.ZodString;
12
+ config: z.ZodRecord<z.ZodString, z.ZodAny>;
13
+ }, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
14
+ integrationId: z.ZodGUID;
15
+ authorizationUrl: z.ZodString;
16
+ }, z.core.$strip>, z.ZodObject<{
17
+ message: z.ZodString;
18
+ errorCode: z.ZodString;
19
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
20
+ }, z.core.$strip>]>, undefined, undefined, z.ZodObject<{
21
+ authorization: z.ZodOptional<z.ZodString>;
22
+ }, z.core.$strip>, undefined, false, false, {
23
+ 200: z.ZodObject<{
24
+ integrationId: z.ZodGUID;
25
+ authorizationUrl: z.ZodString;
26
+ }, z.core.$strip>;
27
+ 400: z.ZodObject<{
28
+ message: z.ZodString;
29
+ errorCode: z.ZodString;
30
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
31
+ }, z.core.$strip>;
32
+ 401: z.ZodObject<{
33
+ message: z.ZodString;
34
+ errorCode: z.ZodString;
35
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
36
+ }, z.core.$strip>;
37
+ }>;
38
+ /**
39
+ * Contract for checking OAuth authentication status
40
+ * GET /v1/integrations/{integrationId}/auth/status
41
+ */
42
+ export declare const getIntegrationAuthStatusContract: import("@lokalise/api-contracts").GetRouteDefinition<z.ZodUnion<readonly [z.ZodObject<{
43
+ status: z.ZodEnum<{
44
+ readonly pending: "pending";
45
+ readonly completed: "completed";
46
+ readonly failed: "failed";
47
+ }>;
48
+ error: z.ZodOptional<z.ZodString>;
49
+ }, z.core.$strip>, z.ZodObject<{
50
+ message: z.ZodString;
51
+ errorCode: z.ZodString;
52
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
53
+ }, z.core.$strip>]>, z.ZodObject<{
54
+ integrationId: z.ZodGUID;
55
+ }, z.core.$strip>, undefined, z.ZodObject<{
56
+ authorization: z.ZodOptional<z.ZodString>;
57
+ }, z.core.$strip>, undefined, false, false, {
58
+ 200: z.ZodObject<{
59
+ status: z.ZodEnum<{
60
+ readonly pending: "pending";
61
+ readonly completed: "completed";
62
+ readonly failed: "failed";
63
+ }>;
64
+ error: z.ZodOptional<z.ZodString>;
65
+ }, z.core.$strip>;
66
+ 401: z.ZodObject<{
67
+ message: z.ZodString;
68
+ errorCode: z.ZodString;
69
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
70
+ }, z.core.$strip>;
71
+ 404: z.ZodObject<{
72
+ message: z.ZodString;
73
+ errorCode: z.ZodString;
74
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
75
+ }, z.core.$strip>;
76
+ }>;
77
+ /**
78
+ * Contract for handling OAuth callback
79
+ * POST /v1/integrations/{integrationId}/auth/callback
80
+ */
81
+ export declare const postIntegrationAuthCallbackContract: import("@lokalise/api-contracts").PayloadRouteDefinition<z.ZodObject<{
82
+ query: z.ZodObject<{}, z.core.$loose>;
83
+ body: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
84
+ redirectUrl: z.ZodString;
85
+ }, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
86
+ success: z.ZodBoolean;
87
+ integrationId: z.ZodGUID;
88
+ }, z.core.$strip>, z.ZodObject<{
89
+ message: z.ZodString;
90
+ errorCode: z.ZodString;
91
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
92
+ }, z.core.$strip>]>, z.ZodObject<{
93
+ integrationId: z.ZodGUID;
94
+ }, z.core.$strip>, undefined, z.ZodObject<{
95
+ authorization: z.ZodOptional<z.ZodString>;
96
+ }, z.core.$strip>, undefined, false, false, {
97
+ 200: z.ZodObject<{
98
+ success: z.ZodBoolean;
99
+ integrationId: z.ZodGUID;
100
+ }, z.core.$strip>;
101
+ 400: z.ZodObject<{
102
+ message: z.ZodString;
103
+ errorCode: z.ZodString;
104
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
105
+ }, z.core.$strip>;
106
+ 401: z.ZodObject<{
107
+ message: z.ZodString;
108
+ errorCode: z.ZodString;
109
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
110
+ }, z.core.$strip>;
111
+ 404: z.ZodObject<{
112
+ message: z.ZodString;
113
+ errorCode: z.ZodString;
114
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
115
+ }, z.core.$strip>;
116
+ }>;
@@ -0,0 +1,70 @@
1
+ import { buildGetRoute, buildPayloadRoute } from '@lokalise/api-contracts';
2
+ import { z } from 'zod/v4';
3
+ import { AUTHORIZATION_HEADER_SCHEMA, COMMON_ERROR_RESPONSE_SCHEMA_V2, } from "../commonRequestSchemas.js";
4
+ import { GET_INTEGRATION_AUTH_STATUS_PATH_PARAMS_SCHEMA, GET_INTEGRATION_AUTH_STATUS_RESPONSE_SCHEMA, POST_CREATE_INTEGRATION_AUTH_INITIATE_PAYLOAD_SCHEMA, POST_CREATE_INTEGRATION_AUTH_INITIATE_RESPONSE_SCHEMA, POST_INTEGRATION_AUTH_CALLBACK_BODY_SCHEMA, POST_INTEGRATION_AUTH_CALLBACK_PATH_PARAMS_SCHEMA, POST_INTEGRATION_AUTH_CALLBACK_RESPONSE_SCHEMA, } from "./integrationAuthSchemas.js";
5
+ /**
6
+ * Contract for initiating OAuth authentication flow
7
+ * POST /v1/integrations/auth/initiate
8
+ *
9
+ * Note: This endpoint does not require integrationId in the path because
10
+ * the Integration and IntegrationUser records are created as part of this flow.
11
+ * The integrationId is returned in the response for use in subsequent calls.
12
+ */
13
+ export const postInitiateIntegrationAuthContract = buildPayloadRoute({
14
+ method: 'post',
15
+ pathResolver: () => '/v1/integrations/auth/initiate',
16
+ description: 'Initiate OAuth authentication flow for an integration',
17
+ requestBodySchema: POST_CREATE_INTEGRATION_AUTH_INITIATE_PAYLOAD_SCHEMA,
18
+ successResponseBodySchema: z.union([
19
+ POST_CREATE_INTEGRATION_AUTH_INITIATE_RESPONSE_SCHEMA,
20
+ COMMON_ERROR_RESPONSE_SCHEMA_V2,
21
+ ]),
22
+ responseSchemasByStatusCode: {
23
+ 200: POST_CREATE_INTEGRATION_AUTH_INITIATE_RESPONSE_SCHEMA,
24
+ 400: COMMON_ERROR_RESPONSE_SCHEMA_V2,
25
+ 401: COMMON_ERROR_RESPONSE_SCHEMA_V2,
26
+ },
27
+ requestHeaderSchema: AUTHORIZATION_HEADER_SCHEMA,
28
+ });
29
+ /**
30
+ * Contract for checking OAuth authentication status
31
+ * GET /v1/integrations/{integrationId}/auth/status
32
+ */
33
+ export const getIntegrationAuthStatusContract = buildGetRoute({
34
+ pathResolver: (params) => `/v1/integrations/${params.integrationId}/auth/status`,
35
+ description: 'Get the current status of OAuth authentication flow',
36
+ requestPathParamsSchema: GET_INTEGRATION_AUTH_STATUS_PATH_PARAMS_SCHEMA,
37
+ successResponseBodySchema: z.union([
38
+ GET_INTEGRATION_AUTH_STATUS_RESPONSE_SCHEMA,
39
+ COMMON_ERROR_RESPONSE_SCHEMA_V2,
40
+ ]),
41
+ responseSchemasByStatusCode: {
42
+ 200: GET_INTEGRATION_AUTH_STATUS_RESPONSE_SCHEMA,
43
+ 401: COMMON_ERROR_RESPONSE_SCHEMA_V2,
44
+ 404: COMMON_ERROR_RESPONSE_SCHEMA_V2,
45
+ },
46
+ requestHeaderSchema: AUTHORIZATION_HEADER_SCHEMA,
47
+ });
48
+ /**
49
+ * Contract for handling OAuth callback
50
+ * POST /v1/integrations/{integrationId}/auth/callback
51
+ */
52
+ export const postIntegrationAuthCallbackContract = buildPayloadRoute({
53
+ method: 'post',
54
+ pathResolver: (params) => `/v1/integrations/${params.integrationId}/auth/callback`,
55
+ description: 'Handle OAuth callback from third-party provider',
56
+ requestPathParamsSchema: POST_INTEGRATION_AUTH_CALLBACK_PATH_PARAMS_SCHEMA,
57
+ requestBodySchema: POST_INTEGRATION_AUTH_CALLBACK_BODY_SCHEMA,
58
+ successResponseBodySchema: z.union([
59
+ POST_INTEGRATION_AUTH_CALLBACK_RESPONSE_SCHEMA,
60
+ COMMON_ERROR_RESPONSE_SCHEMA_V2,
61
+ ]),
62
+ responseSchemasByStatusCode: {
63
+ 200: POST_INTEGRATION_AUTH_CALLBACK_RESPONSE_SCHEMA,
64
+ 400: COMMON_ERROR_RESPONSE_SCHEMA_V2,
65
+ 401: COMMON_ERROR_RESPONSE_SCHEMA_V2,
66
+ 404: COMMON_ERROR_RESPONSE_SCHEMA_V2,
67
+ },
68
+ requestHeaderSchema: AUTHORIZATION_HEADER_SCHEMA,
69
+ });
70
+ //# sourceMappingURL=integrationAuthApiSchemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integrationAuthApiSchemas.js","sourceRoot":"","sources":["../../../src/schemas/auth/integrationAuthApiSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC1E,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,8CAA8C,EAC9C,2CAA2C,EAC3C,oDAAoD,EACpD,qDAAqD,EACrD,0CAA0C,EAC1C,iDAAiD,EACjD,8CAA8C,GAC/C,MAAM,6BAA6B,CAAA;AAEpC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,iBAAiB,CAAC;IACnE,MAAM,EAAE,MAAM;IACd,YAAY,EAAE,GAAG,EAAE,CAAC,gCAAgC;IACpD,WAAW,EAAE,uDAAuD;IACpE,iBAAiB,EAAE,oDAAoD;IACvE,yBAAyB,EAAE,CAAC,CAAC,KAAK,CAAC;QACjC,qDAAqD;QACrD,+BAA+B;KAChC,CAAC;IACF,2BAA2B,EAAE;QAC3B,GAAG,EAAE,qDAAqD;QAC1D,GAAG,EAAE,+BAA+B;QACpC,GAAG,EAAE,+BAA+B;KACrC;IACD,mBAAmB,EAAE,2BAA2B;CACjD,CAAC,CAAA;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,aAAa,CAAC;IAC5D,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,oBAAoB,MAAM,CAAC,aAAa,cAAc;IAChF,WAAW,EAAE,qDAAqD;IAClE,uBAAuB,EAAE,8CAA8C;IACvE,yBAAyB,EAAE,CAAC,CAAC,KAAK,CAAC;QACjC,2CAA2C;QAC3C,+BAA+B;KAChC,CAAC;IACF,2BAA2B,EAAE;QAC3B,GAAG,EAAE,2CAA2C;QAChD,GAAG,EAAE,+BAA+B;QACpC,GAAG,EAAE,+BAA+B;KACrC;IACD,mBAAmB,EAAE,2BAA2B;CACjD,CAAC,CAAA;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,iBAAiB,CAAC;IACnE,MAAM,EAAE,MAAM;IACd,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,oBAAoB,MAAM,CAAC,aAAa,gBAAgB;IAClF,WAAW,EAAE,iDAAiD;IAC9D,uBAAuB,EAAE,iDAAiD;IAC1E,iBAAiB,EAAE,0CAA0C;IAC7D,yBAAyB,EAAE,CAAC,CAAC,KAAK,CAAC;QACjC,8CAA8C;QAC9C,+BAA+B;KAChC,CAAC;IACF,2BAA2B,EAAE;QAC3B,GAAG,EAAE,8CAA8C;QACnD,GAAG,EAAE,+BAA+B;QACpC,GAAG,EAAE,+BAA+B;QACpC,GAAG,EAAE,+BAA+B;KACrC;IACD,mBAAmB,EAAE,2BAA2B;CACjD,CAAC,CAAA"}
@@ -0,0 +1,75 @@
1
+ import { z } from 'zod/v4';
2
+ /**
3
+ * Request body for initiating OAuth authentication flow
4
+ */
5
+ export declare const POST_CREATE_INTEGRATION_AUTH_INITIATE_PAYLOAD_SCHEMA: z.ZodObject<{
6
+ connectorName: z.ZodString;
7
+ config: z.ZodRecord<z.ZodString, z.ZodAny>;
8
+ }, z.core.$strip>;
9
+ export type PostCreateIntegrationAuthInitiatePayload = z.infer<typeof POST_CREATE_INTEGRATION_AUTH_INITIATE_PAYLOAD_SCHEMA>;
10
+ /**
11
+ * Response after initiating OAuth authentication flow
12
+ */
13
+ export declare const POST_CREATE_INTEGRATION_AUTH_INITIATE_RESPONSE_SCHEMA: z.ZodObject<{
14
+ integrationId: z.ZodGUID;
15
+ authorizationUrl: z.ZodString;
16
+ }, z.core.$strip>;
17
+ export type PostCreateIntegrationAuthInitiateResponse = z.infer<typeof POST_CREATE_INTEGRATION_AUTH_INITIATE_RESPONSE_SCHEMA>;
18
+ /**
19
+ * Path parameters for integration auth operations
20
+ */
21
+ export declare const INTEGRATION_AUTH_PATH_PARAMS_SCHEMA: z.ZodObject<{
22
+ integrationId: z.ZodGUID;
23
+ }, z.core.$strip>;
24
+ /**
25
+ * Path parameters for integration auth status check
26
+ */
27
+ export declare const GET_INTEGRATION_AUTH_STATUS_PATH_PARAMS_SCHEMA: z.ZodObject<{
28
+ integrationId: z.ZodGUID;
29
+ }, z.core.$strip>;
30
+ export type GetIntegrationAuthStatusPathParams = z.infer<typeof GET_INTEGRATION_AUTH_STATUS_PATH_PARAMS_SCHEMA>;
31
+ /**
32
+ * OAuth authentication status values
33
+ */
34
+ export declare const INTEGRATION_AUTH_STATUS_ENUM: {
35
+ readonly pending: "pending";
36
+ readonly completed: "completed";
37
+ readonly failed: "failed";
38
+ };
39
+ /**
40
+ * Response schema for integration auth status check
41
+ */
42
+ export declare const GET_INTEGRATION_AUTH_STATUS_RESPONSE_SCHEMA: z.ZodObject<{
43
+ status: z.ZodEnum<{
44
+ readonly pending: "pending";
45
+ readonly completed: "completed";
46
+ readonly failed: "failed";
47
+ }>;
48
+ error: z.ZodOptional<z.ZodString>;
49
+ }, z.core.$strip>;
50
+ export type GetIntegrationAuthStatusResponse = z.infer<typeof GET_INTEGRATION_AUTH_STATUS_RESPONSE_SCHEMA>;
51
+ /**
52
+ * Path parameters for OAuth callback endpoint
53
+ */
54
+ export declare const POST_INTEGRATION_AUTH_CALLBACK_PATH_PARAMS_SCHEMA: z.ZodObject<{
55
+ integrationId: z.ZodGUID;
56
+ }, z.core.$strip>;
57
+ export type PostIntegrationAuthCallbackPathParams = z.infer<typeof POST_INTEGRATION_AUTH_CALLBACK_PATH_PARAMS_SCHEMA>;
58
+ /**
59
+ * Request body for OAuth callback endpoint
60
+ * Matches the structure expected by composed-connector's postAuthResponse endpoint
61
+ */
62
+ export declare const POST_INTEGRATION_AUTH_CALLBACK_BODY_SCHEMA: z.ZodObject<{
63
+ query: z.ZodObject<{}, z.core.$loose>;
64
+ body: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
65
+ redirectUrl: z.ZodString;
66
+ }, z.core.$strip>;
67
+ export type PostIntegrationAuthCallbackBody = z.infer<typeof POST_INTEGRATION_AUTH_CALLBACK_BODY_SCHEMA>;
68
+ /**
69
+ * Response after handling OAuth callback
70
+ */
71
+ export declare const POST_INTEGRATION_AUTH_CALLBACK_RESPONSE_SCHEMA: z.ZodObject<{
72
+ success: z.ZodBoolean;
73
+ integrationId: z.ZodGUID;
74
+ }, z.core.$strip>;
75
+ export type PostIntegrationAuthCallbackResponse = z.infer<typeof POST_INTEGRATION_AUTH_CALLBACK_RESPONSE_SCHEMA>;
@@ -0,0 +1,96 @@
1
+ import { z } from 'zod/v4';
2
+ /**
3
+ * Request body for initiating OAuth authentication flow
4
+ */
5
+ export const POST_CREATE_INTEGRATION_AUTH_INITIATE_PAYLOAD_SCHEMA = z.object({
6
+ /**
7
+ * Connector name/identifier (e.g., "google-drive", "contentful-native")
8
+ * Used to identify which connector adapter to use
9
+ */
10
+ connectorName: z.string().min(1),
11
+ /**
12
+ * Integration configuration object specific to the connector
13
+ */
14
+ config: z.record(z.string(), z.any()),
15
+ });
16
+ /**
17
+ * Response after initiating OAuth authentication flow
18
+ */
19
+ export const POST_CREATE_INTEGRATION_AUTH_INITIATE_RESPONSE_SCHEMA = z.object({
20
+ /**
21
+ * Unique identifier for the integration
22
+ * This is created during the initiate flow and should be used in subsequent API calls
23
+ */
24
+ integrationId: z.guid(),
25
+ /**
26
+ * URL to redirect user to for OAuth authorization
27
+ */
28
+ authorizationUrl: z.string().url(),
29
+ });
30
+ /**
31
+ * Path parameters for integration auth operations
32
+ */
33
+ export const INTEGRATION_AUTH_PATH_PARAMS_SCHEMA = z.object({
34
+ integrationId: z.guid(),
35
+ });
36
+ /**
37
+ * Path parameters for integration auth status check
38
+ */
39
+ export const GET_INTEGRATION_AUTH_STATUS_PATH_PARAMS_SCHEMA = INTEGRATION_AUTH_PATH_PARAMS_SCHEMA;
40
+ /**
41
+ * OAuth authentication status values
42
+ */
43
+ export const INTEGRATION_AUTH_STATUS_ENUM = {
44
+ pending: 'pending',
45
+ completed: 'completed',
46
+ failed: 'failed',
47
+ };
48
+ /**
49
+ * Response schema for integration auth status check
50
+ */
51
+ export const GET_INTEGRATION_AUTH_STATUS_RESPONSE_SCHEMA = z.object({
52
+ /**
53
+ * Current status of the OAuth authentication flow
54
+ */
55
+ status: z.nativeEnum(INTEGRATION_AUTH_STATUS_ENUM),
56
+ /**
57
+ * Error message if status is 'failed'
58
+ */
59
+ error: z.string().optional(),
60
+ });
61
+ /**
62
+ * Path parameters for OAuth callback endpoint
63
+ */
64
+ export const POST_INTEGRATION_AUTH_CALLBACK_PATH_PARAMS_SCHEMA = INTEGRATION_AUTH_PATH_PARAMS_SCHEMA;
65
+ /**
66
+ * Request body for OAuth callback endpoint
67
+ * Matches the structure expected by composed-connector's postAuthResponse endpoint
68
+ */
69
+ export const POST_INTEGRATION_AUTH_CALLBACK_BODY_SCHEMA = z.object({
70
+ /**
71
+ * Query parameters from the OAuth redirect
72
+ */
73
+ query: z.looseObject({}),
74
+ /**
75
+ * Optional body parameters from the OAuth redirect
76
+ */
77
+ body: z.looseObject({}).optional(),
78
+ /**
79
+ * URL to redirect user to after successful authentication
80
+ */
81
+ redirectUrl: z.string().max(255),
82
+ });
83
+ /**
84
+ * Response after handling OAuth callback
85
+ */
86
+ export const POST_INTEGRATION_AUTH_CALLBACK_RESPONSE_SCHEMA = z.object({
87
+ /**
88
+ * Whether the authentication was successful
89
+ */
90
+ success: z.boolean(),
91
+ /**
92
+ * Unique identifier for the integration
93
+ */
94
+ integrationId: z.guid(),
95
+ });
96
+ //# sourceMappingURL=integrationAuthSchemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integrationAuthSchemas.js","sourceRoot":"","sources":["../../../src/schemas/auth/integrationAuthSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,oDAAoD,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3E;;;OAGG;IACH,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAChC;;OAEG;IACH,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC;CACtC,CAAC,CAAA;AAMF;;GAEG;AACH,MAAM,CAAC,MAAM,qDAAqD,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5E;;;OAGG;IACH,aAAa,EAAE,CAAC,CAAC,IAAI,EAAE;IACvB;;OAEG;IACH,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;CACnC,CAAC,CAAA;AAMF;;GAEG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1D,aAAa,EAAE,CAAC,CAAC,IAAI,EAAE;CACxB,CAAC,CAAA;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,8CAA8C,GAAG,mCAAmC,CAAA;AAMjG;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;CACR,CAAA;AAEV;;GAEG;AACH,MAAM,CAAC,MAAM,2CAA2C,GAAG,CAAC,CAAC,MAAM,CAAC;IAClE;;OAEG;IACH,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC,4BAA4B,CAAC;IAClD;;OAEG;IACH,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAA;AAMF;;GAEG;AACH,MAAM,CAAC,MAAM,iDAAiD,GAAG,mCAAmC,CAAA;AAMpG;;;GAGG;AACH,MAAM,CAAC,MAAM,0CAA0C,GAAG,CAAC,CAAC,MAAM,CAAC;IACjE;;OAEG;IACH,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC;IACxB;;OAEG;IACH,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAClC;;OAEG;IACH,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC;CACjC,CAAC,CAAA;AAMF;;GAEG;AACH,MAAM,CAAC,MAAM,8CAA8C,GAAG,CAAC,CAAC,MAAM,CAAC;IACrE;;OAEG;IACH,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB;;OAEG;IACH,aAAa,EAAE,CAAC,CAAC,IAAI,EAAE;CACxB,CAAC,CAAA"}
@@ -516,9 +516,9 @@ export declare const getItemProcessingDetailsContract: import("@lokalise/api-con
516
516
  processes: z.ZodArray<z.ZodObject<{
517
517
  processId: z.ZodGUID;
518
518
  status: z.ZodEnum<{
519
- in_progress: "in_progress";
520
519
  completed: "completed";
521
520
  failed: "failed";
521
+ in_progress: "in_progress";
522
522
  }>;
523
523
  }, z.core.$strip>>;
524
524
  }, z.core.$strip>;
@@ -526,9 +526,9 @@ export declare const getItemProcessingDetailsContract: import("@lokalise/api-con
526
526
  processes: z.ZodArray<z.ZodObject<{
527
527
  processId: z.ZodGUID;
528
528
  status: z.ZodEnum<{
529
- in_progress: "in_progress";
530
529
  completed: "completed";
531
530
  failed: "failed";
531
+ in_progress: "in_progress";
532
532
  }>;
533
533
  }, z.core.$strip>>;
534
534
  }, z.core.$strip>;
@@ -547,9 +547,9 @@ export declare const getItemProcessingDetailsContract: import("@lokalise/api-con
547
547
  processes: z.ZodArray<z.ZodObject<{
548
548
  processId: z.ZodGUID;
549
549
  status: z.ZodEnum<{
550
- in_progress: "in_progress";
551
550
  completed: "completed";
552
551
  failed: "failed";
552
+ in_progress: "in_progress";
553
553
  }>;
554
554
  }, z.core.$strip>>;
555
555
  }, z.core.$strip>;
@@ -557,9 +557,9 @@ export declare const getItemProcessingDetailsContract: import("@lokalise/api-con
557
557
  processes: z.ZodArray<z.ZodObject<{
558
558
  processId: z.ZodGUID;
559
559
  status: z.ZodEnum<{
560
- in_progress: "in_progress";
561
560
  completed: "completed";
562
561
  failed: "failed";
562
+ in_progress: "in_progress";
563
563
  }>;
564
564
  }, z.core.$strip>>;
565
565
  }, z.core.$strip>;
@@ -410,17 +410,17 @@ export declare const GET_ITEM_PROCESSING_DETAILS_PATH_PARAMS_SCHEMA: z.ZodObject
410
410
  }, z.core.$strip>;
411
411
  export type GetItemProcessingDetailsPathParams = z.infer<typeof GET_ITEM_PROCESSING_DETAILS_PATH_PARAMS_SCHEMA>;
412
412
  export declare const itemProcessingStatusSchema: z.ZodEnum<{
413
- in_progress: "in_progress";
414
413
  completed: "completed";
415
414
  failed: "failed";
415
+ in_progress: "in_progress";
416
416
  }>;
417
417
  export type ItemProcessingStatus = z.infer<typeof itemProcessingStatusSchema>;
418
418
  declare const itemProcessSchema: z.ZodObject<{
419
419
  processId: z.ZodGUID;
420
420
  status: z.ZodEnum<{
421
- in_progress: "in_progress";
422
421
  completed: "completed";
423
422
  failed: "failed";
423
+ in_progress: "in_progress";
424
424
  }>;
425
425
  }, z.core.$strip>;
426
426
  export type ItemProcess = z.infer<typeof itemProcessSchema>;
@@ -429,9 +429,9 @@ export declare const GET_ITEM_PROCESSING_DETAILS_RESPONSE_SCHEMA: z.ZodObject<{
429
429
  processes: z.ZodArray<z.ZodObject<{
430
430
  processId: z.ZodGUID;
431
431
  status: z.ZodEnum<{
432
- in_progress: "in_progress";
433
432
  completed: "completed";
434
433
  failed: "failed";
434
+ in_progress: "in_progress";
435
435
  }>;
436
436
  }, z.core.$strip>>;
437
437
  }, z.core.$strip>;
@@ -439,9 +439,9 @@ export declare const GET_ITEM_PROCESSING_DETAILS_RESPONSE_SCHEMA: z.ZodObject<{
439
439
  processes: z.ZodArray<z.ZodObject<{
440
440
  processId: z.ZodGUID;
441
441
  status: z.ZodEnum<{
442
- in_progress: "in_progress";
443
442
  completed: "completed";
444
443
  failed: "failed";
444
+ in_progress: "in_progress";
445
445
  }>;
446
446
  }, z.core.$strip>>;
447
447
  }, z.core.$strip>;
@@ -69,3 +69,6 @@ export declare const getListIntegrationProjectsContract: import("@lokalise/api-c
69
69
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
70
70
  }, z.core.$strip>;
71
71
  }>;
72
+ export { getIntegrationAuthStatusContract, postInitiateIntegrationAuthContract, postIntegrationAuthCallbackContract, } from '../auth/integrationAuthApiSchemas.ts';
73
+ export { getIntegrationItemGroupsContract } from '../itemGroup/integrationItemGroupApiSchemas.ts';
74
+ export { getIntegrationItemsContract } from '../itemList/integrationItemListApiSchemas.ts';
@@ -33,4 +33,10 @@ export const getListIntegrationProjectsContract = buildGetRoute({
33
33
  },
34
34
  requestHeaderSchema: AUTHORIZATION_HEADER_SCHEMA,
35
35
  });
36
+ // Export auth contracts
37
+ export { getIntegrationAuthStatusContract, postInitiateIntegrationAuthContract, postIntegrationAuthCallbackContract, } from "../auth/integrationAuthApiSchemas.js";
38
+ // Export item group contracts
39
+ export { getIntegrationItemGroupsContract } from "../itemGroup/integrationItemGroupApiSchemas.js";
40
+ // Export item list contracts
41
+ export { getIntegrationItemsContract } from "../itemList/integrationItemListApiSchemas.js";
36
42
  //# sourceMappingURL=integrationApiSchemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"integrationApiSchemas.js","sourceRoot":"","sources":["../../../src/schemas/integration/integrationApiSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC1E,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,wDAAwD,EACxD,6CAA6C,EAC7C,sCAAsC,EACtC,uCAAuC,EACvC,8CAA8C,GAC/C,MAAM,yBAAyB,CAAA;AAEhC,MAAM,CAAC,MAAM,6BAA6B,GAAG,iBAAiB,CAAC;IAC7D,MAAM,EAAE,MAAM;IACd,YAAY,EAAE,GAAG,EAAE,CAAC,kBAAkB;IACtC,WAAW,EAAE,oBAAoB;IACjC,iBAAiB,EAAE,sCAAsC;IACzD,yBAAyB,EAAE,CAAC,CAAC,KAAK,CAAC;QACjC,uCAAuC;QACvC,+BAA+B;KAChC,CAAC;IACF,2BAA2B,EAAE;QAC3B,GAAG,EAAE,uCAAuC;QAC5C,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,+BAA+B,EAAE,8CAA8C,CAAC,CAAC;QAC/F,GAAG,EAAE,+BAA+B;KACrC;IACD,mBAAmB,EAAE,2BAA2B;CACjD,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,kCAAkC,GAAG,aAAa,CAAC;IAC9D,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,oBAAoB,MAAM,CAAC,aAAa,WAAW;IAC7E,WAAW,EAAE,wCAAwC;IACrD,uBAAuB,EAAE,wDAAwD;IACjF,yBAAyB,EAAE,CAAC,CAAC,KAAK,CAAC;QACjC,6CAA6C;QAC7C,+BAA+B;KAChC,CAAC;IACF,2BAA2B,EAAE;QAC3B,GAAG,EAAE,6CAA6C;QAClD,GAAG,EAAE,+BAA+B;QACpC,GAAG,EAAE,+BAA+B;KACrC;IACD,mBAAmB,EAAE,2BAA2B;CACjD,CAAC,CAAA"}
1
+ {"version":3,"file":"integrationApiSchemas.js","sourceRoot":"","sources":["../../../src/schemas/integration/integrationApiSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC1E,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,wDAAwD,EACxD,6CAA6C,EAC7C,sCAAsC,EACtC,uCAAuC,EACvC,8CAA8C,GAC/C,MAAM,yBAAyB,CAAA;AAEhC,MAAM,CAAC,MAAM,6BAA6B,GAAG,iBAAiB,CAAC;IAC7D,MAAM,EAAE,MAAM;IACd,YAAY,EAAE,GAAG,EAAE,CAAC,kBAAkB;IACtC,WAAW,EAAE,oBAAoB;IACjC,iBAAiB,EAAE,sCAAsC;IACzD,yBAAyB,EAAE,CAAC,CAAC,KAAK,CAAC;QACjC,uCAAuC;QACvC,+BAA+B;KAChC,CAAC;IACF,2BAA2B,EAAE;QAC3B,GAAG,EAAE,uCAAuC;QAC5C,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,+BAA+B,EAAE,8CAA8C,CAAC,CAAC;QAC/F,GAAG,EAAE,+BAA+B;KACrC;IACD,mBAAmB,EAAE,2BAA2B;CACjD,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,kCAAkC,GAAG,aAAa,CAAC;IAC9D,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,oBAAoB,MAAM,CAAC,aAAa,WAAW;IAC7E,WAAW,EAAE,wCAAwC;IACrD,uBAAuB,EAAE,wDAAwD;IACjF,yBAAyB,EAAE,CAAC,CAAC,KAAK,CAAC;QACjC,6CAA6C;QAC7C,+BAA+B;KAChC,CAAC;IACF,2BAA2B,EAAE;QAC3B,GAAG,EAAE,6CAA6C;QAClD,GAAG,EAAE,+BAA+B;QACpC,GAAG,EAAE,+BAA+B;KACrC;IACD,mBAAmB,EAAE,2BAA2B;CACjD,CAAC,CAAA;AAEF,wBAAwB;AACxB,OAAO,EACL,gCAAgC,EAChC,mCAAmC,EACnC,mCAAmC,GACpC,MAAM,sCAAsC,CAAA;AAE7C,8BAA8B;AAC9B,OAAO,EAAE,gCAAgC,EAAE,MAAM,gDAAgD,CAAA;AAEjG,6BAA6B;AAC7B,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAA"}
@@ -0,0 +1,48 @@
1
+ import { z } from 'zod/v4';
2
+ /**
3
+ * Contract for getting item groups (e.g., drives in Google Drive) for an integration
4
+ * GET /v1/integrations/{integrationId}/item-groups
5
+ */
6
+ export declare const getIntegrationItemGroupsContract: import("@lokalise/api-contracts").GetRouteDefinition<z.ZodUnion<readonly [z.ZodObject<{
7
+ items: z.ZodArray<z.ZodObject<{
8
+ id: z.ZodString;
9
+ name: z.ZodString;
10
+ parentItemGroupId: z.ZodOptional<z.ZodString>;
11
+ details: z.ZodRecord<z.ZodString, z.ZodAny>;
12
+ }, z.core.$strip>>;
13
+ hasMore: z.ZodOptional<z.ZodBoolean>;
14
+ nextCursor: z.ZodOptional<z.ZodString>;
15
+ }, z.core.$strip>, z.ZodObject<{
16
+ message: z.ZodString;
17
+ errorCode: z.ZodString;
18
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
19
+ }, z.core.$strip>]>, z.ZodObject<{
20
+ integrationId: z.ZodGUID;
21
+ }, z.core.$strip>, z.ZodObject<{
22
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
23
+ cursor: z.ZodOptional<z.ZodString>;
24
+ parentItemGroupId: z.ZodOptional<z.ZodString>;
25
+ }, z.core.$strip>, z.ZodObject<{
26
+ authorization: z.ZodOptional<z.ZodString>;
27
+ }, z.core.$strip>, undefined, false, false, {
28
+ 200: z.ZodObject<{
29
+ items: z.ZodArray<z.ZodObject<{
30
+ id: z.ZodString;
31
+ name: z.ZodString;
32
+ parentItemGroupId: z.ZodOptional<z.ZodString>;
33
+ details: z.ZodRecord<z.ZodString, z.ZodAny>;
34
+ }, z.core.$strip>>;
35
+ hasMore: z.ZodOptional<z.ZodBoolean>;
36
+ nextCursor: z.ZodOptional<z.ZodString>;
37
+ }, z.core.$strip>;
38
+ 401: z.ZodObject<{
39
+ message: z.ZodString;
40
+ errorCode: z.ZodString;
41
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
42
+ }, z.core.$strip>;
43
+ 404: z.ZodObject<{
44
+ message: z.ZodString;
45
+ errorCode: z.ZodString;
46
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
47
+ }, z.core.$strip>;
48
+ }>;
@@ -0,0 +1,23 @@
1
+ import { buildGetRoute } from '@lokalise/api-contracts';
2
+ import { itemGroupListRequestQueryString, itemGroupListResponseBody, } from '@lokalise/connector-api-contracts';
3
+ import { z } from 'zod/v4';
4
+ import { AUTHORIZATION_HEADER_SCHEMA, COMMON_ERROR_RESPONSE_SCHEMA_V2, } from "../commonRequestSchemas.js";
5
+ import { GET_INTEGRATION_ITEM_GROUPS_PATH_PARAMS_SCHEMA } from "./integrationItemGroupSchemas.js";
6
+ /**
7
+ * Contract for getting item groups (e.g., drives in Google Drive) for an integration
8
+ * GET /v1/integrations/{integrationId}/item-groups
9
+ */
10
+ export const getIntegrationItemGroupsContract = buildGetRoute({
11
+ pathResolver: (params) => `/v1/integrations/${params.integrationId}/item-groups`,
12
+ description: 'Get list of item groups (e.g., drives) for an integration',
13
+ requestPathParamsSchema: GET_INTEGRATION_ITEM_GROUPS_PATH_PARAMS_SCHEMA,
14
+ requestQuerySchema: itemGroupListRequestQueryString,
15
+ successResponseBodySchema: z.union([itemGroupListResponseBody, COMMON_ERROR_RESPONSE_SCHEMA_V2]),
16
+ responseSchemasByStatusCode: {
17
+ 200: itemGroupListResponseBody,
18
+ 401: COMMON_ERROR_RESPONSE_SCHEMA_V2,
19
+ 404: COMMON_ERROR_RESPONSE_SCHEMA_V2,
20
+ },
21
+ requestHeaderSchema: AUTHORIZATION_HEADER_SCHEMA,
22
+ });
23
+ //# sourceMappingURL=integrationItemGroupApiSchemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integrationItemGroupApiSchemas.js","sourceRoot":"","sources":["../../../src/schemas/itemGroup/integrationItemGroupApiSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,GAC1B,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,8CAA8C,EAAE,MAAM,kCAAkC,CAAA;AAEjG;;;GAGG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,aAAa,CAAC;IAC5D,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,oBAAoB,MAAM,CAAC,aAAa,cAAc;IAChF,WAAW,EAAE,2DAA2D;IACxE,uBAAuB,EAAE,8CAA8C;IACvE,kBAAkB,EAAE,+BAA+B;IACnD,yBAAyB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,yBAAyB,EAAE,+BAA+B,CAAC,CAAC;IAChG,2BAA2B,EAAE;QAC3B,GAAG,EAAE,yBAAyB;QAC9B,GAAG,EAAE,+BAA+B;QACpC,GAAG,EAAE,+BAA+B;KACrC;IACD,mBAAmB,EAAE,2BAA2B;CACjD,CAAC,CAAA"}
@@ -0,0 +1,13 @@
1
+ import type { ItemGroupListRequestQueryString, ItemGroupListResponseBody } from '@lokalise/connector-api-contracts';
2
+ import { z } from 'zod/v4';
3
+ /**
4
+ * Path parameters for getting item groups for an integration
5
+ */
6
+ export declare const GET_INTEGRATION_ITEM_GROUPS_PATH_PARAMS_SCHEMA: z.ZodObject<{
7
+ integrationId: z.ZodGUID;
8
+ }, z.core.$strip>;
9
+ export type GetIntegrationItemGroupsPathParams = z.infer<typeof GET_INTEGRATION_ITEM_GROUPS_PATH_PARAMS_SCHEMA>;
10
+ /**
11
+ * Re-export types from connector-api-contracts for convenience
12
+ */
13
+ export type { ItemGroupListRequestQueryString, ItemGroupListResponseBody };
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod/v4';
2
+ /**
3
+ * Path parameters for getting item groups for an integration
4
+ */
5
+ export const GET_INTEGRATION_ITEM_GROUPS_PATH_PARAMS_SCHEMA = z.object({
6
+ integrationId: z.guid(),
7
+ });
8
+ //# sourceMappingURL=integrationItemGroupSchemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integrationItemGroupSchemas.js","sourceRoot":"","sources":["../../../src/schemas/itemGroup/integrationItemGroupSchemas.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,8CAA8C,GAAG,CAAC,CAAC,MAAM,CAAC;IACrE,aAAa,EAAE,CAAC,CAAC,IAAI,EAAE;CACxB,CAAC,CAAA"}
@@ -0,0 +1,58 @@
1
+ import { z } from 'zod/v4';
2
+ /**
3
+ * Contract for getting items (e.g., files in Google Drive) for an integration
4
+ * GET /v1/integrations/{integrationId}/items
5
+ */
6
+ export declare const getIntegrationItemsContract: import("@lokalise/api-contracts").GetRouteDefinition<z.ZodUnion<readonly [z.ZodObject<{
7
+ data: z.ZodArray<z.ZodObject<{
8
+ uniqueId: z.ZodString;
9
+ groupId: z.ZodString;
10
+ metadata: z.ZodRecord<z.ZodAny, z.ZodAny>;
11
+ fields: z.ZodObject<{}, z.core.$loose>;
12
+ title: z.ZodString;
13
+ groupTitle: z.ZodString;
14
+ }, z.core.$strip>>;
15
+ meta: z.ZodObject<{
16
+ count: z.ZodNumber;
17
+ cursor: z.ZodOptional<z.ZodString>;
18
+ hasMore: z.ZodOptional<z.ZodBoolean>;
19
+ }, z.core.$strip>;
20
+ }, z.core.$strip>, z.ZodObject<{
21
+ message: z.ZodString;
22
+ errorCode: z.ZodString;
23
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
24
+ }, z.core.$strip>]>, z.ZodObject<{
25
+ integrationId: z.ZodGUID;
26
+ }, z.core.$strip>, z.ZodObject<{
27
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
28
+ cursor: z.ZodOptional<z.ZodString>;
29
+ contentTypes: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
30
+ }, z.core.$strip>, z.ZodObject<{
31
+ authorization: z.ZodOptional<z.ZodString>;
32
+ }, z.core.$strip>, undefined, false, false, {
33
+ 200: z.ZodObject<{
34
+ data: z.ZodArray<z.ZodObject<{
35
+ uniqueId: z.ZodString;
36
+ groupId: z.ZodString;
37
+ metadata: z.ZodRecord<z.ZodAny, z.ZodAny>;
38
+ fields: z.ZodObject<{}, z.core.$loose>;
39
+ title: z.ZodString;
40
+ groupTitle: z.ZodString;
41
+ }, z.core.$strip>>;
42
+ meta: z.ZodObject<{
43
+ count: z.ZodNumber;
44
+ cursor: z.ZodOptional<z.ZodString>;
45
+ hasMore: z.ZodOptional<z.ZodBoolean>;
46
+ }, z.core.$strip>;
47
+ }, z.core.$strip>;
48
+ 401: z.ZodObject<{
49
+ message: z.ZodString;
50
+ errorCode: z.ZodString;
51
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
52
+ }, z.core.$strip>;
53
+ 404: z.ZodObject<{
54
+ message: z.ZodString;
55
+ errorCode: z.ZodString;
56
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
57
+ }, z.core.$strip>;
58
+ }>;
@@ -0,0 +1,23 @@
1
+ import { buildGetRoute } from '@lokalise/api-contracts';
2
+ import { itemListRequestQueryString, itemListResponseBody } from '@lokalise/connector-api-contracts';
3
+ import { z } from 'zod/v4';
4
+ import { AUTHORIZATION_HEADER_SCHEMA, COMMON_ERROR_RESPONSE_SCHEMA_V2, } from "../commonRequestSchemas.js";
5
+ import { GET_INTEGRATION_ITEMS_PATH_PARAMS_SCHEMA } from "./integrationItemListSchemas.js";
6
+ /**
7
+ * Contract for getting items (e.g., files in Google Drive) for an integration
8
+ * GET /v1/integrations/{integrationId}/items
9
+ */
10
+ export const getIntegrationItemsContract = buildGetRoute({
11
+ pathResolver: (params) => `/v1/integrations/${params.integrationId}/items`,
12
+ description: 'Get list of items (e.g., files) for an integration',
13
+ requestPathParamsSchema: GET_INTEGRATION_ITEMS_PATH_PARAMS_SCHEMA,
14
+ requestQuerySchema: itemListRequestQueryString,
15
+ successResponseBodySchema: z.union([itemListResponseBody, COMMON_ERROR_RESPONSE_SCHEMA_V2]),
16
+ responseSchemasByStatusCode: {
17
+ 200: itemListResponseBody,
18
+ 401: COMMON_ERROR_RESPONSE_SCHEMA_V2,
19
+ 404: COMMON_ERROR_RESPONSE_SCHEMA_V2,
20
+ },
21
+ requestHeaderSchema: AUTHORIZATION_HEADER_SCHEMA,
22
+ });
23
+ //# sourceMappingURL=integrationItemListApiSchemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integrationItemListApiSchemas.js","sourceRoot":"","sources":["../../../src/schemas/itemList/integrationItemListApiSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AACpG,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAC1B,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,wCAAwC,EAAE,MAAM,iCAAiC,CAAA;AAE1F;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,aAAa,CAAC;IACvD,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,oBAAoB,MAAM,CAAC,aAAa,QAAQ;IAC1E,WAAW,EAAE,oDAAoD;IACjE,uBAAuB,EAAE,wCAAwC;IACjE,kBAAkB,EAAE,0BAA0B;IAC9C,yBAAyB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,oBAAoB,EAAE,+BAA+B,CAAC,CAAC;IAC3F,2BAA2B,EAAE;QAC3B,GAAG,EAAE,oBAAoB;QACzB,GAAG,EAAE,+BAA+B;QACpC,GAAG,EAAE,+BAA+B;KACrC;IACD,mBAAmB,EAAE,2BAA2B;CACjD,CAAC,CAAA"}
@@ -0,0 +1,17 @@
1
+ import type { itemListRequestQueryString, itemListResponseBody } from '@lokalise/connector-api-contracts';
2
+ import { z } from 'zod/v4';
3
+ /**
4
+ * Path parameters for getting items for an integration
5
+ */
6
+ export declare const GET_INTEGRATION_ITEMS_PATH_PARAMS_SCHEMA: z.ZodObject<{
7
+ integrationId: z.ZodGUID;
8
+ }, z.core.$strip>;
9
+ export type GetIntegrationItemsPathParams = z.infer<typeof GET_INTEGRATION_ITEMS_PATH_PARAMS_SCHEMA>;
10
+ /**
11
+ * Type definitions for item list request query string
12
+ */
13
+ export type ItemListRequestQueryString = z.infer<typeof itemListRequestQueryString>;
14
+ /**
15
+ * Type definition for item list response body
16
+ */
17
+ export type ItemListResponseBody = z.infer<typeof itemListResponseBody>;
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod/v4';
2
+ /**
3
+ * Path parameters for getting items for an integration
4
+ */
5
+ export const GET_INTEGRATION_ITEMS_PATH_PARAMS_SCHEMA = z.object({
6
+ integrationId: z.guid(),
7
+ });
8
+ //# sourceMappingURL=integrationItemListSchemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integrationItemListSchemas.js","sourceRoot":"","sources":["../../../src/schemas/itemList/integrationItemListSchemas.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/D,aAAa,EAAE,CAAC,CAAC,IAAI,EAAE;CACxB,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/content-type-app-engine-contracts",
3
- "version": "2.12.0",
3
+ "version": "2.13.0",
4
4
  "description": "Content Type App Engine service contracts",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -27,7 +27,8 @@
27
27
  "zod": ">=3.25.76 <5.0.0"
28
28
  },
29
29
  "dependencies": {
30
- "@lokalise/api-contracts": "^6.0.0"
30
+ "@lokalise/api-contracts": "^6.0.0",
31
+ "@lokalise/connector-api-contracts": "^1.16.0"
31
32
  },
32
33
  "devDependencies": {
33
34
  "@biomejs/biome": "^2.2.0",