@buildinternet/releases-api-types 0.58.3 → 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 (125) 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 -4
  102. package/src/api-types.ts +0 -2223
  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/errors.test.ts +0 -55
  108. package/src/schemas/errors.ts +0 -81
  109. package/src/schemas/feedback.ts +0 -56
  110. package/src/schemas/listing.ts +0 -226
  111. package/src/schemas/orgs.ts +0 -533
  112. package/src/schemas/recommendations.ts +0 -39
  113. package/src/schemas/related.ts +0 -126
  114. package/src/schemas/releases.ts +0 -436
  115. package/src/schemas/search.ts +0 -274
  116. package/src/schemas/semantic-alert-summary.ts +0 -65
  117. package/src/schemas/shared.notice.test.ts +0 -36
  118. package/src/schemas/shared.ts +0 -267
  119. package/src/schemas/site-notice.test.ts +0 -67
  120. package/src/schemas/sitemap.ts +0 -114
  121. package/src/schemas/sources.ts +0 -674
  122. package/src/schemas/stats.ts +0 -62
  123. package/src/schemas/well-known.test.ts +0 -264
  124. package/src/schemas/well-known.ts +0 -252
  125. package/src/schemas/workspace-integrations.ts +0 -26
@@ -0,0 +1,76 @@
1
+ import { z } from "zod";
2
+ import { FEEDBACK_TYPES, FEEDBACK_STATUSES, TELEMETRY_CLIENT_KINDS, } from "@buildinternet/releases-core/schema";
3
+ /** Feedback category — mirrors `FEEDBACK_TYPES` in `@buildinternet/releases-core/schema`. */
4
+ export const FeedbackTypeSchema = z.enum(FEEDBACK_TYPES);
5
+ /** Triage lifecycle — mirrors `FEEDBACK_STATUSES` in `@buildinternet/releases-core/schema`. */
6
+ export const FeedbackStatusSchema = z.enum(FEEDBACK_STATUSES);
7
+ /**
8
+ * One submitted feedback row, as returned by `GET /v1/admin/feedback` and by
9
+ * the triage write-path (`PATCH /v1/feedback/:id` echoes the updated row).
10
+ * `archived` soft-removes the row from the default admin read view and is
11
+ * orthogonal to triage `status` — a row can be `closed` and visible, or `new`
12
+ * and archived. `createdAt` is epoch milliseconds.
13
+ */
14
+ export const FeedbackItemSchema = z.object({
15
+ id: z.string(),
16
+ createdAt: z.number(),
17
+ message: z.string(),
18
+ contact: z.string().nullable(),
19
+ type: FeedbackTypeSchema,
20
+ status: FeedbackStatusSchema,
21
+ archived: z.boolean(),
22
+ cliVersion: z.string().nullable(),
23
+ clientKind: z.string(),
24
+ anonId: z.string().nullable(),
25
+ os: z.string().nullable(),
26
+ arch: z.string().nullable(),
27
+ runtime: z.string().nullable(),
28
+ surface: z.string(),
29
+ });
30
+ /**
31
+ * `GET /v1/admin/feedback` — cursor-paginated, newest-first. Archived rows are
32
+ * hidden unless the request passes `?includeArchived=true`.
33
+ */
34
+ export const FeedbackListResponseSchema = z.object({
35
+ items: z.array(FeedbackItemSchema),
36
+ nextCursor: z.string().nullable(),
37
+ });
38
+ /**
39
+ * `PATCH /v1/feedback/:id` body — partial triage update. At least one field
40
+ * must be present; the response echoes the updated `FeedbackItem`.
41
+ */
42
+ export const FeedbackUpdateBodySchema = z.object({
43
+ status: FeedbackStatusSchema.optional(),
44
+ archived: z.boolean().optional(),
45
+ });
46
+ /** `DELETE /v1/feedback/:id` response — hard delete of a single row. */
47
+ export const FeedbackDeleteResponseSchema = z.object({
48
+ deleted: z.literal(true),
49
+ id: z.string(),
50
+ });
51
+ /** `POST /v1/feedback` field limits, shared with the handler's sanitizer. */
52
+ export const FEEDBACK_MESSAGE_MIN_CHARS = 5;
53
+ export const FEEDBACK_MESSAGE_MAX_CHARS = 4000;
54
+ export const FEEDBACK_CONTACT_MAX_CHARS = 200;
55
+ /**
56
+ * `POST /v1/feedback` body. Documentation shape: the handler sanitizes each
57
+ * field and coerces unknown `type` / `clientKind` values to their defaults
58
+ * rather than rejecting them; only a short or missing `message` is a 400.
59
+ */
60
+ export const FeedbackSubmitBodySchema = z.object({
61
+ message: z.string().min(FEEDBACK_MESSAGE_MIN_CHARS).max(FEEDBACK_MESSAGE_MAX_CHARS),
62
+ type: FeedbackTypeSchema.optional(),
63
+ contact: z.string().max(FEEDBACK_CONTACT_MAX_CHARS).optional(),
64
+ clientKind: z.enum(TELEMETRY_CLIENT_KINDS).optional(),
65
+ surface: z.string().max(32).optional(),
66
+ cliVersion: z.string().max(32).optional(),
67
+ anonId: z.string().max(64).optional(),
68
+ os: z.string().max(64).optional(),
69
+ arch: z.string().max(64).optional(),
70
+ runtime: z.string().max(64).optional(),
71
+ });
72
+ /** `POST /v1/feedback` 202 response. */
73
+ export const FeedbackSubmitResponseSchema = z.object({
74
+ ok: z.literal(true),
75
+ id: z.string(),
76
+ });
@@ -0,0 +1,154 @@
1
+ import { z } from "zod";
2
+ /** Follows and the personalized feed, served under `/v1/me/follows` and `/v1/me/feed`. */
3
+ /** What a user can follow. */
4
+ export declare const FollowTargetSchema: z.ZodEnum<{
5
+ org: "org";
6
+ product: "product";
7
+ }>;
8
+ /** A user's follow, enriched for rendering (returned by GET /v1/me/follows). */
9
+ export declare const FollowSchema: z.ZodObject<{
10
+ targetType: z.ZodEnum<{
11
+ org: "org";
12
+ product: "product";
13
+ }>;
14
+ targetId: z.ZodString;
15
+ name: z.ZodString;
16
+ slug: z.ZodString;
17
+ avatarUrl: z.ZodNullable<z.ZodString>;
18
+ orgSlug: z.ZodNullable<z.ZodString>;
19
+ createdAt: z.ZodString;
20
+ }, z.core.$strip>;
21
+ /** GET /v1/me/follows response. */
22
+ export declare const FollowsListResponseSchema: z.ZodObject<{
23
+ follows: z.ZodArray<z.ZodObject<{
24
+ targetType: z.ZodEnum<{
25
+ org: "org";
26
+ product: "product";
27
+ }>;
28
+ targetId: z.ZodString;
29
+ name: z.ZodString;
30
+ slug: z.ZodString;
31
+ avatarUrl: z.ZodNullable<z.ZodString>;
32
+ orgSlug: z.ZodNullable<z.ZodString>;
33
+ createdAt: z.ZodString;
34
+ }, z.core.$strip>>;
35
+ }, z.core.$strip>;
36
+ /** POST /v1/me/follows request body. Following an org also follows its products. */
37
+ export declare const FollowRequestSchema: z.ZodObject<{
38
+ targetType: z.ZodEnum<{
39
+ org: "org";
40
+ product: "product";
41
+ }>;
42
+ targetId: z.ZodString;
43
+ }, z.core.$strip>;
44
+ /** POST/DELETE /v1/me/follows response. */
45
+ export declare const FollowMutationResponseSchema: z.ZodObject<{
46
+ success: z.ZodLiteral<true>;
47
+ following: z.ZodBoolean;
48
+ }, z.core.$strip>;
49
+ /** Cursor pagination shape for GET /v1/me/feed (same as other release feeds). */
50
+ export declare const PersonalizedFeedPaginationSchema: z.ZodObject<{
51
+ nextCursor: z.ZodNullable<z.ZodString>;
52
+ limit: z.ZodNumber;
53
+ }, z.core.$strip>;
54
+ /**
55
+ * GET /v1/me/feed response — the personalized release feed. Reuses the same item
56
+ * shape as /v1/releases/latest (ReleaseLatestItem); cursor-paginated like other
57
+ * feed-shaped surfaces.
58
+ */
59
+ export declare const PersonalizedFeedResponseSchema: z.ZodObject<{
60
+ items: z.ZodArray<z.ZodObject<{
61
+ id: z.ZodString;
62
+ version: z.ZodNullable<z.ZodString>;
63
+ type: z.ZodEnum<{
64
+ feature: "feature";
65
+ rollup: "rollup";
66
+ }>;
67
+ title: z.ZodString;
68
+ summary: z.ZodNullable<z.ZodString>;
69
+ titleGenerated: z.ZodNullable<z.ZodString>;
70
+ titleShort: z.ZodNullable<z.ZodString>;
71
+ breaking: z.ZodOptional<z.ZodEnum<{
72
+ major: "major";
73
+ minor: "minor";
74
+ none: "none";
75
+ unknown: "unknown";
76
+ }>>;
77
+ importance: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
78
+ publishedAt: z.ZodNullable<z.ZodString>;
79
+ url: z.ZodNullable<z.ZodString>;
80
+ webUrl: z.ZodOptional<z.ZodString>;
81
+ media: z.ZodArray<z.ZodObject<{
82
+ type: z.ZodEnum<{
83
+ gif: "gif";
84
+ image: "image";
85
+ video: "video";
86
+ }>;
87
+ url: z.ZodString;
88
+ alt: z.ZodOptional<z.ZodString>;
89
+ r2Key: z.ZodOptional<z.ZodString>;
90
+ r2Url: z.ZodOptional<z.ZodString>;
91
+ linkUrl: z.ZodOptional<z.ZodString>;
92
+ }, z.core.$strip>>;
93
+ source: z.ZodObject<{
94
+ slug: z.ZodString;
95
+ name: z.ZodString;
96
+ type: z.ZodEnum<{
97
+ agent: "agent";
98
+ appstore: "appstore";
99
+ feed: "feed";
100
+ github: "github";
101
+ scrape: "scrape";
102
+ video: "video";
103
+ }>;
104
+ orgSlug: z.ZodNullable<z.ZodString>;
105
+ orgName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
106
+ orgAvatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
107
+ orgGithubHandle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
108
+ kind: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
109
+ desktop: "desktop";
110
+ docs: "docs";
111
+ integration: "integration";
112
+ mobile: "mobile";
113
+ platform: "platform";
114
+ sdk: "sdk";
115
+ tool: "tool";
116
+ }>>>;
117
+ }, z.core.$strip>;
118
+ product: z.ZodOptional<z.ZodNullable<z.ZodObject<{
119
+ slug: z.ZodString;
120
+ name: z.ZodString;
121
+ kind: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
122
+ desktop: "desktop";
123
+ docs: "docs";
124
+ integration: "integration";
125
+ mobile: "mobile";
126
+ platform: "platform";
127
+ sdk: "sdk";
128
+ tool: "tool";
129
+ }>>>;
130
+ }, z.core.$strip>>>;
131
+ groupSlug: z.ZodOptional<z.ZodString>;
132
+ groupName: z.ZodOptional<z.ZodString>;
133
+ coverageCount: z.ZodOptional<z.ZodNumber>;
134
+ contentChars: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
135
+ contentTokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
136
+ composition: z.ZodOptional<z.ZodNullable<z.ZodObject<{
137
+ bugs: z.ZodNumber;
138
+ features: z.ZodNumber;
139
+ enhancements: z.ZodNumber;
140
+ }, z.core.$strip>>>;
141
+ }, z.core.$strip>>;
142
+ pagination: z.ZodObject<{
143
+ nextCursor: z.ZodNullable<z.ZodString>;
144
+ limit: z.ZodNumber;
145
+ }, z.core.$strip>;
146
+ }, z.core.$strip>;
147
+ export type FollowTarget = z.infer<typeof FollowTargetSchema>;
148
+ export type Follow = z.infer<typeof FollowSchema>;
149
+ export type FollowsListResponse = z.infer<typeof FollowsListResponseSchema>;
150
+ export type FollowRequest = z.infer<typeof FollowRequestSchema>;
151
+ export type FollowMutationResponse = z.infer<typeof FollowMutationResponseSchema>;
152
+ export type PersonalizedFeedPagination = z.infer<typeof PersonalizedFeedPaginationSchema>;
153
+ export type PersonalizedFeedResponse = z.infer<typeof PersonalizedFeedResponseSchema>;
154
+ //# sourceMappingURL=follows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"follows.d.ts","sourceRoot":"","sources":["../../src/schemas/follows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,0FAA0F;AAE1F,8BAA8B;AAC9B,eAAO,MAAM,kBAAkB;;;EAA6B,CAAC;AAE7D,gFAAgF;AAChF,eAAO,MAAM,YAAY;;;;;;;;;;;iBASvB,CAAC;AAEH,mCAAmC;AACnC,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;iBAEpC,CAAC;AAEH,oFAAoF;AACpF,eAAO,MAAM,mBAAmB;;;;;;iBAG9B,CAAC;AAEH,2CAA2C;AAC3C,eAAO,MAAM,4BAA4B;;;iBAGvC,CAAC;AAEH,iFAAiF;AACjF,eAAO,MAAM,gCAAgC;;;iBAA0B,CAAC;AAExE;;;;GAIG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGzC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAClD,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAC1F,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { z } from "zod";
2
+ import { OrgFeedPaginationSchema } from "./orgs.js";
3
+ import { ReleaseLatestItemSchema } from "./releases.js";
4
+ /** Follows and the personalized feed, served under `/v1/me/follows` and `/v1/me/feed`. */
5
+ /** What a user can follow. */
6
+ export const FollowTargetSchema = z.enum(["org", "product"]);
7
+ /** A user's follow, enriched for rendering (returned by GET /v1/me/follows). */
8
+ export const FollowSchema = z.object({
9
+ targetType: FollowTargetSchema,
10
+ targetId: z.string(),
11
+ name: z.string(),
12
+ slug: z.string(),
13
+ avatarUrl: z.string().nullable(),
14
+ /** Owning org slug for product follows (null for org follows). */
15
+ orgSlug: z.string().nullable(),
16
+ createdAt: z.string(),
17
+ });
18
+ /** GET /v1/me/follows response. */
19
+ export const FollowsListResponseSchema = z.object({
20
+ follows: z.array(FollowSchema),
21
+ });
22
+ /** POST /v1/me/follows request body. Following an org also follows its products. */
23
+ export const FollowRequestSchema = z.object({
24
+ targetType: FollowTargetSchema,
25
+ targetId: z.string().min(1).describe("The org or product id (`org_…` / `prod_…`)."),
26
+ });
27
+ /** POST/DELETE /v1/me/follows response. */
28
+ export const FollowMutationResponseSchema = z.object({
29
+ success: z.literal(true),
30
+ following: z.boolean(),
31
+ });
32
+ /** Cursor pagination shape for GET /v1/me/feed (same as other release feeds). */
33
+ export const PersonalizedFeedPaginationSchema = OrgFeedPaginationSchema;
34
+ /**
35
+ * GET /v1/me/feed response — the personalized release feed. Reuses the same item
36
+ * shape as /v1/releases/latest (ReleaseLatestItem); cursor-paginated like other
37
+ * feed-shaped surfaces.
38
+ */
39
+ export const PersonalizedFeedResponseSchema = z.object({
40
+ items: z.array(ReleaseLatestItemSchema),
41
+ pagination: PersonalizedFeedPaginationSchema,
42
+ });
@@ -0,0 +1,374 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Public wire contract for the self-serve listing lane (#1947):
4
+ * POST /v1/listing/validate and POST /v1/listing/activate. This projection is
5
+ * deliberately independent of the internal materialization plan — it is the
6
+ * stable shape web/CLI consume while internals stay free to change.
7
+ */
8
+ export declare const ListingValidateBodySchema: z.ZodObject<{
9
+ domain: z.ZodString;
10
+ }, z.core.$strict>;
11
+ export type ListingValidateBody = z.infer<typeof ListingValidateBodySchema>;
12
+ export declare const ListingActivateBodySchema: z.ZodObject<{
13
+ domain: z.ZodString;
14
+ requestTracking: z.ZodOptional<z.ZodBoolean>;
15
+ }, z.core.$strict>;
16
+ export type ListingActivateBody = z.infer<typeof ListingActivateBodySchema>;
17
+ export declare const ListingIssueSchema: z.ZodObject<{
18
+ path: z.ZodString;
19
+ message: z.ZodString;
20
+ }, z.core.$strict>;
21
+ export type ListingIssue = z.infer<typeof ListingIssueSchema>;
22
+ /** One follow-up the owner takes after declaring `publish: "push"`. */
23
+ export declare const ListingSetupStepSchema: z.ZodObject<{
24
+ id: z.ZodEnum<{
25
+ action: "action";
26
+ token: "token";
27
+ verify: "verify";
28
+ }>;
29
+ title: z.ZodString;
30
+ detail: z.ZodString;
31
+ }, z.core.$strict>;
32
+ export type ListingSetupStep = z.infer<typeof ListingSetupStepSchema>;
33
+ export declare const ListingLocationSchema: z.ZodObject<{
34
+ locator: z.ZodString;
35
+ kind: z.ZodEnum<{
36
+ appstore: "appstore";
37
+ feed: "feed";
38
+ file: "file";
39
+ github: "github";
40
+ push: "push";
41
+ url: "url";
42
+ }>;
43
+ classification: z.ZodEnum<{
44
+ "push-setup": "push-setup";
45
+ "tier1-live": "tier1-live";
46
+ "tier2-paused-review": "tier2-paused-review";
47
+ }>;
48
+ becomes: z.ZodString;
49
+ productName: z.ZodOptional<z.ZodString>;
50
+ path: z.ZodOptional<z.ZodString>;
51
+ setupSteps: z.ZodOptional<z.ZodArray<z.ZodObject<{
52
+ id: z.ZodEnum<{
53
+ action: "action";
54
+ token: "token";
55
+ verify: "verify";
56
+ }>;
57
+ title: z.ZodString;
58
+ detail: z.ZodString;
59
+ }, z.core.$strict>>>;
60
+ }, z.core.$strict>;
61
+ export type ListingLocation = z.infer<typeof ListingLocationSchema>;
62
+ export declare const ListingOrgPointerSchema: z.ZodObject<{
63
+ slug: z.ZodString;
64
+ name: z.ZodString;
65
+ webUrl: z.ZodString;
66
+ }, z.core.$strict>;
67
+ export type ListingOrgPointer = z.infer<typeof ListingOrgPointerSchema>;
68
+ export declare const ListingValidationResultSchema: z.ZodObject<{
69
+ valid: z.ZodBoolean;
70
+ errors: z.ZodArray<z.ZodObject<{
71
+ path: z.ZodString;
72
+ message: z.ZodString;
73
+ }, z.core.$strict>>;
74
+ domainStatus: z.ZodEnum<{
75
+ listed: "listed";
76
+ stub: "stub";
77
+ unlisted: "unlisted";
78
+ }>;
79
+ org: z.ZodOptional<z.ZodObject<{
80
+ slug: z.ZodString;
81
+ name: z.ZodString;
82
+ webUrl: z.ZodString;
83
+ }, z.core.$strict>>;
84
+ identity: z.ZodOptional<z.ZodObject<{
85
+ name: z.ZodString;
86
+ slug: z.ZodString;
87
+ domain: z.ZodString;
88
+ }, z.core.$strict>>;
89
+ products: z.ZodOptional<z.ZodArray<z.ZodObject<{
90
+ name: z.ZodString;
91
+ locationCount: z.ZodNumber;
92
+ }, z.core.$strict>>>;
93
+ locations: z.ZodArray<z.ZodObject<{
94
+ locator: z.ZodString;
95
+ kind: z.ZodEnum<{
96
+ appstore: "appstore";
97
+ feed: "feed";
98
+ file: "file";
99
+ github: "github";
100
+ push: "push";
101
+ url: "url";
102
+ }>;
103
+ classification: z.ZodEnum<{
104
+ "push-setup": "push-setup";
105
+ "tier1-live": "tier1-live";
106
+ "tier2-paused-review": "tier2-paused-review";
107
+ }>;
108
+ becomes: z.ZodString;
109
+ productName: z.ZodOptional<z.ZodString>;
110
+ path: z.ZodOptional<z.ZodString>;
111
+ setupSteps: z.ZodOptional<z.ZodArray<z.ZodObject<{
112
+ id: z.ZodEnum<{
113
+ action: "action";
114
+ token: "token";
115
+ verify: "verify";
116
+ }>;
117
+ title: z.ZodString;
118
+ detail: z.ZodString;
119
+ }, z.core.$strict>>>;
120
+ }, z.core.$strict>>;
121
+ }, z.core.$strict>;
122
+ export type ListingValidationResult = z.infer<typeof ListingValidationResultSchema>;
123
+ export declare const ListingActivateResultSchema: z.ZodObject<{
124
+ activated: z.ZodBoolean;
125
+ org: z.ZodObject<{
126
+ slug: z.ZodString;
127
+ name: z.ZodString;
128
+ status: z.ZodEnum<{
129
+ stub: "stub";
130
+ tracked: "tracked";
131
+ }>;
132
+ webUrl: z.ZodString;
133
+ }, z.core.$strict>;
134
+ trackingRequested: z.ZodBoolean;
135
+ }, z.core.$strict>;
136
+ export type ListingActivateResult = z.infer<typeof ListingActivateResultSchema>;
137
+ /**
138
+ * Ownership claim flow (#1947 epic item 2): a signed-in user proves control
139
+ * of a listed domain via a well-known token file OR a DNS TXT record.
140
+ */
141
+ export declare const ListingClaimBodySchema: z.ZodObject<{
142
+ domain: z.ZodString;
143
+ }, z.core.$strict>;
144
+ export type ListingClaimBody = z.infer<typeof ListingClaimBodySchema>;
145
+ export declare const ListingClaimVerifyBodySchema: z.ZodObject<{
146
+ claimId: z.ZodString;
147
+ }, z.core.$strict>;
148
+ export type ListingClaimVerifyBody = z.infer<typeof ListingClaimVerifyBodySchema>;
149
+ export declare const OrgClaimStatusSchema: z.ZodEnum<{
150
+ expired: "expired";
151
+ pending: "pending";
152
+ revoked: "revoked";
153
+ verified: "verified";
154
+ }>;
155
+ export type OrgClaimStatus = z.infer<typeof OrgClaimStatusSchema>;
156
+ export declare const ClaimMethodSchema: z.ZodEnum<{
157
+ "dns-txt": "dns-txt";
158
+ "well-known": "well-known";
159
+ }>;
160
+ export type ClaimMethod = z.infer<typeof ClaimMethodSchema>;
161
+ /**
162
+ * `token` + `instructions` are only present while the claim is `pending` (or
163
+ * on mint) — once verified there's nothing left to prove, and an expired
164
+ * claim's token is stale.
165
+ */
166
+ export declare const OrgClaimSchema: z.ZodObject<{
167
+ id: z.ZodString;
168
+ org: z.ZodObject<{
169
+ slug: z.ZodString;
170
+ name: z.ZodString;
171
+ webUrl: z.ZodString;
172
+ }, z.core.$strict>;
173
+ status: z.ZodEnum<{
174
+ expired: "expired";
175
+ pending: "pending";
176
+ revoked: "revoked";
177
+ verified: "verified";
178
+ }>;
179
+ method: z.ZodOptional<z.ZodEnum<{
180
+ "dns-txt": "dns-txt";
181
+ "well-known": "well-known";
182
+ }>>;
183
+ token: z.ZodOptional<z.ZodString>;
184
+ createdAt: z.ZodString;
185
+ verifiedAt: z.ZodOptional<z.ZodString>;
186
+ revokedAt: z.ZodOptional<z.ZodString>;
187
+ expiresAt: z.ZodString;
188
+ instructions: z.ZodOptional<z.ZodObject<{
189
+ wellKnownUrl: z.ZodString;
190
+ dnsRecordName: z.ZodString;
191
+ }, z.core.$strict>>;
192
+ }, z.core.$strict>;
193
+ export type OrgClaim = z.infer<typeof OrgClaimSchema>;
194
+ export declare const ClaimCheckOutcomeSchema: z.ZodEnum<{
195
+ mismatch: "mismatch";
196
+ ok: "ok";
197
+ unreachable: "unreachable";
198
+ }>;
199
+ export type ClaimCheckOutcome = z.infer<typeof ClaimCheckOutcomeSchema>;
200
+ export declare const ClaimVerifyResultSchema: z.ZodObject<{
201
+ verified: z.ZodBoolean;
202
+ checked: z.ZodObject<{
203
+ wellKnown: z.ZodEnum<{
204
+ mismatch: "mismatch";
205
+ ok: "ok";
206
+ unreachable: "unreachable";
207
+ }>;
208
+ dnsTxt: z.ZodEnum<{
209
+ mismatch: "mismatch";
210
+ ok: "ok";
211
+ unreachable: "unreachable";
212
+ }>;
213
+ }, z.core.$strict>;
214
+ claim: z.ZodObject<{
215
+ id: z.ZodString;
216
+ org: z.ZodObject<{
217
+ slug: z.ZodString;
218
+ name: z.ZodString;
219
+ webUrl: z.ZodString;
220
+ }, z.core.$strict>;
221
+ status: z.ZodEnum<{
222
+ expired: "expired";
223
+ pending: "pending";
224
+ revoked: "revoked";
225
+ verified: "verified";
226
+ }>;
227
+ method: z.ZodOptional<z.ZodEnum<{
228
+ "dns-txt": "dns-txt";
229
+ "well-known": "well-known";
230
+ }>>;
231
+ token: z.ZodOptional<z.ZodString>;
232
+ createdAt: z.ZodString;
233
+ verifiedAt: z.ZodOptional<z.ZodString>;
234
+ revokedAt: z.ZodOptional<z.ZodString>;
235
+ expiresAt: z.ZodString;
236
+ instructions: z.ZodOptional<z.ZodObject<{
237
+ wellKnownUrl: z.ZodString;
238
+ dnsRecordName: z.ZodString;
239
+ }, z.core.$strict>>;
240
+ }, z.core.$strict>;
241
+ }, z.core.$strict>;
242
+ export type ClaimVerifyResult = z.infer<typeof ClaimVerifyResultSchema>;
243
+ export declare const ListingClaimsResultSchema: z.ZodObject<{
244
+ claims: z.ZodArray<z.ZodObject<{
245
+ id: z.ZodString;
246
+ org: z.ZodObject<{
247
+ slug: z.ZodString;
248
+ name: z.ZodString;
249
+ webUrl: z.ZodString;
250
+ }, z.core.$strict>;
251
+ status: z.ZodEnum<{
252
+ expired: "expired";
253
+ pending: "pending";
254
+ revoked: "revoked";
255
+ verified: "verified";
256
+ }>;
257
+ method: z.ZodOptional<z.ZodEnum<{
258
+ "dns-txt": "dns-txt";
259
+ "well-known": "well-known";
260
+ }>>;
261
+ token: z.ZodOptional<z.ZodString>;
262
+ createdAt: z.ZodString;
263
+ verifiedAt: z.ZodOptional<z.ZodString>;
264
+ revokedAt: z.ZodOptional<z.ZodString>;
265
+ expiresAt: z.ZodString;
266
+ instructions: z.ZodOptional<z.ZodObject<{
267
+ wellKnownUrl: z.ZodString;
268
+ dnsRecordName: z.ZodString;
269
+ }, z.core.$strict>>;
270
+ }, z.core.$strict>>;
271
+ }, z.core.$strict>;
272
+ export type ListingClaimsResult = z.infer<typeof ListingClaimsResultSchema>;
273
+ /**
274
+ * Admin view of every claim on an org (`GET /v1/orgs/:slug/claims`, #2389).
275
+ * Never includes the proof token.
276
+ */
277
+ export declare const AdminOrgClaimSchema: z.ZodObject<{
278
+ id: z.ZodString;
279
+ userId: z.ZodString;
280
+ status: z.ZodEnum<{
281
+ expired: "expired";
282
+ pending: "pending";
283
+ revoked: "revoked";
284
+ verified: "verified";
285
+ }>;
286
+ method: z.ZodNullable<z.ZodEnum<{
287
+ "dns-txt": "dns-txt";
288
+ "well-known": "well-known";
289
+ }>>;
290
+ createdAt: z.ZodString;
291
+ verifiedAt: z.ZodNullable<z.ZodString>;
292
+ expiresAt: z.ZodString;
293
+ revokedAt: z.ZodNullable<z.ZodString>;
294
+ revokedBy: z.ZodNullable<z.ZodString>;
295
+ revokeReason: z.ZodNullable<z.ZodString>;
296
+ }, z.core.$strict>;
297
+ export type AdminOrgClaim = z.infer<typeof AdminOrgClaimSchema>;
298
+ export declare const ListOrgClaimsResponseSchema: z.ZodObject<{
299
+ claims: z.ZodArray<z.ZodObject<{
300
+ id: z.ZodString;
301
+ userId: z.ZodString;
302
+ status: z.ZodEnum<{
303
+ expired: "expired";
304
+ pending: "pending";
305
+ revoked: "revoked";
306
+ verified: "verified";
307
+ }>;
308
+ method: z.ZodNullable<z.ZodEnum<{
309
+ "dns-txt": "dns-txt";
310
+ "well-known": "well-known";
311
+ }>>;
312
+ createdAt: z.ZodString;
313
+ verifiedAt: z.ZodNullable<z.ZodString>;
314
+ expiresAt: z.ZodString;
315
+ revokedAt: z.ZodNullable<z.ZodString>;
316
+ revokedBy: z.ZodNullable<z.ZodString>;
317
+ revokeReason: z.ZodNullable<z.ZodString>;
318
+ }, z.core.$strict>>;
319
+ }, z.core.$strict>;
320
+ export type ListOrgClaimsResponse = z.infer<typeof ListOrgClaimsResponseSchema>;
321
+ /** `DELETE /v1/orgs/:slug/claims/:id` body — admins must say why. */
322
+ export declare const RevokeOrgClaimBodySchema: z.ZodObject<{
323
+ reason: z.ZodString;
324
+ }, z.core.$strict>;
325
+ export type RevokeOrgClaimBody = z.infer<typeof RevokeOrgClaimBodySchema>;
326
+ /**
327
+ * Self-serve Tier-1 promotion (#1947): a verified owner
328
+ * promotes their claimed stub to `tracked`. Independent of the internal
329
+ * materialization plan — this is the stable public projection.
330
+ */
331
+ export declare const ListingPromoteBodySchema: z.ZodObject<{
332
+ domain: z.ZodString;
333
+ }, z.core.$strict>;
334
+ export type ListingPromoteBody = z.infer<typeof ListingPromoteBodySchema>;
335
+ export declare const ListingPromoteLocatorOutcomeSchema: z.ZodEnum<{
336
+ live: "live";
337
+ "queued-for-review": "queued-for-review";
338
+ }>;
339
+ export type ListingPromoteLocatorOutcome = z.infer<typeof ListingPromoteLocatorOutcomeSchema>;
340
+ export declare const ListingPromoteLocatorSchema: z.ZodObject<{
341
+ locator: z.ZodString;
342
+ outcome: z.ZodEnum<{
343
+ live: "live";
344
+ "queued-for-review": "queued-for-review";
345
+ }>;
346
+ }, z.core.$strict>;
347
+ export type ListingPromoteLocator = z.infer<typeof ListingPromoteLocatorSchema>;
348
+ export declare const ListingPromoteResultSchema: z.ZodObject<{
349
+ promoted: z.ZodBoolean;
350
+ alreadyTracked: z.ZodOptional<z.ZodBoolean>;
351
+ sources: z.ZodObject<{
352
+ created: z.ZodNumber;
353
+ matched: z.ZodNumber;
354
+ }, z.core.$strict>;
355
+ locators: z.ZodArray<z.ZodObject<{
356
+ locator: z.ZodString;
357
+ outcome: z.ZodEnum<{
358
+ live: "live";
359
+ "queued-for-review": "queued-for-review";
360
+ }>;
361
+ }, z.core.$strict>>;
362
+ }, z.core.$strict>;
363
+ export type ListingPromoteResult = z.infer<typeof ListingPromoteResultSchema>;
364
+ /**
365
+ * Public capability flags for the listing lane. Anonymous + always reachable
366
+ * (does NOT 404 when either kill switch is off) so the web UI can hide CTAs
367
+ * instead of offering a button that fails with "Not found".
368
+ */
369
+ export declare const ListingCapabilitiesSchema: z.ZodObject<{
370
+ selfServeEnabled: z.ZodBoolean;
371
+ promotionEnabled: z.ZodBoolean;
372
+ }, z.core.$strict>;
373
+ export type ListingCapabilities = z.infer<typeof ListingCapabilitiesSchema>;
374
+ //# sourceMappingURL=listing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listing.d.ts","sourceRoot":"","sources":["../../src/schemas/listing.ts"],"names":[],"mappings":"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"}