# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from . import _utilities
from . import outputs

__all__ = [
    'CustomScriptArgs',
    'GetTokenInfoApplication',
    'GetTokenInfoAuthorization',
    'GetTokenInfoAuthorizedTo',
    'NodeContentUpdate',
    'PageCustomCodeScript',
    'PageInfo',
]

@pulumi.output_type
class CustomScriptArgs(dict):
    def __init__(__self__, *,
                 id: _builtins.str,
                 location: _builtins.str,
                 version: _builtins.str,
                 attributes: Optional[Mapping[str, Any]] = None):
        """
        :param _builtins.str id: The unique identifier of the registered custom code script. The script must first be registered to the site using the RegisterScript resource. Examples: 'cms_slider', 'analytics', 'custom_widget'
        :param _builtins.str location: The location where the script is placed on the page. Valid values: 'header' (placed in the <head> section), 'footer' (placed before </body>). Scripts in the header execute before page content loads, while footer scripts execute after the page has loaded.
        :param _builtins.str version: The semantic version string for the registered script (e.g., '1.0.0', '0.1.2'). This version must exist for the registered script ID. When you update the version, a different version of the script will be applied.
        :param Mapping[str, Any] attributes: Optional developer-specified key/value pairs applied as HTML attributes to the script tag. Example: {'data-config': 'my-value'}. These attributes are passed directly to the script tag.
        """
        pulumi.set(__self__, "id", id)
        pulumi.set(__self__, "location", location)
        pulumi.set(__self__, "version", version)
        if attributes is not None:
            pulumi.set(__self__, "attributes", attributes)

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The unique identifier of the registered custom code script. The script must first be registered to the site using the RegisterScript resource. Examples: 'cms_slider', 'analytics', 'custom_widget'
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter
    def location(self) -> _builtins.str:
        """
        The location where the script is placed on the page. Valid values: 'header' (placed in the <head> section), 'footer' (placed before </body>). Scripts in the header execute before page content loads, while footer scripts execute after the page has loaded.
        """
        return pulumi.get(self, "location")

    @_builtins.property
    @pulumi.getter
    def version(self) -> _builtins.str:
        """
        The semantic version string for the registered script (e.g., '1.0.0', '0.1.2'). This version must exist for the registered script ID. When you update the version, a different version of the script will be applied.
        """
        return pulumi.get(self, "version")

    @_builtins.property
    @pulumi.getter
    def attributes(self) -> Optional[Mapping[str, Any]]:
        """
        Optional developer-specified key/value pairs applied as HTML attributes to the script tag. Example: {'data-config': 'my-value'}. These attributes are passed directly to the script tag.
        """
        return pulumi.get(self, "attributes")


@pulumi.output_type
class GetTokenInfoApplication(dict):
    def __init__(__self__, *,
                 description: _builtins.str,
                 display_name: _builtins.str,
                 homepage: _builtins.str,
                 id: _builtins.str):
        """
        :param _builtins.str description: The application description.
        :param _builtins.str display_name: The human-readable name of the application.
        :param _builtins.str homepage: The application homepage URL.
        :param _builtins.str id: The unique identifier for the application.
        """
        pulumi.set(__self__, "description", description)
        pulumi.set(__self__, "display_name", display_name)
        pulumi.set(__self__, "homepage", homepage)
        pulumi.set(__self__, "id", id)

    @_builtins.property
    @pulumi.getter
    def description(self) -> _builtins.str:
        """
        The application description.
        """
        return pulumi.get(self, "description")

    @_builtins.property
    @pulumi.getter(name="displayName")
    def display_name(self) -> _builtins.str:
        """
        The human-readable name of the application.
        """
        return pulumi.get(self, "display_name")

    @_builtins.property
    @pulumi.getter
    def homepage(self) -> _builtins.str:
        """
        The application homepage URL.
        """
        return pulumi.get(self, "homepage")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The unique identifier for the application.
        """
        return pulumi.get(self, "id")


@pulumi.output_type
class GetTokenInfoAuthorization(dict):
    def __init__(__self__, *,
                 authorized_to: 'outputs.GetTokenInfoAuthorizedTo',
                 created_on: _builtins.str,
                 grant_type: _builtins.str,
                 id: _builtins.str,
                 last_used: _builtins.str,
                 rate_limit: _builtins.int,
                 scope: _builtins.str):
        """
        :param 'GetTokenInfoAuthorizedTo' authorized_to: The resources this token is authorized to access.
        :param _builtins.str created_on: The timestamp when this authorization was created (RFC3339 format).
        :param _builtins.str grant_type: The OAuth grant type used to obtain this token (e.g., 'authorization_code').
        :param _builtins.str id: The unique identifier for this authorization.
        :param _builtins.str last_used: The timestamp when this token was last used (RFC3339 format).
        :param _builtins.int rate_limit: The rate limit for this token in requests per minute.
        :param _builtins.str scope: The OAuth scopes granted to this token (space or comma separated).
        """
        pulumi.set(__self__, "authorized_to", authorized_to)
        pulumi.set(__self__, "created_on", created_on)
        pulumi.set(__self__, "grant_type", grant_type)
        pulumi.set(__self__, "id", id)
        pulumi.set(__self__, "last_used", last_used)
        pulumi.set(__self__, "rate_limit", rate_limit)
        pulumi.set(__self__, "scope", scope)

    @_builtins.property
    @pulumi.getter(name="authorizedTo")
    def authorized_to(self) -> 'outputs.GetTokenInfoAuthorizedTo':
        """
        The resources this token is authorized to access.
        """
        return pulumi.get(self, "authorized_to")

    @_builtins.property
    @pulumi.getter(name="createdOn")
    def created_on(self) -> _builtins.str:
        """
        The timestamp when this authorization was created (RFC3339 format).
        """
        return pulumi.get(self, "created_on")

    @_builtins.property
    @pulumi.getter(name="grantType")
    def grant_type(self) -> _builtins.str:
        """
        The OAuth grant type used to obtain this token (e.g., 'authorization_code').
        """
        return pulumi.get(self, "grant_type")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The unique identifier for this authorization.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter(name="lastUsed")
    def last_used(self) -> _builtins.str:
        """
        The timestamp when this token was last used (RFC3339 format).
        """
        return pulumi.get(self, "last_used")

    @_builtins.property
    @pulumi.getter(name="rateLimit")
    def rate_limit(self) -> _builtins.int:
        """
        The rate limit for this token in requests per minute.
        """
        return pulumi.get(self, "rate_limit")

    @_builtins.property
    @pulumi.getter
    def scope(self) -> _builtins.str:
        """
        The OAuth scopes granted to this token (space or comma separated).
        """
        return pulumi.get(self, "scope")


@pulumi.output_type
class GetTokenInfoAuthorizedTo(dict):
    def __init__(__self__, *,
                 site_ids: Sequence[_builtins.str],
                 user_ids: Sequence[_builtins.str],
                 workspace_ids: Sequence[_builtins.str]):
        """
        :param Sequence[_builtins.str] site_ids: List of site IDs this token is authorized to access.
        :param Sequence[_builtins.str] user_ids: List of user IDs this token is authorized to access.
        :param Sequence[_builtins.str] workspace_ids: List of workspace IDs this token is authorized to access.
        """
        pulumi.set(__self__, "site_ids", site_ids)
        pulumi.set(__self__, "user_ids", user_ids)
        pulumi.set(__self__, "workspace_ids", workspace_ids)

    @_builtins.property
    @pulumi.getter(name="siteIds")
    def site_ids(self) -> Sequence[_builtins.str]:
        """
        List of site IDs this token is authorized to access.
        """
        return pulumi.get(self, "site_ids")

    @_builtins.property
    @pulumi.getter(name="userIds")
    def user_ids(self) -> Sequence[_builtins.str]:
        """
        List of user IDs this token is authorized to access.
        """
        return pulumi.get(self, "user_ids")

    @_builtins.property
    @pulumi.getter(name="workspaceIds")
    def workspace_ids(self) -> Sequence[_builtins.str]:
        """
        List of workspace IDs this token is authorized to access.
        """
        return pulumi.get(self, "workspace_ids")


@pulumi.output_type
class NodeContentUpdate(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "nodeId":
            suggest = "node_id"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in NodeContentUpdate. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        NodeContentUpdate.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        NodeContentUpdate.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 node_id: _builtins.str,
                 text: _builtins.str):
        """
        :param _builtins.str node_id: The unique identifier for the DOM node to update. This ID comes from the page's DOM structure and must exist on the page. Retrieve node IDs using GET /pages/{page_id}/dom endpoint.
        :param _builtins.str text: The new text content for the node. This will replace the existing text content in the specified node. Only applicable to text nodes or elements containing text.
        """
        pulumi.set(__self__, "node_id", node_id)
        pulumi.set(__self__, "text", text)

    @_builtins.property
    @pulumi.getter(name="nodeId")
    def node_id(self) -> _builtins.str:
        """
        The unique identifier for the DOM node to update. This ID comes from the page's DOM structure and must exist on the page. Retrieve node IDs using GET /pages/{page_id}/dom endpoint.
        """
        return pulumi.get(self, "node_id")

    @_builtins.property
    @pulumi.getter
    def text(self) -> _builtins.str:
        """
        The new text content for the node. This will replace the existing text content in the specified node. Only applicable to text nodes or elements containing text.
        """
        return pulumi.get(self, "text")


@pulumi.output_type
class PageCustomCodeScript(dict):
    def __init__(__self__, *,
                 attributes: Mapping[str, Any],
                 id: _builtins.str,
                 location: _builtins.str,
                 version: _builtins.str):
        """
        :param Mapping[str, Any] attributes: Optional developer-specified key/value pairs for script attributes. These attributes can be used by the script to customize its behavior on this page.
        :param _builtins.str id: The unique identifier of a registered custom code script. This must be a script that was previously registered using the RegisteredScript resource. Script IDs are assigned by Webflow when the script is registered.
        :param _builtins.str location: Where the script should be applied on the page. Must be either 'header' (loaded in page header) or 'footer' (loaded at end of page). Use 'header' for scripts that don't depend on DOM elements. Use 'footer' for scripts that need to run after DOM is fully loaded.
        :param _builtins.str version: The semantic version string for the registered script (e.g., '1.0.0'). This version must match a registered version of the script. You can have multiple versions of the same script registered.
        """
        pulumi.set(__self__, "attributes", attributes)
        pulumi.set(__self__, "id", id)
        pulumi.set(__self__, "location", location)
        pulumi.set(__self__, "version", version)

    @_builtins.property
    @pulumi.getter
    def attributes(self) -> Mapping[str, Any]:
        """
        Optional developer-specified key/value pairs for script attributes. These attributes can be used by the script to customize its behavior on this page.
        """
        return pulumi.get(self, "attributes")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The unique identifier of a registered custom code script. This must be a script that was previously registered using the RegisteredScript resource. Script IDs are assigned by Webflow when the script is registered.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter
    def location(self) -> _builtins.str:
        """
        Where the script should be applied on the page. Must be either 'header' (loaded in page header) or 'footer' (loaded at end of page). Use 'header' for scripts that don't depend on DOM elements. Use 'footer' for scripts that need to run after DOM is fully loaded.
        """
        return pulumi.get(self, "location")

    @_builtins.property
    @pulumi.getter
    def version(self) -> _builtins.str:
        """
        The semantic version string for the registered script (e.g., '1.0.0'). This version must match a registered version of the script. You can have multiple versions of the same script registered.
        """
        return pulumi.get(self, "version")


@pulumi.output_type
class PageInfo(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "createdOn":
            suggest = "created_on"
        elif key == "lastUpdated":
            suggest = "last_updated"
        elif key == "pageId":
            suggest = "page_id"
        elif key == "siteId":
            suggest = "site_id"
        elif key == "collectionId":
            suggest = "collection_id"
        elif key == "parentId":
            suggest = "parent_id"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in PageInfo. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        PageInfo.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        PageInfo.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 archived: _builtins.bool,
                 created_on: _builtins.str,
                 draft: _builtins.bool,
                 last_updated: _builtins.str,
                 page_id: _builtins.str,
                 site_id: _builtins.str,
                 slug: _builtins.str,
                 title: _builtins.str,
                 collection_id: Optional[_builtins.str] = None,
                 parent_id: Optional[_builtins.str] = None):
        pulumi.set(__self__, "archived", archived)
        pulumi.set(__self__, "created_on", created_on)
        pulumi.set(__self__, "draft", draft)
        pulumi.set(__self__, "last_updated", last_updated)
        pulumi.set(__self__, "page_id", page_id)
        pulumi.set(__self__, "site_id", site_id)
        pulumi.set(__self__, "slug", slug)
        pulumi.set(__self__, "title", title)
        if collection_id is not None:
            pulumi.set(__self__, "collection_id", collection_id)
        if parent_id is not None:
            pulumi.set(__self__, "parent_id", parent_id)

    @_builtins.property
    @pulumi.getter
    def archived(self) -> _builtins.bool:
        return pulumi.get(self, "archived")

    @_builtins.property
    @pulumi.getter(name="createdOn")
    def created_on(self) -> _builtins.str:
        return pulumi.get(self, "created_on")

    @_builtins.property
    @pulumi.getter
    def draft(self) -> _builtins.bool:
        return pulumi.get(self, "draft")

    @_builtins.property
    @pulumi.getter(name="lastUpdated")
    def last_updated(self) -> _builtins.str:
        return pulumi.get(self, "last_updated")

    @_builtins.property
    @pulumi.getter(name="pageId")
    def page_id(self) -> _builtins.str:
        return pulumi.get(self, "page_id")

    @_builtins.property
    @pulumi.getter(name="siteId")
    def site_id(self) -> _builtins.str:
        return pulumi.get(self, "site_id")

    @_builtins.property
    @pulumi.getter
    def slug(self) -> _builtins.str:
        return pulumi.get(self, "slug")

    @_builtins.property
    @pulumi.getter
    def title(self) -> _builtins.str:
        return pulumi.get(self, "title")

    @_builtins.property
    @pulumi.getter(name="collectionId")
    def collection_id(self) -> Optional[_builtins.str]:
        return pulumi.get(self, "collection_id")

    @_builtins.property
    @pulumi.getter(name="parentId")
    def parent_id(self) -> Optional[_builtins.str]:
        return pulumi.get(self, "parent_id")


