Documentation
    Preparing search index...
    "export=": {
        copy_tenant_template: (
            __namedParameters: {
                loadAndSaveNewPlugin: (plugin: export=) => void;
                target: string;
                tenant_template: string;
            },
        ) => Promise<void>;
        create_tenant: (
            __namedParameters: {
                loadAndSaveNewPlugin: (plugin: export=) => void;
                noSignalOrDB?: boolean;
                plugin_loader: Function;
                t: string;
                tenant_template?: string;
            },
        ) => Promise<void>;
        deleteTenant: (sub: string) => Promise<void>;
        domain_sanitize: (s: string) => string;
        eachTenant: (f: () => Promise<any>) => Promise<void>;
        getAllTenantRows: () => Promise<Row[]>;
        getAllTenants: () => Promise<string[]>;
        insertTenant: (
            subdomain: string,
            email?: string,
            description?: string,
            template?: string,
        ) => Promise<string>;
        switchToTenant: (domain: string, newurl: string) => Promise<void>;
        Tenant: typeof Tenant;
        upgrade_all_tenants_plugins: (
            loadPlugin: (
                arg0: export=,
                arg1: boolean,
                arg2: boolean,
            ) => Promise<{ version: string }>,
        ) => Promise<void>;
    }

    Type Declaration

    • copy_tenant_template: (
          __namedParameters: {
              loadAndSaveNewPlugin: (plugin: export=) => void;
              target: string;
              tenant_template: string;
          },
      ) => Promise<void>

      Copy template data into tenant (target)

      • create backup from template tenant
      • restore backup to target tenant
      • clean up user_id in files
      • delete users (including sequence reset)
    • create_tenant: (
          __namedParameters: {
              loadAndSaveNewPlugin: (plugin: export=) => void;
              noSignalOrDB?: boolean;
              plugin_loader: Function;
              t: string;
              tenant_template?: string;
          },
      ) => Promise<void>

      Create tenant? Not sure that is correct name

      • load plugins
      • use tenant template (copy structures from...)
    • FunctiondeleteTenant: (sub: string) => Promise<void>

      Delete Tenant Note! This is deleting all tenant data in database!

      • drop database schema
      • delete information about tenant from main site
    • Functiondomain_sanitize: (s: string) => string

      Sanitize Domain (Normalize domain name).

      • force to lower case
      • remove . in name
    • eachTenant: (f: () => Promise<any>) => Promise<void>

      Call function f for each Tenant

    • FunctiongetAllTenantRows: () => Promise<Row[]>

      List all Tenants

    • FunctiongetAllTenants: () => Promise<string[]>

      List all Tenants

    • FunctioninsertTenant: (
          subdomain: string,
          email?: string,
          description?: string,
          template?: string,
      ) => Promise<string>

      Insert Tenant

      • normalize domain name
      • create db schema
      • reset db schema (create required )
    • switchToTenant: (domain: string, newurl: string) => Promise<void>

      Switch to Tenant:

      • change current base_url
    • Tenant: typeof Tenant
    • upgrade_all_tenants_plugins: (
          loadPlugin: (
              arg0: export=,
              arg1: boolean,
              arg2: boolean,
          ) => Promise<{ version: string }>,
      ) => Promise<void>