@aurora-interactive/sensei-productivity 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/dist/commonjs/funcs/users-friends-accept.d.ts +14 -0
- package/dist/commonjs/funcs/users-friends-accept.d.ts.map +1 -0
- package/dist/commonjs/funcs/users-friends-accept.js +127 -0
- package/dist/commonjs/funcs/users-friends-accept.js.map +1 -0
- package/dist/commonjs/funcs/users-friends-list.d.ts +14 -0
- package/dist/commonjs/funcs/users-friends-list.d.ts.map +1 -0
- package/dist/commonjs/funcs/users-friends-list.js +128 -0
- package/dist/commonjs/funcs/users-friends-list.js.map +1 -0
- package/dist/commonjs/funcs/users-friends-pending.d.ts +14 -0
- package/dist/commonjs/funcs/users-friends-pending.d.ts.map +1 -0
- package/dist/commonjs/funcs/users-friends-pending.js +113 -0
- package/dist/commonjs/funcs/users-friends-pending.js.map +1 -0
- package/dist/commonjs/funcs/users-friends-reject.d.ts +14 -0
- package/dist/commonjs/funcs/users-friends-reject.d.ts.map +1 -0
- package/dist/commonjs/funcs/users-friends-reject.js +127 -0
- package/dist/commonjs/funcs/users-friends-reject.js.map +1 -0
- package/dist/commonjs/funcs/users-friends-remove.d.ts +14 -0
- package/dist/commonjs/funcs/users-friends-remove.d.ts.map +1 -0
- package/dist/commonjs/funcs/users-friends-remove.js +127 -0
- package/dist/commonjs/funcs/users-friends-remove.js.map +1 -0
- package/dist/commonjs/funcs/users-friends-send-request.d.ts +14 -0
- package/dist/commonjs/funcs/users-friends-send-request.d.ts.map +1 -0
- package/dist/commonjs/funcs/users-friends-send-request.js +127 -0
- package/dist/commonjs/funcs/users-friends-send-request.js.map +1 -0
- package/dist/commonjs/funcs/users-posts-delete.d.ts +14 -0
- package/dist/commonjs/funcs/users-posts-delete.d.ts.map +1 -0
- package/dist/commonjs/funcs/users-posts-delete.js +127 -0
- package/dist/commonjs/funcs/users-posts-delete.js.map +1 -0
- package/dist/commonjs/funcs/users-posts-feed.d.ts +14 -0
- package/dist/commonjs/funcs/users-posts-feed.d.ts.map +1 -0
- package/dist/commonjs/funcs/users-posts-feed.js +127 -0
- package/dist/commonjs/funcs/users-posts-feed.js.map +1 -0
- package/dist/commonjs/funcs/users-posts-get-by-post-id.d.ts +14 -0
- package/dist/commonjs/funcs/users-posts-get-by-post-id.d.ts.map +1 -0
- package/dist/commonjs/funcs/users-posts-get-by-post-id.js +128 -0
- package/dist/commonjs/funcs/users-posts-get-by-post-id.js.map +1 -0
- package/dist/commonjs/funcs/users-posts-get-by-user-id.d.ts +14 -0
- package/dist/commonjs/funcs/users-posts-get-by-user-id.d.ts.map +1 -0
- package/dist/commonjs/funcs/users-posts-get-by-user-id.js +128 -0
- package/dist/commonjs/funcs/users-posts-get-by-user-id.js.map +1 -0
- package/dist/commonjs/funcs/users-posts-update.d.ts +14 -0
- package/dist/commonjs/funcs/users-posts-update.d.ts.map +1 -0
- package/dist/commonjs/funcs/users-posts-update.js +129 -0
- package/dist/commonjs/funcs/users-posts-update.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +4 -4
- package/dist/commonjs/lib/config.js +4 -4
- package/dist/commonjs/models/operations/accept-friend-request.d.ts +15 -0
- package/dist/commonjs/models/operations/accept-friend-request.d.ts.map +1 -0
- package/dist/commonjs/models/operations/accept-friend-request.js +49 -0
- package/dist/commonjs/models/operations/accept-friend-request.js.map +1 -0
- package/dist/commonjs/models/operations/delete-post.d.ts +12 -0
- package/dist/commonjs/models/operations/delete-post.d.ts.map +1 -0
- package/dist/commonjs/models/operations/delete-post.js +49 -0
- package/dist/commonjs/models/operations/delete-post.js.map +1 -0
- package/dist/commonjs/models/operations/get-feed.d.ts +49 -0
- package/dist/commonjs/models/operations/get-feed.d.ts.map +1 -0
- package/dist/commonjs/models/operations/get-feed.js +85 -0
- package/dist/commonjs/models/operations/get-feed.js.map +1 -0
- package/dist/commonjs/models/operations/get-post-by-id.d.ts +38 -0
- package/dist/commonjs/models/operations/get-post-by-id.d.ts.map +1 -0
- package/dist/commonjs/models/operations/get-post-by-id.js +73 -0
- package/dist/commonjs/models/operations/get-post-by-id.js.map +1 -0
- package/dist/commonjs/models/operations/get-user-posts.d.ts +35 -0
- package/dist/commonjs/models/operations/get-user-posts.d.ts.map +1 -0
- package/dist/commonjs/models/operations/get-user-posts.js +73 -0
- package/dist/commonjs/models/operations/get-user-posts.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +11 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +11 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/list-friends.d.ts +26 -0
- package/dist/commonjs/models/operations/list-friends.d.ts.map +1 -0
- package/dist/commonjs/models/operations/list-friends.js +65 -0
- package/dist/commonjs/models/operations/list-friends.js.map +1 -0
- package/dist/commonjs/models/operations/pending-friend-requests.d.ts +16 -0
- package/dist/commonjs/models/operations/pending-friend-requests.d.ts.map +1 -0
- package/dist/commonjs/models/operations/pending-friend-requests.js +57 -0
- package/dist/commonjs/models/operations/pending-friend-requests.js.map +1 -0
- package/dist/commonjs/models/operations/reject-friend-request.d.ts +15 -0
- package/dist/commonjs/models/operations/reject-friend-request.d.ts.map +1 -0
- package/dist/commonjs/models/operations/reject-friend-request.js +49 -0
- package/dist/commonjs/models/operations/reject-friend-request.js.map +1 -0
- package/dist/commonjs/models/operations/remove-friend.d.ts +12 -0
- package/dist/commonjs/models/operations/remove-friend.d.ts.map +1 -0
- package/dist/commonjs/models/operations/remove-friend.js +49 -0
- package/dist/commonjs/models/operations/remove-friend.js.map +1 -0
- package/dist/commonjs/models/operations/send-friend-request.d.ts +12 -0
- package/dist/commonjs/models/operations/send-friend-request.d.ts.map +1 -0
- package/dist/commonjs/models/operations/send-friend-request.js +49 -0
- package/dist/commonjs/models/operations/send-friend-request.js.map +1 -0
- package/dist/commonjs/models/operations/update-post.d.ts +60 -0
- package/dist/commonjs/models/operations/update-post.d.ts.map +1 -0
- package/dist/commonjs/models/operations/update-post.js +90 -0
- package/dist/commonjs/models/operations/update-post.js.map +1 -0
- package/dist/commonjs/sdk/friends.d.ts +29 -0
- package/dist/commonjs/sdk/friends.d.ts.map +1 -0
- package/dist/commonjs/sdk/friends.js +54 -0
- package/dist/commonjs/sdk/friends.js.map +1 -0
- package/dist/commonjs/sdk/posts.d.ts +25 -0
- package/dist/commonjs/sdk/posts.d.ts.map +1 -0
- package/dist/commonjs/sdk/posts.js +47 -0
- package/dist/commonjs/sdk/posts.js.map +1 -0
- package/dist/commonjs/sdk/users.d.ts +6 -0
- package/dist/commonjs/sdk/users.d.ts.map +1 -1
- package/dist/commonjs/sdk/users.js +8 -0
- package/dist/commonjs/sdk/users.js.map +1 -1
- package/dist/esm/funcs/users-friends-accept.d.ts +14 -0
- package/dist/esm/funcs/users-friends-accept.d.ts.map +1 -0
- package/dist/esm/funcs/users-friends-accept.js +91 -0
- package/dist/esm/funcs/users-friends-accept.js.map +1 -0
- package/dist/esm/funcs/users-friends-list.d.ts +14 -0
- package/dist/esm/funcs/users-friends-list.d.ts.map +1 -0
- package/dist/esm/funcs/users-friends-list.js +92 -0
- package/dist/esm/funcs/users-friends-list.js.map +1 -0
- package/dist/esm/funcs/users-friends-pending.d.ts +14 -0
- package/dist/esm/funcs/users-friends-pending.d.ts.map +1 -0
- package/dist/esm/funcs/users-friends-pending.js +77 -0
- package/dist/esm/funcs/users-friends-pending.js.map +1 -0
- package/dist/esm/funcs/users-friends-reject.d.ts +14 -0
- package/dist/esm/funcs/users-friends-reject.d.ts.map +1 -0
- package/dist/esm/funcs/users-friends-reject.js +91 -0
- package/dist/esm/funcs/users-friends-reject.js.map +1 -0
- package/dist/esm/funcs/users-friends-remove.d.ts +14 -0
- package/dist/esm/funcs/users-friends-remove.d.ts.map +1 -0
- package/dist/esm/funcs/users-friends-remove.js +91 -0
- package/dist/esm/funcs/users-friends-remove.js.map +1 -0
- package/dist/esm/funcs/users-friends-send-request.d.ts +14 -0
- package/dist/esm/funcs/users-friends-send-request.d.ts.map +1 -0
- package/dist/esm/funcs/users-friends-send-request.js +91 -0
- package/dist/esm/funcs/users-friends-send-request.js.map +1 -0
- package/dist/esm/funcs/users-posts-delete.d.ts +14 -0
- package/dist/esm/funcs/users-posts-delete.d.ts.map +1 -0
- package/dist/esm/funcs/users-posts-delete.js +91 -0
- package/dist/esm/funcs/users-posts-delete.js.map +1 -0
- package/dist/esm/funcs/users-posts-feed.d.ts +14 -0
- package/dist/esm/funcs/users-posts-feed.d.ts.map +1 -0
- package/dist/esm/funcs/users-posts-feed.js +91 -0
- package/dist/esm/funcs/users-posts-feed.js.map +1 -0
- package/dist/esm/funcs/users-posts-get-by-post-id.d.ts +14 -0
- package/dist/esm/funcs/users-posts-get-by-post-id.d.ts.map +1 -0
- package/dist/esm/funcs/users-posts-get-by-post-id.js +92 -0
- package/dist/esm/funcs/users-posts-get-by-post-id.js.map +1 -0
- package/dist/esm/funcs/users-posts-get-by-user-id.d.ts +14 -0
- package/dist/esm/funcs/users-posts-get-by-user-id.d.ts.map +1 -0
- package/dist/esm/funcs/users-posts-get-by-user-id.js +92 -0
- package/dist/esm/funcs/users-posts-get-by-user-id.js.map +1 -0
- package/dist/esm/funcs/users-posts-update.d.ts +14 -0
- package/dist/esm/funcs/users-posts-update.d.ts.map +1 -0
- package/dist/esm/funcs/users-posts-update.js +93 -0
- package/dist/esm/funcs/users-posts-update.js.map +1 -0
- package/dist/esm/lib/config.d.ts +4 -4
- package/dist/esm/lib/config.js +4 -4
- package/dist/esm/models/operations/accept-friend-request.d.ts +15 -0
- package/dist/esm/models/operations/accept-friend-request.d.ts.map +1 -0
- package/dist/esm/models/operations/accept-friend-request.js +12 -0
- package/dist/esm/models/operations/accept-friend-request.js.map +1 -0
- package/dist/esm/models/operations/delete-post.d.ts +12 -0
- package/dist/esm/models/operations/delete-post.d.ts.map +1 -0
- package/dist/esm/models/operations/delete-post.js +12 -0
- package/dist/esm/models/operations/delete-post.js.map +1 -0
- package/dist/esm/models/operations/get-feed.d.ts +49 -0
- package/dist/esm/models/operations/get-feed.d.ts.map +1 -0
- package/dist/esm/models/operations/get-feed.js +46 -0
- package/dist/esm/models/operations/get-feed.js.map +1 -0
- package/dist/esm/models/operations/get-post-by-id.d.ts +38 -0
- package/dist/esm/models/operations/get-post-by-id.d.ts.map +1 -0
- package/dist/esm/models/operations/get-post-by-id.js +35 -0
- package/dist/esm/models/operations/get-post-by-id.js.map +1 -0
- package/dist/esm/models/operations/get-user-posts.d.ts +35 -0
- package/dist/esm/models/operations/get-user-posts.d.ts.map +1 -0
- package/dist/esm/models/operations/get-user-posts.js +35 -0
- package/dist/esm/models/operations/get-user-posts.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +11 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +11 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/list-friends.d.ts +26 -0
- package/dist/esm/models/operations/list-friends.d.ts.map +1 -0
- package/dist/esm/models/operations/list-friends.js +27 -0
- package/dist/esm/models/operations/list-friends.js.map +1 -0
- package/dist/esm/models/operations/pending-friend-requests.d.ts +16 -0
- package/dist/esm/models/operations/pending-friend-requests.d.ts.map +1 -0
- package/dist/esm/models/operations/pending-friend-requests.js +20 -0
- package/dist/esm/models/operations/pending-friend-requests.js.map +1 -0
- package/dist/esm/models/operations/reject-friend-request.d.ts +15 -0
- package/dist/esm/models/operations/reject-friend-request.d.ts.map +1 -0
- package/dist/esm/models/operations/reject-friend-request.js +12 -0
- package/dist/esm/models/operations/reject-friend-request.js.map +1 -0
- package/dist/esm/models/operations/remove-friend.d.ts +12 -0
- package/dist/esm/models/operations/remove-friend.d.ts.map +1 -0
- package/dist/esm/models/operations/remove-friend.js +12 -0
- package/dist/esm/models/operations/remove-friend.js.map +1 -0
- package/dist/esm/models/operations/send-friend-request.d.ts +12 -0
- package/dist/esm/models/operations/send-friend-request.d.ts.map +1 -0
- package/dist/esm/models/operations/send-friend-request.js +12 -0
- package/dist/esm/models/operations/send-friend-request.js.map +1 -0
- package/dist/esm/models/operations/update-post.d.ts +60 -0
- package/dist/esm/models/operations/update-post.d.ts.map +1 -0
- package/dist/esm/models/operations/update-post.js +51 -0
- package/dist/esm/models/operations/update-post.js.map +1 -0
- package/dist/esm/sdk/friends.d.ts +29 -0
- package/dist/esm/sdk/friends.d.ts.map +1 -0
- package/dist/esm/sdk/friends.js +50 -0
- package/dist/esm/sdk/friends.js.map +1 -0
- package/dist/esm/sdk/posts.d.ts +25 -0
- package/dist/esm/sdk/posts.d.ts.map +1 -0
- package/dist/esm/sdk/posts.js +43 -0
- package/dist/esm/sdk/posts.js.map +1 -0
- package/dist/esm/sdk/users.d.ts +6 -0
- package/dist/esm/sdk/users.d.ts.map +1 -1
- package/dist/esm/sdk/users.js +8 -0
- package/dist/esm/sdk/users.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/rest-api/cypress/e2e/activity-post-endpoints.cy.js +239 -0
- package/rest-api/cypress/e2e/friend-endpoints.cy.js +262 -0
- package/rest-api/cypress/e2e/{school-endpoints.cy.ts → school-endpoints.cy.js} +1 -1
- package/rest-api/cypress/e2e/{user-activity-endpoints.cy.ts → user-activity-endpoints.cy.js} +8 -20
- package/rest-api/cypress/e2e/{user-endpoints.cy.ts → user-endpoints.cy.js} +3 -3
- package/rest-api/cypress.config.ts +70 -21
- package/rest-api/index.js +20 -7
- package/rest-api/lib/users.js +35 -0
- package/rest-api/routes/ActivityPostFunctions.js +208 -0
- package/rest-api/routes/FriendFunctions.js +266 -0
- package/rest-api/routes/UserActivityFunctions.js +2 -34
- package/rest-api/routes/UserFunctions.js +30 -24
- package/src/funcs/users-friends-accept.ts +176 -0
- package/src/funcs/users-friends-list.ts +182 -0
- package/src/funcs/users-friends-pending.ts +162 -0
- package/src/funcs/users-friends-reject.ts +176 -0
- package/src/funcs/users-friends-remove.ts +175 -0
- package/src/funcs/users-friends-send-request.ts +176 -0
- package/src/funcs/users-posts-delete.ts +175 -0
- package/src/funcs/users-posts-feed.ts +176 -0
- package/src/funcs/users-posts-get-by-post-id.ts +179 -0
- package/src/funcs/users-posts-get-by-user-id.ts +182 -0
- package/src/funcs/users-posts-update.ts +180 -0
- package/src/lib/config.ts +4 -4
- package/src/models/operations/accept-friend-request.ts +33 -0
- package/src/models/operations/delete-post.ts +30 -0
- package/src/models/operations/get-feed.ts +110 -0
- package/src/models/operations/get-post-by-id.ts +86 -0
- package/src/models/operations/get-user-posts.ts +83 -0
- package/src/models/operations/index.ts +11 -0
- package/src/models/operations/list-friends.ts +68 -0
- package/src/models/operations/pending-friend-requests.ts +43 -0
- package/src/models/operations/reject-friend-request.ts +33 -0
- package/src/models/operations/remove-friend.ts +30 -0
- package/src/models/operations/send-friend-request.ts +30 -0
- package/src/models/operations/update-post.ts +131 -0
- package/src/sdk/friends.ts +97 -0
- package/src/sdk/posts.ts +84 -0
- package/src/sdk/users.ts +12 -0
- /package/rest-api/cypress/e2e/{category-endpoints.cy.ts → category-endpoints.cy.js} +0 -0
package/src/lib/config.ts
CHANGED
|
@@ -60,9 +60,9 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
60
60
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
|
-
openapiDocVersion: "1.
|
|
64
|
-
sdkVersion: "1.
|
|
65
|
-
genVersion: "2.845.
|
|
63
|
+
openapiDocVersion: "1.4.0",
|
|
64
|
+
sdkVersion: "1.4.0",
|
|
65
|
+
genVersion: "2.845.15",
|
|
66
66
|
userAgent:
|
|
67
|
-
"speakeasy-sdk/typescript 1.
|
|
67
|
+
"speakeasy-sdk/typescript 1.4.0 2.845.15 1.4.0 @aurora-interactive/sensei-productivity",
|
|
68
68
|
} as const;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
|
|
7
|
+
export type AcceptFriendRequestRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* The user_id of the user whose request you are accepting
|
|
10
|
+
*/
|
|
11
|
+
id: number;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type AcceptFriendRequestRequest$Outbound = {
|
|
16
|
+
id: number;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const AcceptFriendRequestRequest$outboundSchema: z.ZodMiniType<
|
|
21
|
+
AcceptFriendRequestRequest$Outbound,
|
|
22
|
+
AcceptFriendRequestRequest
|
|
23
|
+
> = z.object({
|
|
24
|
+
id: z.int(),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export function acceptFriendRequestRequestToJSON(
|
|
28
|
+
acceptFriendRequestRequest: AcceptFriendRequestRequest,
|
|
29
|
+
): string {
|
|
30
|
+
return JSON.stringify(
|
|
31
|
+
AcceptFriendRequestRequest$outboundSchema.parse(acceptFriendRequestRequest),
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
|
|
7
|
+
export type DeletePostRequest = {
|
|
8
|
+
id: number;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/** @internal */
|
|
12
|
+
export type DeletePostRequest$Outbound = {
|
|
13
|
+
id: number;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const DeletePostRequest$outboundSchema: z.ZodMiniType<
|
|
18
|
+
DeletePostRequest$Outbound,
|
|
19
|
+
DeletePostRequest
|
|
20
|
+
> = z.object({
|
|
21
|
+
id: z.int(),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export function deletePostRequestToJSON(
|
|
25
|
+
deletePostRequest: DeletePostRequest,
|
|
26
|
+
): string {
|
|
27
|
+
return JSON.stringify(
|
|
28
|
+
DeletePostRequest$outboundSchema.parse(deletePostRequest),
|
|
29
|
+
);
|
|
30
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import * as openEnums from "../../types/enums.js";
|
|
8
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import * as types from "../../types/primitives.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
12
|
+
|
|
13
|
+
export type GetFeedRequest = {
|
|
14
|
+
page?: number | undefined;
|
|
15
|
+
limit?: number | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const GetFeedPostStatus = {
|
|
19
|
+
Public: "public",
|
|
20
|
+
Friends: "friends",
|
|
21
|
+
Private: "private",
|
|
22
|
+
} as const;
|
|
23
|
+
export type GetFeedPostStatus = OpenEnum<typeof GetFeedPostStatus>;
|
|
24
|
+
|
|
25
|
+
export type Post = {
|
|
26
|
+
postId: number;
|
|
27
|
+
userId: number;
|
|
28
|
+
categoryName: string;
|
|
29
|
+
activityId: number;
|
|
30
|
+
postDate: Date;
|
|
31
|
+
postStatus: GetFeedPostStatus;
|
|
32
|
+
caption?: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Paginated list of posts from friends
|
|
37
|
+
*/
|
|
38
|
+
export type GetFeedResponse = {
|
|
39
|
+
posts: Array<Post>;
|
|
40
|
+
page: number;
|
|
41
|
+
limit: number;
|
|
42
|
+
total: number;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type GetFeedRequest$Outbound = {
|
|
47
|
+
page: number;
|
|
48
|
+
limit: number;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const GetFeedRequest$outboundSchema: z.ZodMiniType<
|
|
53
|
+
GetFeedRequest$Outbound,
|
|
54
|
+
GetFeedRequest
|
|
55
|
+
> = z.object({
|
|
56
|
+
page: z._default(z.int(), 1),
|
|
57
|
+
limit: z._default(z.int(), 20),
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export function getFeedRequestToJSON(getFeedRequest: GetFeedRequest): string {
|
|
61
|
+
return JSON.stringify(GetFeedRequest$outboundSchema.parse(getFeedRequest));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const GetFeedPostStatus$inboundSchema: z.ZodMiniType<
|
|
66
|
+
GetFeedPostStatus,
|
|
67
|
+
unknown
|
|
68
|
+
> = openEnums.inboundSchema(GetFeedPostStatus);
|
|
69
|
+
|
|
70
|
+
/** @internal */
|
|
71
|
+
export const Post$inboundSchema: z.ZodMiniType<Post, unknown> = z.object({
|
|
72
|
+
postId: types.number(),
|
|
73
|
+
userId: types.number(),
|
|
74
|
+
categoryName: types.string(),
|
|
75
|
+
activityId: types.number(),
|
|
76
|
+
postDate: types.date(),
|
|
77
|
+
postStatus: GetFeedPostStatus$inboundSchema,
|
|
78
|
+
caption: types.optional(types.string()),
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
export function postFromJSON(
|
|
82
|
+
jsonString: string,
|
|
83
|
+
): SafeParseResult<Post, SDKValidationError> {
|
|
84
|
+
return safeParse(
|
|
85
|
+
jsonString,
|
|
86
|
+
(x) => Post$inboundSchema.parse(JSON.parse(x)),
|
|
87
|
+
`Failed to parse 'Post' from JSON`,
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** @internal */
|
|
92
|
+
export const GetFeedResponse$inboundSchema: z.ZodMiniType<
|
|
93
|
+
GetFeedResponse,
|
|
94
|
+
unknown
|
|
95
|
+
> = z.object({
|
|
96
|
+
posts: z.array(z.lazy(() => Post$inboundSchema)),
|
|
97
|
+
page: types.number(),
|
|
98
|
+
limit: types.number(),
|
|
99
|
+
total: types.number(),
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
export function getFeedResponseFromJSON(
|
|
103
|
+
jsonString: string,
|
|
104
|
+
): SafeParseResult<GetFeedResponse, SDKValidationError> {
|
|
105
|
+
return safeParse(
|
|
106
|
+
jsonString,
|
|
107
|
+
(x) => GetFeedResponse$inboundSchema.parse(JSON.parse(x)),
|
|
108
|
+
`Failed to parse 'GetFeedResponse' from JSON`,
|
|
109
|
+
);
|
|
110
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import * as openEnums from "../../types/enums.js";
|
|
8
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import * as types from "../../types/primitives.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
12
|
+
|
|
13
|
+
export type GetPostByIdRequest = {
|
|
14
|
+
id: number;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const GetPostByIdPostStatus = {
|
|
18
|
+
Public: "public",
|
|
19
|
+
Friends: "friends",
|
|
20
|
+
Private: "private",
|
|
21
|
+
} as const;
|
|
22
|
+
export type GetPostByIdPostStatus = OpenEnum<typeof GetPostByIdPostStatus>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The post
|
|
26
|
+
*/
|
|
27
|
+
export type GetPostByIdResponse = {
|
|
28
|
+
postId: number;
|
|
29
|
+
userId: number;
|
|
30
|
+
categoryName: string;
|
|
31
|
+
activityId: number;
|
|
32
|
+
postDate: Date;
|
|
33
|
+
postStatus: GetPostByIdPostStatus;
|
|
34
|
+
caption?: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type GetPostByIdRequest$Outbound = {
|
|
39
|
+
id: number;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const GetPostByIdRequest$outboundSchema: z.ZodMiniType<
|
|
44
|
+
GetPostByIdRequest$Outbound,
|
|
45
|
+
GetPostByIdRequest
|
|
46
|
+
> = z.object({
|
|
47
|
+
id: z.int(),
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
export function getPostByIdRequestToJSON(
|
|
51
|
+
getPostByIdRequest: GetPostByIdRequest,
|
|
52
|
+
): string {
|
|
53
|
+
return JSON.stringify(
|
|
54
|
+
GetPostByIdRequest$outboundSchema.parse(getPostByIdRequest),
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const GetPostByIdPostStatus$inboundSchema: z.ZodMiniType<
|
|
60
|
+
GetPostByIdPostStatus,
|
|
61
|
+
unknown
|
|
62
|
+
> = openEnums.inboundSchema(GetPostByIdPostStatus);
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const GetPostByIdResponse$inboundSchema: z.ZodMiniType<
|
|
66
|
+
GetPostByIdResponse,
|
|
67
|
+
unknown
|
|
68
|
+
> = z.object({
|
|
69
|
+
postId: types.number(),
|
|
70
|
+
userId: types.number(),
|
|
71
|
+
categoryName: types.string(),
|
|
72
|
+
activityId: types.number(),
|
|
73
|
+
postDate: types.date(),
|
|
74
|
+
postStatus: GetPostByIdPostStatus$inboundSchema,
|
|
75
|
+
caption: types.optional(types.string()),
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
export function getPostByIdResponseFromJSON(
|
|
79
|
+
jsonString: string,
|
|
80
|
+
): SafeParseResult<GetPostByIdResponse, SDKValidationError> {
|
|
81
|
+
return safeParse(
|
|
82
|
+
jsonString,
|
|
83
|
+
(x) => GetPostByIdResponse$inboundSchema.parse(JSON.parse(x)),
|
|
84
|
+
`Failed to parse 'GetPostByIdResponse' from JSON`,
|
|
85
|
+
);
|
|
86
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import * as openEnums from "../../types/enums.js";
|
|
8
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import * as types from "../../types/primitives.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
12
|
+
|
|
13
|
+
export type GetUserPostsRequest = {
|
|
14
|
+
id: number;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const GetUserPostsPostStatus = {
|
|
18
|
+
Public: "public",
|
|
19
|
+
Friends: "friends",
|
|
20
|
+
Private: "private",
|
|
21
|
+
} as const;
|
|
22
|
+
export type GetUserPostsPostStatus = OpenEnum<typeof GetUserPostsPostStatus>;
|
|
23
|
+
|
|
24
|
+
export type GetUserPostsResponse = {
|
|
25
|
+
postId: number;
|
|
26
|
+
userId: number;
|
|
27
|
+
categoryName: string;
|
|
28
|
+
activityId: number;
|
|
29
|
+
postDate: Date;
|
|
30
|
+
postStatus: GetUserPostsPostStatus;
|
|
31
|
+
caption?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type GetUserPostsRequest$Outbound = {
|
|
36
|
+
id: number;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const GetUserPostsRequest$outboundSchema: z.ZodMiniType<
|
|
41
|
+
GetUserPostsRequest$Outbound,
|
|
42
|
+
GetUserPostsRequest
|
|
43
|
+
> = z.object({
|
|
44
|
+
id: z.int(),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export function getUserPostsRequestToJSON(
|
|
48
|
+
getUserPostsRequest: GetUserPostsRequest,
|
|
49
|
+
): string {
|
|
50
|
+
return JSON.stringify(
|
|
51
|
+
GetUserPostsRequest$outboundSchema.parse(getUserPostsRequest),
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
export const GetUserPostsPostStatus$inboundSchema: z.ZodMiniType<
|
|
57
|
+
GetUserPostsPostStatus,
|
|
58
|
+
unknown
|
|
59
|
+
> = openEnums.inboundSchema(GetUserPostsPostStatus);
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const GetUserPostsResponse$inboundSchema: z.ZodMiniType<
|
|
63
|
+
GetUserPostsResponse,
|
|
64
|
+
unknown
|
|
65
|
+
> = z.object({
|
|
66
|
+
postId: types.number(),
|
|
67
|
+
userId: types.number(),
|
|
68
|
+
categoryName: types.string(),
|
|
69
|
+
activityId: types.number(),
|
|
70
|
+
postDate: types.date(),
|
|
71
|
+
postStatus: GetUserPostsPostStatus$inboundSchema,
|
|
72
|
+
caption: types.optional(types.string()),
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export function getUserPostsResponseFromJSON(
|
|
76
|
+
jsonString: string,
|
|
77
|
+
): SafeParseResult<GetUserPostsResponse, SDKValidationError> {
|
|
78
|
+
return safeParse(
|
|
79
|
+
jsonString,
|
|
80
|
+
(x) => GetUserPostsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
81
|
+
`Failed to parse 'GetUserPostsResponse' from JSON`,
|
|
82
|
+
);
|
|
83
|
+
}
|
|
@@ -2,21 +2,32 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
export * from "./accept-friend-request.js";
|
|
5
6
|
export * from "./create-activity.js";
|
|
6
7
|
export * from "./create-category.js";
|
|
7
8
|
export * from "./delete-activity.js";
|
|
8
9
|
export * from "./delete-category.js";
|
|
10
|
+
export * from "./delete-post.js";
|
|
9
11
|
export * from "./delete-user.js";
|
|
10
12
|
export * from "./get-activity-by-id.js";
|
|
11
13
|
export * from "./get-current-user.js";
|
|
14
|
+
export * from "./get-feed.js";
|
|
15
|
+
export * from "./get-post-by-id.js";
|
|
12
16
|
export * from "./get-school-by-id.js";
|
|
13
17
|
export * from "./get-user-activities.js";
|
|
14
18
|
export * from "./get-user-by-id.js";
|
|
19
|
+
export * from "./get-user-posts.js";
|
|
15
20
|
export * from "./list-activities.js";
|
|
16
21
|
export * from "./list-categories.js";
|
|
22
|
+
export * from "./list-friends.js";
|
|
17
23
|
export * from "./list-schools.js";
|
|
24
|
+
export * from "./pending-friend-requests.js";
|
|
25
|
+
export * from "./reject-friend-request.js";
|
|
26
|
+
export * from "./remove-friend.js";
|
|
27
|
+
export * from "./send-friend-request.js";
|
|
18
28
|
export * from "./update-activity.js";
|
|
19
29
|
export * from "./update-category.js";
|
|
30
|
+
export * from "./update-post.js";
|
|
20
31
|
export * from "./update-user.js";
|
|
21
32
|
export * from "./user-login.js";
|
|
22
33
|
export * from "./user-signup.js";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import * as types from "../../types/primitives.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
10
|
+
|
|
11
|
+
export type ListFriendsRequest = {
|
|
12
|
+
id: number;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type ListFriendsResponse = {
|
|
16
|
+
userId: number;
|
|
17
|
+
firstName: string;
|
|
18
|
+
lastName: string;
|
|
19
|
+
username: string;
|
|
20
|
+
email: string;
|
|
21
|
+
schoolId: number;
|
|
22
|
+
schoolName: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export type ListFriendsRequest$Outbound = {
|
|
27
|
+
id: number;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const ListFriendsRequest$outboundSchema: z.ZodMiniType<
|
|
32
|
+
ListFriendsRequest$Outbound,
|
|
33
|
+
ListFriendsRequest
|
|
34
|
+
> = z.object({
|
|
35
|
+
id: z.int(),
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export function listFriendsRequestToJSON(
|
|
39
|
+
listFriendsRequest: ListFriendsRequest,
|
|
40
|
+
): string {
|
|
41
|
+
return JSON.stringify(
|
|
42
|
+
ListFriendsRequest$outboundSchema.parse(listFriendsRequest),
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const ListFriendsResponse$inboundSchema: z.ZodMiniType<
|
|
48
|
+
ListFriendsResponse,
|
|
49
|
+
unknown
|
|
50
|
+
> = z.object({
|
|
51
|
+
userId: types.number(),
|
|
52
|
+
firstName: types.string(),
|
|
53
|
+
lastName: types.string(),
|
|
54
|
+
username: types.string(),
|
|
55
|
+
email: types.string(),
|
|
56
|
+
schoolId: types.number(),
|
|
57
|
+
schoolName: types.string(),
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export function listFriendsResponseFromJSON(
|
|
61
|
+
jsonString: string,
|
|
62
|
+
): SafeParseResult<ListFriendsResponse, SDKValidationError> {
|
|
63
|
+
return safeParse(
|
|
64
|
+
jsonString,
|
|
65
|
+
(x) => ListFriendsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
66
|
+
`Failed to parse 'ListFriendsResponse' from JSON`,
|
|
67
|
+
);
|
|
68
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import * as types from "../../types/primitives.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
10
|
+
|
|
11
|
+
export type PendingFriendRequestsResponse = {
|
|
12
|
+
userId: number;
|
|
13
|
+
firstName: string;
|
|
14
|
+
lastName: string;
|
|
15
|
+
username: string;
|
|
16
|
+
email: string;
|
|
17
|
+
schoolId: number;
|
|
18
|
+
schoolName: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const PendingFriendRequestsResponse$inboundSchema: z.ZodMiniType<
|
|
23
|
+
PendingFriendRequestsResponse,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
userId: types.number(),
|
|
27
|
+
firstName: types.string(),
|
|
28
|
+
lastName: types.string(),
|
|
29
|
+
username: types.string(),
|
|
30
|
+
email: types.string(),
|
|
31
|
+
schoolId: types.number(),
|
|
32
|
+
schoolName: types.string(),
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export function pendingFriendRequestsResponseFromJSON(
|
|
36
|
+
jsonString: string,
|
|
37
|
+
): SafeParseResult<PendingFriendRequestsResponse, SDKValidationError> {
|
|
38
|
+
return safeParse(
|
|
39
|
+
jsonString,
|
|
40
|
+
(x) => PendingFriendRequestsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
41
|
+
`Failed to parse 'PendingFriendRequestsResponse' from JSON`,
|
|
42
|
+
);
|
|
43
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
|
|
7
|
+
export type RejectFriendRequestRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* The user_id of the user whose request you are rejecting
|
|
10
|
+
*/
|
|
11
|
+
id: number;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type RejectFriendRequestRequest$Outbound = {
|
|
16
|
+
id: number;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const RejectFriendRequestRequest$outboundSchema: z.ZodMiniType<
|
|
21
|
+
RejectFriendRequestRequest$Outbound,
|
|
22
|
+
RejectFriendRequestRequest
|
|
23
|
+
> = z.object({
|
|
24
|
+
id: z.int(),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export function rejectFriendRequestRequestToJSON(
|
|
28
|
+
rejectFriendRequestRequest: RejectFriendRequestRequest,
|
|
29
|
+
): string {
|
|
30
|
+
return JSON.stringify(
|
|
31
|
+
RejectFriendRequestRequest$outboundSchema.parse(rejectFriendRequestRequest),
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
|
|
7
|
+
export type RemoveFriendRequest = {
|
|
8
|
+
friendId: number;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/** @internal */
|
|
12
|
+
export type RemoveFriendRequest$Outbound = {
|
|
13
|
+
friendId: number;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const RemoveFriendRequest$outboundSchema: z.ZodMiniType<
|
|
18
|
+
RemoveFriendRequest$Outbound,
|
|
19
|
+
RemoveFriendRequest
|
|
20
|
+
> = z.object({
|
|
21
|
+
friendId: z.int(),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export function removeFriendRequestToJSON(
|
|
25
|
+
removeFriendRequest: RemoveFriendRequest,
|
|
26
|
+
): string {
|
|
27
|
+
return JSON.stringify(
|
|
28
|
+
RemoveFriendRequest$outboundSchema.parse(removeFriendRequest),
|
|
29
|
+
);
|
|
30
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
|
|
7
|
+
export type SendFriendRequestRequest = {
|
|
8
|
+
id: number;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/** @internal */
|
|
12
|
+
export type SendFriendRequestRequest$Outbound = {
|
|
13
|
+
id: number;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const SendFriendRequestRequest$outboundSchema: z.ZodMiniType<
|
|
18
|
+
SendFriendRequestRequest$Outbound,
|
|
19
|
+
SendFriendRequestRequest
|
|
20
|
+
> = z.object({
|
|
21
|
+
id: z.int(),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export function sendFriendRequestRequestToJSON(
|
|
25
|
+
sendFriendRequestRequest: SendFriendRequestRequest,
|
|
26
|
+
): string {
|
|
27
|
+
return JSON.stringify(
|
|
28
|
+
SendFriendRequestRequest$outboundSchema.parse(sendFriendRequestRequest),
|
|
29
|
+
);
|
|
30
|
+
}
|