@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.
- package/FUNCTIONS.md +2 -0
- package/README.md +32 -20
- package/esm/funcs/creator-timelines-get-creator-posts.d.ts +2 -5
- package/esm/funcs/creator-timelines-get-creator-posts.d.ts.map +1 -1
- package/esm/funcs/creator-timelines-get-creator-posts.js +7 -8
- package/esm/funcs/creator-timelines-get-creator-posts.js.map +1 -1
- package/esm/funcs/custom-collections-add-collection-member.d.ts +14 -0
- package/esm/funcs/custom-collections-add-collection-member.d.ts.map +1 -0
- package/esm/funcs/custom-collections-add-collection-member.js +88 -0
- package/esm/funcs/custom-collections-add-collection-member.js.map +1 -0
- package/esm/funcs/custom-collections-create-collection.d.ts +15 -0
- package/esm/funcs/custom-collections-create-collection.d.ts.map +1 -0
- package/esm/funcs/custom-collections-create-collection.js +79 -0
- package/esm/funcs/custom-collections-create-collection.js.map +1 -0
- package/esm/funcs/custom-collections-get-collection-members.d.ts +14 -0
- package/esm/funcs/custom-collections-get-collection-members.d.ts.map +1 -0
- package/esm/funcs/custom-collections-get-collection-members.js +87 -0
- package/esm/funcs/custom-collections-get-collection-members.js.map +1 -0
- package/esm/funcs/custom-collections-get-collections.d.ts +14 -0
- package/esm/funcs/custom-collections-get-collections.d.ts.map +1 -0
- package/esm/funcs/custom-collections-get-collections.js +68 -0
- package/esm/funcs/custom-collections-get-collections.js.map +1 -0
- package/esm/funcs/custom-collections-remove-collection-member.d.ts +13 -0
- package/esm/funcs/custom-collections-remove-collection-member.d.ts.map +1 -0
- package/esm/funcs/custom-collections-remove-collection-member.js +91 -0
- package/esm/funcs/custom-collections-remove-collection-member.js.map +1 -0
- package/esm/funcs/direct-messaging-get-conversations.d.ts +0 -3
- package/esm/funcs/direct-messaging-get-conversations.d.ts.map +1 -1
- package/esm/funcs/direct-messaging-get-conversations.js +0 -3
- package/esm/funcs/direct-messaging-get-conversations.js.map +1 -1
- package/esm/funcs/direct-messaging-get-message-history.d.ts +3 -3
- package/esm/funcs/direct-messaging-get-message-history.d.ts.map +1 -1
- package/esm/funcs/direct-messaging-get-message-history.js +13 -7
- package/esm/funcs/direct-messaging-get-message-history.js.map +1 -1
- package/esm/funcs/posts-create-post.d.ts +0 -3
- package/esm/funcs/posts-create-post.d.ts.map +1 -1
- package/esm/funcs/posts-create-post.js +0 -3
- package/esm/funcs/posts-create-post.js.map +1 -1
- package/esm/funcs/posts-get-collection-feed.d.ts +14 -0
- package/esm/funcs/posts-get-collection-feed.d.ts.map +1 -0
- package/esm/funcs/posts-get-collection-feed.js +94 -0
- package/esm/funcs/posts-get-collection-feed.js.map +1 -0
- package/esm/funcs/posts-get-feed.d.ts +3 -6
- package/esm/funcs/posts-get-feed.d.ts.map +1 -1
- package/esm/funcs/posts-get-feed.js +3 -5
- package/esm/funcs/posts-get-feed.js.map +1 -1
- package/esm/funcs/user-discovery-get-following.d.ts +0 -3
- package/esm/funcs/user-discovery-get-following.d.ts.map +1 -1
- package/esm/funcs/user-discovery-get-following.js +0 -3
- package/esm/funcs/user-discovery-get-following.js.map +1 -1
- package/esm/funcs/user-discovery-get-user-profile.d.ts +0 -3
- package/esm/funcs/user-discovery-get-user-profile.d.ts.map +1 -1
- package/esm/funcs/user-discovery-get-user-profile.js +0 -3
- package/esm/funcs/user-discovery-get-user-profile.js.map +1 -1
- package/esm/funcs/user-discovery-search-users.d.ts +0 -3
- package/esm/funcs/user-discovery-search-users.d.ts.map +1 -1
- package/esm/funcs/user-discovery-search-users.js +0 -3
- package/esm/funcs/user-discovery-search-users.js.map +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/collection.d.ts +12 -0
- package/esm/models/collection.d.ts.map +1 -0
- package/esm/models/collection.js +18 -0
- package/esm/models/collection.js.map +1 -0
- package/esm/models/conversation.d.ts +0 -3
- package/esm/models/conversation.d.ts.map +1 -1
- package/esm/models/conversation.js.map +1 -1
- package/esm/models/index.d.ts +2 -1
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +2 -1
- package/esm/models/index.js.map +1 -1
- package/esm/models/operations/add-collection-member.d.ts +24 -0
- package/esm/models/operations/add-collection-member.d.ts.map +1 -0
- package/esm/models/operations/add-collection-member.js +21 -0
- package/esm/models/operations/add-collection-member.js.map +1 -0
- package/esm/models/operations/create-collection.d.ts +12 -0
- package/esm/models/operations/create-collection.d.ts.map +1 -0
- package/esm/models/operations/create-collection.js +13 -0
- package/esm/models/operations/create-collection.js.map +1 -0
- package/esm/models/operations/create-post.d.ts +1 -1
- package/esm/models/operations/get-collection-feed.d.ts +19 -0
- package/esm/models/operations/get-collection-feed.d.ts.map +1 -0
- package/esm/models/operations/get-collection-feed.js +15 -0
- package/esm/models/operations/get-collection-feed.js.map +1 -0
- package/esm/models/operations/get-collection-members.d.ts +12 -0
- package/esm/models/operations/get-collection-members.d.ts.map +1 -0
- package/esm/models/operations/get-collection-members.js +13 -0
- package/esm/models/operations/get-collection-members.js.map +1 -0
- package/esm/models/operations/get-creator-posts.d.ts +5 -0
- package/esm/models/operations/get-creator-posts.d.ts.map +1 -1
- package/esm/models/operations/get-creator-posts.js +1 -0
- package/esm/models/operations/get-creator-posts.js.map +1 -1
- package/esm/models/operations/get-feed.d.ts +3 -13
- package/esm/models/operations/get-feed.d.ts.map +1 -1
- package/esm/models/operations/get-feed.js +0 -11
- package/esm/models/operations/get-feed.js.map +1 -1
- package/esm/models/operations/get-message-history.d.ts +20 -0
- package/esm/models/operations/get-message-history.d.ts.map +1 -1
- package/esm/models/operations/get-message-history.js +13 -0
- package/esm/models/operations/get-message-history.js.map +1 -1
- package/esm/models/operations/index.d.ts +5 -5
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +5 -5
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/remove-collection-member.d.ts +14 -0
- package/esm/models/operations/remove-collection-member.d.ts.map +1 -0
- package/esm/models/operations/remove-collection-member.js +14 -0
- package/esm/models/operations/remove-collection-member.js.map +1 -0
- package/esm/models/paginated-posts-response.d.ts +15 -0
- package/esm/models/paginated-posts-response.d.ts.map +1 -0
- package/esm/models/paginated-posts-response.js +17 -0
- package/esm/models/paginated-posts-response.js.map +1 -0
- package/esm/models/register-request.d.ts +4 -2
- package/esm/models/register-request.d.ts.map +1 -1
- package/esm/models/register-request.js +2 -1
- package/esm/models/register-request.js.map +1 -1
- package/esm/models/user-profile.d.ts +0 -1
- package/esm/models/user-profile.d.ts.map +1 -1
- package/esm/models/user-profile.js +0 -1
- package/esm/models/user-profile.js.map +1 -1
- package/esm/models/user.d.ts +32 -0
- package/esm/models/user.d.ts.map +1 -1
- package/esm/models/user.js +16 -0
- package/esm/models/user.js.map +1 -1
- package/esm/sdk/creator-timelines.d.ts +2 -5
- package/esm/sdk/creator-timelines.d.ts.map +1 -1
- package/esm/sdk/creator-timelines.js +3 -6
- package/esm/sdk/creator-timelines.js.map +1 -1
- package/esm/sdk/custom-collections.d.ts +26 -0
- package/esm/sdk/custom-collections.d.ts.map +1 -0
- package/esm/sdk/custom-collections.js +44 -0
- package/esm/sdk/custom-collections.js.map +1 -0
- package/esm/sdk/direct-messaging.d.ts +3 -5
- package/esm/sdk/direct-messaging.d.ts.map +1 -1
- package/esm/sdk/direct-messaging.js +3 -6
- package/esm/sdk/direct-messaging.js.map +1 -1
- package/esm/sdk/posts.d.ts +4 -10
- package/esm/sdk/posts.d.ts.map +1 -1
- package/esm/sdk/posts.js +5 -11
- package/esm/sdk/posts.js.map +1 -1
- package/esm/sdk/sdk.d.ts +3 -3
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +4 -4
- package/esm/sdk/sdk.js.map +1 -1
- package/esm/sdk/user-discovery.d.ts +0 -9
- package/esm/sdk/user-discovery.d.ts.map +1 -1
- package/esm/sdk/user-discovery.js +0 -9
- package/esm/sdk/user-discovery.js.map +1 -1
- package/examples/authenticationRegisterUser.example.ts +2 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/creator-timelines-get-creator-posts.ts +10 -8
- package/src/funcs/{custom-lists-add-list-member.ts → custom-collections-add-collection-member.ts} +15 -14
- package/src/funcs/{custom-lists-create-list.ts → custom-collections-create-collection.ts} +13 -12
- package/src/funcs/{custom-lists-get-list-members.ts → custom-collections-get-collection-members.ts} +13 -12
- package/src/funcs/{custom-lists-get-lists.ts → custom-collections-get-collections.ts} +9 -9
- package/src/funcs/{custom-lists-remove-list-member.ts → custom-collections-remove-collection-member.ts} +12 -12
- package/src/funcs/direct-messaging-get-conversations.ts +0 -3
- package/src/funcs/direct-messaging-get-message-history.ts +20 -7
- package/src/funcs/posts-create-post.ts +0 -3
- package/src/funcs/{posts-get-list-feed.ts → posts-get-collection-feed.ts} +22 -16
- package/src/funcs/posts-get-feed.ts +6 -8
- package/src/funcs/user-discovery-get-following.ts +0 -3
- package/src/funcs/user-discovery-get-user-profile.ts +0 -3
- package/src/funcs/user-discovery-search-users.ts +0 -3
- package/src/lib/config.ts +2 -2
- package/src/models/{custom-list.ts → collection.ts} +7 -7
- package/src/models/conversation.ts +0 -3
- package/src/models/index.ts +2 -1
- package/src/models/operations/add-collection-member.ts +61 -0
- package/src/models/operations/create-collection.ts +31 -0
- package/src/models/operations/create-post.ts +1 -1
- package/src/models/operations/get-collection-feed.ts +40 -0
- package/src/models/operations/get-collection-members.ts +33 -0
- package/src/models/operations/get-creator-posts.ts +6 -0
- package/src/models/operations/get-feed.ts +3 -32
- package/src/models/operations/get-message-history.ts +41 -0
- package/src/models/operations/index.ts +5 -5
- package/src/models/operations/remove-collection-member.ts +36 -0
- package/src/models/paginated-posts-response.ts +38 -0
- package/src/models/register-request.ts +6 -3
- package/src/models/user-profile.ts +0 -2
- package/src/models/user.ts +46 -0
- package/src/sdk/creator-timelines.ts +4 -5
- package/src/sdk/custom-collections.ts +88 -0
- package/src/sdk/direct-messaging.ts +7 -5
- package/src/sdk/posts.ts +11 -15
- package/src/sdk/sdk.ts +4 -4
- package/src/sdk/user-discovery.ts +0 -9
- package/src/models/operations/add-list-member.ts +0 -59
- package/src/models/operations/create-list.ts +0 -31
- package/src/models/operations/get-list-feed.ts +0 -34
- package/src/models/operations/get-list-members.ts +0 -31
- package/src/models/operations/remove-list-member.ts +0 -34
- package/src/sdk/custom-lists.ts +0 -88
|
@@ -4,14 +4,34 @@
|
|
|
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";
|
|
7
12
|
|
|
8
13
|
export type GetMessageHistoryRequest = {
|
|
9
14
|
userId: number;
|
|
15
|
+
limit?: number | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Opaque cursor pointing to the last processed message ID/timestamp
|
|
18
|
+
*/
|
|
19
|
+
cursor?: string | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Paginated history array of direct text messages
|
|
24
|
+
*/
|
|
25
|
+
export type GetMessageHistoryResponse = {
|
|
26
|
+
items?: Array<models.Message> | undefined;
|
|
27
|
+
nextCursor?: string | null | undefined;
|
|
10
28
|
};
|
|
11
29
|
|
|
12
30
|
/** @internal */
|
|
13
31
|
export type GetMessageHistoryRequest$Outbound = {
|
|
14
32
|
userId: number;
|
|
33
|
+
limit: number;
|
|
34
|
+
cursor?: string | undefined;
|
|
15
35
|
};
|
|
16
36
|
|
|
17
37
|
/** @internal */
|
|
@@ -20,6 +40,8 @@ export const GetMessageHistoryRequest$outboundSchema: z.ZodMiniType<
|
|
|
20
40
|
GetMessageHistoryRequest
|
|
21
41
|
> = z.object({
|
|
22
42
|
userId: z.int(),
|
|
43
|
+
limit: z._default(z.int(), 30),
|
|
44
|
+
cursor: z.optional(z.string()),
|
|
23
45
|
});
|
|
24
46
|
|
|
25
47
|
export function getMessageHistoryRequestToJSON(
|
|
@@ -29,3 +51,22 @@ export function getMessageHistoryRequestToJSON(
|
|
|
29
51
|
GetMessageHistoryRequest$outboundSchema.parse(getMessageHistoryRequest),
|
|
30
52
|
);
|
|
31
53
|
}
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
export const GetMessageHistoryResponse$inboundSchema: z.ZodMiniType<
|
|
57
|
+
GetMessageHistoryResponse,
|
|
58
|
+
unknown
|
|
59
|
+
> = z.object({
|
|
60
|
+
items: types.optional(z.array(models.Message$inboundSchema)),
|
|
61
|
+
nextCursor: z.optional(z.nullable(types.string())),
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export function getMessageHistoryResponseFromJSON(
|
|
65
|
+
jsonString: string,
|
|
66
|
+
): SafeParseResult<GetMessageHistoryResponse, SDKValidationError> {
|
|
67
|
+
return safeParse(
|
|
68
|
+
jsonString,
|
|
69
|
+
(x) => GetMessageHistoryResponse$inboundSchema.parse(JSON.parse(x)),
|
|
70
|
+
`Failed to parse 'GetMessageHistoryResponse' from JSON`,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
* @generated-id: 0d9ffaf774d2
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
export * from "./add-
|
|
7
|
-
export * from "./create-
|
|
6
|
+
export * from "./add-collection-member.js";
|
|
7
|
+
export * from "./create-collection.js";
|
|
8
8
|
export * from "./create-post.js";
|
|
9
|
+
export * from "./get-collection-feed.js";
|
|
10
|
+
export * from "./get-collection-members.js";
|
|
9
11
|
export * from "./get-creator-posts.js";
|
|
10
12
|
export * from "./get-feed.js";
|
|
11
|
-
export * from "./get-list-feed.js";
|
|
12
|
-
export * from "./get-list-members.js";
|
|
13
13
|
export * from "./get-message-history.js";
|
|
14
14
|
export * from "./get-user-profile.js";
|
|
15
15
|
export * from "./login-user.js";
|
|
16
|
-
export * from "./remove-
|
|
16
|
+
export * from "./remove-collection-member.js";
|
|
17
17
|
export * from "./search-users.js";
|
|
18
18
|
export * from "./send-message.js";
|
|
19
19
|
export * from "./subscribe-to-user.js";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 05d660fe0d9c
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4-mini";
|
|
7
|
+
|
|
8
|
+
export type RemoveCollectionMemberRequest = {
|
|
9
|
+
collectionId: number;
|
|
10
|
+
userId: number;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/** @internal */
|
|
14
|
+
export type RemoveCollectionMemberRequest$Outbound = {
|
|
15
|
+
collectionId: number;
|
|
16
|
+
userId: number;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const RemoveCollectionMemberRequest$outboundSchema: z.ZodMiniType<
|
|
21
|
+
RemoveCollectionMemberRequest$Outbound,
|
|
22
|
+
RemoveCollectionMemberRequest
|
|
23
|
+
> = z.object({
|
|
24
|
+
collectionId: z.int(),
|
|
25
|
+
userId: z.int(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export function removeCollectionMemberRequestToJSON(
|
|
29
|
+
removeCollectionMemberRequest: RemoveCollectionMemberRequest,
|
|
30
|
+
): string {
|
|
31
|
+
return JSON.stringify(
|
|
32
|
+
RemoveCollectionMemberRequest$outboundSchema.parse(
|
|
33
|
+
removeCollectionMemberRequest,
|
|
34
|
+
),
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 4d6d6852ae23
|
|
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
|
+
import { Post, Post$inboundSchema } from "./post.js";
|
|
12
|
+
|
|
13
|
+
export type PaginatedPostsResponse = {
|
|
14
|
+
items?: Array<Post> | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Provide this value to the next request's cursor query parameter to fetch the next block.
|
|
17
|
+
*/
|
|
18
|
+
nextCursor?: string | null | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const PaginatedPostsResponse$inboundSchema: z.ZodMiniType<
|
|
23
|
+
PaginatedPostsResponse,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
items: types.optional(z.array(Post$inboundSchema)),
|
|
27
|
+
nextCursor: z.optional(z.nullable(types.string())),
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export function paginatedPostsResponseFromJSON(
|
|
31
|
+
jsonString: string,
|
|
32
|
+
): SafeParseResult<PaginatedPostsResponse, SDKValidationError> {
|
|
33
|
+
return safeParse(
|
|
34
|
+
jsonString,
|
|
35
|
+
(x) => PaginatedPostsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
36
|
+
`Failed to parse 'PaginatedPostsResponse' from JSON`,
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -7,15 +7,17 @@ import * as z from "zod/v4-mini";
|
|
|
7
7
|
|
|
8
8
|
export type RegisterRequest = {
|
|
9
9
|
username: string;
|
|
10
|
+
email: string;
|
|
10
11
|
password: string;
|
|
11
|
-
displayName
|
|
12
|
+
displayName: string;
|
|
12
13
|
};
|
|
13
14
|
|
|
14
15
|
/** @internal */
|
|
15
16
|
export type RegisterRequest$Outbound = {
|
|
16
17
|
username: string;
|
|
18
|
+
email: string;
|
|
17
19
|
password: string;
|
|
18
|
-
displayName
|
|
20
|
+
displayName: string;
|
|
19
21
|
};
|
|
20
22
|
|
|
21
23
|
/** @internal */
|
|
@@ -24,8 +26,9 @@ export const RegisterRequest$outboundSchema: z.ZodMiniType<
|
|
|
24
26
|
RegisterRequest
|
|
25
27
|
> = z.object({
|
|
26
28
|
username: z.string(),
|
|
29
|
+
email: z.string(),
|
|
27
30
|
password: z.string(),
|
|
28
|
-
displayName: z.
|
|
31
|
+
displayName: z.string(),
|
|
29
32
|
});
|
|
30
33
|
|
|
31
34
|
export function registerRequestToJSON(
|
|
@@ -12,7 +12,6 @@ import { User, User$inboundSchema } from "./user.js";
|
|
|
12
12
|
|
|
13
13
|
export type UserProfile = {
|
|
14
14
|
user?: User | undefined;
|
|
15
|
-
avatarUrl?: string | null | undefined;
|
|
16
15
|
followersCount?: number | undefined;
|
|
17
16
|
followingCount?: number | undefined;
|
|
18
17
|
};
|
|
@@ -21,7 +20,6 @@ export type UserProfile = {
|
|
|
21
20
|
export const UserProfile$inboundSchema: z.ZodMiniType<UserProfile, unknown> = z
|
|
22
21
|
.object({
|
|
23
22
|
user: types.optional(User$inboundSchema),
|
|
24
|
-
avatarUrl: z.optional(z.nullable(types.string())),
|
|
25
23
|
followersCount: types.optional(types.number()),
|
|
26
24
|
followingCount: types.optional(types.number()),
|
|
27
25
|
});
|
package/src/models/user.ts
CHANGED
|
@@ -5,22 +5,68 @@
|
|
|
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
|
|
|
14
|
+
export const AccountStatus = {
|
|
15
|
+
Active: "ACTIVE",
|
|
16
|
+
Suspended: "SUSPENDED",
|
|
17
|
+
Deactivated: "DEACTIVATED",
|
|
18
|
+
} as const;
|
|
19
|
+
export type AccountStatus = OpenEnum<typeof AccountStatus>;
|
|
20
|
+
|
|
12
21
|
export type User = {
|
|
13
22
|
id?: number | undefined;
|
|
14
23
|
username?: string | undefined;
|
|
24
|
+
email?: string | undefined;
|
|
15
25
|
displayName?: string | undefined;
|
|
26
|
+
bio?: string | null | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Fully qualified URI mapping to the SeaweedFS avatar reference asset path
|
|
29
|
+
*/
|
|
30
|
+
avatarUrl?: string | null | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Fully qualified URI mapping to the SeaweedFS profile header banner path
|
|
33
|
+
*/
|
|
34
|
+
bannerUrl?: string | null | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Flags if this user account can build premium feeds and process media timelines
|
|
37
|
+
*/
|
|
38
|
+
isCreator?: boolean | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* System verified identity indicator badge validation toggle
|
|
41
|
+
*/
|
|
42
|
+
isVerified?: boolean | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Monthly paywall gate pricing valuation tier for premium feed access
|
|
45
|
+
*/
|
|
46
|
+
subscriptionPrice?: number | undefined;
|
|
47
|
+
accountStatus?: AccountStatus | undefined;
|
|
16
48
|
createdAt?: Date | undefined;
|
|
17
49
|
};
|
|
18
50
|
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const AccountStatus$inboundSchema: z.ZodMiniType<
|
|
53
|
+
AccountStatus,
|
|
54
|
+
unknown
|
|
55
|
+
> = openEnums.inboundSchema(AccountStatus);
|
|
56
|
+
|
|
19
57
|
/** @internal */
|
|
20
58
|
export const User$inboundSchema: z.ZodMiniType<User, unknown> = z.object({
|
|
21
59
|
id: types.optional(types.number()),
|
|
22
60
|
username: types.optional(types.string()),
|
|
61
|
+
email: types.optional(types.string()),
|
|
23
62
|
displayName: types.optional(types.string()),
|
|
63
|
+
bio: z.optional(z.nullable(types.string())),
|
|
64
|
+
avatarUrl: z.optional(z.nullable(types.string())),
|
|
65
|
+
bannerUrl: z.optional(z.nullable(types.string())),
|
|
66
|
+
isCreator: types.optional(types.boolean()),
|
|
67
|
+
isVerified: types.optional(types.boolean()),
|
|
68
|
+
subscriptionPrice: types.optional(types.number()),
|
|
69
|
+
accountStatus: types.optional(AccountStatus$inboundSchema),
|
|
24
70
|
createdAt: types.optional(types.date()),
|
|
25
71
|
});
|
|
26
72
|
|
|
@@ -10,20 +10,19 @@ import { unwrapAsync } from "../types/fp.js";
|
|
|
10
10
|
|
|
11
11
|
export class CreatorTimelines extends ClientSDK {
|
|
12
12
|
/**
|
|
13
|
-
* Get a specific creator's timeline
|
|
14
|
-
*
|
|
15
|
-
* @remarks
|
|
16
|
-
* Retrieves individual posts uploaded strictly by the requested user account.
|
|
13
|
+
* Get a specific creator's timeline with pagination
|
|
17
14
|
*/
|
|
18
15
|
async getCreatorPosts(
|
|
19
16
|
userId: number,
|
|
20
17
|
limit?: number | undefined,
|
|
18
|
+
cursor?: string | undefined,
|
|
21
19
|
options?: RequestOptions,
|
|
22
|
-
): Promise<
|
|
20
|
+
): Promise<models.PaginatedPostsResponse> {
|
|
23
21
|
return unwrapAsync(creatorTimelinesGetCreatorPosts(
|
|
24
22
|
this,
|
|
25
23
|
userId,
|
|
26
24
|
limit,
|
|
25
|
+
cursor,
|
|
27
26
|
options,
|
|
28
27
|
));
|
|
29
28
|
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 26de8c8c4014
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { customCollectionsAddCollectionMember } from "../funcs/custom-collections-add-collection-member.js";
|
|
7
|
+
import { customCollectionsCreateCollection } from "../funcs/custom-collections-create-collection.js";
|
|
8
|
+
import { customCollectionsGetCollectionMembers } from "../funcs/custom-collections-get-collection-members.js";
|
|
9
|
+
import { customCollectionsGetCollections } from "../funcs/custom-collections-get-collections.js";
|
|
10
|
+
import { customCollectionsRemoveCollectionMember } from "../funcs/custom-collections-remove-collection-member.js";
|
|
11
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import * as models from "../models/index.js";
|
|
13
|
+
import * as operations from "../models/operations/index.js";
|
|
14
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
15
|
+
|
|
16
|
+
export class CustomCollections extends ClientSDK {
|
|
17
|
+
/**
|
|
18
|
+
* Get all collections created by the user
|
|
19
|
+
*/
|
|
20
|
+
async getCollections(
|
|
21
|
+
options?: RequestOptions,
|
|
22
|
+
): Promise<Array<models.Collection>> {
|
|
23
|
+
return unwrapAsync(customCollectionsGetCollections(
|
|
24
|
+
this,
|
|
25
|
+
options,
|
|
26
|
+
));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Create a new custom grouping collection
|
|
31
|
+
*/
|
|
32
|
+
async createCollection(
|
|
33
|
+
request: operations.CreateCollectionRequest,
|
|
34
|
+
options?: RequestOptions,
|
|
35
|
+
): Promise<models.Collection> {
|
|
36
|
+
return unwrapAsync(customCollectionsCreateCollection(
|
|
37
|
+
this,
|
|
38
|
+
request,
|
|
39
|
+
options,
|
|
40
|
+
));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Get all members belonging to a custom collection
|
|
45
|
+
*/
|
|
46
|
+
async getCollectionMembers(
|
|
47
|
+
collectionId: number,
|
|
48
|
+
options?: RequestOptions,
|
|
49
|
+
): Promise<Array<models.User>> {
|
|
50
|
+
return unwrapAsync(customCollectionsGetCollectionMembers(
|
|
51
|
+
this,
|
|
52
|
+
collectionId,
|
|
53
|
+
options,
|
|
54
|
+
));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Add a user to a custom collection
|
|
59
|
+
*/
|
|
60
|
+
async addCollectionMember(
|
|
61
|
+
collectionId: number,
|
|
62
|
+
body: operations.AddCollectionMemberRequestBody,
|
|
63
|
+
options?: RequestOptions,
|
|
64
|
+
): Promise<void> {
|
|
65
|
+
return unwrapAsync(customCollectionsAddCollectionMember(
|
|
66
|
+
this,
|
|
67
|
+
collectionId,
|
|
68
|
+
body,
|
|
69
|
+
options,
|
|
70
|
+
));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Remove a user from a custom collection
|
|
75
|
+
*/
|
|
76
|
+
async removeCollectionMember(
|
|
77
|
+
collectionId: number,
|
|
78
|
+
userId: number,
|
|
79
|
+
options?: RequestOptions,
|
|
80
|
+
): Promise<void> {
|
|
81
|
+
return unwrapAsync(customCollectionsRemoveCollectionMember(
|
|
82
|
+
this,
|
|
83
|
+
collectionId,
|
|
84
|
+
userId,
|
|
85
|
+
options,
|
|
86
|
+
));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -8,14 +8,12 @@ import { directMessagingGetMessageHistory } from "../funcs/direct-messaging-get-
|
|
|
8
8
|
import { directMessagingSendMessage } from "../funcs/direct-messaging-send-message.js";
|
|
9
9
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
10
10
|
import * as models from "../models/index.js";
|
|
11
|
+
import * as operations from "../models/operations/index.js";
|
|
11
12
|
import { unwrapAsync } from "../types/fp.js";
|
|
12
13
|
|
|
13
14
|
export class DirectMessaging extends ClientSDK {
|
|
14
15
|
/**
|
|
15
16
|
* Fetch active DM threads
|
|
16
|
-
*
|
|
17
|
-
* @remarks
|
|
18
|
-
* Gets recent conversation summary records containing index context of opposing communication profiles.
|
|
19
17
|
*/
|
|
20
18
|
async getConversations(
|
|
21
19
|
options?: RequestOptions,
|
|
@@ -27,15 +25,19 @@ export class DirectMessaging extends ClientSDK {
|
|
|
27
25
|
}
|
|
28
26
|
|
|
29
27
|
/**
|
|
30
|
-
* Load message history with a specific
|
|
28
|
+
* Load message history with a specific user with pagination
|
|
31
29
|
*/
|
|
32
30
|
async getMessageHistory(
|
|
33
31
|
userId: number,
|
|
32
|
+
limit?: number | undefined,
|
|
33
|
+
cursor?: string | undefined,
|
|
34
34
|
options?: RequestOptions,
|
|
35
|
-
): Promise<
|
|
35
|
+
): Promise<operations.GetMessageHistoryResponse> {
|
|
36
36
|
return unwrapAsync(directMessagingGetMessageHistory(
|
|
37
37
|
this,
|
|
38
38
|
userId,
|
|
39
|
+
limit,
|
|
40
|
+
cursor,
|
|
39
41
|
options,
|
|
40
42
|
));
|
|
41
43
|
}
|
package/src/sdk/posts.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { postsCreatePost } from "../funcs/posts-create-post.js";
|
|
7
|
+
import { postsGetCollectionFeed } from "../funcs/posts-get-collection-feed.js";
|
|
7
8
|
import { postsGetFeed } from "../funcs/posts-get-feed.js";
|
|
8
|
-
import { postsGetListFeed } from "../funcs/posts-get-list-feed.js";
|
|
9
9
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
10
10
|
import * as models from "../models/index.js";
|
|
11
11
|
import * as operations from "../models/operations/index.js";
|
|
@@ -13,16 +13,13 @@ import { unwrapAsync } from "../types/fp.js";
|
|
|
13
13
|
|
|
14
14
|
export class Posts extends ClientSDK {
|
|
15
15
|
/**
|
|
16
|
-
* Get the consolidated timeline feed
|
|
17
|
-
*
|
|
18
|
-
* @remarks
|
|
19
|
-
* Retrieves posts from users the current authenticated user is subscribed to.
|
|
16
|
+
* Get the consolidated timeline feed with pagination
|
|
20
17
|
*/
|
|
21
18
|
async getFeed(
|
|
22
19
|
limit?: number | undefined,
|
|
23
20
|
cursor?: string | undefined,
|
|
24
21
|
options?: RequestOptions,
|
|
25
|
-
): Promise<
|
|
22
|
+
): Promise<models.PaginatedPostsResponse> {
|
|
26
23
|
return unwrapAsync(postsGetFeed(
|
|
27
24
|
this,
|
|
28
25
|
limit,
|
|
@@ -33,9 +30,6 @@ export class Posts extends ClientSDK {
|
|
|
33
30
|
|
|
34
31
|
/**
|
|
35
32
|
* Create a post blueprint requesting batch upload slots
|
|
36
|
-
*
|
|
37
|
-
* @remarks
|
|
38
|
-
* Accepts a list of metadata parts for grids/carousels and responds with multiple presigned destination configurations mapped out of SeaweedFS routing rules.
|
|
39
33
|
*/
|
|
40
34
|
async createPost(
|
|
41
35
|
request: models.CreatePostRequest,
|
|
@@ -49,17 +43,19 @@ export class Posts extends ClientSDK {
|
|
|
49
43
|
}
|
|
50
44
|
|
|
51
45
|
/**
|
|
52
|
-
* Get a timeline filtered strictly by members of this
|
|
46
|
+
* Get a timeline filtered strictly by members of this collection with pagination
|
|
53
47
|
*/
|
|
54
|
-
async
|
|
55
|
-
|
|
48
|
+
async getCollectionFeed(
|
|
49
|
+
collectionId: number,
|
|
56
50
|
limit?: number | undefined,
|
|
51
|
+
cursor?: string | undefined,
|
|
57
52
|
options?: RequestOptions,
|
|
58
|
-
): Promise<
|
|
59
|
-
return unwrapAsync(
|
|
53
|
+
): Promise<models.PaginatedPostsResponse> {
|
|
54
|
+
return unwrapAsync(postsGetCollectionFeed(
|
|
60
55
|
this,
|
|
61
|
-
|
|
56
|
+
collectionId,
|
|
62
57
|
limit,
|
|
58
|
+
cursor,
|
|
63
59
|
options,
|
|
64
60
|
));
|
|
65
61
|
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { ClientSDK } from "../lib/sdks.js";
|
|
7
7
|
import { Authentication } from "./authentication.js";
|
|
8
8
|
import { CreatorTimelines } from "./creator-timelines.js";
|
|
9
|
-
import {
|
|
9
|
+
import { CustomCollections } from "./custom-collections.js";
|
|
10
10
|
import { DirectMessaging } from "./direct-messaging.js";
|
|
11
11
|
import { Posts } from "./posts.js";
|
|
12
12
|
import { Subscriptions } from "./subscriptions.js";
|
|
@@ -43,8 +43,8 @@ export class FankareSDK extends ClientSDK {
|
|
|
43
43
|
return (this._directMessaging ??= new DirectMessaging(this._options));
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
private
|
|
47
|
-
get
|
|
48
|
-
return (this.
|
|
46
|
+
private _customCollections?: CustomCollections;
|
|
47
|
+
get customCollections(): CustomCollections {
|
|
48
|
+
return (this._customCollections ??= new CustomCollections(this._options));
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -13,9 +13,6 @@ import { unwrapAsync } from "../types/fp.js";
|
|
|
13
13
|
export class UserDiscovery extends ClientSDK {
|
|
14
14
|
/**
|
|
15
15
|
* Search global user profiles
|
|
16
|
-
*
|
|
17
|
-
* @remarks
|
|
18
|
-
* Queries the global database for user profiles matching a search string.
|
|
19
16
|
*/
|
|
20
17
|
async searchUsers(
|
|
21
18
|
query: string,
|
|
@@ -30,9 +27,6 @@ export class UserDiscovery extends ClientSDK {
|
|
|
30
27
|
|
|
31
28
|
/**
|
|
32
29
|
* Retrieve user profile metadata
|
|
33
|
-
*
|
|
34
|
-
* @remarks
|
|
35
|
-
* Fetches a user's target profile metrics including counts and media references.
|
|
36
30
|
*/
|
|
37
31
|
async getUserProfile(
|
|
38
32
|
userId: number,
|
|
@@ -47,9 +41,6 @@ export class UserDiscovery extends ClientSDK {
|
|
|
47
41
|
|
|
48
42
|
/**
|
|
49
43
|
* Get subscriptions list
|
|
50
|
-
*
|
|
51
|
-
* @remarks
|
|
52
|
-
* Retrieves an array of all users the current caller is subscribed to for initializing active client button states.
|
|
53
44
|
*/
|
|
54
45
|
async getFollowing(
|
|
55
46
|
options?: RequestOptions,
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
* @generated-id: d2fa5284fdc4
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import * as z from "zod/v4-mini";
|
|
7
|
-
|
|
8
|
-
export type AddListMemberRequestBody = {
|
|
9
|
-
userId: number;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export type AddListMemberRequest = {
|
|
13
|
-
listId: number;
|
|
14
|
-
body: AddListMemberRequestBody;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/** @internal */
|
|
18
|
-
export type AddListMemberRequestBody$Outbound = {
|
|
19
|
-
userId: number;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
/** @internal */
|
|
23
|
-
export const AddListMemberRequestBody$outboundSchema: z.ZodMiniType<
|
|
24
|
-
AddListMemberRequestBody$Outbound,
|
|
25
|
-
AddListMemberRequestBody
|
|
26
|
-
> = z.object({
|
|
27
|
-
userId: z.int(),
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
export function addListMemberRequestBodyToJSON(
|
|
31
|
-
addListMemberRequestBody: AddListMemberRequestBody,
|
|
32
|
-
): string {
|
|
33
|
-
return JSON.stringify(
|
|
34
|
-
AddListMemberRequestBody$outboundSchema.parse(addListMemberRequestBody),
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/** @internal */
|
|
39
|
-
export type AddListMemberRequest$Outbound = {
|
|
40
|
-
listId: number;
|
|
41
|
-
body: AddListMemberRequestBody$Outbound;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
/** @internal */
|
|
45
|
-
export const AddListMemberRequest$outboundSchema: z.ZodMiniType<
|
|
46
|
-
AddListMemberRequest$Outbound,
|
|
47
|
-
AddListMemberRequest
|
|
48
|
-
> = z.object({
|
|
49
|
-
listId: z.int(),
|
|
50
|
-
body: z.lazy(() => AddListMemberRequestBody$outboundSchema),
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
export function addListMemberRequestToJSON(
|
|
54
|
-
addListMemberRequest: AddListMemberRequest,
|
|
55
|
-
): string {
|
|
56
|
-
return JSON.stringify(
|
|
57
|
-
AddListMemberRequest$outboundSchema.parse(addListMemberRequest),
|
|
58
|
-
);
|
|
59
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
* @generated-id: d66b3381784b
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import * as z from "zod/v4-mini";
|
|
7
|
-
|
|
8
|
-
export type CreateListRequest = {
|
|
9
|
-
listName: string;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
/** @internal */
|
|
13
|
-
export type CreateListRequest$Outbound = {
|
|
14
|
-
listName: string;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/** @internal */
|
|
18
|
-
export const CreateListRequest$outboundSchema: z.ZodMiniType<
|
|
19
|
-
CreateListRequest$Outbound,
|
|
20
|
-
CreateListRequest
|
|
21
|
-
> = z.object({
|
|
22
|
-
listName: z.string(),
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
export function createListRequestToJSON(
|
|
26
|
-
createListRequest: CreateListRequest,
|
|
27
|
-
): string {
|
|
28
|
-
return JSON.stringify(
|
|
29
|
-
CreateListRequest$outboundSchema.parse(createListRequest),
|
|
30
|
-
);
|
|
31
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
* @generated-id: a0ba779f152e
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import * as z from "zod/v4-mini";
|
|
7
|
-
|
|
8
|
-
export type GetListFeedRequest = {
|
|
9
|
-
listId: number;
|
|
10
|
-
limit?: number | undefined;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
/** @internal */
|
|
14
|
-
export type GetListFeedRequest$Outbound = {
|
|
15
|
-
listId: number;
|
|
16
|
-
limit: number;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
/** @internal */
|
|
20
|
-
export const GetListFeedRequest$outboundSchema: z.ZodMiniType<
|
|
21
|
-
GetListFeedRequest$Outbound,
|
|
22
|
-
GetListFeedRequest
|
|
23
|
-
> = z.object({
|
|
24
|
-
listId: z.int(),
|
|
25
|
-
limit: z._default(z.int(), 20),
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
export function getListFeedRequestToJSON(
|
|
29
|
-
getListFeedRequest: GetListFeedRequest,
|
|
30
|
-
): string {
|
|
31
|
-
return JSON.stringify(
|
|
32
|
-
GetListFeedRequest$outboundSchema.parse(getListFeedRequest),
|
|
33
|
-
);
|
|
34
|
-
}
|