@aurora-interactive/fankare-api-sdk 0.0.2 → 0.0.4

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 (195) hide show
  1. package/FUNCTIONS.md +2 -0
  2. package/README.md +32 -20
  3. package/esm/funcs/creator-timelines-get-creator-posts.d.ts +2 -5
  4. package/esm/funcs/creator-timelines-get-creator-posts.d.ts.map +1 -1
  5. package/esm/funcs/creator-timelines-get-creator-posts.js +7 -8
  6. package/esm/funcs/creator-timelines-get-creator-posts.js.map +1 -1
  7. package/esm/funcs/custom-collections-add-collection-member.d.ts +14 -0
  8. package/esm/funcs/custom-collections-add-collection-member.d.ts.map +1 -0
  9. package/esm/funcs/custom-collections-add-collection-member.js +88 -0
  10. package/esm/funcs/custom-collections-add-collection-member.js.map +1 -0
  11. package/esm/funcs/custom-collections-create-collection.d.ts +15 -0
  12. package/esm/funcs/custom-collections-create-collection.d.ts.map +1 -0
  13. package/esm/funcs/custom-collections-create-collection.js +79 -0
  14. package/esm/funcs/custom-collections-create-collection.js.map +1 -0
  15. package/esm/funcs/custom-collections-get-collection-members.d.ts +14 -0
  16. package/esm/funcs/custom-collections-get-collection-members.d.ts.map +1 -0
  17. package/esm/funcs/custom-collections-get-collection-members.js +87 -0
  18. package/esm/funcs/custom-collections-get-collection-members.js.map +1 -0
  19. package/esm/funcs/custom-collections-get-collections.d.ts +14 -0
  20. package/esm/funcs/custom-collections-get-collections.d.ts.map +1 -0
  21. package/esm/funcs/custom-collections-get-collections.js +68 -0
  22. package/esm/funcs/custom-collections-get-collections.js.map +1 -0
  23. package/esm/funcs/custom-collections-remove-collection-member.d.ts +13 -0
  24. package/esm/funcs/custom-collections-remove-collection-member.d.ts.map +1 -0
  25. package/esm/funcs/custom-collections-remove-collection-member.js +91 -0
  26. package/esm/funcs/custom-collections-remove-collection-member.js.map +1 -0
  27. package/esm/funcs/direct-messaging-get-conversations.d.ts +0 -3
  28. package/esm/funcs/direct-messaging-get-conversations.d.ts.map +1 -1
  29. package/esm/funcs/direct-messaging-get-conversations.js +0 -3
  30. package/esm/funcs/direct-messaging-get-conversations.js.map +1 -1
  31. package/esm/funcs/direct-messaging-get-message-history.d.ts +3 -3
  32. package/esm/funcs/direct-messaging-get-message-history.d.ts.map +1 -1
  33. package/esm/funcs/direct-messaging-get-message-history.js +13 -7
  34. package/esm/funcs/direct-messaging-get-message-history.js.map +1 -1
  35. package/esm/funcs/posts-create-post.d.ts +0 -3
  36. package/esm/funcs/posts-create-post.d.ts.map +1 -1
  37. package/esm/funcs/posts-create-post.js +0 -3
  38. package/esm/funcs/posts-create-post.js.map +1 -1
  39. package/esm/funcs/posts-get-collection-feed.d.ts +14 -0
  40. package/esm/funcs/posts-get-collection-feed.d.ts.map +1 -0
  41. package/esm/funcs/posts-get-collection-feed.js +94 -0
  42. package/esm/funcs/posts-get-collection-feed.js.map +1 -0
  43. package/esm/funcs/posts-get-feed.d.ts +3 -6
  44. package/esm/funcs/posts-get-feed.d.ts.map +1 -1
  45. package/esm/funcs/posts-get-feed.js +3 -5
  46. package/esm/funcs/posts-get-feed.js.map +1 -1
  47. package/esm/funcs/user-discovery-get-following.d.ts +0 -3
  48. package/esm/funcs/user-discovery-get-following.d.ts.map +1 -1
  49. package/esm/funcs/user-discovery-get-following.js +0 -3
  50. package/esm/funcs/user-discovery-get-following.js.map +1 -1
  51. package/esm/funcs/user-discovery-get-user-profile.d.ts +0 -3
  52. package/esm/funcs/user-discovery-get-user-profile.d.ts.map +1 -1
  53. package/esm/funcs/user-discovery-get-user-profile.js +0 -3
  54. package/esm/funcs/user-discovery-get-user-profile.js.map +1 -1
  55. package/esm/funcs/user-discovery-search-users.d.ts +0 -3
  56. package/esm/funcs/user-discovery-search-users.d.ts.map +1 -1
  57. package/esm/funcs/user-discovery-search-users.js +0 -3
  58. package/esm/funcs/user-discovery-search-users.js.map +1 -1
  59. package/esm/lib/config.d.ts +2 -2
  60. package/esm/lib/config.js +2 -2
  61. package/esm/models/collection.d.ts +12 -0
  62. package/esm/models/collection.d.ts.map +1 -0
  63. package/esm/models/collection.js +18 -0
  64. package/esm/models/collection.js.map +1 -0
  65. package/esm/models/conversation.d.ts +0 -3
  66. package/esm/models/conversation.d.ts.map +1 -1
  67. package/esm/models/conversation.js.map +1 -1
  68. package/esm/models/index.d.ts +2 -1
  69. package/esm/models/index.d.ts.map +1 -1
  70. package/esm/models/index.js +2 -1
  71. package/esm/models/index.js.map +1 -1
  72. package/esm/models/operations/add-collection-member.d.ts +24 -0
  73. package/esm/models/operations/add-collection-member.d.ts.map +1 -0
  74. package/esm/models/operations/add-collection-member.js +21 -0
  75. package/esm/models/operations/add-collection-member.js.map +1 -0
  76. package/esm/models/operations/create-collection.d.ts +12 -0
  77. package/esm/models/operations/create-collection.d.ts.map +1 -0
  78. package/esm/models/operations/create-collection.js +13 -0
  79. package/esm/models/operations/create-collection.js.map +1 -0
  80. package/esm/models/operations/create-post.d.ts +1 -1
  81. package/esm/models/operations/get-collection-feed.d.ts +19 -0
  82. package/esm/models/operations/get-collection-feed.d.ts.map +1 -0
  83. package/esm/models/operations/get-collection-feed.js +15 -0
  84. package/esm/models/operations/get-collection-feed.js.map +1 -0
  85. package/esm/models/operations/get-collection-members.d.ts +12 -0
  86. package/esm/models/operations/get-collection-members.d.ts.map +1 -0
  87. package/esm/models/operations/get-collection-members.js +13 -0
  88. package/esm/models/operations/get-collection-members.js.map +1 -0
  89. package/esm/models/operations/get-creator-posts.d.ts +5 -0
  90. package/esm/models/operations/get-creator-posts.d.ts.map +1 -1
  91. package/esm/models/operations/get-creator-posts.js +1 -0
  92. package/esm/models/operations/get-creator-posts.js.map +1 -1
  93. package/esm/models/operations/get-feed.d.ts +3 -13
  94. package/esm/models/operations/get-feed.d.ts.map +1 -1
  95. package/esm/models/operations/get-feed.js +0 -11
  96. package/esm/models/operations/get-feed.js.map +1 -1
  97. package/esm/models/operations/get-message-history.d.ts +20 -0
  98. package/esm/models/operations/get-message-history.d.ts.map +1 -1
  99. package/esm/models/operations/get-message-history.js +13 -0
  100. package/esm/models/operations/get-message-history.js.map +1 -1
  101. package/esm/models/operations/index.d.ts +5 -5
  102. package/esm/models/operations/index.d.ts.map +1 -1
  103. package/esm/models/operations/index.js +5 -5
  104. package/esm/models/operations/index.js.map +1 -1
  105. package/esm/models/operations/remove-collection-member.d.ts +14 -0
  106. package/esm/models/operations/remove-collection-member.d.ts.map +1 -0
  107. package/esm/models/operations/remove-collection-member.js +14 -0
  108. package/esm/models/operations/remove-collection-member.js.map +1 -0
  109. package/esm/models/paginated-posts-response.d.ts +15 -0
  110. package/esm/models/paginated-posts-response.d.ts.map +1 -0
  111. package/esm/models/paginated-posts-response.js +17 -0
  112. package/esm/models/paginated-posts-response.js.map +1 -0
  113. package/esm/models/register-request.d.ts +4 -2
  114. package/esm/models/register-request.d.ts.map +1 -1
  115. package/esm/models/register-request.js +2 -1
  116. package/esm/models/register-request.js.map +1 -1
  117. package/esm/models/user-profile.d.ts +0 -1
  118. package/esm/models/user-profile.d.ts.map +1 -1
  119. package/esm/models/user-profile.js +0 -1
  120. package/esm/models/user-profile.js.map +1 -1
  121. package/esm/models/user.d.ts +32 -0
  122. package/esm/models/user.d.ts.map +1 -1
  123. package/esm/models/user.js +16 -0
  124. package/esm/models/user.js.map +1 -1
  125. package/esm/sdk/creator-timelines.d.ts +2 -5
  126. package/esm/sdk/creator-timelines.d.ts.map +1 -1
  127. package/esm/sdk/creator-timelines.js +3 -6
  128. package/esm/sdk/creator-timelines.js.map +1 -1
  129. package/esm/sdk/custom-collections.d.ts +26 -0
  130. package/esm/sdk/custom-collections.d.ts.map +1 -0
  131. package/esm/sdk/custom-collections.js +44 -0
  132. package/esm/sdk/custom-collections.js.map +1 -0
  133. package/esm/sdk/direct-messaging.d.ts +3 -5
  134. package/esm/sdk/direct-messaging.d.ts.map +1 -1
  135. package/esm/sdk/direct-messaging.js +3 -6
  136. package/esm/sdk/direct-messaging.js.map +1 -1
  137. package/esm/sdk/posts.d.ts +4 -10
  138. package/esm/sdk/posts.d.ts.map +1 -1
  139. package/esm/sdk/posts.js +5 -11
  140. package/esm/sdk/posts.js.map +1 -1
  141. package/esm/sdk/sdk.d.ts +3 -3
  142. package/esm/sdk/sdk.d.ts.map +1 -1
  143. package/esm/sdk/sdk.js +4 -4
  144. package/esm/sdk/sdk.js.map +1 -1
  145. package/esm/sdk/user-discovery.d.ts +0 -9
  146. package/esm/sdk/user-discovery.d.ts.map +1 -1
  147. package/esm/sdk/user-discovery.js +0 -9
  148. package/esm/sdk/user-discovery.js.map +1 -1
  149. package/examples/authenticationRegisterUser.example.ts +2 -0
  150. package/jsr.json +1 -1
  151. package/package.json +1 -1
  152. package/src/funcs/creator-timelines-get-creator-posts.ts +10 -8
  153. package/src/funcs/{custom-lists-add-list-member.ts → custom-collections-add-collection-member.ts} +15 -14
  154. package/src/funcs/{custom-lists-create-list.ts → custom-collections-create-collection.ts} +13 -12
  155. package/src/funcs/{custom-lists-get-list-members.ts → custom-collections-get-collection-members.ts} +13 -12
  156. package/src/funcs/{custom-lists-get-lists.ts → custom-collections-get-collections.ts} +9 -9
  157. package/src/funcs/{custom-lists-remove-list-member.ts → custom-collections-remove-collection-member.ts} +12 -12
  158. package/src/funcs/direct-messaging-get-conversations.ts +0 -3
  159. package/src/funcs/direct-messaging-get-message-history.ts +20 -7
  160. package/src/funcs/posts-create-post.ts +0 -3
  161. package/src/funcs/{posts-get-list-feed.ts → posts-get-collection-feed.ts} +22 -16
  162. package/src/funcs/posts-get-feed.ts +6 -8
  163. package/src/funcs/user-discovery-get-following.ts +0 -3
  164. package/src/funcs/user-discovery-get-user-profile.ts +0 -3
  165. package/src/funcs/user-discovery-search-users.ts +0 -3
  166. package/src/lib/config.ts +2 -2
  167. package/src/models/{custom-list.ts → collection.ts} +7 -7
  168. package/src/models/conversation.ts +0 -3
  169. package/src/models/index.ts +2 -1
  170. package/src/models/operations/add-collection-member.ts +61 -0
  171. package/src/models/operations/create-collection.ts +31 -0
  172. package/src/models/operations/create-post.ts +1 -1
  173. package/src/models/operations/get-collection-feed.ts +40 -0
  174. package/src/models/operations/get-collection-members.ts +33 -0
  175. package/src/models/operations/get-creator-posts.ts +6 -0
  176. package/src/models/operations/get-feed.ts +3 -32
  177. package/src/models/operations/get-message-history.ts +41 -0
  178. package/src/models/operations/index.ts +5 -5
  179. package/src/models/operations/remove-collection-member.ts +36 -0
  180. package/src/models/paginated-posts-response.ts +38 -0
  181. package/src/models/register-request.ts +6 -3
  182. package/src/models/user-profile.ts +0 -2
  183. package/src/models/user.ts +46 -0
  184. package/src/sdk/creator-timelines.ts +4 -5
  185. package/src/sdk/custom-collections.ts +88 -0
  186. package/src/sdk/direct-messaging.ts +7 -5
  187. package/src/sdk/posts.ts +11 -15
  188. package/src/sdk/sdk.ts +4 -4
  189. package/src/sdk/user-discovery.ts +0 -9
  190. package/src/models/operations/add-list-member.ts +0 -59
  191. package/src/models/operations/create-list.ts +0 -31
  192. package/src/models/operations/get-list-feed.ts +0 -34
  193. package/src/models/operations/get-list-members.ts +0 -31
  194. package/src/models/operations/remove-list-member.ts +0 -34
  195. package/src/sdk/custom-lists.ts +0 -88
@@ -5,7 +5,7 @@
5
5
 
6
6
  import * as z from "zod/v4-mini";
7
7
  import { FankareSDKCore } from "../core.js";
8
- import { encodeSimple } from "../lib/encodings.js";
8
+ import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
9
9
  import { matchStatusCode } from "../lib/http.js";
10
10
  import * as M from "../lib/matchers.js";
11
11
  import { compactMap } from "../lib/primitives.js";
@@ -23,21 +23,22 @@ import {
23
23
  } from "../models/errors/http-client-errors.js";
24
24
  import { ResponseValidationError } from "../models/errors/response-validation-error.js";
25
25
  import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
26
- import * as models from "../models/index.js";
27
26
  import * as operations from "../models/operations/index.js";
28
27
  import { APICall, APIPromise } from "../types/async.js";
29
28
  import { Result } from "../types/fp.js";
30
29
 
31
30
  /**
32
- * Load message history with a specific creator
31
+ * Load message history with a specific user with pagination
33
32
  */
34
33
  export function directMessagingGetMessageHistory(
35
34
  client: FankareSDKCore,
36
35
  userId: number,
36
+ limit?: number | undefined,
37
+ cursor?: string | undefined,
37
38
  options?: RequestOptions,
38
39
  ): APIPromise<
39
40
  Result<
40
- Array<models.Message>,
41
+ operations.GetMessageHistoryResponse,
41
42
  | FankareSDKError
42
43
  | ResponseValidationError
43
44
  | ConnectionError
@@ -51,6 +52,8 @@ export function directMessagingGetMessageHistory(
51
52
  return new APIPromise($do(
52
53
  client,
53
54
  userId,
55
+ limit,
56
+ cursor,
54
57
  options,
55
58
  ));
56
59
  }
@@ -58,11 +61,13 @@ export function directMessagingGetMessageHistory(
58
61
  async function $do(
59
62
  client: FankareSDKCore,
60
63
  userId: number,
64
+ limit?: number | undefined,
65
+ cursor?: string | undefined,
61
66
  options?: RequestOptions,
62
67
  ): Promise<
63
68
  [
64
69
  Result<
65
- Array<models.Message>,
70
+ operations.GetMessageHistoryResponse,
66
71
  | FankareSDKError
67
72
  | ResponseValidationError
68
73
  | ConnectionError
@@ -77,6 +82,8 @@ async function $do(
77
82
  > {
78
83
  const input: operations.GetMessageHistoryRequest = {
79
84
  userId: userId,
85
+ limit: limit,
86
+ cursor: cursor,
80
87
  };
81
88
 
82
89
  const parsed = safeParse(
@@ -99,6 +106,11 @@ async function $do(
99
106
  };
100
107
  const path = pathToFunc("/messages/user/{userId}")(pathParams);
101
108
 
109
+ const query = encodeFormQuery({
110
+ "cursor": payload.cursor,
111
+ "limit": payload.limit,
112
+ });
113
+
102
114
  const headers = new Headers(compactMap({
103
115
  Accept: "application/json",
104
116
  }));
@@ -128,6 +140,7 @@ async function $do(
128
140
  baseURL: options?.serverURL,
129
141
  path: path,
130
142
  headers: headers,
143
+ query: query,
131
144
  body: body,
132
145
  userAgent: client._options.userAgent,
133
146
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
@@ -150,7 +163,7 @@ async function $do(
150
163
  const response = doResult.value;
151
164
 
152
165
  const [result] = await M.match<
153
- Array<models.Message>,
166
+ operations.GetMessageHistoryResponse,
154
167
  | FankareSDKError
155
168
  | ResponseValidationError
156
169
  | ConnectionError
@@ -160,7 +173,7 @@ async function $do(
160
173
  | UnexpectedClientError
161
174
  | SDKValidationError
162
175
  >(
163
- M.json(200, z.array(models.Message$inboundSchema)),
176
+ M.json(200, operations.GetMessageHistoryResponse$inboundSchema),
164
177
  M.fail("4XX"),
165
178
  M.fail("5XX"),
166
179
  )(response, req);
@@ -30,9 +30,6 @@ import { Result } from "../types/fp.js";
30
30
 
31
31
  /**
32
32
  * Create a post blueprint requesting batch upload slots
33
- *
34
- * @remarks
35
- * Accepts a list of metadata parts for grids/carousels and responds with multiple presigned destination configurations mapped out of SeaweedFS routing rules.
36
33
  */
37
34
  export function postsCreatePost(
38
35
  client: FankareSDKCore,
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: 739bfe3ba6a7
3
+ * @generated-id: ba2331639991
4
4
  */
5
5
 
6
6
  import * as z from "zod/v4-mini";
@@ -29,16 +29,17 @@ import { APICall, APIPromise } from "../types/async.js";
29
29
  import { Result } from "../types/fp.js";
30
30
 
31
31
  /**
32
- * Get a timeline filtered strictly by members of this list
32
+ * Get a timeline filtered strictly by members of this collection with pagination
33
33
  */
34
- export function postsGetListFeed(
34
+ export function postsGetCollectionFeed(
35
35
  client: FankareSDKCore,
36
- listId: number,
36
+ collectionId: number,
37
37
  limit?: number | undefined,
38
+ cursor?: string | undefined,
38
39
  options?: RequestOptions,
39
40
  ): APIPromise<
40
41
  Result<
41
- Array<models.Post>,
42
+ models.PaginatedPostsResponse,
42
43
  | FankareSDKError
43
44
  | ResponseValidationError
44
45
  | ConnectionError
@@ -51,21 +52,23 @@ export function postsGetListFeed(
51
52
  > {
52
53
  return new APIPromise($do(
53
54
  client,
54
- listId,
55
+ collectionId,
55
56
  limit,
57
+ cursor,
56
58
  options,
57
59
  ));
58
60
  }
59
61
 
60
62
  async function $do(
61
63
  client: FankareSDKCore,
62
- listId: number,
64
+ collectionId: number,
63
65
  limit?: number | undefined,
66
+ cursor?: string | undefined,
64
67
  options?: RequestOptions,
65
68
  ): Promise<
66
69
  [
67
70
  Result<
68
- Array<models.Post>,
71
+ models.PaginatedPostsResponse,
69
72
  | FankareSDKError
70
73
  | ResponseValidationError
71
74
  | ConnectionError
@@ -78,14 +81,16 @@ async function $do(
78
81
  APICall,
79
82
  ]
80
83
  > {
81
- const input: operations.GetListFeedRequest = {
82
- listId: listId,
84
+ const input: operations.GetCollectionFeedRequest = {
85
+ collectionId: collectionId,
83
86
  limit: limit,
87
+ cursor: cursor,
84
88
  };
85
89
 
86
90
  const parsed = safeParse(
87
91
  input,
88
- (value) => z.parse(operations.GetListFeedRequest$outboundSchema, value),
92
+ (value) =>
93
+ z.parse(operations.GetCollectionFeedRequest$outboundSchema, value),
89
94
  "Input validation failed",
90
95
  );
91
96
  if (!parsed.ok) {
@@ -95,14 +100,15 @@ async function $do(
95
100
  const body = null;
96
101
 
97
102
  const pathParams = {
98
- listId: encodeSimple("listId", payload.listId, {
103
+ collectionId: encodeSimple("collectionId", payload.collectionId, {
99
104
  explode: false,
100
105
  charEncoding: "percent",
101
106
  }),
102
107
  };
103
- const path = pathToFunc("/lists/{listId}/feed")(pathParams);
108
+ const path = pathToFunc("/collections/{collectionId}/feed")(pathParams);
104
109
 
105
110
  const query = encodeFormQuery({
111
+ "cursor": payload.cursor,
106
112
  "limit": payload.limit,
107
113
  });
108
114
 
@@ -117,7 +123,7 @@ async function $do(
117
123
  const context = {
118
124
  options: client._options,
119
125
  baseURL: options?.serverURL ?? client._baseURL ?? "",
120
- operationID: "getListFeed",
126
+ operationID: "getCollectionFeed",
121
127
  oAuth2Scopes: null,
122
128
 
123
129
  resolvedSecurity: requestSecurity,
@@ -158,7 +164,7 @@ async function $do(
158
164
  const response = doResult.value;
159
165
 
160
166
  const [result] = await M.match<
161
- Array<models.Post>,
167
+ models.PaginatedPostsResponse,
162
168
  | FankareSDKError
163
169
  | ResponseValidationError
164
170
  | ConnectionError
@@ -168,7 +174,7 @@ async function $do(
168
174
  | UnexpectedClientError
169
175
  | SDKValidationError
170
176
  >(
171
- M.json(200, z.array(models.Post$inboundSchema)),
177
+ M.json(200, models.PaginatedPostsResponse$inboundSchema),
172
178
  M.fail("4XX"),
173
179
  M.fail("5XX"),
174
180
  )(response, req);
@@ -23,15 +23,13 @@ import {
23
23
  } from "../models/errors/http-client-errors.js";
24
24
  import { ResponseValidationError } from "../models/errors/response-validation-error.js";
25
25
  import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
26
+ import * as models from "../models/index.js";
26
27
  import * as operations from "../models/operations/index.js";
27
28
  import { APICall, APIPromise } from "../types/async.js";
28
29
  import { Result } from "../types/fp.js";
29
30
 
30
31
  /**
31
- * Get the consolidated timeline feed
32
- *
33
- * @remarks
34
- * Retrieves posts from users the current authenticated user is subscribed to.
32
+ * Get the consolidated timeline feed with pagination
35
33
  */
36
34
  export function postsGetFeed(
37
35
  client: FankareSDKCore,
@@ -40,7 +38,7 @@ export function postsGetFeed(
40
38
  options?: RequestOptions,
41
39
  ): APIPromise<
42
40
  Result<
43
- operations.GetFeedResponse,
41
+ models.PaginatedPostsResponse,
44
42
  | FankareSDKError
45
43
  | ResponseValidationError
46
44
  | ConnectionError
@@ -67,7 +65,7 @@ async function $do(
67
65
  ): Promise<
68
66
  [
69
67
  Result<
70
- operations.GetFeedResponse,
68
+ models.PaginatedPostsResponse,
71
69
  | FankareSDKError
72
70
  | ResponseValidationError
73
71
  | ConnectionError
@@ -156,7 +154,7 @@ async function $do(
156
154
  const response = doResult.value;
157
155
 
158
156
  const [result] = await M.match<
159
- operations.GetFeedResponse,
157
+ models.PaginatedPostsResponse,
160
158
  | FankareSDKError
161
159
  | ResponseValidationError
162
160
  | ConnectionError
@@ -166,7 +164,7 @@ async function $do(
166
164
  | UnexpectedClientError
167
165
  | SDKValidationError
168
166
  >(
169
- M.json(200, operations.GetFeedResponse$inboundSchema),
167
+ M.json(200, models.PaginatedPostsResponse$inboundSchema),
170
168
  M.fail("4XX"),
171
169
  M.fail("5XX"),
172
170
  )(response, req);
@@ -27,9 +27,6 @@ import { Result } from "../types/fp.js";
27
27
 
28
28
  /**
29
29
  * Get subscriptions list
30
- *
31
- * @remarks
32
- * Retrieves an array of all users the current caller is subscribed to for initializing active client button states.
33
30
  */
34
31
  export function userDiscoveryGetFollowing(
35
32
  client: FankareSDKCore,
@@ -30,9 +30,6 @@ import { Result } from "../types/fp.js";
30
30
 
31
31
  /**
32
32
  * Retrieve user profile metadata
33
- *
34
- * @remarks
35
- * Fetches a user's target profile metrics including counts and media references.
36
33
  */
37
34
  export function userDiscoveryGetUserProfile(
38
35
  client: FankareSDKCore,
@@ -30,9 +30,6 @@ import { Result } from "../types/fp.js";
30
30
 
31
31
  /**
32
32
  * Search global user profiles
33
- *
34
- * @remarks
35
- * Queries the global database for user profiles matching a search string.
36
33
  */
37
34
  export function userDiscoverySearchUsers(
38
35
  client: FankareSDKCore,
package/src/lib/config.ts CHANGED
@@ -62,7 +62,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
62
62
  export const SDK_METADATA = {
63
63
  language: "typescript",
64
64
  openapiDocVersion: "1.0.0",
65
- sdkVersion: "0.0.2",
65
+ sdkVersion: "0.0.4",
66
66
  genVersion: "2.911.0",
67
- userAgent: "speakeasy-sdk/typescript 0.0.2 2.911.0 1.0.0 openapi",
67
+ userAgent: "speakeasy-sdk/typescript 0.0.4 2.911.0 1.0.0 openapi",
68
68
  } as const;
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: 0a4b6dee450f
3
+ * @generated-id: 9bda8d9a0042
4
4
  */
5
5
 
6
6
  import * as z from "zod/v4-mini";
@@ -9,26 +9,26 @@ import { Result as SafeParseResult } from "../types/fp.js";
9
9
  import * as types from "../types/primitives.js";
10
10
  import { SDKValidationError } from "./errors/sdk-validation-error.js";
11
11
 
12
- export type CustomList = {
12
+ export type Collection = {
13
13
  id?: number | undefined;
14
14
  ownerId?: number | undefined;
15
15
  listName?: string | undefined;
16
16
  };
17
17
 
18
18
  /** @internal */
19
- export const CustomList$inboundSchema: z.ZodMiniType<CustomList, unknown> = z
19
+ export const Collection$inboundSchema: z.ZodMiniType<Collection, unknown> = z
20
20
  .object({
21
21
  id: types.optional(types.number()),
22
22
  ownerId: types.optional(types.number()),
23
23
  listName: types.optional(types.string()),
24
24
  });
25
25
 
26
- export function customListFromJSON(
26
+ export function collectionFromJSON(
27
27
  jsonString: string,
28
- ): SafeParseResult<CustomList, SDKValidationError> {
28
+ ): SafeParseResult<Collection, SDKValidationError> {
29
29
  return safeParse(
30
30
  jsonString,
31
- (x) => CustomList$inboundSchema.parse(JSON.parse(x)),
32
- `Failed to parse 'CustomList' from JSON`,
31
+ (x) => Collection$inboundSchema.parse(JSON.parse(x)),
32
+ `Failed to parse 'Collection' from JSON`,
33
33
  );
34
34
  }
@@ -12,9 +12,6 @@ import { Message, Message$inboundSchema } from "./message.js";
12
12
  import { User, User$inboundSchema } from "./user.js";
13
13
 
14
14
  export type Conversation = {
15
- /**
16
- * Computed target thread pairing hash identity string
17
- */
18
15
  id?: string | undefined;
19
16
  recipient?: User | undefined;
20
17
  lastMessage?: Message | undefined;
@@ -3,12 +3,13 @@
3
3
  * @generated-id: f93644b0f37e
4
4
  */
5
5
 
6
+ export * from "./collection.js";
6
7
  export * from "./conversation.js";
7
8
  export * from "./create-post-request.js";
8
- export * from "./custom-list.js";
9
9
  export * from "./login-request.js";
10
10
  export * from "./media-asset.js";
11
11
  export * from "./message.js";
12
+ export * from "./paginated-posts-response.js";
12
13
  export * from "./post.js";
13
14
  export * from "./register-request.js";
14
15
  export * from "./security.js";
@@ -0,0 +1,61 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: ea82695590d7
4
+ */
5
+
6
+ import * as z from "zod/v4-mini";
7
+
8
+ export type AddCollectionMemberRequestBody = {
9
+ userId: number;
10
+ };
11
+
12
+ export type AddCollectionMemberRequest = {
13
+ collectionId: number;
14
+ body: AddCollectionMemberRequestBody;
15
+ };
16
+
17
+ /** @internal */
18
+ export type AddCollectionMemberRequestBody$Outbound = {
19
+ userId: number;
20
+ };
21
+
22
+ /** @internal */
23
+ export const AddCollectionMemberRequestBody$outboundSchema: z.ZodMiniType<
24
+ AddCollectionMemberRequestBody$Outbound,
25
+ AddCollectionMemberRequestBody
26
+ > = z.object({
27
+ userId: z.int(),
28
+ });
29
+
30
+ export function addCollectionMemberRequestBodyToJSON(
31
+ addCollectionMemberRequestBody: AddCollectionMemberRequestBody,
32
+ ): string {
33
+ return JSON.stringify(
34
+ AddCollectionMemberRequestBody$outboundSchema.parse(
35
+ addCollectionMemberRequestBody,
36
+ ),
37
+ );
38
+ }
39
+
40
+ /** @internal */
41
+ export type AddCollectionMemberRequest$Outbound = {
42
+ collectionId: number;
43
+ body: AddCollectionMemberRequestBody$Outbound;
44
+ };
45
+
46
+ /** @internal */
47
+ export const AddCollectionMemberRequest$outboundSchema: z.ZodMiniType<
48
+ AddCollectionMemberRequest$Outbound,
49
+ AddCollectionMemberRequest
50
+ > = z.object({
51
+ collectionId: z.int(),
52
+ body: z.lazy(() => AddCollectionMemberRequestBody$outboundSchema),
53
+ });
54
+
55
+ export function addCollectionMemberRequestToJSON(
56
+ addCollectionMemberRequest: AddCollectionMemberRequest,
57
+ ): string {
58
+ return JSON.stringify(
59
+ AddCollectionMemberRequest$outboundSchema.parse(addCollectionMemberRequest),
60
+ );
61
+ }
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: b9c6de3ef922
4
+ */
5
+
6
+ import * as z from "zod/v4-mini";
7
+
8
+ export type CreateCollectionRequest = {
9
+ listName: string;
10
+ };
11
+
12
+ /** @internal */
13
+ export type CreateCollectionRequest$Outbound = {
14
+ listName: string;
15
+ };
16
+
17
+ /** @internal */
18
+ export const CreateCollectionRequest$outboundSchema: z.ZodMiniType<
19
+ CreateCollectionRequest$Outbound,
20
+ CreateCollectionRequest
21
+ > = z.object({
22
+ listName: z.string(),
23
+ });
24
+
25
+ export function createCollectionRequestToJSON(
26
+ createCollectionRequest: CreateCollectionRequest,
27
+ ): string {
28
+ return JSON.stringify(
29
+ CreateCollectionRequest$outboundSchema.parse(createCollectionRequest),
30
+ );
31
+ }
@@ -18,7 +18,7 @@ export type UploadSlot = {
18
18
  };
19
19
 
20
20
  /**
21
- * Post processing metadata accepted. Collection upload instructions map generated.
21
+ * Post metadata accepted. Collection upload instructions map generated.
22
22
  */
23
23
  export type CreatePostResponse = {
24
24
  postId?: number | undefined;
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 1f1776a98715
4
+ */
5
+
6
+ import * as z from "zod/v4-mini";
7
+
8
+ export type GetCollectionFeedRequest = {
9
+ collectionId: number;
10
+ limit?: number | undefined;
11
+ /**
12
+ * Opaque cursor mapping to timestamp index values for timeline layout pagination
13
+ */
14
+ cursor?: string | undefined;
15
+ };
16
+
17
+ /** @internal */
18
+ export type GetCollectionFeedRequest$Outbound = {
19
+ collectionId: number;
20
+ limit: number;
21
+ cursor?: string | undefined;
22
+ };
23
+
24
+ /** @internal */
25
+ export const GetCollectionFeedRequest$outboundSchema: z.ZodMiniType<
26
+ GetCollectionFeedRequest$Outbound,
27
+ GetCollectionFeedRequest
28
+ > = z.object({
29
+ collectionId: z.int(),
30
+ limit: z._default(z.int(), 20),
31
+ cursor: z.optional(z.string()),
32
+ });
33
+
34
+ export function getCollectionFeedRequestToJSON(
35
+ getCollectionFeedRequest: GetCollectionFeedRequest,
36
+ ): string {
37
+ return JSON.stringify(
38
+ GetCollectionFeedRequest$outboundSchema.parse(getCollectionFeedRequest),
39
+ );
40
+ }
@@ -0,0 +1,33 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: a6fac2227788
4
+ */
5
+
6
+ import * as z from "zod/v4-mini";
7
+
8
+ export type GetCollectionMembersRequest = {
9
+ collectionId: number;
10
+ };
11
+
12
+ /** @internal */
13
+ export type GetCollectionMembersRequest$Outbound = {
14
+ collectionId: number;
15
+ };
16
+
17
+ /** @internal */
18
+ export const GetCollectionMembersRequest$outboundSchema: z.ZodMiniType<
19
+ GetCollectionMembersRequest$Outbound,
20
+ GetCollectionMembersRequest
21
+ > = z.object({
22
+ collectionId: z.int(),
23
+ });
24
+
25
+ export function getCollectionMembersRequestToJSON(
26
+ getCollectionMembersRequest: GetCollectionMembersRequest,
27
+ ): string {
28
+ return JSON.stringify(
29
+ GetCollectionMembersRequest$outboundSchema.parse(
30
+ getCollectionMembersRequest,
31
+ ),
32
+ );
33
+ }
@@ -8,12 +8,17 @@ import * as z from "zod/v4-mini";
8
8
  export type GetCreatorPostsRequest = {
9
9
  userId: number;
10
10
  limit?: number | undefined;
11
+ /**
12
+ * Opaque cursor pointing to the last post timestamp/ID for pagination
13
+ */
14
+ cursor?: string | undefined;
11
15
  };
12
16
 
13
17
  /** @internal */
14
18
  export type GetCreatorPostsRequest$Outbound = {
15
19
  userId: number;
16
20
  limit: number;
21
+ cursor?: string | undefined;
17
22
  };
18
23
 
19
24
  /** @internal */
@@ -23,6 +28,7 @@ export const GetCreatorPostsRequest$outboundSchema: z.ZodMiniType<
23
28
  > = z.object({
24
29
  userId: z.int(),
25
30
  limit: z._default(z.int(), 20),
31
+ cursor: z.optional(z.string()),
26
32
  });
27
33
 
28
34
  export function getCreatorPostsRequestToJSON(
@@ -4,25 +4,15 @@
4
4
  */
5
5
 
6
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
- import * as models from "../index.js";
12
7
 
13
8
  export type GetFeedRequest = {
14
9
  limit?: number | undefined;
10
+ /**
11
+ * Opaque cursor pointing to the last item timestamp for pagination
12
+ */
15
13
  cursor?: string | undefined;
16
14
  };
17
15
 
18
- /**
19
- * A list of feed posts
20
- */
21
- export type GetFeedResponse = {
22
- items?: Array<models.Post> | undefined;
23
- nextCursor?: string | null | undefined;
24
- };
25
-
26
16
  /** @internal */
27
17
  export type GetFeedRequest$Outbound = {
28
18
  limit: number;
@@ -41,22 +31,3 @@ export const GetFeedRequest$outboundSchema: z.ZodMiniType<
41
31
  export function getFeedRequestToJSON(getFeedRequest: GetFeedRequest): string {
42
32
  return JSON.stringify(GetFeedRequest$outboundSchema.parse(getFeedRequest));
43
33
  }
44
-
45
- /** @internal */
46
- export const GetFeedResponse$inboundSchema: z.ZodMiniType<
47
- GetFeedResponse,
48
- unknown
49
- > = z.object({
50
- items: types.optional(z.array(models.Post$inboundSchema)),
51
- nextCursor: z.optional(z.nullable(types.string())),
52
- });
53
-
54
- export function getFeedResponseFromJSON(
55
- jsonString: string,
56
- ): SafeParseResult<GetFeedResponse, SDKValidationError> {
57
- return safeParse(
58
- jsonString,
59
- (x) => GetFeedResponse$inboundSchema.parse(JSON.parse(x)),
60
- `Failed to parse 'GetFeedResponse' from JSON`,
61
- );
62
- }