@ai-grator/api 0.1.32 → 0.1.33

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 +265 -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 +411 -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 +146 -0
  38. package/build/model-page/models/public-model-detail.schema.d.ts +132 -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 +182 -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,143 @@ 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
+ images: z.ZodArray<z.ZodObject<{
65
+ url: z.ZodURL;
66
+ alt: z.ZodString;
67
+ caption: z.ZodNullable<z.ZodString>;
68
+ }, z.core.$strip>>;
69
+ }, z.core.$strip>>;
70
+ }, z.core.$strip>, z.ZodObject<{
71
+ id: z.ZodString;
72
+ heading: z.ZodNullable<z.ZodString>;
73
+ intro: z.ZodNullable<z.ZodString>;
74
+ outro: z.ZodNullable<z.ZodString>;
75
+ type: z.ZodLiteral<"comparison">;
76
+ columns: z.ZodArray<z.ZodString>;
77
+ rows: z.ZodArray<z.ZodObject<{
78
+ label: z.ZodString;
79
+ values: z.ZodArray<z.ZodString>;
80
+ }, z.core.$strip>>;
81
+ }, z.core.$strip>, z.ZodObject<{
82
+ id: z.ZodString;
83
+ heading: z.ZodNullable<z.ZodString>;
84
+ intro: z.ZodNullable<z.ZodString>;
85
+ outro: z.ZodNullable<z.ZodString>;
86
+ type: z.ZodLiteral<"prosCons">;
87
+ items: z.ZodArray<z.ZodObject<{
88
+ title: z.ZodString;
89
+ pros: z.ZodArray<z.ZodString>;
90
+ cons: z.ZodArray<z.ZodString>;
91
+ }, z.core.$strip>>;
92
+ }, z.core.$strip>, z.ZodObject<{
93
+ id: z.ZodString;
94
+ heading: z.ZodNullable<z.ZodString>;
95
+ intro: z.ZodNullable<z.ZodString>;
96
+ outro: z.ZodNullable<z.ZodString>;
97
+ type: z.ZodLiteral<"steps">;
98
+ items: z.ZodArray<z.ZodObject<{
99
+ title: z.ZodString;
100
+ body: z.ZodString;
101
+ }, z.core.$strip>>;
102
+ }, z.core.$strip>, z.ZodObject<{
103
+ id: z.ZodString;
104
+ heading: z.ZodNullable<z.ZodString>;
105
+ intro: z.ZodNullable<z.ZodString>;
106
+ outro: z.ZodNullable<z.ZodString>;
107
+ type: z.ZodLiteral<"faq">;
108
+ items: z.ZodArray<z.ZodObject<{
109
+ question: z.ZodString;
110
+ answer: z.ZodString;
111
+ }, z.core.$strip>>;
112
+ }, z.core.$strip>, z.ZodObject<{
113
+ id: z.ZodString;
114
+ heading: z.ZodNullable<z.ZodString>;
115
+ intro: z.ZodNullable<z.ZodString>;
116
+ outro: z.ZodNullable<z.ZodString>;
117
+ type: z.ZodLiteral<"relatedLinks">;
118
+ items: z.ZodArray<z.ZodObject<{
119
+ kind: z.ZodEnum<{
120
+ readonly model: "model";
121
+ readonly task: "task";
122
+ }>;
123
+ slug: z.ZodString;
124
+ title: z.ZodString;
125
+ note: z.ZodNullable<z.ZodString>;
126
+ }, z.core.$strip>>;
127
+ }, z.core.$strip>, z.ZodObject<{
128
+ id: z.ZodString;
129
+ heading: z.ZodNullable<z.ZodString>;
130
+ intro: z.ZodNullable<z.ZodString>;
131
+ outro: z.ZodNullable<z.ZodString>;
132
+ type: z.ZodLiteral<"demo">;
133
+ caption: z.ZodNullable<z.ZodString>;
134
+ presets: z.ZodArray<z.ZodObject<{
135
+ id: z.ZodString;
136
+ label: z.ZodString;
137
+ prompt: z.ZodString;
138
+ settings: z.ZodNullable<z.ZodString>;
139
+ image: z.ZodNullable<z.ZodObject<{
140
+ url: z.ZodURL;
141
+ alt: z.ZodString;
142
+ caption: z.ZodNullable<z.ZodString>;
143
+ }, z.core.$strip>>;
144
+ }, z.core.$strip>>;
145
+ }, z.core.$strip>, z.ZodObject<{
146
+ id: z.ZodString;
147
+ heading: z.ZodNullable<z.ZodString>;
148
+ intro: z.ZodNullable<z.ZodString>;
149
+ outro: z.ZodNullable<z.ZodString>;
150
+ type: z.ZodLiteral<"pricingWidget">;
151
+ ctaLabel: z.ZodString;
152
+ ctaSlug: z.ZodString;
153
+ }, z.core.$strip>], "type">>;
25
154
  }, z.core.$strip>>;
26
155
  chat: z.ZodNullable<z.ZodObject<{
27
156
  type: z.ZodArray<z.ZodString>;
@@ -59,14 +188,143 @@ export declare const GetPublicModelBySlugQuery: {
59
188
  }, z.core.$strip>;
60
189
  category: z.ZodEnum<typeof import("../../..").MODEL_CATEGORY>;
61
190
  order: z.ZodNumber;
191
+ h1: z.ZodString;
192
+ card: z.ZodNullable<z.ZodObject<{
193
+ subtitle: z.ZodString;
194
+ ctaLabel: z.ZodString;
195
+ badges: z.ZodArray<z.ZodString>;
196
+ }, z.core.$strip>>;
62
197
  seoTitle: z.ZodString;
63
198
  seoDescription: z.ZodNullable<z.ZodString>;
64
199
  content: z.ZodNullable<z.ZodObject<{
65
- sections: z.ZodArray<z.ZodObject<{
200
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
66
201
  id: z.ZodString;
67
- heading: z.ZodString;
202
+ heading: z.ZodNullable<z.ZodString>;
203
+ intro: z.ZodNullable<z.ZodString>;
204
+ outro: z.ZodNullable<z.ZodString>;
205
+ type: z.ZodLiteral<"richText">;
68
206
  body: z.ZodString;
69
- }, z.core.$strip>>;
207
+ }, z.core.$strip>, z.ZodObject<{
208
+ id: z.ZodString;
209
+ heading: z.ZodNullable<z.ZodString>;
210
+ intro: z.ZodNullable<z.ZodString>;
211
+ outro: z.ZodNullable<z.ZodString>;
212
+ type: z.ZodLiteral<"featureList">;
213
+ items: z.ZodArray<z.ZodObject<{
214
+ title: z.ZodString;
215
+ body: z.ZodString;
216
+ }, z.core.$strip>>;
217
+ }, z.core.$strip>, z.ZodObject<{
218
+ id: z.ZodString;
219
+ heading: z.ZodNullable<z.ZodString>;
220
+ intro: z.ZodNullable<z.ZodString>;
221
+ outro: z.ZodNullable<z.ZodString>;
222
+ type: z.ZodLiteral<"specs">;
223
+ items: z.ZodArray<z.ZodObject<{
224
+ label: z.ZodString;
225
+ value: z.ZodString;
226
+ }, z.core.$strip>>;
227
+ }, z.core.$strip>, z.ZodObject<{
228
+ id: z.ZodString;
229
+ heading: z.ZodNullable<z.ZodString>;
230
+ intro: z.ZodNullable<z.ZodString>;
231
+ outro: z.ZodNullable<z.ZodString>;
232
+ type: z.ZodLiteral<"examples">;
233
+ items: z.ZodArray<z.ZodObject<{
234
+ title: z.ZodString;
235
+ alt: z.ZodString;
236
+ prompt: z.ZodString;
237
+ settings: z.ZodString;
238
+ images: z.ZodArray<z.ZodObject<{
239
+ url: z.ZodURL;
240
+ alt: z.ZodString;
241
+ caption: z.ZodNullable<z.ZodString>;
242
+ }, z.core.$strip>>;
243
+ }, z.core.$strip>>;
244
+ }, z.core.$strip>, z.ZodObject<{
245
+ id: z.ZodString;
246
+ heading: z.ZodNullable<z.ZodString>;
247
+ intro: z.ZodNullable<z.ZodString>;
248
+ outro: z.ZodNullable<z.ZodString>;
249
+ type: z.ZodLiteral<"comparison">;
250
+ columns: z.ZodArray<z.ZodString>;
251
+ rows: z.ZodArray<z.ZodObject<{
252
+ label: z.ZodString;
253
+ values: z.ZodArray<z.ZodString>;
254
+ }, z.core.$strip>>;
255
+ }, z.core.$strip>, z.ZodObject<{
256
+ id: z.ZodString;
257
+ heading: z.ZodNullable<z.ZodString>;
258
+ intro: z.ZodNullable<z.ZodString>;
259
+ outro: z.ZodNullable<z.ZodString>;
260
+ type: z.ZodLiteral<"prosCons">;
261
+ items: z.ZodArray<z.ZodObject<{
262
+ title: z.ZodString;
263
+ pros: z.ZodArray<z.ZodString>;
264
+ cons: z.ZodArray<z.ZodString>;
265
+ }, z.core.$strip>>;
266
+ }, z.core.$strip>, z.ZodObject<{
267
+ id: z.ZodString;
268
+ heading: z.ZodNullable<z.ZodString>;
269
+ intro: z.ZodNullable<z.ZodString>;
270
+ outro: z.ZodNullable<z.ZodString>;
271
+ type: z.ZodLiteral<"steps">;
272
+ items: z.ZodArray<z.ZodObject<{
273
+ title: z.ZodString;
274
+ body: z.ZodString;
275
+ }, z.core.$strip>>;
276
+ }, z.core.$strip>, z.ZodObject<{
277
+ id: z.ZodString;
278
+ heading: z.ZodNullable<z.ZodString>;
279
+ intro: z.ZodNullable<z.ZodString>;
280
+ outro: z.ZodNullable<z.ZodString>;
281
+ type: z.ZodLiteral<"faq">;
282
+ items: z.ZodArray<z.ZodObject<{
283
+ question: z.ZodString;
284
+ answer: z.ZodString;
285
+ }, z.core.$strip>>;
286
+ }, z.core.$strip>, z.ZodObject<{
287
+ id: z.ZodString;
288
+ heading: z.ZodNullable<z.ZodString>;
289
+ intro: z.ZodNullable<z.ZodString>;
290
+ outro: z.ZodNullable<z.ZodString>;
291
+ type: z.ZodLiteral<"relatedLinks">;
292
+ items: z.ZodArray<z.ZodObject<{
293
+ kind: z.ZodEnum<{
294
+ readonly model: "model";
295
+ readonly task: "task";
296
+ }>;
297
+ slug: z.ZodString;
298
+ title: z.ZodString;
299
+ note: z.ZodNullable<z.ZodString>;
300
+ }, z.core.$strip>>;
301
+ }, z.core.$strip>, z.ZodObject<{
302
+ id: z.ZodString;
303
+ heading: z.ZodNullable<z.ZodString>;
304
+ intro: z.ZodNullable<z.ZodString>;
305
+ outro: z.ZodNullable<z.ZodString>;
306
+ type: z.ZodLiteral<"demo">;
307
+ caption: z.ZodNullable<z.ZodString>;
308
+ presets: z.ZodArray<z.ZodObject<{
309
+ id: z.ZodString;
310
+ label: z.ZodString;
311
+ prompt: z.ZodString;
312
+ settings: z.ZodNullable<z.ZodString>;
313
+ image: z.ZodNullable<z.ZodObject<{
314
+ url: z.ZodURL;
315
+ alt: z.ZodString;
316
+ caption: z.ZodNullable<z.ZodString>;
317
+ }, z.core.$strip>>;
318
+ }, z.core.$strip>>;
319
+ }, z.core.$strip>, z.ZodObject<{
320
+ id: z.ZodString;
321
+ heading: z.ZodNullable<z.ZodString>;
322
+ intro: z.ZodNullable<z.ZodString>;
323
+ outro: z.ZodNullable<z.ZodString>;
324
+ type: z.ZodLiteral<"pricingWidget">;
325
+ ctaLabel: z.ZodString;
326
+ ctaSlug: z.ZodString;
327
+ }, z.core.$strip>], "type">>;
70
328
  }, z.core.$strip>>;
71
329
  chat: z.ZodNullable<z.ZodObject<{
72
330
  type: z.ZodArray<z.ZodString>;
@@ -85,6 +343,7 @@ export declare const GetPublicModelBySlugQuery: {
85
343
  }, z.core.$strip>;
86
344
  404: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
87
345
  500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
346
+ 503: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
88
347
  };
89
348
  };
90
349
  //# 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
+ });