@lokalise/content-type-app-engine-contracts 6.12.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.
- package/README.md +19 -0
- package/dist/schemas/auth/authApiSchemas.d.ts +174 -133
- package/dist/schemas/auth/authApiSchemas.js +21 -24
- package/dist/schemas/auth/authApiSchemas.js.map +1 -1
- package/dist/schemas/auth/integrationAuthApiSchemas.d.ts +189 -170
- package/dist/schemas/auth/integrationAuthApiSchemas.js +17 -31
- package/dist/schemas/auth/integrationAuthApiSchemas.js.map +1 -1
- package/dist/schemas/cache/cacheApiSchemas.d.ts +59 -80
- package/dist/schemas/cache/cacheApiSchemas.js +4 -4
- package/dist/schemas/cache/cacheApiSchemas.js.map +1 -1
- package/dist/schemas/commonRequestSchemas.d.ts +1 -1
- package/dist/schemas/commonRequestSchemas.js +3 -1
- package/dist/schemas/commonRequestSchemas.js.map +1 -1
- package/dist/schemas/config/integrationConfigApiSchemas.d.ts +80 -70
- package/dist/schemas/config/integrationConfigApiSchemas.js +8 -14
- package/dist/schemas/config/integrationConfigApiSchemas.js.map +1 -1
- package/dist/schemas/connector/connectorApiSchemas.d.ts +703 -1342
- package/dist/schemas/connector/connectorApiSchemas.js +12 -14
- package/dist/schemas/connector/connectorApiSchemas.js.map +1 -1
- package/dist/schemas/content/contentApiSchemas.d.ts +704 -709
- package/dist/schemas/content/contentApiSchemas.js +51 -84
- package/dist/schemas/content/contentApiSchemas.js.map +1 -1
- package/dist/schemas/content/contentExportApiSchemas.d.ts +44 -51
- package/dist/schemas/content/contentExportApiSchemas.js +3 -4
- package/dist/schemas/content/contentExportApiSchemas.js.map +1 -1
- package/dist/schemas/env/envApiSchemas.d.ts +95 -124
- package/dist/schemas/env/envApiSchemas.js +17 -14
- package/dist/schemas/env/envApiSchemas.js.map +1 -1
- package/dist/schemas/filter/filterApiSchemas.d.ts +314 -232
- package/dist/schemas/filter/filterApiSchemas.js +20 -20
- package/dist/schemas/filter/filterApiSchemas.js.map +1 -1
- package/dist/schemas/integration/integrationApiSchemas.d.ts +702 -1343
- package/dist/schemas/integration/integrationApiSchemas.js +12 -18
- package/dist/schemas/integration/integrationApiSchemas.js.map +1 -1
- package/dist/schemas/integrationProject/integrationProjectApiSchemas.d.ts +144 -117
- package/dist/schemas/integrationProject/integrationProjectApiSchemas.js +10 -10
- package/dist/schemas/integrationProject/integrationProjectApiSchemas.js.map +1 -1
- package/dist/schemas/itemGroup/integrationItemGroupApiSchemas.d.ts +45 -40
- package/dist/schemas/itemGroup/integrationItemGroupApiSchemas.js +5 -4
- package/dist/schemas/itemGroup/integrationItemGroupApiSchemas.js.map +1 -1
- package/dist/schemas/itemGroup/linkItemGroupApiSchemas.d.ts +45 -43
- package/dist/schemas/itemGroup/linkItemGroupApiSchemas.js +5 -4
- package/dist/schemas/itemGroup/linkItemGroupApiSchemas.js.map +1 -1
- package/dist/schemas/itemList/integrationItemListApiSchemas.d.ts +51 -53
- package/dist/schemas/itemList/integrationItemListApiSchemas.js +5 -4
- package/dist/schemas/itemList/integrationItemListApiSchemas.js.map +1 -1
- package/dist/schemas/itemList/itemListContracts.d.ts +40 -45
- package/dist/schemas/itemList/itemListContracts.js +5 -4
- package/dist/schemas/itemList/itemListContracts.js.map +1 -1
- package/dist/schemas/language/languageApiSchemas.d.ts +29 -26
- package/dist/schemas/language/languageApiSchemas.js +4 -5
- package/dist/schemas/language/languageApiSchemas.js.map +1 -1
- package/dist/schemas/link/linkApiSchemas.d.ts +616 -1266
- package/dist/schemas/link/linkApiSchemas.js +5 -4
- package/dist/schemas/link/linkApiSchemas.js.map +1 -1
- package/dist/schemas/processResult/integrationProcessResultsApiSchemas.d.ts +143 -167
- package/dist/schemas/processResult/integrationProcessResultsApiSchemas.js +9 -7
- package/dist/schemas/processResult/integrationProcessResultsApiSchemas.js.map +1 -1
- package/dist/schemas/project/projectApiSchemas.d.ts +90 -90
- package/dist/schemas/project/projectApiSchemas.js +8 -15
- package/dist/schemas/project/projectApiSchemas.js.map +1 -1
- package/dist/schemas/schedule/scheduleApiSchemas.d.ts +2620 -2487
- package/dist/schemas/schedule/scheduleApiSchemas.js +34 -29
- package/dist/schemas/schedule/scheduleApiSchemas.js.map +1 -1
- package/dist/schemas/settings/settingsApiSchemas.d.ts +136 -189
- package/dist/schemas/settings/settingsApiSchemas.js +8 -9
- package/dist/schemas/settings/settingsApiSchemas.js.map +1 -1
- package/dist/schemas/status/statusApiSchemas.d.ts +53 -64
- package/dist/schemas/status/statusApiSchemas.js +5 -9
- package/dist/schemas/status/statusApiSchemas.js.map +1 -1
- package/package.json +2 -2
|
@@ -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:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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:
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
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:
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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 {
|
|
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 =
|
|
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
|
-
|
|
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 =
|
|
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
|
-
|
|
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 =
|
|
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
|
-
|
|
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 =
|
|
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
|
-
|
|
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 =
|
|
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
|
-
|
|
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,
|
|
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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