@aurora-interactive/sensei-productivity 1.1.2 → 1.3.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 +27 -14
- package/dist/commonjs/funcs/categories-create.d.ts +1 -1
- package/dist/commonjs/funcs/categories-create.d.ts.map +1 -1
- package/dist/commonjs/funcs/categories-create.js +2 -3
- package/dist/commonjs/funcs/categories-create.js.map +1 -1
- package/dist/commonjs/funcs/categories-delete.js +2 -2
- package/dist/commonjs/funcs/categories-delete.js.map +1 -1
- package/dist/commonjs/funcs/categories-get-all.d.ts +1 -1
- package/dist/commonjs/funcs/categories-get-all.d.ts.map +1 -1
- package/dist/commonjs/funcs/categories-get-all.js +2 -3
- package/dist/commonjs/funcs/categories-get-all.js.map +1 -1
- package/dist/commonjs/funcs/categories-update.d.ts +1 -1
- package/dist/commonjs/funcs/categories-update.d.ts.map +1 -1
- package/dist/commonjs/funcs/categories-update.js +2 -3
- package/dist/commonjs/funcs/categories-update.js.map +1 -1
- package/dist/commonjs/funcs/schools-get-all.js +2 -2
- package/dist/commonjs/funcs/schools-get-all.js.map +1 -1
- package/dist/commonjs/funcs/schools-get.d.ts +1 -1
- package/dist/commonjs/funcs/schools-get.d.ts.map +1 -1
- package/dist/commonjs/funcs/schools-get.js +2 -3
- package/dist/commonjs/funcs/schools-get.js.map +1 -1
- package/dist/commonjs/funcs/{user-activities-create.d.ts → users-activities-create.d.ts} +2 -2
- package/dist/commonjs/funcs/users-activities-create.d.ts.map +1 -0
- package/dist/commonjs/funcs/{user-activities-create.js → users-activities-create.js} +5 -6
- package/dist/commonjs/funcs/users-activities-create.js.map +1 -0
- package/dist/commonjs/funcs/{user-activities-delete.d.ts → users-activities-delete.d.ts} +2 -2
- package/dist/commonjs/funcs/users-activities-delete.d.ts.map +1 -0
- package/dist/commonjs/funcs/{user-activities-delete.js → users-activities-delete.js} +5 -5
- package/dist/commonjs/funcs/users-activities-delete.js.map +1 -0
- package/dist/{esm/funcs/user-activities-get-all-of-user.d.ts → commonjs/funcs/users-activities-get-all-of-user.d.ts} +2 -2
- package/dist/commonjs/funcs/users-activities-get-all-of-user.d.ts.map +1 -0
- package/dist/commonjs/funcs/{user-activities-get-all-of-user.js → users-activities-get-all-of-user.js} +5 -6
- package/dist/commonjs/funcs/users-activities-get-all-of-user.js.map +1 -0
- package/dist/{esm/funcs/user-activities-get.d.ts → commonjs/funcs/users-activities-get.d.ts} +2 -2
- package/dist/commonjs/funcs/users-activities-get.d.ts.map +1 -0
- package/dist/commonjs/funcs/{user-activities-get.js → users-activities-get.js} +5 -6
- package/dist/commonjs/funcs/users-activities-get.js.map +1 -0
- package/dist/{esm/funcs/user-activities-me.d.ts → commonjs/funcs/users-activities-me.d.ts} +2 -2
- package/dist/commonjs/funcs/{user-activities-get.d.ts.map → users-activities-me.d.ts.map} +1 -1
- package/dist/commonjs/funcs/{user-activities-me.js → users-activities-me.js} +5 -6
- package/dist/commonjs/funcs/users-activities-me.js.map +1 -0
- package/dist/{esm/funcs/user-activities-update.d.ts → commonjs/funcs/users-activities-update.d.ts} +2 -2
- package/dist/commonjs/funcs/users-activities-update.d.ts.map +1 -0
- package/dist/commonjs/funcs/{user-activities-update.js → users-activities-update.js} +5 -6
- package/dist/commonjs/funcs/users-activities-update.js.map +1 -0
- package/dist/commonjs/funcs/users-delete.js +2 -2
- package/dist/commonjs/funcs/users-delete.js.map +1 -1
- package/dist/commonjs/funcs/users-get.d.ts +1 -1
- package/dist/commonjs/funcs/users-get.d.ts.map +1 -1
- package/dist/commonjs/funcs/users-get.js +2 -3
- package/dist/commonjs/funcs/users-get.js.map +1 -1
- package/dist/commonjs/funcs/users-login.d.ts +1 -1
- package/dist/commonjs/funcs/users-login.d.ts.map +1 -1
- package/dist/commonjs/funcs/users-login.js +2 -3
- package/dist/commonjs/funcs/users-login.js.map +1 -1
- package/dist/commonjs/funcs/users-me.d.ts +1 -1
- package/dist/commonjs/funcs/users-me.d.ts.map +1 -1
- package/dist/commonjs/funcs/users-me.js +2 -3
- package/dist/commonjs/funcs/users-me.js.map +1 -1
- package/dist/commonjs/funcs/users-posts-delete.d.ts +14 -0
- package/dist/commonjs/funcs/{user-activities-me.d.ts.map → users-posts-delete.d.ts.map} +1 -1
- 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 +126 -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 +127 -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 +127 -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/{esm/funcs/user-activities-me.d.ts.map → commonjs/funcs/users-posts-update.d.ts.map} +1 -1
- package/dist/commonjs/funcs/users-posts-update.js +128 -0
- package/dist/commonjs/funcs/users-posts-update.js.map +1 -0
- package/dist/commonjs/funcs/users-signup.d.ts +1 -1
- package/dist/commonjs/funcs/users-signup.d.ts.map +1 -1
- package/dist/commonjs/funcs/users-signup.js +2 -3
- package/dist/commonjs/funcs/users-signup.js.map +1 -1
- package/dist/commonjs/funcs/users-update.d.ts +1 -1
- package/dist/commonjs/funcs/users-update.d.ts.map +1 -1
- package/dist/commonjs/funcs/users-update.js +2 -3
- package/dist/commonjs/funcs/users-update.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +4 -4
- package/dist/commonjs/lib/config.js +4 -4
- 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 +5 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +5 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- 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/activities.d.ts +5 -5
- package/dist/commonjs/sdk/activities.d.ts.map +1 -1
- package/dist/commonjs/sdk/activities.js +12 -12
- package/dist/commonjs/sdk/activities.js.map +1 -1
- package/dist/commonjs/sdk/categories.d.ts +3 -3
- package/dist/commonjs/sdk/categories.d.ts.map +1 -1
- 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/schools.d.ts +1 -1
- package/dist/commonjs/sdk/schools.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.d.ts +0 -3
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +0 -4
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/users.d.ts +11 -5
- 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/categories-create.d.ts +1 -1
- package/dist/esm/funcs/categories-create.d.ts.map +1 -1
- package/dist/esm/funcs/categories-create.js +2 -3
- package/dist/esm/funcs/categories-create.js.map +1 -1
- package/dist/esm/funcs/categories-delete.js +2 -2
- package/dist/esm/funcs/categories-delete.js.map +1 -1
- package/dist/esm/funcs/categories-get-all.d.ts +1 -1
- package/dist/esm/funcs/categories-get-all.d.ts.map +1 -1
- package/dist/esm/funcs/categories-get-all.js +2 -3
- package/dist/esm/funcs/categories-get-all.js.map +1 -1
- package/dist/esm/funcs/categories-update.d.ts +1 -1
- package/dist/esm/funcs/categories-update.d.ts.map +1 -1
- package/dist/esm/funcs/categories-update.js +2 -3
- package/dist/esm/funcs/categories-update.js.map +1 -1
- package/dist/esm/funcs/schools-get-all.js +2 -2
- package/dist/esm/funcs/schools-get-all.js.map +1 -1
- package/dist/esm/funcs/schools-get.d.ts +1 -1
- package/dist/esm/funcs/schools-get.d.ts.map +1 -1
- package/dist/esm/funcs/schools-get.js +2 -3
- package/dist/esm/funcs/schools-get.js.map +1 -1
- package/dist/esm/funcs/{user-activities-create.d.ts → users-activities-create.d.ts} +2 -2
- package/dist/esm/funcs/users-activities-create.d.ts.map +1 -0
- package/dist/esm/funcs/{user-activities-create.js → users-activities-create.js} +4 -5
- package/dist/esm/funcs/users-activities-create.js.map +1 -0
- package/dist/esm/funcs/{user-activities-delete.d.ts → users-activities-delete.d.ts} +2 -2
- package/dist/esm/funcs/users-activities-delete.d.ts.map +1 -0
- package/dist/esm/funcs/{user-activities-delete.js → users-activities-delete.js} +4 -4
- package/dist/esm/funcs/users-activities-delete.js.map +1 -0
- package/dist/{commonjs/funcs/user-activities-get-all-of-user.d.ts → esm/funcs/users-activities-get-all-of-user.d.ts} +2 -2
- package/dist/esm/funcs/users-activities-get-all-of-user.d.ts.map +1 -0
- package/dist/esm/funcs/{user-activities-get-all-of-user.js → users-activities-get-all-of-user.js} +4 -5
- package/dist/esm/funcs/users-activities-get-all-of-user.js.map +1 -0
- package/dist/{commonjs/funcs/user-activities-get.d.ts → esm/funcs/users-activities-get.d.ts} +2 -2
- package/dist/esm/funcs/users-activities-get.d.ts.map +1 -0
- package/dist/esm/funcs/{user-activities-get.js → users-activities-get.js} +4 -5
- package/dist/esm/funcs/users-activities-get.js.map +1 -0
- package/dist/{commonjs/funcs/user-activities-me.d.ts → esm/funcs/users-activities-me.d.ts} +2 -2
- package/dist/esm/funcs/{user-activities-get.d.ts.map → users-activities-me.d.ts.map} +1 -1
- package/dist/esm/funcs/{user-activities-me.js → users-activities-me.js} +4 -5
- package/dist/esm/funcs/users-activities-me.js.map +1 -0
- package/dist/{commonjs/funcs/user-activities-update.d.ts → esm/funcs/users-activities-update.d.ts} +2 -2
- package/dist/esm/funcs/users-activities-update.d.ts.map +1 -0
- package/dist/esm/funcs/{user-activities-update.js → users-activities-update.js} +4 -5
- package/dist/esm/funcs/users-activities-update.js.map +1 -0
- package/dist/esm/funcs/users-delete.js +2 -2
- package/dist/esm/funcs/users-delete.js.map +1 -1
- package/dist/esm/funcs/users-get.d.ts +1 -1
- package/dist/esm/funcs/users-get.d.ts.map +1 -1
- package/dist/esm/funcs/users-get.js +2 -3
- package/dist/esm/funcs/users-get.js.map +1 -1
- package/dist/esm/funcs/users-login.d.ts +1 -1
- package/dist/esm/funcs/users-login.d.ts.map +1 -1
- package/dist/esm/funcs/users-login.js +2 -3
- package/dist/esm/funcs/users-login.js.map +1 -1
- package/dist/esm/funcs/users-me.d.ts +1 -1
- package/dist/esm/funcs/users-me.d.ts.map +1 -1
- package/dist/esm/funcs/users-me.js +2 -3
- package/dist/esm/funcs/users-me.js.map +1 -1
- 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 +90 -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 +91 -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 +91 -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 +92 -0
- package/dist/esm/funcs/users-posts-update.js.map +1 -0
- package/dist/esm/funcs/users-signup.d.ts +1 -1
- package/dist/esm/funcs/users-signup.d.ts.map +1 -1
- package/dist/esm/funcs/users-signup.js +2 -3
- package/dist/esm/funcs/users-signup.js.map +1 -1
- package/dist/esm/funcs/users-update.d.ts +1 -1
- package/dist/esm/funcs/users-update.d.ts.map +1 -1
- package/dist/esm/funcs/users-update.js +2 -3
- package/dist/esm/funcs/users-update.js.map +1 -1
- package/dist/esm/lib/config.d.ts +4 -4
- package/dist/esm/lib/config.js +4 -4
- 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 +5 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +5 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- 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/activities.d.ts +5 -5
- package/dist/esm/sdk/activities.d.ts.map +1 -1
- package/dist/esm/sdk/activities.js +12 -12
- package/dist/esm/sdk/activities.js.map +1 -1
- package/dist/esm/sdk/categories.d.ts +3 -3
- package/dist/esm/sdk/categories.d.ts.map +1 -1
- 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/schools.d.ts +1 -1
- package/dist/esm/sdk/schools.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.d.ts +0 -3
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +0 -4
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/users.d.ts +11 -5
- 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.ts +239 -0
- package/rest-api/cypress/e2e/user-activity-endpoints.cy.ts +8 -20
- package/rest-api/cypress/e2e/user-endpoints.cy.ts +3 -3
- package/rest-api/cypress.config.ts +29 -23
- package/rest-api/index.js +13 -7
- package/rest-api/lib/users.js +33 -0
- package/rest-api/routes/ActivityPostFunctions.js +208 -0
- package/rest-api/routes/UserActivityFunctions.js +1 -33
- package/rest-api/routes/UserFunctions.js +30 -24
- package/src/funcs/categories-create.ts +6 -14
- package/src/funcs/categories-delete.ts +2 -3
- package/src/funcs/categories-get-all.ts +6 -14
- package/src/funcs/categories-update.ts +6 -14
- package/src/funcs/schools-get-all.ts +2 -2
- package/src/funcs/schools-get.ts +6 -11
- package/src/funcs/{user-activities-create.ts → users-activities-create.ts} +7 -15
- package/src/funcs/{user-activities-delete.ts → users-activities-delete.ts} +3 -4
- package/src/funcs/{user-activities-get-all-of-user.ts → users-activities-get-all-of-user.ts} +7 -19
- package/src/funcs/{user-activities-get.ts → users-activities-get.ts} +7 -15
- package/src/funcs/{user-activities-me.ts → users-activities-me.ts} +7 -15
- package/src/funcs/{user-activities-update.ts → users-activities-update.ts} +7 -15
- package/src/funcs/users-delete.ts +2 -3
- package/src/funcs/users-get.ts +6 -11
- package/src/funcs/users-login.ts +6 -11
- package/src/funcs/users-me.ts +6 -14
- package/src/funcs/users-posts-delete.ts +174 -0
- package/src/funcs/users-posts-feed.ts +174 -0
- package/src/funcs/users-posts-get-by-post-id.ts +174 -0
- package/src/funcs/users-posts-get-by-user-id.ts +174 -0
- package/src/funcs/users-posts-update.ts +175 -0
- package/src/funcs/users-signup.ts +6 -8
- package/src/funcs/users-update.ts +6 -11
- package/src/lib/config.ts +4 -4
- 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 +5 -0
- package/src/models/operations/update-post.ts +131 -0
- package/src/sdk/activities.ts +17 -17
- package/src/sdk/categories.ts +3 -3
- package/src/sdk/posts.ts +84 -0
- package/src/sdk/schools.ts +1 -1
- package/src/sdk/sdk.ts +0 -6
- package/src/sdk/users.ts +17 -5
- package/dist/commonjs/funcs/user-activities-create.d.ts.map +0 -1
- package/dist/commonjs/funcs/user-activities-create.js.map +0 -1
- package/dist/commonjs/funcs/user-activities-delete.d.ts.map +0 -1
- package/dist/commonjs/funcs/user-activities-delete.js.map +0 -1
- package/dist/commonjs/funcs/user-activities-get-all-of-user.d.ts.map +0 -1
- package/dist/commonjs/funcs/user-activities-get-all-of-user.js.map +0 -1
- package/dist/commonjs/funcs/user-activities-get.js.map +0 -1
- package/dist/commonjs/funcs/user-activities-me.js.map +0 -1
- package/dist/commonjs/funcs/user-activities-update.d.ts.map +0 -1
- package/dist/commonjs/funcs/user-activities-update.js.map +0 -1
- package/dist/commonjs/sdk/user.d.ts +0 -7
- package/dist/commonjs/sdk/user.d.ts.map +0 -1
- package/dist/commonjs/sdk/user.js +0 -15
- package/dist/commonjs/sdk/user.js.map +0 -1
- package/dist/esm/funcs/user-activities-create.d.ts.map +0 -1
- package/dist/esm/funcs/user-activities-create.js.map +0 -1
- package/dist/esm/funcs/user-activities-delete.d.ts.map +0 -1
- package/dist/esm/funcs/user-activities-delete.js.map +0 -1
- package/dist/esm/funcs/user-activities-get-all-of-user.d.ts.map +0 -1
- package/dist/esm/funcs/user-activities-get-all-of-user.js.map +0 -1
- package/dist/esm/funcs/user-activities-get.js.map +0 -1
- package/dist/esm/funcs/user-activities-me.js.map +0 -1
- package/dist/esm/funcs/user-activities-update.d.ts.map +0 -1
- package/dist/esm/funcs/user-activities-update.js.map +0 -1
- package/dist/esm/sdk/user.d.ts +0 -7
- package/dist/esm/sdk/user.d.ts.map +0 -1
- package/dist/esm/sdk/user.js +0 -11
- package/dist/esm/sdk/user.js.map +0 -1
- package/src/sdk/user.ts +0 -13
|
@@ -24,7 +24,6 @@ import { SenseiProductivityError } from "../models/errors/sensei-productivity-er
|
|
|
24
24
|
import * as operations from "../models/operations/index.js";
|
|
25
25
|
import { APICall, APIPromise } from "../types/async.js";
|
|
26
26
|
import { Result } from "../types/fp.js";
|
|
27
|
-
import * as types$ from "../types/primitives.js";
|
|
28
27
|
|
|
29
28
|
/**
|
|
30
29
|
* Signup the given user
|
|
@@ -35,7 +34,7 @@ export function usersSignup(
|
|
|
35
34
|
options?: RequestOptions,
|
|
36
35
|
): APIPromise<
|
|
37
36
|
Result<
|
|
38
|
-
operations.UserSignupResponse
|
|
37
|
+
operations.UserSignupResponse,
|
|
39
38
|
| SenseiProductivityError
|
|
40
39
|
| ResponseValidationError
|
|
41
40
|
| ConnectionError
|
|
@@ -60,7 +59,7 @@ async function $do(
|
|
|
60
59
|
): Promise<
|
|
61
60
|
[
|
|
62
61
|
Result<
|
|
63
|
-
operations.UserSignupResponse
|
|
62
|
+
operations.UserSignupResponse,
|
|
64
63
|
| SenseiProductivityError
|
|
65
64
|
| ResponseValidationError
|
|
66
65
|
| ConnectionError
|
|
@@ -137,7 +136,7 @@ async function $do(
|
|
|
137
136
|
|
|
138
137
|
const doResult = await client._do(req, {
|
|
139
138
|
context,
|
|
140
|
-
errorCodes: ["
|
|
139
|
+
errorCodes: ["400", "4XX", "5XX"],
|
|
141
140
|
retryConfig: context.retryConfig,
|
|
142
141
|
retryCodes: context.retryCodes,
|
|
143
142
|
});
|
|
@@ -147,7 +146,7 @@ async function $do(
|
|
|
147
146
|
const response = doResult.value;
|
|
148
147
|
|
|
149
148
|
const [result] = await M.match<
|
|
150
|
-
operations.UserSignupResponse
|
|
149
|
+
operations.UserSignupResponse,
|
|
151
150
|
| SenseiProductivityError
|
|
152
151
|
| ResponseValidationError
|
|
153
152
|
| ConnectionError
|
|
@@ -157,9 +156,8 @@ async function $do(
|
|
|
157
156
|
| UnexpectedClientError
|
|
158
157
|
| SDKValidationError
|
|
159
158
|
>(
|
|
160
|
-
M.json(200,
|
|
161
|
-
M.
|
|
162
|
-
M.fail(429),
|
|
159
|
+
M.json(200, operations.UserSignupResponse$inboundSchema),
|
|
160
|
+
M.fail([400, "4XX"]),
|
|
163
161
|
M.fail("5XX"),
|
|
164
162
|
)(response, req);
|
|
165
163
|
if (!result.ok) {
|
|
@@ -24,7 +24,6 @@ import { SenseiProductivityError } from "../models/errors/sensei-productivity-er
|
|
|
24
24
|
import * as operations from "../models/operations/index.js";
|
|
25
25
|
import { APICall, APIPromise } from "../types/async.js";
|
|
26
26
|
import { Result } from "../types/fp.js";
|
|
27
|
-
import * as types$ from "../types/primitives.js";
|
|
28
27
|
|
|
29
28
|
/**
|
|
30
29
|
* Update a user's profile (own profile only)
|
|
@@ -35,7 +34,7 @@ export function usersUpdate(
|
|
|
35
34
|
options?: RequestOptions,
|
|
36
35
|
): APIPromise<
|
|
37
36
|
Result<
|
|
38
|
-
operations.UpdateUserResponse
|
|
37
|
+
operations.UpdateUserResponse,
|
|
39
38
|
| SenseiProductivityError
|
|
40
39
|
| ResponseValidationError
|
|
41
40
|
| ConnectionError
|
|
@@ -60,7 +59,7 @@ async function $do(
|
|
|
60
59
|
): Promise<
|
|
61
60
|
[
|
|
62
61
|
Result<
|
|
63
|
-
operations.UpdateUserResponse
|
|
62
|
+
operations.UpdateUserResponse,
|
|
64
63
|
| SenseiProductivityError
|
|
65
64
|
| ResponseValidationError
|
|
66
65
|
| ConnectionError
|
|
@@ -144,7 +143,7 @@ async function $do(
|
|
|
144
143
|
|
|
145
144
|
const doResult = await client._do(req, {
|
|
146
145
|
context,
|
|
147
|
-
errorCodes: ["
|
|
146
|
+
errorCodes: ["400", "401", "403", "404", "4XX", "5XX"],
|
|
148
147
|
retryConfig: context.retryConfig,
|
|
149
148
|
retryCodes: context.retryCodes,
|
|
150
149
|
});
|
|
@@ -154,7 +153,7 @@ async function $do(
|
|
|
154
153
|
const response = doResult.value;
|
|
155
154
|
|
|
156
155
|
const [result] = await M.match<
|
|
157
|
-
operations.UpdateUserResponse
|
|
156
|
+
operations.UpdateUserResponse,
|
|
158
157
|
| SenseiProductivityError
|
|
159
158
|
| ResponseValidationError
|
|
160
159
|
| ConnectionError
|
|
@@ -164,12 +163,8 @@ async function $do(
|
|
|
164
163
|
| UnexpectedClientError
|
|
165
164
|
| SDKValidationError
|
|
166
165
|
>(
|
|
167
|
-
M.json(200,
|
|
168
|
-
M.
|
|
169
|
-
[400, 401, 403, 404],
|
|
170
|
-
types$.optional(operations.UpdateUserResponse$inboundSchema),
|
|
171
|
-
),
|
|
172
|
-
M.fail(429),
|
|
166
|
+
M.json(200, operations.UpdateUserResponse$inboundSchema),
|
|
167
|
+
M.fail([400, 401, 403, 404, "4XX"]),
|
|
173
168
|
M.fail("5XX"),
|
|
174
169
|
)(response, req);
|
|
175
170
|
if (!result.ok) {
|
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.3.0",
|
|
64
|
+
sdkVersion: "1.3.0",
|
|
65
|
+
genVersion: "2.845.15",
|
|
66
66
|
userAgent:
|
|
67
|
-
"speakeasy-sdk/typescript 1.
|
|
67
|
+
"speakeasy-sdk/typescript 1.3.0 2.845.15 1.3.0 @aurora-interactive/sensei-productivity",
|
|
68
68
|
} as const;
|
|
@@ -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
|
+
}
|
|
@@ -6,17 +6,22 @@ export * from "./create-activity.js";
|
|
|
6
6
|
export * from "./create-category.js";
|
|
7
7
|
export * from "./delete-activity.js";
|
|
8
8
|
export * from "./delete-category.js";
|
|
9
|
+
export * from "./delete-post.js";
|
|
9
10
|
export * from "./delete-user.js";
|
|
10
11
|
export * from "./get-activity-by-id.js";
|
|
11
12
|
export * from "./get-current-user.js";
|
|
13
|
+
export * from "./get-feed.js";
|
|
14
|
+
export * from "./get-post-by-id.js";
|
|
12
15
|
export * from "./get-school-by-id.js";
|
|
13
16
|
export * from "./get-user-activities.js";
|
|
14
17
|
export * from "./get-user-by-id.js";
|
|
18
|
+
export * from "./get-user-posts.js";
|
|
15
19
|
export * from "./list-activities.js";
|
|
16
20
|
export * from "./list-categories.js";
|
|
17
21
|
export * from "./list-schools.js";
|
|
18
22
|
export * from "./update-activity.js";
|
|
19
23
|
export * from "./update-category.js";
|
|
24
|
+
export * from "./update-post.js";
|
|
20
25
|
export * from "./update-user.js";
|
|
21
26
|
export * from "./user-login.js";
|
|
22
27
|
export * from "./user-signup.js";
|
|
@@ -0,0 +1,131 @@
|
|
|
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 { ClosedEnum, 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 const PostStatusRequest = {
|
|
14
|
+
Public: "public",
|
|
15
|
+
Friends: "friends",
|
|
16
|
+
Private: "private",
|
|
17
|
+
} as const;
|
|
18
|
+
export type PostStatusRequest = ClosedEnum<typeof PostStatusRequest>;
|
|
19
|
+
|
|
20
|
+
export type UpdatePostRequestBody = {
|
|
21
|
+
caption?: string | undefined;
|
|
22
|
+
postStatus?: PostStatusRequest | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export type UpdatePostRequest = {
|
|
26
|
+
id: number;
|
|
27
|
+
body: UpdatePostRequestBody;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const UpdatePostPostStatusResponse = {
|
|
31
|
+
Public: "public",
|
|
32
|
+
Friends: "friends",
|
|
33
|
+
Private: "private",
|
|
34
|
+
} as const;
|
|
35
|
+
export type UpdatePostPostStatusResponse = OpenEnum<
|
|
36
|
+
typeof UpdatePostPostStatusResponse
|
|
37
|
+
>;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Successfully updated post
|
|
41
|
+
*/
|
|
42
|
+
export type UpdatePostResponse = {
|
|
43
|
+
postId: number;
|
|
44
|
+
userId: number;
|
|
45
|
+
categoryName: string;
|
|
46
|
+
activityId: number;
|
|
47
|
+
postDate: Date;
|
|
48
|
+
postStatus: UpdatePostPostStatusResponse;
|
|
49
|
+
caption?: string | undefined;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const PostStatusRequest$outboundSchema: z.ZodMiniEnum<
|
|
54
|
+
typeof PostStatusRequest
|
|
55
|
+
> = z.enum(PostStatusRequest);
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export type UpdatePostRequestBody$Outbound = {
|
|
59
|
+
caption?: string | undefined;
|
|
60
|
+
postStatus?: string | undefined;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const UpdatePostRequestBody$outboundSchema: z.ZodMiniType<
|
|
65
|
+
UpdatePostRequestBody$Outbound,
|
|
66
|
+
UpdatePostRequestBody
|
|
67
|
+
> = z.object({
|
|
68
|
+
caption: z.optional(z.string()),
|
|
69
|
+
postStatus: z.optional(PostStatusRequest$outboundSchema),
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export function updatePostRequestBodyToJSON(
|
|
73
|
+
updatePostRequestBody: UpdatePostRequestBody,
|
|
74
|
+
): string {
|
|
75
|
+
return JSON.stringify(
|
|
76
|
+
UpdatePostRequestBody$outboundSchema.parse(updatePostRequestBody),
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export type UpdatePostRequest$Outbound = {
|
|
82
|
+
id: number;
|
|
83
|
+
body: UpdatePostRequestBody$Outbound;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const UpdatePostRequest$outboundSchema: z.ZodMiniType<
|
|
88
|
+
UpdatePostRequest$Outbound,
|
|
89
|
+
UpdatePostRequest
|
|
90
|
+
> = z.object({
|
|
91
|
+
id: z.int(),
|
|
92
|
+
body: z.lazy(() => UpdatePostRequestBody$outboundSchema),
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
export function updatePostRequestToJSON(
|
|
96
|
+
updatePostRequest: UpdatePostRequest,
|
|
97
|
+
): string {
|
|
98
|
+
return JSON.stringify(
|
|
99
|
+
UpdatePostRequest$outboundSchema.parse(updatePostRequest),
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/** @internal */
|
|
104
|
+
export const UpdatePostPostStatusResponse$inboundSchema: z.ZodMiniType<
|
|
105
|
+
UpdatePostPostStatusResponse,
|
|
106
|
+
unknown
|
|
107
|
+
> = openEnums.inboundSchema(UpdatePostPostStatusResponse);
|
|
108
|
+
|
|
109
|
+
/** @internal */
|
|
110
|
+
export const UpdatePostResponse$inboundSchema: z.ZodMiniType<
|
|
111
|
+
UpdatePostResponse,
|
|
112
|
+
unknown
|
|
113
|
+
> = z.object({
|
|
114
|
+
postId: types.number(),
|
|
115
|
+
userId: types.number(),
|
|
116
|
+
categoryName: types.string(),
|
|
117
|
+
activityId: types.number(),
|
|
118
|
+
postDate: types.date(),
|
|
119
|
+
postStatus: UpdatePostPostStatusResponse$inboundSchema,
|
|
120
|
+
caption: types.optional(types.string()),
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
export function updatePostResponseFromJSON(
|
|
124
|
+
jsonString: string,
|
|
125
|
+
): SafeParseResult<UpdatePostResponse, SDKValidationError> {
|
|
126
|
+
return safeParse(
|
|
127
|
+
jsonString,
|
|
128
|
+
(x) => UpdatePostResponse$inboundSchema.parse(JSON.parse(x)),
|
|
129
|
+
`Failed to parse 'UpdatePostResponse' from JSON`,
|
|
130
|
+
);
|
|
131
|
+
}
|
package/src/sdk/activities.ts
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import { usersActivitiesCreate } from "../funcs/users-activities-create.js";
|
|
6
|
+
import { usersActivitiesDelete } from "../funcs/users-activities-delete.js";
|
|
7
|
+
import { usersActivitiesGetAllOfUser } from "../funcs/users-activities-get-all-of-user.js";
|
|
8
|
+
import { usersActivitiesGet } from "../funcs/users-activities-get.js";
|
|
9
|
+
import { usersActivitiesMe } from "../funcs/users-activities-me.js";
|
|
10
|
+
import { usersActivitiesUpdate } from "../funcs/users-activities-update.js";
|
|
11
11
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
12
12
|
import * as operations from "../models/operations/index.js";
|
|
13
13
|
import { unwrapAsync } from "../types/fp.js";
|
|
@@ -19,8 +19,8 @@ export class Activities extends ClientSDK {
|
|
|
19
19
|
async getAllOfUser(
|
|
20
20
|
request: operations.GetUserActivitiesRequest,
|
|
21
21
|
options?: RequestOptions,
|
|
22
|
-
): Promise<Array<operations.GetUserActivitiesResponse
|
|
23
|
-
return unwrapAsync(
|
|
22
|
+
): Promise<Array<operations.GetUserActivitiesResponse>> {
|
|
23
|
+
return unwrapAsync(usersActivitiesGetAllOfUser(
|
|
24
24
|
this,
|
|
25
25
|
request,
|
|
26
26
|
options,
|
|
@@ -33,8 +33,8 @@ export class Activities extends ClientSDK {
|
|
|
33
33
|
async me(
|
|
34
34
|
request?: operations.ListActivitiesRequest | undefined,
|
|
35
35
|
options?: RequestOptions,
|
|
36
|
-
): Promise<Array<operations.ListActivitiesResponse
|
|
37
|
-
return unwrapAsync(
|
|
36
|
+
): Promise<Array<operations.ListActivitiesResponse>> {
|
|
37
|
+
return unwrapAsync(usersActivitiesMe(
|
|
38
38
|
this,
|
|
39
39
|
request,
|
|
40
40
|
options,
|
|
@@ -47,8 +47,8 @@ export class Activities extends ClientSDK {
|
|
|
47
47
|
async create(
|
|
48
48
|
request: operations.CreateActivityRequest,
|
|
49
49
|
options?: RequestOptions,
|
|
50
|
-
): Promise<operations.CreateActivityResponse
|
|
51
|
-
return unwrapAsync(
|
|
50
|
+
): Promise<operations.CreateActivityResponse> {
|
|
51
|
+
return unwrapAsync(usersActivitiesCreate(
|
|
52
52
|
this,
|
|
53
53
|
request,
|
|
54
54
|
options,
|
|
@@ -61,8 +61,8 @@ export class Activities extends ClientSDK {
|
|
|
61
61
|
async get(
|
|
62
62
|
request: operations.GetActivityByIdRequest,
|
|
63
63
|
options?: RequestOptions,
|
|
64
|
-
): Promise<operations.GetActivityByIdResponse
|
|
65
|
-
return unwrapAsync(
|
|
64
|
+
): Promise<operations.GetActivityByIdResponse> {
|
|
65
|
+
return unwrapAsync(usersActivitiesGet(
|
|
66
66
|
this,
|
|
67
67
|
request,
|
|
68
68
|
options,
|
|
@@ -75,8 +75,8 @@ export class Activities extends ClientSDK {
|
|
|
75
75
|
async update(
|
|
76
76
|
request: operations.UpdateActivityRequest,
|
|
77
77
|
options?: RequestOptions,
|
|
78
|
-
): Promise<operations.UpdateActivityResponse
|
|
79
|
-
return unwrapAsync(
|
|
78
|
+
): Promise<operations.UpdateActivityResponse> {
|
|
79
|
+
return unwrapAsync(usersActivitiesUpdate(
|
|
80
80
|
this,
|
|
81
81
|
request,
|
|
82
82
|
options,
|
|
@@ -90,7 +90,7 @@ export class Activities extends ClientSDK {
|
|
|
90
90
|
request: operations.DeleteActivityRequest,
|
|
91
91
|
options?: RequestOptions,
|
|
92
92
|
): Promise<void> {
|
|
93
|
-
return unwrapAsync(
|
|
93
|
+
return unwrapAsync(usersActivitiesDelete(
|
|
94
94
|
this,
|
|
95
95
|
request,
|
|
96
96
|
options,
|