@stackframe/stack-shared 2.8.8 → 2.8.11
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 +14 -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 +729 -0
- package/dist/config/schema.d.ts +59 -51
- package/dist/config/schema.js +232 -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 +201 -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 +180 -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 +1238 -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 +177 -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 +295 -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 +20 -12
- 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 +627 -0
- package/dist/interface/crud/projects.d.ts +43 -51
- package/dist/interface/crud/projects.js +210 -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 +447 -0
- package/dist/known-errors.d.ts +15 -9
- package/dist/known-errors.js +1104 -562
- 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 +69 -0
- package/dist/utils/objects.d.ts +37 -32
- package/dist/utils/objects.js +224 -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 +300 -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
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.cjs';
|
|
2
|
+
import * as yup from 'yup';
|
|
3
|
+
import '../../utils/types.cjs';
|
|
4
|
+
|
|
5
|
+
declare const userApiKeysCrud: CrudSchemaFromOptions<{
|
|
6
|
+
clientReadSchema: yup.ObjectSchema<{
|
|
7
|
+
id: string;
|
|
8
|
+
description: string;
|
|
9
|
+
expires_at_millis: number | undefined;
|
|
10
|
+
manually_revoked_at_millis: number | undefined;
|
|
11
|
+
created_at_millis: number;
|
|
12
|
+
is_public: boolean;
|
|
13
|
+
value: {
|
|
14
|
+
last_four: string;
|
|
15
|
+
};
|
|
16
|
+
type: "user";
|
|
17
|
+
user_id: string;
|
|
18
|
+
}, yup.AnyObject, {
|
|
19
|
+
id: undefined;
|
|
20
|
+
description: undefined;
|
|
21
|
+
expires_at_millis: undefined;
|
|
22
|
+
manually_revoked_at_millis: undefined;
|
|
23
|
+
created_at_millis: undefined;
|
|
24
|
+
is_public: undefined;
|
|
25
|
+
value: {
|
|
26
|
+
last_four: undefined;
|
|
27
|
+
};
|
|
28
|
+
type: undefined;
|
|
29
|
+
user_id: undefined;
|
|
30
|
+
}, "">;
|
|
31
|
+
clientUpdateSchema: yup.ObjectSchema<{
|
|
32
|
+
description: string | undefined;
|
|
33
|
+
revoked: boolean | undefined;
|
|
34
|
+
}, yup.AnyObject, {
|
|
35
|
+
description: undefined;
|
|
36
|
+
revoked: undefined;
|
|
37
|
+
}, "">;
|
|
38
|
+
docs: {
|
|
39
|
+
clientCreate: {
|
|
40
|
+
description: string;
|
|
41
|
+
displayName: string;
|
|
42
|
+
summary: string;
|
|
43
|
+
};
|
|
44
|
+
clientList: {
|
|
45
|
+
description: string;
|
|
46
|
+
displayName: string;
|
|
47
|
+
summary: string;
|
|
48
|
+
};
|
|
49
|
+
clientRead: {
|
|
50
|
+
description: string;
|
|
51
|
+
displayName: string;
|
|
52
|
+
summary: string;
|
|
53
|
+
};
|
|
54
|
+
clientUpdate: {
|
|
55
|
+
description: string;
|
|
56
|
+
displayName: string;
|
|
57
|
+
summary: string;
|
|
58
|
+
};
|
|
59
|
+
serverDelete: {
|
|
60
|
+
description: string;
|
|
61
|
+
displayName: string;
|
|
62
|
+
summary: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
}>;
|
|
66
|
+
declare const userApiKeysCreateInputSchema: yup.ObjectSchema<{
|
|
67
|
+
description: string;
|
|
68
|
+
expires_at_millis: number | null;
|
|
69
|
+
is_public: boolean | undefined;
|
|
70
|
+
user_id: string;
|
|
71
|
+
}, yup.AnyObject, {
|
|
72
|
+
description: undefined;
|
|
73
|
+
expires_at_millis: undefined;
|
|
74
|
+
is_public: undefined;
|
|
75
|
+
user_id: undefined;
|
|
76
|
+
}, "">;
|
|
77
|
+
declare const userApiKeysCreateOutputSchema: yup.ObjectSchema<{
|
|
78
|
+
type: "user";
|
|
79
|
+
description: string;
|
|
80
|
+
id: string;
|
|
81
|
+
created_at_millis: number;
|
|
82
|
+
expires_at_millis: number | undefined;
|
|
83
|
+
manually_revoked_at_millis: number | undefined;
|
|
84
|
+
user_id: string;
|
|
85
|
+
is_public: boolean;
|
|
86
|
+
} & {
|
|
87
|
+
value: string;
|
|
88
|
+
}, yup.AnyObject, {
|
|
89
|
+
id: undefined;
|
|
90
|
+
description: undefined;
|
|
91
|
+
expires_at_millis: undefined;
|
|
92
|
+
manually_revoked_at_millis: undefined;
|
|
93
|
+
created_at_millis: undefined;
|
|
94
|
+
is_public: undefined;
|
|
95
|
+
value: undefined;
|
|
96
|
+
type: undefined;
|
|
97
|
+
user_id: undefined;
|
|
98
|
+
}, "">;
|
|
99
|
+
type UserApiKeysCrud = CrudTypeOf<typeof userApiKeysCrud>;
|
|
100
|
+
declare const teamApiKeysCrud: CrudSchemaFromOptions<{
|
|
101
|
+
clientReadSchema: yup.ObjectSchema<{
|
|
102
|
+
id: string;
|
|
103
|
+
description: string;
|
|
104
|
+
expires_at_millis: number | undefined;
|
|
105
|
+
manually_revoked_at_millis: number | undefined;
|
|
106
|
+
created_at_millis: number;
|
|
107
|
+
is_public: boolean;
|
|
108
|
+
value: {
|
|
109
|
+
last_four: string;
|
|
110
|
+
};
|
|
111
|
+
type: "team";
|
|
112
|
+
team_id: string;
|
|
113
|
+
}, yup.AnyObject, {
|
|
114
|
+
id: undefined;
|
|
115
|
+
description: undefined;
|
|
116
|
+
expires_at_millis: undefined;
|
|
117
|
+
manually_revoked_at_millis: undefined;
|
|
118
|
+
created_at_millis: undefined;
|
|
119
|
+
is_public: undefined;
|
|
120
|
+
value: {
|
|
121
|
+
last_four: undefined;
|
|
122
|
+
};
|
|
123
|
+
type: undefined;
|
|
124
|
+
team_id: undefined;
|
|
125
|
+
}, "">;
|
|
126
|
+
clientUpdateSchema: yup.ObjectSchema<{
|
|
127
|
+
description: string | undefined;
|
|
128
|
+
revoked: boolean | undefined;
|
|
129
|
+
}, yup.AnyObject, {
|
|
130
|
+
description: undefined;
|
|
131
|
+
revoked: undefined;
|
|
132
|
+
}, "">;
|
|
133
|
+
docs: {
|
|
134
|
+
clientCreate: {
|
|
135
|
+
description: string;
|
|
136
|
+
displayName: string;
|
|
137
|
+
summary: string;
|
|
138
|
+
};
|
|
139
|
+
clientList: {
|
|
140
|
+
description: string;
|
|
141
|
+
displayName: string;
|
|
142
|
+
summary: string;
|
|
143
|
+
};
|
|
144
|
+
clientRead: {
|
|
145
|
+
description: string;
|
|
146
|
+
displayName: string;
|
|
147
|
+
summary: string;
|
|
148
|
+
};
|
|
149
|
+
clientUpdate: {
|
|
150
|
+
description: string;
|
|
151
|
+
displayName: string;
|
|
152
|
+
summary: string;
|
|
153
|
+
};
|
|
154
|
+
serverDelete: {
|
|
155
|
+
description: string;
|
|
156
|
+
displayName: string;
|
|
157
|
+
summary: string;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
}>;
|
|
161
|
+
declare const teamApiKeysCreateInputSchema: yup.ObjectSchema<{
|
|
162
|
+
description: string;
|
|
163
|
+
expires_at_millis: number | null;
|
|
164
|
+
is_public: boolean | undefined;
|
|
165
|
+
team_id: string;
|
|
166
|
+
}, yup.AnyObject, {
|
|
167
|
+
description: undefined;
|
|
168
|
+
expires_at_millis: undefined;
|
|
169
|
+
is_public: undefined;
|
|
170
|
+
team_id: undefined;
|
|
171
|
+
}, "">;
|
|
172
|
+
declare const teamApiKeysCreateOutputSchema: yup.ObjectSchema<{
|
|
173
|
+
type: "team";
|
|
174
|
+
description: string;
|
|
175
|
+
id: string;
|
|
176
|
+
created_at_millis: number;
|
|
177
|
+
expires_at_millis: number | undefined;
|
|
178
|
+
manually_revoked_at_millis: number | undefined;
|
|
179
|
+
team_id: string;
|
|
180
|
+
is_public: boolean;
|
|
181
|
+
} & {
|
|
182
|
+
value: string;
|
|
183
|
+
}, yup.AnyObject, {
|
|
184
|
+
id: undefined;
|
|
185
|
+
description: undefined;
|
|
186
|
+
expires_at_millis: undefined;
|
|
187
|
+
manually_revoked_at_millis: undefined;
|
|
188
|
+
created_at_millis: undefined;
|
|
189
|
+
is_public: undefined;
|
|
190
|
+
value: undefined;
|
|
191
|
+
type: undefined;
|
|
192
|
+
team_id: undefined;
|
|
193
|
+
}, "">;
|
|
194
|
+
type TeamApiKeysCrud = CrudTypeOf<typeof teamApiKeysCrud>;
|
|
195
|
+
|
|
196
|
+
export { type TeamApiKeysCrud, type UserApiKeysCrud, teamApiKeysCreateInputSchema, teamApiKeysCreateOutputSchema, teamApiKeysCrud, userApiKeysCreateInputSchema, userApiKeysCreateOutputSchema, userApiKeysCrud };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.js';
|
|
2
|
+
import * as yup from 'yup';
|
|
3
|
+
import '../../utils/types.js';
|
|
4
|
+
|
|
5
|
+
declare const userApiKeysCrud: CrudSchemaFromOptions<{
|
|
4
6
|
clientReadSchema: yup.ObjectSchema<{
|
|
5
7
|
id: string;
|
|
6
8
|
description: string;
|
|
@@ -60,7 +62,8 @@ export declare const userApiKeysCrud: import("../../crud").CrudSchemaFromOptions
|
|
|
60
62
|
summary: string;
|
|
61
63
|
};
|
|
62
64
|
};
|
|
63
|
-
}
|
|
65
|
+
}>;
|
|
66
|
+
declare const userApiKeysCreateInputSchema: yup.ObjectSchema<{
|
|
64
67
|
description: string;
|
|
65
68
|
expires_at_millis: number | null;
|
|
66
69
|
is_public: boolean | undefined;
|
|
@@ -70,10 +73,11 @@ export declare const userApiKeysCrud: import("../../crud").CrudSchemaFromOptions
|
|
|
70
73
|
expires_at_millis: undefined;
|
|
71
74
|
is_public: undefined;
|
|
72
75
|
user_id: undefined;
|
|
73
|
-
}, ""
|
|
74
|
-
|
|
76
|
+
}, "">;
|
|
77
|
+
declare const userApiKeysCreateOutputSchema: yup.ObjectSchema<{
|
|
75
78
|
type: "user";
|
|
76
79
|
description: string;
|
|
80
|
+
id: string;
|
|
77
81
|
created_at_millis: number;
|
|
78
82
|
expires_at_millis: number | undefined;
|
|
79
83
|
manually_revoked_at_millis: number | undefined;
|
|
@@ -92,8 +96,8 @@ export declare const userApiKeysCrud: import("../../crud").CrudSchemaFromOptions
|
|
|
92
96
|
type: undefined;
|
|
93
97
|
user_id: undefined;
|
|
94
98
|
}, "">;
|
|
95
|
-
|
|
96
|
-
|
|
99
|
+
type UserApiKeysCrud = CrudTypeOf<typeof userApiKeysCrud>;
|
|
100
|
+
declare const teamApiKeysCrud: CrudSchemaFromOptions<{
|
|
97
101
|
clientReadSchema: yup.ObjectSchema<{
|
|
98
102
|
id: string;
|
|
99
103
|
description: string;
|
|
@@ -153,7 +157,8 @@ export declare const teamApiKeysCrud: import("../../crud").CrudSchemaFromOptions
|
|
|
153
157
|
summary: string;
|
|
154
158
|
};
|
|
155
159
|
};
|
|
156
|
-
}
|
|
160
|
+
}>;
|
|
161
|
+
declare const teamApiKeysCreateInputSchema: yup.ObjectSchema<{
|
|
157
162
|
description: string;
|
|
158
163
|
expires_at_millis: number | null;
|
|
159
164
|
is_public: boolean | undefined;
|
|
@@ -163,10 +168,11 @@ export declare const teamApiKeysCrud: import("../../crud").CrudSchemaFromOptions
|
|
|
163
168
|
expires_at_millis: undefined;
|
|
164
169
|
is_public: undefined;
|
|
165
170
|
team_id: undefined;
|
|
166
|
-
}, ""
|
|
167
|
-
|
|
171
|
+
}, "">;
|
|
172
|
+
declare const teamApiKeysCreateOutputSchema: yup.ObjectSchema<{
|
|
168
173
|
type: "team";
|
|
169
174
|
description: string;
|
|
175
|
+
id: string;
|
|
170
176
|
created_at_millis: number;
|
|
171
177
|
expires_at_millis: number | undefined;
|
|
172
178
|
manually_revoked_at_millis: number | undefined;
|
|
@@ -185,4 +191,6 @@ export declare const teamApiKeysCrud: import("../../crud").CrudSchemaFromOptions
|
|
|
185
191
|
type: undefined;
|
|
186
192
|
team_id: undefined;
|
|
187
193
|
}, "">;
|
|
188
|
-
|
|
194
|
+
type TeamApiKeysCrud = CrudTypeOf<typeof teamApiKeysCrud>;
|
|
195
|
+
|
|
196
|
+
export { type TeamApiKeysCrud, type UserApiKeysCrud, teamApiKeysCreateInputSchema, teamApiKeysCreateOutputSchema, teamApiKeysCrud, userApiKeysCreateInputSchema, userApiKeysCreateOutputSchema, userApiKeysCrud };
|
|
@@ -1,76 +1,123 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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/project-api-keys.ts
|
|
21
|
+
var project_api_keys_exports = {};
|
|
22
|
+
__export(project_api_keys_exports, {
|
|
23
|
+
teamApiKeysCreateInputSchema: () => teamApiKeysCreateInputSchema,
|
|
24
|
+
teamApiKeysCreateOutputSchema: () => teamApiKeysCreateOutputSchema,
|
|
25
|
+
teamApiKeysCrud: () => teamApiKeysCrud,
|
|
26
|
+
userApiKeysCreateInputSchema: () => userApiKeysCreateInputSchema,
|
|
27
|
+
userApiKeysCreateOutputSchema: () => userApiKeysCreateOutputSchema,
|
|
28
|
+
userApiKeysCrud: () => userApiKeysCrud
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(project_api_keys_exports);
|
|
31
|
+
var import_crud = require("../../crud");
|
|
32
|
+
var import_schema_fields = require("../../schema-fields");
|
|
33
|
+
var import_objects = require("../../utils/objects");
|
|
4
34
|
function createApiKeyCrud(type, idFieldName, idSchema) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
};
|
|
35
|
+
const projectApiKeysReadSchema = (0, import_schema_fields.yupObject)({
|
|
36
|
+
id: (0, import_schema_fields.yupString)().defined(),
|
|
37
|
+
description: (0, import_schema_fields.yupString)().defined(),
|
|
38
|
+
expires_at_millis: (0, import_schema_fields.yupNumber)().optional(),
|
|
39
|
+
manually_revoked_at_millis: (0, import_schema_fields.yupNumber)().optional(),
|
|
40
|
+
created_at_millis: (0, import_schema_fields.yupNumber)().defined(),
|
|
41
|
+
is_public: (0, import_schema_fields.yupBoolean)().defined(),
|
|
42
|
+
value: (0, import_schema_fields.yupObject)({
|
|
43
|
+
last_four: (0, import_schema_fields.yupString)().defined()
|
|
44
|
+
}).defined(),
|
|
45
|
+
type: (0, import_schema_fields.yupString)().oneOf([type]).defined(),
|
|
46
|
+
...(0, import_objects.typedFromEntries)([[idFieldName, idSchema]])
|
|
47
|
+
});
|
|
48
|
+
const projectApiKeysUpdateSchema = (0, import_schema_fields.yupObject)({
|
|
49
|
+
description: (0, import_schema_fields.yupString)().optional(),
|
|
50
|
+
revoked: (0, import_schema_fields.yupBoolean)().oneOf([true]).optional()
|
|
51
|
+
}).defined();
|
|
52
|
+
const projectApiKeysCrud = (0, import_crud.createCrud)({
|
|
53
|
+
clientReadSchema: projectApiKeysReadSchema,
|
|
54
|
+
clientUpdateSchema: projectApiKeysUpdateSchema,
|
|
55
|
+
docs: {
|
|
56
|
+
clientCreate: {
|
|
57
|
+
description: "Create a new API key",
|
|
58
|
+
displayName: "Create API Key",
|
|
59
|
+
summary: "Create API key"
|
|
60
|
+
},
|
|
61
|
+
clientList: {
|
|
62
|
+
description: "List all API keys for the project",
|
|
63
|
+
displayName: "List API Keys",
|
|
64
|
+
summary: "List API keys"
|
|
65
|
+
},
|
|
66
|
+
clientRead: {
|
|
67
|
+
description: "Get details of a specific API key",
|
|
68
|
+
displayName: "Get API Key",
|
|
69
|
+
summary: "Get API key details"
|
|
70
|
+
},
|
|
71
|
+
clientUpdate: {
|
|
72
|
+
description: "Update an API key",
|
|
73
|
+
displayName: "Update API Key",
|
|
74
|
+
summary: "Update API key"
|
|
75
|
+
},
|
|
76
|
+
serverDelete: {
|
|
77
|
+
description: "Delete an API key",
|
|
78
|
+
displayName: "Delete API Key",
|
|
79
|
+
summary: "Delete API key"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
const projectApiKeysCreateInputSchema = (0, import_schema_fields.yupObject)({
|
|
84
|
+
description: (0, import_schema_fields.yupString)().defined(),
|
|
85
|
+
expires_at_millis: (0, import_schema_fields.yupNumber)().nullable().defined(),
|
|
86
|
+
is_public: (0, import_schema_fields.yupBoolean)().optional(),
|
|
87
|
+
/*
|
|
88
|
+
prefix: yupString().optional().nonEmpty().test("prefix", "Prefix must contain only alphanumeric characters and underscores", (value) => {
|
|
89
|
+
if (!value) return true;
|
|
90
|
+
return /^[a-zA-Z0-9_]+$/.test(value);
|
|
91
|
+
}),
|
|
92
|
+
*/
|
|
93
|
+
...(0, import_objects.typedFromEntries)([[idFieldName, idSchema]])
|
|
94
|
+
});
|
|
95
|
+
const projectApiKeysCreateOutputSchema = projectApiKeysReadSchema.omit(["value"]).concat((0, import_schema_fields.yupObject)({
|
|
96
|
+
value: (0, import_schema_fields.yupString)().defined()
|
|
97
|
+
}));
|
|
98
|
+
return {
|
|
99
|
+
crud: projectApiKeysCrud,
|
|
100
|
+
createInputSchema: projectApiKeysCreateInputSchema,
|
|
101
|
+
createOutputSchema: projectApiKeysCreateOutputSchema
|
|
102
|
+
};
|
|
74
103
|
}
|
|
75
|
-
|
|
76
|
-
|
|
104
|
+
var {
|
|
105
|
+
crud: userApiKeysCrud,
|
|
106
|
+
createInputSchema: userApiKeysCreateInputSchema,
|
|
107
|
+
createOutputSchema: userApiKeysCreateOutputSchema
|
|
108
|
+
} = createApiKeyCrud("user", "user_id", import_schema_fields.userIdOrMeSchema.defined());
|
|
109
|
+
var {
|
|
110
|
+
crud: teamApiKeysCrud,
|
|
111
|
+
createInputSchema: teamApiKeysCreateInputSchema,
|
|
112
|
+
createOutputSchema: teamApiKeysCreateOutputSchema
|
|
113
|
+
} = createApiKeyCrud("team", "team_id", (0, import_schema_fields.yupString)().defined());
|
|
114
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
115
|
+
0 && (module.exports = {
|
|
116
|
+
teamApiKeysCreateInputSchema,
|
|
117
|
+
teamApiKeysCreateOutputSchema,
|
|
118
|
+
teamApiKeysCrud,
|
|
119
|
+
userApiKeysCreateInputSchema,
|
|
120
|
+
userApiKeysCreateOutputSchema,
|
|
121
|
+
userApiKeysCrud
|
|
122
|
+
});
|
|
123
|
+
//# sourceMappingURL=project-api-keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/interface/crud/project-api-keys.ts"],"sourcesContent":["import * as yup from \"yup\";\nimport { CrudTypeOf, createCrud } from \"../../crud\";\nimport { userIdOrMeSchema, yupBoolean, yupNumber, yupObject, yupString } from \"../../schema-fields\";\nimport { typedFromEntries } from \"../../utils/objects\";\n\nfunction createApiKeyCrud<T extends string, IdFieldName extends string, IdSchema extends yup.Schema<any>>(type: T, idFieldName: IdFieldName, idSchema: IdSchema) {\n const projectApiKeysReadSchema = yupObject({\n id: yupString().defined(),\n description: yupString().defined(),\n expires_at_millis: yupNumber().optional(),\n manually_revoked_at_millis: yupNumber().optional(),\n created_at_millis: yupNumber().defined(),\n is_public: yupBoolean().defined(),\n value: yupObject({\n last_four: yupString().defined(),\n }).defined(),\n type: yupString().oneOf([type]).defined(),\n ...typedFromEntries([[idFieldName, idSchema]]),\n });\n\n const projectApiKeysUpdateSchema = yupObject({\n description: yupString().optional(),\n revoked: yupBoolean().oneOf([true]).optional(),\n }).defined();\n\n const projectApiKeysCrud = createCrud({\n clientReadSchema: projectApiKeysReadSchema,\n clientUpdateSchema: projectApiKeysUpdateSchema,\n docs: {\n clientCreate: {\n description: \"Create a new API key\",\n displayName: \"Create API Key\",\n summary: \"Create API key\",\n },\n clientList: {\n description: \"List all API keys for the project\",\n displayName: \"List API Keys\",\n summary: \"List API keys\",\n },\n clientRead: {\n description: \"Get details of a specific API key\",\n displayName: \"Get API Key\",\n summary: \"Get API key details\",\n },\n clientUpdate: {\n description: \"Update an API key\",\n displayName: \"Update API Key\",\n summary: \"Update API key\",\n },\n serverDelete: {\n description: \"Delete an API key\",\n displayName: \"Delete API Key\",\n summary: \"Delete API key\",\n },\n },\n });\n\n // Used for the result of the create endpoint\n const projectApiKeysCreateInputSchema = yupObject({\n description: yupString().defined(),\n expires_at_millis: yupNumber().nullable().defined(),\n is_public: yupBoolean().optional(),\n /*\n prefix: yupString().optional().nonEmpty().test(\"prefix\", \"Prefix must contain only alphanumeric characters and underscores\", (value) => {\n if (!value) return true;\n return /^[a-zA-Z0-9_]+$/.test(value);\n }),\n */\n ...typedFromEntries([[idFieldName, idSchema]]),\n });\n const projectApiKeysCreateOutputSchema = projectApiKeysReadSchema.omit([\"value\"]).concat(yupObject({\n value: yupString().defined(),\n }));\n\n return {\n crud: projectApiKeysCrud,\n createInputSchema: projectApiKeysCreateInputSchema,\n createOutputSchema: projectApiKeysCreateOutputSchema,\n };\n}\n\n\nexport const {\n crud: userApiKeysCrud,\n createInputSchema: userApiKeysCreateInputSchema,\n createOutputSchema: userApiKeysCreateOutputSchema,\n} = createApiKeyCrud(\"user\", \"user_id\", userIdOrMeSchema.defined());\nexport type UserApiKeysCrud = CrudTypeOf<typeof userApiKeysCrud>;\n\nexport const {\n crud: teamApiKeysCrud,\n createInputSchema: teamApiKeysCreateInputSchema,\n createOutputSchema: teamApiKeysCreateOutputSchema,\n} = createApiKeyCrud(\"team\", \"team_id\", yupString().defined());\nexport type TeamApiKeysCrud = CrudTypeOf<typeof teamApiKeysCrud>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAAuC;AACvC,2BAA8E;AAC9E,qBAAiC;AAEjC,SAAS,iBAAiG,MAAS,aAA0B,UAAoB;AAC/J,QAAM,+BAA2B,gCAAU;AAAA,IACzC,QAAI,gCAAU,EAAE,QAAQ;AAAA,IACxB,iBAAa,gCAAU,EAAE,QAAQ;AAAA,IACjC,uBAAmB,gCAAU,EAAE,SAAS;AAAA,IACxC,gCAA4B,gCAAU,EAAE,SAAS;AAAA,IACjD,uBAAmB,gCAAU,EAAE,QAAQ;AAAA,IACvC,eAAW,iCAAW,EAAE,QAAQ;AAAA,IAChC,WAAO,gCAAU;AAAA,MACf,eAAW,gCAAU,EAAE,QAAQ;AAAA,IACjC,CAAC,EAAE,QAAQ;AAAA,IACX,UAAM,gCAAU,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,QAAQ;AAAA,IACxC,OAAG,iCAAiB,CAAC,CAAC,aAAa,QAAQ,CAAC,CAAC;AAAA,EAC/C,CAAC;AAED,QAAM,iCAA6B,gCAAU;AAAA,IAC3C,iBAAa,gCAAU,EAAE,SAAS;AAAA,IAClC,aAAS,iCAAW,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,SAAS;AAAA,EAC/C,CAAC,EAAE,QAAQ;AAEX,QAAM,yBAAqB,wBAAW;AAAA,IACpC,kBAAkB;AAAA,IAClB,oBAAoB;AAAA,IACpB,MAAM;AAAA,MACJ,cAAc;AAAA,QACZ,aAAa;AAAA,QACb,aAAa;AAAA,QACb,SAAS;AAAA,MACX;AAAA,MACA,YAAY;AAAA,QACV,aAAa;AAAA,QACb,aAAa;AAAA,QACb,SAAS;AAAA,MACX;AAAA,MACA,YAAY;AAAA,QACV,aAAa;AAAA,QACb,aAAa;AAAA,QACb,SAAS;AAAA,MACX;AAAA,MACA,cAAc;AAAA,QACZ,aAAa;AAAA,QACb,aAAa;AAAA,QACb,SAAS;AAAA,MACX;AAAA,MACA,cAAc;AAAA,QACZ,aAAa;AAAA,QACb,aAAa;AAAA,QACb,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF,CAAC;AAGD,QAAM,sCAAkC,gCAAU;AAAA,IAChD,iBAAa,gCAAU,EAAE,QAAQ;AAAA,IACjC,uBAAmB,gCAAU,EAAE,SAAS,EAAE,QAAQ;AAAA,IAClD,eAAW,iCAAW,EAAE,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOjC,OAAG,iCAAiB,CAAC,CAAC,aAAa,QAAQ,CAAC,CAAC;AAAA,EAC/C,CAAC;AACD,QAAM,mCAAmC,yBAAyB,KAAK,CAAC,OAAO,CAAC,EAAE,WAAO,gCAAU;AAAA,IACjG,WAAO,gCAAU,EAAE,QAAQ;AAAA,EAC7B,CAAC,CAAC;AAEF,SAAO;AAAA,IACL,MAAM;AAAA,IACN,mBAAmB;AAAA,IACnB,oBAAoB;AAAA,EACtB;AACF;AAGO,IAAM;AAAA,EACX,MAAM;AAAA,EACN,mBAAmB;AAAA,EACnB,oBAAoB;AACtB,IAAI,iBAAiB,QAAQ,WAAW,sCAAiB,QAAQ,CAAC;AAG3D,IAAM;AAAA,EACX,MAAM;AAAA,EACN,mBAAmB;AAAA,EACnB,oBAAoB;AACtB,IAAI,iBAAiB,QAAQ,eAAW,gCAAU,EAAE,QAAQ,CAAC;","names":[]}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.cjs';
|
|
2
|
+
import * as yup from 'yup';
|
|
3
|
+
import '../../utils/types.cjs';
|
|
4
|
+
|
|
5
|
+
declare const projectPermissionsCrudClientReadSchema: yup.ObjectSchema<{
|
|
6
|
+
id: string;
|
|
7
|
+
user_id: string;
|
|
8
|
+
}, yup.AnyObject, {
|
|
9
|
+
id: undefined;
|
|
10
|
+
user_id: undefined;
|
|
11
|
+
}, "">;
|
|
12
|
+
declare const projectPermissionsCrudServerCreateSchema: yup.ObjectSchema<{}, yup.AnyObject, {}, "">;
|
|
13
|
+
declare const projectPermissionsCrudServerDeleteSchema: yup.MixedSchema<{} | undefined, yup.AnyObject, undefined, "">;
|
|
14
|
+
declare const projectPermissionsCrud: CrudSchemaFromOptions<{
|
|
15
|
+
clientReadSchema: yup.ObjectSchema<{
|
|
16
|
+
id: string;
|
|
17
|
+
user_id: string;
|
|
18
|
+
}, yup.AnyObject, {
|
|
19
|
+
id: undefined;
|
|
20
|
+
user_id: undefined;
|
|
21
|
+
}, "">;
|
|
22
|
+
serverCreateSchema: yup.ObjectSchema<{}, yup.AnyObject, {}, "">;
|
|
23
|
+
serverDeleteSchema: yup.MixedSchema<{} | undefined, yup.AnyObject, undefined, "">;
|
|
24
|
+
docs: {
|
|
25
|
+
clientList: {
|
|
26
|
+
summary: string;
|
|
27
|
+
description: string;
|
|
28
|
+
tags: string[];
|
|
29
|
+
};
|
|
30
|
+
serverList: {
|
|
31
|
+
summary: string;
|
|
32
|
+
description: string;
|
|
33
|
+
tags: string[];
|
|
34
|
+
};
|
|
35
|
+
serverCreate: {
|
|
36
|
+
summary: string;
|
|
37
|
+
description: string;
|
|
38
|
+
tags: string[];
|
|
39
|
+
};
|
|
40
|
+
serverDelete: {
|
|
41
|
+
summary: string;
|
|
42
|
+
description: string;
|
|
43
|
+
tags: string[];
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
}>;
|
|
47
|
+
type ProjectPermissionsCrud = CrudTypeOf<typeof projectPermissionsCrud>;
|
|
48
|
+
declare const projectPermissionCreatedWebhookEvent: {
|
|
49
|
+
type: string;
|
|
50
|
+
schema: yup.ObjectSchema<{
|
|
51
|
+
id: string;
|
|
52
|
+
user_id: string;
|
|
53
|
+
}, yup.AnyObject, {
|
|
54
|
+
id: undefined;
|
|
55
|
+
user_id: undefined;
|
|
56
|
+
}, "">;
|
|
57
|
+
metadata: {
|
|
58
|
+
summary: string;
|
|
59
|
+
description: string;
|
|
60
|
+
tags: string[];
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
declare const projectPermissionDeletedWebhookEvent: {
|
|
64
|
+
type: string;
|
|
65
|
+
schema: yup.ObjectSchema<{
|
|
66
|
+
id: string;
|
|
67
|
+
user_id: string;
|
|
68
|
+
}, yup.AnyObject, {
|
|
69
|
+
id: undefined;
|
|
70
|
+
user_id: undefined;
|
|
71
|
+
}, "">;
|
|
72
|
+
metadata: {
|
|
73
|
+
summary: string;
|
|
74
|
+
description: string;
|
|
75
|
+
tags: string[];
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
declare const projectPermissionDefinitionsCrudAdminReadSchema: yup.ObjectSchema<{
|
|
79
|
+
id: string;
|
|
80
|
+
description: string | undefined;
|
|
81
|
+
contained_permission_ids: string[];
|
|
82
|
+
}, yup.AnyObject, {
|
|
83
|
+
id: undefined;
|
|
84
|
+
description: undefined;
|
|
85
|
+
contained_permission_ids: undefined;
|
|
86
|
+
}, "">;
|
|
87
|
+
declare const projectPermissionDefinitionsCrudAdminCreateSchema: yup.ObjectSchema<{
|
|
88
|
+
id: string;
|
|
89
|
+
description: string | undefined;
|
|
90
|
+
contained_permission_ids: string[] | undefined;
|
|
91
|
+
}, yup.AnyObject, {
|
|
92
|
+
id: undefined;
|
|
93
|
+
description: undefined;
|
|
94
|
+
contained_permission_ids: undefined;
|
|
95
|
+
}, "">;
|
|
96
|
+
declare const projectPermissionDefinitionsCrudAdminUpdateSchema: yup.ObjectSchema<{
|
|
97
|
+
id: string | undefined;
|
|
98
|
+
description: string | undefined;
|
|
99
|
+
contained_permission_ids: string[] | undefined;
|
|
100
|
+
}, yup.AnyObject, {
|
|
101
|
+
id: undefined;
|
|
102
|
+
description: undefined;
|
|
103
|
+
contained_permission_ids: undefined;
|
|
104
|
+
}, "">;
|
|
105
|
+
declare const projectPermissionDefinitionsCrudAdminDeleteSchema: yup.MixedSchema<{} | undefined, yup.AnyObject, undefined, "">;
|
|
106
|
+
declare const projectPermissionDefinitionsCrud: CrudSchemaFromOptions<{
|
|
107
|
+
adminReadSchema: yup.ObjectSchema<{
|
|
108
|
+
id: string;
|
|
109
|
+
description: string | undefined;
|
|
110
|
+
contained_permission_ids: string[];
|
|
111
|
+
}, yup.AnyObject, {
|
|
112
|
+
id: undefined;
|
|
113
|
+
description: undefined;
|
|
114
|
+
contained_permission_ids: undefined;
|
|
115
|
+
}, "">;
|
|
116
|
+
adminCreateSchema: yup.ObjectSchema<{
|
|
117
|
+
id: string;
|
|
118
|
+
description: string | undefined;
|
|
119
|
+
contained_permission_ids: string[] | undefined;
|
|
120
|
+
}, yup.AnyObject, {
|
|
121
|
+
id: undefined;
|
|
122
|
+
description: undefined;
|
|
123
|
+
contained_permission_ids: undefined;
|
|
124
|
+
}, "">;
|
|
125
|
+
adminUpdateSchema: yup.ObjectSchema<{
|
|
126
|
+
id: string | undefined;
|
|
127
|
+
description: string | undefined;
|
|
128
|
+
contained_permission_ids: string[] | undefined;
|
|
129
|
+
}, yup.AnyObject, {
|
|
130
|
+
id: undefined;
|
|
131
|
+
description: undefined;
|
|
132
|
+
contained_permission_ids: undefined;
|
|
133
|
+
}, "">;
|
|
134
|
+
adminDeleteSchema: yup.MixedSchema<{} | undefined, yup.AnyObject, undefined, "">;
|
|
135
|
+
docs: {
|
|
136
|
+
adminList: {
|
|
137
|
+
summary: string;
|
|
138
|
+
description: string;
|
|
139
|
+
tags: string[];
|
|
140
|
+
};
|
|
141
|
+
adminCreate: {
|
|
142
|
+
summary: string;
|
|
143
|
+
description: string;
|
|
144
|
+
tags: string[];
|
|
145
|
+
};
|
|
146
|
+
adminUpdate: {
|
|
147
|
+
summary: string;
|
|
148
|
+
description: string;
|
|
149
|
+
tags: string[];
|
|
150
|
+
};
|
|
151
|
+
adminDelete: {
|
|
152
|
+
summary: string;
|
|
153
|
+
description: string;
|
|
154
|
+
tags: string[];
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
}>;
|
|
158
|
+
type ProjectPermissionDefinitionsCrud = CrudTypeOf<typeof projectPermissionDefinitionsCrud>;
|
|
159
|
+
|
|
160
|
+
export { type ProjectPermissionDefinitionsCrud, type ProjectPermissionsCrud, projectPermissionCreatedWebhookEvent, projectPermissionDefinitionsCrud, projectPermissionDefinitionsCrudAdminCreateSchema, projectPermissionDefinitionsCrudAdminDeleteSchema, projectPermissionDefinitionsCrudAdminReadSchema, projectPermissionDefinitionsCrudAdminUpdateSchema, projectPermissionDeletedWebhookEvent, projectPermissionsCrud, projectPermissionsCrudClientReadSchema, projectPermissionsCrudServerCreateSchema, projectPermissionsCrudServerDeleteSchema };
|