@lokalise/glossary-api-contracts 0.4.0 → 0.6.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.
@@ -45,7 +45,6 @@ export declare const TERM_SCHEMA: z.ZodObject<{
45
45
  }>;
46
46
  description: z.ZodNullable<z.ZodString>;
47
47
  authorId: z.ZodNullable<z.ZodUUID>;
48
- tags: z.ZodArray<z.ZodString>;
49
48
  attributes: z.ZodObject<{
50
49
  partOfSpeech: z.ZodOptional<z.ZodString>;
51
50
  gender: z.ZodOptional<z.ZodString>;
@@ -56,6 +55,7 @@ export declare const TERM_SCHEMA: z.ZodObject<{
56
55
  export type Term = z.infer<typeof TERM_SCHEMA>;
57
56
  export declare const CONCEPT_SCHEMA: z.ZodObject<{
58
57
  id: z.ZodUUID;
58
+ tags: z.ZodArray<z.ZodString>;
59
59
  terms: z.ZodArray<z.ZodObject<{
60
60
  id: z.ZodUUID;
61
61
  locale: z.ZodString;
@@ -72,7 +72,6 @@ export declare const CONCEPT_SCHEMA: z.ZodObject<{
72
72
  }>;
73
73
  description: z.ZodNullable<z.ZodString>;
74
74
  authorId: z.ZodNullable<z.ZodUUID>;
75
- tags: z.ZodArray<z.ZodString>;
76
75
  attributes: z.ZodObject<{
77
76
  partOfSpeech: z.ZodOptional<z.ZodString>;
78
77
  gender: z.ZodOptional<z.ZodString>;
@@ -43,11 +43,13 @@ export const TERM_SCHEMA = z.object({
43
43
  status: z.enum(TermStatusEnum).describe('Status of the term'),
44
44
  description: z.string().nullable().describe('Description of the term'),
45
45
  authorId: TERM_AUTHOR_ID_SCHEMA.nullable().describe('UUID of the user who wrote the term'),
46
- tags: z.array(z.string().min(1).max(MAX_TAG_LENGTH)).describe('Tags of the term'),
47
46
  attributes: TERM_ATTRIBUTES_SCHEMA,
48
47
  });
49
48
  export const CONCEPT_SCHEMA = z.object({
50
49
  id: CONCEPT_ID_SCHEMA,
50
+ tags: z
51
+ .array(z.string().min(1).max(MAX_TAG_LENGTH))
52
+ .describe('Tags of the concept in byte order. Each tag applies to every term of the concept'),
51
53
  terms: z
52
54
  .array(TERM_SCHEMA)
53
55
  .describe('Terms of the concept by locale in byte order, and in the order of creation within a locale'),
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/api/contracts/concepts/common.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,QAAQ,CAAA;AAEtB,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,gBAAgB,EAAE,kBAAkB;CAC5B,CAAA;AAGV,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,cAAc;CACpB,CAAA;AAGV,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAA;AAE1C,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;AAEjC,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAA;AAEvC,2FAA2F;AAC3F,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAA;AAEnC,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAAA;AAE7C,6FAA6F;AAC7F,iGAAiG;AACjG,iGAAiG;AACjG,MAAM,sBAAsB,GAAG,CAAC;KAC7B,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,0BAA0B,CAAC;KAC/B,KAAK,CAAC,2BAA2B,CAAC,CAAA;AAErC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC;KACpC,YAAY,CAAC;IACZ,YAAY,EAAE,sBAAsB,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;IACtF,MAAM,EAAE,sBAAsB,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IACpF,OAAO,EAAE,sBAAsB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G,CAAC,CAAC,MAAM,CAAC;IACrC,EAAE,EAAE,iBAAiB;IACrB,IAAI,EAAE,CAAC;SACJ,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;SAC5C,QAAQ,CAAC,kFAAkF,CAAC;IAC/F,KAAK,EAAE,CAAC;SACL,KAAK,CAAC,WAAW,CAAC;SAClB,QAAQ,CACP,4FAA4F,CAC7F;CACJ,CAAC,CAAA"}
@@ -10,6 +10,7 @@ export type ListConceptsRequestQuery = z.input<typeof LIST_CONCEPTS_REQUEST_QUER
10
10
  declare const LIST_CONCEPTS_RESPONSE_BODY_SCHEMA: z.ZodObject<{
11
11
  data: z.ZodArray<z.ZodObject<{
12
12
  id: z.ZodUUID;
13
+ tags: z.ZodArray<z.ZodString>;
13
14
  terms: z.ZodArray<z.ZodObject<{
14
15
  id: z.ZodUUID;
15
16
  locale: z.ZodString;
@@ -26,7 +27,6 @@ declare const LIST_CONCEPTS_RESPONSE_BODY_SCHEMA: z.ZodObject<{
26
27
  }>;
27
28
  description: z.ZodNullable<z.ZodString>;
28
29
  authorId: z.ZodNullable<z.ZodUUID>;
29
- tags: z.ZodArray<z.ZodString>;
30
30
  attributes: z.ZodObject<{
31
31
  partOfSpeech: z.ZodOptional<z.ZodString>;
32
32
  gender: z.ZodOptional<z.ZodString>;
@@ -74,6 +74,7 @@ export declare const listConceptsContract: Omit<{
74
74
  readonly 200: z.ZodObject<{
75
75
  data: z.ZodArray<z.ZodObject<{
76
76
  id: z.ZodUUID;
77
+ tags: z.ZodArray<z.ZodString>;
77
78
  terms: z.ZodArray<z.ZodObject<{
78
79
  id: z.ZodUUID;
79
80
  locale: z.ZodString;
@@ -90,7 +91,6 @@ export declare const listConceptsContract: Omit<{
90
91
  }>;
91
92
  description: z.ZodNullable<z.ZodString>;
92
93
  authorId: z.ZodNullable<z.ZodUUID>;
93
- tags: z.ZodArray<z.ZodString>;
94
94
  attributes: z.ZodObject<{
95
95
  partOfSpeech: z.ZodOptional<z.ZodString>;
96
96
  gender: z.ZodOptional<z.ZodString>;
@@ -7,5 +7,7 @@ export declare const GLOSSARY_SCHEMA: z.ZodObject<{
7
7
  id: z.ZodUUID;
8
8
  name: z.ZodString;
9
9
  createdAt: z.ZodISODateTime;
10
+ conceptCount: z.ZodNumber;
11
+ termCount: z.ZodNumber;
10
12
  }, z.core.$strip>;
11
13
  export type Glossary = z.infer<typeof GLOSSARY_SCHEMA>;
@@ -13,5 +13,11 @@ export const GLOSSARY_SCHEMA = z.object({
13
13
  id: GLOSSARY_ID_SCHEMA,
14
14
  name: z.string().describe('Name of the glossary'),
15
15
  createdAt: z.iso.datetime().describe('Time when the service created the glossary'),
16
+ conceptCount: z.number().int().min(0).describe('Number of concepts of the glossary'),
17
+ termCount: z
18
+ .number()
19
+ .int()
20
+ .min(0)
21
+ .describe('Number of terms of the glossary, of every kind and every status'),
16
22
  });
17
23
  //# sourceMappingURL=common.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/api/contracts/glossaries/common.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,QAAQ,CAAA;AAEtB,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAA;AAE3C,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,wBAAwB,CAAC;KAC7B,KAAK,CAAC,oBAAoB,EAAE,gDAAgD,CAAC;IAC9E,6DAA6D;KAC5D,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,8CAA8C,CAAC;KAC1F,QAAQ,CACP,uLAAuL,CACxL,CAAA;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAA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CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,oCAAoC,CAAC;IACpF,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,iEAAiE,CAAC;CAC/E,CAAC,CAAA"}
@@ -7,6 +7,8 @@ declare const CREATE_GLOSSARY_RESPONSE_BODY_SCHEMA: z.ZodObject<{
7
7
  id: z.ZodUUID;
8
8
  name: z.ZodString;
9
9
  createdAt: z.ZodISODateTime;
10
+ conceptCount: z.ZodNumber;
11
+ termCount: z.ZodNumber;
10
12
  }, z.core.$strip>;
11
13
  export type CreateGlossaryResponseBody = z.infer<typeof CREATE_GLOSSARY_RESPONSE_BODY_SCHEMA>;
12
14
  export declare const createGlossaryContract: Omit<{
@@ -37,6 +39,8 @@ export declare const createGlossaryContract: Omit<{
37
39
  id: z.ZodUUID;
38
40
  name: z.ZodString;
39
41
  createdAt: z.ZodISODateTime;
42
+ conceptCount: z.ZodNumber;
43
+ termCount: z.ZodNumber;
40
44
  }, z.core.$strip>;
41
45
  readonly '5xx': z.ZodObject<{
42
46
  message: z.ZodString;
@@ -3,6 +3,8 @@ declare const GET_GLOSSARY_RESPONSE_BODY_SCHEMA: z.ZodObject<{
3
3
  id: z.ZodUUID;
4
4
  name: z.ZodString;
5
5
  createdAt: z.ZodISODateTime;
6
+ conceptCount: z.ZodNumber;
7
+ termCount: z.ZodNumber;
6
8
  }, z.core.$strip>;
7
9
  export type GetGlossaryResponseBody = z.infer<typeof GET_GLOSSARY_RESPONSE_BODY_SCHEMA>;
8
10
  export declare const getGlossaryContract: Omit<{
@@ -32,6 +34,8 @@ export declare const getGlossaryContract: Omit<{
32
34
  id: z.ZodUUID;
33
35
  name: z.ZodString;
34
36
  createdAt: z.ZodISODateTime;
37
+ conceptCount: z.ZodNumber;
38
+ termCount: z.ZodNumber;
35
39
  }, z.core.$strip>;
36
40
  readonly '5xx': z.ZodObject<{
37
41
  message: z.ZodString;
@@ -12,6 +12,8 @@ declare const LIST_GLOSSARIES_RESPONSE_BODY_SCHEMA: z.ZodObject<{
12
12
  id: z.ZodUUID;
13
13
  name: z.ZodString;
14
14
  createdAt: z.ZodISODateTime;
15
+ conceptCount: z.ZodNumber;
16
+ termCount: z.ZodNumber;
15
17
  }, z.core.$strip>>;
16
18
  meta: z.ZodObject<{
17
19
  count: z.ZodNumber;
@@ -52,6 +54,8 @@ export declare const listGlossariesContract: Omit<{
52
54
  id: z.ZodUUID;
53
55
  name: z.ZodString;
54
56
  createdAt: z.ZodISODateTime;
57
+ conceptCount: z.ZodNumber;
58
+ termCount: z.ZodNumber;
55
59
  }, z.core.$strip>>;
56
60
  meta: z.ZodObject<{
57
61
  count: z.ZodNumber;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/glossary-api-contracts",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "API contracts of the Glossary service",
5
5
  "repository": {
6
6
  "type": "git",