@labeleer/api 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/client.gen.js +1 -1
- package/dist/generated/sdk.gen.js +191 -1
- package/package.json +3 -4
- package/dist/client/client.gen.d.ts +0 -2
- package/dist/client/client.gen.js +0 -217
- package/dist/client/index.d.ts +0 -10
- package/dist/client/index.js +0 -6
- package/dist/client/types.gen.d.ts +0 -120
- package/dist/client/types.gen.js +0 -2
- package/dist/client/utils.gen.d.ts +0 -37
- package/dist/client/utils.gen.js +0 -231
- package/dist/client.gen.d.ts +0 -12
- package/dist/client.gen.js +0 -3
- package/dist/core/auth.gen.d.ts +0 -25
- package/dist/core/auth.gen.js +0 -14
- package/dist/core/bodySerializer.gen.d.ts +0 -25
- package/dist/core/bodySerializer.gen.js +0 -57
- package/dist/core/params.gen.d.ts +0 -43
- package/dist/core/params.gen.js +0 -112
- package/dist/core/pathSerializer.gen.d.ts +0 -33
- package/dist/core/pathSerializer.gen.js +0 -114
- package/dist/core/queryKeySerializer.gen.d.ts +0 -18
- package/dist/core/queryKeySerializer.gen.js +0 -99
- package/dist/core/serverSentEvents.gen.d.ts +0 -71
- package/dist/core/serverSentEvents.gen.js +0 -136
- package/dist/core/types.gen.d.ts +0 -83
- package/dist/core/types.gen.js +0 -2
- package/dist/core/utils.gen.d.ts +0 -19
- package/dist/core/utils.gen.js +0 -87
- package/dist/sdk.gen.d.ts +0 -42
- package/dist/sdk.gen.js +0 -190
- package/dist/types/index.d.ts +0 -1366
- package/dist/types/index.js +0 -181
- package/dist/zod.gen.d.ts +0 -3149
- package/dist/zod.gen.js +0 -621
package/dist/core/utils.gen.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js';
|
|
2
|
-
export interface PathSerializer {
|
|
3
|
-
path: Record<string, unknown>;
|
|
4
|
-
url: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const PATH_PARAM_RE: RegExp;
|
|
7
|
-
export declare const defaultPathSerializer: ({ path, url: _url, }: PathSerializer) => string;
|
|
8
|
-
export declare const getUrl: ({ baseUrl, path, query, querySerializer, url: _url, }: {
|
|
9
|
-
baseUrl?: string;
|
|
10
|
-
path?: Record<string, unknown>;
|
|
11
|
-
query?: Record<string, unknown>;
|
|
12
|
-
querySerializer: QuerySerializer;
|
|
13
|
-
url: string;
|
|
14
|
-
}) => string;
|
|
15
|
-
export declare function getValidRequestBody(options: {
|
|
16
|
-
body?: unknown;
|
|
17
|
-
bodySerializer?: BodySerializer | null;
|
|
18
|
-
serializedBody?: unknown;
|
|
19
|
-
}): unknown;
|
package/dist/core/utils.gen.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam, } from './pathSerializer.gen.js';
|
|
3
|
-
export const PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
4
|
-
export const defaultPathSerializer = ({ path, url: _url, }) => {
|
|
5
|
-
let url = _url;
|
|
6
|
-
const matches = _url.match(PATH_PARAM_RE);
|
|
7
|
-
if (matches) {
|
|
8
|
-
for (const match of matches) {
|
|
9
|
-
let explode = false;
|
|
10
|
-
let name = match.substring(1, match.length - 1);
|
|
11
|
-
let style = 'simple';
|
|
12
|
-
if (name.endsWith('*')) {
|
|
13
|
-
explode = true;
|
|
14
|
-
name = name.substring(0, name.length - 1);
|
|
15
|
-
}
|
|
16
|
-
if (name.startsWith('.')) {
|
|
17
|
-
name = name.substring(1);
|
|
18
|
-
style = 'label';
|
|
19
|
-
}
|
|
20
|
-
else if (name.startsWith(';')) {
|
|
21
|
-
name = name.substring(1);
|
|
22
|
-
style = 'matrix';
|
|
23
|
-
}
|
|
24
|
-
const value = path[name];
|
|
25
|
-
if (value === undefined || value === null) {
|
|
26
|
-
continue;
|
|
27
|
-
}
|
|
28
|
-
if (Array.isArray(value)) {
|
|
29
|
-
url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
|
|
30
|
-
continue;
|
|
31
|
-
}
|
|
32
|
-
if (typeof value === 'object') {
|
|
33
|
-
url = url.replace(match, serializeObjectParam({
|
|
34
|
-
explode,
|
|
35
|
-
name,
|
|
36
|
-
style,
|
|
37
|
-
value: value,
|
|
38
|
-
valueOnly: true,
|
|
39
|
-
}));
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
if (style === 'matrix') {
|
|
43
|
-
url = url.replace(match, `;${serializePrimitiveParam({
|
|
44
|
-
name,
|
|
45
|
-
value: value,
|
|
46
|
-
})}`);
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
const replaceValue = encodeURIComponent(style === 'label' ? `.${value}` : value);
|
|
50
|
-
url = url.replace(match, replaceValue);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return url;
|
|
54
|
-
};
|
|
55
|
-
export const getUrl = ({ baseUrl, path, query, querySerializer, url: _url, }) => {
|
|
56
|
-
const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;
|
|
57
|
-
let url = (baseUrl ?? '') + pathUrl;
|
|
58
|
-
if (path) {
|
|
59
|
-
url = defaultPathSerializer({ path, url });
|
|
60
|
-
}
|
|
61
|
-
let search = query ? querySerializer(query) : '';
|
|
62
|
-
if (search.startsWith('?')) {
|
|
63
|
-
search = search.substring(1);
|
|
64
|
-
}
|
|
65
|
-
if (search) {
|
|
66
|
-
url += `?${search}`;
|
|
67
|
-
}
|
|
68
|
-
return url;
|
|
69
|
-
};
|
|
70
|
-
export function getValidRequestBody(options) {
|
|
71
|
-
const hasBody = options.body !== undefined;
|
|
72
|
-
const isSerializedBody = hasBody && options.bodySerializer;
|
|
73
|
-
if (isSerializedBody) {
|
|
74
|
-
if ('serializedBody' in options) {
|
|
75
|
-
const hasSerializedBody = options.serializedBody !== undefined && options.serializedBody !== '';
|
|
76
|
-
return hasSerializedBody ? options.serializedBody : null;
|
|
77
|
-
}
|
|
78
|
-
// not all clients implement a serializedBody property (i.e., client-axios)
|
|
79
|
-
return options.body !== '' ? options.body : null;
|
|
80
|
-
}
|
|
81
|
-
// plain/text body
|
|
82
|
-
if (hasBody) {
|
|
83
|
-
return options.body;
|
|
84
|
-
}
|
|
85
|
-
// no body was provided
|
|
86
|
-
return undefined;
|
|
87
|
-
}
|
package/dist/sdk.gen.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { Client, ClientMeta, Options as Options2, RequestResult, ServerSentEventsResult, TDataShape } from './client/index.js';
|
|
2
|
-
import type { AddLocaleData, AddLocaleErrors, AddLocaleResponses, CreateAccessTokenData, CreateAccessTokenErrors, CreateAccessTokenResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, DeleteLocaleData, DeleteLocaleErrors, DeleteLocaleResponses, DeleteProjectData, DeleteProjectErrors, DeleteProjectResponses, DeleteTranslationData, DeleteTranslationErrors, DeleteTranslationResponses, DeleteTranslationsData, DeleteTranslationsErrors, DeleteTranslationsResponses, ExportTranslationsData, ExportTranslationsErrors, ExportTranslationsResponses, GenerateTranslationsData, GenerateTranslationsResponse, GenerateTranslationsResponses, GetInvitationsData, GetInvitationsErrors, GetInvitationsResponses, GetLocalesData, GetLocalesErrors, GetLocalesResponses, GetProjectsData, GetProjectsErrors, GetProjectsResponses, GetTranslationData, GetTranslationErrors, GetTranslationResponses, GetTranslationsData, GetTranslationsErrors, GetTranslationsResponses, GetTranslationTagsData, GetTranslationTagsErrors, GetTranslationTagsResponses, GetUserProjectPermissionsData, GetUserProjectPermissionsErrors, GetUserProjectPermissionsResponses, InviteUserToProjectData, InviteUserToProjectErrors, InviteUserToProjectResponses, RemoveUserFromProjectData, RemoveUserFromProjectErrors, RemoveUserFromProjectResponses, RenameTranslationKeyData, RenameTranslationKeyErrors, RenameTranslationKeyResponses, RespondToInvitationData, RespondToInvitationErrors, RespondToInvitationResponses, RevokeAccessTokenData, RevokeAccessTokenErrors, RevokeAccessTokenResponses, UpdateAccessTokenData, UpdateAccessTokenErrors, UpdateAccessTokenResponses, UpdateProjectData, UpdateProjectErrors, UpdateProjectResponses, UpdateReferenceLocaleData, UpdateReferenceLocaleErrors, UpdateReferenceLocaleResponses, UpdateTranslationsData, UpdateTranslationsErrors, UpdateTranslationsResponses, UpdateTranslationTagsData, UpdateTranslationTagsErrors, UpdateTranslationTagsResponses, UpdateUserPermissionsData, UpdateUserPermissionsErrors, UpdateUserPermissionsResponses } from './types/index.js';
|
|
3
|
-
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
|
|
4
|
-
/**
|
|
5
|
-
* You can provide a client instance returned by `createClient()` instead of
|
|
6
|
-
* individual options. This might be also useful if you want to implement a
|
|
7
|
-
* custom client.
|
|
8
|
-
*/
|
|
9
|
-
client?: Client;
|
|
10
|
-
/**
|
|
11
|
-
* You can pass arbitrary values through the `meta` object. This can be
|
|
12
|
-
* used to access values that aren't defined as part of the SDK function.
|
|
13
|
-
*/
|
|
14
|
-
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
15
|
-
};
|
|
16
|
-
export declare const getInvitations: <ThrowOnError extends boolean = false>(options?: Options<GetInvitationsData, ThrowOnError>) => RequestResult<GetInvitationsResponses, GetInvitationsErrors, ThrowOnError>;
|
|
17
|
-
export declare const respondToInvitation: <ThrowOnError extends boolean = false>(options: Options<RespondToInvitationData, ThrowOnError>) => RequestResult<RespondToInvitationResponses, RespondToInvitationErrors, ThrowOnError>;
|
|
18
|
-
export declare const revokeAccessToken: <ThrowOnError extends boolean = false>(options: Options<RevokeAccessTokenData, ThrowOnError>) => RequestResult<RevokeAccessTokenResponses, RevokeAccessTokenErrors, ThrowOnError>;
|
|
19
|
-
export declare const updateAccessToken: <ThrowOnError extends boolean = false>(options: Options<UpdateAccessTokenData, ThrowOnError>) => RequestResult<UpdateAccessTokenResponses, UpdateAccessTokenErrors, ThrowOnError>;
|
|
20
|
-
export declare const createAccessToken: <ThrowOnError extends boolean = false>(options: Options<CreateAccessTokenData, ThrowOnError>) => RequestResult<CreateAccessTokenResponses, CreateAccessTokenErrors, ThrowOnError>;
|
|
21
|
-
export declare const inviteUserToProject: <ThrowOnError extends boolean = false>(options: Options<InviteUserToProjectData, ThrowOnError>) => RequestResult<InviteUserToProjectResponses, InviteUserToProjectErrors, ThrowOnError>;
|
|
22
|
-
export declare const deleteProject: <ThrowOnError extends boolean = false>(options: Options<DeleteProjectData, ThrowOnError>) => RequestResult<DeleteProjectResponses, DeleteProjectErrors, ThrowOnError>;
|
|
23
|
-
export declare const updateProject: <ThrowOnError extends boolean = false>(options: Options<UpdateProjectData, ThrowOnError>) => RequestResult<UpdateProjectResponses, UpdateProjectErrors, ThrowOnError>;
|
|
24
|
-
export declare const removeUserFromProject: <ThrowOnError extends boolean = false>(options: Options<RemoveUserFromProjectData, ThrowOnError>) => RequestResult<RemoveUserFromProjectResponses, RemoveUserFromProjectErrors, ThrowOnError>;
|
|
25
|
-
export declare const getUserProjectPermissions: <ThrowOnError extends boolean = false>(options: Options<GetUserProjectPermissionsData, ThrowOnError>) => RequestResult<GetUserProjectPermissionsResponses, GetUserProjectPermissionsErrors, ThrowOnError>;
|
|
26
|
-
export declare const updateUserPermissions: <ThrowOnError extends boolean = false>(options: Options<UpdateUserPermissionsData, ThrowOnError>) => RequestResult<UpdateUserPermissionsResponses, UpdateUserPermissionsErrors, ThrowOnError>;
|
|
27
|
-
export declare const getProjects: <ThrowOnError extends boolean = false>(options?: Options<GetProjectsData, ThrowOnError>) => RequestResult<GetProjectsResponses, GetProjectsErrors, ThrowOnError>;
|
|
28
|
-
export declare const createProject: <ThrowOnError extends boolean = false>(options: Options<CreateProjectData, ThrowOnError>) => RequestResult<CreateProjectResponses, CreateProjectErrors, ThrowOnError>;
|
|
29
|
-
export declare const generateTranslations: <ThrowOnError extends boolean = false>(options: Options<GenerateTranslationsData, ThrowOnError, GenerateTranslationsResponse>) => Promise<ServerSentEventsResult<GenerateTranslationsResponses>>;
|
|
30
|
-
export declare const deleteTranslation: <ThrowOnError extends boolean = false>(options: Options<DeleteTranslationData, ThrowOnError>) => RequestResult<DeleteTranslationResponses, DeleteTranslationErrors, ThrowOnError>;
|
|
31
|
-
export declare const getTranslation: <ThrowOnError extends boolean = false>(options: Options<GetTranslationData, ThrowOnError>) => RequestResult<GetTranslationResponses, GetTranslationErrors, ThrowOnError>;
|
|
32
|
-
export declare const renameTranslationKey: <ThrowOnError extends boolean = false>(options: Options<RenameTranslationKeyData, ThrowOnError>) => RequestResult<RenameTranslationKeyResponses, RenameTranslationKeyErrors, ThrowOnError>;
|
|
33
|
-
export declare const getTranslationTags: <ThrowOnError extends boolean = false>(options: Options<GetTranslationTagsData, ThrowOnError>) => RequestResult<GetTranslationTagsResponses, GetTranslationTagsErrors, ThrowOnError>;
|
|
34
|
-
export declare const updateTranslationTags: <ThrowOnError extends boolean = false>(options: Options<UpdateTranslationTagsData, ThrowOnError>) => RequestResult<UpdateTranslationTagsResponses, UpdateTranslationTagsErrors, ThrowOnError>;
|
|
35
|
-
export declare const exportTranslations: <ThrowOnError extends boolean = false>(options: Options<ExportTranslationsData, ThrowOnError>) => RequestResult<ExportTranslationsResponses, ExportTranslationsErrors, ThrowOnError>;
|
|
36
|
-
export declare const deleteLocale: <ThrowOnError extends boolean = false>(options: Options<DeleteLocaleData, ThrowOnError>) => RequestResult<DeleteLocaleResponses, DeleteLocaleErrors, ThrowOnError>;
|
|
37
|
-
export declare const getLocales: <ThrowOnError extends boolean = false>(options: Options<GetLocalesData, ThrowOnError>) => RequestResult<GetLocalesResponses, GetLocalesErrors, ThrowOnError>;
|
|
38
|
-
export declare const addLocale: <ThrowOnError extends boolean = false>(options: Options<AddLocaleData, ThrowOnError>) => RequestResult<AddLocaleResponses, AddLocaleErrors, ThrowOnError>;
|
|
39
|
-
export declare const updateReferenceLocale: <ThrowOnError extends boolean = false>(options: Options<UpdateReferenceLocaleData, ThrowOnError>) => RequestResult<UpdateReferenceLocaleResponses, UpdateReferenceLocaleErrors, ThrowOnError>;
|
|
40
|
-
export declare const deleteTranslations: <ThrowOnError extends boolean = false>(options: Options<DeleteTranslationsData, ThrowOnError>) => RequestResult<DeleteTranslationsResponses, DeleteTranslationsErrors, ThrowOnError>;
|
|
41
|
-
export declare const getTranslations: <ThrowOnError extends boolean = false>(options: Options<GetTranslationsData, ThrowOnError>) => RequestResult<GetTranslationsResponses, GetTranslationsErrors, ThrowOnError>;
|
|
42
|
-
export declare const updateTranslations: <ThrowOnError extends boolean = false>(options: Options<UpdateTranslationsData, ThrowOnError>) => RequestResult<UpdateTranslationsResponses, UpdateTranslationsErrors, ThrowOnError>;
|
package/dist/sdk.gen.js
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
import { client } from './client.gen.js';
|
|
3
|
-
import { zAddLocaleResponse, zCreateAccessTokenResponse2, zCreateProjectResponse2, zDeleteLocaleResponse, zDeleteProjectResponse, zDeleteTranslationResponse, zDeleteTranslationsResponse, zExportTranslationsResponse, zGenerateTranslationsResponse, zGetInvitationsResponse2, zGetLocalesResponse, zGetProjectsResponse2, zGetTranslationResponse, zGetTranslationsResponse2, zGetTranslationTagsResponse2, zGetUserProjectPermissionsResponse, zInviteUserToProjectResponse, zRemoveUserFromProjectResponse, zRenameTranslationKeyResponse, zRespondToInvitationResponse, zRevokeAccessTokenResponse, zUpdateAccessTokenResponse2, zUpdateProjectResponse2, zUpdateReferenceLocaleResponse, zUpdateTranslationsResponse, zUpdateTranslationTagsResponse2, zUpdateUserPermissionsResponse, } from './zod.gen.js';
|
|
4
|
-
export const getInvitations = (options) => (options?.client ?? client).get({
|
|
5
|
-
responseValidator: async (data) => await zGetInvitationsResponse2.parseAsync(data),
|
|
6
|
-
url: '/api/invitations',
|
|
7
|
-
...options,
|
|
8
|
-
});
|
|
9
|
-
export const respondToInvitation = (options) => (options.client ?? client).post({
|
|
10
|
-
responseValidator: async (data) => await zRespondToInvitationResponse.parseAsync(data),
|
|
11
|
-
url: '/api/invitations',
|
|
12
|
-
...options,
|
|
13
|
-
headers: {
|
|
14
|
-
'Content-Type': 'application/json',
|
|
15
|
-
...options.headers,
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
export const revokeAccessToken = (options) => (options.client ?? client).delete({
|
|
19
|
-
responseValidator: async (data) => await zRevokeAccessTokenResponse.parseAsync(data),
|
|
20
|
-
url: '/api/project/{projectId}/access-token',
|
|
21
|
-
...options,
|
|
22
|
-
});
|
|
23
|
-
export const updateAccessToken = (options) => (options.client ?? client).patch({
|
|
24
|
-
responseValidator: async (data) => await zUpdateAccessTokenResponse2.parseAsync(data),
|
|
25
|
-
url: '/api/project/{projectId}/access-token',
|
|
26
|
-
...options,
|
|
27
|
-
headers: {
|
|
28
|
-
'Content-Type': 'application/json',
|
|
29
|
-
...options.headers,
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
export const createAccessToken = (options) => (options.client ?? client).post({
|
|
33
|
-
responseValidator: async (data) => await zCreateAccessTokenResponse2.parseAsync(data),
|
|
34
|
-
url: '/api/project/{projectId}/access-token',
|
|
35
|
-
...options,
|
|
36
|
-
headers: {
|
|
37
|
-
'Content-Type': 'application/json',
|
|
38
|
-
...options.headers,
|
|
39
|
-
},
|
|
40
|
-
});
|
|
41
|
-
export const inviteUserToProject = (options) => (options.client ?? client).post({
|
|
42
|
-
responseValidator: async (data) => await zInviteUserToProjectResponse.parseAsync(data),
|
|
43
|
-
url: '/api/project/{projectId}/invite',
|
|
44
|
-
...options,
|
|
45
|
-
headers: {
|
|
46
|
-
'Content-Type': 'application/json',
|
|
47
|
-
...options.headers,
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
export const deleteProject = (options) => (options.client ?? client).delete({
|
|
51
|
-
responseValidator: async (data) => await zDeleteProjectResponse.parseAsync(data),
|
|
52
|
-
url: '/api/project/{projectId}',
|
|
53
|
-
...options,
|
|
54
|
-
});
|
|
55
|
-
export const updateProject = (options) => (options.client ?? client).put({
|
|
56
|
-
responseValidator: async (data) => await zUpdateProjectResponse2.parseAsync(data),
|
|
57
|
-
url: '/api/project/{projectId}',
|
|
58
|
-
...options,
|
|
59
|
-
headers: {
|
|
60
|
-
'Content-Type': 'application/json',
|
|
61
|
-
...options.headers,
|
|
62
|
-
},
|
|
63
|
-
});
|
|
64
|
-
export const removeUserFromProject = (options) => (options.client ?? client).delete({
|
|
65
|
-
responseValidator: async (data) => await zRemoveUserFromProjectResponse.parseAsync(data),
|
|
66
|
-
url: '/api/project/{projectId}/users/{userId}',
|
|
67
|
-
...options,
|
|
68
|
-
});
|
|
69
|
-
export const getUserProjectPermissions = (options) => (options.client ?? client).get({
|
|
70
|
-
responseValidator: async (data) => await zGetUserProjectPermissionsResponse.parseAsync(data),
|
|
71
|
-
url: '/api/project/{projectId}/users/{userId}',
|
|
72
|
-
...options,
|
|
73
|
-
});
|
|
74
|
-
export const updateUserPermissions = (options) => (options.client ?? client).put({
|
|
75
|
-
responseValidator: async (data) => await zUpdateUserPermissionsResponse.parseAsync(data),
|
|
76
|
-
url: '/api/project/{projectId}/users/{userId}',
|
|
77
|
-
...options,
|
|
78
|
-
headers: {
|
|
79
|
-
'Content-Type': 'application/json',
|
|
80
|
-
...options.headers,
|
|
81
|
-
},
|
|
82
|
-
});
|
|
83
|
-
export const getProjects = (options) => (options?.client ?? client).get({
|
|
84
|
-
responseValidator: async (data) => await zGetProjectsResponse2.parseAsync(data),
|
|
85
|
-
url: '/api/project',
|
|
86
|
-
...options,
|
|
87
|
-
});
|
|
88
|
-
export const createProject = (options) => (options.client ?? client).post({
|
|
89
|
-
responseValidator: async (data) => await zCreateProjectResponse2.parseAsync(data),
|
|
90
|
-
url: '/api/project',
|
|
91
|
-
...options,
|
|
92
|
-
headers: {
|
|
93
|
-
'Content-Type': 'application/json',
|
|
94
|
-
...options.headers,
|
|
95
|
-
},
|
|
96
|
-
});
|
|
97
|
-
export const generateTranslations = (options) => (options.client ?? client).sse.post({
|
|
98
|
-
responseValidator: async (data) => await zGenerateTranslationsResponse.parseAsync(data),
|
|
99
|
-
url: '/api/translation/generate',
|
|
100
|
-
...options,
|
|
101
|
-
});
|
|
102
|
-
export const deleteTranslation = (options) => (options.client ?? client).delete({
|
|
103
|
-
responseValidator: async (data) => await zDeleteTranslationResponse.parseAsync(data),
|
|
104
|
-
url: '/api/translation',
|
|
105
|
-
...options,
|
|
106
|
-
});
|
|
107
|
-
export const getTranslation = (options) => (options.client ?? client).get({
|
|
108
|
-
responseValidator: async (data) => await zGetTranslationResponse.parseAsync(data),
|
|
109
|
-
url: '/api/translation',
|
|
110
|
-
...options,
|
|
111
|
-
});
|
|
112
|
-
export const renameTranslationKey = (options) => (options.client ?? client).put({
|
|
113
|
-
responseValidator: async (data) => await zRenameTranslationKeyResponse.parseAsync(data),
|
|
114
|
-
url: '/api/translation',
|
|
115
|
-
...options,
|
|
116
|
-
headers: {
|
|
117
|
-
'Content-Type': 'application/json',
|
|
118
|
-
...options.headers,
|
|
119
|
-
},
|
|
120
|
-
});
|
|
121
|
-
export const getTranslationTags = (options) => (options.client ?? client).get({
|
|
122
|
-
responseValidator: async (data) => await zGetTranslationTagsResponse2.parseAsync(data),
|
|
123
|
-
url: '/api/translation/tags',
|
|
124
|
-
...options,
|
|
125
|
-
});
|
|
126
|
-
export const updateTranslationTags = (options) => (options.client ?? client).patch({
|
|
127
|
-
responseValidator: async (data) => await zUpdateTranslationTagsResponse2.parseAsync(data),
|
|
128
|
-
url: '/api/translation/tags',
|
|
129
|
-
...options,
|
|
130
|
-
headers: {
|
|
131
|
-
'Content-Type': 'application/json',
|
|
132
|
-
...options.headers,
|
|
133
|
-
},
|
|
134
|
-
});
|
|
135
|
-
export const exportTranslations = (options) => (options.client ?? client).get({
|
|
136
|
-
responseValidator: async (data) => await zExportTranslationsResponse.parseAsync(data),
|
|
137
|
-
url: '/api/translations/export',
|
|
138
|
-
...options,
|
|
139
|
-
});
|
|
140
|
-
export const deleteLocale = (options) => (options.client ?? client).delete({
|
|
141
|
-
responseValidator: async (data) => await zDeleteLocaleResponse.parseAsync(data),
|
|
142
|
-
url: '/api/translations/locales',
|
|
143
|
-
...options,
|
|
144
|
-
});
|
|
145
|
-
export const getLocales = (options) => (options.client ?? client).get({
|
|
146
|
-
responseValidator: async (data) => await zGetLocalesResponse.parseAsync(data),
|
|
147
|
-
url: '/api/translations/locales',
|
|
148
|
-
...options,
|
|
149
|
-
});
|
|
150
|
-
export const addLocale = (options) => (options.client ?? client).post({
|
|
151
|
-
responseValidator: async (data) => await zAddLocaleResponse.parseAsync(data),
|
|
152
|
-
url: '/api/translations/locales',
|
|
153
|
-
...options,
|
|
154
|
-
headers: {
|
|
155
|
-
'Content-Type': 'application/json',
|
|
156
|
-
...options.headers,
|
|
157
|
-
},
|
|
158
|
-
});
|
|
159
|
-
export const updateReferenceLocale = (options) => (options.client ?? client).put({
|
|
160
|
-
responseValidator: async (data) => await zUpdateReferenceLocaleResponse.parseAsync(data),
|
|
161
|
-
url: '/api/translations/locales',
|
|
162
|
-
...options,
|
|
163
|
-
headers: {
|
|
164
|
-
'Content-Type': 'application/json',
|
|
165
|
-
...options.headers,
|
|
166
|
-
},
|
|
167
|
-
});
|
|
168
|
-
export const deleteTranslations = (options) => (options.client ?? client).delete({
|
|
169
|
-
responseValidator: async (data) => await zDeleteTranslationsResponse.parseAsync(data),
|
|
170
|
-
url: '/api/translations',
|
|
171
|
-
...options,
|
|
172
|
-
headers: {
|
|
173
|
-
'Content-Type': 'application/json',
|
|
174
|
-
...options.headers,
|
|
175
|
-
},
|
|
176
|
-
});
|
|
177
|
-
export const getTranslations = (options) => (options.client ?? client).get({
|
|
178
|
-
responseValidator: async (data) => await zGetTranslationsResponse2.parseAsync(data),
|
|
179
|
-
url: '/api/translations',
|
|
180
|
-
...options,
|
|
181
|
-
});
|
|
182
|
-
export const updateTranslations = (options) => (options.client ?? client).post({
|
|
183
|
-
responseValidator: async (data) => await zUpdateTranslationsResponse.parseAsync(data),
|
|
184
|
-
url: '/api/translations',
|
|
185
|
-
...options,
|
|
186
|
-
headers: {
|
|
187
|
-
'Content-Type': 'application/json',
|
|
188
|
-
...options.headers,
|
|
189
|
-
},
|
|
190
|
-
});
|