@servicenow/sdk - v4.4.1
    Preparing search index...

    Variable sp_widgetConst

    sp_widget: {
        extends: "sys_metadata";
        name: "sp_widget";
        schema: {
            category: Typed<
                | "custom"
                | "kb"
                | "sp_platform"
                | "sc"
                | "standard"
                | "other"
                | "sample",
                {
                    choices: {
                        custom: { label: "Custom"; sequence: 2 };
                        kb: { label: "Knowledge Base"; sequence: 3 };
                        other: { label: "Other Applications"; sequence: 5 };
                        sample: { label: "Sample"; sequence: 6 };
                        sc: { label: "Service Catalog"; sequence: 4 };
                        sp_platform: { label: "Service Portal Platform"; sequence: 7 };
                        standard: { label: "Standard"; sequence: 1 };
                    };
                    dropdown: "dropdown_without_none";
                    label: "Category";
                },
            >;
            client_script: Typed<
                string
                | ScriptModule<Function>,
                {
                    default: "api.controller=function() { /* widget controller */ var c = this;};";
                    label: "Client controller";
                },
            >;
            controller_as: Typed<string, { default: "c" }>;
            css: Typed<string | number, { column_type: "css"; label: "CSS" }>;
            data_table: Typed<
                keyof Tables,
                { default: "sp_instance"; label: "Data table"; mandatory: true },
            >;
            description: Typed<string, { label: "Description" }>;
            docs: Typed<
                | string
                | Record<"sp_documentation">
                | ExplicitKey<"sp_documentation">
                | TableBrand<"sp_documentation">,
                { label: "Docs"; referenceTable: "sp_documentation" },
            >;
            field_list: Typed<
                FieldListValue<keyof Tables>,
                { dependent: "data_table"; label: "Fields" },
            >;
            has_preview: Typed<boolean, { default: false; label: "Has preview" }>;
            id: Typed<string, { label: "ID" }>;
            internal: Typed<boolean, { default: false; label: "Internal" }>;
            link: Typed<
                string
                | ScriptModule<Function>,
                {
                    default: "function link(scope, element, attrs, controller) { }";
                    label: "Link";
                },
            >;
            name: Typed<string, { label: "Name"; mandatory: true }>;
            option_schema: Typed<
                string
                | number,
                { column_type: "json"; label: "Option schema" },
            >;
            public: Typed<boolean, { default: false; label: "Public" }>;
            roles: Typed<(string | Role)[], { label: "Roles" }>;
            script: Typed<
                string
                | ScriptModule<Function>,
                {
                    default: "(function() {\n /* populate the 'data' object */ \n /* e.g., data.table = $sp.getValue('table'); */\n})();\n";
                    label: "Server script";
                },
            >;
            servicenow: Typed<boolean, { default: false }>;
            template: Typed<
                string
                | number,
                {
                    column_type: "html_template";
                    default: "<div><!-- your widget template --></div>";
                },
            >;
        };
    } = ...

    Type Declaration

    • Readonlyextends: "sys_metadata"
    • Readonlyname: "sp_widget"
    • Readonlyschema: {
          category: Typed<
              | "custom"
              | "kb"
              | "sp_platform"
              | "sc"
              | "standard"
              | "other"
              | "sample",
              {
                  choices: {
                      custom: { label: "Custom"; sequence: 2 };
                      kb: { label: "Knowledge Base"; sequence: 3 };
                      other: { label: "Other Applications"; sequence: 5 };
                      sample: { label: "Sample"; sequence: 6 };
                      sc: { label: "Service Catalog"; sequence: 4 };
                      sp_platform: { label: "Service Portal Platform"; sequence: 7 };
                      standard: { label: "Standard"; sequence: 1 };
                  };
                  dropdown: "dropdown_without_none";
                  label: "Category";
              },
          >;
          client_script: Typed<
              string
              | ScriptModule<Function>,
              {
                  default: "api.controller=function() { /* widget controller */ var c = this;};";
                  label: "Client controller";
              },
          >;
          controller_as: Typed<string, { default: "c" }>;
          css: Typed<string | number, { column_type: "css"; label: "CSS" }>;
          data_table: Typed<
              keyof Tables,
              { default: "sp_instance"; label: "Data table"; mandatory: true },
          >;
          description: Typed<string, { label: "Description" }>;
          docs: Typed<
              | string
              | Record<"sp_documentation">
              | ExplicitKey<"sp_documentation">
              | TableBrand<"sp_documentation">,
              { label: "Docs"; referenceTable: "sp_documentation" },
          >;
          field_list: Typed<
              FieldListValue<keyof Tables>,
              { dependent: "data_table"; label: "Fields" },
          >;
          has_preview: Typed<boolean, { default: false; label: "Has preview" }>;
          id: Typed<string, { label: "ID" }>;
          internal: Typed<boolean, { default: false; label: "Internal" }>;
          link: Typed<
              string
              | ScriptModule<Function>,
              {
                  default: "function link(scope, element, attrs, controller) { }";
                  label: "Link";
              },
          >;
          name: Typed<string, { label: "Name"; mandatory: true }>;
          option_schema: Typed<
              string
              | number,
              { column_type: "json"; label: "Option schema" },
          >;
          public: Typed<boolean, { default: false; label: "Public" }>;
          roles: Typed<(string | Role)[], { label: "Roles" }>;
          script: Typed<
              string
              | ScriptModule<Function>,
              {
                  default: "(function() {\n /* populate the 'data' object */ \n /* e.g., data.table = $sp.getValue('table'); */\n})();\n";
                  label: "Server script";
              },
          >;
          servicenow: Typed<boolean, { default: false }>;
          template: Typed<
              string
              | number,
              {
                  column_type: "html_template";
                  default: "<div><!-- your widget template --></div>";
              },
          >;
      }