@adcp/sdk API Reference - v14.0.0-beta.6
    Preparing search index...

    Function urlRender

    • Build a url-variant PreviewRender with output_format: 'url' injected.

      Requires preview_url — you can't call this without the field the url discriminator makes required, which is the whole point of the helper.

      Parameters

      • fields: UrlRenderFields

      Returns {
          render_id: string;
          output_format: "url";
          preview_url: string;
          role: string;
          dimensions?: { width: number; height: number };
          embedding?: {
              recommended_sandbox?: "";
              requires_https?: boolean;
              supports_fullscreen?: boolean;
              csp_policy?: string;
          };
          renderer?: PreviewRendererMetadata;
      }

      • render_id: string

        Unique identifier for this rendered piece within the variant

      • output_format: "url"

        Discriminator indicating preview_url is provided

      • preview_url: string

        Untrusted URL to an HTML page that renders this piece. Consumers MUST load it only in a cross-origin iframe with an empty sandbox token set and a caller-enforced restrictive CSP. Provider embedding metadata is advisory and MUST NOT loosen that policy.

      • role: string

        Semantic role of this rendered piece. Use 'primary' for main content, 'companion' for associated banners, descriptive strings for device variants or custom roles.

      • Optionaldimensions?: { width: number; height: number }

        Dimensions for this rendered piece

      • Optionalembedding?: {
            recommended_sandbox?: "";
            requires_https?: boolean;
            supports_fullscreen?: boolean;
            csp_policy?: string;
        }

        Optional security and embedding metadata for safe iframe integration

        • Optionalrecommended_sandbox?: ""

          Empty iframe sandbox token set. Provider metadata MUST NOT grant scripts, same-origin, navigation, popups, forms, downloads, or other capabilities.

        • Optionalrequires_https?: boolean

          Whether this output requires HTTPS for secure embedding

        • Optionalsupports_fullscreen?: boolean

          Whether this output supports fullscreen mode

        • Optionalcsp_policy?: string

          Content Security Policy requirements for embedding

      • Optionalrenderer?: PreviewRendererMetadata