@lokalise/content-type-app-engine-contracts 6.11.0 → 7.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.
Files changed (83) hide show
  1. package/README.md +19 -0
  2. package/dist/index.d.ts +0 -2
  3. package/dist/index.js +0 -2
  4. package/dist/index.js.map +1 -1
  5. package/dist/schemas/auth/authApiSchemas.d.ts +174 -133
  6. package/dist/schemas/auth/authApiSchemas.js +21 -24
  7. package/dist/schemas/auth/authApiSchemas.js.map +1 -1
  8. package/dist/schemas/auth/integrationAuthApiSchemas.d.ts +189 -170
  9. package/dist/schemas/auth/integrationAuthApiSchemas.js +17 -31
  10. package/dist/schemas/auth/integrationAuthApiSchemas.js.map +1 -1
  11. package/dist/schemas/cache/cacheApiSchemas.d.ts +59 -80
  12. package/dist/schemas/cache/cacheApiSchemas.js +4 -4
  13. package/dist/schemas/cache/cacheApiSchemas.js.map +1 -1
  14. package/dist/schemas/commonRequestSchemas.d.ts +1 -1
  15. package/dist/schemas/commonRequestSchemas.js +3 -1
  16. package/dist/schemas/commonRequestSchemas.js.map +1 -1
  17. package/dist/schemas/config/integrationConfigApiSchemas.d.ts +80 -70
  18. package/dist/schemas/config/integrationConfigApiSchemas.js +8 -14
  19. package/dist/schemas/config/integrationConfigApiSchemas.js.map +1 -1
  20. package/dist/schemas/connector/connectorApiSchemas.d.ts +703 -1348
  21. package/dist/schemas/connector/connectorApiSchemas.js +12 -14
  22. package/dist/schemas/connector/connectorApiSchemas.js.map +1 -1
  23. package/dist/schemas/connector/connectorSchemas.d.ts +0 -3
  24. package/dist/schemas/content/contentApiSchemas.d.ts +704 -709
  25. package/dist/schemas/content/contentApiSchemas.js +51 -84
  26. package/dist/schemas/content/contentApiSchemas.js.map +1 -1
  27. package/dist/schemas/content/contentExportApiSchemas.d.ts +44 -51
  28. package/dist/schemas/content/contentExportApiSchemas.js +3 -4
  29. package/dist/schemas/content/contentExportApiSchemas.js.map +1 -1
  30. package/dist/schemas/env/envApiSchemas.d.ts +95 -124
  31. package/dist/schemas/env/envApiSchemas.js +17 -14
  32. package/dist/schemas/env/envApiSchemas.js.map +1 -1
  33. package/dist/schemas/filter/filterApiSchemas.d.ts +314 -232
  34. package/dist/schemas/filter/filterApiSchemas.js +20 -20
  35. package/dist/schemas/filter/filterApiSchemas.js.map +1 -1
  36. package/dist/schemas/integration/integrationApiSchemas.d.ts +702 -1349
  37. package/dist/schemas/integration/integrationApiSchemas.js +12 -18
  38. package/dist/schemas/integration/integrationApiSchemas.js.map +1 -1
  39. package/dist/schemas/integration/integrationSchemas.d.ts +0 -3
  40. package/dist/schemas/integrationProject/integrationProjectApiSchemas.d.ts +144 -117
  41. package/dist/schemas/integrationProject/integrationProjectApiSchemas.js +10 -10
  42. package/dist/schemas/integrationProject/integrationProjectApiSchemas.js.map +1 -1
  43. package/dist/schemas/itemGroup/integrationItemGroupApiSchemas.d.ts +45 -40
  44. package/dist/schemas/itemGroup/integrationItemGroupApiSchemas.js +5 -4
  45. package/dist/schemas/itemGroup/integrationItemGroupApiSchemas.js.map +1 -1
  46. package/dist/schemas/itemGroup/linkItemGroupApiSchemas.d.ts +45 -43
  47. package/dist/schemas/itemGroup/linkItemGroupApiSchemas.js +5 -4
  48. package/dist/schemas/itemGroup/linkItemGroupApiSchemas.js.map +1 -1
  49. package/dist/schemas/itemList/integrationItemListApiSchemas.d.ts +51 -53
  50. package/dist/schemas/itemList/integrationItemListApiSchemas.js +5 -4
  51. package/dist/schemas/itemList/integrationItemListApiSchemas.js.map +1 -1
  52. package/dist/schemas/itemList/itemListContracts.d.ts +40 -45
  53. package/dist/schemas/itemList/itemListContracts.js +5 -4
  54. package/dist/schemas/itemList/itemListContracts.js.map +1 -1
  55. package/dist/schemas/language/languageApiSchemas.d.ts +29 -26
  56. package/dist/schemas/language/languageApiSchemas.js +4 -5
  57. package/dist/schemas/language/languageApiSchemas.js.map +1 -1
  58. package/dist/schemas/link/linkApiSchemas.d.ts +616 -1272
  59. package/dist/schemas/link/linkApiSchemas.js +5 -4
  60. package/dist/schemas/link/linkApiSchemas.js.map +1 -1
  61. package/dist/schemas/link/linkSchemas.d.ts +0 -3
  62. package/dist/schemas/processResult/integrationProcessResultsApiSchemas.d.ts +143 -167
  63. package/dist/schemas/processResult/integrationProcessResultsApiSchemas.js +9 -7
  64. package/dist/schemas/processResult/integrationProcessResultsApiSchemas.js.map +1 -1
  65. package/dist/schemas/project/projectApiSchemas.d.ts +90 -90
  66. package/dist/schemas/project/projectApiSchemas.js +8 -15
  67. package/dist/schemas/project/projectApiSchemas.js.map +1 -1
  68. package/dist/schemas/schedule/scheduleApiSchemas.d.ts +2620 -2487
  69. package/dist/schemas/schedule/scheduleApiSchemas.js +34 -29
  70. package/dist/schemas/schedule/scheduleApiSchemas.js.map +1 -1
  71. package/dist/schemas/settings/settingsApiSchemas.d.ts +136 -189
  72. package/dist/schemas/settings/settingsApiSchemas.js +8 -9
  73. package/dist/schemas/settings/settingsApiSchemas.js.map +1 -1
  74. package/dist/schemas/status/statusApiSchemas.d.ts +53 -64
  75. package/dist/schemas/status/statusApiSchemas.js +5 -9
  76. package/dist/schemas/status/statusApiSchemas.js.map +1 -1
  77. package/package.json +3 -3
  78. package/dist/schemas/preview/integrationPreviewApiSchemas.d.ts +0 -145
  79. package/dist/schemas/preview/integrationPreviewApiSchemas.js +0 -53
  80. package/dist/schemas/preview/integrationPreviewApiSchemas.js.map +0 -1
  81. package/dist/schemas/preview/integrationPreviewSchemas.d.ts +0 -13
  82. package/dist/schemas/preview/integrationPreviewSchemas.js +0 -8
  83. package/dist/schemas/preview/integrationPreviewSchemas.js.map +0 -1
@@ -6,35 +6,39 @@ import { z } from 'zod/v4';
6
6
  * the Integration and IntegrationUser records are created as part of this flow.
7
7
  * The integrationId is returned in the response for use in subsequent calls.
8
8
  */
9
- export declare const postInitiateApiTokenIntegrationAuthContract: import("@lokalise/api-contracts").PayloadRouteDefinition<z.ZodObject<{
10
- connectorName: z.ZodString;
11
- initialAuthConfig: z.ZodRecord<z.ZodString, z.ZodAny>;
12
- }, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
13
- integrationId: z.ZodGUID;
14
- }, z.core.$strip>, z.ZodObject<{
15
- message: z.ZodString;
16
- code: z.ZodString;
17
- errorCode: z.ZodString;
18
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
19
- }, z.core.$strip>]>, undefined, undefined, z.ZodObject<{
20
- authorization: z.ZodOptional<z.ZodString>;
21
- }, z.core.$strip>, undefined, false, false, {
22
- 200: z.ZodObject<{
23
- integrationId: z.ZodGUID;
24
- }, z.core.$strip>;
25
- 400: z.ZodObject<{
26
- message: z.ZodString;
27
- code: z.ZodString;
28
- errorCode: z.ZodString;
29
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
30
- }, z.core.$strip>;
31
- 401: z.ZodObject<{
32
- message: z.ZodString;
33
- code: z.ZodString;
34
- errorCode: z.ZodString;
35
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
36
- }, z.core.$strip>;
37
- }>;
9
+ export declare const postInitiateApiTokenIntegrationAuthContract: Omit<{
10
+ readonly visibility: "internal";
11
+ readonly method: "post";
12
+ readonly pathResolver: () => string;
13
+ readonly summary: "Initiate API token integration auth";
14
+ readonly description: "Initiate API Token authentication flow for an integration";
15
+ readonly requestBodySchema: z.ZodObject<{
16
+ connectorName: z.ZodString;
17
+ initialAuthConfig: z.ZodRecord<z.ZodString, z.ZodAny>;
18
+ }, z.core.$strip>;
19
+ readonly responsesByStatusCode: {
20
+ 200: z.ZodObject<{
21
+ integrationId: z.ZodGUID;
22
+ }, z.core.$strip>;
23
+ 400: z.ZodObject<{
24
+ message: z.ZodString;
25
+ code: z.ZodString;
26
+ errorCode: z.ZodString;
27
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
28
+ }, z.core.$strip>;
29
+ 401: z.ZodObject<{
30
+ message: z.ZodString;
31
+ code: z.ZodString;
32
+ errorCode: z.ZodString;
33
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
34
+ }, z.core.$strip>;
35
+ };
36
+ readonly requestHeaderSchema: z.ZodObject<{
37
+ authorization: z.ZodOptional<z.ZodString>;
38
+ }, z.core.$loose>;
39
+ }, "visibility"> & {
40
+ visibility: import("@lokalise/api-contracts").RouteVisibility;
41
+ };
38
42
  /**
39
43
  * Contract for initiating OAuth authentication flow
40
44
  * POST /v1/integrations/auth/initiate
@@ -43,124 +47,133 @@ export declare const postInitiateApiTokenIntegrationAuthContract: import("@lokal
43
47
  * the Integration and IntegrationUser records are created as part of this flow.
44
48
  * The integrationId is returned in the response for use in subsequent calls.
45
49
  */
46
- export declare const postInitiateIntegrationAuthContract: import("@lokalise/api-contracts").PayloadRouteDefinition<z.ZodObject<{
47
- connectorName: z.ZodString;
48
- config: z.ZodRecord<z.ZodString, z.ZodAny>;
49
- }, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
50
- integrationId: z.ZodGUID;
51
- authorizationUrl: z.ZodString;
52
- }, z.core.$strip>, z.ZodObject<{
53
- message: z.ZodString;
54
- code: z.ZodString;
55
- errorCode: z.ZodString;
56
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
57
- }, z.core.$strip>]>, undefined, undefined, z.ZodObject<{
58
- authorization: z.ZodOptional<z.ZodString>;
59
- }, z.core.$strip>, undefined, false, false, {
60
- 200: z.ZodObject<{
61
- integrationId: z.ZodGUID;
62
- authorizationUrl: z.ZodString;
63
- }, z.core.$strip>;
64
- 400: z.ZodObject<{
65
- message: z.ZodString;
66
- code: z.ZodString;
67
- errorCode: z.ZodString;
68
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
69
- }, z.core.$strip>;
70
- 401: z.ZodObject<{
71
- message: z.ZodString;
72
- code: z.ZodString;
73
- errorCode: z.ZodString;
74
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
75
- }, z.core.$strip>;
76
- }>;
50
+ export declare const postInitiateIntegrationAuthContract: Omit<{
51
+ readonly visibility: "internal";
52
+ readonly method: "post";
53
+ readonly pathResolver: () => string;
54
+ readonly summary: "Initiate OAuth integration auth";
55
+ readonly description: "Initiate OAuth authentication flow for an integration";
56
+ readonly requestBodySchema: z.ZodObject<{
57
+ connectorName: z.ZodString;
58
+ config: z.ZodRecord<z.ZodString, z.ZodAny>;
59
+ }, z.core.$strip>;
60
+ readonly responsesByStatusCode: {
61
+ 200: z.ZodObject<{
62
+ integrationId: z.ZodGUID;
63
+ authorizationUrl: z.ZodString;
64
+ }, z.core.$strip>;
65
+ 400: z.ZodObject<{
66
+ message: z.ZodString;
67
+ code: z.ZodString;
68
+ errorCode: z.ZodString;
69
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
70
+ }, z.core.$strip>;
71
+ 401: z.ZodObject<{
72
+ message: z.ZodString;
73
+ code: z.ZodString;
74
+ errorCode: z.ZodString;
75
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
76
+ }, z.core.$strip>;
77
+ };
78
+ readonly requestHeaderSchema: z.ZodObject<{
79
+ authorization: z.ZodOptional<z.ZodString>;
80
+ }, z.core.$loose>;
81
+ }, "visibility"> & {
82
+ visibility: import("@lokalise/api-contracts").RouteVisibility;
83
+ };
77
84
  /**
78
85
  * Contract for checking OAuth authentication status
79
86
  * GET /v1/integrations/{integrationId}/auth/status
80
87
  */
81
- export declare const getIntegrationAuthStatusContract: import("@lokalise/api-contracts").GetRouteDefinition<z.ZodUnion<readonly [z.ZodObject<{
82
- status: z.ZodEnum<{
83
- readonly pending: 'pending';
84
- readonly completed: 'completed';
85
- readonly failed: 'failed';
86
- readonly reauthRequired: 'reauth_required';
87
- }>;
88
- error: z.ZodOptional<z.ZodString>;
89
- }, z.core.$strip>, z.ZodObject<{
90
- message: z.ZodString;
91
- code: z.ZodString;
92
- errorCode: z.ZodString;
93
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
94
- }, z.core.$strip>]>, z.ZodObject<{
95
- integrationId: z.ZodGUID;
96
- }, z.core.$strip>, undefined, z.ZodObject<{
97
- authorization: z.ZodOptional<z.ZodString>;
98
- }, z.core.$strip>, undefined, false, false, {
99
- 200: z.ZodObject<{
100
- status: z.ZodEnum<{
101
- readonly pending: 'pending';
102
- readonly completed: 'completed';
103
- readonly failed: 'failed';
104
- readonly reauthRequired: 'reauth_required';
105
- }>;
106
- error: z.ZodOptional<z.ZodString>;
107
- }, z.core.$strip>;
108
- 401: z.ZodObject<{
109
- message: z.ZodString;
110
- code: z.ZodString;
111
- errorCode: z.ZodString;
112
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
113
- }, z.core.$strip>;
114
- 404: z.ZodObject<{
115
- message: z.ZodString;
116
- code: z.ZodString;
117
- errorCode: z.ZodString;
118
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
88
+ export declare const getIntegrationAuthStatusContract: Omit<{
89
+ readonly visibility: "internal";
90
+ readonly method: "get";
91
+ readonly pathResolver: (params: {
92
+ integrationId: string;
93
+ }) => string;
94
+ readonly summary: "Get integration auth status";
95
+ readonly description: "Get the current status of OAuth authentication flow";
96
+ readonly requestPathParamsSchema: z.ZodObject<{
97
+ integrationId: z.ZodGUID;
119
98
  }, z.core.$strip>;
120
- }>;
99
+ readonly responsesByStatusCode: {
100
+ 200: z.ZodObject<{
101
+ status: z.ZodEnum<{
102
+ readonly pending: 'pending';
103
+ readonly completed: 'completed';
104
+ readonly failed: 'failed';
105
+ readonly reauthRequired: 'reauth_required';
106
+ }>;
107
+ error: z.ZodOptional<z.ZodString>;
108
+ }, z.core.$strip>;
109
+ 401: z.ZodObject<{
110
+ message: z.ZodString;
111
+ code: z.ZodString;
112
+ errorCode: z.ZodString;
113
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
114
+ }, z.core.$strip>;
115
+ 404: z.ZodObject<{
116
+ message: z.ZodString;
117
+ code: z.ZodString;
118
+ errorCode: z.ZodString;
119
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
120
+ }, z.core.$strip>;
121
+ };
122
+ readonly requestHeaderSchema: z.ZodObject<{
123
+ authorization: z.ZodOptional<z.ZodString>;
124
+ }, z.core.$loose>;
125
+ }, "visibility"> & {
126
+ visibility: import("@lokalise/api-contracts").RouteVisibility;
127
+ };
121
128
  /**
122
129
  * Contract for handling OAuth callback
123
130
  * POST /v1/integrations/{integrationId}/auth/callback
124
131
  */
125
- export declare const postIntegrationAuthCallbackContract: import("@lokalise/api-contracts").PayloadRouteDefinition<z.ZodObject<{
126
- query: z.ZodObject<{}, z.core.$loose>;
127
- body: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
128
- }, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
129
- success: z.ZodBoolean;
130
- integrationId: z.ZodGUID;
131
- }, z.core.$strip>, z.ZodObject<{
132
- message: z.ZodString;
133
- code: z.ZodString;
134
- errorCode: z.ZodString;
135
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
136
- }, z.core.$strip>]>, z.ZodObject<{
137
- integrationId: z.ZodGUID;
138
- }, z.core.$strip>, undefined, z.ZodObject<{
139
- authorization: z.ZodOptional<z.ZodString>;
140
- }, z.core.$strip>, undefined, false, false, {
141
- 200: z.ZodObject<{
142
- success: z.ZodBoolean;
132
+ export declare const postIntegrationAuthCallbackContract: Omit<{
133
+ readonly visibility: "internal";
134
+ readonly method: "post";
135
+ readonly pathResolver: (params: {
136
+ integrationId: string;
137
+ }) => string;
138
+ readonly summary: "Handle integration OAuth callback";
139
+ readonly description: "Handle OAuth callback from third-party provider";
140
+ readonly requestPathParamsSchema: z.ZodObject<{
143
141
  integrationId: z.ZodGUID;
144
142
  }, z.core.$strip>;
145
- 400: z.ZodObject<{
146
- message: z.ZodString;
147
- code: z.ZodString;
148
- errorCode: z.ZodString;
149
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
150
- }, z.core.$strip>;
151
- 401: z.ZodObject<{
152
- message: z.ZodString;
153
- code: z.ZodString;
154
- errorCode: z.ZodString;
155
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
156
- }, z.core.$strip>;
157
- 404: z.ZodObject<{
158
- message: z.ZodString;
159
- code: z.ZodString;
160
- errorCode: z.ZodString;
161
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
162
- }, z.core.$strip>;
163
- }>;
143
+ readonly requestBodySchema: z.ZodObject<{
144
+ query: z.ZodObject<{}, z.core.$loose>;
145
+ body: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
146
+ }, z.core.$strip>;
147
+ readonly responsesByStatusCode: {
148
+ 200: z.ZodObject<{
149
+ success: z.ZodBoolean;
150
+ integrationId: z.ZodGUID;
151
+ }, z.core.$strip>;
152
+ 400: z.ZodObject<{
153
+ message: z.ZodString;
154
+ code: z.ZodString;
155
+ errorCode: z.ZodString;
156
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
157
+ }, z.core.$strip>;
158
+ 401: z.ZodObject<{
159
+ message: z.ZodString;
160
+ code: z.ZodString;
161
+ errorCode: z.ZodString;
162
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
163
+ }, z.core.$strip>;
164
+ 404: z.ZodObject<{
165
+ message: z.ZodString;
166
+ code: z.ZodString;
167
+ errorCode: z.ZodString;
168
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
169
+ }, z.core.$strip>;
170
+ };
171
+ readonly requestHeaderSchema: z.ZodObject<{
172
+ authorization: z.ZodOptional<z.ZodString>;
173
+ }, z.core.$loose>;
174
+ }, "visibility"> & {
175
+ visibility: import("@lokalise/api-contracts").RouteVisibility;
176
+ };
164
177
  /**
165
178
  * Contract for reauthenticating an existing integration
166
179
  * POST /v1/integrations/{integrationId}/auth/reauthenticate
@@ -169,39 +182,45 @@ export declare const postIntegrationAuthCallbackContract: import("@lokalise/api-
169
182
  * IntegrationUser records. It resets auth status to pending and returns
170
183
  * a fresh OAuth authorization URL.
171
184
  */
172
- export declare const postIntegrationReauthContract: import("@lokalise/api-contracts").PayloadRouteDefinition<z.ZodObject<{}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
173
- integrationId: z.ZodGUID;
174
- authorizationUrl: z.ZodString;
175
- }, z.core.$strip>, z.ZodObject<{
176
- message: z.ZodString;
177
- code: z.ZodString;
178
- errorCode: z.ZodString;
179
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
180
- }, z.core.$strip>]>, z.ZodObject<{
181
- integrationId: z.ZodGUID;
182
- }, z.core.$strip>, undefined, z.ZodObject<{
183
- authorization: z.ZodOptional<z.ZodString>;
184
- }, z.core.$strip>, undefined, false, false, {
185
- 200: z.ZodObject<{
185
+ export declare const postIntegrationReauthContract: Omit<{
186
+ readonly visibility: "internal";
187
+ readonly method: "post";
188
+ readonly pathResolver: (params: {
189
+ integrationId: string;
190
+ }) => string;
191
+ readonly summary: "Reauthenticate integration";
192
+ readonly description: "Initiate reauthentication flow for an existing integration";
193
+ readonly requestPathParamsSchema: z.ZodObject<{
186
194
  integrationId: z.ZodGUID;
187
- authorizationUrl: z.ZodString;
188
- }, z.core.$strip>;
189
- 400: z.ZodObject<{
190
- message: z.ZodString;
191
- code: z.ZodString;
192
- errorCode: z.ZodString;
193
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
194
- }, z.core.$strip>;
195
- 401: z.ZodObject<{
196
- message: z.ZodString;
197
- code: z.ZodString;
198
- errorCode: z.ZodString;
199
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
200
- }, z.core.$strip>;
201
- 404: z.ZodObject<{
202
- message: z.ZodString;
203
- code: z.ZodString;
204
- errorCode: z.ZodString;
205
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
206
195
  }, z.core.$strip>;
207
- }>;
196
+ readonly requestBodySchema: z.ZodObject<{}, z.core.$strip>;
197
+ readonly responsesByStatusCode: {
198
+ 200: z.ZodObject<{
199
+ integrationId: z.ZodGUID;
200
+ authorizationUrl: z.ZodString;
201
+ }, z.core.$strip>;
202
+ 400: z.ZodObject<{
203
+ message: z.ZodString;
204
+ code: z.ZodString;
205
+ errorCode: z.ZodString;
206
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
207
+ }, z.core.$strip>;
208
+ 401: z.ZodObject<{
209
+ message: z.ZodString;
210
+ code: z.ZodString;
211
+ errorCode: z.ZodString;
212
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
213
+ }, z.core.$strip>;
214
+ 404: z.ZodObject<{
215
+ message: z.ZodString;
216
+ code: z.ZodString;
217
+ errorCode: z.ZodString;
218
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
219
+ }, z.core.$strip>;
220
+ };
221
+ readonly requestHeaderSchema: z.ZodObject<{
222
+ authorization: z.ZodOptional<z.ZodString>;
223
+ }, z.core.$loose>;
224
+ }, "visibility"> & {
225
+ visibility: import("@lokalise/api-contracts").RouteVisibility;
226
+ };
@@ -1,4 +1,4 @@
1
- import { buildGetRoute, buildPayloadRoute } from '@lokalise/api-contracts';
1
+ import { defineApiContract } from '@lokalise/api-contracts';
2
2
  import { z } from 'zod/v4';
3
3
  import { AUTHORIZATION_HEADER_SCHEMA, COMMON_ERROR_RESPONSE_SCHEMA_V2, } from '../commonRequestSchemas.js';
4
4
  import { GET_INTEGRATION_AUTH_STATUS_PATH_PARAMS_SCHEMA, GET_INTEGRATION_AUTH_STATUS_RESPONSE_SCHEMA, POST_CREATE_INTEGRATION_API_TOKEN_INITIATE_PAYLOAD_SCHEMA, POST_CREATE_INTEGRATION_API_TOKEN_INITIATE_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, POST_INTEGRATION_REAUTH_PATH_PARAMS_SCHEMA, POST_INTEGRATION_REAUTH_RESPONSE_SCHEMA, } from './integrationAuthSchemas.js';
@@ -9,17 +9,14 @@ import { GET_INTEGRATION_AUTH_STATUS_PATH_PARAMS_SCHEMA, GET_INTEGRATION_AUTH_ST
9
9
  * the Integration and IntegrationUser records are created as part of this flow.
10
10
  * The integrationId is returned in the response for use in subsequent calls.
11
11
  */
12
- export const postInitiateApiTokenIntegrationAuthContract = buildPayloadRoute({
12
+ export const postInitiateApiTokenIntegrationAuthContract = defineApiContract({
13
13
  visibility: 'internal',
14
14
  method: 'post',
15
15
  pathResolver: () => '/v1/integrations/auth/api-token/initiate',
16
+ summary: 'Initiate API token integration auth',
16
17
  description: 'Initiate API Token authentication flow for an integration',
17
18
  requestBodySchema: POST_CREATE_INTEGRATION_API_TOKEN_INITIATE_PAYLOAD_SCHEMA,
18
- successResponseBodySchema: z.union([
19
- POST_CREATE_INTEGRATION_API_TOKEN_INITIATE_RESPONSE_SCHEMA,
20
- COMMON_ERROR_RESPONSE_SCHEMA_V2,
21
- ]),
22
- responseSchemasByStatusCode: {
19
+ responsesByStatusCode: {
23
20
  200: POST_CREATE_INTEGRATION_API_TOKEN_INITIATE_RESPONSE_SCHEMA,
24
21
  400: COMMON_ERROR_RESPONSE_SCHEMA_V2,
25
22
  401: COMMON_ERROR_RESPONSE_SCHEMA_V2,
@@ -34,17 +31,14 @@ export const postInitiateApiTokenIntegrationAuthContract = buildPayloadRoute({
34
31
  * the Integration and IntegrationUser records are created as part of this flow.
35
32
  * The integrationId is returned in the response for use in subsequent calls.
36
33
  */
37
- export const postInitiateIntegrationAuthContract = buildPayloadRoute({
34
+ export const postInitiateIntegrationAuthContract = defineApiContract({
38
35
  visibility: 'internal',
39
36
  method: 'post',
40
37
  pathResolver: () => '/v1/integrations/auth/initiate',
38
+ summary: 'Initiate OAuth integration auth',
41
39
  description: 'Initiate OAuth authentication flow for an integration',
42
40
  requestBodySchema: POST_CREATE_INTEGRATION_AUTH_INITIATE_PAYLOAD_SCHEMA,
43
- successResponseBodySchema: z.union([
44
- POST_CREATE_INTEGRATION_AUTH_INITIATE_RESPONSE_SCHEMA,
45
- COMMON_ERROR_RESPONSE_SCHEMA_V2,
46
- ]),
47
- responseSchemasByStatusCode: {
41
+ responsesByStatusCode: {
48
42
  200: POST_CREATE_INTEGRATION_AUTH_INITIATE_RESPONSE_SCHEMA,
49
43
  400: COMMON_ERROR_RESPONSE_SCHEMA_V2,
50
44
  401: COMMON_ERROR_RESPONSE_SCHEMA_V2,
@@ -55,16 +49,14 @@ export const postInitiateIntegrationAuthContract = buildPayloadRoute({
55
49
  * Contract for checking OAuth authentication status
56
50
  * GET /v1/integrations/{integrationId}/auth/status
57
51
  */
58
- export const getIntegrationAuthStatusContract = buildGetRoute({
52
+ export const getIntegrationAuthStatusContract = defineApiContract({
59
53
  visibility: 'internal',
54
+ method: 'get',
60
55
  pathResolver: (params) => `/v1/integrations/${params.integrationId}/auth/status`,
56
+ summary: 'Get integration auth status',
61
57
  description: 'Get the current status of OAuth authentication flow',
62
58
  requestPathParamsSchema: GET_INTEGRATION_AUTH_STATUS_PATH_PARAMS_SCHEMA,
63
- successResponseBodySchema: z.union([
64
- GET_INTEGRATION_AUTH_STATUS_RESPONSE_SCHEMA,
65
- COMMON_ERROR_RESPONSE_SCHEMA_V2,
66
- ]),
67
- responseSchemasByStatusCode: {
59
+ responsesByStatusCode: {
68
60
  200: GET_INTEGRATION_AUTH_STATUS_RESPONSE_SCHEMA,
69
61
  401: COMMON_ERROR_RESPONSE_SCHEMA_V2,
70
62
  404: COMMON_ERROR_RESPONSE_SCHEMA_V2,
@@ -75,18 +67,15 @@ export const getIntegrationAuthStatusContract = buildGetRoute({
75
67
  * Contract for handling OAuth callback
76
68
  * POST /v1/integrations/{integrationId}/auth/callback
77
69
  */
78
- export const postIntegrationAuthCallbackContract = buildPayloadRoute({
70
+ export const postIntegrationAuthCallbackContract = defineApiContract({
79
71
  visibility: 'internal',
80
72
  method: 'post',
81
73
  pathResolver: (params) => `/v1/integrations/${params.integrationId}/auth/callback`,
74
+ summary: 'Handle integration OAuth callback',
82
75
  description: 'Handle OAuth callback from third-party provider',
83
76
  requestPathParamsSchema: POST_INTEGRATION_AUTH_CALLBACK_PATH_PARAMS_SCHEMA,
84
77
  requestBodySchema: POST_INTEGRATION_AUTH_CALLBACK_BODY_SCHEMA,
85
- successResponseBodySchema: z.union([
86
- POST_INTEGRATION_AUTH_CALLBACK_RESPONSE_SCHEMA,
87
- COMMON_ERROR_RESPONSE_SCHEMA_V2,
88
- ]),
89
- responseSchemasByStatusCode: {
78
+ responsesByStatusCode: {
90
79
  200: POST_INTEGRATION_AUTH_CALLBACK_RESPONSE_SCHEMA,
91
80
  400: COMMON_ERROR_RESPONSE_SCHEMA_V2,
92
81
  401: COMMON_ERROR_RESPONSE_SCHEMA_V2,
@@ -102,18 +91,15 @@ export const postIntegrationAuthCallbackContract = buildPayloadRoute({
102
91
  * IntegrationUser records. It resets auth status to pending and returns
103
92
  * a fresh OAuth authorization URL.
104
93
  */
105
- export const postIntegrationReauthContract = buildPayloadRoute({
94
+ export const postIntegrationReauthContract = defineApiContract({
106
95
  visibility: 'internal',
107
96
  method: 'post',
108
97
  pathResolver: (params) => `/v1/integrations/${params.integrationId}/auth/reauthenticate`,
98
+ summary: 'Reauthenticate integration',
109
99
  description: 'Initiate reauthentication flow for an existing integration',
110
100
  requestPathParamsSchema: POST_INTEGRATION_REAUTH_PATH_PARAMS_SCHEMA,
111
101
  requestBodySchema: z.object({}),
112
- successResponseBodySchema: z.union([
113
- POST_INTEGRATION_REAUTH_RESPONSE_SCHEMA,
114
- COMMON_ERROR_RESPONSE_SCHEMA_V2,
115
- ]),
116
- responseSchemasByStatusCode: {
102
+ responsesByStatusCode: {
117
103
  200: POST_INTEGRATION_REAUTH_RESPONSE_SCHEMA,
118
104
  400: COMMON_ERROR_RESPONSE_SCHEMA_V2,
119
105
  401: COMMON_ERROR_RESPONSE_SCHEMA_V2,
@@ -1 +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,yDAAyD,EACzD,0DAA0D,EAC1D,oDAAoD,EACpD,qDAAqD,EACrD,0CAA0C,EAC1C,iDAAiD,EACjD,8CAA8C,EAC9C,0CAA0C,EAC1C,uCAAuC,GACxC,MAAM,6BAA6B,CAAA;AAEpC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,2CAA2C,GAAG,iBAAiB,CAAC;IAC3E,UAAU,EAAE,UAAU;IACtB,MAAM,EAAE,MAAM;IACd,YAAY,EAAE,GAAG,EAAE,CAAC,0CAA0C;IAC9D,WAAW,EAAE,2DAA2D;IACxE,iBAAiB,EAAE,yDAAyD;IAC5E,yBAAyB,EAAE,CAAC,CAAC,KAAK,CAAC;QACjC,0DAA0D;QAC1D,+BAA+B;KAChC,CAAC;IACF,2BAA2B,EAAE;QAC3B,GAAG,EAAE,0DAA0D;QAC/D,GAAG,EAAE,+BAA+B;QACpC,GAAG,EAAE,+BAA+B;KACrC;IACD,mBAAmB,EAAE,2BAA2B;CACjD,CAAC,CAAA;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mCAAmC,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,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;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,iBAAiB,CAAC;IAC7D,UAAU,EAAE,UAAU;IACtB,MAAM,EAAE,MAAM;IACd,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,oBAAoB,MAAM,CAAC,aAAa,sBAAsB;IACxF,WAAW,EAAE,4DAA4D;IACzE,uBAAuB,EAAE,0CAA0C;IACnE,iBAAiB,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IAC/B,yBAAyB,EAAE,CAAC,CAAC,KAAK,CAAC;QACjC,uCAAuC;QACvC,+BAA+B;KAChC,CAAC;IACF,2BAA2B,EAAE;QAC3B,GAAG,EAAE,uCAAuC;QAC5C,GAAG,EAAE,+BAA+B;QACpC,GAAG,EAAE,+BAA+B;QACpC,GAAG,EAAE,+BAA+B;KACrC;IACD,mBAAmB,EAAE,2BAA2B;CACjD,CAAC,CAAA"}
1
+ {"version":3,"file":"integrationAuthApiSchemas.js","sourceRoot":"","sources":["../../../src/schemas/auth/integrationAuthApiSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,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,yDAAyD,EACzD,0DAA0D,EAC1D,oDAAoD,EACpD,qDAAqD,EACrD,0CAA0C,EAC1C,iDAAiD,EACjD,8CAA8C,EAC9C,0CAA0C,EAC1C,uCAAuC,GACxC,MAAM,6BAA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