@buildinternet/releases-api-types 0.29.0 → 0.30.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.
- package/package.json +1 -1
- package/src/api-types.ts +6 -0
- package/src/schemas/orgs.ts +13 -0
package/package.json
CHANGED
package/src/api-types.ts
CHANGED
|
@@ -32,6 +32,8 @@ import type {
|
|
|
32
32
|
OrgTagsResponseSchema,
|
|
33
33
|
CreateOrgBodySchema,
|
|
34
34
|
UpdateOrgBodySchema,
|
|
35
|
+
SetOrgAvatarBodySchema,
|
|
36
|
+
SetOrgAvatarResponseSchema,
|
|
35
37
|
OrgDetailSchema,
|
|
36
38
|
OrgCatalogItemSchema,
|
|
37
39
|
OrgCatalogResponseSchema,
|
|
@@ -260,6 +262,8 @@ export {
|
|
|
260
262
|
OrgTagsResponseSchema,
|
|
261
263
|
CreateOrgBodySchema,
|
|
262
264
|
UpdateOrgBodySchema,
|
|
265
|
+
SetOrgAvatarBodySchema,
|
|
266
|
+
SetOrgAvatarResponseSchema,
|
|
263
267
|
OrgDetailSchema,
|
|
264
268
|
OrgCatalogItemSchema,
|
|
265
269
|
OrgCatalogResponseSchema,
|
|
@@ -515,6 +519,8 @@ export type OrgAccountsResponse = z.infer<typeof OrgAccountsResponseSchema>;
|
|
|
515
519
|
export type OrgTagsResponse = z.infer<typeof OrgTagsResponseSchema>;
|
|
516
520
|
export type CreateOrgBody = z.infer<typeof CreateOrgBodySchema>;
|
|
517
521
|
export type UpdateOrgBody = z.infer<typeof UpdateOrgBodySchema>;
|
|
522
|
+
export type SetOrgAvatarBody = z.infer<typeof SetOrgAvatarBodySchema>;
|
|
523
|
+
export type SetOrgAvatarResponse = z.infer<typeof SetOrgAvatarResponseSchema>;
|
|
518
524
|
export type OrgDetail = z.infer<typeof OrgDetailSchema>;
|
|
519
525
|
|
|
520
526
|
export type OrgCatalogItem = z.infer<typeof OrgCatalogItemSchema>;
|
package/src/schemas/orgs.ts
CHANGED
|
@@ -118,6 +118,19 @@ export const UpdateOrgBodySchema = z.object({
|
|
|
118
118
|
notice: NoticeSchema.nullable().optional(),
|
|
119
119
|
});
|
|
120
120
|
|
|
121
|
+
/** Body for `POST /v1/orgs/:slug/avatar` — the remote image to mirror to R2 (#1406). */
|
|
122
|
+
export const SetOrgAvatarBodySchema = z.object({
|
|
123
|
+
sourceUrl: z.url(),
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
/** Response for `POST /v1/orgs/:slug/avatar` — the mirrored avatar's public URL + dims. */
|
|
127
|
+
export const SetOrgAvatarResponseSchema = z.object({
|
|
128
|
+
avatarUrl: z.string(),
|
|
129
|
+
key: z.string(),
|
|
130
|
+
width: z.number(),
|
|
131
|
+
height: z.number(),
|
|
132
|
+
});
|
|
133
|
+
|
|
121
134
|
// Org detail's products query selects a strict subset of `ProductListItem` —
|
|
122
135
|
// no category/orgId because the parent already names the org; createdAt is
|
|
123
136
|
// included for age-based filtering by consumers.
|