@aurora-interactive/fankare-api-sdk 0.0.5 → 0.1.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 (179) hide show
  1. package/FUNCTIONS.md +0 -1
  2. package/README.md +28 -8
  3. package/esm/funcs/internal-asset-processing-callback.d.ts +17 -0
  4. package/esm/funcs/internal-asset-processing-callback.d.ts.map +1 -0
  5. package/esm/funcs/internal-asset-processing-callback.js +96 -0
  6. package/esm/funcs/internal-asset-processing-callback.js.map +1 -0
  7. package/esm/funcs/me-confirm-avatar-upload.d.ts +14 -0
  8. package/esm/funcs/me-confirm-avatar-upload.d.ts.map +1 -0
  9. package/esm/funcs/me-confirm-avatar-upload.js +78 -0
  10. package/esm/funcs/me-confirm-avatar-upload.js.map +1 -0
  11. package/esm/funcs/me-confirm-banner-upload.d.ts +14 -0
  12. package/esm/funcs/me-confirm-banner-upload.d.ts.map +1 -0
  13. package/esm/funcs/me-confirm-banner-upload.js +78 -0
  14. package/esm/funcs/me-confirm-banner-upload.js.map +1 -0
  15. package/esm/funcs/me-get-me.d.ts +14 -0
  16. package/esm/funcs/me-get-me.d.ts.map +1 -0
  17. package/esm/funcs/me-get-me.js +67 -0
  18. package/esm/funcs/me-get-me.js.map +1 -0
  19. package/esm/funcs/me-request-avatar-upload-url.d.ts +14 -0
  20. package/esm/funcs/me-request-avatar-upload-url.d.ts.map +1 -0
  21. package/esm/funcs/me-request-avatar-upload-url.js +78 -0
  22. package/esm/funcs/me-request-avatar-upload-url.js.map +1 -0
  23. package/esm/funcs/me-request-banner-upload-url.d.ts +14 -0
  24. package/esm/funcs/me-request-banner-upload-url.d.ts.map +1 -0
  25. package/esm/funcs/me-request-banner-upload-url.js +78 -0
  26. package/esm/funcs/me-request-banner-upload-url.js.map +1 -0
  27. package/esm/funcs/me-update-me.d.ts +14 -0
  28. package/esm/funcs/me-update-me.d.ts.map +1 -0
  29. package/esm/funcs/me-update-me.js +78 -0
  30. package/esm/funcs/me-update-me.js.map +1 -0
  31. package/esm/funcs/posts-create-post.d.ts +5 -3
  32. package/esm/funcs/posts-create-post.d.ts.map +1 -1
  33. package/esm/funcs/posts-create-post.js +5 -3
  34. package/esm/funcs/posts-create-post.js.map +1 -1
  35. package/esm/funcs/posts-delete-post.d.ts +13 -0
  36. package/esm/funcs/posts-delete-post.d.ts.map +1 -0
  37. package/esm/funcs/posts-delete-post.js +86 -0
  38. package/esm/funcs/posts-delete-post.js.map +1 -0
  39. package/esm/funcs/posts-get-post.d.ts +14 -0
  40. package/esm/funcs/posts-get-post.d.ts.map +1 -0
  41. package/esm/funcs/posts-get-post.js +87 -0
  42. package/esm/funcs/posts-get-post.js.map +1 -0
  43. package/esm/funcs/posts-update-post.d.ts +17 -0
  44. package/esm/funcs/posts-update-post.d.ts.map +1 -0
  45. package/esm/funcs/posts-update-post.js +92 -0
  46. package/esm/funcs/posts-update-post.js.map +1 -0
  47. package/esm/lib/config.d.ts +3 -3
  48. package/esm/lib/config.js +3 -3
  49. package/esm/models/asset-declaration.d.ts +52 -0
  50. package/esm/models/asset-declaration.d.ts.map +1 -0
  51. package/esm/models/asset-declaration.js +37 -0
  52. package/esm/models/asset-declaration.js.map +1 -0
  53. package/esm/models/asset-processing-callback-request.d.ts +39 -0
  54. package/esm/models/asset-processing-callback-request.d.ts.map +1 -0
  55. package/esm/models/asset-processing-callback-request.js +24 -0
  56. package/esm/models/asset-processing-callback-request.js.map +1 -0
  57. package/esm/models/create-post-request.d.ts +11 -22
  58. package/esm/models/create-post-request.d.ts.map +1 -1
  59. package/esm/models/create-post-request.js +3 -16
  60. package/esm/models/create-post-request.js.map +1 -1
  61. package/esm/models/create-post-response.d.ts +18 -0
  62. package/esm/models/create-post-response.d.ts.map +1 -0
  63. package/esm/models/create-post-response.js +17 -0
  64. package/esm/models/create-post-response.js.map +1 -0
  65. package/esm/models/index.d.ts +9 -0
  66. package/esm/models/index.d.ts.map +1 -1
  67. package/esm/models/index.js +9 -0
  68. package/esm/models/index.js.map +1 -1
  69. package/esm/models/media-asset.d.ts +11 -5
  70. package/esm/models/media-asset.d.ts.map +1 -1
  71. package/esm/models/media-asset.js +4 -5
  72. package/esm/models/media-asset.js.map +1 -1
  73. package/esm/models/operations/asset-processing-callback.d.ts +17 -0
  74. package/esm/models/operations/asset-processing-callback.d.ts.map +1 -0
  75. package/esm/models/operations/asset-processing-callback.js +16 -0
  76. package/esm/models/operations/asset-processing-callback.js.map +1 -0
  77. package/esm/models/operations/delete-post.d.ts +12 -0
  78. package/esm/models/operations/delete-post.d.ts.map +1 -0
  79. package/esm/models/operations/delete-post.js +13 -0
  80. package/esm/models/operations/delete-post.js.map +1 -0
  81. package/esm/models/operations/get-post.d.ts +12 -0
  82. package/esm/models/operations/get-post.d.ts.map +1 -0
  83. package/esm/models/operations/get-post.js +13 -0
  84. package/esm/models/operations/get-post.js.map +1 -0
  85. package/esm/models/operations/index.d.ts +4 -1
  86. package/esm/models/operations/index.d.ts.map +1 -1
  87. package/esm/models/operations/index.js +4 -1
  88. package/esm/models/operations/index.js.map +1 -1
  89. package/esm/models/operations/update-post.d.ts +15 -0
  90. package/esm/models/operations/update-post.d.ts.map +1 -0
  91. package/esm/models/operations/update-post.js +15 -0
  92. package/esm/models/operations/update-post.js.map +1 -0
  93. package/esm/models/post.d.ts +20 -1
  94. package/esm/models/post.d.ts.map +1 -1
  95. package/esm/models/post.js +13 -1
  96. package/esm/models/post.js.map +1 -1
  97. package/esm/models/profile-media-confirm-request.d.ts +15 -0
  98. package/esm/models/profile-media-confirm-request.d.ts.map +1 -0
  99. package/esm/models/profile-media-confirm-request.js +13 -0
  100. package/esm/models/profile-media-confirm-request.js.map +1 -0
  101. package/esm/models/profile-media-upload-request.d.ts +30 -0
  102. package/esm/models/profile-media-upload-request.d.ts.map +1 -0
  103. package/esm/models/profile-media-upload-request.js +23 -0
  104. package/esm/models/profile-media-upload-request.js.map +1 -0
  105. package/esm/models/profile-media-upload-response.d.ts +21 -0
  106. package/esm/models/profile-media-upload-response.d.ts.map +1 -0
  107. package/esm/models/profile-media-upload-response.js +17 -0
  108. package/esm/models/profile-media-upload-response.js.map +1 -0
  109. package/esm/models/register-request.d.ts +2 -2
  110. package/esm/models/register-request.d.ts.map +1 -1
  111. package/esm/models/register-request.js +1 -1
  112. package/esm/models/register-request.js.map +1 -1
  113. package/esm/models/update-post-request.d.ts +30 -0
  114. package/esm/models/update-post-request.d.ts.map +1 -0
  115. package/esm/models/update-post-request.js +22 -0
  116. package/esm/models/update-post-request.js.map +1 -0
  117. package/esm/models/update-profile-request.d.ts +17 -0
  118. package/esm/models/update-profile-request.d.ts.map +1 -0
  119. package/esm/models/update-profile-request.js +14 -0
  120. package/esm/models/update-profile-request.js.map +1 -0
  121. package/esm/models/upload-slot.d.ts +29 -0
  122. package/esm/models/upload-slot.d.ts.map +1 -0
  123. package/esm/models/upload-slot.js +20 -0
  124. package/esm/models/upload-slot.js.map +1 -0
  125. package/esm/sdk/internal.d.ts +12 -0
  126. package/esm/sdk/internal.d.ts.map +1 -0
  127. package/esm/sdk/internal.js +19 -0
  128. package/esm/sdk/internal.js.map +1 -0
  129. package/esm/sdk/me.d.ts +29 -0
  130. package/esm/sdk/me.d.ts.map +1 -0
  131. package/esm/sdk/me.js +51 -0
  132. package/esm/sdk/me.js.map +1 -0
  133. package/esm/sdk/posts.d.ts +20 -3
  134. package/esm/sdk/posts.d.ts.map +1 -1
  135. package/esm/sdk/posts.js +28 -1
  136. package/esm/sdk/posts.js.map +1 -1
  137. package/esm/sdk/sdk.d.ts +6 -0
  138. package/esm/sdk/sdk.d.ts.map +1 -1
  139. package/esm/sdk/sdk.js +10 -0
  140. package/esm/sdk/sdk.js.map +1 -1
  141. package/examples/authenticationRegisterUser.example.ts +0 -1
  142. package/jsr.json +1 -1
  143. package/package.json +1 -1
  144. package/src/funcs/internal-asset-processing-callback.ts +190 -0
  145. package/src/funcs/me-confirm-avatar-upload.ts +161 -0
  146. package/src/funcs/me-confirm-banner-upload.ts +161 -0
  147. package/src/funcs/me-get-me.ts +142 -0
  148. package/src/funcs/me-request-avatar-upload-url.ts +161 -0
  149. package/src/funcs/me-request-banner-upload-url.ts +161 -0
  150. package/src/funcs/me-update-me.ts +161 -0
  151. package/src/funcs/posts-create-post.ts +9 -7
  152. package/src/funcs/posts-delete-post.ts +170 -0
  153. package/src/funcs/posts-get-post.ts +171 -0
  154. package/src/funcs/posts-update-post.ts +179 -0
  155. package/src/lib/config.ts +3 -3
  156. package/src/models/asset-declaration.ts +84 -0
  157. package/src/models/asset-processing-callback-request.ts +68 -0
  158. package/src/models/create-post-request.ts +17 -39
  159. package/src/models/create-post-response.ts +41 -0
  160. package/src/models/index.ts +9 -0
  161. package/src/models/media-asset.ts +16 -8
  162. package/src/models/operations/asset-processing-callback.ts +40 -0
  163. package/src/models/operations/delete-post.ts +31 -0
  164. package/src/models/operations/get-post.ts +27 -0
  165. package/src/models/operations/index.ts +4 -1
  166. package/src/models/operations/update-post.ts +35 -0
  167. package/src/models/post.ts +27 -2
  168. package/src/models/profile-media-confirm-request.ts +34 -0
  169. package/src/models/profile-media-upload-request.ts +55 -0
  170. package/src/models/profile-media-upload-response.ts +45 -0
  171. package/src/models/register-request.ts +3 -3
  172. package/src/models/update-post-request.ts +56 -0
  173. package/src/models/update-profile-request.ts +37 -0
  174. package/src/models/upload-slot.ts +53 -0
  175. package/src/sdk/internal.ts +32 -0
  176. package/src/sdk/me.ts +98 -0
  177. package/src/sdk/posts.ts +55 -3
  178. package/src/sdk/sdk.ts +12 -0
  179. package/src/models/operations/create-post.ts +0 -62
@@ -17,18 +17,24 @@ export const MediaAssetMediaType = {
17
17
  } as const;
18
18
  export type MediaAssetMediaType = OpenEnum<typeof MediaAssetMediaType>;
19
19
 
20
- export const Status = {
20
+ export const MediaAssetStatus = {
21
21
  Processing: "PROCESSING",
22
22
  Ready: "READY",
23
23
  Failed: "FAILED",
24
24
  } as const;
25
- export type Status = OpenEnum<typeof Status>;
25
+ export type MediaAssetStatus = OpenEnum<typeof MediaAssetStatus>;
26
26
 
27
27
  export type MediaAsset = {
28
28
  id?: number | undefined;
29
- mediaUrl?: string | undefined;
29
+ /**
30
+ * Fully qualified URL to the processed output file in SeaweedFS. Null while the asset is still PROCESSING.
31
+ */
32
+ mediaUrl?: string | null | undefined;
30
33
  mediaType?: MediaAssetMediaType | undefined;
31
- status?: Status | undefined;
34
+ status?: MediaAssetStatus | undefined;
35
+ /**
36
+ * Zero-based display order of the asset within the post carousel.
37
+ */
32
38
  sortOrder?: number | undefined;
33
39
  };
34
40
 
@@ -39,16 +45,18 @@ export const MediaAssetMediaType$inboundSchema: z.ZodMiniType<
39
45
  > = openEnums.inboundSchema(MediaAssetMediaType);
40
46
 
41
47
  /** @internal */
42
- export const Status$inboundSchema: z.ZodMiniType<Status, unknown> = openEnums
43
- .inboundSchema(Status);
48
+ export const MediaAssetStatus$inboundSchema: z.ZodMiniType<
49
+ MediaAssetStatus,
50
+ unknown
51
+ > = openEnums.inboundSchema(MediaAssetStatus);
44
52
 
45
53
  /** @internal */
46
54
  export const MediaAsset$inboundSchema: z.ZodMiniType<MediaAsset, unknown> = z
47
55
  .object({
48
56
  id: types.optional(types.number()),
49
- mediaUrl: types.optional(types.string()),
57
+ mediaUrl: z.optional(z.nullable(types.string())),
50
58
  mediaType: types.optional(MediaAssetMediaType$inboundSchema),
51
- status: types.optional(Status$inboundSchema),
59
+ status: types.optional(MediaAssetStatus$inboundSchema),
52
60
  sortOrder: types.optional(types.number()),
53
61
  });
54
62
 
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: f56cb37b1a71
4
+ */
5
+
6
+ import * as z from "zod/v4-mini";
7
+ import * as models from "../index.js";
8
+
9
+ export type AssetProcessingCallbackRequest = {
10
+ postId: number;
11
+ assetId: number;
12
+ body: models.AssetProcessingCallbackRequest;
13
+ };
14
+
15
+ /** @internal */
16
+ export type AssetProcessingCallbackRequest$Outbound = {
17
+ postId: number;
18
+ assetId: number;
19
+ body: models.AssetProcessingCallbackRequest$Outbound;
20
+ };
21
+
22
+ /** @internal */
23
+ export const AssetProcessingCallbackRequest$outboundSchema: z.ZodMiniType<
24
+ AssetProcessingCallbackRequest$Outbound,
25
+ AssetProcessingCallbackRequest
26
+ > = z.object({
27
+ postId: z.int(),
28
+ assetId: z.int(),
29
+ body: models.AssetProcessingCallbackRequest$outboundSchema,
30
+ });
31
+
32
+ export function assetProcessingCallbackRequestToJSON(
33
+ assetProcessingCallbackRequest: AssetProcessingCallbackRequest,
34
+ ): string {
35
+ return JSON.stringify(
36
+ AssetProcessingCallbackRequest$outboundSchema.parse(
37
+ assetProcessingCallbackRequest,
38
+ ),
39
+ );
40
+ }
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 2d3c4c4d46f8
4
+ */
5
+
6
+ import * as z from "zod/v4-mini";
7
+
8
+ export type DeletePostRequest = {
9
+ postId: number;
10
+ };
11
+
12
+ /** @internal */
13
+ export type DeletePostRequest$Outbound = {
14
+ postId: number;
15
+ };
16
+
17
+ /** @internal */
18
+ export const DeletePostRequest$outboundSchema: z.ZodMiniType<
19
+ DeletePostRequest$Outbound,
20
+ DeletePostRequest
21
+ > = z.object({
22
+ postId: z.int(),
23
+ });
24
+
25
+ export function deletePostRequestToJSON(
26
+ deletePostRequest: DeletePostRequest,
27
+ ): string {
28
+ return JSON.stringify(
29
+ DeletePostRequest$outboundSchema.parse(deletePostRequest),
30
+ );
31
+ }
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: e9168f4e2a0d
4
+ */
5
+
6
+ import * as z from "zod/v4-mini";
7
+
8
+ export type GetPostRequest = {
9
+ postId: number;
10
+ };
11
+
12
+ /** @internal */
13
+ export type GetPostRequest$Outbound = {
14
+ postId: number;
15
+ };
16
+
17
+ /** @internal */
18
+ export const GetPostRequest$outboundSchema: z.ZodMiniType<
19
+ GetPostRequest$Outbound,
20
+ GetPostRequest
21
+ > = z.object({
22
+ postId: z.int(),
23
+ });
24
+
25
+ export function getPostRequestToJSON(getPostRequest: GetPostRequest): string {
26
+ return JSON.stringify(GetPostRequest$outboundSchema.parse(getPostRequest));
27
+ }
@@ -4,13 +4,15 @@
4
4
  */
5
5
 
6
6
  export * from "./add-collection-member.js";
7
+ export * from "./asset-processing-callback.js";
7
8
  export * from "./create-collection.js";
8
- export * from "./create-post.js";
9
+ export * from "./delete-post.js";
9
10
  export * from "./get-collection-feed.js";
10
11
  export * from "./get-collection-members.js";
11
12
  export * from "./get-creator-posts.js";
12
13
  export * from "./get-feed.js";
13
14
  export * from "./get-message-history.js";
15
+ export * from "./get-post.js";
14
16
  export * from "./get-user-profile.js";
15
17
  export * from "./login-user.js";
16
18
  export * from "./remove-collection-member.js";
@@ -18,3 +20,4 @@ export * from "./search-users.js";
18
20
  export * from "./send-message.js";
19
21
  export * from "./subscribe-to-user.js";
20
22
  export * from "./unsubscribe-from-user.js";
23
+ export * from "./update-post.js";
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: ca5a5edf4af7
4
+ */
5
+
6
+ import * as z from "zod/v4-mini";
7
+ import * as models from "../index.js";
8
+
9
+ export type UpdatePostRequest = {
10
+ postId: number;
11
+ body: models.UpdatePostRequest;
12
+ };
13
+
14
+ /** @internal */
15
+ export type UpdatePostRequest$Outbound = {
16
+ postId: number;
17
+ body: models.UpdatePostRequest$Outbound;
18
+ };
19
+
20
+ /** @internal */
21
+ export const UpdatePostRequest$outboundSchema: z.ZodMiniType<
22
+ UpdatePostRequest$Outbound,
23
+ UpdatePostRequest
24
+ > = z.object({
25
+ postId: z.int(),
26
+ body: models.UpdatePostRequest$outboundSchema,
27
+ });
28
+
29
+ export function updatePostRequestToJSON(
30
+ updatePostRequest: UpdatePostRequest,
31
+ ): string {
32
+ return JSON.stringify(
33
+ UpdatePostRequest$outboundSchema.parse(updatePostRequest),
34
+ );
35
+ }
@@ -5,26 +5,51 @@
5
5
 
6
6
  import * as z from "zod/v4-mini";
7
7
  import { safeParse } from "../lib/schemas.js";
8
+ import * as openEnums from "../types/enums.js";
9
+ import { OpenEnum } from "../types/enums.js";
8
10
  import { Result as SafeParseResult } from "../types/fp.js";
9
11
  import * as types from "../types/primitives.js";
10
12
  import { SDKValidationError } from "./errors/sdk-validation-error.js";
11
13
  import { MediaAsset, MediaAsset$inboundSchema } from "./media-asset.js";
12
14
 
15
+ /**
16
+ * DRAFT posts are only visible to the owning creator. PUBLISHED posts appear in subscriber feeds.
17
+ */
18
+ export const PostStatus = {
19
+ Draft: "DRAFT",
20
+ Published: "PUBLISHED",
21
+ } as const;
22
+ /**
23
+ * DRAFT posts are only visible to the owning creator. PUBLISHED posts appear in subscriber feeds.
24
+ */
25
+ export type PostStatus = OpenEnum<typeof PostStatus>;
26
+
13
27
  export type Post = {
14
28
  id?: number | undefined;
15
29
  userId?: number | undefined;
16
- caption?: string | undefined;
30
+ caption?: string | null | undefined;
31
+ /**
32
+ * DRAFT posts are only visible to the owning creator. PUBLISHED posts appear in subscriber feeds.
33
+ */
34
+ status?: PostStatus | undefined;
17
35
  assets?: Array<MediaAsset> | undefined;
18
36
  createdAt?: Date | undefined;
37
+ updatedAt?: Date | undefined;
19
38
  };
20
39
 
40
+ /** @internal */
41
+ export const PostStatus$inboundSchema: z.ZodMiniType<PostStatus, unknown> =
42
+ openEnums.inboundSchema(PostStatus);
43
+
21
44
  /** @internal */
22
45
  export const Post$inboundSchema: z.ZodMiniType<Post, unknown> = z.object({
23
46
  id: types.optional(types.number()),
24
47
  userId: types.optional(types.number()),
25
- caption: types.optional(types.string()),
48
+ caption: z.optional(z.nullable(types.string())),
49
+ status: types.optional(PostStatus$inboundSchema),
26
50
  assets: types.optional(z.array(MediaAsset$inboundSchema)),
27
51
  createdAt: types.optional(types.date()),
52
+ updatedAt: types.optional(types.date()),
28
53
  });
29
54
 
30
55
  export function postFromJSON(
@@ -0,0 +1,34 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 798bece0ede8
4
+ */
5
+
6
+ import * as z from "zod/v4-mini";
7
+
8
+ export type ProfileMediaConfirmRequest = {
9
+ /**
10
+ * The mediaKey value returned by the corresponding upload-url response. The gateway verifies a HMAC signature embedded in the key to prevent clients from supplying arbitrary paths.
11
+ */
12
+ mediaKey: string;
13
+ };
14
+
15
+ /** @internal */
16
+ export type ProfileMediaConfirmRequest$Outbound = {
17
+ mediaKey: string;
18
+ };
19
+
20
+ /** @internal */
21
+ export const ProfileMediaConfirmRequest$outboundSchema: z.ZodMiniType<
22
+ ProfileMediaConfirmRequest$Outbound,
23
+ ProfileMediaConfirmRequest
24
+ > = z.object({
25
+ mediaKey: z.string(),
26
+ });
27
+
28
+ export function profileMediaConfirmRequestToJSON(
29
+ profileMediaConfirmRequest: ProfileMediaConfirmRequest,
30
+ ): string {
31
+ return JSON.stringify(
32
+ ProfileMediaConfirmRequest$outboundSchema.parse(profileMediaConfirmRequest),
33
+ );
34
+ }
@@ -0,0 +1,55 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: a4c6edf5ee58
4
+ */
5
+
6
+ import * as z from "zod/v4-mini";
7
+ import { ClosedEnum } from "../types/enums.js";
8
+
9
+ /**
10
+ * MIME type of the file to be uploaded. Must be an accepted image type.
11
+ */
12
+ export const ProfileMediaUploadRequestContentType = {
13
+ ImageJpeg: "image/jpeg",
14
+ ImagePng: "image/png",
15
+ ImageWebp: "image/webp",
16
+ } as const;
17
+ /**
18
+ * MIME type of the file to be uploaded. Must be an accepted image type.
19
+ */
20
+ export type ProfileMediaUploadRequestContentType = ClosedEnum<
21
+ typeof ProfileMediaUploadRequestContentType
22
+ >;
23
+
24
+ export type ProfileMediaUploadRequest = {
25
+ /**
26
+ * MIME type of the file to be uploaded. Must be an accepted image type.
27
+ */
28
+ contentType: ProfileMediaUploadRequestContentType;
29
+ };
30
+
31
+ /** @internal */
32
+ export const ProfileMediaUploadRequestContentType$outboundSchema: z.ZodMiniEnum<
33
+ typeof ProfileMediaUploadRequestContentType
34
+ > = z.enum(ProfileMediaUploadRequestContentType);
35
+
36
+ /** @internal */
37
+ export type ProfileMediaUploadRequest$Outbound = {
38
+ contentType: string;
39
+ };
40
+
41
+ /** @internal */
42
+ export const ProfileMediaUploadRequest$outboundSchema: z.ZodMiniType<
43
+ ProfileMediaUploadRequest$Outbound,
44
+ ProfileMediaUploadRequest
45
+ > = z.object({
46
+ contentType: ProfileMediaUploadRequestContentType$outboundSchema,
47
+ });
48
+
49
+ export function profileMediaUploadRequestToJSON(
50
+ profileMediaUploadRequest: ProfileMediaUploadRequest,
51
+ ): string {
52
+ return JSON.stringify(
53
+ ProfileMediaUploadRequest$outboundSchema.parse(profileMediaUploadRequest),
54
+ );
55
+ }
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 1829b849d292
4
+ */
5
+
6
+ import * as z from "zod/v4-mini";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../types/fp.js";
9
+ import * as types from "../types/primitives.js";
10
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
11
+
12
+ export type ProfileMediaUploadResponse = {
13
+ /**
14
+ * Presigned HTTP PUT URL targeting the SeaweedFS volume. The client must issue a single PUT request with the binary file body and the matching Content-Type header. The URL is valid for the duration indicated by expiresInSeconds.
15
+ */
16
+ uploadUrl?: string | undefined;
17
+ /**
18
+ * The canonical SeaweedFS object key that will be persisted to the user record upon confirm. The client does not need to parse or store this value; it is echoed back in the confirm request body.
19
+ */
20
+ mediaKey?: string | undefined;
21
+ /**
22
+ * Number of seconds from now until the presigned URL expires.
23
+ */
24
+ expiresInSeconds?: number | undefined;
25
+ };
26
+
27
+ /** @internal */
28
+ export const ProfileMediaUploadResponse$inboundSchema: z.ZodMiniType<
29
+ ProfileMediaUploadResponse,
30
+ unknown
31
+ > = z.object({
32
+ uploadUrl: types.optional(types.string()),
33
+ mediaKey: types.optional(types.string()),
34
+ expiresInSeconds: types.optional(types.number()),
35
+ });
36
+
37
+ export function profileMediaUploadResponseFromJSON(
38
+ jsonString: string,
39
+ ): SafeParseResult<ProfileMediaUploadResponse, SDKValidationError> {
40
+ return safeParse(
41
+ jsonString,
42
+ (x) => ProfileMediaUploadResponse$inboundSchema.parse(JSON.parse(x)),
43
+ `Failed to parse 'ProfileMediaUploadResponse' from JSON`,
44
+ );
45
+ }
@@ -10,7 +10,7 @@ export type RegisterRequest = {
10
10
  email: string;
11
11
  password: string;
12
12
  displayName: string;
13
- bio: string;
13
+ bio?: string | null | undefined;
14
14
  };
15
15
 
16
16
  /** @internal */
@@ -19,7 +19,7 @@ export type RegisterRequest$Outbound = {
19
19
  email: string;
20
20
  password: string;
21
21
  displayName: string;
22
- bio: string;
22
+ bio?: string | null | undefined;
23
23
  };
24
24
 
25
25
  /** @internal */
@@ -31,7 +31,7 @@ export const RegisterRequest$outboundSchema: z.ZodMiniType<
31
31
  email: z.string(),
32
32
  password: z.string(),
33
33
  displayName: z.string(),
34
- bio: z.string(),
34
+ bio: z.optional(z.nullable(z.string())),
35
35
  });
36
36
 
37
37
  export function registerRequestToJSON(
@@ -0,0 +1,56 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 718707107a86
4
+ */
5
+
6
+ import * as z from "zod/v4-mini";
7
+ import { ClosedEnum } from "../types/enums.js";
8
+
9
+ /**
10
+ * Set to PUBLISHED to make the post visible to subscribers. The server validates that all asset slots are in READY status before allowing the transition. Cannot be used to revert a published post to DRAFT.
11
+ */
12
+ export const UpdatePostRequestStatus = {
13
+ Published: "PUBLISHED",
14
+ } as const;
15
+ /**
16
+ * Set to PUBLISHED to make the post visible to subscribers. The server validates that all asset slots are in READY status before allowing the transition. Cannot be used to revert a published post to DRAFT.
17
+ */
18
+ export type UpdatePostRequestStatus = ClosedEnum<
19
+ typeof UpdatePostRequestStatus
20
+ >;
21
+
22
+ export type UpdatePostRequest = {
23
+ caption?: string | null | undefined;
24
+ /**
25
+ * Set to PUBLISHED to make the post visible to subscribers. The server validates that all asset slots are in READY status before allowing the transition. Cannot be used to revert a published post to DRAFT.
26
+ */
27
+ status?: UpdatePostRequestStatus | undefined;
28
+ };
29
+
30
+ /** @internal */
31
+ export const UpdatePostRequestStatus$outboundSchema: z.ZodMiniEnum<
32
+ typeof UpdatePostRequestStatus
33
+ > = z.enum(UpdatePostRequestStatus);
34
+
35
+ /** @internal */
36
+ export type UpdatePostRequest$Outbound = {
37
+ caption?: string | null | undefined;
38
+ status?: string | undefined;
39
+ };
40
+
41
+ /** @internal */
42
+ export const UpdatePostRequest$outboundSchema: z.ZodMiniType<
43
+ UpdatePostRequest$Outbound,
44
+ UpdatePostRequest
45
+ > = z.object({
46
+ caption: z.optional(z.nullable(z.string())),
47
+ status: z.optional(UpdatePostRequestStatus$outboundSchema),
48
+ });
49
+
50
+ export function updatePostRequestToJSON(
51
+ updatePostRequest: UpdatePostRequest,
52
+ ): string {
53
+ return JSON.stringify(
54
+ UpdatePostRequest$outboundSchema.parse(updatePostRequest),
55
+ );
56
+ }
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 689ebe29e921
4
+ */
5
+
6
+ import * as z from "zod/v4-mini";
7
+
8
+ /**
9
+ * All fields are optional; only supplied fields are updated.
10
+ */
11
+ export type UpdateProfileRequest = {
12
+ displayName?: string | undefined;
13
+ bio?: string | null | undefined;
14
+ };
15
+
16
+ /** @internal */
17
+ export type UpdateProfileRequest$Outbound = {
18
+ displayName?: string | undefined;
19
+ bio?: string | null | undefined;
20
+ };
21
+
22
+ /** @internal */
23
+ export const UpdateProfileRequest$outboundSchema: z.ZodMiniType<
24
+ UpdateProfileRequest$Outbound,
25
+ UpdateProfileRequest
26
+ > = z.object({
27
+ displayName: z.optional(z.string()),
28
+ bio: z.optional(z.nullable(z.string())),
29
+ });
30
+
31
+ export function updateProfileRequestToJSON(
32
+ updateProfileRequest: UpdateProfileRequest,
33
+ ): string {
34
+ return JSON.stringify(
35
+ UpdateProfileRequest$outboundSchema.parse(updateProfileRequest),
36
+ );
37
+ }
@@ -0,0 +1,53 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: e1f3fc29096e
4
+ */
5
+
6
+ import * as z from "zod/v4-mini";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../types/fp.js";
9
+ import * as types from "../types/primitives.js";
10
+ import { SDKValidationError } from "./errors/sdk-validation-error.js";
11
+
12
+ export type UploadSlot = {
13
+ /**
14
+ * ID of the post_assets row created for this slot.
15
+ */
16
+ assetId?: number | undefined;
17
+ /**
18
+ * Zero-based index matching the position in the original assets array.
19
+ */
20
+ sortOrder?: number | undefined;
21
+ /**
22
+ * Presigned HTTP PUT URL pointing directly at a SeaweedFS volume node. The client must PUT the raw binary file body with the Content-Type header matching the declared contentType. No additional form fields are required.
23
+ */
24
+ uploadUrl?: string | undefined;
25
+ /**
26
+ * The SeaweedFS object key pre-allocated for this asset (e.g. posts/42/0_a1b2c3.jpg). Stored in post_assets.media_key immediately; Celery uses this as the source path.
27
+ */
28
+ mediaKey?: string | undefined;
29
+ /**
30
+ * UTC datetime after which the presigned URL is no longer valid. Typically 15 minutes from issuance.
31
+ */
32
+ expiresAt?: Date | undefined;
33
+ };
34
+
35
+ /** @internal */
36
+ export const UploadSlot$inboundSchema: z.ZodMiniType<UploadSlot, unknown> = z
37
+ .object({
38
+ assetId: types.optional(types.number()),
39
+ sortOrder: types.optional(types.number()),
40
+ uploadUrl: types.optional(types.string()),
41
+ mediaKey: types.optional(types.string()),
42
+ expiresAt: types.optional(types.date()),
43
+ });
44
+
45
+ export function uploadSlotFromJSON(
46
+ jsonString: string,
47
+ ): SafeParseResult<UploadSlot, SDKValidationError> {
48
+ return safeParse(
49
+ jsonString,
50
+ (x) => UploadSlot$inboundSchema.parse(JSON.parse(x)),
51
+ `Failed to parse 'UploadSlot' from JSON`,
52
+ );
53
+ }
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 479f87bfe8ae
4
+ */
5
+
6
+ import { internalAssetProcessingCallback } from "../funcs/internal-asset-processing-callback.js";
7
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
8
+ import * as models from "../models/index.js";
9
+ import { unwrapAsync } from "../types/fp.js";
10
+
11
+ export class Internal extends ClientSDK {
12
+ /**
13
+ * [Internal] Celery worker callback to update the processing status of a single post asset
14
+ *
15
+ * @remarks
16
+ * This endpoint is called exclusively by the internal Python/Celery media processing service after a transcoding or image optimisation job completes or fails. It is not intended to be called by external clients. The endpoint MUST be protected by a shared-secret header (X-Internal-Token) validated against an environment variable. On a READY transition the worker also supplies the finalised media_key (the canonical SeaweedFS path of the processed output file). On FAILED the worker may optionally supply a human-readable error reason for observability logging.
17
+ */
18
+ async assetProcessingCallback(
19
+ postId: number,
20
+ assetId: number,
21
+ body: models.AssetProcessingCallbackRequest,
22
+ options?: RequestOptions,
23
+ ): Promise<void> {
24
+ return unwrapAsync(internalAssetProcessingCallback(
25
+ this,
26
+ postId,
27
+ assetId,
28
+ body,
29
+ options,
30
+ ));
31
+ }
32
+ }