@ai-grator/api 0.1.32 → 0.1.34

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 (53) hide show
  1. package/ai-model/models/chat-price-scenarios.schema.ts +13 -0
  2. package/ai-model/models/index.ts +1 -0
  3. package/build/ai-model/models/chat-price-scenarios.schema.d.ts +13 -0
  4. package/build/ai-model/models/chat-price-scenarios.schema.d.ts.map +1 -0
  5. package/build/ai-model/models/chat-price-scenarios.schema.js +10 -0
  6. package/build/ai-model/models/index.d.ts +1 -0
  7. package/build/ai-model/models/index.d.ts.map +1 -1
  8. package/build/ai-model/models/index.js +1 -0
  9. package/build/errors/errors.d.ts +12 -0
  10. package/build/errors/errors.d.ts.map +1 -1
  11. package/build/errors/errors.js +12 -0
  12. package/build/generation-job/models/suno-params.schema.d.ts.map +1 -1
  13. package/build/generation-job/models/suno-params.schema.js +2 -1
  14. package/build/generation-model/endpoints/queries/get-generation-price.query.d.ts +1 -0
  15. package/build/generation-model/endpoints/queries/get-generation-price.query.d.ts.map +1 -1
  16. package/build/generation-model/endpoints/queries/get-generation-price.query.js +1 -0
  17. package/build/generation-model/models/index.d.ts +1 -0
  18. package/build/generation-model/models/index.d.ts.map +1 -1
  19. package/build/generation-model/models/index.js +1 -0
  20. package/build/generation-model/models/seo-price-scenarios.schema.d.ts +5 -0
  21. package/build/generation-model/models/seo-price-scenarios.schema.d.ts.map +1 -0
  22. package/build/generation-model/models/seo-price-scenarios.schema.js +6 -0
  23. package/build/model-catalog/enums/price-unit.enum.d.ts +2 -1
  24. package/build/model-catalog/enums/price-unit.enum.d.ts.map +1 -1
  25. package/build/model-catalog/enums/price-unit.enum.js +1 -0
  26. package/build/model-page/endpoints/queries/get-public-model-by-slug.query.d.ts +269 -6
  27. package/build/model-page/endpoints/queries/get-public-model-by-slug.query.d.ts.map +1 -1
  28. package/build/model-page/endpoints/queries/get-public-model-by-slug.query.js +1 -0
  29. package/build/model-page/models/index.d.ts +2 -0
  30. package/build/model-page/models/index.d.ts.map +1 -1
  31. package/build/model-page/models/index.js +2 -0
  32. package/build/model-page/models/page-card.schema.d.ts +8 -0
  33. package/build/model-page/models/page-card.schema.d.ts.map +1 -0
  34. package/build/model-page/models/page-card.schema.js +9 -0
  35. package/build/model-page/models/page-content.schema.d.ts +417 -0
  36. package/build/model-page/models/page-content.schema.d.ts.map +1 -0
  37. package/build/model-page/models/page-content.schema.js +148 -0
  38. package/build/model-page/models/public-model-detail.schema.d.ts +134 -16
  39. package/build/model-page/models/public-model-detail.schema.d.ts.map +1 -1
  40. package/build/model-page/models/public-model-detail.schema.js +6 -10
  41. package/build/tsconfig.tsbuildinfo +1 -1
  42. package/errors/errors.ts +12 -0
  43. package/generation-job/models/suno-params.schema.ts +2 -1
  44. package/generation-model/endpoints/queries/get-generation-price.query.ts +1 -0
  45. package/generation-model/models/index.ts +1 -0
  46. package/generation-model/models/seo-price-scenarios.schema.ts +10 -0
  47. package/model-catalog/enums/price-unit.enum.ts +1 -0
  48. package/model-page/endpoints/queries/get-public-model-by-slug.query.ts +1 -0
  49. package/model-page/models/index.ts +2 -0
  50. package/model-page/models/page-card.schema.ts +9 -0
  51. package/model-page/models/page-content.schema.ts +184 -0
  52. package/model-page/models/public-model-detail.schema.ts +5 -12
  53. package/package.json +1 -1
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+
3
+ export const CHAT_PRICE_SCENARIO_KEY = /^[a-z0-9_]+$/;
4
+
5
+ export const ChatPriceScenarioSchema = z.object({
6
+ inputTokens: z.number().int().nonnegative(),
7
+ outputTokens: z.number().int().nonnegative(),
8
+ });
9
+
10
+ export const ChatPriceScenariosSchema = z.record(z.string().regex(CHAT_PRICE_SCENARIO_KEY), ChatPriceScenarioSchema);
11
+
12
+ export type ChatPriceScenario = z.infer<typeof ChatPriceScenarioSchema>;
13
+ export type ChatPriceScenarios = z.infer<typeof ChatPriceScenariosSchema>;
@@ -1 +1,2 @@
1
1
  export * from './ai-model-response.schema';
2
+ export * from './chat-price-scenarios.schema';
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ export declare const CHAT_PRICE_SCENARIO_KEY: RegExp;
3
+ export declare const ChatPriceScenarioSchema: z.ZodObject<{
4
+ inputTokens: z.ZodNumber;
5
+ outputTokens: z.ZodNumber;
6
+ }, z.core.$strip>;
7
+ export declare const ChatPriceScenariosSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
8
+ inputTokens: z.ZodNumber;
9
+ outputTokens: z.ZodNumber;
10
+ }, z.core.$strip>>;
11
+ export type ChatPriceScenario = z.infer<typeof ChatPriceScenarioSchema>;
12
+ export type ChatPriceScenarios = z.infer<typeof ChatPriceScenariosSchema>;
13
+ //# sourceMappingURL=chat-price-scenarios.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-price-scenarios.schema.d.ts","sourceRoot":"","sources":["../../../ai-model/models/chat-price-scenarios.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,uBAAuB,QAAiB,CAAC;AAEtD,eAAO,MAAM,uBAAuB;;;iBAGlC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;kBAA+E,CAAC;AAErH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChatPriceScenariosSchema = exports.ChatPriceScenarioSchema = exports.CHAT_PRICE_SCENARIO_KEY = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.CHAT_PRICE_SCENARIO_KEY = /^[a-z0-9_]+$/;
6
+ exports.ChatPriceScenarioSchema = zod_1.z.object({
7
+ inputTokens: zod_1.z.number().int().nonnegative(),
8
+ outputTokens: zod_1.z.number().int().nonnegative(),
9
+ });
10
+ exports.ChatPriceScenariosSchema = zod_1.z.record(zod_1.z.string().regex(exports.CHAT_PRICE_SCENARIO_KEY), exports.ChatPriceScenarioSchema);
@@ -1,2 +1,3 @@
1
1
  export * from './ai-model-response.schema';
2
+ export * from './chat-price-scenarios.schema';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../ai-model/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../ai-model/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC"}
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./ai-model-response.schema"), exports);
18
+ __exportStar(require("./chat-price-scenarios.schema"), exports);
@@ -861,6 +861,18 @@ export declare const ERRORS: {
861
861
  readonly message: "Не удалось получить каталог моделей";
862
862
  };
863
863
  };
864
+ readonly MODEL_PAGE: {
865
+ readonly INVALID_CONTENT: {
866
+ readonly httpCode: 500;
867
+ readonly code: "MODEL_PAGE.INVALID_CONTENT";
868
+ readonly message: "Контент страницы модели не соответствует схеме";
869
+ };
870
+ readonly PRICE_UNAVAILABLE: {
871
+ readonly httpCode: 503;
872
+ readonly code: "MODEL_PAGE.PRICE_UNAVAILABLE";
873
+ readonly message: "Не удалось рассчитать цены для страницы модели";
874
+ };
875
+ };
864
876
  readonly USER_CONTEXT: {
865
877
  readonly FIND_ERROR: {
866
878
  readonly httpCode: 500;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA42BT,CAAC"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAw3BT,CAAC"}
@@ -864,6 +864,18 @@ exports.ERRORS = {
864
864
  message: 'Не удалось получить каталог моделей',
865
865
  },
866
866
  },
867
+ MODEL_PAGE: {
868
+ INVALID_CONTENT: {
869
+ httpCode: 500,
870
+ code: 'MODEL_PAGE.INVALID_CONTENT',
871
+ message: 'Контент страницы модели не соответствует схеме',
872
+ },
873
+ PRICE_UNAVAILABLE: {
874
+ httpCode: 503,
875
+ code: 'MODEL_PAGE.PRICE_UNAVAILABLE',
876
+ message: 'Не удалось рассчитать цены для страницы модели',
877
+ },
878
+ },
867
879
  USER_CONTEXT: {
868
880
  FIND_ERROR: {
869
881
  httpCode: 500,
@@ -1 +1 @@
1
- {"version":3,"file":"suno-params.schema.d.ts","sourceRoot":"","sources":["../../../generation-job/models/suno-params.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,qBAAqB;;;EAAqB,CAAC;AACxD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,sBAAsB;;;EAA6C,CAAC;AACjF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAMtE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyDvB,CAAC;AAEP,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
1
+ {"version":3,"file":"suno-params.schema.d.ts","sourceRoot":"","sources":["../../../generation-job/models/suno-params.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,qBAAqB;;;EAAqB,CAAC;AACxD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,sBAAsB;;;EAA6C,CAAC;AACjF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAOtE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyDvB,CAAC;AAEP,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -7,6 +7,7 @@ exports.SunoVocalGenderSchema = zod_1.z.enum(['m', 'f']);
7
7
  exports.SunoPersonaModelSchema = zod_1.z.enum(['style_persona', 'voice_persona']);
8
8
  // KIE/Suno docs don't state an explicit max for V5_5; capped conservatively above the
9
9
  // documented V4.5 ceiling (8 min) pending real limits/duration-aware pricing from product.
10
+ const MIN_DURATION_SECONDS = 30;
10
11
  const MAX_DURATION_SECONDS = 600;
11
12
  exports.SunoParamsSchema = zod_1.z
12
13
  .object({
@@ -16,7 +17,7 @@ exports.SunoParamsSchema = zod_1.z
16
17
  audioWeight: zod_1.z.number().min(0).max(1).multipleOf(0.05).default(0.65),
17
18
  title: zod_1.z.string().max(80).optional(),
18
19
  style: generation_model_1.MusicStyleSchema.optional(),
19
- duration: zod_1.z.number().positive().max(MAX_DURATION_SECONDS).default(120),
20
+ duration: zod_1.z.number().min(MIN_DURATION_SECONDS).max(MAX_DURATION_SECONDS).default(120),
20
21
  vocalGender: exports.SunoVocalGenderSchema.optional(),
21
22
  negativeTags: zod_1.z.string().max(500).optional(),
22
23
  styleWeight: zod_1.z.number().min(0).max(1).optional(),
@@ -25,6 +25,7 @@ export declare const GetGenerationPriceQuery: {
25
25
  200: z.ZodObject<{
26
26
  totalCost: z.ZodNumber;
27
27
  }, z.core.$strip>;
28
+ 400: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
28
29
  404: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
29
30
  500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
30
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":"get-generation-price.query.d.ts","sourceRoot":"","sources":["../../../../generation-model/endpoints/queries/get-generation-price.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAGzF,eAAO,MAAM,4BAA4B;;iBAEvC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;iBAEjC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;iBAErC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;CAalC,CAAC"}
1
+ {"version":3,"file":"get-generation-price.query.d.ts","sourceRoot":"","sources":["../../../../generation-model/endpoints/queries/get-generation-price.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAGzF,eAAO,MAAM,4BAA4B;;iBAEvC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;iBAEjC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;iBAErC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;CAclC,CAAC"}
@@ -23,6 +23,7 @@ exports.GetGenerationPriceQuery = (0, _common_1.defineContract)({
23
23
  },
24
24
  responses: {
25
25
  200: exports.GetGenerationPriceResponse,
26
+ 400: _common_1.HttpErrorResponseSchema,
26
27
  404: _common_1.HttpErrorResponseSchema,
27
28
  500: _common_1.HttpErrorResponseSchema,
28
29
  },
@@ -1,3 +1,4 @@
1
1
  export * from './generation-model-response.schema';
2
2
  export * from './pricing-policy.schema';
3
+ export * from './seo-price-scenarios.schema';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../generation-model/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../generation-model/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC"}
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./generation-model-response.schema"), exports);
18
18
  __exportStar(require("./pricing-policy.schema"), exports);
19
+ __exportStar(require("./seo-price-scenarios.schema"), exports);
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ export declare const SEO_PRICE_SCENARIO_KEY: RegExp;
3
+ export declare const SeoPriceScenariosSchema: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4
+ export type SeoPriceScenarios = z.infer<typeof SeoPriceScenariosSchema>;
5
+ //# sourceMappingURL=seo-price-scenarios.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seo-price-scenarios.schema.d.ts","sourceRoot":"","sources":["../../../generation-model/models/seo-price-scenarios.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB,QAAiB,CAAC;AAErD,eAAO,MAAM,uBAAuB,kEAGnC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SeoPriceScenariosSchema = exports.SEO_PRICE_SCENARIO_KEY = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.SEO_PRICE_SCENARIO_KEY = /^[a-z0-9_]+$/;
6
+ exports.SeoPriceScenariosSchema = zod_1.z.record(zod_1.z.string().regex(exports.SEO_PRICE_SCENARIO_KEY), zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()));
@@ -1,5 +1,6 @@
1
1
  export declare enum PRICE_UNIT {
2
2
  PER_MILLION_TOKENS = "per_million_tokens",
3
- PER_GENERATION = "per_generation"
3
+ PER_GENERATION = "per_generation",
4
+ PER_REQUEST = "per_request"
4
5
  }
5
6
  //# sourceMappingURL=price-unit.enum.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"price-unit.enum.d.ts","sourceRoot":"","sources":["../../../model-catalog/enums/price-unit.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IAClB,kBAAkB,uBAAuB;IACzC,cAAc,mBAAmB;CACpC"}
1
+ {"version":3,"file":"price-unit.enum.d.ts","sourceRoot":"","sources":["../../../model-catalog/enums/price-unit.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IAClB,kBAAkB,uBAAuB;IACzC,cAAc,mBAAmB;IACjC,WAAW,gBAAgB;CAC9B"}
@@ -5,4 +5,5 @@ var PRICE_UNIT;
5
5
  (function (PRICE_UNIT) {
6
6
  PRICE_UNIT["PER_MILLION_TOKENS"] = "per_million_tokens";
7
7
  PRICE_UNIT["PER_GENERATION"] = "per_generation";
8
+ PRICE_UNIT["PER_REQUEST"] = "per_request";
8
9
  })(PRICE_UNIT || (exports.PRICE_UNIT = PRICE_UNIT = {}));
@@ -14,14 +14,145 @@ export declare const GetPublicModelBySlugQueryResponse: z.ZodObject<{
14
14
  }, z.core.$strip>;
15
15
  category: z.ZodEnum<typeof import("../../..").MODEL_CATEGORY>;
16
16
  order: z.ZodNumber;
17
+ h1: z.ZodString;
18
+ card: z.ZodNullable<z.ZodObject<{
19
+ subtitle: z.ZodString;
20
+ ctaLabel: z.ZodString;
21
+ badges: z.ZodArray<z.ZodString>;
22
+ }, z.core.$strip>>;
17
23
  seoTitle: z.ZodString;
18
24
  seoDescription: z.ZodNullable<z.ZodString>;
19
25
  content: z.ZodNullable<z.ZodObject<{
20
- sections: z.ZodArray<z.ZodObject<{
26
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
21
27
  id: z.ZodString;
22
- heading: z.ZodString;
28
+ heading: z.ZodNullable<z.ZodString>;
29
+ intro: z.ZodNullable<z.ZodString>;
30
+ outro: z.ZodNullable<z.ZodString>;
31
+ type: z.ZodLiteral<"richText">;
23
32
  body: z.ZodString;
24
- }, z.core.$strip>>;
33
+ }, z.core.$strip>, z.ZodObject<{
34
+ id: z.ZodString;
35
+ heading: z.ZodNullable<z.ZodString>;
36
+ intro: z.ZodNullable<z.ZodString>;
37
+ outro: z.ZodNullable<z.ZodString>;
38
+ type: z.ZodLiteral<"featureList">;
39
+ items: z.ZodArray<z.ZodObject<{
40
+ title: z.ZodString;
41
+ body: z.ZodString;
42
+ }, z.core.$strip>>;
43
+ }, z.core.$strip>, z.ZodObject<{
44
+ id: z.ZodString;
45
+ heading: z.ZodNullable<z.ZodString>;
46
+ intro: z.ZodNullable<z.ZodString>;
47
+ outro: z.ZodNullable<z.ZodString>;
48
+ type: z.ZodLiteral<"specs">;
49
+ items: z.ZodArray<z.ZodObject<{
50
+ label: z.ZodString;
51
+ value: z.ZodString;
52
+ }, z.core.$strip>>;
53
+ }, z.core.$strip>, z.ZodObject<{
54
+ id: z.ZodString;
55
+ heading: z.ZodNullable<z.ZodString>;
56
+ intro: z.ZodNullable<z.ZodString>;
57
+ outro: z.ZodNullable<z.ZodString>;
58
+ type: z.ZodLiteral<"examples">;
59
+ items: z.ZodArray<z.ZodObject<{
60
+ title: z.ZodString;
61
+ alt: z.ZodString;
62
+ prompt: z.ZodString;
63
+ settings: z.ZodString;
64
+ answer: z.ZodNullable<z.ZodString>;
65
+ images: z.ZodArray<z.ZodObject<{
66
+ url: z.ZodURL;
67
+ alt: z.ZodString;
68
+ caption: z.ZodNullable<z.ZodString>;
69
+ }, z.core.$strip>>;
70
+ }, z.core.$strip>>;
71
+ }, z.core.$strip>, z.ZodObject<{
72
+ id: z.ZodString;
73
+ heading: z.ZodNullable<z.ZodString>;
74
+ intro: z.ZodNullable<z.ZodString>;
75
+ outro: z.ZodNullable<z.ZodString>;
76
+ type: z.ZodLiteral<"comparison">;
77
+ columns: z.ZodArray<z.ZodString>;
78
+ rows: z.ZodArray<z.ZodObject<{
79
+ label: z.ZodString;
80
+ values: z.ZodArray<z.ZodString>;
81
+ }, z.core.$strip>>;
82
+ }, z.core.$strip>, z.ZodObject<{
83
+ id: z.ZodString;
84
+ heading: z.ZodNullable<z.ZodString>;
85
+ intro: z.ZodNullable<z.ZodString>;
86
+ outro: z.ZodNullable<z.ZodString>;
87
+ type: z.ZodLiteral<"prosCons">;
88
+ items: z.ZodArray<z.ZodObject<{
89
+ title: z.ZodString;
90
+ pros: z.ZodArray<z.ZodString>;
91
+ cons: z.ZodArray<z.ZodString>;
92
+ }, z.core.$strip>>;
93
+ }, z.core.$strip>, z.ZodObject<{
94
+ id: z.ZodString;
95
+ heading: z.ZodNullable<z.ZodString>;
96
+ intro: z.ZodNullable<z.ZodString>;
97
+ outro: z.ZodNullable<z.ZodString>;
98
+ type: z.ZodLiteral<"steps">;
99
+ items: z.ZodArray<z.ZodObject<{
100
+ title: z.ZodString;
101
+ body: z.ZodString;
102
+ }, z.core.$strip>>;
103
+ }, z.core.$strip>, z.ZodObject<{
104
+ id: z.ZodString;
105
+ heading: z.ZodNullable<z.ZodString>;
106
+ intro: z.ZodNullable<z.ZodString>;
107
+ outro: z.ZodNullable<z.ZodString>;
108
+ type: z.ZodLiteral<"faq">;
109
+ items: z.ZodArray<z.ZodObject<{
110
+ question: z.ZodString;
111
+ answer: z.ZodString;
112
+ }, z.core.$strip>>;
113
+ }, z.core.$strip>, z.ZodObject<{
114
+ id: z.ZodString;
115
+ heading: z.ZodNullable<z.ZodString>;
116
+ intro: z.ZodNullable<z.ZodString>;
117
+ outro: z.ZodNullable<z.ZodString>;
118
+ type: z.ZodLiteral<"relatedLinks">;
119
+ items: z.ZodArray<z.ZodObject<{
120
+ kind: z.ZodEnum<{
121
+ readonly model: "model";
122
+ readonly task: "task";
123
+ }>;
124
+ slug: z.ZodString;
125
+ title: z.ZodString;
126
+ note: z.ZodNullable<z.ZodString>;
127
+ }, z.core.$strip>>;
128
+ }, z.core.$strip>, z.ZodObject<{
129
+ id: z.ZodString;
130
+ heading: z.ZodNullable<z.ZodString>;
131
+ intro: z.ZodNullable<z.ZodString>;
132
+ outro: z.ZodNullable<z.ZodString>;
133
+ type: z.ZodLiteral<"demo">;
134
+ caption: z.ZodNullable<z.ZodString>;
135
+ presets: z.ZodArray<z.ZodObject<{
136
+ id: z.ZodString;
137
+ label: z.ZodString;
138
+ prompt: z.ZodString;
139
+ settings: z.ZodNullable<z.ZodString>;
140
+ answer: z.ZodNullable<z.ZodString>;
141
+ image: z.ZodNullable<z.ZodObject<{
142
+ url: z.ZodURL;
143
+ alt: z.ZodString;
144
+ caption: z.ZodNullable<z.ZodString>;
145
+ }, z.core.$strip>>;
146
+ }, z.core.$strip>>;
147
+ }, z.core.$strip>, z.ZodObject<{
148
+ id: z.ZodString;
149
+ heading: z.ZodNullable<z.ZodString>;
150
+ intro: z.ZodNullable<z.ZodString>;
151
+ outro: z.ZodNullable<z.ZodString>;
152
+ type: z.ZodLiteral<"pricingWidget">;
153
+ ctaLabel: z.ZodString;
154
+ ctaSlug: z.ZodString;
155
+ }, z.core.$strip>], "type">>;
25
156
  }, z.core.$strip>>;
26
157
  chat: z.ZodNullable<z.ZodObject<{
27
158
  type: z.ZodArray<z.ZodString>;
@@ -59,14 +190,145 @@ export declare const GetPublicModelBySlugQuery: {
59
190
  }, z.core.$strip>;
60
191
  category: z.ZodEnum<typeof import("../../..").MODEL_CATEGORY>;
61
192
  order: z.ZodNumber;
193
+ h1: z.ZodString;
194
+ card: z.ZodNullable<z.ZodObject<{
195
+ subtitle: z.ZodString;
196
+ ctaLabel: z.ZodString;
197
+ badges: z.ZodArray<z.ZodString>;
198
+ }, z.core.$strip>>;
62
199
  seoTitle: z.ZodString;
63
200
  seoDescription: z.ZodNullable<z.ZodString>;
64
201
  content: z.ZodNullable<z.ZodObject<{
65
- sections: z.ZodArray<z.ZodObject<{
202
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
66
203
  id: z.ZodString;
67
- heading: z.ZodString;
204
+ heading: z.ZodNullable<z.ZodString>;
205
+ intro: z.ZodNullable<z.ZodString>;
206
+ outro: z.ZodNullable<z.ZodString>;
207
+ type: z.ZodLiteral<"richText">;
68
208
  body: z.ZodString;
69
- }, z.core.$strip>>;
209
+ }, z.core.$strip>, z.ZodObject<{
210
+ id: z.ZodString;
211
+ heading: z.ZodNullable<z.ZodString>;
212
+ intro: z.ZodNullable<z.ZodString>;
213
+ outro: z.ZodNullable<z.ZodString>;
214
+ type: z.ZodLiteral<"featureList">;
215
+ items: z.ZodArray<z.ZodObject<{
216
+ title: z.ZodString;
217
+ body: z.ZodString;
218
+ }, z.core.$strip>>;
219
+ }, z.core.$strip>, z.ZodObject<{
220
+ id: z.ZodString;
221
+ heading: z.ZodNullable<z.ZodString>;
222
+ intro: z.ZodNullable<z.ZodString>;
223
+ outro: z.ZodNullable<z.ZodString>;
224
+ type: z.ZodLiteral<"specs">;
225
+ items: z.ZodArray<z.ZodObject<{
226
+ label: z.ZodString;
227
+ value: z.ZodString;
228
+ }, z.core.$strip>>;
229
+ }, z.core.$strip>, z.ZodObject<{
230
+ id: z.ZodString;
231
+ heading: z.ZodNullable<z.ZodString>;
232
+ intro: z.ZodNullable<z.ZodString>;
233
+ outro: z.ZodNullable<z.ZodString>;
234
+ type: z.ZodLiteral<"examples">;
235
+ items: z.ZodArray<z.ZodObject<{
236
+ title: z.ZodString;
237
+ alt: z.ZodString;
238
+ prompt: z.ZodString;
239
+ settings: z.ZodString;
240
+ answer: z.ZodNullable<z.ZodString>;
241
+ images: z.ZodArray<z.ZodObject<{
242
+ url: z.ZodURL;
243
+ alt: z.ZodString;
244
+ caption: z.ZodNullable<z.ZodString>;
245
+ }, z.core.$strip>>;
246
+ }, z.core.$strip>>;
247
+ }, z.core.$strip>, z.ZodObject<{
248
+ id: z.ZodString;
249
+ heading: z.ZodNullable<z.ZodString>;
250
+ intro: z.ZodNullable<z.ZodString>;
251
+ outro: z.ZodNullable<z.ZodString>;
252
+ type: z.ZodLiteral<"comparison">;
253
+ columns: z.ZodArray<z.ZodString>;
254
+ rows: z.ZodArray<z.ZodObject<{
255
+ label: z.ZodString;
256
+ values: z.ZodArray<z.ZodString>;
257
+ }, z.core.$strip>>;
258
+ }, z.core.$strip>, z.ZodObject<{
259
+ id: z.ZodString;
260
+ heading: z.ZodNullable<z.ZodString>;
261
+ intro: z.ZodNullable<z.ZodString>;
262
+ outro: z.ZodNullable<z.ZodString>;
263
+ type: z.ZodLiteral<"prosCons">;
264
+ items: z.ZodArray<z.ZodObject<{
265
+ title: z.ZodString;
266
+ pros: z.ZodArray<z.ZodString>;
267
+ cons: z.ZodArray<z.ZodString>;
268
+ }, z.core.$strip>>;
269
+ }, z.core.$strip>, z.ZodObject<{
270
+ id: z.ZodString;
271
+ heading: z.ZodNullable<z.ZodString>;
272
+ intro: z.ZodNullable<z.ZodString>;
273
+ outro: z.ZodNullable<z.ZodString>;
274
+ type: z.ZodLiteral<"steps">;
275
+ items: z.ZodArray<z.ZodObject<{
276
+ title: z.ZodString;
277
+ body: z.ZodString;
278
+ }, z.core.$strip>>;
279
+ }, z.core.$strip>, z.ZodObject<{
280
+ id: z.ZodString;
281
+ heading: z.ZodNullable<z.ZodString>;
282
+ intro: z.ZodNullable<z.ZodString>;
283
+ outro: z.ZodNullable<z.ZodString>;
284
+ type: z.ZodLiteral<"faq">;
285
+ items: z.ZodArray<z.ZodObject<{
286
+ question: z.ZodString;
287
+ answer: z.ZodString;
288
+ }, z.core.$strip>>;
289
+ }, z.core.$strip>, z.ZodObject<{
290
+ id: z.ZodString;
291
+ heading: z.ZodNullable<z.ZodString>;
292
+ intro: z.ZodNullable<z.ZodString>;
293
+ outro: z.ZodNullable<z.ZodString>;
294
+ type: z.ZodLiteral<"relatedLinks">;
295
+ items: z.ZodArray<z.ZodObject<{
296
+ kind: z.ZodEnum<{
297
+ readonly model: "model";
298
+ readonly task: "task";
299
+ }>;
300
+ slug: z.ZodString;
301
+ title: z.ZodString;
302
+ note: z.ZodNullable<z.ZodString>;
303
+ }, z.core.$strip>>;
304
+ }, z.core.$strip>, z.ZodObject<{
305
+ id: z.ZodString;
306
+ heading: z.ZodNullable<z.ZodString>;
307
+ intro: z.ZodNullable<z.ZodString>;
308
+ outro: z.ZodNullable<z.ZodString>;
309
+ type: z.ZodLiteral<"demo">;
310
+ caption: z.ZodNullable<z.ZodString>;
311
+ presets: z.ZodArray<z.ZodObject<{
312
+ id: z.ZodString;
313
+ label: z.ZodString;
314
+ prompt: z.ZodString;
315
+ settings: z.ZodNullable<z.ZodString>;
316
+ answer: z.ZodNullable<z.ZodString>;
317
+ image: z.ZodNullable<z.ZodObject<{
318
+ url: z.ZodURL;
319
+ alt: z.ZodString;
320
+ caption: z.ZodNullable<z.ZodString>;
321
+ }, z.core.$strip>>;
322
+ }, z.core.$strip>>;
323
+ }, z.core.$strip>, z.ZodObject<{
324
+ id: z.ZodString;
325
+ heading: z.ZodNullable<z.ZodString>;
326
+ intro: z.ZodNullable<z.ZodString>;
327
+ outro: z.ZodNullable<z.ZodString>;
328
+ type: z.ZodLiteral<"pricingWidget">;
329
+ ctaLabel: z.ZodString;
330
+ ctaSlug: z.ZodString;
331
+ }, z.core.$strip>], "type">>;
70
332
  }, z.core.$strip>>;
71
333
  chat: z.ZodNullable<z.ZodObject<{
72
334
  type: z.ZodArray<z.ZodString>;
@@ -85,6 +347,7 @@ export declare const GetPublicModelBySlugQuery: {
85
347
  }, z.core.$strip>;
86
348
  404: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
87
349
  500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
350
+ 503: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
88
351
  };
89
352
  };
90
353
  //# sourceMappingURL=get-public-model-by-slug.query.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-public-model-by-slug.query.d.ts","sourceRoot":"","sources":["../../../../model-page/endpoints/queries/get-public-model-by-slug.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAIzF,eAAO,MAAM,+BAA+B;;iBAE1C,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA0B,CAAC;AAEzE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYpC,CAAC"}
1
+ {"version":3,"file":"get-public-model-by-slug.query.d.ts","sourceRoot":"","sources":["../../../../model-page/endpoints/queries/get-public-model-by-slug.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAIzF,eAAO,MAAM,+BAA+B;;iBAE1C,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA0B,CAAC;AAEzE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAapC,CAAC"}
@@ -20,5 +20,6 @@ exports.GetPublicModelBySlugQuery = (0, _common_1.defineContract)({
20
20
  200: exports.GetPublicModelBySlugQueryResponse,
21
21
  404: _common_1.HttpErrorResponseSchema,
22
22
  500: _common_1.HttpErrorResponseSchema,
23
+ 503: _common_1.HttpErrorResponseSchema,
23
24
  },
24
25
  });
@@ -1,3 +1,5 @@
1
+ export * from './page-card.schema';
2
+ export * from './page-content.schema';
1
3
  export * from './public-model-card.schema';
2
4
  export * from './public-model-detail.schema';
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../model-page/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../model-page/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC"}
@@ -14,5 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./page-card.schema"), exports);
18
+ __exportStar(require("./page-content.schema"), exports);
17
19
  __exportStar(require("./public-model-card.schema"), exports);
18
20
  __exportStar(require("./public-model-detail.schema"), exports);
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export declare const PageCardSchema: z.ZodObject<{
3
+ subtitle: z.ZodString;
4
+ ctaLabel: z.ZodString;
5
+ badges: z.ZodArray<z.ZodString>;
6
+ }, z.core.$strip>;
7
+ export type PageCardSchemaType = z.infer<typeof PageCardSchema>;
8
+ //# sourceMappingURL=page-card.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-card.schema.d.ts","sourceRoot":"","sources":["../../../model-page/models/page-card.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc;;;;iBAIzB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PageCardSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.PageCardSchema = zod_1.z.object({
6
+ subtitle: zod_1.z.string().min(1),
7
+ ctaLabel: zod_1.z.string().min(1),
8
+ badges: zod_1.z.array(zod_1.z.string().min(1)).max(6),
9
+ });