@atproto/oauth-provider 0.18.3 → 0.18.4
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 +24 -0
- package/dist/account/account-manager.d.ts.map +1 -1
- package/dist/account/account-manager.js.map +1 -1
- package/dist/account/account-store.js +8 -8
- package/dist/account/account-store.js.map +1 -1
- package/dist/account/sign-in-data.d.ts +2 -2
- package/dist/account/sign-up-input.d.ts +4 -4
- package/dist/client/client-manager.d.ts.map +1 -1
- package/dist/client/client-manager.js.map +1 -1
- package/dist/client/client.d.ts +1 -1
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js.map +1 -1
- package/dist/customization/branding.d.ts +52 -52
- package/dist/customization/colors.d.ts +24 -24
- package/dist/customization/colors.d.ts.map +1 -1
- package/dist/customization/customization.d.ts +77 -77
- package/dist/customization/links.d.ts +4 -4
- package/dist/device/device-manager.d.ts +20 -20
- package/dist/device/device-manager.d.ts.map +1 -1
- package/dist/device/device-manager.js.map +1 -1
- package/dist/device/device-store.js +1 -1
- package/dist/device/device-store.js.map +1 -1
- package/dist/dpop/dpop-manager.d.ts.map +1 -1
- package/dist/dpop/dpop-manager.js.map +1 -1
- package/dist/dpop/dpop-nonce.d.ts.map +1 -1
- package/dist/dpop/dpop-nonce.js +1 -1
- package/dist/dpop/dpop-nonce.js.map +1 -1
- package/dist/errors/access-denied-error.d.ts.map +1 -1
- package/dist/errors/account-selection-required-error.d.ts.map +1 -1
- package/dist/errors/authorization-error.d.ts.map +1 -1
- package/dist/errors/authorization-error.js.map +1 -1
- package/dist/errors/consent-required-error.d.ts.map +1 -1
- package/dist/errors/handle-unavailable-error.d.ts +1 -1
- package/dist/errors/handle-unavailable-error.d.ts.map +1 -1
- package/dist/errors/handle-unavailable-error.js.map +1 -1
- package/dist/errors/invalid-authorization-details-error.d.ts.map +1 -1
- package/dist/errors/invalid-client-error.d.ts.map +1 -1
- package/dist/errors/invalid-client-id-error.d.ts.map +1 -1
- package/dist/errors/invalid-client-metadata-error.d.ts.map +1 -1
- package/dist/errors/invalid-credentials-error.d.ts.map +1 -1
- package/dist/errors/invalid-credentials-error.js.map +1 -1
- package/dist/errors/invalid-dpop-key-binding-error.d.ts.map +1 -1
- package/dist/errors/invalid-dpop-proof-error.d.ts.map +1 -1
- package/dist/errors/invalid-grant-error.d.ts.map +1 -1
- package/dist/errors/invalid-invite-code-error.d.ts.map +1 -1
- package/dist/errors/invalid-redirect-uri-error.d.ts.map +1 -1
- package/dist/errors/invalid-request-error.d.ts.map +1 -1
- package/dist/errors/invalid-scope-error.d.ts.map +1 -1
- package/dist/errors/invalid-token-error.d.ts.map +1 -1
- package/dist/errors/invalid-token-error.js.map +1 -1
- package/dist/errors/login-required-error.d.ts.map +1 -1
- package/dist/errors/oauth-error.d.ts.map +1 -1
- package/dist/errors/oauth-error.js.map +1 -1
- package/dist/errors/second-authentication-factor-required-error.d.ts +2 -2
- package/dist/errors/second-authentication-factor-required-error.d.ts.map +1 -1
- package/dist/errors/second-authentication-factor-required-error.js.map +1 -1
- package/dist/errors/unauthorized-client-error.d.ts.map +1 -1
- package/dist/errors/use-dpop-nonce-error.d.ts.map +1 -1
- package/dist/errors/www-authenticate-error.d.ts.map +1 -1
- package/dist/lexicon/lexicon-getter.d.ts.map +1 -1
- package/dist/lexicon/lexicon-manager.d.ts.map +1 -1
- package/dist/lexicon/lexicon-store.js +1 -1
- package/dist/lexicon/lexicon-store.js.map +1 -1
- package/dist/lib/csp/index.d.ts +3 -3
- package/dist/lib/csp/index.d.ts.map +1 -1
- package/dist/lib/hcaptcha.d.ts +3 -3
- package/dist/lib/hcaptcha.d.ts.map +1 -1
- package/dist/lib/hcaptcha.js.map +1 -1
- package/dist/lib/html/build-document.d.ts.map +1 -1
- package/dist/lib/html/html.d.ts.map +1 -1
- package/dist/lib/html/tags.d.ts.map +1 -1
- package/dist/lib/http/accept.js.map +1 -1
- package/dist/lib/http/context.js.map +1 -1
- package/dist/lib/http/middleware.js.map +1 -1
- package/dist/lib/http/parser.d.ts +5 -5
- package/dist/lib/http/parser.d.ts.map +1 -1
- package/dist/lib/http/response.js.map +1 -1
- package/dist/lib/http/router.d.ts.map +1 -1
- package/dist/lib/http/stream.d.ts +5 -5
- package/dist/lib/http/stream.d.ts.map +1 -1
- package/dist/lib/util/authorization-header.d.ts +1 -1
- package/dist/lib/util/authorization-header.d.ts.map +1 -1
- package/dist/lib/util/color.js.map +1 -1
- package/dist/lib/util/crypto.d.ts +1 -1
- package/dist/lib/util/crypto.d.ts.map +1 -1
- package/dist/lib/util/date.js.map +1 -1
- package/dist/lib/util/type.d.ts.map +1 -1
- package/dist/oauth-middleware.js.map +1 -1
- package/dist/oauth-provider.d.ts +31 -31
- package/dist/oauth-provider.d.ts.map +1 -1
- package/dist/oauth-provider.js.map +1 -1
- package/dist/oauth-verifier.d.ts.map +1 -1
- package/dist/replay/replay-manager.d.ts.map +1 -1
- package/dist/replay/replay-manager.js.map +1 -1
- package/dist/replay/replay-store-memory.d.ts.map +1 -1
- package/dist/replay/replay-store-redis.d.ts.map +1 -1
- package/dist/request/code.d.ts.map +1 -1
- package/dist/request/request-data.d.ts.map +1 -1
- package/dist/request/request-manager.d.ts +32 -32
- package/dist/request/request-manager.d.ts.map +1 -1
- package/dist/request/request-manager.js.map +1 -1
- package/dist/request/request-store.js +2 -2
- package/dist/request/request-store.js.map +1 -1
- package/dist/router/assets/assets-manifest.js.map +1 -1
- package/dist/router/assets/assets.d.ts +1 -1
- package/dist/router/assets/assets.d.ts.map +1 -1
- package/dist/router/assets/assets.js.map +1 -1
- package/dist/router/assets/send-account-page.d.ts.map +1 -1
- package/dist/router/assets/send-authorization-page.d.ts.map +1 -1
- package/dist/router/assets/send-cookie-error-page.d.ts.map +1 -1
- package/dist/router/assets/send-error-page.d.ts.map +1 -1
- package/dist/router/assets/send-redirect.d.ts +2 -2
- package/dist/router/assets/send-redirect.d.ts.map +1 -1
- package/dist/signer/access-token-payload.d.ts +1752 -1752
- package/dist/signer/access-token-payload.d.ts.map +1 -1
- package/dist/signer/api-token-payload.d.ts +1732 -1732
- package/dist/signer/api-token-payload.d.ts.map +1 -1
- package/dist/signer/signer.d.ts +39 -39
- package/dist/signer/signer.d.ts.map +1 -1
- package/dist/signer/signer.js.map +1 -1
- package/dist/token/refresh-token.d.ts.map +1 -1
- package/dist/token/token-id.d.ts.map +1 -1
- package/dist/token/token-manager.d.ts.map +1 -1
- package/dist/token/token-manager.js.map +1 -1
- package/dist/token/token-store.js +3 -3
- package/dist/token/token-store.js.map +1 -1
- package/package.json +19 -19
- package/src/account/account-store.ts +8 -8
- package/src/device/device-store.ts +1 -1
- package/src/lexicon/lexicon-store.ts +1 -1
- package/src/request/request-store.ts +2 -2
- package/src/token/token-store.ts +3 -3
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,YAAY,EAEZ,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,MAAM,EACN,SAAS,EACT,SAAS,GACV,MAAM,MAAM,CAAA;AAEb,OAAO,EACL,gCAAgC,GAKjC,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AACrE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAA;AACnG,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAA;AACvF,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAA;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,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BAA2B,EAAE,CAAC;gBACjC,MAAM,IAAI,gCAAgC,CACxC,UAAU,EACV,8DAA8D,CAC/D,CAAA;YACH,CAAC;YAED,KAAK,MAAM,MAAM,IAAI,UAAU,CAAC,qBAAqB,EAAE,CAAC;gBACtD,IAAI,CAAC,2BAA2B,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;oBACxD,MAAM,IAAI,gCAAgC,CACxC,UAAU,EACV,yEAAyE,MAAM,CAAC,IAAI,GAAG,CACxF,CAAA;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,IAAI,kBAAkB;QACpB,MAAM,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAA;QACvC,OAAO,aAAa,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAClE,CAAC;;AAGH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,GAAyB;IAEzB,IAAI,CAAC;QACH,OAAO,MAAM,sBAAsB,CAAC,MAAM,SAAS,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,CAAA;IACrE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,kBAAkB,CAAC,kCAAkC,EAAE,GAAG,CAAC,CAAA;IACvE,CAAC;AACH,CAAC","sourcesContent":["import {\n JWTClaimVerificationOptions,\n type JWTHeaderParameters,\n type JWTPayload,\n type JWTVerifyOptions,\n type JWTVerifyResult,\n type KeyLike,\n type ResolvedKey,\n UnsecuredJWT,\n type UnsecuredResult,\n calculateJwkThumbprint,\n createLocalJWKSet,\n createRemoteJWKSet,\n errors,\n exportJWK,\n jwtVerify,\n} from 'jose'\nimport { Jwks, SignedJwt, UnsignedJwt } from '@atproto/jwk'\nimport {\n CLIENT_ASSERTION_TYPE_JWT_BEARER,\n OAuthAuthorizationRequestParameters,\n OAuthClientCredentials,\n OAuthClientMetadata,\n OAuthRedirectUri,\n} from '@atproto/oauth-types'\nimport { CLIENT_ASSERTION_MAX_AGE, JAR_MAX_AGE } from '../constants.js'\nimport { AuthorizationError } from '../errors/authorization-error.js'\nimport { InvalidAuthorizationDetailsError } from '../errors/invalid-authorization-details-error.js'\nimport { InvalidClientError } from '../errors/invalid-client-error.js'\nimport { InvalidClientMetadataError } from '../errors/invalid-client-metadata-error.js'\nimport { InvalidRequestError } from '../errors/invalid-request-error.js'\nimport { InvalidScopeError } from '../errors/invalid-scope-error.js'\nimport { asArray } from '../lib/util/cast.js'\nimport { compareRedirectUri } from '../lib/util/redirect-uri.js'\nimport { Awaitable } from '../lib/util/type.js'\nimport { ClientAuth } from './client-auth.js'\nimport { ClientId } from './client-id.js'\nimport { ClientInfo } from './client-info.js'\n\nconst { JOSEError } = errors\n\nexport class Client {\n /**\n * @see {@link https://www.iana.org/assignments/oauth-parameters/oauth-parameters.xhtml#token-endpoint-auth-method}\n */\n static readonly AUTH_METHODS_SUPPORTED = ['none', 'private_key_jwt'] as const\n\n private readonly keyGetter: (\n protectedHeader: JWTHeaderParameters,\n ) => Awaitable<KeyLike | Uint8Array>\n\n constructor(\n public readonly id: ClientId,\n public readonly metadata: OAuthClientMetadata,\n public readonly jwks: undefined | Jwks = metadata.jwks,\n public readonly info: ClientInfo,\n ) {\n // If the remote JWKS content is provided, we don't need to fetch it again.\n this.keyGetter =\n jwks || !metadata.jwks_uri\n ? createLocalJWKSet(jwks || { keys: [] })\n : createRemoteJWKSet(new URL(metadata.jwks_uri), {})\n }\n\n /**\n * @see {@link https://www.rfc-editor.org/rfc/rfc9101.html#name-request-object-2}\n */\n public async decodeRequestObject(\n jar: SignedJwt | UnsignedJwt,\n audience: string,\n ) {\n // https://www.rfc-editor.org/rfc/rfc9101.html#name-request-object-2\n // > If signed, the Authorization Request Object SHOULD contain the Claims\n // > iss (issuer) and aud (audience) as members with their semantics being\n // > the same as defined in the JWT [RFC7519] specification. The value of\n // > aud should be the value of the authorization server (AS) issuer, as\n // > defined in RFC 8414 [RFC8414].\n try {\n // We need to special case the \"none\" algorithm, as the validation method\n // is different for signed and unsigned JWTs.\n if (this.metadata.request_object_signing_alg === 'none') {\n return await this.jwtVerifyUnsecured(jar, {\n audience,\n maxTokenAge: JAR_MAX_AGE / 1e3,\n allowMissingAudience: true,\n allowMissingIssuer: true,\n })\n }\n\n return await this.jwtVerify(jar, {\n audience,\n maxTokenAge: JAR_MAX_AGE / 1e3,\n algorithms: this.metadata.request_object_signing_alg\n ? [this.metadata.request_object_signing_alg]\n : // https://openid.net/specs/openid-connect-registration-1_0.html#rfc.section.2\n //\n // > The default, if omitted, is that any algorithm supported by the OP\n // > and the RP MAY be used.\n undefined,\n })\n } catch (err) {\n const message =\n err instanceof JOSEError\n ? `Invalid \"request\" object: ${err.message}`\n : `Invalid \"request\" object`\n\n throw new InvalidRequestError(message, err)\n }\n }\n\n protected async jwtVerifyUnsecured<PayloadType = JWTPayload>(\n token: string,\n {\n audience,\n allowMissingAudience = false,\n allowMissingIssuer = false,\n ...options\n }: Omit<JWTClaimVerificationOptions, 'issuer'> & {\n allowMissingIssuer?: boolean\n allowMissingAudience?: boolean\n } = {},\n ): Promise<UnsecuredResult<PayloadType>> {\n // jose does not support `allowMissingAudience` and `allowMissingIssuer`\n // options, so we need to handle audience and issuer checks manually (see\n // bellow).\n\n const result = UnsecuredJWT.decode<PayloadType>(token, options)\n\n if (!allowMissingIssuer || result.payload.iss != null) {\n if (result.payload.iss !== this.id) {\n throw new JOSEError(`Invalid \"iss\" claim \"${result.payload.iss}\"`)\n }\n }\n\n if (!allowMissingAudience || result.payload.aud != null) {\n if (audience != null) {\n const payloadAud = asArray(result.payload.aud)\n if (!asArray(audience).some((aud) => payloadAud.includes(aud))) {\n throw new JOSEError(`Invalid \"aud\" claim \"${result.payload.aud}\"`)\n }\n }\n }\n\n return result\n }\n\n protected async jwtVerify<PayloadType = JWTPayload>(\n token: string,\n options?: Omit<JWTVerifyOptions, 'issuer'>,\n ): Promise<JWTVerifyResult<PayloadType> & ResolvedKey<KeyLike>> {\n return jwtVerify<PayloadType>(token, this.keyGetter, {\n ...options,\n issuer: this.id,\n })\n }\n\n /**\n * @see {@link https://datatracker.ietf.org/doc/html/rfc6749#section-2.3.1}\n * @see {@link https://datatracker.ietf.org/doc/html/rfc7523#section-3}\n * @see {@link https://www.iana.org/assignments/oauth-parameters/oauth-parameters.xhtml#token-endpoint-auth-method}\n */\n public async authenticate(\n input: OAuthClientCredentials,\n checks: {\n authorizationServerIdentifier: string\n },\n ): Promise<ClientAuth> {\n const method = this.metadata.token_endpoint_auth_method\n\n if (method === 'none') {\n return { method: 'none' }\n }\n\n if (method === 'private_key_jwt') {\n if (!('client_assertion' in input)) {\n throw new InvalidRequestError(\n `client authentication method \"${method}\" required a \"client_assertion\"`,\n )\n }\n\n if (input.client_assertion_type === CLIENT_ASSERTION_TYPE_JWT_BEARER) {\n // https://www.rfc-editor.org/rfc/rfc7523.html#section-3\n\n const result = await this.jwtVerify<{\n jti: string\n exp?: number\n }>(input.client_assertion, {\n // > 1. The JWT MUST contain an \"iss\" (issuer) claim that contains a\n // > unique identifier for the entity that issued the JWT.\n //\n // The \"issuer\" is already checked by jwtVerify()\n\n // > 2. The JWT MUST contain a \"sub\" (subject) claim identifying the\n // > principal that is the subject of the JWT. Two cases need to be\n // > differentiated: [...] For client authentication, the subject\n // > MUST be the \"client_id\" of the OAuth client.\n subject: this.id,\n\n // > 3. The JWT MUST contain an \"aud\" (audience) claim containing a\n // > value that identifies the authorization server as an intended\n // > audience. The token endpoint URL of the authorization server\n // > MAY be used as a value for an \"aud\" element to identify the\n // > authorization server as an intended audience of the JWT.\n audience: checks.authorizationServerIdentifier,\n\n requiredClaims: [\n // > 4. The JWT MUST contain an \"exp\" (expiration time) claim that\n // > limits the time window during which the JWT can be used.\n //\n // @TODO The presence of \"exp\" didn't use to be enforced by this\n // implementation (or provided by the oauth-client). This is mostly\n // fine because \"iat\" *is* required, but this makes this\n // implementation non compliant with RFC7523. We can't just make it\n // required as it might break existing clients.\n\n // 'exp',\n\n // > 7. The JWT MAY contain a \"jti\" (JWT ID) claim that provides a\n // > unique identifier for the token. The authorization server\n // > MAY ensure that JWTs are not replayed by maintaining the set\n // > of used \"jti\" values for the length of time for which the\n // > JWT would be considered valid based on the applicable \"exp\"\n // > instant.\n 'jti',\n ],\n\n // > 5. The JWT MAY contain an \"nbf\" (not before) claim that\n // > identifies the time before which the token MUST NOT be\n // > accepted for processing.\n //\n // This is already enforced by jose\n\n // > 6. The JWT MAY contain an \"iat\" (issued at) claim that identifies\n // > the time at which the JWT was issued. Note that the\n // > authorization server may reject JWTs with an \"iat\" claim value\n // > that is unreasonably far in the past.\n maxTokenAge: CLIENT_ASSERTION_MAX_AGE / 1000,\n }).catch((err) => {\n const msg =\n err instanceof JOSEError\n ? `Validation of \"client_assertion\" failed: ${err.message}`\n : `Unable to verify \"client_assertion\" JWT`\n\n throw new InvalidClientError(msg, err)\n })\n\n if (!result.protectedHeader.kid) {\n throw new InvalidClientError(`\"kid\" required in client_assertion`)\n }\n\n return {\n method: 'private_key_jwt',\n jti: result.payload.jti,\n exp: result.payload.exp,\n jkt: await authJwkThumbprint(result.key),\n alg: result.protectedHeader.alg,\n kid: result.protectedHeader.kid,\n }\n }\n\n throw new InvalidClientError(\n `Unsupported client_assertion_type \"${input.client_assertion_type}\"`,\n )\n }\n\n // @ts-expect-error Ensure to keep Client.AUTH_METHODS_SUPPORTED in sync\n // with the implementation of this function.\n if (Client.AUTH_METHODS_SUPPORTED.includes(method)) {\n throw new Error(\n `verifyCredentials() should implement all of ${[\n Client.AUTH_METHODS_SUPPORTED,\n ]}`,\n )\n }\n\n throw new InvalidClientMetadataError(\n `Unsupported token_endpoint_auth_method \"${method}\"`,\n )\n }\n\n /**\n * Validates the request parameters against the client metadata.\n */\n public validateRequest(\n parameters: Readonly<OAuthAuthorizationRequestParameters>,\n ): Readonly<OAuthAuthorizationRequestParameters> {\n if (parameters.client_id !== this.id) {\n throw new AuthorizationError(\n parameters,\n 'The \"client_id\" parameter field does not match the value used to authenticate the client',\n )\n }\n\n if (parameters.scope !== undefined) {\n // Any scope requested by the client must be registered in the client\n // metadata.\n const declaredScopes = this.metadata.scope?.split(' ')\n\n if (!declaredScopes) {\n throw new InvalidScopeError(\n parameters,\n 'Client has no declared scopes in its metadata',\n )\n }\n\n for (const scope of parameters.scope.split(' ')) {\n if (!declaredScopes.includes(scope)) {\n throw new InvalidScopeError(\n parameters,\n `Scope \"${scope}\" is not declared in the client metadata`,\n )\n }\n }\n }\n\n if (!this.metadata.response_types.includes(parameters.response_type)) {\n throw new AuthorizationError(\n parameters,\n `Invalid response_type \"${parameters.response_type}\" requested by the client`,\n )\n }\n\n if (parameters.response_type.includes('code')) {\n if (!this.metadata.grant_types.includes('authorization_code')) {\n throw new AuthorizationError(\n parameters,\n `This client is not allowed to use the \"authorization_code\" grant type`,\n )\n }\n }\n\n const { redirect_uri } = parameters\n if (redirect_uri) {\n if (\n !this.metadata.redirect_uris.some((uri) =>\n compareRedirectUri(uri, redirect_uri),\n )\n ) {\n throw new AuthorizationError(\n parameters,\n `Invalid redirect_uri ${redirect_uri}`,\n )\n }\n } else {\n const { defaultRedirectUri } = this\n if (defaultRedirectUri) {\n parameters = { ...parameters, redirect_uri: defaultRedirectUri }\n } else {\n // https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-10#authorization-request\n //\n // > \"redirect_uri\": OPTIONAL if only one redirect URI is registered for\n // > this client. REQUIRED if multiple redirect URIs are registered for this\n // > client.\n throw new AuthorizationError(parameters, 'redirect_uri is required')\n }\n }\n\n if (parameters.authorization_details) {\n const { authorization_details_types } = this.metadata\n if (!authorization_details_types) {\n throw new InvalidAuthorizationDetailsError(\n parameters,\n 'Client Metadata does not declare any \"authorization_details\"',\n )\n }\n\n for (const detail of parameters.authorization_details) {\n if (!authorization_details_types?.includes(detail.type)) {\n throw new InvalidAuthorizationDetailsError(\n parameters,\n `Client Metadata does not declare any \"authorization_details\" of type \"${detail.type}\"`,\n )\n }\n }\n }\n\n return parameters\n }\n\n get defaultRedirectUri(): OAuthRedirectUri | undefined {\n const { redirect_uris } = this.metadata\n return redirect_uris.length === 1 ? redirect_uris[0] : undefined\n }\n}\n\nexport async function authJwkThumbprint(\n key: Uint8Array | KeyLike,\n): Promise<string> {\n try {\n return await calculateJwkThumbprint(await exportJWK(key), 'sha512')\n } catch (err) {\n throw new InvalidClientError('Unable to compute JWK thumbprint', err)\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,YAAY,EAEZ,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,MAAM,EACN,SAAS,EACT,SAAS,GACV,MAAM,MAAM,CAAA;AAEb,OAAO,EACL,gCAAgC,GAKjC,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AACrE,OAAO,EAAE,gCAAgC,EAAE,MAAM,kDAAkD,CAAA;AACnG,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAA;AACvF,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAA;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAMhE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAA;AAE5B,MAAM,OAAO,MAAM;IACjB;;OAEG;aACa,2BAAsB,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAU,CAAA;IAM7E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gC,CACxC,UAAU,EACV,yEAAyE,MAAM,CAAC,IAAI,GAAG,CACxF,CAAA;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,IAAI,kBAAkB;QACpB,MAAM,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAA;QACvC,OAAO,aAAa,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAClE,CAAC;CACF;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,GAAyB;IAEzB,IAAI,CAAC;QACH,OAAO,MAAM,sBAAsB,CAAC,MAAM,SAAS,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,CAAA;IACrE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,kBAAkB,CAAC,kCAAkC,EAAE,GAAG,CAAC,CAAA;IACvE,CAAC;AACH,CAAC","sourcesContent":["import {\n JWTClaimVerificationOptions,\n type JWTHeaderParameters,\n type JWTPayload,\n type JWTVerifyOptions,\n type JWTVerifyResult,\n type KeyLike,\n type ResolvedKey,\n UnsecuredJWT,\n type UnsecuredResult,\n calculateJwkThumbprint,\n createLocalJWKSet,\n createRemoteJWKSet,\n errors,\n exportJWK,\n jwtVerify,\n} from 'jose'\nimport { Jwks, SignedJwt, UnsignedJwt } from '@atproto/jwk'\nimport {\n CLIENT_ASSERTION_TYPE_JWT_BEARER,\n OAuthAuthorizationRequestParameters,\n OAuthClientCredentials,\n OAuthClientMetadata,\n OAuthRedirectUri,\n} from '@atproto/oauth-types'\nimport { CLIENT_ASSERTION_MAX_AGE, JAR_MAX_AGE } from '../constants.js'\nimport { AuthorizationError } from '../errors/authorization-error.js'\nimport { InvalidAuthorizationDetailsError } from '../errors/invalid-authorization-details-error.js'\nimport { InvalidClientError } from '../errors/invalid-client-error.js'\nimport { InvalidClientMetadataError } from '../errors/invalid-client-metadata-error.js'\nimport { InvalidRequestError } from '../errors/invalid-request-error.js'\nimport { InvalidScopeError } from '../errors/invalid-scope-error.js'\nimport { asArray } from '../lib/util/cast.js'\nimport { compareRedirectUri } from '../lib/util/redirect-uri.js'\nimport { Awaitable } from '../lib/util/type.js'\nimport { ClientAuth } from './client-auth.js'\nimport { ClientId } from './client-id.js'\nimport { ClientInfo } from './client-info.js'\n\nconst { JOSEError } = errors\n\nexport class Client {\n /**\n * @see {@link https://www.iana.org/assignments/oauth-parameters/oauth-parameters.xhtml#token-endpoint-auth-method}\n */\n static readonly AUTH_METHODS_SUPPORTED = ['none', 'private_key_jwt'] as const\n\n private readonly keyGetter: (\n protectedHeader: JWTHeaderParameters,\n ) => Awaitable<KeyLike | Uint8Array>\n\n constructor(\n public readonly id: ClientId,\n public readonly metadata: OAuthClientMetadata,\n public readonly jwks: undefined | Jwks = metadata.jwks,\n public readonly info: ClientInfo,\n ) {\n // If the remote JWKS content is provided, we don't need to fetch it again.\n this.keyGetter =\n jwks || !metadata.jwks_uri\n ? createLocalJWKSet(jwks || { keys: [] })\n : createRemoteJWKSet(new URL(metadata.jwks_uri), {})\n }\n\n /**\n * @see {@link https://www.rfc-editor.org/rfc/rfc9101.html#name-request-object-2}\n */\n public async decodeRequestObject(\n jar: SignedJwt | UnsignedJwt,\n audience: string,\n ) {\n // https://www.rfc-editor.org/rfc/rfc9101.html#name-request-object-2\n // > If signed, the Authorization Request Object SHOULD contain the Claims\n // > iss (issuer) and aud (audience) as members with their semantics being\n // > the same as defined in the JWT [RFC7519] specification. The value of\n // > aud should be the value of the authorization server (AS) issuer, as\n // > defined in RFC 8414 [RFC8414].\n try {\n // We need to special case the \"none\" algorithm, as the validation method\n // is different for signed and unsigned JWTs.\n if (this.metadata.request_object_signing_alg === 'none') {\n return await this.jwtVerifyUnsecured(jar, {\n audience,\n maxTokenAge: JAR_MAX_AGE / 1e3,\n allowMissingAudience: true,\n allowMissingIssuer: true,\n })\n }\n\n return await this.jwtVerify(jar, {\n audience,\n maxTokenAge: JAR_MAX_AGE / 1e3,\n algorithms: this.metadata.request_object_signing_alg\n ? [this.metadata.request_object_signing_alg]\n : // https://openid.net/specs/openid-connect-registration-1_0.html#rfc.section.2\n //\n // > The default, if omitted, is that any algorithm supported by the OP\n // > and the RP MAY be used.\n undefined,\n })\n } catch (err) {\n const message =\n err instanceof JOSEError\n ? `Invalid \"request\" object: ${err.message}`\n : `Invalid \"request\" object`\n\n throw new InvalidRequestError(message, err)\n }\n }\n\n protected async jwtVerifyUnsecured<PayloadType = JWTPayload>(\n token: string,\n {\n audience,\n allowMissingAudience = false,\n allowMissingIssuer = false,\n ...options\n }: Omit<JWTClaimVerificationOptions, 'issuer'> & {\n allowMissingIssuer?: boolean\n allowMissingAudience?: boolean\n } = {},\n ): Promise<UnsecuredResult<PayloadType>> {\n // jose does not support `allowMissingAudience` and `allowMissingIssuer`\n // options, so we need to handle audience and issuer checks manually (see\n // bellow).\n\n const result = UnsecuredJWT.decode<PayloadType>(token, options)\n\n if (!allowMissingIssuer || result.payload.iss != null) {\n if (result.payload.iss !== this.id) {\n throw new JOSEError(`Invalid \"iss\" claim \"${result.payload.iss}\"`)\n }\n }\n\n if (!allowMissingAudience || result.payload.aud != null) {\n if (audience != null) {\n const payloadAud = asArray(result.payload.aud)\n if (!asArray(audience).some((aud) => payloadAud.includes(aud))) {\n throw new JOSEError(`Invalid \"aud\" claim \"${result.payload.aud}\"`)\n }\n }\n }\n\n return result\n }\n\n protected async jwtVerify<PayloadType = JWTPayload>(\n token: string,\n options?: Omit<JWTVerifyOptions, 'issuer'>,\n ): Promise<JWTVerifyResult<PayloadType> & ResolvedKey<KeyLike>> {\n return jwtVerify<PayloadType>(token, this.keyGetter, {\n ...options,\n issuer: this.id,\n })\n }\n\n /**\n * @see {@link https://datatracker.ietf.org/doc/html/rfc6749#section-2.3.1}\n * @see {@link https://datatracker.ietf.org/doc/html/rfc7523#section-3}\n * @see {@link https://www.iana.org/assignments/oauth-parameters/oauth-parameters.xhtml#token-endpoint-auth-method}\n */\n public async authenticate(\n input: OAuthClientCredentials,\n checks: {\n authorizationServerIdentifier: string\n },\n ): Promise<ClientAuth> {\n const method = this.metadata.token_endpoint_auth_method\n\n if (method === 'none') {\n return { method: 'none' }\n }\n\n if (method === 'private_key_jwt') {\n if (!('client_assertion' in input)) {\n throw new InvalidRequestError(\n `client authentication method \"${method}\" required a \"client_assertion\"`,\n )\n }\n\n if (input.client_assertion_type === CLIENT_ASSERTION_TYPE_JWT_BEARER) {\n // https://www.rfc-editor.org/rfc/rfc7523.html#section-3\n\n const result = await this.jwtVerify<{\n jti: string\n exp?: number\n }>(input.client_assertion, {\n // > 1. The JWT MUST contain an \"iss\" (issuer) claim that contains a\n // > unique identifier for the entity that issued the JWT.\n //\n // The \"issuer\" is already checked by jwtVerify()\n\n // > 2. The JWT MUST contain a \"sub\" (subject) claim identifying the\n // > principal that is the subject of the JWT. Two cases need to be\n // > differentiated: [...] For client authentication, the subject\n // > MUST be the \"client_id\" of the OAuth client.\n subject: this.id,\n\n // > 3. The JWT MUST contain an \"aud\" (audience) claim containing a\n // > value that identifies the authorization server as an intended\n // > audience. The token endpoint URL of the authorization server\n // > MAY be used as a value for an \"aud\" element to identify the\n // > authorization server as an intended audience of the JWT.\n audience: checks.authorizationServerIdentifier,\n\n requiredClaims: [\n // > 4. The JWT MUST contain an \"exp\" (expiration time) claim that\n // > limits the time window during which the JWT can be used.\n //\n // @TODO The presence of \"exp\" didn't use to be enforced by this\n // implementation (or provided by the oauth-client). This is mostly\n // fine because \"iat\" *is* required, but this makes this\n // implementation non compliant with RFC7523. We can't just make it\n // required as it might break existing clients.\n\n // 'exp',\n\n // > 7. The JWT MAY contain a \"jti\" (JWT ID) claim that provides a\n // > unique identifier for the token. The authorization server\n // > MAY ensure that JWTs are not replayed by maintaining the set\n // > of used \"jti\" values for the length of time for which the\n // > JWT would be considered valid based on the applicable \"exp\"\n // > instant.\n 'jti',\n ],\n\n // > 5. The JWT MAY contain an \"nbf\" (not before) claim that\n // > identifies the time before which the token MUST NOT be\n // > accepted for processing.\n //\n // This is already enforced by jose\n\n // > 6. The JWT MAY contain an \"iat\" (issued at) claim that identifies\n // > the time at which the JWT was issued. Note that the\n // > authorization server may reject JWTs with an \"iat\" claim value\n // > that is unreasonably far in the past.\n maxTokenAge: CLIENT_ASSERTION_MAX_AGE / 1000,\n }).catch((err) => {\n const msg =\n err instanceof JOSEError\n ? `Validation of \"client_assertion\" failed: ${err.message}`\n : `Unable to verify \"client_assertion\" JWT`\n\n throw new InvalidClientError(msg, err)\n })\n\n if (!result.protectedHeader.kid) {\n throw new InvalidClientError(`\"kid\" required in client_assertion`)\n }\n\n return {\n method: 'private_key_jwt',\n jti: result.payload.jti,\n exp: result.payload.exp,\n jkt: await authJwkThumbprint(result.key),\n alg: result.protectedHeader.alg,\n kid: result.protectedHeader.kid,\n }\n }\n\n throw new InvalidClientError(\n `Unsupported client_assertion_type \"${input.client_assertion_type}\"`,\n )\n }\n\n // @ts-expect-error Ensure to keep Client.AUTH_METHODS_SUPPORTED in sync\n // with the implementation of this function.\n if (Client.AUTH_METHODS_SUPPORTED.includes(method)) {\n throw new Error(\n `verifyCredentials() should implement all of ${[\n Client.AUTH_METHODS_SUPPORTED,\n ]}`,\n )\n }\n\n throw new InvalidClientMetadataError(\n `Unsupported token_endpoint_auth_method \"${method}\"`,\n )\n }\n\n /**\n * Validates the request parameters against the client metadata.\n */\n public validateRequest(\n parameters: Readonly<OAuthAuthorizationRequestParameters>,\n ): Readonly<OAuthAuthorizationRequestParameters> {\n if (parameters.client_id !== this.id) {\n throw new AuthorizationError(\n parameters,\n 'The \"client_id\" parameter field does not match the value used to authenticate the client',\n )\n }\n\n if (parameters.scope !== undefined) {\n // Any scope requested by the client must be registered in the client\n // metadata.\n const declaredScopes = this.metadata.scope?.split(' ')\n\n if (!declaredScopes) {\n throw new InvalidScopeError(\n parameters,\n 'Client has no declared scopes in its metadata',\n )\n }\n\n for (const scope of parameters.scope.split(' ')) {\n if (!declaredScopes.includes(scope)) {\n throw new InvalidScopeError(\n parameters,\n `Scope \"${scope}\" is not declared in the client metadata`,\n )\n }\n }\n }\n\n if (!this.metadata.response_types.includes(parameters.response_type)) {\n throw new AuthorizationError(\n parameters,\n `Invalid response_type \"${parameters.response_type}\" requested by the client`,\n )\n }\n\n if (parameters.response_type.includes('code')) {\n if (!this.metadata.grant_types.includes('authorization_code')) {\n throw new AuthorizationError(\n parameters,\n `This client is not allowed to use the \"authorization_code\" grant type`,\n )\n }\n }\n\n const { redirect_uri } = parameters\n if (redirect_uri) {\n if (\n !this.metadata.redirect_uris.some((uri) =>\n compareRedirectUri(uri, redirect_uri),\n )\n ) {\n throw new AuthorizationError(\n parameters,\n `Invalid redirect_uri ${redirect_uri}`,\n )\n }\n } else {\n const { defaultRedirectUri } = this\n if (defaultRedirectUri) {\n parameters = { ...parameters, redirect_uri: defaultRedirectUri }\n } else {\n // https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-10#authorization-request\n //\n // > \"redirect_uri\": OPTIONAL if only one redirect URI is registered for\n // > this client. REQUIRED if multiple redirect URIs are registered for this\n // > client.\n throw new AuthorizationError(parameters, 'redirect_uri is required')\n }\n }\n\n if (parameters.authorization_details) {\n const { authorization_details_types } = this.metadata\n if (!authorization_details_types) {\n throw new InvalidAuthorizationDetailsError(\n parameters,\n 'Client Metadata does not declare any \"authorization_details\"',\n )\n }\n\n for (const detail of parameters.authorization_details) {\n if (!authorization_details_types?.includes(detail.type)) {\n throw new InvalidAuthorizationDetailsError(\n parameters,\n `Client Metadata does not declare any \"authorization_details\" of type \"${detail.type}\"`,\n )\n }\n }\n }\n\n return parameters\n }\n\n get defaultRedirectUri(): OAuthRedirectUri | undefined {\n const { redirect_uris } = this.metadata\n return redirect_uris.length === 1 ? redirect_uris[0] : undefined\n }\n}\n\nexport async function authJwkThumbprint(\n key: Uint8Array | KeyLike,\n): Promise<string> {\n try {\n return await calculateJwkThumbprint(await exportJWK(key), 'sha512')\n } catch (err) {\n throw new InvalidClientError('Unable to compute JWK thumbprint', err)\n }\n}\n"]}
|
|
@@ -6,112 +6,112 @@ export declare const brandingSchema: z.ZodObject<{
|
|
|
6
6
|
light: z.ZodOptional<z.ZodEffects<z.ZodString, import("../lib/util/color.js").RgbColor, string>>;
|
|
7
7
|
dark: z.ZodOptional<z.ZodEffects<z.ZodString, import("../lib/util/color.js").RgbColor, string>>;
|
|
8
8
|
contrastSaturation: z.ZodOptional<z.ZodNumber>;
|
|
9
|
-
}, Record<"error" | "
|
|
10
|
-
error?: import("../lib/util/color.js").RgbColor | undefined;
|
|
11
|
-
success?: import("../lib/util/color.js").RgbColor | undefined;
|
|
12
|
-
warning?: import("../lib/util/color.js").RgbColor | undefined;
|
|
9
|
+
}, Record<"error" | "info" | "primary" | "success" | "warning", z.ZodOptional<z.ZodEffects<z.ZodString, import("../lib/util/color.js").RgbColor, string>>>>, Record<"errorContrast" | "infoContrast" | "primaryContrast" | "successContrast" | "warningContrast", z.ZodOptional<z.ZodEffects<z.ZodString, import("../lib/util/color.js").RgbColor, string>>>>, Record<"errorHue" | "infoHue" | "primaryHue" | "successHue" | "warningHue", z.ZodOptional<z.ZodNumber>>>, "strip", z.ZodTypeAny, {
|
|
13
10
|
light?: import("../lib/util/color.js").RgbColor | undefined;
|
|
14
11
|
dark?: import("../lib/util/color.js").RgbColor | undefined;
|
|
15
12
|
contrastSaturation?: number | undefined;
|
|
16
|
-
|
|
17
|
-
info?: import("../lib/util/color.js").RgbColor | undefined;
|
|
13
|
+
error?: import("../lib/util/color.js").RgbColor | undefined;
|
|
18
14
|
errorContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
19
|
-
successContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
20
|
-
warningContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
21
|
-
primaryContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
22
|
-
infoContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
23
15
|
errorHue?: number | undefined;
|
|
16
|
+
info?: import("../lib/util/color.js").RgbColor | undefined;
|
|
17
|
+
infoContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
18
|
+
infoHue?: number | undefined;
|
|
19
|
+
primary?: import("../lib/util/color.js").RgbColor | undefined;
|
|
20
|
+
primaryContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
21
|
+
primaryHue?: number | undefined;
|
|
22
|
+
success?: import("../lib/util/color.js").RgbColor | undefined;
|
|
23
|
+
successContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
24
24
|
successHue?: number | undefined;
|
|
25
|
+
warning?: import("../lib/util/color.js").RgbColor | undefined;
|
|
26
|
+
warningContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
25
27
|
warningHue?: number | undefined;
|
|
26
|
-
primaryHue?: number | undefined;
|
|
27
|
-
infoHue?: number | undefined;
|
|
28
28
|
}, {
|
|
29
|
-
error?: string | undefined;
|
|
30
|
-
success?: string | undefined;
|
|
31
|
-
warning?: string | undefined;
|
|
32
29
|
light?: string | undefined;
|
|
33
30
|
dark?: string | undefined;
|
|
34
31
|
contrastSaturation?: number | undefined;
|
|
35
|
-
|
|
36
|
-
info?: string | undefined;
|
|
32
|
+
error?: string | undefined;
|
|
37
33
|
errorContrast?: string | undefined;
|
|
38
|
-
successContrast?: string | undefined;
|
|
39
|
-
warningContrast?: string | undefined;
|
|
40
|
-
primaryContrast?: string | undefined;
|
|
41
|
-
infoContrast?: string | undefined;
|
|
42
34
|
errorHue?: number | undefined;
|
|
35
|
+
info?: string | undefined;
|
|
36
|
+
infoContrast?: string | undefined;
|
|
37
|
+
infoHue?: number | undefined;
|
|
38
|
+
primary?: string | undefined;
|
|
39
|
+
primaryContrast?: string | undefined;
|
|
40
|
+
primaryHue?: number | undefined;
|
|
41
|
+
success?: string | undefined;
|
|
42
|
+
successContrast?: string | undefined;
|
|
43
43
|
successHue?: number | undefined;
|
|
44
|
+
warning?: string | undefined;
|
|
45
|
+
warningContrast?: string | undefined;
|
|
44
46
|
warningHue?: number | undefined;
|
|
45
|
-
primaryHue?: number | undefined;
|
|
46
|
-
infoHue?: number | undefined;
|
|
47
47
|
}>>;
|
|
48
48
|
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
49
49
|
title: z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>]>;
|
|
50
50
|
href: z.ZodString;
|
|
51
|
-
rel: z.ZodOptional<z.ZodEffects<z.ZodString, "
|
|
51
|
+
rel: z.ZodOptional<z.ZodEffects<z.ZodString, "alternate" | "author" | "canonical" | "dns-prefetch" | "expect" | "external" | "help" | "icon" | "license" | "manifest" | "me" | "modulepreload" | "next" | "pingback" | "preconnect" | "prefetch" | "preload" | "prerender" | "prev" | "privacy-policy" | "search" | "stylesheet" | "terms-of-service", string>>;
|
|
52
52
|
}, "strip", z.ZodTypeAny, {
|
|
53
|
-
href: string;
|
|
54
53
|
title: string | Record<string, string | undefined>;
|
|
55
|
-
rel?: "search" | "expect" | "manifest" | "alternate" | "author" | "canonical" | "dns-prefetch" | "external" | "help" | "icon" | "license" | "me" | "modulepreload" | "next" | "pingback" | "preconnect" | "prefetch" | "preload" | "prerender" | "prev" | "privacy-policy" | "stylesheet" | "terms-of-service" | undefined;
|
|
56
|
-
}, {
|
|
57
54
|
href: string;
|
|
55
|
+
rel?: "alternate" | "author" | "canonical" | "dns-prefetch" | "expect" | "external" | "help" | "icon" | "license" | "manifest" | "me" | "modulepreload" | "next" | "pingback" | "preconnect" | "prefetch" | "preload" | "prerender" | "prev" | "privacy-policy" | "search" | "stylesheet" | "terms-of-service" | undefined;
|
|
56
|
+
}, {
|
|
58
57
|
title: string | Record<string, string | undefined>;
|
|
58
|
+
href: string;
|
|
59
59
|
rel?: string | undefined;
|
|
60
60
|
}>, "many">>;
|
|
61
61
|
}, "strip", z.ZodTypeAny, {
|
|
62
62
|
name?: string | undefined;
|
|
63
63
|
logo?: string | undefined;
|
|
64
64
|
colors?: {
|
|
65
|
-
error?: import("../lib/util/color.js").RgbColor | undefined;
|
|
66
|
-
success?: import("../lib/util/color.js").RgbColor | undefined;
|
|
67
|
-
warning?: import("../lib/util/color.js").RgbColor | undefined;
|
|
68
65
|
light?: import("../lib/util/color.js").RgbColor | undefined;
|
|
69
66
|
dark?: import("../lib/util/color.js").RgbColor | undefined;
|
|
70
67
|
contrastSaturation?: number | undefined;
|
|
71
|
-
|
|
72
|
-
info?: import("../lib/util/color.js").RgbColor | undefined;
|
|
68
|
+
error?: import("../lib/util/color.js").RgbColor | undefined;
|
|
73
69
|
errorContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
74
|
-
successContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
75
|
-
warningContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
76
|
-
primaryContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
77
|
-
infoContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
78
70
|
errorHue?: number | undefined;
|
|
71
|
+
info?: import("../lib/util/color.js").RgbColor | undefined;
|
|
72
|
+
infoContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
73
|
+
infoHue?: number | undefined;
|
|
74
|
+
primary?: import("../lib/util/color.js").RgbColor | undefined;
|
|
75
|
+
primaryContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
76
|
+
primaryHue?: number | undefined;
|
|
77
|
+
success?: import("../lib/util/color.js").RgbColor | undefined;
|
|
78
|
+
successContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
79
79
|
successHue?: number | undefined;
|
|
80
|
+
warning?: import("../lib/util/color.js").RgbColor | undefined;
|
|
81
|
+
warningContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
80
82
|
warningHue?: number | undefined;
|
|
81
|
-
primaryHue?: number | undefined;
|
|
82
|
-
infoHue?: number | undefined;
|
|
83
83
|
} | undefined;
|
|
84
84
|
links?: {
|
|
85
|
-
href: string;
|
|
86
85
|
title: string | Record<string, string | undefined>;
|
|
87
|
-
|
|
86
|
+
href: string;
|
|
87
|
+
rel?: "alternate" | "author" | "canonical" | "dns-prefetch" | "expect" | "external" | "help" | "icon" | "license" | "manifest" | "me" | "modulepreload" | "next" | "pingback" | "preconnect" | "prefetch" | "preload" | "prerender" | "prev" | "privacy-policy" | "search" | "stylesheet" | "terms-of-service" | undefined;
|
|
88
88
|
}[] | undefined;
|
|
89
89
|
}, {
|
|
90
90
|
name?: string | undefined;
|
|
91
91
|
logo?: string | undefined;
|
|
92
92
|
colors?: {
|
|
93
|
-
error?: string | undefined;
|
|
94
|
-
success?: string | undefined;
|
|
95
|
-
warning?: string | undefined;
|
|
96
93
|
light?: string | undefined;
|
|
97
94
|
dark?: string | undefined;
|
|
98
95
|
contrastSaturation?: number | undefined;
|
|
99
|
-
|
|
100
|
-
info?: string | undefined;
|
|
96
|
+
error?: string | undefined;
|
|
101
97
|
errorContrast?: string | undefined;
|
|
102
|
-
successContrast?: string | undefined;
|
|
103
|
-
warningContrast?: string | undefined;
|
|
104
|
-
primaryContrast?: string | undefined;
|
|
105
|
-
infoContrast?: string | undefined;
|
|
106
98
|
errorHue?: number | undefined;
|
|
99
|
+
info?: string | undefined;
|
|
100
|
+
infoContrast?: string | undefined;
|
|
101
|
+
infoHue?: number | undefined;
|
|
102
|
+
primary?: string | undefined;
|
|
103
|
+
primaryContrast?: string | undefined;
|
|
104
|
+
primaryHue?: number | undefined;
|
|
105
|
+
success?: string | undefined;
|
|
106
|
+
successContrast?: string | undefined;
|
|
107
107
|
successHue?: number | undefined;
|
|
108
|
+
warning?: string | undefined;
|
|
109
|
+
warningContrast?: string | undefined;
|
|
108
110
|
warningHue?: number | undefined;
|
|
109
|
-
primaryHue?: number | undefined;
|
|
110
|
-
infoHue?: number | undefined;
|
|
111
111
|
} | undefined;
|
|
112
112
|
links?: {
|
|
113
|
-
href: string;
|
|
114
113
|
title: string | Record<string, string | undefined>;
|
|
114
|
+
href: string;
|
|
115
115
|
rel?: string | undefined;
|
|
116
116
|
}[] | undefined;
|
|
117
117
|
}>;
|
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const COLOR_NAMES: readonly [
|
|
2
|
+
export declare const COLOR_NAMES: readonly ['primary', 'error', 'warning', 'info', 'success'];
|
|
3
3
|
export type ColorName = (typeof COLOR_NAMES)[number];
|
|
4
4
|
export declare const colorsSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
5
5
|
light: z.ZodOptional<z.ZodEffects<z.ZodString, import("../lib/util/color.js").RgbColor, string>>;
|
|
6
6
|
dark: z.ZodOptional<z.ZodEffects<z.ZodString, import("../lib/util/color.js").RgbColor, string>>;
|
|
7
7
|
contrastSaturation: z.ZodOptional<z.ZodNumber>;
|
|
8
|
-
}, Record<"error" | "
|
|
9
|
-
error?: import("../lib/util/color.js").RgbColor | undefined;
|
|
10
|
-
success?: import("../lib/util/color.js").RgbColor | undefined;
|
|
11
|
-
warning?: import("../lib/util/color.js").RgbColor | undefined;
|
|
8
|
+
}, Record<"error" | "info" | "primary" | "success" | "warning", z.ZodOptional<z.ZodEffects<z.ZodString, import("../lib/util/color.js").RgbColor, string>>>>, Record<"errorContrast" | "infoContrast" | "primaryContrast" | "successContrast" | "warningContrast", z.ZodOptional<z.ZodEffects<z.ZodString, import("../lib/util/color.js").RgbColor, string>>>>, Record<"errorHue" | "infoHue" | "primaryHue" | "successHue" | "warningHue", z.ZodOptional<z.ZodNumber>>>, "strip", z.ZodTypeAny, {
|
|
12
9
|
light?: import("../lib/util/color.js").RgbColor | undefined;
|
|
13
10
|
dark?: import("../lib/util/color.js").RgbColor | undefined;
|
|
14
11
|
contrastSaturation?: number | undefined;
|
|
15
|
-
|
|
16
|
-
info?: import("../lib/util/color.js").RgbColor | undefined;
|
|
12
|
+
error?: import("../lib/util/color.js").RgbColor | undefined;
|
|
17
13
|
errorContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
18
|
-
successContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
19
|
-
warningContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
20
|
-
primaryContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
21
|
-
infoContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
22
14
|
errorHue?: number | undefined;
|
|
15
|
+
info?: import("../lib/util/color.js").RgbColor | undefined;
|
|
16
|
+
infoContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
17
|
+
infoHue?: number | undefined;
|
|
18
|
+
primary?: import("../lib/util/color.js").RgbColor | undefined;
|
|
19
|
+
primaryContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
20
|
+
primaryHue?: number | undefined;
|
|
21
|
+
success?: import("../lib/util/color.js").RgbColor | undefined;
|
|
22
|
+
successContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
23
23
|
successHue?: number | undefined;
|
|
24
|
+
warning?: import("../lib/util/color.js").RgbColor | undefined;
|
|
25
|
+
warningContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
24
26
|
warningHue?: number | undefined;
|
|
25
|
-
primaryHue?: number | undefined;
|
|
26
|
-
infoHue?: number | undefined;
|
|
27
27
|
}, {
|
|
28
|
-
error?: string | undefined;
|
|
29
|
-
success?: string | undefined;
|
|
30
|
-
warning?: string | undefined;
|
|
31
28
|
light?: string | undefined;
|
|
32
29
|
dark?: string | undefined;
|
|
33
30
|
contrastSaturation?: number | undefined;
|
|
34
|
-
|
|
35
|
-
info?: string | undefined;
|
|
31
|
+
error?: string | undefined;
|
|
36
32
|
errorContrast?: string | undefined;
|
|
37
|
-
successContrast?: string | undefined;
|
|
38
|
-
warningContrast?: string | undefined;
|
|
39
|
-
primaryContrast?: string | undefined;
|
|
40
|
-
infoContrast?: string | undefined;
|
|
41
33
|
errorHue?: number | undefined;
|
|
34
|
+
info?: string | undefined;
|
|
35
|
+
infoContrast?: string | undefined;
|
|
36
|
+
infoHue?: number | undefined;
|
|
37
|
+
primary?: string | undefined;
|
|
38
|
+
primaryContrast?: string | undefined;
|
|
39
|
+
primaryHue?: number | undefined;
|
|
40
|
+
success?: string | undefined;
|
|
41
|
+
successContrast?: string | undefined;
|
|
42
42
|
successHue?: number | undefined;
|
|
43
|
+
warning?: string | undefined;
|
|
44
|
+
warningContrast?: string | undefined;
|
|
43
45
|
warningHue?: number | undefined;
|
|
44
|
-
primaryHue?: number | undefined;
|
|
45
|
-
infoHue?: number | undefined;
|
|
46
46
|
}>;
|
|
47
47
|
export type Colors = z.infer<typeof colorsSchema>;
|
|
48
48
|
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/customization/colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/customization/colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,WAAW,YACtB,SAAS,EACT,OAAO,EACP,SAAS,EACT,MAAM,EACN,SAAS,CACD,CAAA;AACV,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAA;AAEpD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCtB,CAAA;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA"}
|
|
@@ -15,112 +15,112 @@ export declare const customizationSchema: z.ZodObject<{
|
|
|
15
15
|
light: z.ZodOptional<z.ZodEffects<z.ZodString, import("../lib/util/color.js").RgbColor, string>>;
|
|
16
16
|
dark: z.ZodOptional<z.ZodEffects<z.ZodString, import("../lib/util/color.js").RgbColor, string>>;
|
|
17
17
|
contrastSaturation: z.ZodOptional<z.ZodNumber>;
|
|
18
|
-
}, Record<"error" | "
|
|
19
|
-
error?: import("../lib/util/color.js").RgbColor | undefined;
|
|
20
|
-
success?: import("../lib/util/color.js").RgbColor | undefined;
|
|
21
|
-
warning?: import("../lib/util/color.js").RgbColor | undefined;
|
|
18
|
+
}, Record<"error" | "info" | "primary" | "success" | "warning", z.ZodOptional<z.ZodEffects<z.ZodString, import("../lib/util/color.js").RgbColor, string>>>>, Record<"errorContrast" | "infoContrast" | "primaryContrast" | "successContrast" | "warningContrast", z.ZodOptional<z.ZodEffects<z.ZodString, import("../lib/util/color.js").RgbColor, string>>>>, Record<"errorHue" | "infoHue" | "primaryHue" | "successHue" | "warningHue", z.ZodOptional<z.ZodNumber>>>, "strip", z.ZodTypeAny, {
|
|
22
19
|
light?: import("../lib/util/color.js").RgbColor | undefined;
|
|
23
20
|
dark?: import("../lib/util/color.js").RgbColor | undefined;
|
|
24
21
|
contrastSaturation?: number | undefined;
|
|
25
|
-
|
|
26
|
-
info?: import("../lib/util/color.js").RgbColor | undefined;
|
|
22
|
+
error?: import("../lib/util/color.js").RgbColor | undefined;
|
|
27
23
|
errorContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
28
|
-
successContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
29
|
-
warningContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
30
|
-
primaryContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
31
|
-
infoContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
32
24
|
errorHue?: number | undefined;
|
|
25
|
+
info?: import("../lib/util/color.js").RgbColor | undefined;
|
|
26
|
+
infoContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
27
|
+
infoHue?: number | undefined;
|
|
28
|
+
primary?: import("../lib/util/color.js").RgbColor | undefined;
|
|
29
|
+
primaryContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
30
|
+
primaryHue?: number | undefined;
|
|
31
|
+
success?: import("../lib/util/color.js").RgbColor | undefined;
|
|
32
|
+
successContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
33
33
|
successHue?: number | undefined;
|
|
34
|
+
warning?: import("../lib/util/color.js").RgbColor | undefined;
|
|
35
|
+
warningContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
34
36
|
warningHue?: number | undefined;
|
|
35
|
-
primaryHue?: number | undefined;
|
|
36
|
-
infoHue?: number | undefined;
|
|
37
37
|
}, {
|
|
38
|
-
error?: string | undefined;
|
|
39
|
-
success?: string | undefined;
|
|
40
|
-
warning?: string | undefined;
|
|
41
38
|
light?: string | undefined;
|
|
42
39
|
dark?: string | undefined;
|
|
43
40
|
contrastSaturation?: number | undefined;
|
|
44
|
-
|
|
45
|
-
info?: string | undefined;
|
|
41
|
+
error?: string | undefined;
|
|
46
42
|
errorContrast?: string | undefined;
|
|
47
|
-
successContrast?: string | undefined;
|
|
48
|
-
warningContrast?: string | undefined;
|
|
49
|
-
primaryContrast?: string | undefined;
|
|
50
|
-
infoContrast?: string | undefined;
|
|
51
43
|
errorHue?: number | undefined;
|
|
44
|
+
info?: string | undefined;
|
|
45
|
+
infoContrast?: string | undefined;
|
|
46
|
+
infoHue?: number | undefined;
|
|
47
|
+
primary?: string | undefined;
|
|
48
|
+
primaryContrast?: string | undefined;
|
|
49
|
+
primaryHue?: number | undefined;
|
|
50
|
+
success?: string | undefined;
|
|
51
|
+
successContrast?: string | undefined;
|
|
52
52
|
successHue?: number | undefined;
|
|
53
|
+
warning?: string | undefined;
|
|
54
|
+
warningContrast?: string | undefined;
|
|
53
55
|
warningHue?: number | undefined;
|
|
54
|
-
primaryHue?: number | undefined;
|
|
55
|
-
infoHue?: number | undefined;
|
|
56
56
|
}>>;
|
|
57
57
|
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
58
58
|
title: z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>]>;
|
|
59
59
|
href: z.ZodString;
|
|
60
|
-
rel: z.ZodOptional<z.ZodEffects<z.ZodString, "
|
|
60
|
+
rel: z.ZodOptional<z.ZodEffects<z.ZodString, "alternate" | "author" | "canonical" | "dns-prefetch" | "expect" | "external" | "help" | "icon" | "license" | "manifest" | "me" | "modulepreload" | "next" | "pingback" | "preconnect" | "prefetch" | "preload" | "prerender" | "prev" | "privacy-policy" | "search" | "stylesheet" | "terms-of-service", string>>;
|
|
61
61
|
}, "strip", z.ZodTypeAny, {
|
|
62
|
-
href: string;
|
|
63
62
|
title: string | Record<string, string | undefined>;
|
|
64
|
-
rel?: "search" | "expect" | "manifest" | "alternate" | "author" | "canonical" | "dns-prefetch" | "external" | "help" | "icon" | "license" | "me" | "modulepreload" | "next" | "pingback" | "preconnect" | "prefetch" | "preload" | "prerender" | "prev" | "privacy-policy" | "stylesheet" | "terms-of-service" | undefined;
|
|
65
|
-
}, {
|
|
66
63
|
href: string;
|
|
64
|
+
rel?: "alternate" | "author" | "canonical" | "dns-prefetch" | "expect" | "external" | "help" | "icon" | "license" | "manifest" | "me" | "modulepreload" | "next" | "pingback" | "preconnect" | "prefetch" | "preload" | "prerender" | "prev" | "privacy-policy" | "search" | "stylesheet" | "terms-of-service" | undefined;
|
|
65
|
+
}, {
|
|
67
66
|
title: string | Record<string, string | undefined>;
|
|
67
|
+
href: string;
|
|
68
68
|
rel?: string | undefined;
|
|
69
69
|
}>, "many">>;
|
|
70
70
|
}, "strip", z.ZodTypeAny, {
|
|
71
71
|
name?: string | undefined;
|
|
72
72
|
logo?: string | undefined;
|
|
73
73
|
colors?: {
|
|
74
|
-
error?: import("../lib/util/color.js").RgbColor | undefined;
|
|
75
|
-
success?: import("../lib/util/color.js").RgbColor | undefined;
|
|
76
|
-
warning?: import("../lib/util/color.js").RgbColor | undefined;
|
|
77
74
|
light?: import("../lib/util/color.js").RgbColor | undefined;
|
|
78
75
|
dark?: import("../lib/util/color.js").RgbColor | undefined;
|
|
79
76
|
contrastSaturation?: number | undefined;
|
|
80
|
-
|
|
81
|
-
info?: import("../lib/util/color.js").RgbColor | undefined;
|
|
77
|
+
error?: import("../lib/util/color.js").RgbColor | undefined;
|
|
82
78
|
errorContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
83
|
-
successContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
84
|
-
warningContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
85
|
-
primaryContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
86
|
-
infoContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
87
79
|
errorHue?: number | undefined;
|
|
80
|
+
info?: import("../lib/util/color.js").RgbColor | undefined;
|
|
81
|
+
infoContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
82
|
+
infoHue?: number | undefined;
|
|
83
|
+
primary?: import("../lib/util/color.js").RgbColor | undefined;
|
|
84
|
+
primaryContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
85
|
+
primaryHue?: number | undefined;
|
|
86
|
+
success?: import("../lib/util/color.js").RgbColor | undefined;
|
|
87
|
+
successContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
88
88
|
successHue?: number | undefined;
|
|
89
|
+
warning?: import("../lib/util/color.js").RgbColor | undefined;
|
|
90
|
+
warningContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
89
91
|
warningHue?: number | undefined;
|
|
90
|
-
primaryHue?: number | undefined;
|
|
91
|
-
infoHue?: number | undefined;
|
|
92
92
|
} | undefined;
|
|
93
93
|
links?: {
|
|
94
|
-
href: string;
|
|
95
94
|
title: string | Record<string, string | undefined>;
|
|
96
|
-
|
|
95
|
+
href: string;
|
|
96
|
+
rel?: "alternate" | "author" | "canonical" | "dns-prefetch" | "expect" | "external" | "help" | "icon" | "license" | "manifest" | "me" | "modulepreload" | "next" | "pingback" | "preconnect" | "prefetch" | "preload" | "prerender" | "prev" | "privacy-policy" | "search" | "stylesheet" | "terms-of-service" | undefined;
|
|
97
97
|
}[] | undefined;
|
|
98
98
|
}, {
|
|
99
99
|
name?: string | undefined;
|
|
100
100
|
logo?: string | undefined;
|
|
101
101
|
colors?: {
|
|
102
|
-
error?: string | undefined;
|
|
103
|
-
success?: string | undefined;
|
|
104
|
-
warning?: string | undefined;
|
|
105
102
|
light?: string | undefined;
|
|
106
103
|
dark?: string | undefined;
|
|
107
104
|
contrastSaturation?: number | undefined;
|
|
108
|
-
|
|
109
|
-
info?: string | undefined;
|
|
105
|
+
error?: string | undefined;
|
|
110
106
|
errorContrast?: string | undefined;
|
|
111
|
-
successContrast?: string | undefined;
|
|
112
|
-
warningContrast?: string | undefined;
|
|
113
|
-
primaryContrast?: string | undefined;
|
|
114
|
-
infoContrast?: string | undefined;
|
|
115
107
|
errorHue?: number | undefined;
|
|
108
|
+
info?: string | undefined;
|
|
109
|
+
infoContrast?: string | undefined;
|
|
110
|
+
infoHue?: number | undefined;
|
|
111
|
+
primary?: string | undefined;
|
|
112
|
+
primaryContrast?: string | undefined;
|
|
113
|
+
primaryHue?: number | undefined;
|
|
114
|
+
success?: string | undefined;
|
|
115
|
+
successContrast?: string | undefined;
|
|
116
116
|
successHue?: number | undefined;
|
|
117
|
+
warning?: string | undefined;
|
|
118
|
+
warningContrast?: string | undefined;
|
|
117
119
|
warningHue?: number | undefined;
|
|
118
|
-
primaryHue?: number | undefined;
|
|
119
|
-
infoHue?: number | undefined;
|
|
120
120
|
} | undefined;
|
|
121
121
|
links?: {
|
|
122
|
-
href: string;
|
|
123
122
|
title: string | Record<string, string | undefined>;
|
|
123
|
+
href: string;
|
|
124
124
|
rel?: string | undefined;
|
|
125
125
|
}[] | undefined;
|
|
126
126
|
}>>;
|
|
@@ -157,29 +157,29 @@ export declare const customizationSchema: z.ZodObject<{
|
|
|
157
157
|
name?: string | undefined;
|
|
158
158
|
logo?: string | undefined;
|
|
159
159
|
colors?: {
|
|
160
|
-
error?: import("../lib/util/color.js").RgbColor | undefined;
|
|
161
|
-
success?: import("../lib/util/color.js").RgbColor | undefined;
|
|
162
|
-
warning?: import("../lib/util/color.js").RgbColor | undefined;
|
|
163
160
|
light?: import("../lib/util/color.js").RgbColor | undefined;
|
|
164
161
|
dark?: import("../lib/util/color.js").RgbColor | undefined;
|
|
165
162
|
contrastSaturation?: number | undefined;
|
|
166
|
-
|
|
167
|
-
info?: import("../lib/util/color.js").RgbColor | undefined;
|
|
163
|
+
error?: import("../lib/util/color.js").RgbColor | undefined;
|
|
168
164
|
errorContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
169
|
-
successContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
170
|
-
warningContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
171
|
-
primaryContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
172
|
-
infoContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
173
165
|
errorHue?: number | undefined;
|
|
166
|
+
info?: import("../lib/util/color.js").RgbColor | undefined;
|
|
167
|
+
infoContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
168
|
+
infoHue?: number | undefined;
|
|
169
|
+
primary?: import("../lib/util/color.js").RgbColor | undefined;
|
|
170
|
+
primaryContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
171
|
+
primaryHue?: number | undefined;
|
|
172
|
+
success?: import("../lib/util/color.js").RgbColor | undefined;
|
|
173
|
+
successContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
174
174
|
successHue?: number | undefined;
|
|
175
|
+
warning?: import("../lib/util/color.js").RgbColor | undefined;
|
|
176
|
+
warningContrast?: import("../lib/util/color.js").RgbColor | undefined;
|
|
175
177
|
warningHue?: number | undefined;
|
|
176
|
-
primaryHue?: number | undefined;
|
|
177
|
-
infoHue?: number | undefined;
|
|
178
178
|
} | undefined;
|
|
179
179
|
links?: {
|
|
180
|
-
href: string;
|
|
181
180
|
title: string | Record<string, string | undefined>;
|
|
182
|
-
|
|
181
|
+
href: string;
|
|
182
|
+
rel?: "alternate" | "author" | "canonical" | "dns-prefetch" | "expect" | "external" | "help" | "icon" | "license" | "manifest" | "me" | "modulepreload" | "next" | "pingback" | "preconnect" | "prefetch" | "preload" | "prerender" | "prev" | "privacy-policy" | "search" | "stylesheet" | "terms-of-service" | undefined;
|
|
183
183
|
}[] | undefined;
|
|
184
184
|
} | undefined;
|
|
185
185
|
inviteCodeRequired?: boolean | undefined;
|
|
@@ -196,28 +196,28 @@ export declare const customizationSchema: z.ZodObject<{
|
|
|
196
196
|
name?: string | undefined;
|
|
197
197
|
logo?: string | undefined;
|
|
198
198
|
colors?: {
|
|
199
|
-
error?: string | undefined;
|
|
200
|
-
success?: string | undefined;
|
|
201
|
-
warning?: string | undefined;
|
|
202
199
|
light?: string | undefined;
|
|
203
200
|
dark?: string | undefined;
|
|
204
201
|
contrastSaturation?: number | undefined;
|
|
205
|
-
|
|
206
|
-
info?: string | undefined;
|
|
202
|
+
error?: string | undefined;
|
|
207
203
|
errorContrast?: string | undefined;
|
|
208
|
-
successContrast?: string | undefined;
|
|
209
|
-
warningContrast?: string | undefined;
|
|
210
|
-
primaryContrast?: string | undefined;
|
|
211
|
-
infoContrast?: string | undefined;
|
|
212
204
|
errorHue?: number | undefined;
|
|
205
|
+
info?: string | undefined;
|
|
206
|
+
infoContrast?: string | undefined;
|
|
207
|
+
infoHue?: number | undefined;
|
|
208
|
+
primary?: string | undefined;
|
|
209
|
+
primaryContrast?: string | undefined;
|
|
210
|
+
primaryHue?: number | undefined;
|
|
211
|
+
success?: string | undefined;
|
|
212
|
+
successContrast?: string | undefined;
|
|
213
213
|
successHue?: number | undefined;
|
|
214
|
+
warning?: string | undefined;
|
|
215
|
+
warningContrast?: string | undefined;
|
|
214
216
|
warningHue?: number | undefined;
|
|
215
|
-
primaryHue?: number | undefined;
|
|
216
|
-
infoHue?: number | undefined;
|
|
217
217
|
} | undefined;
|
|
218
218
|
links?: {
|
|
219
|
-
href: string;
|
|
220
219
|
title: string | Record<string, string | undefined>;
|
|
220
|
+
href: string;
|
|
221
221
|
rel?: string | undefined;
|
|
222
222
|
}[] | undefined;
|
|
223
223
|
} | undefined;
|