@meetkai/mka1 0.54.64 → 0.54.66

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 (96) hide show
  1. package/bin/mcp-server.js +34 -14
  2. package/bin/mcp-server.js.map +12 -12
  3. package/dist/commonjs/funcs/datasetsCreateGeneration.d.ts +3 -2
  4. package/dist/commonjs/funcs/datasetsCreateGeneration.d.ts.map +1 -1
  5. package/dist/commonjs/funcs/datasetsCreateGeneration.js +3 -2
  6. package/dist/commonjs/funcs/datasetsCreateGeneration.js.map +1 -1
  7. package/dist/commonjs/funcs/sandboxSetPricing.d.ts +1 -1
  8. package/dist/commonjs/funcs/sandboxSetPricing.js +1 -1
  9. package/dist/commonjs/lib/config.d.ts +2 -2
  10. package/dist/commonjs/lib/config.js +2 -2
  11. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  12. package/dist/commonjs/mcp-server/server.js +1 -1
  13. package/dist/commonjs/mcp-server/tools/datasetsCreateGeneration.d.ts.map +1 -1
  14. package/dist/commonjs/mcp-server/tools/datasetsCreateGeneration.js +3 -2
  15. package/dist/commonjs/mcp-server/tools/datasetsCreateGeneration.js.map +1 -1
  16. package/dist/commonjs/mcp-server/tools/sandboxSetPricing.js +1 -1
  17. package/dist/commonjs/mcp-server/tools/sandboxSetPricing.js.map +1 -1
  18. package/dist/commonjs/models/components/createdby.d.ts +2 -0
  19. package/dist/commonjs/models/components/createdby.d.ts.map +1 -1
  20. package/dist/commonjs/models/components/createdby.js +4 -0
  21. package/dist/commonjs/models/components/createdby.js.map +1 -1
  22. package/dist/commonjs/models/components/sandboxpricingcard.d.ts +2 -0
  23. package/dist/commonjs/models/components/sandboxpricingcard.d.ts.map +1 -1
  24. package/dist/commonjs/models/components/sandboxpricingcard.js +2 -0
  25. package/dist/commonjs/models/components/sandboxpricingcard.js.map +1 -1
  26. package/dist/commonjs/models/components/sandboxpricingupdate.d.ts +11 -1
  27. package/dist/commonjs/models/components/sandboxpricingupdate.d.ts.map +1 -1
  28. package/dist/commonjs/models/components/sandboxpricingupdate.js +13 -0
  29. package/dist/commonjs/models/components/sandboxpricingupdate.js.map +1 -1
  30. package/dist/commonjs/react-query/datasetsCreateGeneration.d.ts +3 -2
  31. package/dist/commonjs/react-query/datasetsCreateGeneration.d.ts.map +1 -1
  32. package/dist/commonjs/react-query/datasetsCreateGeneration.js +3 -2
  33. package/dist/commonjs/react-query/datasetsCreateGeneration.js.map +1 -1
  34. package/dist/commonjs/react-query/sandboxSetPricing.d.ts +1 -1
  35. package/dist/commonjs/react-query/sandboxSetPricing.js +1 -1
  36. package/dist/commonjs/sdk/datasets.d.ts +3 -2
  37. package/dist/commonjs/sdk/datasets.d.ts.map +1 -1
  38. package/dist/commonjs/sdk/datasets.js +3 -2
  39. package/dist/commonjs/sdk/datasets.js.map +1 -1
  40. package/dist/commonjs/sdk/sandbox.d.ts +1 -1
  41. package/dist/commonjs/sdk/sandbox.js +1 -1
  42. package/dist/esm/funcs/datasetsCreateGeneration.d.ts +3 -2
  43. package/dist/esm/funcs/datasetsCreateGeneration.d.ts.map +1 -1
  44. package/dist/esm/funcs/datasetsCreateGeneration.js +3 -2
  45. package/dist/esm/funcs/datasetsCreateGeneration.js.map +1 -1
  46. package/dist/esm/funcs/sandboxSetPricing.d.ts +1 -1
  47. package/dist/esm/funcs/sandboxSetPricing.js +1 -1
  48. package/dist/esm/lib/config.d.ts +2 -2
  49. package/dist/esm/lib/config.js +2 -2
  50. package/dist/esm/mcp-server/mcp-server.js +1 -1
  51. package/dist/esm/mcp-server/server.js +1 -1
  52. package/dist/esm/mcp-server/tools/datasetsCreateGeneration.d.ts.map +1 -1
  53. package/dist/esm/mcp-server/tools/datasetsCreateGeneration.js +3 -2
  54. package/dist/esm/mcp-server/tools/datasetsCreateGeneration.js.map +1 -1
  55. package/dist/esm/mcp-server/tools/sandboxSetPricing.js +1 -1
  56. package/dist/esm/mcp-server/tools/sandboxSetPricing.js.map +1 -1
  57. package/dist/esm/models/components/createdby.d.ts +2 -0
  58. package/dist/esm/models/components/createdby.d.ts.map +1 -1
  59. package/dist/esm/models/components/createdby.js +4 -0
  60. package/dist/esm/models/components/createdby.js.map +1 -1
  61. package/dist/esm/models/components/sandboxpricingcard.d.ts +2 -0
  62. package/dist/esm/models/components/sandboxpricingcard.d.ts.map +1 -1
  63. package/dist/esm/models/components/sandboxpricingcard.js +2 -0
  64. package/dist/esm/models/components/sandboxpricingcard.js.map +1 -1
  65. package/dist/esm/models/components/sandboxpricingupdate.d.ts +11 -1
  66. package/dist/esm/models/components/sandboxpricingupdate.d.ts.map +1 -1
  67. package/dist/esm/models/components/sandboxpricingupdate.js +13 -0
  68. package/dist/esm/models/components/sandboxpricingupdate.js.map +1 -1
  69. package/dist/esm/react-query/datasetsCreateGeneration.d.ts +3 -2
  70. package/dist/esm/react-query/datasetsCreateGeneration.d.ts.map +1 -1
  71. package/dist/esm/react-query/datasetsCreateGeneration.js +3 -2
  72. package/dist/esm/react-query/datasetsCreateGeneration.js.map +1 -1
  73. package/dist/esm/react-query/sandboxSetPricing.d.ts +1 -1
  74. package/dist/esm/react-query/sandboxSetPricing.js +1 -1
  75. package/dist/esm/sdk/datasets.d.ts +3 -2
  76. package/dist/esm/sdk/datasets.d.ts.map +1 -1
  77. package/dist/esm/sdk/datasets.js +3 -2
  78. package/dist/esm/sdk/datasets.js.map +1 -1
  79. package/dist/esm/sdk/sandbox.d.ts +1 -1
  80. package/dist/esm/sdk/sandbox.js +1 -1
  81. package/jsr.json +1 -1
  82. package/package.json +1 -1
  83. package/src/funcs/datasetsCreateGeneration.ts +3 -2
  84. package/src/funcs/sandboxSetPricing.ts +1 -1
  85. package/src/lib/config.ts +2 -2
  86. package/src/mcp-server/mcp-server.ts +1 -1
  87. package/src/mcp-server/server.ts +1 -1
  88. package/src/mcp-server/tools/datasetsCreateGeneration.ts +3 -2
  89. package/src/mcp-server/tools/sandboxSetPricing.ts +1 -1
  90. package/src/models/components/createdby.ts +6 -0
  91. package/src/models/components/sandboxpricingcard.ts +4 -0
  92. package/src/models/components/sandboxpricingupdate.ts +24 -1
  93. package/src/react-query/datasetsCreateGeneration.ts +3 -2
  94. package/src/react-query/sandboxSetPricing.ts +1 -1
  95. package/src/sdk/datasets.ts +3 -2
  96. package/src/sdk/sandbox.ts +1 -1
@@ -16,6 +16,7 @@ import {
16
16
 
17
17
  export type SandboxPricingCard = {
18
18
  object?: "sandbox.pricing" | undefined;
19
+ currency?: string | null | undefined;
19
20
  rates?: { [k: string]: SandboxPriceRate } | undefined;
20
21
  updatedAt?: Date | null | undefined;
21
22
  updatedBy?: string | null | undefined;
@@ -28,6 +29,7 @@ export const SandboxPricingCard$inboundSchema: z.ZodType<
28
29
  unknown
29
30
  > = z.object({
30
31
  object: z.literal("sandbox.pricing").default("sandbox.pricing"),
32
+ currency: z.nullable(z.string()).optional(),
31
33
  rates: z.record(SandboxPriceRate$inboundSchema).optional(),
32
34
  updated_at: z.nullable(
33
35
  z.string().datetime({ offset: true }).transform(v => new Date(v)),
@@ -42,6 +44,7 @@ export const SandboxPricingCard$inboundSchema: z.ZodType<
42
44
  /** @internal */
43
45
  export type SandboxPricingCard$Outbound = {
44
46
  object: "sandbox.pricing";
47
+ currency?: string | null | undefined;
45
48
  rates?: { [k: string]: SandboxPriceRate$Outbound } | undefined;
46
49
  updated_at?: string | null | undefined;
47
50
  updated_by?: string | null | undefined;
@@ -54,6 +57,7 @@ export const SandboxPricingCard$outboundSchema: z.ZodType<
54
57
  SandboxPricingCard
55
58
  > = z.object({
56
59
  object: z.literal("sandbox.pricing").default("sandbox.pricing" as const),
60
+ currency: z.nullable(z.string()).optional(),
57
61
  rates: z.record(SandboxPriceRate$outboundSchema).optional(),
58
62
  updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
59
63
  updatedBy: z.nullable(z.string()).optional(),
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
6
7
  import { safeParse } from "../../lib/schemas.js";
7
8
  import { Result as SafeParseResult } from "../../types/fp.js";
8
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -14,10 +15,18 @@ import {
14
15
  } from "./sandboxpricerate.js";
15
16
 
16
17
  /**
17
- * Full-replace rate card update; omitted SKUs become unpriced.
18
+ * Full-replace rate card update.
19
+ *
20
+ * @remarks
21
+ *
22
+ * A SKU that has a price and is omitted here would become unpriced, and its
23
+ * usage would then be recorded with no cost, which can never be billed. That
24
+ * is refused unless ``allow_unpriced`` says it is intended.
18
25
  */
19
26
  export type SandboxPricingUpdate = {
20
27
  rates: { [k: string]: SandboxPriceRate };
28
+ currency?: string | null | undefined;
29
+ allowUnpriced?: boolean | undefined;
21
30
  };
22
31
 
23
32
  /** @internal */
@@ -27,10 +36,18 @@ export const SandboxPricingUpdate$inboundSchema: z.ZodType<
27
36
  unknown
28
37
  > = z.object({
29
38
  rates: z.record(SandboxPriceRate$inboundSchema),
39
+ currency: z.nullable(z.string()).optional(),
40
+ allow_unpriced: z.boolean().default(false),
41
+ }).transform((v) => {
42
+ return remap$(v, {
43
+ "allow_unpriced": "allowUnpriced",
44
+ });
30
45
  });
31
46
  /** @internal */
32
47
  export type SandboxPricingUpdate$Outbound = {
33
48
  rates: { [k: string]: SandboxPriceRate$Outbound };
49
+ currency?: string | null | undefined;
50
+ allow_unpriced: boolean;
34
51
  };
35
52
 
36
53
  /** @internal */
@@ -40,6 +57,12 @@ export const SandboxPricingUpdate$outboundSchema: z.ZodType<
40
57
  SandboxPricingUpdate
41
58
  > = z.object({
42
59
  rates: z.record(SandboxPriceRate$outboundSchema),
60
+ currency: z.nullable(z.string()).optional(),
61
+ allowUnpriced: z.boolean().default(false),
62
+ }).transform((v) => {
63
+ return remap$(v, {
64
+ allowUnpriced: "allow_unpriced",
65
+ });
43
66
  });
44
67
 
45
68
  export function sandboxPricingUpdateToJSON(
@@ -50,8 +50,9 @@ export type DatasetsCreateGenerationMutationError =
50
50
  * Create Generation
51
51
  *
52
52
  * @remarks
53
- * The components.md §6 D.1 sequence, in its order: nothing is written before the digest is
54
- * pinned, and the workflow starts only after the row is committed.
53
+ * The components.md §6 D.1 sequence, in its order: the run credential is minted before
54
+ * anything is spent, nothing is written before the digest is pinned, and the workflow starts
55
+ * only after the row is committed.
55
56
  */
56
57
  export function useDatasetsCreateGenerationMutation(
57
58
  options?: MutationHookOptions<
@@ -49,7 +49,7 @@ export type SandboxSetPricingMutationError =
49
49
  * Set Sandbox Pricing
50
50
  *
51
51
  * @remarks
52
- * Replace the sandbox pricing rate card. Full-replace semantics: SKUs omitted from the request become unpriced and accrue no spend. Takes effect on the next meter window without a restart. Cluster admins only.
52
+ * Replace the sandbox pricing rate card. Full-replace semantics. Omitting a SKU that currently has a price is refused with 422 unless `allow_unpriced` is true: an unpriced SKU accrues no spend and its usage cannot be billed. A `currency` that differs from the stored one is saved only after the budgeting service accepts it as the cluster's billing currency (409 when it conflicts, 503 when it cannot be verified). Takes effect on the next meter window without a restart. Cluster admins only.
53
53
  */
54
54
  export function useSandboxSetPricingMutation(
55
55
  options?: MutationHookOptions<
@@ -81,8 +81,9 @@ export class Datasets extends ClientSDK {
81
81
  * Create Generation
82
82
  *
83
83
  * @remarks
84
- * The components.md §6 D.1 sequence, in its order: nothing is written before the digest is
85
- * pinned, and the workflow starts only after the row is committed.
84
+ * The components.md §6 D.1 sequence, in its order: the run credential is minted before
85
+ * anything is spent, nothing is written before the digest is pinned, and the workflow starts
86
+ * only after the row is committed.
86
87
  */
87
88
  async createGeneration(
88
89
  request: operations.CreateGenerationApiV1DatasetsGenerationsPostRequest,
@@ -106,7 +106,7 @@ export class Sandbox extends ClientSDK {
106
106
  * Set Sandbox Pricing
107
107
  *
108
108
  * @remarks
109
- * Replace the sandbox pricing rate card. Full-replace semantics: SKUs omitted from the request become unpriced and accrue no spend. Takes effect on the next meter window without a restart. Cluster admins only.
109
+ * Replace the sandbox pricing rate card. Full-replace semantics. Omitting a SKU that currently has a price is refused with 422 unless `allow_unpriced` is true: an unpriced SKU accrues no spend and its usage cannot be billed. A `currency` that differs from the stored one is saved only after the budgeting service accepts it as the cluster's billing currency (409 when it conflicts, 503 when it cannot be verified). Takes effect on the next meter window without a restart. Cluster admins only.
110
110
  */
111
111
  async setPricing(
112
112
  request: components.SandboxPricingUpdate,