@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
|
@@ -28,7 +28,7 @@ import { Result } from "../types/fp.js";
|
|
|
28
28
|
/**
|
|
29
29
|
* Delete an activity
|
|
30
30
|
*/
|
|
31
|
-
export function
|
|
31
|
+
export function usersActivitiesDelete(
|
|
32
32
|
client: SenseiProductivityCore,
|
|
33
33
|
request: operations.DeleteActivityRequest,
|
|
34
34
|
options?: RequestOptions,
|
|
@@ -142,7 +142,7 @@ async function $do(
|
|
|
142
142
|
|
|
143
143
|
const doResult = await client._do(req, {
|
|
144
144
|
context,
|
|
145
|
-
errorCodes: ["
|
|
145
|
+
errorCodes: ["401", "403", "404", "4XX", "5XX"],
|
|
146
146
|
retryConfig: context.retryConfig,
|
|
147
147
|
retryCodes: context.retryCodes,
|
|
148
148
|
});
|
|
@@ -163,8 +163,7 @@ async function $do(
|
|
|
163
163
|
| SDKValidationError
|
|
164
164
|
>(
|
|
165
165
|
M.nil(200, z.void()),
|
|
166
|
-
M.
|
|
167
|
-
M.fail(429),
|
|
166
|
+
M.fail([401, 403, 404, "4XX"]),
|
|
168
167
|
M.fail("5XX"),
|
|
169
168
|
)(response, req);
|
|
170
169
|
if (!result.ok) {
|
package/src/funcs/{user-activities-get-all-of-user.ts → users-activities-get-all-of-user.ts}
RENAMED
|
@@ -24,18 +24,17 @@ 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
|
* Get another user's activities (respects privacy)
|
|
31
30
|
*/
|
|
32
|
-
export function
|
|
31
|
+
export function usersActivitiesGetAllOfUser(
|
|
33
32
|
client: SenseiProductivityCore,
|
|
34
33
|
request: operations.GetUserActivitiesRequest,
|
|
35
34
|
options?: RequestOptions,
|
|
36
35
|
): APIPromise<
|
|
37
36
|
Result<
|
|
38
|
-
Array<operations.GetUserActivitiesResponse
|
|
37
|
+
Array<operations.GetUserActivitiesResponse>,
|
|
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
|
-
Array<operations.GetUserActivitiesResponse
|
|
62
|
+
Array<operations.GetUserActivitiesResponse>,
|
|
64
63
|
| SenseiProductivityError
|
|
65
64
|
| ResponseValidationError
|
|
66
65
|
| ConnectionError
|
|
@@ -149,7 +148,7 @@ async function $do(
|
|
|
149
148
|
|
|
150
149
|
const doResult = await client._do(req, {
|
|
151
150
|
context,
|
|
152
|
-
errorCodes: ["
|
|
151
|
+
errorCodes: ["401", "403", "404", "4XX", "5XX"],
|
|
153
152
|
retryConfig: context.retryConfig,
|
|
154
153
|
retryCodes: context.retryCodes,
|
|
155
154
|
});
|
|
@@ -159,7 +158,7 @@ async function $do(
|
|
|
159
158
|
const response = doResult.value;
|
|
160
159
|
|
|
161
160
|
const [result] = await M.match<
|
|
162
|
-
Array<operations.GetUserActivitiesResponse
|
|
161
|
+
Array<operations.GetUserActivitiesResponse>,
|
|
163
162
|
| SenseiProductivityError
|
|
164
163
|
| ResponseValidationError
|
|
165
164
|
| ConnectionError
|
|
@@ -169,19 +168,8 @@ async function $do(
|
|
|
169
168
|
| UnexpectedClientError
|
|
170
169
|
| SDKValidationError
|
|
171
170
|
>(
|
|
172
|
-
M.json(
|
|
173
|
-
|
|
174
|
-
types$.optional(
|
|
175
|
-
z.array(operations.GetUserActivitiesResponse$inboundSchema),
|
|
176
|
-
),
|
|
177
|
-
),
|
|
178
|
-
M.nil(
|
|
179
|
-
[401, 403, 404],
|
|
180
|
-
types$.optional(
|
|
181
|
-
z.array(operations.GetUserActivitiesResponse$inboundSchema),
|
|
182
|
-
),
|
|
183
|
-
),
|
|
184
|
-
M.fail(429),
|
|
171
|
+
M.json(200, z.array(operations.GetUserActivitiesResponse$inboundSchema)),
|
|
172
|
+
M.fail([401, 403, 404, "4XX"]),
|
|
185
173
|
M.fail("5XX"),
|
|
186
174
|
)(response, req);
|
|
187
175
|
if (!result.ok) {
|
|
@@ -24,18 +24,17 @@ 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
|
* Get a specific activity by ID
|
|
31
30
|
*/
|
|
32
|
-
export function
|
|
31
|
+
export function usersActivitiesGet(
|
|
33
32
|
client: SenseiProductivityCore,
|
|
34
33
|
request: operations.GetActivityByIdRequest,
|
|
35
34
|
options?: RequestOptions,
|
|
36
35
|
): APIPromise<
|
|
37
36
|
Result<
|
|
38
|
-
operations.GetActivityByIdResponse
|
|
37
|
+
operations.GetActivityByIdResponse,
|
|
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.GetActivityByIdResponse
|
|
62
|
+
operations.GetActivityByIdResponse,
|
|
64
63
|
| SenseiProductivityError
|
|
65
64
|
| ResponseValidationError
|
|
66
65
|
| ConnectionError
|
|
@@ -143,7 +142,7 @@ async function $do(
|
|
|
143
142
|
|
|
144
143
|
const doResult = await client._do(req, {
|
|
145
144
|
context,
|
|
146
|
-
errorCodes: ["
|
|
145
|
+
errorCodes: ["401", "403", "404", "4XX", "5XX"],
|
|
147
146
|
retryConfig: context.retryConfig,
|
|
148
147
|
retryCodes: context.retryCodes,
|
|
149
148
|
});
|
|
@@ -153,7 +152,7 @@ async function $do(
|
|
|
153
152
|
const response = doResult.value;
|
|
154
153
|
|
|
155
154
|
const [result] = await M.match<
|
|
156
|
-
operations.GetActivityByIdResponse
|
|
155
|
+
operations.GetActivityByIdResponse,
|
|
157
156
|
| SenseiProductivityError
|
|
158
157
|
| ResponseValidationError
|
|
159
158
|
| ConnectionError
|
|
@@ -163,15 +162,8 @@ async function $do(
|
|
|
163
162
|
| UnexpectedClientError
|
|
164
163
|
| SDKValidationError
|
|
165
164
|
>(
|
|
166
|
-
M.json(
|
|
167
|
-
|
|
168
|
-
types$.optional(operations.GetActivityByIdResponse$inboundSchema),
|
|
169
|
-
),
|
|
170
|
-
M.nil(
|
|
171
|
-
[401, 403, 404],
|
|
172
|
-
types$.optional(operations.GetActivityByIdResponse$inboundSchema),
|
|
173
|
-
),
|
|
174
|
-
M.fail(429),
|
|
165
|
+
M.json(200, operations.GetActivityByIdResponse$inboundSchema),
|
|
166
|
+
M.fail([401, 403, 404, "4XX"]),
|
|
175
167
|
M.fail("5XX"),
|
|
176
168
|
)(response, req);
|
|
177
169
|
if (!result.ok) {
|
|
@@ -24,18 +24,17 @@ 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
|
* List the authenticated user's activities
|
|
31
30
|
*/
|
|
32
|
-
export function
|
|
31
|
+
export function usersActivitiesMe(
|
|
33
32
|
client: SenseiProductivityCore,
|
|
34
33
|
request?: operations.ListActivitiesRequest | undefined,
|
|
35
34
|
options?: RequestOptions,
|
|
36
35
|
): APIPromise<
|
|
37
36
|
Result<
|
|
38
|
-
Array<operations.ListActivitiesResponse
|
|
37
|
+
Array<operations.ListActivitiesResponse>,
|
|
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
|
-
Array<operations.ListActivitiesResponse
|
|
62
|
+
Array<operations.ListActivitiesResponse>,
|
|
64
63
|
| SenseiProductivityError
|
|
65
64
|
| ResponseValidationError
|
|
66
65
|
| ConnectionError
|
|
@@ -145,7 +144,7 @@ async function $do(
|
|
|
145
144
|
|
|
146
145
|
const doResult = await client._do(req, {
|
|
147
146
|
context,
|
|
148
|
-
errorCodes: ["
|
|
147
|
+
errorCodes: ["401", "4XX", "5XX"],
|
|
149
148
|
retryConfig: context.retryConfig,
|
|
150
149
|
retryCodes: context.retryCodes,
|
|
151
150
|
});
|
|
@@ -155,7 +154,7 @@ async function $do(
|
|
|
155
154
|
const response = doResult.value;
|
|
156
155
|
|
|
157
156
|
const [result] = await M.match<
|
|
158
|
-
Array<operations.ListActivitiesResponse
|
|
157
|
+
Array<operations.ListActivitiesResponse>,
|
|
159
158
|
| SenseiProductivityError
|
|
160
159
|
| ResponseValidationError
|
|
161
160
|
| ConnectionError
|
|
@@ -165,15 +164,8 @@ async function $do(
|
|
|
165
164
|
| UnexpectedClientError
|
|
166
165
|
| SDKValidationError
|
|
167
166
|
>(
|
|
168
|
-
M.json(
|
|
169
|
-
|
|
170
|
-
types$.optional(z.array(operations.ListActivitiesResponse$inboundSchema)),
|
|
171
|
-
),
|
|
172
|
-
M.nil(
|
|
173
|
-
401,
|
|
174
|
-
types$.optional(z.array(operations.ListActivitiesResponse$inboundSchema)),
|
|
175
|
-
),
|
|
176
|
-
M.fail(429),
|
|
167
|
+
M.json(200, z.array(operations.ListActivitiesResponse$inboundSchema)),
|
|
168
|
+
M.fail([401, "4XX"]),
|
|
177
169
|
M.fail("5XX"),
|
|
178
170
|
)(response, req);
|
|
179
171
|
if (!result.ok) {
|
|
@@ -24,18 +24,17 @@ 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 an activity (mark complete, edit details or deadline)
|
|
31
30
|
*/
|
|
32
|
-
export function
|
|
31
|
+
export function usersActivitiesUpdate(
|
|
33
32
|
client: SenseiProductivityCore,
|
|
34
33
|
request: operations.UpdateActivityRequest,
|
|
35
34
|
options?: RequestOptions,
|
|
36
35
|
): APIPromise<
|
|
37
36
|
Result<
|
|
38
|
-
operations.UpdateActivityResponse
|
|
37
|
+
operations.UpdateActivityResponse,
|
|
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.UpdateActivityResponse
|
|
62
|
+
operations.UpdateActivityResponse,
|
|
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.UpdateActivityResponse
|
|
156
|
+
operations.UpdateActivityResponse,
|
|
158
157
|
| SenseiProductivityError
|
|
159
158
|
| ResponseValidationError
|
|
160
159
|
| ConnectionError
|
|
@@ -164,15 +163,8 @@ async function $do(
|
|
|
164
163
|
| UnexpectedClientError
|
|
165
164
|
| SDKValidationError
|
|
166
165
|
>(
|
|
167
|
-
M.json(
|
|
168
|
-
|
|
169
|
-
types$.optional(operations.UpdateActivityResponse$inboundSchema),
|
|
170
|
-
),
|
|
171
|
-
M.nil(
|
|
172
|
-
[400, 401, 403, 404],
|
|
173
|
-
types$.optional(operations.UpdateActivityResponse$inboundSchema),
|
|
174
|
-
),
|
|
175
|
-
M.fail(429),
|
|
166
|
+
M.json(200, operations.UpdateActivityResponse$inboundSchema),
|
|
167
|
+
M.fail([400, 401, 403, 404, "4XX"]),
|
|
176
168
|
M.fail("5XX"),
|
|
177
169
|
)(response, req);
|
|
178
170
|
if (!result.ok) {
|
|
@@ -142,7 +142,7 @@ async function $do(
|
|
|
142
142
|
|
|
143
143
|
const doResult = await client._do(req, {
|
|
144
144
|
context,
|
|
145
|
-
errorCodes: ["
|
|
145
|
+
errorCodes: ["401", "403", "404", "4XX", "5XX"],
|
|
146
146
|
retryConfig: context.retryConfig,
|
|
147
147
|
retryCodes: context.retryCodes,
|
|
148
148
|
});
|
|
@@ -163,8 +163,7 @@ async function $do(
|
|
|
163
163
|
| SDKValidationError
|
|
164
164
|
>(
|
|
165
165
|
M.nil(200, z.void()),
|
|
166
|
-
M.
|
|
167
|
-
M.fail(429),
|
|
166
|
+
M.fail([401, 403, 404, "4XX"]),
|
|
168
167
|
M.fail("5XX"),
|
|
169
168
|
)(response, req);
|
|
170
169
|
if (!result.ok) {
|
package/src/funcs/users-get.ts
CHANGED
|
@@ -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
|
* Get a user's public profile by ID
|
|
@@ -35,7 +34,7 @@ export function usersGet(
|
|
|
35
34
|
options?: RequestOptions,
|
|
36
35
|
): APIPromise<
|
|
37
36
|
Result<
|
|
38
|
-
operations.GetUserByIdResponse
|
|
37
|
+
operations.GetUserByIdResponse,
|
|
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.GetUserByIdResponse
|
|
62
|
+
operations.GetUserByIdResponse,
|
|
64
63
|
| SenseiProductivityError
|
|
65
64
|
| ResponseValidationError
|
|
66
65
|
| ConnectionError
|
|
@@ -143,7 +142,7 @@ async function $do(
|
|
|
143
142
|
|
|
144
143
|
const doResult = await client._do(req, {
|
|
145
144
|
context,
|
|
146
|
-
errorCodes: ["
|
|
145
|
+
errorCodes: ["401", "403", "404", "4XX", "5XX"],
|
|
147
146
|
retryConfig: context.retryConfig,
|
|
148
147
|
retryCodes: context.retryCodes,
|
|
149
148
|
});
|
|
@@ -153,7 +152,7 @@ async function $do(
|
|
|
153
152
|
const response = doResult.value;
|
|
154
153
|
|
|
155
154
|
const [result] = await M.match<
|
|
156
|
-
operations.GetUserByIdResponse
|
|
155
|
+
operations.GetUserByIdResponse,
|
|
157
156
|
| SenseiProductivityError
|
|
158
157
|
| ResponseValidationError
|
|
159
158
|
| ConnectionError
|
|
@@ -163,12 +162,8 @@ async function $do(
|
|
|
163
162
|
| UnexpectedClientError
|
|
164
163
|
| SDKValidationError
|
|
165
164
|
>(
|
|
166
|
-
M.json(200,
|
|
167
|
-
M.
|
|
168
|
-
[401, 403, 404],
|
|
169
|
-
types$.optional(operations.GetUserByIdResponse$inboundSchema),
|
|
170
|
-
),
|
|
171
|
-
M.fail(429),
|
|
165
|
+
M.json(200, operations.GetUserByIdResponse$inboundSchema),
|
|
166
|
+
M.fail([401, 403, 404, "4XX"]),
|
|
172
167
|
M.fail("5XX"),
|
|
173
168
|
)(response, req);
|
|
174
169
|
if (!result.ok) {
|
package/src/funcs/users-login.ts
CHANGED
|
@@ -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
|
* Login the user and also return an access token the API client can use for further authentication
|
|
@@ -35,7 +34,7 @@ export function usersLogin(
|
|
|
35
34
|
options?: RequestOptions,
|
|
36
35
|
): APIPromise<
|
|
37
36
|
Result<
|
|
38
|
-
operations.UserLoginResponse
|
|
37
|
+
operations.UserLoginResponse,
|
|
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.UserLoginResponse
|
|
62
|
+
operations.UserLoginResponse,
|
|
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", "401", "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.UserLoginResponse
|
|
149
|
+
operations.UserLoginResponse,
|
|
151
150
|
| SenseiProductivityError
|
|
152
151
|
| ResponseValidationError
|
|
153
152
|
| ConnectionError
|
|
@@ -157,12 +156,8 @@ async function $do(
|
|
|
157
156
|
| UnexpectedClientError
|
|
158
157
|
| SDKValidationError
|
|
159
158
|
>(
|
|
160
|
-
M.json(200,
|
|
161
|
-
M.
|
|
162
|
-
[400, 401],
|
|
163
|
-
types$.optional(operations.UserLoginResponse$inboundSchema),
|
|
164
|
-
),
|
|
165
|
-
M.fail(429),
|
|
159
|
+
M.json(200, operations.UserLoginResponse$inboundSchema),
|
|
160
|
+
M.fail([400, 401, "4XX"]),
|
|
166
161
|
M.fail("5XX"),
|
|
167
162
|
)(response, req);
|
|
168
163
|
if (!result.ok) {
|
package/src/funcs/users-me.ts
CHANGED
|
@@ -21,7 +21,6 @@ import { SenseiProductivityError } from "../models/errors/sensei-productivity-er
|
|
|
21
21
|
import * as operations from "../models/operations/index.js";
|
|
22
22
|
import { APICall, APIPromise } from "../types/async.js";
|
|
23
23
|
import { Result } from "../types/fp.js";
|
|
24
|
-
import * as types$ from "../types/primitives.js";
|
|
25
24
|
|
|
26
25
|
/**
|
|
27
26
|
* Get the currently authenticated user's profile
|
|
@@ -31,7 +30,7 @@ export function usersMe(
|
|
|
31
30
|
options?: RequestOptions,
|
|
32
31
|
): APIPromise<
|
|
33
32
|
Result<
|
|
34
|
-
operations.GetCurrentUserResponse
|
|
33
|
+
operations.GetCurrentUserResponse,
|
|
35
34
|
| SenseiProductivityError
|
|
36
35
|
| ResponseValidationError
|
|
37
36
|
| ConnectionError
|
|
@@ -54,7 +53,7 @@ async function $do(
|
|
|
54
53
|
): Promise<
|
|
55
54
|
[
|
|
56
55
|
Result<
|
|
57
|
-
operations.GetCurrentUserResponse
|
|
56
|
+
operations.GetCurrentUserResponse,
|
|
58
57
|
| SenseiProductivityError
|
|
59
58
|
| ResponseValidationError
|
|
60
59
|
| ConnectionError
|
|
@@ -118,7 +117,7 @@ async function $do(
|
|
|
118
117
|
|
|
119
118
|
const doResult = await client._do(req, {
|
|
120
119
|
context,
|
|
121
|
-
errorCodes: ["
|
|
120
|
+
errorCodes: ["401", "4XX", "5XX"],
|
|
122
121
|
retryConfig: context.retryConfig,
|
|
123
122
|
retryCodes: context.retryCodes,
|
|
124
123
|
});
|
|
@@ -128,7 +127,7 @@ async function $do(
|
|
|
128
127
|
const response = doResult.value;
|
|
129
128
|
|
|
130
129
|
const [result] = await M.match<
|
|
131
|
-
operations.GetCurrentUserResponse
|
|
130
|
+
operations.GetCurrentUserResponse,
|
|
132
131
|
| SenseiProductivityError
|
|
133
132
|
| ResponseValidationError
|
|
134
133
|
| ConnectionError
|
|
@@ -138,15 +137,8 @@ async function $do(
|
|
|
138
137
|
| UnexpectedClientError
|
|
139
138
|
| SDKValidationError
|
|
140
139
|
>(
|
|
141
|
-
M.json(
|
|
142
|
-
|
|
143
|
-
types$.optional(operations.GetCurrentUserResponse$inboundSchema),
|
|
144
|
-
),
|
|
145
|
-
M.nil(
|
|
146
|
-
401,
|
|
147
|
-
types$.optional(operations.GetCurrentUserResponse$inboundSchema),
|
|
148
|
-
),
|
|
149
|
-
M.fail(429),
|
|
140
|
+
M.json(200, operations.GetCurrentUserResponse$inboundSchema),
|
|
141
|
+
M.fail([401, "4XX"]),
|
|
150
142
|
M.fail("5XX"),
|
|
151
143
|
)(response, req);
|
|
152
144
|
if (!result.ok) {
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { SenseiProductivityCore } from "../core.js";
|
|
7
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/http-client-errors.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
22
|
+
import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
|
|
23
|
+
import { SenseiProductivityError } from "../models/errors/sensei-productivity-error.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Delete a post
|
|
30
|
+
*/
|
|
31
|
+
export function usersPostsDelete(
|
|
32
|
+
client: SenseiProductivityCore,
|
|
33
|
+
request: operations.DeletePostRequest,
|
|
34
|
+
options?: RequestOptions,
|
|
35
|
+
): APIPromise<
|
|
36
|
+
Result<
|
|
37
|
+
void,
|
|
38
|
+
| SenseiProductivityError
|
|
39
|
+
| ResponseValidationError
|
|
40
|
+
| ConnectionError
|
|
41
|
+
| RequestAbortedError
|
|
42
|
+
| RequestTimeoutError
|
|
43
|
+
| InvalidRequestError
|
|
44
|
+
| UnexpectedClientError
|
|
45
|
+
| SDKValidationError
|
|
46
|
+
>
|
|
47
|
+
> {
|
|
48
|
+
return new APIPromise($do(
|
|
49
|
+
client,
|
|
50
|
+
request,
|
|
51
|
+
options,
|
|
52
|
+
));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async function $do(
|
|
56
|
+
client: SenseiProductivityCore,
|
|
57
|
+
request: operations.DeletePostRequest,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): Promise<
|
|
60
|
+
[
|
|
61
|
+
Result<
|
|
62
|
+
void,
|
|
63
|
+
| SenseiProductivityError
|
|
64
|
+
| ResponseValidationError
|
|
65
|
+
| ConnectionError
|
|
66
|
+
| RequestAbortedError
|
|
67
|
+
| RequestTimeoutError
|
|
68
|
+
| InvalidRequestError
|
|
69
|
+
| UnexpectedClientError
|
|
70
|
+
| SDKValidationError
|
|
71
|
+
>,
|
|
72
|
+
APICall,
|
|
73
|
+
]
|
|
74
|
+
> {
|
|
75
|
+
const parsed = safeParse(
|
|
76
|
+
request,
|
|
77
|
+
(value) => z.parse(operations.DeletePostRequest$outboundSchema, value),
|
|
78
|
+
"Input validation failed",
|
|
79
|
+
);
|
|
80
|
+
if (!parsed.ok) {
|
|
81
|
+
return [parsed, { status: "invalid" }];
|
|
82
|
+
}
|
|
83
|
+
const payload = parsed.value;
|
|
84
|
+
const body = null;
|
|
85
|
+
|
|
86
|
+
const pathParams = {
|
|
87
|
+
id: encodeSimple("id", payload.id, {
|
|
88
|
+
explode: false,
|
|
89
|
+
charEncoding: "percent",
|
|
90
|
+
}),
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const path = pathToFunc("/api/v1/posts/{id}")(pathParams);
|
|
94
|
+
|
|
95
|
+
const headers = new Headers(compactMap({
|
|
96
|
+
Accept: "*/*",
|
|
97
|
+
}));
|
|
98
|
+
|
|
99
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
100
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
101
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
102
|
+
|
|
103
|
+
const context = {
|
|
104
|
+
options: client._options,
|
|
105
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
106
|
+
operationID: "deletePost",
|
|
107
|
+
oAuth2Scopes: null,
|
|
108
|
+
|
|
109
|
+
resolvedSecurity: requestSecurity,
|
|
110
|
+
|
|
111
|
+
securitySource: client._options.bearerAuth,
|
|
112
|
+
retryConfig: options?.retries
|
|
113
|
+
|| client._options.retryConfig
|
|
114
|
+
|| {
|
|
115
|
+
strategy: "backoff",
|
|
116
|
+
backoff: {
|
|
117
|
+
initialInterval: 1000,
|
|
118
|
+
maxInterval: 60000,
|
|
119
|
+
exponent: 1.3,
|
|
120
|
+
maxElapsedTime: 3600000,
|
|
121
|
+
},
|
|
122
|
+
retryConnectionErrors: true,
|
|
123
|
+
}
|
|
124
|
+
|| { strategy: "none" },
|
|
125
|
+
retryCodes: options?.retryCodes || ["429", "5XX"],
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
const requestRes = client._createRequest(context, {
|
|
129
|
+
security: requestSecurity,
|
|
130
|
+
method: "DELETE",
|
|
131
|
+
baseURL: options?.serverURL,
|
|
132
|
+
path: path,
|
|
133
|
+
headers: headers,
|
|
134
|
+
body: body,
|
|
135
|
+
userAgent: client._options.userAgent,
|
|
136
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
137
|
+
}, options);
|
|
138
|
+
if (!requestRes.ok) {
|
|
139
|
+
return [requestRes, { status: "invalid" }];
|
|
140
|
+
}
|
|
141
|
+
const req = requestRes.value;
|
|
142
|
+
|
|
143
|
+
const doResult = await client._do(req, {
|
|
144
|
+
context,
|
|
145
|
+
errorCodes: ["401", "403", "404", "4XX", "5XX"],
|
|
146
|
+
retryConfig: context.retryConfig,
|
|
147
|
+
retryCodes: context.retryCodes,
|
|
148
|
+
});
|
|
149
|
+
if (!doResult.ok) {
|
|
150
|
+
return [doResult, { status: "request-error", request: req }];
|
|
151
|
+
}
|
|
152
|
+
const response = doResult.value;
|
|
153
|
+
|
|
154
|
+
const [result] = await M.match<
|
|
155
|
+
void,
|
|
156
|
+
| SenseiProductivityError
|
|
157
|
+
| ResponseValidationError
|
|
158
|
+
| ConnectionError
|
|
159
|
+
| RequestAbortedError
|
|
160
|
+
| RequestTimeoutError
|
|
161
|
+
| InvalidRequestError
|
|
162
|
+
| UnexpectedClientError
|
|
163
|
+
| SDKValidationError
|
|
164
|
+
>(
|
|
165
|
+
M.nil(200, z.void()),
|
|
166
|
+
M.fail([401, 403, 404, "4XX"]),
|
|
167
|
+
M.fail("5XX"),
|
|
168
|
+
)(response, req);
|
|
169
|
+
if (!result.ok) {
|
|
170
|
+
return [result, { status: "complete", request: req, response }];
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return [result, { status: "complete", request: req, response }];
|
|
174
|
+
}
|