Capsium TypeScript API
    Preparing search index...

    Function isResourceRoute

    • Parameters

      • route:
            | {
                headers?: Record<string, string>;
                headersFile?: string;
                path: string;
                remap?: string;
                requestHeaders?: Record<string, string>;
                resource: string;
                responseHeaders?: Record<string, string>;
                responseRewrite?: { body?: string; headers?: Record<string, string> };
                visibility?: "exported" | "private";
            }
            | {
                accessControl?: {
                    authenticationRequired?: boolean;
                    roles?: string[];
                    [key: string]: unknown;
                };
                dataset: string;
                path: string;
            }
            | {
                handler: string;
                method: string;
                path: string;
                remap?: string;
                requestHeaders?: Record<string, string>;
                responseHeaders?: Record<string, string>;
                responseRewrite?: { body?: string; headers?: Record<string, string> };
                visibility?: "exported" | "private";
                [key: string]: unknown;
            }
        • {
              headers?: Record<string, string>;
              headersFile?: string;
              path: string;
              remap?: string;
              requestHeaders?: Record<string, string>;
              resource: string;
              responseHeaders?: Record<string, string>;
              responseRewrite?: { body?: string; headers?: Record<string, string> };
              visibility?: "exported" | "private";
          }
          • Optionalheaders?: Record<string, string>
          • OptionalheadersFile?: string
          • path: string
          • Optionalremap?: string

            Effective public path the route is served at (defaults to path).

          • OptionalrequestHeaders?: Record<string, string>

            Merged into the request before forwarding to a handler (handler routes).

          • resource: string
          • OptionalresponseHeaders?: Record<string, string>

            Added to the response only when not already present.

          • OptionalresponseRewrite?: { body?: string; headers?: Record<string, string> }
            • Optionalbody?: string

              Replace the response body outright.

            • Optionalheaders?: Record<string, string>

              Override response headers (wins over the served response's own).

          • Optionalvisibility?: "exported" | "private"
        • {
              accessControl?: {
                  authenticationRequired?: boolean;
                  roles?: string[];
                  [key: string]: unknown;
              };
              dataset: string;
              path: string;
          }
          • OptionalaccessControl?: { authenticationRequired?: boolean; roles?: string[]; [key: string]: unknown }

            Route-level access control (§4b), enforced after authentication.

          • dataset: string
          • path: string
        • {
              handler: string;
              method: string;
              path: string;
              remap?: string;
              requestHeaders?: Record<string, string>;
              responseHeaders?: Record<string, string>;
              responseRewrite?: { body?: string; headers?: Record<string, string> };
              visibility?: "exported" | "private";
              [key: string]: unknown;
          }
          • [key: string]: unknown
          • handler: string
          • method: string
          • path: string
          • Optionalremap?: string

            Effective public path the route is served at (defaults to path).

          • OptionalrequestHeaders?: Record<string, string>

            Merged into the request before forwarding to a handler (handler routes).

          • OptionalresponseHeaders?: Record<string, string>

            Added to the response only when not already present.

          • OptionalresponseRewrite?: { body?: string; headers?: Record<string, string> }
            • Optionalbody?: string

              Replace the response body outright.

            • Optionalheaders?: Record<string, string>

              Override response headers (wins over the served response's own).

          • Optionalvisibility?: "exported" | "private"

      Returns route is {
          headers?: Record<string, string>;
          headersFile?: string;
          path: string;
          remap?: string;
          requestHeaders?: Record<string, string>;
          resource: string;
          responseHeaders?: Record<string, string>;
          responseRewrite?: { body?: string; headers?: Record<string, string> };
          visibility?: "exported" | "private";
      }