@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,260 @@
|
|
|
1
|
+
import * as yup from 'yup';
|
|
2
|
+
import { KnownErrors } from '../known-errors.cjs';
|
|
3
|
+
import { InternalSession, RefreshToken, AccessToken } from '../sessions.cjs';
|
|
4
|
+
import { ReadonlyJson } from '../utils/json.cjs';
|
|
5
|
+
import { PublicKeyCredentialCreationOptionsJSON, RegistrationResponseJSON, PublicKeyCredentialRequestOptionsJSON, AuthenticationResponseJSON } from '@simplewebauthn/types';
|
|
6
|
+
import { Result } from '../utils/results.cjs';
|
|
7
|
+
import { ContactChannelsCrud } from './crud/contact-channels.cjs';
|
|
8
|
+
import { CurrentUserCrud } from './crud/current-user.cjs';
|
|
9
|
+
import { ConnectedAccountAccessTokenCrud } from './crud/oauth.cjs';
|
|
10
|
+
import { UserApiKeysCrud, TeamApiKeysCrud, userApiKeysCreateInputSchema, userApiKeysCreateOutputSchema, teamApiKeysCreateInputSchema, teamApiKeysCreateOutputSchema } from './crud/project-api-keys.cjs';
|
|
11
|
+
import { ProjectPermissionsCrud } from './crud/project-permissions.cjs';
|
|
12
|
+
import { ClientProjectsCrud, AdminUserProjectsCrud } from './crud/projects.cjs';
|
|
13
|
+
import { SessionsCrud } from './crud/sessions.cjs';
|
|
14
|
+
import { TeamInvitationCrud } from './crud/team-invitation.cjs';
|
|
15
|
+
import { TeamMemberProfilesCrud } from './crud/team-member-profiles.cjs';
|
|
16
|
+
import { TeamPermissionsCrud } from './crud/team-permissions.cjs';
|
|
17
|
+
import { TeamsCrud } from './crud/teams.cjs';
|
|
18
|
+
import '../utils/errors.cjs';
|
|
19
|
+
import 'jose';
|
|
20
|
+
import '../crud.cjs';
|
|
21
|
+
import '../utils/types.cjs';
|
|
22
|
+
|
|
23
|
+
type ClientInterfaceOptions = {
|
|
24
|
+
clientVersion: string;
|
|
25
|
+
getBaseUrl: () => string;
|
|
26
|
+
extraRequestHeaders: Record<string, string>;
|
|
27
|
+
projectId: string;
|
|
28
|
+
prepareRequest?: () => Promise<void>;
|
|
29
|
+
} & ({
|
|
30
|
+
publishableClientKey: string;
|
|
31
|
+
} | {
|
|
32
|
+
projectOwnerSession: InternalSession;
|
|
33
|
+
});
|
|
34
|
+
declare class StackClientInterface {
|
|
35
|
+
readonly options: ClientInterfaceOptions;
|
|
36
|
+
constructor(options: ClientInterfaceOptions);
|
|
37
|
+
get projectId(): string;
|
|
38
|
+
getApiUrl(): string;
|
|
39
|
+
runNetworkDiagnostics(session?: InternalSession | null, requestType?: "client" | "server" | "admin"): Promise<{
|
|
40
|
+
"navigator?.onLine": any;
|
|
41
|
+
cfTrace: string;
|
|
42
|
+
apiRoot: string;
|
|
43
|
+
baseUrlBackend: string;
|
|
44
|
+
prodDashboard: string;
|
|
45
|
+
prodBackend: string;
|
|
46
|
+
}>;
|
|
47
|
+
protected _createNetworkError(cause: Error, session?: InternalSession | null, requestType?: "client" | "server" | "admin"): Promise<Error>;
|
|
48
|
+
protected _networkRetry<T>(cb: () => Promise<Result<T, any>>, session?: InternalSession | null, requestType?: "client" | "server" | "admin"): Promise<T>;
|
|
49
|
+
protected _networkRetryException<T>(cb: () => Promise<T>, session?: InternalSession | null, requestType?: "client" | "server" | "admin"): Promise<T>;
|
|
50
|
+
fetchNewAccessToken(refreshToken: RefreshToken): Promise<AccessToken | null>;
|
|
51
|
+
sendClientRequest(path: string, requestOptions: RequestInit, session: InternalSession | null, requestType?: "client" | "server" | "admin"): Promise<Response & {
|
|
52
|
+
usedTokens: {
|
|
53
|
+
accessToken: AccessToken;
|
|
54
|
+
refreshToken: RefreshToken | null;
|
|
55
|
+
} | null;
|
|
56
|
+
}>;
|
|
57
|
+
createSession(options: Omit<ConstructorParameters<typeof InternalSession>[0], "refreshAccessTokenCallback">): InternalSession;
|
|
58
|
+
protected sendClientRequestAndCatchKnownError<E extends typeof KnownErrors[keyof KnownErrors]>(path: string, requestOptions: RequestInit, tokenStoreOrNull: InternalSession | null, errorsToCatch: readonly E[]): Promise<Result<Response & {
|
|
59
|
+
usedTokens: {
|
|
60
|
+
accessToken: AccessToken;
|
|
61
|
+
refreshToken: RefreshToken | null;
|
|
62
|
+
} | null;
|
|
63
|
+
}, InstanceType<E>>>;
|
|
64
|
+
private sendClientRequestInner;
|
|
65
|
+
private _processResponse;
|
|
66
|
+
checkFeatureSupport(options: {
|
|
67
|
+
featureName?: string;
|
|
68
|
+
} & ReadonlyJson): Promise<never>;
|
|
69
|
+
sendForgotPasswordEmail(email: string, callbackUrl: string): Promise<Result<undefined, KnownErrors["UserNotFound"]>>;
|
|
70
|
+
sendVerificationEmail(email: string, callbackUrl: string, session: InternalSession): Promise<KnownErrors["EmailAlreadyVerified"] | undefined>;
|
|
71
|
+
sendMagicLinkEmail(email: string, callbackUrl: string): Promise<Result<{
|
|
72
|
+
nonce: string;
|
|
73
|
+
}, KnownErrors["RedirectUrlNotWhitelisted"]>>;
|
|
74
|
+
resetPassword(options: {
|
|
75
|
+
code: string;
|
|
76
|
+
} & ({
|
|
77
|
+
password: string;
|
|
78
|
+
} | {
|
|
79
|
+
onlyVerifyCode: true;
|
|
80
|
+
})): Promise<Result<undefined, KnownErrors["VerificationCodeError"]>>;
|
|
81
|
+
updatePassword(options: {
|
|
82
|
+
oldPassword: string;
|
|
83
|
+
newPassword: string;
|
|
84
|
+
}, session: InternalSession): Promise<KnownErrors["PasswordConfirmationMismatch"] | KnownErrors["PasswordRequirementsNotMet"] | undefined>;
|
|
85
|
+
setPassword(options: {
|
|
86
|
+
password: string;
|
|
87
|
+
}, session: InternalSession): Promise<KnownErrors["PasswordRequirementsNotMet"] | undefined>;
|
|
88
|
+
verifyPasswordResetCode(code: string): Promise<Result<undefined, KnownErrors["VerificationCodeError"]>>;
|
|
89
|
+
verifyEmail(code: string): Promise<Result<undefined, KnownErrors["VerificationCodeError"]>>;
|
|
90
|
+
initiatePasskeyRegistration(options: {}, session: InternalSession): Promise<Result<{
|
|
91
|
+
options_json: PublicKeyCredentialCreationOptionsJSON;
|
|
92
|
+
code: string;
|
|
93
|
+
}, KnownErrors[]>>;
|
|
94
|
+
registerPasskey(options: {
|
|
95
|
+
credential: RegistrationResponseJSON;
|
|
96
|
+
code: string;
|
|
97
|
+
}, session: InternalSession): Promise<Result<undefined, KnownErrors["PasskeyRegistrationFailed"]>>;
|
|
98
|
+
initiatePasskeyAuthentication(options: {}, session: InternalSession): Promise<Result<{
|
|
99
|
+
options_json: PublicKeyCredentialRequestOptionsJSON;
|
|
100
|
+
code: string;
|
|
101
|
+
}, KnownErrors[]>>;
|
|
102
|
+
sendTeamInvitation(options: {
|
|
103
|
+
email: string;
|
|
104
|
+
teamId: string;
|
|
105
|
+
callbackUrl: string;
|
|
106
|
+
session: InternalSession;
|
|
107
|
+
}): Promise<void>;
|
|
108
|
+
acceptTeamInvitation<T extends 'use' | 'details' | 'check'>(options: {
|
|
109
|
+
code: string;
|
|
110
|
+
session: InternalSession;
|
|
111
|
+
type: T;
|
|
112
|
+
}): Promise<Result<T extends 'details' ? {
|
|
113
|
+
team_display_name: string;
|
|
114
|
+
} : undefined, KnownErrors["VerificationCodeError"]>>;
|
|
115
|
+
totpMfa(attemptCode: string, totp: string, session: InternalSession): Promise<{
|
|
116
|
+
accessToken: any;
|
|
117
|
+
refreshToken: any;
|
|
118
|
+
newUser: any;
|
|
119
|
+
}>;
|
|
120
|
+
signInWithCredential(email: string, password: string, session: InternalSession): Promise<Result<{
|
|
121
|
+
accessToken: string;
|
|
122
|
+
refreshToken: string;
|
|
123
|
+
}, KnownErrors["EmailPasswordMismatch"]>>;
|
|
124
|
+
signUpWithCredential(email: string, password: string, emailVerificationRedirectUrl: string, session: InternalSession): Promise<Result<{
|
|
125
|
+
accessToken: string;
|
|
126
|
+
refreshToken: string;
|
|
127
|
+
}, KnownErrors["UserWithEmailAlreadyExists"] | KnownErrors["PasswordRequirementsNotMet"]>>;
|
|
128
|
+
signUpAnonymously(session: InternalSession): Promise<Result<{
|
|
129
|
+
accessToken: string;
|
|
130
|
+
refreshToken: string;
|
|
131
|
+
}, never>>;
|
|
132
|
+
signInWithMagicLink(code: string): Promise<Result<{
|
|
133
|
+
newUser: boolean;
|
|
134
|
+
accessToken: string;
|
|
135
|
+
refreshToken: string;
|
|
136
|
+
}, KnownErrors["VerificationCodeError"]>>;
|
|
137
|
+
signInWithPasskey(body: {
|
|
138
|
+
authentication_response: AuthenticationResponseJSON;
|
|
139
|
+
code: string;
|
|
140
|
+
}): Promise<Result<{
|
|
141
|
+
accessToken: string;
|
|
142
|
+
refreshToken: string;
|
|
143
|
+
}, KnownErrors["PasskeyAuthenticationFailed"]>>;
|
|
144
|
+
getOAuthUrl(options: {
|
|
145
|
+
provider: string;
|
|
146
|
+
redirectUrl: string;
|
|
147
|
+
errorRedirectUrl: string;
|
|
148
|
+
afterCallbackRedirectUrl?: string;
|
|
149
|
+
codeChallenge: string;
|
|
150
|
+
state: string;
|
|
151
|
+
type: "authenticate" | "link";
|
|
152
|
+
providerScope?: string;
|
|
153
|
+
} & ({
|
|
154
|
+
type: "authenticate";
|
|
155
|
+
} | {
|
|
156
|
+
type: "link";
|
|
157
|
+
session: InternalSession;
|
|
158
|
+
})): Promise<string>;
|
|
159
|
+
callOAuthCallback(options: {
|
|
160
|
+
oauthParams: URLSearchParams;
|
|
161
|
+
redirectUri: string;
|
|
162
|
+
codeVerifier: string;
|
|
163
|
+
state: string;
|
|
164
|
+
}): Promise<{
|
|
165
|
+
newUser: boolean;
|
|
166
|
+
afterCallbackRedirectUrl?: string;
|
|
167
|
+
accessToken: string;
|
|
168
|
+
refreshToken: string;
|
|
169
|
+
}>;
|
|
170
|
+
signOut(session: InternalSession): Promise<void>;
|
|
171
|
+
getClientUserByToken(session: InternalSession): Promise<CurrentUserCrud["Client"]["Read"] | null>;
|
|
172
|
+
listTeamInvitations(options: {
|
|
173
|
+
teamId: string;
|
|
174
|
+
}, session: InternalSession): Promise<TeamInvitationCrud['Client']['Read'][]>;
|
|
175
|
+
revokeTeamInvitation(invitationId: string, teamId: string, session: InternalSession): Promise<void>;
|
|
176
|
+
listTeamMemberProfiles(options: {
|
|
177
|
+
teamId?: string;
|
|
178
|
+
userId?: string;
|
|
179
|
+
}, session: InternalSession): Promise<TeamMemberProfilesCrud['Client']['Read'][]>;
|
|
180
|
+
getTeamMemberProfile(options: {
|
|
181
|
+
teamId: string;
|
|
182
|
+
userId: string;
|
|
183
|
+
}, session: InternalSession): Promise<TeamMemberProfilesCrud['Client']['Read']>;
|
|
184
|
+
leaveTeam(teamId: string, session: InternalSession): Promise<void>;
|
|
185
|
+
updateTeamMemberProfile(options: {
|
|
186
|
+
teamId: string;
|
|
187
|
+
userId: string;
|
|
188
|
+
profile: TeamMemberProfilesCrud['Client']['Update'];
|
|
189
|
+
}, session: InternalSession): Promise<void>;
|
|
190
|
+
updateTeam(options: {
|
|
191
|
+
teamId: string;
|
|
192
|
+
data: TeamsCrud['Client']['Update'];
|
|
193
|
+
}, session: InternalSession): Promise<void>;
|
|
194
|
+
listCurrentUserTeamPermissions(options: {
|
|
195
|
+
teamId: string;
|
|
196
|
+
recursive: boolean;
|
|
197
|
+
}, session: InternalSession): Promise<TeamPermissionsCrud['Client']['Read'][]>;
|
|
198
|
+
listCurrentUserProjectPermissions(options: {
|
|
199
|
+
recursive: boolean;
|
|
200
|
+
}, session: InternalSession): Promise<ProjectPermissionsCrud['Client']['Read'][]>;
|
|
201
|
+
listCurrentUserTeams(session: InternalSession): Promise<TeamsCrud["Client"]["Read"][]>;
|
|
202
|
+
getClientProject(): Promise<Result<ClientProjectsCrud['Client']['Read'], KnownErrors["ProjectNotFound"]>>;
|
|
203
|
+
updateClientUser(update: CurrentUserCrud["Client"]["Update"], session: InternalSession): Promise<void>;
|
|
204
|
+
listProjects(session: InternalSession): Promise<AdminUserProjectsCrud['Client']['Read'][]>;
|
|
205
|
+
createProject(project: AdminUserProjectsCrud['Client']['Create'], session: InternalSession): Promise<AdminUserProjectsCrud['Client']['Read']>;
|
|
206
|
+
createProviderAccessToken(provider: string, scope: string, session: InternalSession): Promise<ConnectedAccountAccessTokenCrud['Client']['Read']>;
|
|
207
|
+
createClientTeam(data: TeamsCrud['Client']['Create'], session: InternalSession): Promise<TeamsCrud['Client']['Read']>;
|
|
208
|
+
deleteTeam(teamId: string, session: InternalSession): Promise<void>;
|
|
209
|
+
deleteCurrentUser(session: InternalSession): Promise<void>;
|
|
210
|
+
createClientContactChannel(data: ContactChannelsCrud['Client']['Create'], session: InternalSession): Promise<ContactChannelsCrud['Client']['Read']>;
|
|
211
|
+
updateClientContactChannel(id: string, data: ContactChannelsCrud['Client']['Update'], session: InternalSession): Promise<ContactChannelsCrud['Client']['Read']>;
|
|
212
|
+
deleteClientContactChannel(id: string, session: InternalSession): Promise<void>;
|
|
213
|
+
deleteSession(sessionId: string, session: InternalSession): Promise<void>;
|
|
214
|
+
listSessions(session: InternalSession): Promise<SessionsCrud['Client']['List']>;
|
|
215
|
+
listClientContactChannels(session: InternalSession): Promise<ContactChannelsCrud['Client']['Read'][]>;
|
|
216
|
+
sendCurrentUserContactChannelVerificationEmail(contactChannelId: string, callbackUrl: string, session: InternalSession): Promise<Result<undefined, KnownErrors["EmailAlreadyVerified"]>>;
|
|
217
|
+
cliLogin(loginCode: string, refreshToken: string, session: InternalSession): Promise<Result<undefined, KnownErrors["SchemaError"]>>;
|
|
218
|
+
private _getApiKeyRequestInfo;
|
|
219
|
+
listProjectApiKeys(options: {
|
|
220
|
+
user_id: string;
|
|
221
|
+
}, session: InternalSession | null, requestType: "client" | "server" | "admin"): Promise<UserApiKeysCrud['Client']['Read'][]>;
|
|
222
|
+
listProjectApiKeys(options: {
|
|
223
|
+
team_id: string;
|
|
224
|
+
}, session: InternalSession | null, requestType: "client" | "server" | "admin"): Promise<TeamApiKeysCrud['Client']['Read'][]>;
|
|
225
|
+
listProjectApiKeys(options: {
|
|
226
|
+
user_id: string;
|
|
227
|
+
} | {
|
|
228
|
+
team_id: string;
|
|
229
|
+
}, session: InternalSession | null, requestType: "client" | "server" | "admin"): Promise<(UserApiKeysCrud['Client']['Read'] | TeamApiKeysCrud['Client']['Read'])[]>;
|
|
230
|
+
createProjectApiKey(data: yup.InferType<typeof userApiKeysCreateInputSchema>, session: InternalSession | null, requestType: "client" | "server" | "admin"): Promise<yup.InferType<typeof userApiKeysCreateOutputSchema>>;
|
|
231
|
+
createProjectApiKey(data: yup.InferType<typeof teamApiKeysCreateInputSchema>, session: InternalSession | null, requestType: "client" | "server" | "admin"): Promise<yup.InferType<typeof teamApiKeysCreateOutputSchema>>;
|
|
232
|
+
createProjectApiKey(data: yup.InferType<typeof userApiKeysCreateInputSchema> | yup.InferType<typeof teamApiKeysCreateInputSchema>, session: InternalSession | null, requestType: "client" | "server" | "admin"): Promise<yup.InferType<typeof userApiKeysCreateOutputSchema> | yup.InferType<typeof teamApiKeysCreateOutputSchema>>;
|
|
233
|
+
getProjectApiKey(options: {
|
|
234
|
+
user_id: string | null;
|
|
235
|
+
}, keyId: string, session: InternalSession | null, requestType: "client" | "server" | "admin"): Promise<UserApiKeysCrud['Client']['Read']>;
|
|
236
|
+
getProjectApiKey(options: {
|
|
237
|
+
team_id: string;
|
|
238
|
+
}, keyId: string, session: InternalSession | null, requestType: "client" | "server" | "admin"): Promise<TeamApiKeysCrud['Client']['Read']>;
|
|
239
|
+
getProjectApiKey(options: {
|
|
240
|
+
user_id: string | null;
|
|
241
|
+
} | {
|
|
242
|
+
team_id: string;
|
|
243
|
+
}, keyId: string, session: InternalSession | null, requestType: "client" | "server" | "admin"): Promise<UserApiKeysCrud['Client']['Read'] | TeamApiKeysCrud['Client']['Read']>;
|
|
244
|
+
updateProjectApiKey(options: {
|
|
245
|
+
user_id: string;
|
|
246
|
+
}, keyId: string, data: UserApiKeysCrud['Client']['Update'], session: InternalSession | null, requestType: "client" | "server" | "admin"): Promise<UserApiKeysCrud['Client']['Read']>;
|
|
247
|
+
updateProjectApiKey(options: {
|
|
248
|
+
team_id: string;
|
|
249
|
+
}, keyId: string, data: TeamApiKeysCrud['Client']['Update'], session: InternalSession | null, requestType: "client" | "server" | "admin"): Promise<TeamApiKeysCrud['Client']['Read']>;
|
|
250
|
+
updateProjectApiKey(options: {
|
|
251
|
+
user_id: string;
|
|
252
|
+
} | {
|
|
253
|
+
team_id: string;
|
|
254
|
+
}, keyId: string, data: UserApiKeysCrud['Client']['Update'] | TeamApiKeysCrud['Client']['Update'], session: InternalSession | null, requestType: "client" | "server" | "admin"): Promise<UserApiKeysCrud['Client']['Read'] | TeamApiKeysCrud['Client']['Read']>;
|
|
255
|
+
checkProjectApiKey(type: "user", apiKey: string, session: InternalSession | null, requestType: "client" | "server" | "admin"): Promise<UserApiKeysCrud['Client']['Read'] | null>;
|
|
256
|
+
checkProjectApiKey(type: "team", apiKey: string, session: InternalSession | null, requestType: "client" | "server" | "admin"): Promise<TeamApiKeysCrud['Client']['Read'] | null>;
|
|
257
|
+
checkProjectApiKey(type: "user" | "team", apiKey: string, session: InternalSession | null, requestType: "client" | "server" | "admin"): Promise<UserApiKeysCrud['Client']['Read'] | TeamApiKeysCrud['Client']['Read'] | null>;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export { type ClientInterfaceOptions, StackClientInterface };
|
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
|
-
import { KnownErrors } from '../known-errors';
|
|
3
|
-
import {
|
|
4
|
-
import { ReadonlyJson } from '../utils/json';
|
|
5
|
-
import {
|
|
6
|
-
import { Result } from
|
|
7
|
-
import { ContactChannelsCrud } from './crud/contact-channels';
|
|
8
|
-
import { CurrentUserCrud } from './crud/current-user';
|
|
9
|
-
import { ConnectedAccountAccessTokenCrud } from './crud/oauth';
|
|
10
|
-
import {
|
|
11
|
-
import { ProjectPermissionsCrud } from './crud/project-permissions';
|
|
12
|
-
import {
|
|
13
|
-
import { SessionsCrud } from './crud/sessions';
|
|
14
|
-
import { TeamInvitationCrud } from './crud/team-invitation';
|
|
15
|
-
import { TeamMemberProfilesCrud } from './crud/team-member-profiles';
|
|
16
|
-
import { TeamPermissionsCrud } from './crud/team-permissions';
|
|
17
|
-
import { TeamsCrud } from './crud/teams';
|
|
18
|
-
|
|
2
|
+
import { KnownErrors } from '../known-errors.js';
|
|
3
|
+
import { InternalSession, RefreshToken, AccessToken } from '../sessions.js';
|
|
4
|
+
import { ReadonlyJson } from '../utils/json.js';
|
|
5
|
+
import { PublicKeyCredentialCreationOptionsJSON, RegistrationResponseJSON, PublicKeyCredentialRequestOptionsJSON, AuthenticationResponseJSON } from '@simplewebauthn/types';
|
|
6
|
+
import { Result } from '../utils/results.js';
|
|
7
|
+
import { ContactChannelsCrud } from './crud/contact-channels.js';
|
|
8
|
+
import { CurrentUserCrud } from './crud/current-user.js';
|
|
9
|
+
import { ConnectedAccountAccessTokenCrud } from './crud/oauth.js';
|
|
10
|
+
import { UserApiKeysCrud, TeamApiKeysCrud, userApiKeysCreateInputSchema, userApiKeysCreateOutputSchema, teamApiKeysCreateInputSchema, teamApiKeysCreateOutputSchema } from './crud/project-api-keys.js';
|
|
11
|
+
import { ProjectPermissionsCrud } from './crud/project-permissions.js';
|
|
12
|
+
import { ClientProjectsCrud, AdminUserProjectsCrud } from './crud/projects.js';
|
|
13
|
+
import { SessionsCrud } from './crud/sessions.js';
|
|
14
|
+
import { TeamInvitationCrud } from './crud/team-invitation.js';
|
|
15
|
+
import { TeamMemberProfilesCrud } from './crud/team-member-profiles.js';
|
|
16
|
+
import { TeamPermissionsCrud } from './crud/team-permissions.js';
|
|
17
|
+
import { TeamsCrud } from './crud/teams.js';
|
|
18
|
+
import '../utils/errors.js';
|
|
19
|
+
import 'jose';
|
|
20
|
+
import '../crud.js';
|
|
21
|
+
import '../utils/types.js';
|
|
22
|
+
|
|
23
|
+
type ClientInterfaceOptions = {
|
|
19
24
|
clientVersion: string;
|
|
20
25
|
getBaseUrl: () => string;
|
|
21
26
|
extraRequestHeaders: Record<string, string>;
|
|
@@ -26,7 +31,7 @@ export type ClientInterfaceOptions = {
|
|
|
26
31
|
} | {
|
|
27
32
|
projectOwnerSession: InternalSession;
|
|
28
33
|
});
|
|
29
|
-
|
|
34
|
+
declare class StackClientInterface {
|
|
30
35
|
readonly options: ClientInterfaceOptions;
|
|
31
36
|
constructor(options: ClientInterfaceOptions);
|
|
32
37
|
get projectId(): string;
|
|
@@ -251,3 +256,5 @@ export declare class StackClientInterface {
|
|
|
251
256
|
checkProjectApiKey(type: "team", apiKey: string, session: InternalSession | null, requestType: "client" | "server" | "admin"): Promise<TeamApiKeysCrud['Client']['Read'] | null>;
|
|
252
257
|
checkProjectApiKey(type: "user" | "team", apiKey: string, session: InternalSession | null, requestType: "client" | "server" | "admin"): Promise<UserApiKeysCrud['Client']['Read'] | TeamApiKeysCrud['Client']['Read'] | null>;
|
|
253
258
|
}
|
|
259
|
+
|
|
260
|
+
export { type ClientInterfaceOptions, StackClientInterface };
|