@buildinternet/releases-api-types 0.59.0 → 0.60.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.
Files changed (126) hide show
  1. package/README.md +14 -6
  2. package/dist/api-types.d.ts +1168 -0
  3. package/dist/api-types.d.ts.map +1 -0
  4. package/dist/api-types.js +134 -0
  5. package/dist/schemas/account-profile.d.ts +29 -0
  6. package/dist/schemas/account-profile.d.ts.map +1 -0
  7. package/dist/schemas/account-profile.js +24 -0
  8. package/dist/schemas/ai-models.d.ts +67 -0
  9. package/dist/schemas/ai-models.d.ts.map +1 -0
  10. package/{src/schemas/ai-models.ts → dist/schemas/ai-models.js} +25 -31
  11. package/dist/schemas/api-keys.d.ts +71 -0
  12. package/dist/schemas/api-keys.d.ts.map +1 -0
  13. package/dist/schemas/api-keys.js +32 -0
  14. package/dist/schemas/classifications.d.ts +134 -0
  15. package/dist/schemas/classifications.d.ts.map +1 -0
  16. package/dist/schemas/classifications.js +96 -0
  17. package/dist/schemas/collections.d.ts +605 -0
  18. package/dist/schemas/collections.d.ts.map +1 -0
  19. package/dist/schemas/collections.js +320 -0
  20. package/dist/schemas/datasets.d.ts +34 -0
  21. package/dist/schemas/datasets.d.ts.map +1 -0
  22. package/dist/schemas/datasets.js +11 -0
  23. package/dist/schemas/errors.d.ts +43 -0
  24. package/dist/schemas/errors.d.ts.map +1 -0
  25. package/dist/schemas/errors.js +61 -0
  26. package/dist/schemas/feedback.d.ts +134 -0
  27. package/dist/schemas/feedback.d.ts.map +1 -0
  28. package/dist/schemas/feedback.js +76 -0
  29. package/dist/schemas/follows.d.ts +154 -0
  30. package/dist/schemas/follows.d.ts.map +1 -0
  31. package/dist/schemas/follows.js +42 -0
  32. package/dist/schemas/listing.d.ts +374 -0
  33. package/dist/schemas/listing.d.ts.map +1 -0
  34. package/dist/schemas/listing.js +175 -0
  35. package/dist/schemas/lookups.d.ts +285 -0
  36. package/dist/schemas/lookups.d.ts.map +1 -0
  37. package/{src/schemas/lookups.ts → dist/schemas/lookups.js} +67 -80
  38. package/dist/schemas/marketing-classifier.d.ts +32 -0
  39. package/dist/schemas/marketing-classifier.d.ts.map +1 -0
  40. package/{src/schemas/marketing-classifier.ts → dist/schemas/marketing-classifier.js} +14 -18
  41. package/dist/schemas/orgs.d.ts +950 -0
  42. package/dist/schemas/orgs.d.ts.map +1 -0
  43. package/dist/schemas/orgs.js +473 -0
  44. package/dist/schemas/overviews.d.ts +205 -0
  45. package/dist/schemas/overviews.d.ts.map +1 -0
  46. package/{src/schemas/overviews.ts → dist/schemas/overviews.js} +41 -54
  47. package/dist/schemas/products.d.ts +595 -0
  48. package/dist/schemas/products.d.ts.map +1 -0
  49. package/{src/schemas/products.ts → dist/schemas/products.js} +113 -136
  50. package/dist/schemas/publish-tokens.d.ts +55 -0
  51. package/dist/schemas/publish-tokens.d.ts.map +1 -0
  52. package/{src/schemas/publish-tokens.ts → dist/schemas/publish-tokens.js} +18 -29
  53. package/dist/schemas/recommendations.d.ts +52 -0
  54. package/dist/schemas/recommendations.d.ts.map +1 -0
  55. package/dist/schemas/recommendations.js +58 -0
  56. package/dist/schemas/related.d.ts +331 -0
  57. package/dist/schemas/related.d.ts.map +1 -0
  58. package/dist/schemas/related.js +115 -0
  59. package/dist/schemas/releases.d.ts +623 -0
  60. package/dist/schemas/releases.d.ts.map +1 -0
  61. package/dist/schemas/releases.js +414 -0
  62. package/dist/schemas/resolve.d.ts +259 -0
  63. package/dist/schemas/resolve.d.ts.map +1 -0
  64. package/{src/schemas/resolve.ts → dist/schemas/resolve.js} +2 -5
  65. package/dist/schemas/search.d.ts +475 -0
  66. package/dist/schemas/search.d.ts.map +1 -0
  67. package/dist/schemas/search.js +258 -0
  68. package/dist/schemas/semantic-alert-summary.d.ts +54 -0
  69. package/dist/schemas/semantic-alert-summary.d.ts.map +1 -0
  70. package/dist/schemas/semantic-alert-summary.js +57 -0
  71. package/dist/schemas/semantic-alerts.d.ts +41 -0
  72. package/dist/schemas/semantic-alerts.d.ts.map +1 -0
  73. package/dist/schemas/semantic-alerts.js +42 -0
  74. package/dist/schemas/shared.d.ts +247 -0
  75. package/dist/schemas/shared.d.ts.map +1 -0
  76. package/dist/schemas/shared.js +248 -0
  77. package/dist/schemas/site-notice.d.ts +35 -0
  78. package/dist/schemas/site-notice.d.ts.map +1 -0
  79. package/{src/schemas/site-notice.ts → dist/schemas/site-notice.js} +14 -18
  80. package/dist/schemas/sitemap.d.ts +97 -0
  81. package/dist/schemas/sitemap.d.ts.map +1 -0
  82. package/dist/schemas/sitemap.js +107 -0
  83. package/dist/schemas/sources.d.ts +1145 -0
  84. package/dist/schemas/sources.d.ts.map +1 -0
  85. package/dist/schemas/sources.js +645 -0
  86. package/dist/schemas/stats.d.ts +82 -0
  87. package/dist/schemas/stats.d.ts.map +1 -0
  88. package/dist/schemas/stats.js +59 -0
  89. package/dist/schemas/taxonomy.d.ts +344 -0
  90. package/dist/schemas/taxonomy.d.ts.map +1 -0
  91. package/{src/schemas/taxonomy.ts → dist/schemas/taxonomy.js} +47 -58
  92. package/dist/schemas/webhooks.d.ts +618 -0
  93. package/dist/schemas/webhooks.d.ts.map +1 -0
  94. package/dist/schemas/webhooks.js +191 -0
  95. package/dist/schemas/well-known.d.ts +302 -0
  96. package/dist/schemas/well-known.d.ts.map +1 -0
  97. package/dist/schemas/well-known.js +192 -0
  98. package/dist/schemas/workspace-integrations.d.ts +27 -0
  99. package/dist/schemas/workspace-integrations.d.ts.map +1 -0
  100. package/dist/schemas/workspace-integrations.js +22 -0
  101. package/package.json +16 -5
  102. package/src/api-types.ts +0 -2229
  103. package/src/schemas/account-profile.ts +0 -28
  104. package/src/schemas/ai-models.test.ts +0 -29
  105. package/src/schemas/classifications.ts +0 -109
  106. package/src/schemas/collections.ts +0 -346
  107. package/src/schemas/datasets.ts +0 -31
  108. package/src/schemas/errors.test.ts +0 -55
  109. package/src/schemas/errors.ts +0 -81
  110. package/src/schemas/feedback.ts +0 -56
  111. package/src/schemas/listing.ts +0 -226
  112. package/src/schemas/orgs.ts +0 -533
  113. package/src/schemas/recommendations.ts +0 -39
  114. package/src/schemas/related.ts +0 -126
  115. package/src/schemas/releases.ts +0 -449
  116. package/src/schemas/search.ts +0 -274
  117. package/src/schemas/semantic-alert-summary.ts +0 -65
  118. package/src/schemas/shared.notice.test.ts +0 -36
  119. package/src/schemas/shared.ts +0 -267
  120. package/src/schemas/site-notice.test.ts +0 -67
  121. package/src/schemas/sitemap.ts +0 -117
  122. package/src/schemas/sources.ts +0 -674
  123. package/src/schemas/stats.ts +0 -62
  124. package/src/schemas/well-known.test.ts +0 -264
  125. package/src/schemas/well-known.ts +0 -252
  126. package/src/schemas/workspace-integrations.ts +0 -26
@@ -0,0 +1,134 @@
1
+ import { z } from "zod";
2
+ /** `GET /v1/admin/classifications/summary`. */
3
+ export declare const ClassificationSummarySchema: z.ZodObject<{
4
+ after: z.ZodString;
5
+ before: z.ZodString;
6
+ bucket: z.ZodEnum<{
7
+ day: "day";
8
+ hour: "hour";
9
+ }>;
10
+ origin: z.ZodEnum<{
11
+ all: "all";
12
+ eval: "eval";
13
+ ingest: "ingest";
14
+ manual: "manual";
15
+ }>;
16
+ totals: z.ZodObject<{
17
+ classified: z.ZodNumber;
18
+ kept: z.ZodNumber;
19
+ suppressed: z.ZodNumber;
20
+ failed: z.ZodNumber;
21
+ skipped: z.ZodNumber;
22
+ costUsd: z.ZodNumber;
23
+ suppressionRate: z.ZodNullable<z.ZodNumber>;
24
+ }, z.core.$strip>;
25
+ series: z.ZodArray<z.ZodObject<{
26
+ t: z.ZodString;
27
+ kept: z.ZodNumber;
28
+ suppressed: z.ZodNumber;
29
+ failed: z.ZodNumber;
30
+ skipped: z.ZodNumber;
31
+ }, z.core.$strip>>;
32
+ choices: z.ZodArray<z.ZodObject<{
33
+ choice: z.ZodString;
34
+ count: z.ZodNumber;
35
+ }, z.core.$strip>>;
36
+ choiceSeries: z.ZodArray<z.ZodObject<{
37
+ t: z.ZodString;
38
+ choices: z.ZodRecord<z.ZodString, z.ZodNumber>;
39
+ }, z.core.$strip>>;
40
+ models: z.ZodArray<z.ZodObject<{
41
+ provider: z.ZodString;
42
+ model: z.ZodString;
43
+ count: z.ZodNumber;
44
+ costUsd: z.ZodNumber;
45
+ }, z.core.$strip>>;
46
+ probability: z.ZodObject<{
47
+ threshold: z.ZodNumber;
48
+ selected: z.ZodObject<{
49
+ bins: z.ZodArray<z.ZodObject<{
50
+ start: z.ZodNumber;
51
+ end: z.ZodNumber;
52
+ count: z.ZodNumber;
53
+ }, z.core.$strip>>;
54
+ missing: z.ZodNumber;
55
+ }, z.core.$strip>;
56
+ confidence: z.ZodObject<{
57
+ bins: z.ZodArray<z.ZodObject<{
58
+ start: z.ZodNumber;
59
+ end: z.ZodNumber;
60
+ count: z.ZodNumber;
61
+ }, z.core.$strip>>;
62
+ missing: z.ZodNumber;
63
+ }, z.core.$strip>;
64
+ }, z.core.$strip>;
65
+ meta: z.ZodObject<{
66
+ dataset: z.ZodString;
67
+ retentionDays: z.ZodLiteral<90>;
68
+ sampled: z.ZodLiteral<true>;
69
+ }, z.core.$strip>;
70
+ }, z.core.$strip>;
71
+ /** One sampled decision from `GET /v1/admin/classifications/recent`. */
72
+ export declare const ClassificationRecentItemSchema: z.ZodObject<{
73
+ timestamp: z.ZodString;
74
+ origin: z.ZodEnum<{
75
+ eval: "eval";
76
+ ingest: "ingest";
77
+ manual: "manual";
78
+ }>;
79
+ sourceId: z.ZodNullable<z.ZodString>;
80
+ sourceName: z.ZodNullable<z.ZodString>;
81
+ sourceSlug: z.ZodNullable<z.ZodString>;
82
+ orgSlug: z.ZodNullable<z.ZodString>;
83
+ releaseId: z.ZodNullable<z.ZodString>;
84
+ releaseTitle: z.ZodNullable<z.ZodString>;
85
+ provider: z.ZodString;
86
+ model: z.ZodString;
87
+ choice: z.ZodString;
88
+ selectedChoiceProbability: z.ZodNullable<z.ZodNumber>;
89
+ providerConfidence: z.ZodNullable<z.ZodNumber>;
90
+ disposition: z.ZodEnum<{
91
+ failed: "failed";
92
+ kept: "kept";
93
+ skipped: "skipped";
94
+ suppressed: "suppressed";
95
+ }>;
96
+ reason: z.ZodString;
97
+ failureCategory: z.ZodString;
98
+ costUsd: z.ZodNullable<z.ZodNumber>;
99
+ durationMs: z.ZodNullable<z.ZodNumber>;
100
+ }, z.core.$strip>;
101
+ /** `GET /v1/admin/classifications/recent` — newest sampled rows, not weighted. */
102
+ export declare const ClassificationRecentResponseSchema: z.ZodObject<{
103
+ items: z.ZodArray<z.ZodObject<{
104
+ timestamp: z.ZodString;
105
+ origin: z.ZodEnum<{
106
+ eval: "eval";
107
+ ingest: "ingest";
108
+ manual: "manual";
109
+ }>;
110
+ sourceId: z.ZodNullable<z.ZodString>;
111
+ sourceName: z.ZodNullable<z.ZodString>;
112
+ sourceSlug: z.ZodNullable<z.ZodString>;
113
+ orgSlug: z.ZodNullable<z.ZodString>;
114
+ releaseId: z.ZodNullable<z.ZodString>;
115
+ releaseTitle: z.ZodNullable<z.ZodString>;
116
+ provider: z.ZodString;
117
+ model: z.ZodString;
118
+ choice: z.ZodString;
119
+ selectedChoiceProbability: z.ZodNullable<z.ZodNumber>;
120
+ providerConfidence: z.ZodNullable<z.ZodNumber>;
121
+ disposition: z.ZodEnum<{
122
+ failed: "failed";
123
+ kept: "kept";
124
+ skipped: "skipped";
125
+ suppressed: "suppressed";
126
+ }>;
127
+ reason: z.ZodString;
128
+ failureCategory: z.ZodString;
129
+ costUsd: z.ZodNullable<z.ZodNumber>;
130
+ durationMs: z.ZodNullable<z.ZodNumber>;
131
+ }, z.core.$strip>>;
132
+ nextCursor: z.ZodNullable<z.ZodString>;
133
+ }, z.core.$strip>;
134
+ //# sourceMappingURL=classifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classifications.d.ts","sourceRoot":"","sources":["../../src/schemas/classifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA2BxB,+CAA+C;AAC/C,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoDtC,CAAC;AAEH,wEAAwE;AACxE,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmBzC,CAAC;AAEH,kFAAkF;AAClF,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG7C,CAAC"}
@@ -0,0 +1,96 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Admin classification analytics (`GET /v1/admin/classifications/summary`
4
+ * and `/recent`). Decisions live in Analytics Engine; these shapes are the
5
+ * hydrated read model, not the positional point schema.
6
+ */
7
+ const ClassificationOriginSchema = z.enum(["ingest", "manual", "eval"]);
8
+ const ClassificationOriginFilterSchema = z.enum(["ingest", "manual", "eval", "all"]);
9
+ const ClassificationDispositionSchema = z.enum(["kept", "suppressed", "failed", "skipped"]);
10
+ const ProbabilityBinSchema = z.object({
11
+ /** Inclusive. Width is 0.1. See `probability.threshold` for the current
12
+ * effective suppression threshold and which bin it falls in. */
13
+ start: z.number(),
14
+ /** Exclusive, except the last bin (`0.9`–`1`) which includes `1`. */
15
+ end: z.number(),
16
+ count: z.number(),
17
+ });
18
+ const ProbabilityHistogramSchema = z.object({
19
+ bins: z.array(ProbabilityBinSchema),
20
+ /** Sampled rows whose double is `< 0` (the absent sentinel). */
21
+ missing: z.number(),
22
+ });
23
+ /** `GET /v1/admin/classifications/summary`. */
24
+ export const ClassificationSummarySchema = z.object({
25
+ after: z.string(),
26
+ before: z.string(),
27
+ bucket: z.enum(["hour", "day"]),
28
+ origin: ClassificationOriginFilterSchema,
29
+ totals: z.object({
30
+ classified: z.number(),
31
+ kept: z.number(),
32
+ suppressed: z.number(),
33
+ failed: z.number(),
34
+ skipped: z.number(),
35
+ costUsd: z.number(),
36
+ /** `suppressed / (kept + suppressed)`, or null when the denominator is 0. */
37
+ suppressionRate: z.number().nullable(),
38
+ }),
39
+ series: z.array(z.object({
40
+ t: z.string(),
41
+ kept: z.number(),
42
+ suppressed: z.number(),
43
+ failed: z.number(),
44
+ skipped: z.number(),
45
+ })),
46
+ choices: z.array(z.object({ choice: z.string(), count: z.number() })),
47
+ choiceSeries: z.array(z.object({
48
+ t: z.string(),
49
+ choices: z.record(z.string(), z.number()),
50
+ })),
51
+ models: z.array(z.object({
52
+ provider: z.string(),
53
+ model: z.string(),
54
+ count: z.number(),
55
+ costUsd: z.number(),
56
+ })),
57
+ probability: z.object({
58
+ /** Current effective suppression threshold (operator override, else the
59
+ * code default) — no longer a fixed literal now that it's editable via
60
+ * `GET/PUT /v1/admin/marketing-classifier`. */
61
+ threshold: z.number(),
62
+ selected: ProbabilityHistogramSchema,
63
+ confidence: ProbabilityHistogramSchema,
64
+ }),
65
+ meta: z.object({
66
+ dataset: z.string(),
67
+ retentionDays: z.literal(90),
68
+ sampled: z.literal(true),
69
+ }),
70
+ });
71
+ /** One sampled decision from `GET /v1/admin/classifications/recent`. */
72
+ export const ClassificationRecentItemSchema = z.object({
73
+ timestamp: z.string(),
74
+ origin: ClassificationOriginSchema,
75
+ sourceId: z.string().nullable(),
76
+ sourceName: z.string().nullable(),
77
+ sourceSlug: z.string().nullable(),
78
+ orgSlug: z.string().nullable(),
79
+ releaseId: z.string().nullable(),
80
+ releaseTitle: z.string().nullable(),
81
+ provider: z.string(),
82
+ model: z.string(),
83
+ choice: z.string(),
84
+ selectedChoiceProbability: z.number().nullable(),
85
+ providerConfidence: z.number().nullable(),
86
+ disposition: ClassificationDispositionSchema,
87
+ reason: z.string(),
88
+ failureCategory: z.string(),
89
+ costUsd: z.number().nullable(),
90
+ durationMs: z.number().nullable(),
91
+ });
92
+ /** `GET /v1/admin/classifications/recent` — newest sampled rows, not weighted. */
93
+ export const ClassificationRecentResponseSchema = z.object({
94
+ items: z.array(ClassificationRecentItemSchema),
95
+ nextCursor: z.string().nullable(),
96
+ });