@stackframe/stack-shared 2.8.8 → 2.8.10
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/CHANGELOG.md +8 -0
- package/dist/config/format.d.cts +39 -0
- package/dist/config/format.d.ts +14 -13
- package/dist/config/format.js +147 -206
- package/dist/config/format.js.map +1 -0
- package/dist/config/schema.d.cts +724 -0
- package/dist/config/schema.d.ts +51 -48
- package/dist/config/schema.js +230 -172
- package/dist/config/schema.js.map +1 -0
- package/dist/crud.d.cts +102 -0
- package/dist/crud.d.ts +15 -13
- package/dist/crud.js +83 -128
- package/dist/crud.js.map +1 -0
- package/dist/esm/config/format.js +135 -0
- package/dist/esm/config/format.js.map +1 -0
- package/dist/esm/config/schema.js +199 -0
- package/dist/esm/config/schema.js.map +1 -0
- package/dist/esm/crud.js +60 -0
- package/dist/esm/crud.js.map +1 -0
- package/dist/esm/global.d.js +1 -0
- package/dist/esm/global.d.js.map +1 -0
- package/dist/esm/helpers/password.js +17 -0
- package/dist/esm/helpers/password.js.map +1 -0
- package/dist/esm/helpers/production-mode.js +50 -0
- package/dist/esm/helpers/production-mode.js.map +1 -0
- package/dist/esm/hooks/use-async-callback.js +38 -0
- package/dist/esm/hooks/use-async-callback.js.map +1 -0
- package/dist/esm/hooks/use-async-external-store.js +23 -0
- package/dist/esm/hooks/use-async-external-store.js.map +1 -0
- package/dist/esm/hooks/use-hash.js +17 -0
- package/dist/esm/hooks/use-hash.js.map +1 -0
- package/dist/esm/hooks/use-strict-memo.js +61 -0
- package/dist/esm/hooks/use-strict-memo.js.map +1 -0
- package/dist/esm/index.js +22 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/interface/adminInterface.js +244 -0
- package/dist/esm/interface/adminInterface.js.map +1 -0
- package/dist/esm/interface/clientInterface.js +2041 -0
- package/dist/esm/interface/clientInterface.js.map +1 -0
- package/dist/esm/interface/crud/contact-channels.js +77 -0
- package/dist/esm/interface/crud/contact-channels.js.map +1 -0
- package/dist/esm/interface/crud/current-user.js +65 -0
- package/dist/esm/interface/crud/current-user.js.map +1 -0
- package/dist/esm/interface/crud/email-templates.js +52 -0
- package/dist/esm/interface/crud/email-templates.js.map +1 -0
- package/dist/esm/interface/crud/emails.js +20 -0
- package/dist/esm/interface/crud/emails.js.map +1 -0
- package/dist/esm/interface/crud/internal-api-keys.js +69 -0
- package/dist/esm/interface/crud/internal-api-keys.js.map +1 -0
- package/dist/esm/interface/crud/oauth.js +24 -0
- package/dist/esm/interface/crud/oauth.js.map +1 -0
- package/dist/esm/interface/crud/project-api-keys.js +93 -0
- package/dist/esm/interface/crud/project-api-keys.js.map +1 -0
- package/dist/esm/interface/crud/project-permissions.js +113 -0
- package/dist/esm/interface/crud/project-permissions.js.map +1 -0
- package/dist/esm/interface/crud/projects.js +188 -0
- package/dist/esm/interface/crud/projects.js.map +1 -0
- package/dist/esm/interface/crud/sessions.js +62 -0
- package/dist/esm/interface/crud/sessions.js.map +1 -0
- package/dist/esm/interface/crud/svix-token.js +22 -0
- package/dist/esm/interface/crud/svix-token.js.map +1 -0
- package/dist/esm/interface/crud/team-invitation-details.js +23 -0
- package/dist/esm/interface/crud/team-invitation-details.js.map +1 -0
- package/dist/esm/interface/crud/team-invitation.js +36 -0
- package/dist/esm/interface/crud/team-invitation.js.map +1 -0
- package/dist/esm/interface/crud/team-member-profiles.js +62 -0
- package/dist/esm/interface/crud/team-member-profiles.js.map +1 -0
- package/dist/esm/interface/crud/team-memberships.js +60 -0
- package/dist/esm/interface/crud/team-memberships.js.map +1 -0
- package/dist/esm/interface/crud/team-permissions.js +114 -0
- package/dist/esm/interface/crud/team-permissions.js.map +1 -0
- package/dist/esm/interface/crud/teams.js +143 -0
- package/dist/esm/interface/crud/teams.js.map +1 -0
- package/dist/esm/interface/crud/users.js +139 -0
- package/dist/esm/interface/crud/users.js.map +1 -0
- package/dist/esm/interface/serverInterface.js +485 -0
- package/dist/esm/interface/serverInterface.js.map +1 -0
- package/dist/esm/interface/webhooks.js +21 -0
- package/dist/esm/interface/webhooks.js.map +1 -0
- package/dist/esm/known-errors.js +1223 -0
- package/dist/esm/known-errors.js.map +1 -0
- package/dist/esm/schema-fields.js +484 -0
- package/dist/esm/schema-fields.js.map +1 -0
- package/dist/esm/sessions.js +168 -0
- package/dist/esm/sessions.js.map +1 -0
- package/dist/esm/utils/api-keys.js +79 -0
- package/dist/esm/utils/api-keys.js.map +1 -0
- package/dist/esm/utils/arrays.js +78 -0
- package/dist/esm/utils/arrays.js.map +1 -0
- package/dist/esm/utils/base64.js +18 -0
- package/dist/esm/utils/base64.js.map +1 -0
- package/dist/esm/utils/booleans.js +12 -0
- package/dist/esm/utils/booleans.js.map +1 -0
- package/dist/esm/utils/browser-compat.js +21 -0
- package/dist/esm/utils/browser-compat.js.map +1 -0
- package/dist/esm/utils/bytes.js +160 -0
- package/dist/esm/utils/bytes.js.map +1 -0
- package/dist/esm/utils/caches.js +167 -0
- package/dist/esm/utils/caches.js.map +1 -0
- package/dist/esm/utils/compile-time.js +11 -0
- package/dist/esm/utils/compile-time.js.map +1 -0
- package/dist/esm/utils/crypto.js +25 -0
- package/dist/esm/utils/crypto.js.map +1 -0
- package/dist/esm/utils/dates.js +64 -0
- package/dist/esm/utils/dates.js.map +1 -0
- package/dist/esm/utils/dom.js +11 -0
- package/dist/esm/utils/dom.js.map +1 -0
- package/dist/esm/utils/env.js +58 -0
- package/dist/esm/utils/env.js.map +1 -0
- package/dist/esm/utils/errors.js +174 -0
- package/dist/esm/utils/errors.js.map +1 -0
- package/dist/esm/utils/fs.js +37 -0
- package/dist/esm/utils/fs.js.map +1 -0
- package/dist/esm/utils/functions.js +12 -0
- package/dist/esm/utils/functions.js.map +1 -0
- package/dist/esm/utils/geo.js +15 -0
- package/dist/esm/utils/geo.js.map +1 -0
- package/dist/esm/utils/globals.js +18 -0
- package/dist/esm/utils/globals.js.map +1 -0
- package/dist/esm/utils/hashes.js +55 -0
- package/dist/esm/utils/hashes.js.map +1 -0
- package/dist/esm/utils/html.js +13 -0
- package/dist/esm/utils/html.js.map +1 -0
- package/dist/esm/utils/http.js +60 -0
- package/dist/esm/utils/http.js.map +1 -0
- package/dist/esm/utils/ips.js +15 -0
- package/dist/esm/utils/ips.js.map +1 -0
- package/dist/esm/utils/json.js +31 -0
- package/dist/esm/utils/json.js.map +1 -0
- package/dist/esm/utils/jwt.js +87 -0
- package/dist/esm/utils/jwt.js.map +1 -0
- package/dist/esm/utils/locks.js +57 -0
- package/dist/esm/utils/locks.js.map +1 -0
- package/dist/esm/utils/maps.js +181 -0
- package/dist/esm/utils/maps.js.map +1 -0
- package/dist/esm/utils/math.js +8 -0
- package/dist/esm/utils/math.js.map +1 -0
- package/dist/esm/utils/node-http.js +42 -0
- package/dist/esm/utils/node-http.js.map +1 -0
- package/dist/esm/utils/numbers.js +32 -0
- package/dist/esm/utils/numbers.js.map +1 -0
- package/dist/esm/utils/oauth.js +10 -0
- package/dist/esm/utils/oauth.js.map +1 -0
- package/dist/esm/utils/objects.js +153 -0
- package/dist/esm/utils/objects.js.map +1 -0
- package/dist/esm/utils/passkey.js +1 -0
- package/dist/esm/utils/passkey.js.map +1 -0
- package/dist/esm/utils/promises.js +233 -0
- package/dist/esm/utils/promises.js.map +1 -0
- package/dist/esm/utils/proxies.js +128 -0
- package/dist/esm/utils/proxies.js.map +1 -0
- package/dist/esm/utils/react.js +78 -0
- package/dist/esm/utils/react.js.map +1 -0
- package/dist/esm/utils/results.js +141 -0
- package/dist/esm/utils/results.js.map +1 -0
- package/dist/esm/utils/sentry.js +20 -0
- package/dist/esm/utils/sentry.js.map +1 -0
- package/dist/esm/utils/stores.js +195 -0
- package/dist/esm/utils/stores.js.map +1 -0
- package/dist/esm/utils/strings.js +294 -0
- package/dist/esm/utils/strings.js.map +1 -0
- package/dist/esm/utils/strings.nicify.test.js +222 -0
- package/dist/esm/utils/strings.nicify.test.js.map +1 -0
- package/dist/esm/utils/types.js +1 -0
- package/dist/esm/utils/types.js.map +1 -0
- package/dist/esm/utils/unicode.js +11 -0
- package/dist/esm/utils/unicode.js.map +1 -0
- package/dist/esm/utils/urls.js +53 -0
- package/dist/esm/utils/urls.js.map +1 -0
- package/dist/esm/utils/uuids.js +16 -0
- package/dist/esm/utils/uuids.js.map +1 -0
- package/dist/global.d.d.cts +1 -0
- package/dist/global.d.d.ts +1 -0
- package/dist/global.d.js +2 -0
- package/dist/global.d.js.map +1 -0
- package/dist/helpers/password.d.cts +11 -0
- package/dist/helpers/password.d.ts +11 -2
- package/dist/helpers/password.js +41 -11
- package/dist/helpers/password.js.map +1 -0
- package/dist/helpers/production-mode.d.cts +12 -0
- package/dist/helpers/production-mode.d.ts +9 -3
- package/dist/helpers/production-mode.js +72 -45
- package/dist/helpers/production-mode.js.map +1 -0
- package/dist/hooks/use-async-callback.d.cts +6 -0
- package/dist/hooks/use-async-callback.d.ts +6 -3
- package/dist/hooks/use-async-callback.js +72 -30
- package/dist/hooks/use-async-callback.js.map +1 -0
- package/dist/hooks/use-async-external-store.d.cts +7 -0
- package/dist/hooks/use-async-external-store.d.ts +5 -2
- package/dist/hooks/use-async-external-store.js +47 -19
- package/dist/hooks/use-async-external-store.js.map +1 -0
- package/dist/hooks/use-hash.d.cts +3 -0
- package/dist/hooks/use-hash.d.ts +3 -1
- package/dist/hooks/use-hash.js +41 -8
- package/dist/hooks/use-hash.js.map +1 -0
- package/dist/hooks/use-strict-memo.d.cts +8 -0
- package/dist/hooks/use-strict-memo.d.ts +3 -1
- package/dist/hooks/use-strict-memo.js +78 -131
- package/dist/hooks/use-strict-memo.js.map +1 -0
- package/dist/index.d.cts +30 -0
- package/dist/index.d.ts +30 -4
- package/dist/index.js +42 -4
- package/dist/index.js.map +1 -0
- package/dist/interface/adminInterface.d.cts +94 -0
- package/dist/interface/adminInterface.d.ts +38 -15
- package/dist/interface/adminInterface.js +269 -174
- package/dist/interface/adminInterface.js.map +1 -0
- package/dist/interface/clientInterface.d.cts +260 -0
- package/dist/interface/clientInterface.d.ts +25 -18
- package/dist/interface/clientInterface.js +2054 -995
- package/dist/interface/clientInterface.js.map +1 -0
- package/dist/interface/crud/contact-channels.d.cts +180 -0
- package/dist/interface/crud/contact-channels.d.ts +30 -25
- package/dist/interface/crud/contact-channels.js +101 -59
- package/dist/interface/crud/contact-channels.js.map +1 -0
- package/dist/interface/crud/current-user.d.cts +205 -0
- package/dist/interface/crud/current-user.d.ts +17 -12
- package/dist/interface/crud/current-user.js +86 -56
- package/dist/interface/crud/current-user.js.map +1 -0
- package/dist/interface/crud/email-templates.d.cts +84 -0
- package/dist/interface/crud/email-templates.d.ts +24 -19
- package/dist/interface/crud/email-templates.js +77 -37
- package/dist/interface/crud/email-templates.js.map +1 -0
- package/dist/interface/crud/emails.d.cts +69 -0
- package/dist/interface/crud/emails.d.ts +12 -7
- package/dist/interface/crud/emails.js +54 -12
- package/dist/interface/crud/emails.js.map +1 -0
- package/dist/interface/crud/internal-api-keys.d.cts +139 -0
- package/dist/interface/crud/internal-api-keys.d.ts +22 -17
- package/dist/interface/crud/internal-api-keys.js +92 -54
- package/dist/interface/crud/internal-api-keys.js.map +1 -0
- package/dist/interface/crud/oauth.d.cts +34 -0
- package/dist/interface/crud/oauth.d.ts +16 -11
- package/dist/interface/crud/oauth.js +48 -14
- package/dist/interface/crud/oauth.js.map +1 -0
- package/dist/interface/crud/project-api-keys.d.cts +196 -0
- package/dist/interface/crud/project-api-keys.d.ts +18 -10
- package/dist/interface/crud/project-api-keys.js +121 -74
- package/dist/interface/crud/project-api-keys.js.map +1 -0
- package/dist/interface/crud/project-permissions.d.cts +160 -0
- package/dist/interface/crud/project-permissions.d.ts +38 -33
- package/dist/interface/crud/project-permissions.js +148 -90
- package/dist/interface/crud/project-permissions.js.map +1 -0
- package/dist/interface/crud/projects.d.cts +640 -0
- package/dist/interface/crud/projects.d.ts +36 -31
- package/dist/interface/crud/projects.js +218 -156
- package/dist/interface/crud/projects.js.map +1 -0
- package/dist/interface/crud/sessions.d.cts +149 -0
- package/dist/interface/crud/sessions.d.ts +21 -16
- package/dist/interface/crud/sessions.js +86 -50
- package/dist/interface/crud/sessions.js.map +1 -0
- package/dist/interface/crud/svix-token.d.cts +26 -0
- package/dist/interface/crud/svix-token.d.ts +14 -9
- package/dist/interface/crud/svix-token.js +46 -12
- package/dist/interface/crud/svix-token.js.map +1 -0
- package/dist/interface/crud/team-invitation-details.d.cts +30 -0
- package/dist/interface/crud/team-invitation-details.d.ts +12 -7
- package/dist/interface/crud/team-invitation-details.js +57 -15
- package/dist/interface/crud/team-invitation-details.js.map +1 -0
- package/dist/interface/crud/team-invitation.d.cts +49 -0
- package/dist/interface/crud/team-invitation.d.ts +13 -8
- package/dist/interface/crud/team-invitation.js +69 -27
- package/dist/interface/crud/team-invitation.js.map +1 -0
- package/dist/interface/crud/team-member-profiles.d.cts +229 -0
- package/dist/interface/crud/team-member-profiles.d.ts +20 -15
- package/dist/interface/crud/team-member-profiles.js +95 -49
- package/dist/interface/crud/team-member-profiles.js.map +1 -0
- package/dist/interface/crud/team-memberships.d.cts +74 -0
- package/dist/interface/crud/team-memberships.d.ts +22 -17
- package/dist/interface/crud/team-memberships.js +85 -45
- package/dist/interface/crud/team-memberships.js.map +1 -0
- package/dist/interface/crud/team-permissions.d.cts +168 -0
- package/dist/interface/crud/team-permissions.d.ts +38 -33
- package/dist/interface/crud/team-permissions.js +149 -91
- package/dist/interface/crud/team-permissions.js.map +1 -0
- package/dist/interface/crud/teams.d.cts +298 -0
- package/dist/interface/crud/teams.d.ts +45 -40
- package/dist/interface/crud/teams.js +177 -119
- package/dist/interface/crud/teams.js.map +1 -0
- package/dist/interface/crud/users.d.cts +469 -0
- package/dist/interface/crud/users.d.ts +31 -26
- package/dist/interface/crud/users.js +172 -118
- package/dist/interface/crud/users.js.map +1 -0
- package/dist/interface/serverInterface.d.cts +128 -0
- package/dist/interface/serverInterface.d.ts +29 -17
- package/dist/interface/serverInterface.js +506 -339
- package/dist/interface/serverInterface.js.map +1 -0
- package/dist/interface/webhooks.d.cts +292 -0
- package/dist/interface/webhooks.d.ts +6 -3
- package/dist/interface/webhooks.js +45 -15
- package/dist/interface/webhooks.js.map +1 -0
- package/dist/known-errors.d.cts +444 -0
- package/dist/known-errors.d.ts +12 -9
- package/dist/known-errors.js +1088 -561
- package/dist/known-errors.js.map +1 -0
- package/dist/schema-fields.d.cts +163 -0
- package/dist/schema-fields.d.ts +116 -114
- package/dist/schema-fields.js +593 -427
- package/dist/schema-fields.js.map +1 -0
- package/dist/sessions.d.cts +109 -0
- package/dist/sessions.d.ts +6 -3
- package/dist/sessions.js +201 -172
- package/dist/sessions.js.map +1 -0
- package/dist/utils/api-keys.d.cts +24 -0
- package/dist/utils/api-keys.d.ts +5 -4
- package/dist/utils/api-keys.js +106 -66
- package/dist/utils/api-keys.js.map +1 -0
- package/dist/utils/arrays.d.cts +18 -0
- package/dist/utils/arrays.d.ts +15 -13
- package/dist/utils/arrays.js +101 -168
- package/dist/utils/arrays.js.map +1 -0
- package/dist/utils/base64.d.cts +4 -0
- package/dist/utils/base64.d.ts +4 -2
- package/dist/utils/base64.js +41 -20
- package/dist/utils/base64.js.map +1 -0
- package/dist/utils/booleans.d.cts +6 -0
- package/dist/utils/booleans.d.ts +6 -4
- package/dist/utils/booleans.js +35 -27
- package/dist/utils/booleans.js.map +1 -0
- package/dist/utils/browser-compat.d.cts +8 -0
- package/dist/utils/browser-compat.d.ts +3 -1
- package/dist/utils/browser-compat.js +45 -16
- package/dist/utils/browser-compat.js.map +1 -0
- package/dist/utils/bytes.d.cts +15 -0
- package/dist/utils/bytes.d.ts +15 -13
- package/dist/utils/bytes.js +182 -270
- package/dist/utils/bytes.js.map +1 -0
- package/dist/utils/caches.d.cts +98 -0
- package/dist/utils/caches.d.ts +17 -14
- package/dist/utils/caches.js +188 -193
- package/dist/utils/caches.js.map +1 -0
- package/dist/utils/compile-time.d.cts +8 -0
- package/dist/utils/compile-time.d.ts +3 -1
- package/dist/utils/compile-time.js +35 -10
- package/dist/utils/compile-time.js.map +1 -0
- package/dist/utils/crypto.d.cts +8 -0
- package/dist/utils/crypto.d.ts +4 -2
- package/dist/utils/crypto.js +49 -21
- package/dist/utils/crypto.js.map +1 -0
- package/dist/utils/dates.d.cts +15 -0
- package/dist/utils/dates.d.ts +6 -4
- package/dist/utils/dates.js +83 -105
- package/dist/utils/dates.js.map +1 -0
- package/dist/utils/dom.d.cts +3 -0
- package/dist/utils/dom.d.ts +3 -1
- package/dist/utils/dom.js +35 -7
- package/dist/utils/dom.js.map +1 -0
- package/dist/utils/env.d.cts +9 -0
- package/dist/utils/env.d.ts +6 -4
- package/dist/utils/env.js +70 -43
- package/dist/utils/env.js.map +1 -0
- package/dist/utils/errors.d.cts +223 -0
- package/dist/utils/errors.d.ts +14 -11
- package/dist/utils/errors.js +148 -126
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/fs.d.cts +7 -0
- package/dist/utils/fs.d.ts +5 -3
- package/dist/utils/fs.js +70 -27
- package/dist/utils/fs.js.map +1 -0
- package/dist/utils/functions.d.cts +4 -0
- package/dist/utils/functions.d.ts +4 -2
- package/dist/utils/functions.js +35 -18
- package/dist/utils/functions.js.map +1 -0
- package/dist/utils/geo.d.cts +22 -0
- package/dist/utils/geo.d.ts +6 -3
- package/dist/utils/geo.js +39 -9
- package/dist/utils/geo.js.map +1 -0
- package/dist/utils/globals.d.cts +5 -0
- package/dist/utils/globals.d.ts +4 -2
- package/dist/utils/globals.js +41 -14
- package/dist/utils/globals.js.map +1 -0
- package/dist/utils/hashes.d.cts +7 -0
- package/dist/utils/hashes.d.ts +7 -5
- package/dist/utils/hashes.js +87 -41
- package/dist/utils/hashes.js.map +1 -0
- package/dist/utils/html.d.cts +4 -0
- package/dist/utils/html.d.ts +4 -2
- package/dist/utils/html.js +36 -37
- package/dist/utils/html.js.map +1 -0
- package/dist/utils/http.d.cts +43 -0
- package/dist/utils/http.d.ts +6 -4
- package/dist/utils/http.js +83 -83
- package/dist/utils/http.js.map +1 -0
- package/dist/utils/ips.d.cts +6 -0
- package/dist/utils/ips.d.ts +6 -4
- package/dist/utils/ips.js +48 -35
- package/dist/utils/ips.js.map +1 -0
- package/dist/utils/json.d.cts +13 -0
- package/dist/utils/json.d.ts +9 -6
- package/dist/utils/json.js +54 -157
- package/dist/utils/json.js.map +1 -0
- package/dist/utils/jwt.d.cts +44 -0
- package/dist/utils/jwt.d.ts +14 -11
- package/dist/utils/jwt.js +119 -84
- package/dist/utils/jwt.js.map +1 -0
- package/dist/utils/locks.d.cts +15 -0
- package/dist/utils/locks.d.ts +3 -2
- package/dist/utils/locks.js +76 -56
- package/dist/utils/locks.js.map +1 -0
- package/dist/utils/maps.d.cts +59 -0
- package/dist/utils/maps.d.ts +6 -4
- package/dist/utils/maps.js +207 -343
- package/dist/utils/maps.js.map +1 -0
- package/dist/utils/math.d.cts +6 -0
- package/dist/utils/math.d.ts +3 -1
- package/dist/utils/math.js +31 -16
- package/dist/utils/math.js.map +1 -0
- package/dist/utils/node-http.d.cts +15 -0
- package/dist/utils/node-http.d.ts +5 -5
- package/dist/utils/node-http.js +65 -36
- package/dist/utils/node-http.js.map +1 -0
- package/dist/utils/numbers.d.cts +5 -0
- package/dist/utils/numbers.d.ts +5 -3
- package/dist/utils/numbers.js +53 -66
- package/dist/utils/numbers.js.map +1 -0
- package/dist/utils/oauth.d.cts +8 -0
- package/dist/utils/oauth.d.ts +8 -6
- package/dist/utils/oauth.js +37 -4
- package/dist/utils/oauth.js.map +1 -0
- package/dist/utils/objects.d.cts +65 -0
- package/dist/utils/objects.d.ts +31 -30
- package/dist/utils/objects.js +196 -374
- package/dist/utils/objects.js.map +1 -0
- package/dist/utils/passkey.d.cts +1 -0
- package/dist/utils/passkey.d.ts +1 -1
- package/dist/utils/passkey.js +19 -1
- package/dist/utils/passkey.js.map +1 -0
- package/dist/utils/promises.d.cts +74 -0
- package/dist/utils/promises.d.ts +20 -18
- package/dist/utils/promises.js +252 -393
- package/dist/utils/promises.js.map +1 -0
- package/dist/utils/proxies.d.cts +4 -0
- package/dist/utils/proxies.d.ts +4 -2
- package/dist/utils/proxies.js +150 -161
- package/dist/utils/proxies.js.map +1 -0
- package/dist/utils/react.d.cts +25 -0
- package/dist/utils/react.d.ts +9 -6
- package/dist/utils/react.js +88 -134
- package/dist/utils/react.js.map +1 -0
- package/dist/utils/results.d.cts +78 -0
- package/dist/utils/results.d.ts +10 -9
- package/dist/utils/results.js +143 -324
- package/dist/utils/results.js.map +1 -0
- package/dist/utils/sentry.d.cts +5 -0
- package/dist/utils/sentry.d.ts +5 -2
- package/dist/utils/sentry.js +44 -14
- package/dist/utils/sentry.js.map +1 -0
- package/dist/utils/stores.d.cts +102 -0
- package/dist/utils/stores.d.ts +12 -9
- package/dist/utils/stores.js +219 -189
- package/dist/utils/stores.js.map +1 -0
- package/dist/utils/strings.d.cts +72 -0
- package/dist/utils/strings.d.ts +22 -20
- package/dist/utils/strings.js +299 -580
- package/dist/utils/strings.js.map +1 -0
- package/dist/utils/strings.nicify.test.d.cts +2 -0
- package/dist/utils/strings.nicify.test.d.ts +2 -1
- package/dist/utils/strings.nicify.test.js +168 -158
- package/dist/utils/strings.nicify.test.js.map +1 -0
- package/dist/utils/types.d.cts +23 -0
- package/dist/utils/types.d.ts +8 -6
- package/dist/utils/types.js +19 -1
- package/dist/utils/types.js.map +1 -0
- package/dist/utils/unicode.d.cts +3 -0
- package/dist/utils/unicode.d.ts +3 -1
- package/dist/utils/unicode.js +34 -21
- package/dist/utils/unicode.js.map +1 -0
- package/dist/utils/urls.d.cts +20 -0
- package/dist/utils/urls.d.ts +10 -8
- package/dist/utils/urls.js +76 -165
- package/dist/utils/urls.js.map +1 -0
- package/dist/utils/uuids.d.cts +4 -0
- package/dist/utils/uuids.d.ts +4 -2
- package/dist/utils/uuids.js +39 -35
- package/dist/utils/uuids.js.map +1 -0
- package/package.json +5 -5
|
@@ -1,54 +1,100 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/interface/crud/team-member-profiles.ts
|
|
31
|
+
var team_member_profiles_exports = {};
|
|
32
|
+
__export(team_member_profiles_exports, {
|
|
33
|
+
teamMemberProfilesCrud: () => teamMemberProfilesCrud,
|
|
34
|
+
teamMemberProfilesCrudClientReadSchema: () => teamMemberProfilesCrudClientReadSchema,
|
|
35
|
+
teamMemberProfilesCrudClientUpdateSchema: () => teamMemberProfilesCrudClientUpdateSchema,
|
|
36
|
+
teamMemberProfilesCrudServerReadSchema: () => teamMemberProfilesCrudServerReadSchema
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(team_member_profiles_exports);
|
|
39
|
+
var import_crud = require("../../crud");
|
|
40
|
+
var schemaFields = __toESM(require("../../schema-fields"), 1);
|
|
41
|
+
var import_schema_fields = require("../../schema-fields");
|
|
42
|
+
var import_users = require("./users");
|
|
43
|
+
var teamMemberProfilesCrudClientReadSchema = (0, import_schema_fields.yupObject)({
|
|
44
|
+
team_id: schemaFields.teamIdSchema.defined(),
|
|
45
|
+
user_id: schemaFields.userIdSchema.defined(),
|
|
46
|
+
display_name: schemaFields.teamMemberDisplayNameSchema.nullable().defined(),
|
|
47
|
+
profile_image_url: schemaFields.teamMemberProfileImageUrlSchema.nullable().defined()
|
|
10
48
|
}).defined();
|
|
11
|
-
|
|
12
|
-
|
|
49
|
+
var teamMemberProfilesCrudServerReadSchema = teamMemberProfilesCrudClientReadSchema.concat((0, import_schema_fields.yupObject)({
|
|
50
|
+
user: import_users.usersCrudServerReadSchema.defined()
|
|
13
51
|
})).defined();
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
52
|
+
var teamMemberProfilesCrudClientUpdateSchema = (0, import_schema_fields.yupObject)({
|
|
53
|
+
display_name: schemaFields.teamMemberDisplayNameSchema.optional(),
|
|
54
|
+
profile_image_url: schemaFields.teamMemberProfileImageUrlSchema.nullable().optional()
|
|
17
55
|
}).defined();
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
serverRead: {
|
|
39
|
-
summary: "Get a team member profile",
|
|
40
|
-
description: "Get a team member profile by user ID",
|
|
41
|
-
tags: ["Teams"],
|
|
42
|
-
},
|
|
43
|
-
clientUpdate: {
|
|
44
|
-
summary: "Update your team member profile",
|
|
45
|
-
description: "Update your own team member profile. `user_id` must be `me` in the path parameters on the client.",
|
|
46
|
-
tags: ["Teams"],
|
|
47
|
-
},
|
|
48
|
-
serverUpdate: {
|
|
49
|
-
summary: "Update a team member profile",
|
|
50
|
-
description: "Update a team member profile by user ID",
|
|
51
|
-
tags: ["Teams"],
|
|
52
|
-
},
|
|
56
|
+
var teamMemberProfilesCrud = (0, import_crud.createCrud)({
|
|
57
|
+
clientReadSchema: teamMemberProfilesCrudClientReadSchema,
|
|
58
|
+
serverReadSchema: teamMemberProfilesCrudServerReadSchema,
|
|
59
|
+
clientUpdateSchema: teamMemberProfilesCrudClientUpdateSchema,
|
|
60
|
+
docs: {
|
|
61
|
+
clientList: {
|
|
62
|
+
summary: "List team members profiles",
|
|
63
|
+
description: "List team members profiles. You always need to specify a `team_id` that your are a member of on the client. You can always filter for your own profile by setting `me` as the `user_id` in the path parameters. If you want list all the profiles in a team, you need to have the `$read_members` permission in that team.",
|
|
64
|
+
tags: ["Teams"]
|
|
65
|
+
},
|
|
66
|
+
serverList: {
|
|
67
|
+
summary: "List team members profiles",
|
|
68
|
+
description: "List team members profiles and filter by team ID and user ID",
|
|
69
|
+
tags: ["Teams"]
|
|
70
|
+
},
|
|
71
|
+
clientRead: {
|
|
72
|
+
summary: "Get a team member profile",
|
|
73
|
+
description: "Get a team member profile. you can always get your own profile by setting `me` as the `user_id` in the path parameters on the client. If you want to get someone else's profile in a team, you need to have the `$read_members` permission in that team.",
|
|
74
|
+
tags: ["Teams"]
|
|
53
75
|
},
|
|
76
|
+
serverRead: {
|
|
77
|
+
summary: "Get a team member profile",
|
|
78
|
+
description: "Get a team member profile by user ID",
|
|
79
|
+
tags: ["Teams"]
|
|
80
|
+
},
|
|
81
|
+
clientUpdate: {
|
|
82
|
+
summary: "Update your team member profile",
|
|
83
|
+
description: "Update your own team member profile. `user_id` must be `me` in the path parameters on the client.",
|
|
84
|
+
tags: ["Teams"]
|
|
85
|
+
},
|
|
86
|
+
serverUpdate: {
|
|
87
|
+
summary: "Update a team member profile",
|
|
88
|
+
description: "Update a team member profile by user ID",
|
|
89
|
+
tags: ["Teams"]
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
94
|
+
0 && (module.exports = {
|
|
95
|
+
teamMemberProfilesCrud,
|
|
96
|
+
teamMemberProfilesCrudClientReadSchema,
|
|
97
|
+
teamMemberProfilesCrudClientUpdateSchema,
|
|
98
|
+
teamMemberProfilesCrudServerReadSchema
|
|
54
99
|
});
|
|
100
|
+
//# sourceMappingURL=team-member-profiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/interface/crud/team-member-profiles.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport * as schemaFields from \"../../schema-fields\";\nimport { yupObject } from \"../../schema-fields\";\nimport { usersCrudServerReadSchema } from \"./users\";\n\n\nexport const teamMemberProfilesCrudClientReadSchema = yupObject({\n team_id: schemaFields.teamIdSchema.defined(),\n user_id: schemaFields.userIdSchema.defined(),\n display_name: schemaFields.teamMemberDisplayNameSchema.nullable().defined(),\n profile_image_url: schemaFields.teamMemberProfileImageUrlSchema.nullable().defined(),\n}).defined();\n\nexport const teamMemberProfilesCrudServerReadSchema = teamMemberProfilesCrudClientReadSchema.concat(yupObject({\n user: usersCrudServerReadSchema.defined(),\n})).defined();\n\nexport const teamMemberProfilesCrudClientUpdateSchema = yupObject({\n display_name: schemaFields.teamMemberDisplayNameSchema.optional(),\n profile_image_url: schemaFields.teamMemberProfileImageUrlSchema.nullable().optional(),\n}).defined();\n\nexport const teamMemberProfilesCrud = createCrud({\n clientReadSchema: teamMemberProfilesCrudClientReadSchema,\n serverReadSchema: teamMemberProfilesCrudServerReadSchema,\n clientUpdateSchema: teamMemberProfilesCrudClientUpdateSchema,\n docs: {\n clientList: {\n summary: \"List team members profiles\",\n description: \"List team members profiles. You always need to specify a `team_id` that your are a member of on the client. You can always filter for your own profile by setting `me` as the `user_id` in the path parameters. If you want list all the profiles in a team, you need to have the `$read_members` permission in that team.\",\n tags: [\"Teams\"],\n },\n serverList: {\n summary: \"List team members profiles\",\n description: \"List team members profiles and filter by team ID and user ID\",\n tags: [\"Teams\"],\n },\n clientRead: {\n summary: \"Get a team member profile\",\n description: \"Get a team member profile. you can always get your own profile by setting `me` as the `user_id` in the path parameters on the client. If you want to get someone else's profile in a team, you need to have the `$read_members` permission in that team.\",\n tags: [\"Teams\"],\n },\n serverRead: {\n summary: \"Get a team member profile\",\n description: \"Get a team member profile by user ID\",\n tags: [\"Teams\"],\n },\n clientUpdate: {\n summary: \"Update your team member profile\",\n description: \"Update your own team member profile. `user_id` must be `me` in the path parameters on the client.\",\n tags: [\"Teams\"],\n },\n serverUpdate: {\n summary: \"Update a team member profile\",\n description: \"Update a team member profile by user ID\",\n tags: [\"Teams\"],\n },\n },\n});\n\nexport type TeamMemberProfilesCrud = CrudTypeOf<typeof teamMemberProfilesCrud>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuC;AACvC,mBAA8B;AAC9B,2BAA0B;AAC1B,mBAA0C;AAGnC,IAAM,6CAAyC,gCAAU;AAAA,EAC9D,SAAsB,0BAAa,QAAQ;AAAA,EAC3C,SAAsB,0BAAa,QAAQ;AAAA,EAC3C,cAA2B,yCAA4B,SAAS,EAAE,QAAQ;AAAA,EAC1E,mBAAgC,6CAAgC,SAAS,EAAE,QAAQ;AACrF,CAAC,EAAE,QAAQ;AAEJ,IAAM,yCAAyC,uCAAuC,WAAO,gCAAU;AAAA,EAC5G,MAAM,uCAA0B,QAAQ;AAC1C,CAAC,CAAC,EAAE,QAAQ;AAEL,IAAM,+CAA2C,gCAAU;AAAA,EAChE,cAA2B,yCAA4B,SAAS;AAAA,EAChE,mBAAgC,6CAAgC,SAAS,EAAE,SAAS;AACtF,CAAC,EAAE,QAAQ;AAEJ,IAAM,6BAAyB,wBAAW;AAAA,EAC/C,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,YAAY;AAAA,MACV,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,EACF;AACF,CAAC;","names":[]}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.cjs';
|
|
2
|
+
import * as yup from 'yup';
|
|
3
|
+
import '../../utils/types.cjs';
|
|
4
|
+
|
|
5
|
+
declare const teamMembershipsCrudClientReadSchema: yup.ObjectSchema<{
|
|
6
|
+
team_id: string;
|
|
7
|
+
user_id: string;
|
|
8
|
+
}, yup.AnyObject, {
|
|
9
|
+
team_id: undefined;
|
|
10
|
+
user_id: undefined;
|
|
11
|
+
}, "">;
|
|
12
|
+
declare const teamMembershipsCrudServerCreateSchema: yup.ObjectSchema<{}, yup.AnyObject, {}, "">;
|
|
13
|
+
declare const teamMembershipsCrudClientDeleteSchema: yup.MixedSchema<{} | undefined, yup.AnyObject, undefined, "">;
|
|
14
|
+
declare const teamMembershipsCrud: CrudSchemaFromOptions<{
|
|
15
|
+
clientReadSchema: yup.ObjectSchema<{
|
|
16
|
+
team_id: string;
|
|
17
|
+
user_id: string;
|
|
18
|
+
}, yup.AnyObject, {
|
|
19
|
+
team_id: undefined;
|
|
20
|
+
user_id: undefined;
|
|
21
|
+
}, "">;
|
|
22
|
+
clientDeleteSchema: yup.MixedSchema<{} | undefined, yup.AnyObject, undefined, "">;
|
|
23
|
+
serverCreateSchema: yup.ObjectSchema<{}, yup.AnyObject, {}, "">;
|
|
24
|
+
docs: {
|
|
25
|
+
serverCreate: {
|
|
26
|
+
summary: string;
|
|
27
|
+
description: string;
|
|
28
|
+
tags: string[];
|
|
29
|
+
};
|
|
30
|
+
clientDelete: {
|
|
31
|
+
summary: string;
|
|
32
|
+
description: string;
|
|
33
|
+
tags: string[];
|
|
34
|
+
};
|
|
35
|
+
serverDelete: {
|
|
36
|
+
summary: string;
|
|
37
|
+
description: string;
|
|
38
|
+
tags: string[];
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
}>;
|
|
42
|
+
type TeamMembershipsCrud = CrudTypeOf<typeof teamMembershipsCrud>;
|
|
43
|
+
declare const teamMembershipCreatedWebhookEvent: {
|
|
44
|
+
type: string;
|
|
45
|
+
schema: yup.ObjectSchema<{
|
|
46
|
+
team_id: string;
|
|
47
|
+
user_id: string;
|
|
48
|
+
}, yup.AnyObject, {
|
|
49
|
+
team_id: undefined;
|
|
50
|
+
user_id: undefined;
|
|
51
|
+
}, "">;
|
|
52
|
+
metadata: {
|
|
53
|
+
summary: string;
|
|
54
|
+
description: string;
|
|
55
|
+
tags: string[];
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
declare const teamMembershipDeletedWebhookEvent: {
|
|
59
|
+
type: string;
|
|
60
|
+
schema: yup.ObjectSchema<{
|
|
61
|
+
team_id: string;
|
|
62
|
+
user_id: string;
|
|
63
|
+
}, yup.AnyObject, {
|
|
64
|
+
team_id: undefined;
|
|
65
|
+
user_id: undefined;
|
|
66
|
+
}, "">;
|
|
67
|
+
metadata: {
|
|
68
|
+
summary: string;
|
|
69
|
+
description: string;
|
|
70
|
+
tags: string[];
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export { type TeamMembershipsCrud, teamMembershipCreatedWebhookEvent, teamMembershipDeletedWebhookEvent, teamMembershipsCrud, teamMembershipsCrudClientDeleteSchema, teamMembershipsCrudClientReadSchema, teamMembershipsCrudServerCreateSchema };
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
import { CrudTypeOf } from
|
|
2
|
-
|
|
1
|
+
import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.js';
|
|
2
|
+
import * as yup from 'yup';
|
|
3
|
+
import '../../utils/types.js';
|
|
4
|
+
|
|
5
|
+
declare const teamMembershipsCrudClientReadSchema: yup.ObjectSchema<{
|
|
3
6
|
team_id: string;
|
|
4
7
|
user_id: string;
|
|
5
|
-
},
|
|
8
|
+
}, yup.AnyObject, {
|
|
6
9
|
team_id: undefined;
|
|
7
10
|
user_id: undefined;
|
|
8
11
|
}, "">;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
clientReadSchema:
|
|
12
|
+
declare const teamMembershipsCrudServerCreateSchema: yup.ObjectSchema<{}, yup.AnyObject, {}, "">;
|
|
13
|
+
declare const teamMembershipsCrudClientDeleteSchema: yup.MixedSchema<{} | undefined, yup.AnyObject, undefined, "">;
|
|
14
|
+
declare const teamMembershipsCrud: CrudSchemaFromOptions<{
|
|
15
|
+
clientReadSchema: yup.ObjectSchema<{
|
|
13
16
|
team_id: string;
|
|
14
17
|
user_id: string;
|
|
15
|
-
},
|
|
18
|
+
}, yup.AnyObject, {
|
|
16
19
|
team_id: undefined;
|
|
17
20
|
user_id: undefined;
|
|
18
21
|
}, "">;
|
|
19
|
-
clientDeleteSchema:
|
|
20
|
-
serverCreateSchema:
|
|
22
|
+
clientDeleteSchema: yup.MixedSchema<{} | undefined, yup.AnyObject, undefined, "">;
|
|
23
|
+
serverCreateSchema: yup.ObjectSchema<{}, yup.AnyObject, {}, "">;
|
|
21
24
|
docs: {
|
|
22
25
|
serverCreate: {
|
|
23
26
|
summary: string;
|
|
@@ -36,13 +39,13 @@ export declare const teamMembershipsCrud: import("../../crud").CrudSchemaFromOpt
|
|
|
36
39
|
};
|
|
37
40
|
};
|
|
38
41
|
}>;
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
type TeamMembershipsCrud = CrudTypeOf<typeof teamMembershipsCrud>;
|
|
43
|
+
declare const teamMembershipCreatedWebhookEvent: {
|
|
41
44
|
type: string;
|
|
42
|
-
schema:
|
|
45
|
+
schema: yup.ObjectSchema<{
|
|
43
46
|
team_id: string;
|
|
44
47
|
user_id: string;
|
|
45
|
-
},
|
|
48
|
+
}, yup.AnyObject, {
|
|
46
49
|
team_id: undefined;
|
|
47
50
|
user_id: undefined;
|
|
48
51
|
}, "">;
|
|
@@ -52,12 +55,12 @@ export declare const teamMembershipCreatedWebhookEvent: {
|
|
|
52
55
|
tags: string[];
|
|
53
56
|
};
|
|
54
57
|
};
|
|
55
|
-
|
|
58
|
+
declare const teamMembershipDeletedWebhookEvent: {
|
|
56
59
|
type: string;
|
|
57
|
-
schema:
|
|
60
|
+
schema: yup.ObjectSchema<{
|
|
58
61
|
team_id: string;
|
|
59
62
|
user_id: string;
|
|
60
|
-
},
|
|
63
|
+
}, yup.AnyObject, {
|
|
61
64
|
team_id: undefined;
|
|
62
65
|
user_id: undefined;
|
|
63
66
|
}, "">;
|
|
@@ -67,3 +70,5 @@ export declare const teamMembershipDeletedWebhookEvent: {
|
|
|
67
70
|
tags: string[];
|
|
68
71
|
};
|
|
69
72
|
};
|
|
73
|
+
|
|
74
|
+
export { type TeamMembershipsCrud, teamMembershipCreatedWebhookEvent, teamMembershipDeletedWebhookEvent, teamMembershipsCrud, teamMembershipsCrudClientDeleteSchema, teamMembershipsCrudClientReadSchema, teamMembershipsCrudServerCreateSchema };
|
|
@@ -1,50 +1,90 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/interface/crud/team-memberships.ts
|
|
21
|
+
var team_memberships_exports = {};
|
|
22
|
+
__export(team_memberships_exports, {
|
|
23
|
+
teamMembershipCreatedWebhookEvent: () => teamMembershipCreatedWebhookEvent,
|
|
24
|
+
teamMembershipDeletedWebhookEvent: () => teamMembershipDeletedWebhookEvent,
|
|
25
|
+
teamMembershipsCrud: () => teamMembershipsCrud,
|
|
26
|
+
teamMembershipsCrudClientDeleteSchema: () => teamMembershipsCrudClientDeleteSchema,
|
|
27
|
+
teamMembershipsCrudClientReadSchema: () => teamMembershipsCrudClientReadSchema,
|
|
28
|
+
teamMembershipsCrudServerCreateSchema: () => teamMembershipsCrudServerCreateSchema
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(team_memberships_exports);
|
|
31
|
+
var import_crud = require("../../crud");
|
|
32
|
+
var import_schema_fields = require("../../schema-fields");
|
|
33
|
+
var teamMembershipsCrudClientReadSchema = (0, import_schema_fields.yupObject)({
|
|
34
|
+
team_id: (0, import_schema_fields.yupString)().defined(),
|
|
35
|
+
user_id: (0, import_schema_fields.yupString)().defined()
|
|
6
36
|
}).defined();
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
clientDelete: {
|
|
22
|
-
summary: "Remove a user from a team",
|
|
23
|
-
description: "All the users are allowed to remove themselves from a team (`user_id=me`). Only the users who have the `$remove_members` permission are allowed to remove other users from a team. `team_id` is must an ID of a team that the user is a member of.",
|
|
24
|
-
tags: ["Teams"],
|
|
25
|
-
},
|
|
26
|
-
serverDelete: {
|
|
27
|
-
summary: "Remove a user from a team",
|
|
28
|
-
description: "",
|
|
29
|
-
tags: ["Teams"],
|
|
30
|
-
},
|
|
37
|
+
var teamMembershipsCrudServerCreateSchema = (0, import_schema_fields.yupObject)({}).defined();
|
|
38
|
+
var teamMembershipsCrudClientDeleteSchema = (0, import_schema_fields.yupMixed)();
|
|
39
|
+
var teamMembershipsCrud = (0, import_crud.createCrud)({
|
|
40
|
+
// Client
|
|
41
|
+
clientReadSchema: teamMembershipsCrudClientReadSchema,
|
|
42
|
+
clientDeleteSchema: teamMembershipsCrudClientDeleteSchema,
|
|
43
|
+
// Server
|
|
44
|
+
serverCreateSchema: teamMembershipsCrudServerCreateSchema,
|
|
45
|
+
docs: {
|
|
46
|
+
serverCreate: {
|
|
47
|
+
summary: "Add a user to a team",
|
|
48
|
+
description: "",
|
|
49
|
+
tags: ["Teams"]
|
|
31
50
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
metadata: {
|
|
37
|
-
summary: "Team Membership Created",
|
|
38
|
-
description: "This event is triggered when a user is added to a team.",
|
|
39
|
-
tags: ["Teams"],
|
|
51
|
+
clientDelete: {
|
|
52
|
+
summary: "Remove a user from a team",
|
|
53
|
+
description: "All the users are allowed to remove themselves from a team (`user_id=me`). Only the users who have the `$remove_members` permission are allowed to remove other users from a team. `team_id` is must an ID of a team that the user is a member of.",
|
|
54
|
+
tags: ["Teams"]
|
|
40
55
|
},
|
|
56
|
+
serverDelete: {
|
|
57
|
+
summary: "Remove a user from a team",
|
|
58
|
+
description: "",
|
|
59
|
+
tags: ["Teams"]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
var teamMembershipCreatedWebhookEvent = {
|
|
64
|
+
type: "team_membership.created",
|
|
65
|
+
schema: teamMembershipsCrud.server.readSchema,
|
|
66
|
+
metadata: {
|
|
67
|
+
summary: "Team Membership Created",
|
|
68
|
+
description: "This event is triggered when a user is added to a team.",
|
|
69
|
+
tags: ["Teams"]
|
|
70
|
+
}
|
|
41
71
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
72
|
+
var teamMembershipDeletedWebhookEvent = {
|
|
73
|
+
type: "team_membership.deleted",
|
|
74
|
+
schema: teamMembershipsCrud.server.readSchema,
|
|
75
|
+
metadata: {
|
|
76
|
+
summary: "Team Membership Deleted",
|
|
77
|
+
description: "This event is triggered when a user is removed from a team.",
|
|
78
|
+
tags: ["Teams"]
|
|
79
|
+
}
|
|
50
80
|
};
|
|
81
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
82
|
+
0 && (module.exports = {
|
|
83
|
+
teamMembershipCreatedWebhookEvent,
|
|
84
|
+
teamMembershipDeletedWebhookEvent,
|
|
85
|
+
teamMembershipsCrud,
|
|
86
|
+
teamMembershipsCrudClientDeleteSchema,
|
|
87
|
+
teamMembershipsCrudClientReadSchema,
|
|
88
|
+
teamMembershipsCrudServerCreateSchema
|
|
89
|
+
});
|
|
90
|
+
//# sourceMappingURL=team-memberships.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/interface/crud/team-memberships.ts"],"sourcesContent":["import { CrudTypeOf, createCrud } from \"../../crud\";\nimport { yupMixed, yupObject, yupString } from \"../../schema-fields\";\nimport { WebhookEvent } from \"../webhooks\";\n\nexport const teamMembershipsCrudClientReadSchema = yupObject({\n team_id: yupString().defined(),\n user_id: yupString().defined(),\n}).defined();\nexport const teamMembershipsCrudServerCreateSchema = yupObject({}).defined();\nexport const teamMembershipsCrudClientDeleteSchema = yupMixed();\n\nexport const teamMembershipsCrud = createCrud({\n // Client\n clientReadSchema: teamMembershipsCrudClientReadSchema,\n clientDeleteSchema: teamMembershipsCrudClientDeleteSchema,\n // Server\n serverCreateSchema: teamMembershipsCrudServerCreateSchema,\n docs: {\n serverCreate: {\n summary: \"Add a user to a team\",\n description: \"\",\n tags: [\"Teams\"],\n },\n clientDelete: {\n summary: \"Remove a user from a team\",\n description: \"All the users are allowed to remove themselves from a team (`user_id=me`). Only the users who have the `$remove_members` permission are allowed to remove other users from a team. `team_id` is must an ID of a team that the user is a member of.\",\n tags: [\"Teams\"],\n },\n serverDelete: {\n summary: \"Remove a user from a team\",\n description: \"\",\n tags: [\"Teams\"],\n },\n },\n});\nexport type TeamMembershipsCrud = CrudTypeOf<typeof teamMembershipsCrud>;\n\nexport const teamMembershipCreatedWebhookEvent = {\n type: \"team_membership.created\",\n schema: teamMembershipsCrud.server.readSchema,\n metadata: {\n summary: \"Team Membership Created\",\n description: \"This event is triggered when a user is added to a team.\",\n tags: [\"Teams\"],\n },\n} satisfies WebhookEvent<typeof teamMembershipsCrud.server.readSchema>;\n\nexport const teamMembershipDeletedWebhookEvent = {\n type: \"team_membership.deleted\",\n schema: teamMembershipsCrud.server.readSchema,\n metadata: {\n summary: \"Team Membership Deleted\",\n description: \"This event is triggered when a user is removed from a team.\",\n tags: [\"Teams\"],\n },\n} satisfies WebhookEvent<typeof teamMembershipsCrud.server.readSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuC;AACvC,2BAA+C;AAGxC,IAAM,0CAAsC,gCAAU;AAAA,EAC3D,aAAS,gCAAU,EAAE,QAAQ;AAAA,EAC7B,aAAS,gCAAU,EAAE,QAAQ;AAC/B,CAAC,EAAE,QAAQ;AACJ,IAAM,4CAAwC,gCAAU,CAAC,CAAC,EAAE,QAAQ;AACpE,IAAM,4CAAwC,+BAAS;AAEvD,IAAM,0BAAsB,wBAAW;AAAA;AAAA,EAE5C,kBAAkB;AAAA,EAClB,oBAAoB;AAAA;AAAA,EAEpB,oBAAoB;AAAA,EACpB,MAAM;AAAA,IACJ,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,IACA,cAAc;AAAA,MACZ,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,CAAC,OAAO;AAAA,IAChB;AAAA,EACF;AACF,CAAC;AAGM,IAAM,oCAAoC;AAAA,EAC/C,MAAM;AAAA,EACN,QAAQ,oBAAoB,OAAO;AAAA,EACnC,UAAU;AAAA,IACR,SAAS;AAAA,IACT,aAAa;AAAA,IACb,MAAM,CAAC,OAAO;AAAA,EAChB;AACF;AAEO,IAAM,oCAAoC;AAAA,EAC/C,MAAM;AAAA,EACN,QAAQ,oBAAoB,OAAO;AAAA,EACnC,UAAU;AAAA,IACR,SAAS;AAAA,IACT,aAAa;AAAA,IACb,MAAM,CAAC,OAAO;AAAA,EAChB;AACF;","names":[]}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.cjs';
|
|
2
|
+
import * as yup from 'yup';
|
|
3
|
+
import '../../utils/types.cjs';
|
|
4
|
+
|
|
5
|
+
declare const teamPermissionsCrudClientReadSchema: yup.ObjectSchema<{
|
|
6
|
+
id: string;
|
|
7
|
+
user_id: string;
|
|
8
|
+
team_id: string;
|
|
9
|
+
}, yup.AnyObject, {
|
|
10
|
+
id: undefined;
|
|
11
|
+
user_id: undefined;
|
|
12
|
+
team_id: undefined;
|
|
13
|
+
}, "">;
|
|
14
|
+
declare const teamPermissionsCrudServerCreateSchema: yup.ObjectSchema<{}, yup.AnyObject, {}, "">;
|
|
15
|
+
declare const teamPermissionsCrudServerDeleteSchema: yup.MixedSchema<{} | undefined, yup.AnyObject, undefined, "">;
|
|
16
|
+
declare const teamPermissionsCrud: CrudSchemaFromOptions<{
|
|
17
|
+
clientReadSchema: yup.ObjectSchema<{
|
|
18
|
+
id: string;
|
|
19
|
+
user_id: string;
|
|
20
|
+
team_id: string;
|
|
21
|
+
}, yup.AnyObject, {
|
|
22
|
+
id: undefined;
|
|
23
|
+
user_id: undefined;
|
|
24
|
+
team_id: undefined;
|
|
25
|
+
}, "">;
|
|
26
|
+
serverCreateSchema: yup.ObjectSchema<{}, yup.AnyObject, {}, "">;
|
|
27
|
+
serverDeleteSchema: yup.MixedSchema<{} | undefined, yup.AnyObject, undefined, "">;
|
|
28
|
+
docs: {
|
|
29
|
+
clientList: {
|
|
30
|
+
summary: string;
|
|
31
|
+
description: string;
|
|
32
|
+
tags: string[];
|
|
33
|
+
};
|
|
34
|
+
serverList: {
|
|
35
|
+
summary: string;
|
|
36
|
+
description: string;
|
|
37
|
+
tags: string[];
|
|
38
|
+
};
|
|
39
|
+
serverCreate: {
|
|
40
|
+
summary: string;
|
|
41
|
+
description: string;
|
|
42
|
+
tags: string[];
|
|
43
|
+
};
|
|
44
|
+
serverDelete: {
|
|
45
|
+
summary: string;
|
|
46
|
+
description: string;
|
|
47
|
+
tags: string[];
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
}>;
|
|
51
|
+
type TeamPermissionsCrud = CrudTypeOf<typeof teamPermissionsCrud>;
|
|
52
|
+
declare const teamPermissionCreatedWebhookEvent: {
|
|
53
|
+
type: string;
|
|
54
|
+
schema: yup.ObjectSchema<{
|
|
55
|
+
id: string;
|
|
56
|
+
user_id: string;
|
|
57
|
+
team_id: string;
|
|
58
|
+
}, yup.AnyObject, {
|
|
59
|
+
id: undefined;
|
|
60
|
+
user_id: undefined;
|
|
61
|
+
team_id: undefined;
|
|
62
|
+
}, "">;
|
|
63
|
+
metadata: {
|
|
64
|
+
summary: string;
|
|
65
|
+
description: string;
|
|
66
|
+
tags: string[];
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
declare const teamPermissionDeletedWebhookEvent: {
|
|
70
|
+
type: string;
|
|
71
|
+
schema: yup.ObjectSchema<{
|
|
72
|
+
id: string;
|
|
73
|
+
user_id: string;
|
|
74
|
+
team_id: string;
|
|
75
|
+
}, yup.AnyObject, {
|
|
76
|
+
id: undefined;
|
|
77
|
+
user_id: undefined;
|
|
78
|
+
team_id: undefined;
|
|
79
|
+
}, "">;
|
|
80
|
+
metadata: {
|
|
81
|
+
summary: string;
|
|
82
|
+
description: string;
|
|
83
|
+
tags: string[];
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
declare const teamPermissionDefinitionsCrudAdminReadSchema: yup.ObjectSchema<{
|
|
87
|
+
id: string;
|
|
88
|
+
description: string | undefined;
|
|
89
|
+
contained_permission_ids: string[];
|
|
90
|
+
}, yup.AnyObject, {
|
|
91
|
+
id: undefined;
|
|
92
|
+
description: undefined;
|
|
93
|
+
contained_permission_ids: undefined;
|
|
94
|
+
}, "">;
|
|
95
|
+
declare const teamPermissionDefinitionsCrudAdminCreateSchema: yup.ObjectSchema<{
|
|
96
|
+
id: string;
|
|
97
|
+
description: string | undefined;
|
|
98
|
+
contained_permission_ids: string[] | undefined;
|
|
99
|
+
}, yup.AnyObject, {
|
|
100
|
+
id: undefined;
|
|
101
|
+
description: undefined;
|
|
102
|
+
contained_permission_ids: undefined;
|
|
103
|
+
}, "">;
|
|
104
|
+
declare const teamPermissionDefinitionsCrudAdminUpdateSchema: yup.ObjectSchema<{
|
|
105
|
+
id: string | undefined;
|
|
106
|
+
description: string | undefined;
|
|
107
|
+
contained_permission_ids: string[] | undefined;
|
|
108
|
+
}, yup.AnyObject, {
|
|
109
|
+
id: undefined;
|
|
110
|
+
description: undefined;
|
|
111
|
+
contained_permission_ids: undefined;
|
|
112
|
+
}, "">;
|
|
113
|
+
declare const teamPermissionDefinitionsCrudAdminDeleteSchema: yup.MixedSchema<{} | undefined, yup.AnyObject, undefined, "">;
|
|
114
|
+
declare const teamPermissionDefinitionsCrud: CrudSchemaFromOptions<{
|
|
115
|
+
adminReadSchema: yup.ObjectSchema<{
|
|
116
|
+
id: string;
|
|
117
|
+
description: string | undefined;
|
|
118
|
+
contained_permission_ids: string[];
|
|
119
|
+
}, yup.AnyObject, {
|
|
120
|
+
id: undefined;
|
|
121
|
+
description: undefined;
|
|
122
|
+
contained_permission_ids: undefined;
|
|
123
|
+
}, "">;
|
|
124
|
+
adminCreateSchema: yup.ObjectSchema<{
|
|
125
|
+
id: string;
|
|
126
|
+
description: string | undefined;
|
|
127
|
+
contained_permission_ids: string[] | undefined;
|
|
128
|
+
}, yup.AnyObject, {
|
|
129
|
+
id: undefined;
|
|
130
|
+
description: undefined;
|
|
131
|
+
contained_permission_ids: undefined;
|
|
132
|
+
}, "">;
|
|
133
|
+
adminUpdateSchema: yup.ObjectSchema<{
|
|
134
|
+
id: string | undefined;
|
|
135
|
+
description: string | undefined;
|
|
136
|
+
contained_permission_ids: string[] | undefined;
|
|
137
|
+
}, yup.AnyObject, {
|
|
138
|
+
id: undefined;
|
|
139
|
+
description: undefined;
|
|
140
|
+
contained_permission_ids: undefined;
|
|
141
|
+
}, "">;
|
|
142
|
+
adminDeleteSchema: yup.MixedSchema<{} | undefined, yup.AnyObject, undefined, "">;
|
|
143
|
+
docs: {
|
|
144
|
+
adminList: {
|
|
145
|
+
summary: string;
|
|
146
|
+
description: string;
|
|
147
|
+
tags: string[];
|
|
148
|
+
};
|
|
149
|
+
adminCreate: {
|
|
150
|
+
summary: string;
|
|
151
|
+
description: string;
|
|
152
|
+
tags: string[];
|
|
153
|
+
};
|
|
154
|
+
adminUpdate: {
|
|
155
|
+
summary: string;
|
|
156
|
+
description: string;
|
|
157
|
+
tags: string[];
|
|
158
|
+
};
|
|
159
|
+
adminDelete: {
|
|
160
|
+
summary: string;
|
|
161
|
+
description: string;
|
|
162
|
+
tags: string[];
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
}>;
|
|
166
|
+
type TeamPermissionDefinitionsCrud = CrudTypeOf<typeof teamPermissionDefinitionsCrud>;
|
|
167
|
+
|
|
168
|
+
export { type TeamPermissionDefinitionsCrud, type TeamPermissionsCrud, teamPermissionCreatedWebhookEvent, teamPermissionDefinitionsCrud, teamPermissionDefinitionsCrudAdminCreateSchema, teamPermissionDefinitionsCrudAdminDeleteSchema, teamPermissionDefinitionsCrudAdminReadSchema, teamPermissionDefinitionsCrudAdminUpdateSchema, teamPermissionDeletedWebhookEvent, teamPermissionsCrud, teamPermissionsCrudClientReadSchema, teamPermissionsCrudServerCreateSchema, teamPermissionsCrudServerDeleteSchema };
|