@lokalise/glossary-api-contracts 0.1.0 → 0.3.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.
@@ -12,7 +12,7 @@ export type ConfirmImportUploadCompletionResponseBody = z.infer<typeof CONFIRM_I
12
12
  export declare const confirmImportUploadCompletionContract: Omit<{
13
13
  readonly method: "post";
14
14
  readonly summary: "Import an uploaded file into a glossary";
15
- readonly description: "Imports the file of an upload form into the glossary, after the client posted the file to the storage. The import turns each row of the CSV file that Expert exports into a concept with its terms. A failed import stores no terms. The import consumes the upload, so a second confirmation of the same upload gets 400. After a 503, the client starts again with a new upload form, because the service might have consumed the upload already.";
15
+ readonly description: "Imports the file of an upload form into the glossary, after the client posted the file to the storage. The import turns each row of the CSV file that Expert exports into a concept with its terms. A failed import does not store any term. The import consumes the upload, so a second confirmation of the same upload gets 400. While another import into the glossary runs, the confirmation gets 409 and keeps the upload. The import has a time limit of 30 seconds. An import that reaches the limit before its commit stops and gets 503, and an import whose commit ends after the limit gets 200. When the client closes the connection before the import commits, the import stops, and the service ends the request with 400. After a 503, the client starts again with a new upload form, because the service might have consumed the upload already.";
16
16
  readonly tags: readonly ["Glossaries"];
17
17
  readonly visibility: "internal";
18
18
  readonly requestPathParamsSchema: z.ZodObject<{
@@ -47,6 +47,10 @@ export declare const confirmImportUploadCompletionContract: Omit<{
47
47
  message: z.ZodString;
48
48
  code: z.ZodLiteral<"IMPORT_FILE_NOT_FOUND">;
49
49
  errorCode: z.ZodLiteral<"IMPORT_FILE_NOT_FOUND">;
50
+ }, z.core.$strip>, z.ZodObject<{
51
+ message: z.ZodString;
52
+ code: z.ZodLiteral<"IMPORT_CANCELLED">;
53
+ errorCode: z.ZodLiteral<"IMPORT_CANCELLED">;
50
54
  }, z.core.$strip>, z.ZodObject<{
51
55
  message: z.ZodString;
52
56
  errorCode: z.ZodString;
@@ -93,14 +97,31 @@ export declare const confirmImportUploadCompletionContract: Omit<{
93
97
  code: "GLOSSARY_NOT_FOUND";
94
98
  errorCode: "GLOSSARY_NOT_FOUND";
95
99
  }, unknown>>;
100
+ readonly 409: z.ZodType<{
101
+ message: string;
102
+ code: "IMPORT_ALREADY_RUNNING";
103
+ errorCode: "IMPORT_ALREADY_RUNNING";
104
+ }, unknown, z.core.$ZodTypeInternals<{
105
+ message: string;
106
+ code: "IMPORT_ALREADY_RUNNING";
107
+ errorCode: "IMPORT_ALREADY_RUNNING";
108
+ }, unknown>>;
96
109
  readonly 503: z.ZodType<{
97
110
  message: string;
98
111
  code: "FILE_STORAGE_UNAVAILABLE";
99
112
  errorCode: "FILE_STORAGE_UNAVAILABLE";
113
+ } | {
114
+ message: string;
115
+ code: "IMPORT_TIME_LIMIT_REACHED";
116
+ errorCode: "IMPORT_TIME_LIMIT_REACHED";
100
117
  }, unknown, z.core.$ZodTypeInternals<{
101
118
  message: string;
102
119
  code: "FILE_STORAGE_UNAVAILABLE";
103
120
  errorCode: "FILE_STORAGE_UNAVAILABLE";
121
+ } | {
122
+ message: string;
123
+ code: "IMPORT_TIME_LIMIT_REACHED";
124
+ errorCode: "IMPORT_TIME_LIMIT_REACHED";
104
125
  }, unknown>>;
105
126
  };
106
127
  readonly metadata: {
@@ -2,7 +2,7 @@ import { defineApiContract } from '@lokalise/api-contracts';
2
2
  import { mergeErrorSchemasByStatusCode } from '@lokalise/errors';
3
3
  import z from 'zod/v4';
4
4
  import { EXPERT_ADMIN_ROLES } from '../../auth.js';
5
- import { FILE_STORAGE_UNAVAILABLE_ERROR_DEFINITION, GLOSSARY_NOT_FOUND_ERROR_DEFINITION, IMPORT_FILE_NOT_FOUND_ERROR_DEFINITION, INVALID_IMPORT_FILE_ERROR_DEFINITION, INVALID_SOURCE_LOCALE_ERROR_DEFINITION, } from '../../errors/index.js';
5
+ import { FILE_STORAGE_UNAVAILABLE_ERROR_DEFINITION, GLOSSARY_NOT_FOUND_ERROR_DEFINITION, IMPORT_ALREADY_RUNNING_ERROR_DEFINITION, IMPORT_CANCELLED_ERROR_DEFINITION, IMPORT_FILE_NOT_FOUND_ERROR_DEFINITION, IMPORT_TIME_LIMIT_REACHED_ERROR_DEFINITION, INVALID_IMPORT_FILE_ERROR_DEFINITION, INVALID_SOURCE_LOCALE_ERROR_DEFINITION, } from '../../errors/index.js';
6
6
  import { OpenApiTags } from '../../open-api-tags.js';
7
7
  import { AUTH_ERROR_RESPONSES, AUTH_HEADERS, INTERNAL_SERVER_ERROR_RESPONSE_SCHEMA, TEAM_ID_SCHEMA, VALIDATION_ERROR_RESPONSE_SCHEMA, } from '../common.js';
8
8
  import { MAX_LOCALE_LENGTH } from '../concepts/common.js';
@@ -35,7 +35,7 @@ const CONFIRM_IMPORT_UPLOAD_COMPLETION_RESPONSE_BODY_SCHEMA = z.compile(z.object
35
35
  export const confirmImportUploadCompletionContract = defineApiContract({
36
36
  method: 'post',
37
37
  summary: 'Import an uploaded file into a glossary',
38
- description: 'Imports the file of an upload form into the glossary, after the client posted the file to the storage. The import turns each row of the CSV file that Expert exports into a concept with its terms. A failed import stores no terms. The import consumes the upload, so a second confirmation of the same upload gets 400. After a 503, the client starts again with a new upload form, because the service might have consumed the upload already.',
38
+ description: 'Imports the file of an upload form into the glossary, after the client posted the file to the storage. The import turns each row of the CSV file that Expert exports into a concept with its terms. A failed import does not store any term. The import consumes the upload, so a second confirmation of the same upload gets 400. While another import into the glossary runs, the confirmation gets 409 and keeps the upload. The import has a time limit of 30 seconds. An import that reaches the limit before its commit stops and gets 503, and an import whose commit ends after the limit gets 200. When the client closes the connection before the import commits, the import stops, and the service ends the request with 400. After a 503, the client starts again with a new upload form, because the service might have consumed the upload already.',
39
39
  tags: [OpenApiTags.Glossaries.name],
40
40
  visibility: 'internal',
41
41
  requestPathParamsSchema: CONFIRM_IMPORT_UPLOAD_COMPLETION_REQUEST_PARAMS_SCHEMA,
@@ -52,11 +52,14 @@ export const confirmImportUploadCompletionContract = defineApiContract({
52
52
  INVALID_IMPORT_FILE_ERROR_DEFINITION.schema,
53
53
  INVALID_SOURCE_LOCALE_ERROR_DEFINITION.schema,
54
54
  IMPORT_FILE_NOT_FOUND_ERROR_DEFINITION.schema,
55
+ IMPORT_CANCELLED_ERROR_DEFINITION.schema,
55
56
  VALIDATION_ERROR_RESPONSE_SCHEMA,
56
57
  ]),
57
58
  ...mergeErrorSchemasByStatusCode([
58
59
  GLOSSARY_NOT_FOUND_ERROR_DEFINITION,
60
+ IMPORT_ALREADY_RUNNING_ERROR_DEFINITION,
59
61
  FILE_STORAGE_UNAVAILABLE_ERROR_DEFINITION,
62
+ IMPORT_TIME_LIMIT_REACHED_ERROR_DEFINITION,
60
63
  ]),
61
64
  '5xx': INTERNAL_SERVER_ERROR_RESPONSE_SCHEMA,
62
65
  },
@@ -1 +1 @@
1
- {"version":3,"file":"confirm-import-upload-completion.js","sourceRoot":"","sources":["../../../../src/api/contracts/glossaries/confirm-import-upload-completion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAA;AAChE,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EAAE,kBAAkB,EAAoC,MAAM,eAAe,CAAA;AACpF,OAAO,EACL,yCAAyC,EACzC,mCAAmC,EACnC,sCAAsC,EACtC,oCAAoC,EACpC,sCAAsC,GACvC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,qCAAqC,EACrC,cAAc,EACd,gCAAgC,GACjC,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAEhD,yFAAyF;AACzF,MAAM,sDAAsD,GAAG,CAAC,CAAC,OAAO,CACtE,CAAC,CAAC,MAAM,CAAC;IACP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AC,KAAK,CAAC;YACX,oCAAoC,CAAC,MAAM;YAC3C,sCAAsC,CAAC,MAAM;YAC7C,sCAAsC,CAAC,MAAM;YAC7C,gCAAgC;SACjC,CAAC;QACF,GAAG,6BAA6B,CAAC;YAC/B,mCAAmC;YACnC,yCAAyC;SAC1C,CAAC;QACF,KAAK,EAAE,qCAAqC;KAC7C;IACD,QAAQ,EAAE;QACR,sBAAsB,EAAE,kBAAkB;KACL;CACxC,CAAC,CAAA"}
1
+ {"version":3,"file":"confirm-import-upload-completion.js","sourceRoot":"","sources":["../../../../src/api/contracts/glossaries/confirm-import-upload-completion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAA;AAChE,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EAAE,kBAAkB,EAAoC,MAAM,eAAe,CAAA;AACpF,OAAO,EACL,yCAAyC,EACzC,mCAAmC,EACnC,uCAAuC,EACvC,iCAAiC,EACjC,sCAAsC,EACtC,0CAA0C,EAC1C,oCAAoC,EACpC,sCAAsC,GACvC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,qCAAqC,EACrC,cAAc,EACd,gCAAgC,GACjC,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAEhD,yFAAyF;AACzF,MAAM,sDAAsD,GAAG,CAAC,CAAC,OAAO,CACtE,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,cAAc;IACtB,UAAU,EAAE,kBAAkB;CAC/B,CAAC,CACH,CAAA;AAED,MAAM,oDAAoD,GAAG,CAAC,CAAC,OAAO,CACpE,CAAC,CAAC,MA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gCAAgC;SACjC,CAAC;QACF,GAAG,6BAA6B,CAAC;YAC/B,mCAAmC;YACnC,uCAAuC;YACvC,yCAAyC;YACzC,0CAA0C;SAC3C,CAAC;QACF,KAAK,EAAE,qCAAqC;KAC7C;IACD,QAAQ,EAAE;QACR,sBAAsB,EAAE,kBAAkB;KACL;CACxC,CAAC,CAAA"}
@@ -17,7 +17,7 @@ export type CreateImportUploadFormResponseBody = z.infer<typeof CREATE_IMPORT_UP
17
17
  export declare const createImportUploadFormContract: Omit<{
18
18
  readonly method: "post";
19
19
  readonly summary: "Create an upload form for the import of a file";
20
- readonly description: "Returns a form that uploads an import file to the file storage service. The supported format is the CSV file that Expert exports. The client posts the form to `formData.url` with the `fields` first, then a `Content-Type` field with any value, and the file in the `file` field last. The form is valid for 5 minutes, and the storage accepts only a file with the size and the MD5 hash of the request.";
20
+ readonly description: "Returns a form that uploads an import file to the file storage service. The supported format is the CSV file that Expert exports. The client posts the form to `formData.url` with the `fields` first, then a `Content-Type` field with any value, and the file in the `file` field last. The form is valid for 5 minutes, and the storage accepts only a file with the size and the MD5 hash of the request. While an import into the glossary runs, the request gets 409.";
21
21
  readonly tags: readonly ["Glossaries"];
22
22
  readonly visibility: "internal";
23
23
  readonly requestPathParamsSchema: z.ZodObject<{
@@ -90,6 +90,15 @@ export declare const createImportUploadFormContract: Omit<{
90
90
  code: "GLOSSARY_NOT_FOUND";
91
91
  errorCode: "GLOSSARY_NOT_FOUND";
92
92
  }, unknown>>;
93
+ readonly 409: z.ZodType<{
94
+ message: string;
95
+ code: "IMPORT_ALREADY_RUNNING";
96
+ errorCode: "IMPORT_ALREADY_RUNNING";
97
+ }, unknown, z.core.$ZodTypeInternals<{
98
+ message: string;
99
+ code: "IMPORT_ALREADY_RUNNING";
100
+ errorCode: "IMPORT_ALREADY_RUNNING";
101
+ }, unknown>>;
93
102
  readonly 503: z.ZodType<{
94
103
  message: string;
95
104
  code: "FILE_STORAGE_UNAVAILABLE";
@@ -2,7 +2,7 @@ import { defineApiContract } from '@lokalise/api-contracts';
2
2
  import { mergeErrorSchemasByStatusCode } from '@lokalise/errors';
3
3
  import z from 'zod/v4';
4
4
  import { EXPERT_ADMIN_ROLES } from '../../auth.js';
5
- import { FILE_STORAGE_UNAVAILABLE_ERROR_DEFINITION, GLOSSARY_NOT_FOUND_ERROR_DEFINITION, } from '../../errors/index.js';
5
+ import { FILE_STORAGE_UNAVAILABLE_ERROR_DEFINITION, GLOSSARY_NOT_FOUND_ERROR_DEFINITION, IMPORT_ALREADY_RUNNING_ERROR_DEFINITION, } from '../../errors/index.js';
6
6
  import { OpenApiTags } from '../../open-api-tags.js';
7
7
  import { AUTH_ERROR_RESPONSES, AUTH_HEADERS, INTERNAL_SERVER_ERROR_RESPONSE_SCHEMA, TEAM_ID_SCHEMA, } from '../common.js';
8
8
  import { GLOSSARY_ID_SCHEMA } from './common.js';
@@ -33,7 +33,7 @@ const CREATE_IMPORT_UPLOAD_FORM_RESPONSE_BODY_SCHEMA = z.compile(z.object({
33
33
  export const createImportUploadFormContract = defineApiContract({
34
34
  method: 'post',
35
35
  summary: 'Create an upload form for the import of a file',
36
- description: 'Returns a form that uploads an import file to the file storage service. The supported format is the CSV file that Expert exports. The client posts the form to `formData.url` with the `fields` first, then a `Content-Type` field with any value, and the file in the `file` field last. The form is valid for 5 minutes, and the storage accepts only a file with the size and the MD5 hash of the request.',
36
+ description: 'Returns a form that uploads an import file to the file storage service. The supported format is the CSV file that Expert exports. The client posts the form to `formData.url` with the `fields` first, then a `Content-Type` field with any value, and the file in the `file` field last. The form is valid for 5 minutes, and the storage accepts only a file with the size and the MD5 hash of the request. While an import into the glossary runs, the request gets 409.',
37
37
  tags: [OpenApiTags.Glossaries.name],
38
38
  visibility: 'internal',
39
39
  requestPathParamsSchema: CREATE_IMPORT_UPLOAD_FORM_REQUEST_PARAMS_SCHEMA,
@@ -45,6 +45,7 @@ export const createImportUploadFormContract = defineApiContract({
45
45
  ...AUTH_ERROR_RESPONSES,
46
46
  ...mergeErrorSchemasByStatusCode([
47
47
  GLOSSARY_NOT_FOUND_ERROR_DEFINITION,
48
+ IMPORT_ALREADY_RUNNING_ERROR_DEFINITION,
48
49
  FILE_STORAGE_UNAVAILABLE_ERROR_DEFINITION,
49
50
  ]),
50
51
  '5xx': INTERNAL_SERVER_ERROR_RESPONSE_SCHEMA,
@@ -1 +1 @@
1
- {"version":3,"file":"create-import-upload-form.js","sourceRoot":"","sources":["../../../../src/api/contracts/glossaries/create-import-upload-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAA;AAChE,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EAAE,kBAAkB,EAAoC,MAAM,eAAe,CAAA;AACpF,OAAO,EACL,yCAAyC,EACzC,mCAAmC,GACpC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,qCAAqC,EACrC,cAAc,GACf,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAEhD,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAA;AAErD,MAAM,2BAA2B,GAAG,GAAG,CAAA;AAEvC,kFAAkF;AAClF,MAAM,+CAA+C,GAAG,CAAC,CAAC,OAAO,CAC/D,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,cAAc;IACtB,UAAU,EAAE,kBAAkB;CAC/B,CAAC,CACH,CAAA;AAED,MAAM,6CAA6C,GAAG,CAAC,CAAC,OAAO,CAC7D,CAAC,CAAC,MAAM,CAAC;IACP,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,2BAA2B,CAAC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D,GAAG,oBAAoB;QACvB,GAAG,6BAA6B,CAAC;YAC/B,mCAAmC;YACnC,yCAAyC;SAC1C,CAAC;QACF,KAAK,EAAE,qCAAqC;KAC7C;IACD,QAAQ,EAAE;QACR,sBAAsB,EAAE,kBAAkB;KACL;CACxC,CAAC,CAAA"}
1
+ {"version":3,"file":"create-import-upload-form.js","sourceRoot":"","sources":["../../../../src/api/contracts/glossaries/create-import-upload-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAA;AAChE,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EAAE,kBAAkB,EAAoC,MAAM,eAAe,CAAA;AACpF,OAAO,EACL,yCAAyC,EACzC,mCAAmC,EACnC,uCAAuC,GACxC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,qCAAqC,EACrC,cAAc,GACf,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAEhD,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAA;AAErD,MAAM,2BAA2B,GAAG,GAAG,CAAA;AAEvC,kFAAkF;AAClF,MAAM,+CAA+C,GAAG,CAAC,CAAC,OAAO,CAC/D,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,cAAc;IACtB,UAAU,EAAE,kBAAkB;CAC/B,CAAC,CACH,CAAA;AAED,MAAM,6CAA6C,GAAG,CAAC,CAAC,OAAO,CAC7D,CAAC,CAAC,MAAM,CAAC;IACP,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC,QAAQ,CAAC,kBA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AG,6BAA6B,CAAC;YAC/B,mCAAmC;YACnC,uCAAuC;YACvC,yCAAyC;SAC1C,CAAC;QACF,KAAK,EAAE,qCAAqC;KAC7C;IACD,QAAQ,EAAE;QACR,sBAAsB,EAAE,kBAAkB;KACL;CACxC,CAAC,CAAA"}
@@ -48,3 +48,33 @@ export declare const IMPORT_FILE_NOT_FOUND_ERROR_DEFINITION: {
48
48
  errorCode: import("zod").ZodLiteral<"IMPORT_FILE_NOT_FOUND">;
49
49
  }, import("zod/v4/core").$strip>;
50
50
  };
51
+ export declare const IMPORT_TIME_LIMIT_REACHED_ERROR_DEFINITION: {
52
+ readonly code: "IMPORT_TIME_LIMIT_REACHED";
53
+ readonly type: "unavailable";
54
+ } & {
55
+ schema: import("zod").ZodObject<{
56
+ message: import("zod").ZodString;
57
+ code: import("zod").ZodLiteral<"IMPORT_TIME_LIMIT_REACHED">;
58
+ errorCode: import("zod").ZodLiteral<"IMPORT_TIME_LIMIT_REACHED">;
59
+ }, import("zod/v4/core").$strip>;
60
+ };
61
+ export declare const IMPORT_CANCELLED_ERROR_DEFINITION: {
62
+ readonly code: "IMPORT_CANCELLED";
63
+ readonly type: "bad-request";
64
+ } & {
65
+ schema: import("zod").ZodObject<{
66
+ message: import("zod").ZodString;
67
+ code: import("zod").ZodLiteral<"IMPORT_CANCELLED">;
68
+ errorCode: import("zod").ZodLiteral<"IMPORT_CANCELLED">;
69
+ }, import("zod/v4/core").$strip>;
70
+ };
71
+ export declare const IMPORT_ALREADY_RUNNING_ERROR_DEFINITION: {
72
+ readonly code: "IMPORT_ALREADY_RUNNING";
73
+ readonly type: "conflict";
74
+ } & {
75
+ schema: import("zod").ZodObject<{
76
+ message: import("zod").ZodString;
77
+ code: import("zod").ZodLiteral<"IMPORT_ALREADY_RUNNING">;
78
+ errorCode: import("zod").ZodLiteral<"IMPORT_ALREADY_RUNNING">;
79
+ }, import("zod/v4/core").$strip>;
80
+ };
@@ -20,4 +20,16 @@ export const IMPORT_FILE_NOT_FOUND_ERROR_DEFINITION = definePublicError({
20
20
  code: 'IMPORT_FILE_NOT_FOUND',
21
21
  type: ErrorType.BAD_REQUEST,
22
22
  });
23
+ export const IMPORT_TIME_LIMIT_REACHED_ERROR_DEFINITION = definePublicError({
24
+ code: 'IMPORT_TIME_LIMIT_REACHED',
25
+ type: ErrorType.UNAVAILABLE,
26
+ });
27
+ export const IMPORT_CANCELLED_ERROR_DEFINITION = definePublicError({
28
+ code: 'IMPORT_CANCELLED',
29
+ type: ErrorType.BAD_REQUEST,
30
+ });
31
+ export const IMPORT_ALREADY_RUNNING_ERROR_DEFINITION = definePublicError({
32
+ code: 'IMPORT_ALREADY_RUNNING',
33
+ type: ErrorType.CONFLICT,
34
+ });
23
35
  //# sourceMappingURL=glossaryErrors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"glossaryErrors.js","sourceRoot":"","sources":["../../../src/api/errors/glossaryErrors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAE/D,uFAAuF;AACvF,MAAM,CAAC,MAAM,oCAAoC,GAAG,iBAAiB,CAAC;IACpE,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,SAAS,CAAC,QAAQ;CACzB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,mCAAmC,GAAG,iBAAiB,CAAC;IACnE,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,SAAS,CAAC,SAAS;CAC1B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,oCAAoC,GAAG,iBAAiB,CAAC;IACpE,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,SAAS,CAAC,WAAW;CAC5B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,sCAAsC,GAAG,iBAAiB,CAAC;IACtE,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE,SAAS,CAAC,WAAW;CAC5B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,sCA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MAAM,CAAC,MAAM,uCAAuC,GAAG,iBAAiB,CAAC;IACvE,IAAI,EAAE,wBAAwB;IAC9B,IAAI,EAAE,SAAS,CAAC,QAAQ;CACzB,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/glossary-api-contracts",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "API contracts of the Glossary service",
5
5
  "repository": {
6
6
  "type": "git",