@stackframe/stack-shared 2.8.8 → 2.8.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/config/format.d.cts +39 -0
- package/dist/config/format.d.ts +14 -13
- package/dist/config/format.js +147 -206
- package/dist/config/format.js.map +1 -0
- package/dist/config/schema.d.cts +724 -0
- package/dist/config/schema.d.ts +51 -48
- package/dist/config/schema.js +230 -172
- package/dist/config/schema.js.map +1 -0
- package/dist/crud.d.cts +102 -0
- package/dist/crud.d.ts +15 -13
- package/dist/crud.js +83 -128
- package/dist/crud.js.map +1 -0
- package/dist/esm/config/format.js +135 -0
- package/dist/esm/config/format.js.map +1 -0
- package/dist/esm/config/schema.js +199 -0
- package/dist/esm/config/schema.js.map +1 -0
- package/dist/esm/crud.js +60 -0
- package/dist/esm/crud.js.map +1 -0
- package/dist/esm/global.d.js +1 -0
- package/dist/esm/global.d.js.map +1 -0
- package/dist/esm/helpers/password.js +17 -0
- package/dist/esm/helpers/password.js.map +1 -0
- package/dist/esm/helpers/production-mode.js +50 -0
- package/dist/esm/helpers/production-mode.js.map +1 -0
- package/dist/esm/hooks/use-async-callback.js +38 -0
- package/dist/esm/hooks/use-async-callback.js.map +1 -0
- package/dist/esm/hooks/use-async-external-store.js +23 -0
- package/dist/esm/hooks/use-async-external-store.js.map +1 -0
- package/dist/esm/hooks/use-hash.js +17 -0
- package/dist/esm/hooks/use-hash.js.map +1 -0
- package/dist/esm/hooks/use-strict-memo.js +61 -0
- package/dist/esm/hooks/use-strict-memo.js.map +1 -0
- package/dist/esm/index.js +22 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/interface/adminInterface.js +244 -0
- package/dist/esm/interface/adminInterface.js.map +1 -0
- package/dist/esm/interface/clientInterface.js +2041 -0
- package/dist/esm/interface/clientInterface.js.map +1 -0
- package/dist/esm/interface/crud/contact-channels.js +77 -0
- package/dist/esm/interface/crud/contact-channels.js.map +1 -0
- package/dist/esm/interface/crud/current-user.js +65 -0
- package/dist/esm/interface/crud/current-user.js.map +1 -0
- package/dist/esm/interface/crud/email-templates.js +52 -0
- package/dist/esm/interface/crud/email-templates.js.map +1 -0
- package/dist/esm/interface/crud/emails.js +20 -0
- package/dist/esm/interface/crud/emails.js.map +1 -0
- package/dist/esm/interface/crud/internal-api-keys.js +69 -0
- package/dist/esm/interface/crud/internal-api-keys.js.map +1 -0
- package/dist/esm/interface/crud/oauth.js +24 -0
- package/dist/esm/interface/crud/oauth.js.map +1 -0
- package/dist/esm/interface/crud/project-api-keys.js +93 -0
- package/dist/esm/interface/crud/project-api-keys.js.map +1 -0
- package/dist/esm/interface/crud/project-permissions.js +113 -0
- package/dist/esm/interface/crud/project-permissions.js.map +1 -0
- package/dist/esm/interface/crud/projects.js +188 -0
- package/dist/esm/interface/crud/projects.js.map +1 -0
- package/dist/esm/interface/crud/sessions.js +62 -0
- package/dist/esm/interface/crud/sessions.js.map +1 -0
- package/dist/esm/interface/crud/svix-token.js +22 -0
- package/dist/esm/interface/crud/svix-token.js.map +1 -0
- package/dist/esm/interface/crud/team-invitation-details.js +23 -0
- package/dist/esm/interface/crud/team-invitation-details.js.map +1 -0
- package/dist/esm/interface/crud/team-invitation.js +36 -0
- package/dist/esm/interface/crud/team-invitation.js.map +1 -0
- package/dist/esm/interface/crud/team-member-profiles.js +62 -0
- package/dist/esm/interface/crud/team-member-profiles.js.map +1 -0
- package/dist/esm/interface/crud/team-memberships.js +60 -0
- package/dist/esm/interface/crud/team-memberships.js.map +1 -0
- package/dist/esm/interface/crud/team-permissions.js +114 -0
- package/dist/esm/interface/crud/team-permissions.js.map +1 -0
- package/dist/esm/interface/crud/teams.js +143 -0
- package/dist/esm/interface/crud/teams.js.map +1 -0
- package/dist/esm/interface/crud/users.js +139 -0
- package/dist/esm/interface/crud/users.js.map +1 -0
- package/dist/esm/interface/serverInterface.js +485 -0
- package/dist/esm/interface/serverInterface.js.map +1 -0
- package/dist/esm/interface/webhooks.js +21 -0
- package/dist/esm/interface/webhooks.js.map +1 -0
- package/dist/esm/known-errors.js +1223 -0
- package/dist/esm/known-errors.js.map +1 -0
- package/dist/esm/schema-fields.js +484 -0
- package/dist/esm/schema-fields.js.map +1 -0
- package/dist/esm/sessions.js +168 -0
- package/dist/esm/sessions.js.map +1 -0
- package/dist/esm/utils/api-keys.js +79 -0
- package/dist/esm/utils/api-keys.js.map +1 -0
- package/dist/esm/utils/arrays.js +78 -0
- package/dist/esm/utils/arrays.js.map +1 -0
- package/dist/esm/utils/base64.js +18 -0
- package/dist/esm/utils/base64.js.map +1 -0
- package/dist/esm/utils/booleans.js +12 -0
- package/dist/esm/utils/booleans.js.map +1 -0
- package/dist/esm/utils/browser-compat.js +21 -0
- package/dist/esm/utils/browser-compat.js.map +1 -0
- package/dist/esm/utils/bytes.js +160 -0
- package/dist/esm/utils/bytes.js.map +1 -0
- package/dist/esm/utils/caches.js +167 -0
- package/dist/esm/utils/caches.js.map +1 -0
- package/dist/esm/utils/compile-time.js +11 -0
- package/dist/esm/utils/compile-time.js.map +1 -0
- package/dist/esm/utils/crypto.js +25 -0
- package/dist/esm/utils/crypto.js.map +1 -0
- package/dist/esm/utils/dates.js +64 -0
- package/dist/esm/utils/dates.js.map +1 -0
- package/dist/esm/utils/dom.js +11 -0
- package/dist/esm/utils/dom.js.map +1 -0
- package/dist/esm/utils/env.js +58 -0
- package/dist/esm/utils/env.js.map +1 -0
- package/dist/esm/utils/errors.js +174 -0
- package/dist/esm/utils/errors.js.map +1 -0
- package/dist/esm/utils/fs.js +37 -0
- package/dist/esm/utils/fs.js.map +1 -0
- package/dist/esm/utils/functions.js +12 -0
- package/dist/esm/utils/functions.js.map +1 -0
- package/dist/esm/utils/geo.js +15 -0
- package/dist/esm/utils/geo.js.map +1 -0
- package/dist/esm/utils/globals.js +18 -0
- package/dist/esm/utils/globals.js.map +1 -0
- package/dist/esm/utils/hashes.js +55 -0
- package/dist/esm/utils/hashes.js.map +1 -0
- package/dist/esm/utils/html.js +13 -0
- package/dist/esm/utils/html.js.map +1 -0
- package/dist/esm/utils/http.js +60 -0
- package/dist/esm/utils/http.js.map +1 -0
- package/dist/esm/utils/ips.js +15 -0
- package/dist/esm/utils/ips.js.map +1 -0
- package/dist/esm/utils/json.js +31 -0
- package/dist/esm/utils/json.js.map +1 -0
- package/dist/esm/utils/jwt.js +87 -0
- package/dist/esm/utils/jwt.js.map +1 -0
- package/dist/esm/utils/locks.js +57 -0
- package/dist/esm/utils/locks.js.map +1 -0
- package/dist/esm/utils/maps.js +181 -0
- package/dist/esm/utils/maps.js.map +1 -0
- package/dist/esm/utils/math.js +8 -0
- package/dist/esm/utils/math.js.map +1 -0
- package/dist/esm/utils/node-http.js +42 -0
- package/dist/esm/utils/node-http.js.map +1 -0
- package/dist/esm/utils/numbers.js +32 -0
- package/dist/esm/utils/numbers.js.map +1 -0
- package/dist/esm/utils/oauth.js +10 -0
- package/dist/esm/utils/oauth.js.map +1 -0
- package/dist/esm/utils/objects.js +153 -0
- package/dist/esm/utils/objects.js.map +1 -0
- package/dist/esm/utils/passkey.js +1 -0
- package/dist/esm/utils/passkey.js.map +1 -0
- package/dist/esm/utils/promises.js +233 -0
- package/dist/esm/utils/promises.js.map +1 -0
- package/dist/esm/utils/proxies.js +128 -0
- package/dist/esm/utils/proxies.js.map +1 -0
- package/dist/esm/utils/react.js +78 -0
- package/dist/esm/utils/react.js.map +1 -0
- package/dist/esm/utils/results.js +141 -0
- package/dist/esm/utils/results.js.map +1 -0
- package/dist/esm/utils/sentry.js +20 -0
- package/dist/esm/utils/sentry.js.map +1 -0
- package/dist/esm/utils/stores.js +195 -0
- package/dist/esm/utils/stores.js.map +1 -0
- package/dist/esm/utils/strings.js +294 -0
- package/dist/esm/utils/strings.js.map +1 -0
- package/dist/esm/utils/strings.nicify.test.js +222 -0
- package/dist/esm/utils/strings.nicify.test.js.map +1 -0
- package/dist/esm/utils/types.js +1 -0
- package/dist/esm/utils/types.js.map +1 -0
- package/dist/esm/utils/unicode.js +11 -0
- package/dist/esm/utils/unicode.js.map +1 -0
- package/dist/esm/utils/urls.js +53 -0
- package/dist/esm/utils/urls.js.map +1 -0
- package/dist/esm/utils/uuids.js +16 -0
- package/dist/esm/utils/uuids.js.map +1 -0
- package/dist/global.d.d.cts +1 -0
- package/dist/global.d.d.ts +1 -0
- package/dist/global.d.js +2 -0
- package/dist/global.d.js.map +1 -0
- package/dist/helpers/password.d.cts +11 -0
- package/dist/helpers/password.d.ts +11 -2
- package/dist/helpers/password.js +41 -11
- package/dist/helpers/password.js.map +1 -0
- package/dist/helpers/production-mode.d.cts +12 -0
- package/dist/helpers/production-mode.d.ts +9 -3
- package/dist/helpers/production-mode.js +72 -45
- package/dist/helpers/production-mode.js.map +1 -0
- package/dist/hooks/use-async-callback.d.cts +6 -0
- package/dist/hooks/use-async-callback.d.ts +6 -3
- package/dist/hooks/use-async-callback.js +72 -30
- package/dist/hooks/use-async-callback.js.map +1 -0
- package/dist/hooks/use-async-external-store.d.cts +7 -0
- package/dist/hooks/use-async-external-store.d.ts +5 -2
- package/dist/hooks/use-async-external-store.js +47 -19
- package/dist/hooks/use-async-external-store.js.map +1 -0
- package/dist/hooks/use-hash.d.cts +3 -0
- package/dist/hooks/use-hash.d.ts +3 -1
- package/dist/hooks/use-hash.js +41 -8
- package/dist/hooks/use-hash.js.map +1 -0
- package/dist/hooks/use-strict-memo.d.cts +8 -0
- package/dist/hooks/use-strict-memo.d.ts +3 -1
- package/dist/hooks/use-strict-memo.js +78 -131
- package/dist/hooks/use-strict-memo.js.map +1 -0
- package/dist/index.d.cts +30 -0
- package/dist/index.d.ts +30 -4
- package/dist/index.js +42 -4
- package/dist/index.js.map +1 -0
- package/dist/interface/adminInterface.d.cts +94 -0
- package/dist/interface/adminInterface.d.ts +38 -15
- package/dist/interface/adminInterface.js +269 -174
- package/dist/interface/adminInterface.js.map +1 -0
- package/dist/interface/clientInterface.d.cts +260 -0
- package/dist/interface/clientInterface.d.ts +25 -18
- package/dist/interface/clientInterface.js +2054 -995
- package/dist/interface/clientInterface.js.map +1 -0
- package/dist/interface/crud/contact-channels.d.cts +180 -0
- package/dist/interface/crud/contact-channels.d.ts +30 -25
- package/dist/interface/crud/contact-channels.js +101 -59
- package/dist/interface/crud/contact-channels.js.map +1 -0
- package/dist/interface/crud/current-user.d.cts +205 -0
- package/dist/interface/crud/current-user.d.ts +17 -12
- package/dist/interface/crud/current-user.js +86 -56
- package/dist/interface/crud/current-user.js.map +1 -0
- package/dist/interface/crud/email-templates.d.cts +84 -0
- package/dist/interface/crud/email-templates.d.ts +24 -19
- package/dist/interface/crud/email-templates.js +77 -37
- package/dist/interface/crud/email-templates.js.map +1 -0
- package/dist/interface/crud/emails.d.cts +69 -0
- package/dist/interface/crud/emails.d.ts +12 -7
- package/dist/interface/crud/emails.js +54 -12
- package/dist/interface/crud/emails.js.map +1 -0
- package/dist/interface/crud/internal-api-keys.d.cts +139 -0
- package/dist/interface/crud/internal-api-keys.d.ts +22 -17
- package/dist/interface/crud/internal-api-keys.js +92 -54
- package/dist/interface/crud/internal-api-keys.js.map +1 -0
- package/dist/interface/crud/oauth.d.cts +34 -0
- package/dist/interface/crud/oauth.d.ts +16 -11
- package/dist/interface/crud/oauth.js +48 -14
- package/dist/interface/crud/oauth.js.map +1 -0
- package/dist/interface/crud/project-api-keys.d.cts +196 -0
- package/dist/interface/crud/project-api-keys.d.ts +18 -10
- package/dist/interface/crud/project-api-keys.js +121 -74
- package/dist/interface/crud/project-api-keys.js.map +1 -0
- package/dist/interface/crud/project-permissions.d.cts +160 -0
- package/dist/interface/crud/project-permissions.d.ts +38 -33
- package/dist/interface/crud/project-permissions.js +148 -90
- package/dist/interface/crud/project-permissions.js.map +1 -0
- package/dist/interface/crud/projects.d.cts +640 -0
- package/dist/interface/crud/projects.d.ts +36 -31
- package/dist/interface/crud/projects.js +218 -156
- package/dist/interface/crud/projects.js.map +1 -0
- package/dist/interface/crud/sessions.d.cts +149 -0
- package/dist/interface/crud/sessions.d.ts +21 -16
- package/dist/interface/crud/sessions.js +86 -50
- package/dist/interface/crud/sessions.js.map +1 -0
- package/dist/interface/crud/svix-token.d.cts +26 -0
- package/dist/interface/crud/svix-token.d.ts +14 -9
- package/dist/interface/crud/svix-token.js +46 -12
- package/dist/interface/crud/svix-token.js.map +1 -0
- package/dist/interface/crud/team-invitation-details.d.cts +30 -0
- package/dist/interface/crud/team-invitation-details.d.ts +12 -7
- package/dist/interface/crud/team-invitation-details.js +57 -15
- package/dist/interface/crud/team-invitation-details.js.map +1 -0
- package/dist/interface/crud/team-invitation.d.cts +49 -0
- package/dist/interface/crud/team-invitation.d.ts +13 -8
- package/dist/interface/crud/team-invitation.js +69 -27
- package/dist/interface/crud/team-invitation.js.map +1 -0
- package/dist/interface/crud/team-member-profiles.d.cts +229 -0
- package/dist/interface/crud/team-member-profiles.d.ts +20 -15
- package/dist/interface/crud/team-member-profiles.js +95 -49
- package/dist/interface/crud/team-member-profiles.js.map +1 -0
- package/dist/interface/crud/team-memberships.d.cts +74 -0
- package/dist/interface/crud/team-memberships.d.ts +22 -17
- package/dist/interface/crud/team-memberships.js +85 -45
- package/dist/interface/crud/team-memberships.js.map +1 -0
- package/dist/interface/crud/team-permissions.d.cts +168 -0
- package/dist/interface/crud/team-permissions.d.ts +38 -33
- package/dist/interface/crud/team-permissions.js +149 -91
- package/dist/interface/crud/team-permissions.js.map +1 -0
- package/dist/interface/crud/teams.d.cts +298 -0
- package/dist/interface/crud/teams.d.ts +45 -40
- package/dist/interface/crud/teams.js +177 -119
- package/dist/interface/crud/teams.js.map +1 -0
- package/dist/interface/crud/users.d.cts +469 -0
- package/dist/interface/crud/users.d.ts +31 -26
- package/dist/interface/crud/users.js +172 -118
- package/dist/interface/crud/users.js.map +1 -0
- package/dist/interface/serverInterface.d.cts +128 -0
- package/dist/interface/serverInterface.d.ts +29 -17
- package/dist/interface/serverInterface.js +506 -339
- package/dist/interface/serverInterface.js.map +1 -0
- package/dist/interface/webhooks.d.cts +292 -0
- package/dist/interface/webhooks.d.ts +6 -3
- package/dist/interface/webhooks.js +45 -15
- package/dist/interface/webhooks.js.map +1 -0
- package/dist/known-errors.d.cts +444 -0
- package/dist/known-errors.d.ts +12 -9
- package/dist/known-errors.js +1088 -561
- package/dist/known-errors.js.map +1 -0
- package/dist/schema-fields.d.cts +163 -0
- package/dist/schema-fields.d.ts +116 -114
- package/dist/schema-fields.js +593 -427
- package/dist/schema-fields.js.map +1 -0
- package/dist/sessions.d.cts +109 -0
- package/dist/sessions.d.ts +6 -3
- package/dist/sessions.js +201 -172
- package/dist/sessions.js.map +1 -0
- package/dist/utils/api-keys.d.cts +24 -0
- package/dist/utils/api-keys.d.ts +5 -4
- package/dist/utils/api-keys.js +106 -66
- package/dist/utils/api-keys.js.map +1 -0
- package/dist/utils/arrays.d.cts +18 -0
- package/dist/utils/arrays.d.ts +15 -13
- package/dist/utils/arrays.js +101 -168
- package/dist/utils/arrays.js.map +1 -0
- package/dist/utils/base64.d.cts +4 -0
- package/dist/utils/base64.d.ts +4 -2
- package/dist/utils/base64.js +41 -20
- package/dist/utils/base64.js.map +1 -0
- package/dist/utils/booleans.d.cts +6 -0
- package/dist/utils/booleans.d.ts +6 -4
- package/dist/utils/booleans.js +35 -27
- package/dist/utils/booleans.js.map +1 -0
- package/dist/utils/browser-compat.d.cts +8 -0
- package/dist/utils/browser-compat.d.ts +3 -1
- package/dist/utils/browser-compat.js +45 -16
- package/dist/utils/browser-compat.js.map +1 -0
- package/dist/utils/bytes.d.cts +15 -0
- package/dist/utils/bytes.d.ts +15 -13
- package/dist/utils/bytes.js +182 -270
- package/dist/utils/bytes.js.map +1 -0
- package/dist/utils/caches.d.cts +98 -0
- package/dist/utils/caches.d.ts +17 -14
- package/dist/utils/caches.js +188 -193
- package/dist/utils/caches.js.map +1 -0
- package/dist/utils/compile-time.d.cts +8 -0
- package/dist/utils/compile-time.d.ts +3 -1
- package/dist/utils/compile-time.js +35 -10
- package/dist/utils/compile-time.js.map +1 -0
- package/dist/utils/crypto.d.cts +8 -0
- package/dist/utils/crypto.d.ts +4 -2
- package/dist/utils/crypto.js +49 -21
- package/dist/utils/crypto.js.map +1 -0
- package/dist/utils/dates.d.cts +15 -0
- package/dist/utils/dates.d.ts +6 -4
- package/dist/utils/dates.js +83 -105
- package/dist/utils/dates.js.map +1 -0
- package/dist/utils/dom.d.cts +3 -0
- package/dist/utils/dom.d.ts +3 -1
- package/dist/utils/dom.js +35 -7
- package/dist/utils/dom.js.map +1 -0
- package/dist/utils/env.d.cts +9 -0
- package/dist/utils/env.d.ts +6 -4
- package/dist/utils/env.js +70 -43
- package/dist/utils/env.js.map +1 -0
- package/dist/utils/errors.d.cts +223 -0
- package/dist/utils/errors.d.ts +14 -11
- package/dist/utils/errors.js +148 -126
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/fs.d.cts +7 -0
- package/dist/utils/fs.d.ts +5 -3
- package/dist/utils/fs.js +70 -27
- package/dist/utils/fs.js.map +1 -0
- package/dist/utils/functions.d.cts +4 -0
- package/dist/utils/functions.d.ts +4 -2
- package/dist/utils/functions.js +35 -18
- package/dist/utils/functions.js.map +1 -0
- package/dist/utils/geo.d.cts +22 -0
- package/dist/utils/geo.d.ts +6 -3
- package/dist/utils/geo.js +39 -9
- package/dist/utils/geo.js.map +1 -0
- package/dist/utils/globals.d.cts +5 -0
- package/dist/utils/globals.d.ts +4 -2
- package/dist/utils/globals.js +41 -14
- package/dist/utils/globals.js.map +1 -0
- package/dist/utils/hashes.d.cts +7 -0
- package/dist/utils/hashes.d.ts +7 -5
- package/dist/utils/hashes.js +87 -41
- package/dist/utils/hashes.js.map +1 -0
- package/dist/utils/html.d.cts +4 -0
- package/dist/utils/html.d.ts +4 -2
- package/dist/utils/html.js +36 -37
- package/dist/utils/html.js.map +1 -0
- package/dist/utils/http.d.cts +43 -0
- package/dist/utils/http.d.ts +6 -4
- package/dist/utils/http.js +83 -83
- package/dist/utils/http.js.map +1 -0
- package/dist/utils/ips.d.cts +6 -0
- package/dist/utils/ips.d.ts +6 -4
- package/dist/utils/ips.js +48 -35
- package/dist/utils/ips.js.map +1 -0
- package/dist/utils/json.d.cts +13 -0
- package/dist/utils/json.d.ts +9 -6
- package/dist/utils/json.js +54 -157
- package/dist/utils/json.js.map +1 -0
- package/dist/utils/jwt.d.cts +44 -0
- package/dist/utils/jwt.d.ts +14 -11
- package/dist/utils/jwt.js +119 -84
- package/dist/utils/jwt.js.map +1 -0
- package/dist/utils/locks.d.cts +15 -0
- package/dist/utils/locks.d.ts +3 -2
- package/dist/utils/locks.js +76 -56
- package/dist/utils/locks.js.map +1 -0
- package/dist/utils/maps.d.cts +59 -0
- package/dist/utils/maps.d.ts +6 -4
- package/dist/utils/maps.js +207 -343
- package/dist/utils/maps.js.map +1 -0
- package/dist/utils/math.d.cts +6 -0
- package/dist/utils/math.d.ts +3 -1
- package/dist/utils/math.js +31 -16
- package/dist/utils/math.js.map +1 -0
- package/dist/utils/node-http.d.cts +15 -0
- package/dist/utils/node-http.d.ts +5 -5
- package/dist/utils/node-http.js +65 -36
- package/dist/utils/node-http.js.map +1 -0
- package/dist/utils/numbers.d.cts +5 -0
- package/dist/utils/numbers.d.ts +5 -3
- package/dist/utils/numbers.js +53 -66
- package/dist/utils/numbers.js.map +1 -0
- package/dist/utils/oauth.d.cts +8 -0
- package/dist/utils/oauth.d.ts +8 -6
- package/dist/utils/oauth.js +37 -4
- package/dist/utils/oauth.js.map +1 -0
- package/dist/utils/objects.d.cts +65 -0
- package/dist/utils/objects.d.ts +31 -30
- package/dist/utils/objects.js +196 -374
- package/dist/utils/objects.js.map +1 -0
- package/dist/utils/passkey.d.cts +1 -0
- package/dist/utils/passkey.d.ts +1 -1
- package/dist/utils/passkey.js +19 -1
- package/dist/utils/passkey.js.map +1 -0
- package/dist/utils/promises.d.cts +74 -0
- package/dist/utils/promises.d.ts +20 -18
- package/dist/utils/promises.js +252 -393
- package/dist/utils/promises.js.map +1 -0
- package/dist/utils/proxies.d.cts +4 -0
- package/dist/utils/proxies.d.ts +4 -2
- package/dist/utils/proxies.js +150 -161
- package/dist/utils/proxies.js.map +1 -0
- package/dist/utils/react.d.cts +25 -0
- package/dist/utils/react.d.ts +9 -6
- package/dist/utils/react.js +88 -134
- package/dist/utils/react.js.map +1 -0
- package/dist/utils/results.d.cts +78 -0
- package/dist/utils/results.d.ts +10 -9
- package/dist/utils/results.js +143 -324
- package/dist/utils/results.js.map +1 -0
- package/dist/utils/sentry.d.cts +5 -0
- package/dist/utils/sentry.d.ts +5 -2
- package/dist/utils/sentry.js +44 -14
- package/dist/utils/sentry.js.map +1 -0
- package/dist/utils/stores.d.cts +102 -0
- package/dist/utils/stores.d.ts +12 -9
- package/dist/utils/stores.js +219 -189
- package/dist/utils/stores.js.map +1 -0
- package/dist/utils/strings.d.cts +72 -0
- package/dist/utils/strings.d.ts +22 -20
- package/dist/utils/strings.js +299 -580
- package/dist/utils/strings.js.map +1 -0
- package/dist/utils/strings.nicify.test.d.cts +2 -0
- package/dist/utils/strings.nicify.test.d.ts +2 -1
- package/dist/utils/strings.nicify.test.js +168 -158
- package/dist/utils/strings.nicify.test.js.map +1 -0
- package/dist/utils/types.d.cts +23 -0
- package/dist/utils/types.d.ts +8 -6
- package/dist/utils/types.js +19 -1
- package/dist/utils/types.js.map +1 -0
- package/dist/utils/unicode.d.cts +3 -0
- package/dist/utils/unicode.d.ts +3 -1
- package/dist/utils/unicode.js +34 -21
- package/dist/utils/unicode.js.map +1 -0
- package/dist/utils/urls.d.cts +20 -0
- package/dist/utils/urls.d.ts +10 -8
- package/dist/utils/urls.js +76 -165
- package/dist/utils/urls.js.map +1 -0
- package/dist/utils/uuids.d.cts +4 -0
- package/dist/utils/uuids.d.ts +4 -2
- package/dist/utils/uuids.js +39 -35
- package/dist/utils/uuids.js.map +1 -0
- package/package.json +5 -5
package/dist/config/schema.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import * as yup from
|
|
2
|
-
import { DeepMerge } from
|
|
3
|
-
import { PrettifyType } from
|
|
4
|
-
import { NormalizesTo } from
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import * as yup from 'yup';
|
|
2
|
+
import { DeepMerge } from '../utils/objects.js';
|
|
3
|
+
import { PrettifyType } from '../utils/types.js';
|
|
4
|
+
import { NormalizesTo } from './format.js';
|
|
5
|
+
|
|
6
|
+
declare const configLevels: readonly ["project", "branch", "environment", "organization"];
|
|
7
|
+
type ConfigLevel = typeof configLevels[number];
|
|
7
8
|
/**
|
|
8
9
|
* All fields that can be overridden at this level.
|
|
9
10
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
declare const projectConfigSchema: yup.ObjectSchema<{}, yup.AnyObject, {}, "">;
|
|
12
|
+
declare const branchConfigSchema: yup.ObjectSchema<{} & {
|
|
12
13
|
rbac: {
|
|
13
14
|
permissions?: Record<string, {
|
|
14
15
|
description?: string | undefined;
|
|
@@ -51,7 +52,7 @@ export declare const branchConfigSchema: yup.ObjectSchema<{} & {
|
|
|
51
52
|
oauth?: {
|
|
52
53
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
53
54
|
providers?: Record<string, {
|
|
54
|
-
type?: "
|
|
55
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
55
56
|
allowSignIn?: boolean | undefined;
|
|
56
57
|
allowConnectedAccounts?: boolean | undefined;
|
|
57
58
|
}> | undefined;
|
|
@@ -101,7 +102,7 @@ export declare const branchConfigSchema: yup.ObjectSchema<{} & {
|
|
|
101
102
|
};
|
|
102
103
|
emails: {};
|
|
103
104
|
}, "">;
|
|
104
|
-
|
|
105
|
+
declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
105
106
|
rbac: {
|
|
106
107
|
permissions?: Record<string, {
|
|
107
108
|
description?: string | undefined;
|
|
@@ -149,7 +150,7 @@ export declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
149
150
|
oauth?: {
|
|
150
151
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
151
152
|
providers?: Record<string, {
|
|
152
|
-
type?: "
|
|
153
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
153
154
|
allowSignIn?: boolean | undefined;
|
|
154
155
|
allowConnectedAccounts?: boolean | undefined;
|
|
155
156
|
}> | undefined;
|
|
@@ -158,13 +159,13 @@ export declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
158
159
|
oauth?: (Omit<{
|
|
159
160
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
160
161
|
providers?: Record<string, {
|
|
161
|
-
type?: "
|
|
162
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
162
163
|
allowSignIn?: boolean | undefined;
|
|
163
164
|
allowConnectedAccounts?: boolean | undefined;
|
|
164
165
|
}> | undefined;
|
|
165
166
|
}, never> & {
|
|
166
167
|
providers?: Record<string, {
|
|
167
|
-
type?: "
|
|
168
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
168
169
|
clientId?: string | undefined;
|
|
169
170
|
clientSecret?: string | undefined;
|
|
170
171
|
allowSignIn?: boolean | undefined;
|
|
@@ -201,7 +202,7 @@ export declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
201
202
|
oauth?: {
|
|
202
203
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
203
204
|
providers?: Record<string, {
|
|
204
|
-
type?: "
|
|
205
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
205
206
|
allowSignIn?: boolean | undefined;
|
|
206
207
|
allowConnectedAccounts?: boolean | undefined;
|
|
207
208
|
}> | undefined;
|
|
@@ -210,13 +211,13 @@ export declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
210
211
|
oauth?: (Omit<{
|
|
211
212
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
212
213
|
providers?: Record<string, {
|
|
213
|
-
type?: "
|
|
214
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
214
215
|
allowSignIn?: boolean | undefined;
|
|
215
216
|
allowConnectedAccounts?: boolean | undefined;
|
|
216
217
|
}> | undefined;
|
|
217
218
|
}, never> & {
|
|
218
219
|
providers?: Record<string, {
|
|
219
|
-
type?: "
|
|
220
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
220
221
|
clientId?: string | undefined;
|
|
221
222
|
clientSecret?: string | undefined;
|
|
222
223
|
allowSignIn?: boolean | undefined;
|
|
@@ -398,7 +399,7 @@ export declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
398
399
|
emails: {};
|
|
399
400
|
};
|
|
400
401
|
}, "">;
|
|
401
|
-
|
|
402
|
+
declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
402
403
|
rbac: {
|
|
403
404
|
permissions?: Record<string, {
|
|
404
405
|
description?: string | undefined;
|
|
@@ -446,7 +447,7 @@ export declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
446
447
|
oauth?: {
|
|
447
448
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
448
449
|
providers?: Record<string, {
|
|
449
|
-
type?: "
|
|
450
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
450
451
|
allowSignIn?: boolean | undefined;
|
|
451
452
|
allowConnectedAccounts?: boolean | undefined;
|
|
452
453
|
}> | undefined;
|
|
@@ -455,13 +456,13 @@ export declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
455
456
|
oauth?: (Omit<{
|
|
456
457
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
457
458
|
providers?: Record<string, {
|
|
458
|
-
type?: "
|
|
459
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
459
460
|
allowSignIn?: boolean | undefined;
|
|
460
461
|
allowConnectedAccounts?: boolean | undefined;
|
|
461
462
|
}> | undefined;
|
|
462
463
|
}, never> & {
|
|
463
464
|
providers?: Record<string, {
|
|
464
|
-
type?: "
|
|
465
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
465
466
|
clientId?: string | undefined;
|
|
466
467
|
clientSecret?: string | undefined;
|
|
467
468
|
allowSignIn?: boolean | undefined;
|
|
@@ -635,10 +636,10 @@ export declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
635
636
|
emails: {};
|
|
636
637
|
};
|
|
637
638
|
}, "">;
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
639
|
+
declare const projectConfigDefaults: {};
|
|
640
|
+
declare const branchConfigDefaults: {};
|
|
641
|
+
declare const environmentConfigDefaults: {};
|
|
642
|
+
declare const organizationConfigDefaults: {
|
|
642
643
|
rbac: {
|
|
643
644
|
permissions: (key: string) => {};
|
|
644
645
|
defaultPermissions: {
|
|
@@ -691,31 +692,33 @@ export declare const organizationConfigDefaults: {
|
|
|
691
692
|
};
|
|
692
693
|
};
|
|
693
694
|
};
|
|
694
|
-
|
|
695
|
+
type DeepReplaceAllowFunctionsForObjects<T> = T extends object ? {
|
|
695
696
|
[K in keyof T]: DeepReplaceAllowFunctionsForObjects<T[K]>;
|
|
696
697
|
} | ((arg: keyof T) => DeepReplaceAllowFunctionsForObjects<T[keyof T]>) : T;
|
|
697
|
-
|
|
698
|
+
type DeepReplaceFunctionsWithObjects<T> = T extends (arg: infer K extends string) => infer R ? DeepReplaceFunctionsWithObjects<Record<K, R>> : (T extends object ? {
|
|
698
699
|
[K in keyof T]: DeepReplaceFunctionsWithObjects<T[K]>;
|
|
699
700
|
} : T);
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
701
|
+
type ApplyDefaults<D extends object | ((key: string) => unknown), C extends object> = DeepMerge<DeepReplaceFunctionsWithObjects<D>, C>;
|
|
702
|
+
declare function applyDefaults<D extends object | ((key: string) => unknown), C extends object>(defaults: D, config: C): ApplyDefaults<D, C>;
|
|
703
|
+
type ProjectConfigNormalizedOverride = yup.InferType<typeof projectConfigSchema>;
|
|
704
|
+
type BranchConfigNormalizedOverride = yup.InferType<typeof branchConfigSchema>;
|
|
705
|
+
type EnvironmentConfigNormalizedOverride = yup.InferType<typeof environmentConfigSchema>;
|
|
706
|
+
type OrganizationConfigNormalizedOverride = yup.InferType<typeof organizationConfigSchema>;
|
|
707
|
+
type ProjectConfigStrippedNormalizedOverride = Omit<ProjectConfigNormalizedOverride, keyof BranchConfigNormalizedOverride | keyof EnvironmentConfigNormalizedOverride | keyof OrganizationConfigNormalizedOverride>;
|
|
708
|
+
type BranchConfigStrippedNormalizedOverride = Omit<BranchConfigNormalizedOverride, keyof EnvironmentConfigNormalizedOverride | keyof OrganizationConfigNormalizedOverride>;
|
|
709
|
+
type EnvironmentConfigStrippedNormalizedOverride = Omit<EnvironmentConfigNormalizedOverride, keyof OrganizationConfigNormalizedOverride>;
|
|
710
|
+
type OrganizationConfigStrippedNormalizedOverride = OrganizationConfigNormalizedOverride;
|
|
711
|
+
type ProjectConfigOverride = NormalizesTo<ProjectConfigNormalizedOverride>;
|
|
712
|
+
type BranchConfigOverride = NormalizesTo<BranchConfigNormalizedOverride>;
|
|
713
|
+
type EnvironmentConfigOverride = NormalizesTo<EnvironmentConfigNormalizedOverride>;
|
|
714
|
+
type OrganizationConfigOverride = NormalizesTo<OrganizationConfigNormalizedOverride>;
|
|
715
|
+
type ProjectIncompleteConfig = ProjectConfigNormalizedOverride;
|
|
716
|
+
type BranchIncompleteConfig = ProjectIncompleteConfig & BranchConfigNormalizedOverride;
|
|
717
|
+
type EnvironmentIncompleteConfig = BranchIncompleteConfig & EnvironmentConfigNormalizedOverride;
|
|
718
|
+
type OrganizationIncompleteConfig = EnvironmentIncompleteConfig & OrganizationConfigNormalizedOverride;
|
|
719
|
+
type ProjectRenderedConfig = PrettifyType<ApplyDefaults<typeof projectConfigDefaults, ProjectConfigStrippedNormalizedOverride>>;
|
|
720
|
+
type BranchRenderedConfig = PrettifyType<ProjectRenderedConfig & ApplyDefaults<typeof branchConfigDefaults, BranchConfigStrippedNormalizedOverride>>;
|
|
721
|
+
type EnvironmentRenderedConfig = PrettifyType<BranchRenderedConfig & ApplyDefaults<typeof environmentConfigDefaults, EnvironmentConfigStrippedNormalizedOverride>>;
|
|
722
|
+
type OrganizationRenderedConfig = PrettifyType<EnvironmentRenderedConfig & ApplyDefaults<typeof organizationConfigDefaults, OrganizationConfigStrippedNormalizedOverride>>;
|
|
723
|
+
|
|
724
|
+
export { type ApplyDefaults, type BranchConfigNormalizedOverride, type BranchConfigOverride, type BranchConfigStrippedNormalizedOverride, type BranchIncompleteConfig, type BranchRenderedConfig, type ConfigLevel, type DeepReplaceAllowFunctionsForObjects, type DeepReplaceFunctionsWithObjects, type EnvironmentConfigNormalizedOverride, type EnvironmentConfigOverride, type EnvironmentConfigStrippedNormalizedOverride, type EnvironmentIncompleteConfig, type EnvironmentRenderedConfig, type OrganizationConfigNormalizedOverride, type OrganizationConfigOverride, type OrganizationConfigStrippedNormalizedOverride, type OrganizationIncompleteConfig, type OrganizationRenderedConfig, type ProjectConfigNormalizedOverride, type ProjectConfigOverride, type ProjectConfigStrippedNormalizedOverride, type ProjectIncompleteConfig, type ProjectRenderedConfig, applyDefaults, branchConfigDefaults, branchConfigSchema, configLevels, environmentConfigDefaults, environmentConfigSchema, organizationConfigDefaults, organizationConfigSchema, projectConfigDefaults, projectConfigSchema };
|
package/dist/config/schema.js
CHANGED
|
@@ -1,185 +1,243 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/config/schema.ts
|
|
31
|
+
var schema_exports = {};
|
|
32
|
+
__export(schema_exports, {
|
|
33
|
+
applyDefaults: () => applyDefaults,
|
|
34
|
+
branchConfigDefaults: () => branchConfigDefaults,
|
|
35
|
+
branchConfigSchema: () => branchConfigSchema,
|
|
36
|
+
configLevels: () => configLevels,
|
|
37
|
+
environmentConfigDefaults: () => environmentConfigDefaults,
|
|
38
|
+
environmentConfigSchema: () => environmentConfigSchema,
|
|
39
|
+
organizationConfigDefaults: () => organizationConfigDefaults,
|
|
40
|
+
organizationConfigSchema: () => organizationConfigSchema,
|
|
41
|
+
projectConfigDefaults: () => projectConfigDefaults,
|
|
42
|
+
projectConfigSchema: () => projectConfigSchema
|
|
43
|
+
});
|
|
44
|
+
module.exports = __toCommonJS(schema_exports);
|
|
45
|
+
var schemaFields = __toESM(require("../schema-fields"), 1);
|
|
46
|
+
var import_schema_fields = require("../schema-fields");
|
|
47
|
+
var import_oauth = require("../utils/oauth");
|
|
48
|
+
var import_objects = require("../utils/objects");
|
|
49
|
+
var configLevels = ["project", "branch", "environment", "organization"];
|
|
50
|
+
var permissionRegex = /^\$?[a-z0-9_:]+$/;
|
|
51
|
+
var projectConfigSchema = (0, import_schema_fields.yupObject)({});
|
|
52
|
+
var branchRbacDefaultPermissions = (0, import_schema_fields.yupRecord)(
|
|
53
|
+
(0, import_schema_fields.yupString)().optional().matches(permissionRegex),
|
|
54
|
+
(0, import_schema_fields.yupBoolean)().isTrue().optional()
|
|
55
|
+
).optional();
|
|
56
|
+
var branchRbacSchema = (0, import_schema_fields.yupObject)({
|
|
57
|
+
permissions: (0, import_schema_fields.yupRecord)(
|
|
58
|
+
(0, import_schema_fields.yupString)().optional().matches(permissionRegex),
|
|
59
|
+
(0, import_schema_fields.yupObject)({
|
|
60
|
+
description: (0, import_schema_fields.yupString)().optional(),
|
|
61
|
+
scope: (0, import_schema_fields.yupString)().oneOf(["team", "project"]).optional(),
|
|
62
|
+
containedPermissionIds: (0, import_schema_fields.yupRecord)(
|
|
63
|
+
(0, import_schema_fields.yupString)().optional().matches(permissionRegex),
|
|
64
|
+
(0, import_schema_fields.yupBoolean)().isTrue().optional()
|
|
65
|
+
).optional()
|
|
66
|
+
}).optional()
|
|
67
|
+
).optional(),
|
|
68
|
+
defaultPermissions: (0, import_schema_fields.yupObject)({
|
|
69
|
+
teamCreator: branchRbacDefaultPermissions,
|
|
70
|
+
teamMember: branchRbacDefaultPermissions,
|
|
71
|
+
signUp: branchRbacDefaultPermissions
|
|
72
|
+
}).optional()
|
|
26
73
|
}).optional();
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
user: yupBoolean().optional(),
|
|
33
|
-
}).optional(),
|
|
74
|
+
var branchApiKeysSchema = (0, import_schema_fields.yupObject)({
|
|
75
|
+
enabled: (0, import_schema_fields.yupObject)({
|
|
76
|
+
team: (0, import_schema_fields.yupBoolean)().optional(),
|
|
77
|
+
user: (0, import_schema_fields.yupBoolean)().optional()
|
|
78
|
+
}).optional()
|
|
34
79
|
}).optional();
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
80
|
+
var branchAuthSchema = (0, import_schema_fields.yupObject)({
|
|
81
|
+
allowSignUp: (0, import_schema_fields.yupBoolean)().optional(),
|
|
82
|
+
password: (0, import_schema_fields.yupObject)({
|
|
83
|
+
allowSignIn: (0, import_schema_fields.yupBoolean)().optional()
|
|
84
|
+
}).optional(),
|
|
85
|
+
otp: (0, import_schema_fields.yupObject)({
|
|
86
|
+
allowSignIn: (0, import_schema_fields.yupBoolean)().optional()
|
|
87
|
+
}).optional(),
|
|
88
|
+
passkey: (0, import_schema_fields.yupObject)({
|
|
89
|
+
allowSignIn: (0, import_schema_fields.yupBoolean)().optional()
|
|
90
|
+
}).optional(),
|
|
91
|
+
oauth: (0, import_schema_fields.yupObject)({
|
|
92
|
+
accountMergeStrategy: (0, import_schema_fields.yupString)().oneOf(["link_method", "raise_error", "allow_duplicates"]).optional(),
|
|
93
|
+
providers: (0, import_schema_fields.yupRecord)(
|
|
94
|
+
(0, import_schema_fields.yupString)().optional().matches(permissionRegex),
|
|
95
|
+
(0, import_schema_fields.yupObject)({
|
|
96
|
+
type: (0, import_schema_fields.yupString)().oneOf(import_oauth.allProviders).optional(),
|
|
97
|
+
allowSignIn: (0, import_schema_fields.yupBoolean)().optional(),
|
|
98
|
+
allowConnectedAccounts: (0, import_schema_fields.yupBoolean)().optional()
|
|
99
|
+
}).defined()
|
|
100
|
+
).optional()
|
|
101
|
+
}).optional()
|
|
55
102
|
}).optional();
|
|
56
|
-
|
|
57
|
-
|
|
103
|
+
var branchDomain = (0, import_schema_fields.yupObject)({
|
|
104
|
+
allowLocalhost: (0, import_schema_fields.yupBoolean)().optional()
|
|
58
105
|
}).optional();
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
106
|
+
var branchConfigSchema = projectConfigSchema.concat((0, import_schema_fields.yupObject)({
|
|
107
|
+
rbac: branchRbacSchema,
|
|
108
|
+
teams: (0, import_schema_fields.yupObject)({
|
|
109
|
+
createPersonalTeamOnSignUp: (0, import_schema_fields.yupBoolean)().optional(),
|
|
110
|
+
allowClientTeamCreation: (0, import_schema_fields.yupBoolean)().optional()
|
|
111
|
+
}).optional(),
|
|
112
|
+
users: (0, import_schema_fields.yupObject)({
|
|
113
|
+
allowClientUserDeletion: (0, import_schema_fields.yupBoolean)().optional()
|
|
114
|
+
}).optional(),
|
|
115
|
+
apiKeys: branchApiKeysSchema,
|
|
116
|
+
domains: branchDomain,
|
|
117
|
+
auth: branchAuthSchema,
|
|
118
|
+
emails: (0, import_schema_fields.yupObject)({})
|
|
72
119
|
}));
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
120
|
+
var environmentConfigSchema = branchConfigSchema.concat((0, import_schema_fields.yupObject)({
|
|
121
|
+
auth: branchConfigSchema.getNested("auth").concat((0, import_schema_fields.yupObject)({
|
|
122
|
+
oauth: branchConfigSchema.getNested("auth").getNested("oauth").concat((0, import_schema_fields.yupObject)({
|
|
123
|
+
providers: (0, import_schema_fields.yupRecord)(
|
|
124
|
+
(0, import_schema_fields.yupString)().optional().matches(permissionRegex),
|
|
125
|
+
(0, import_schema_fields.yupObject)({
|
|
126
|
+
type: (0, import_schema_fields.yupString)().oneOf(import_oauth.allProviders).optional(),
|
|
127
|
+
isShared: (0, import_schema_fields.yupBoolean)().optional(),
|
|
128
|
+
clientId: schemaFields.oauthClientIdSchema.optional(),
|
|
129
|
+
clientSecret: schemaFields.oauthClientSecretSchema.optional(),
|
|
130
|
+
facebookConfigId: schemaFields.oauthFacebookConfigIdSchema.optional(),
|
|
131
|
+
microsoftTenantId: schemaFields.oauthMicrosoftTenantIdSchema.optional(),
|
|
132
|
+
allowSignIn: (0, import_schema_fields.yupBoolean)().optional(),
|
|
133
|
+
allowConnectedAccounts: (0, import_schema_fields.yupBoolean)().optional()
|
|
134
|
+
})
|
|
135
|
+
).optional()
|
|
136
|
+
}).optional())
|
|
137
|
+
})),
|
|
138
|
+
emails: branchConfigSchema.getNested("emails").concat((0, import_schema_fields.yupObject)({
|
|
139
|
+
server: (0, import_schema_fields.yupObject)({
|
|
140
|
+
isShared: (0, import_schema_fields.yupBoolean)().optional(),
|
|
141
|
+
host: schemaFields.emailHostSchema.optional().nonEmpty(),
|
|
142
|
+
port: schemaFields.emailPortSchema.optional(),
|
|
143
|
+
username: schemaFields.emailUsernameSchema.optional().nonEmpty(),
|
|
144
|
+
password: schemaFields.emailPasswordSchema.optional().nonEmpty(),
|
|
145
|
+
senderName: schemaFields.emailSenderNameSchema.optional().nonEmpty(),
|
|
146
|
+
senderEmail: schemaFields.emailSenderEmailSchema.optional().nonEmpty()
|
|
147
|
+
})
|
|
148
|
+
}).optional()),
|
|
149
|
+
domains: branchConfigSchema.getNested("domains").concat((0, import_schema_fields.yupObject)({
|
|
150
|
+
trustedDomains: (0, import_schema_fields.yupRecord)(
|
|
151
|
+
(0, import_schema_fields.yupString)().uuid().optional(),
|
|
152
|
+
(0, import_schema_fields.yupObject)({
|
|
153
|
+
baseUrl: schemaFields.urlSchema.optional(),
|
|
154
|
+
handlerPath: schemaFields.handlerPathSchema.optional()
|
|
155
|
+
})
|
|
156
|
+
).optional()
|
|
157
|
+
}))
|
|
105
158
|
}));
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
159
|
+
var organizationConfigSchema = environmentConfigSchema.concat((0, import_schema_fields.yupObject)({}));
|
|
160
|
+
var projectConfigDefaults = {};
|
|
161
|
+
var branchConfigDefaults = {};
|
|
162
|
+
var environmentConfigDefaults = {};
|
|
163
|
+
var organizationConfigDefaults = {
|
|
164
|
+
rbac: {
|
|
165
|
+
permissions: (key) => ({}),
|
|
166
|
+
defaultPermissions: {
|
|
167
|
+
teamCreator: {},
|
|
168
|
+
teamMember: {},
|
|
169
|
+
signUp: {}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
apiKeys: {
|
|
173
|
+
enabled: {
|
|
174
|
+
team: false,
|
|
175
|
+
user: false
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
teams: {
|
|
179
|
+
createPersonalTeamOnSignUp: false,
|
|
180
|
+
allowClientTeamCreation: false
|
|
181
|
+
},
|
|
182
|
+
users: {
|
|
183
|
+
allowClientUserDeletion: false
|
|
184
|
+
},
|
|
185
|
+
domains: {
|
|
186
|
+
allowLocalhost: false,
|
|
187
|
+
trustedDomains: (key) => ({
|
|
188
|
+
handlerPath: "/handler"
|
|
189
|
+
})
|
|
190
|
+
},
|
|
191
|
+
auth: {
|
|
192
|
+
allowSignUp: true,
|
|
193
|
+
password: {
|
|
194
|
+
allowSignIn: false
|
|
140
195
|
},
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
password: {
|
|
144
|
-
allowSignIn: false,
|
|
145
|
-
},
|
|
146
|
-
otp: {
|
|
147
|
-
allowSignIn: false,
|
|
148
|
-
},
|
|
149
|
-
passkey: {
|
|
150
|
-
allowSignIn: false,
|
|
151
|
-
},
|
|
152
|
-
oauth: {
|
|
153
|
-
accountMergeStrategy: 'link_method',
|
|
154
|
-
providers: (key) => ({
|
|
155
|
-
allowSignIn: false,
|
|
156
|
-
allowConnectedAccounts: false,
|
|
157
|
-
}),
|
|
158
|
-
},
|
|
196
|
+
otp: {
|
|
197
|
+
allowSignIn: false
|
|
159
198
|
},
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
isShared: true,
|
|
163
|
-
},
|
|
199
|
+
passkey: {
|
|
200
|
+
allowSignIn: false
|
|
164
201
|
},
|
|
202
|
+
oauth: {
|
|
203
|
+
accountMergeStrategy: "link_method",
|
|
204
|
+
providers: (key) => ({
|
|
205
|
+
allowSignIn: false,
|
|
206
|
+
allowConnectedAccounts: false
|
|
207
|
+
})
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
emails: {
|
|
211
|
+
server: {
|
|
212
|
+
isShared: true
|
|
213
|
+
}
|
|
214
|
+
}
|
|
165
215
|
};
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
set(res, key, mergeValue);
|
|
216
|
+
function applyDefaults(defaults, config) {
|
|
217
|
+
const res = { ...typeof defaults === "function" ? {} : defaults };
|
|
218
|
+
for (const [key, mergeValue] of Object.entries(config)) {
|
|
219
|
+
const baseValue = typeof defaults === "function" ? defaults(key) : (0, import_objects.has)(defaults, key) ? (0, import_objects.get)(defaults, key) : void 0;
|
|
220
|
+
if (baseValue !== void 0) {
|
|
221
|
+
if ((0, import_objects.isObjectLike)(baseValue) && (0, import_objects.isObjectLike)(mergeValue)) {
|
|
222
|
+
(0, import_objects.set)(res, key, applyDefaults(baseValue, mergeValue));
|
|
223
|
+
continue;
|
|
224
|
+
}
|
|
177
225
|
}
|
|
178
|
-
|
|
226
|
+
(0, import_objects.set)(res, key, mergeValue);
|
|
227
|
+
}
|
|
228
|
+
return res;
|
|
179
229
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
230
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
231
|
+
0 && (module.exports = {
|
|
232
|
+
applyDefaults,
|
|
233
|
+
branchConfigDefaults,
|
|
234
|
+
branchConfigSchema,
|
|
235
|
+
configLevels,
|
|
236
|
+
environmentConfigDefaults,
|
|
237
|
+
environmentConfigSchema,
|
|
238
|
+
organizationConfigDefaults,
|
|
239
|
+
organizationConfigSchema,
|
|
240
|
+
projectConfigDefaults,
|
|
241
|
+
projectConfigSchema
|
|
185
242
|
});
|
|
243
|
+
//# sourceMappingURL=schema.js.map
|