midas/sdk/netlify

Types

pub type App {
  App(client_id: String, redirect_uri: String)
}

Constructors

  • App(client_id: String, redirect_uri: String)

Constants

pub const api_host: String

Functions

pub fn add_member_to_account(
  token: String,
  account_slug: String,
  account_add_member_setup: AccountAddMemberSetup,
) -> Effect(List(Member))
pub fn auth_redirect(
  redirect: Uri,
) -> Result(#(String, String, String), String)
pub fn authenticate(app: App) -> Effect(String)
pub fn cancel_account(
  token: String,
  account_id: String,
) -> Effect(Nil)
pub fn cancel_site_deploy(
  token: String,
  deploy_id: String,
) -> Effect(Deploy)
pub fn configure_dnsfor_site(
  token: String,
  site_id: String,
) -> Effect(List(DnsZone))
pub fn create_account(
  token: String,
  account_setup: AccountSetup,
) -> Effect(AccountMembership)
pub fn create_deploy_key(token: String) -> Effect(DeployKey)
pub fn create_dns_record(
  token: String,
  zone_id: String,
  dns_record_create: DnsRecordCreate,
) -> Effect(DnsRecord)
pub fn create_dns_zone(
  token: String,
  dns_zone_setup: DnsZoneSetup,
) -> Effect(DnsZone)
pub fn create_env_vars(
  token: String,
  account_id: String,
  site_id site_id: Option(String),
) -> Effect(List(EnvVar))
pub fn create_hook_by_site_id(
  token: String,
  hook: Hook,
  site_id site_id: String,
) -> Effect(Hook)
pub fn create_service_instance(
  token: String,
  site_id: String,
  addon: String,
  data: BitArray,
) -> Effect(ServiceInstance)
pub fn create_site(
  token: String,
  site_setup: SiteSetup,
  configure_dns configure_dns: Option(Bool),
) -> Effect(Site)
pub fn create_site_asset(
  token: String,
  site_id: String,
  name name: String,
  size size: Int,
  content_type content_type: String,
  visibility visibility: Option(String),
) -> Effect(AssetSignature)
pub fn create_site_build(
  token: String,
  site_id: String,
  build_setup: BuildSetup,
) -> Effect(Build)
pub fn create_site_build_hook(
  token: String,
  site_id: String,
  build_hook_setup: BuildHookSetup,
) -> Effect(BuildHook)
pub fn create_site_deploy(
  token: String,
  site_id: String,
  deploy_files: DeployFiles,
  title title: Option(String),
  deploy_previews deploy_previews: Option(Bool),
  production production: Option(Bool),
  state state: Option(String),
  branch branch: Option(String),
  latest_published latest_published: Option(Bool),
) -> Effect(Deploy)
pub fn create_site_dev_server(
  token: String,
  site_id: String,
  branch branch: Option(String),
) -> Effect(List(DevServer))
pub fn create_site_dev_server_hook(
  token: String,
  site_id: String,
  dev_server_hook_setup: DevServerHookSetup,
) -> Effect(DevServerHook)
pub fn create_site_in_team(
  token: String,
  account_slug: String,
  site_setup: SiteSetup,
  configure_dns configure_dns: Option(Bool),
) -> Effect(Site)
pub fn create_site_snippet(
  token: String,
  site_id: String,
  snippet: Snippet,
) -> Effect(Snippet)
pub fn create_split_test(
  token: String,
  site_id: String,
  split_test_setup: SplitTestSetup,
) -> Effect(SplitTest)
pub fn create_ticket(
  token: String,
  client_id client_id: String,
) -> Effect(Ticket)
pub fn delete_deploy(
  token: String,
  deploy_id: String,
) -> Effect(Nil)
pub fn delete_deploy_key(
  token: String,
  key_id: String,
) -> Effect(Nil)
pub fn delete_dns_record(
  token: String,
  zone_id: String,
  dns_record_id: String,
) -> Effect(Nil)
pub fn delete_dns_zone(
  token: String,
  zone_id: String,
) -> Effect(Nil)
pub fn delete_env_var(
  token: String,
  account_id: String,
  key: String,
  site_id site_id: Option(String),
) -> Effect(Nil)
pub fn delete_env_var_value(
  token: String,
  account_id: String,
  key: String,
  id: String,
  site_id site_id: Option(String),
) -> Effect(Nil)
pub fn delete_service_instance(
  token: String,
  site_id: String,
  addon: String,
  instance_id: String,
) -> Effect(Nil)
pub fn delete_site(token: String, site_id: String) -> Effect(Nil)
pub fn delete_site_asset(
  token: String,
  site_id: String,
  asset_id: String,
) -> Effect(Nil)
pub fn delete_site_build_hook(
  token: String,
  site_id: String,
  id: String,
) -> Effect(Nil)
pub fn delete_site_deploy(
  token: String,
  site_id: String,
  deploy_id: String,
) -> Effect(Nil)
pub fn delete_site_dev_server_hook(
  token: String,
  site_id: String,
  id: String,
) -> Effect(Nil)
pub fn delete_site_dev_servers(
  token: String,
  site_id: String,
  branch branch: Option(String),
) -> Effect(Nil)
pub fn delete_site_form(
  token: String,
  site_id: String,
  form_id: String,
) -> Effect(Nil)
pub fn delete_site_snippet(
  token: String,
  site_id: String,
  snippet_id: String,
) -> Effect(Nil)
pub fn delete_submission(
  token: String,
  submission_id: String,
) -> Effect(Nil)
pub fn deploy_site(
  token: String,
  site_id: String,
  files: List(#(String, BitArray)),
) -> Effect(String)
pub fn disable_split_test(
  token: String,
  site_id: String,
  split_test_id: String,
) -> Effect(Nil)
pub fn enable_hook(
  token: String,
  hook_id: String,
) -> Effect(Hook)
pub fn enable_split_test(
  token: String,
  site_id: String,
  split_test_id: String,
) -> Effect(Nil)
pub fn exchange_ticket(
  token: String,
  ticket_id: String,
) -> Effect(AccessToken)
pub fn get_account(
  token: String,
  account_id: String,
) -> Effect(List(AccountMembership))
pub fn get_account_build_status(
  token: String,
  account_id: String,
) -> Effect(List(BuildStatus))
pub fn get_account_member(
  token: String,
  account_slug: String,
  member_id: String,
) -> Effect(Member)
pub fn get_current_user(token: String) -> Effect(List(User))
pub fn get_deploy(
  token: String,
  deploy_id: String,
) -> Effect(Deploy)
pub fn get_deploy_key(
  token: String,
  key_id: String,
) -> Effect(DeployKey)
pub fn get_dns_records(
  token: String,
  zone_id: String,
) -> Effect(List(DnsRecord))
pub fn get_dns_zone(
  token: String,
  zone_id: String,
) -> Effect(DnsZone)
pub fn get_dns_zones(
  token: String,
  account_slug account_slug: Option(String),
) -> Effect(List(DnsZone))
pub fn get_dnsfor_site(
  token: String,
  site_id: String,
) -> Effect(List(DnsZone))
pub fn get_env_var(
  token: String,
  account_id: String,
  key: String,
  site_id site_id: Option(String),
) -> Effect(EnvVar)
pub fn get_env_vars(
  token: String,
  account_id: String,
  context_name context_name: Option(String),
  scope scope: Option(String),
  site_id site_id: Option(String),
) -> Effect(List(EnvVar))
pub fn get_hook(token: String, hook_id: String) -> Effect(Hook)
pub fn get_individual_dns_record(
  token: String,
  zone_id: String,
  dns_record_id: String,
) -> Effect(DnsRecord)
pub fn get_services(
  token: String,
  search search: Option(String),
) -> Effect(List(Service))
pub fn get_site(token: String, site_id: String) -> Effect(Site)
pub fn get_site_asset_info(
  token: String,
  site_id: String,
  asset_id: String,
) -> Effect(Asset)
pub fn get_site_asset_public_signature(
  token: String,
  site_id: String,
  asset_id: String,
) -> Effect(AssetPublicSignature)
pub fn get_site_build(
  token: String,
  build_id: String,
) -> Effect(Build)
pub fn get_site_build_hook(
  token: String,
  site_id: String,
  id: String,
) -> Effect(BuildHook)
pub fn get_site_deploy(
  token: String,
  site_id: String,
  deploy_id: String,
) -> Effect(Deploy)
pub fn get_site_dev_server_hook(
  token: String,
  site_id: String,
  id: String,
) -> Effect(DevServerHook)
pub fn get_site_env_vars(
  token: String,
  site_id: String,
  context_name context_name: Option(String),
  scope scope: Option(String),
) -> Effect(List(EnvVar))
pub fn get_site_file_by_path_name(
  token: String,
  site_id: String,
  file_path: String,
) -> Effect(File)
pub fn get_site_metadata(
  token: String,
  site_id: String,
) -> Effect(Metadata)
pub fn get_site_snippet(
  token: String,
  site_id: String,
  snippet_id: String,
) -> Effect(Snippet)
pub fn get_split_test(
  token: String,
  site_id: String,
  split_test_id: String,
) -> Effect(SplitTest)
pub fn get_split_tests(
  token: String,
  site_id: String,
) -> Effect(List(SplitTest))
pub fn list_account_audit_events(
  token: String,
  account_id: String,
  query query: Option(String),
  log_type log_type: Option(String),
  page page: Option(Int),
  per_page per_page: Option(Int),
) -> Effect(List(AuditLog))
pub fn list_account_types_for_user(
  token: String,
) -> Effect(List(AccountType))
pub fn list_accounts_for_user(
  token: String,
) -> Effect(List(AccountMembership))
pub fn list_deploy_keys(token: String) -> Effect(List(DeployKey))
pub fn list_form_submission(
  token: String,
  submission_id: String,
  query query: Option(String),
  page page: Option(Int),
  per_page per_page: Option(Int),
) -> Effect(List(Submission))
pub fn list_form_submissions(
  token: String,
  form_id: String,
  page page: Option(Int),
  per_page per_page: Option(Int),
) -> Effect(List(Submission))
pub fn list_hook_types(token: String) -> Effect(List(HookType))
pub fn list_hooks_by_site_id(
  token: String,
  site_id site_id: String,
) -> Effect(List(Hook))
pub fn list_members_for_account(
  token: String,
  account_slug: String,
) -> Effect(List(Member))
pub fn list_payment_methods_for_user(
  token: String,
) -> Effect(List(PaymentMethod))
pub fn list_service_instances_for_site(
  token: String,
  site_id: String,
) -> Effect(List(ServiceInstance))
pub fn list_site_assets(
  token: String,
  site_id: String,
) -> Effect(List(Asset))
pub fn list_site_build_hooks(
  token: String,
  site_id: String,
) -> Effect(List(BuildHook))
pub fn list_site_builds(
  token: String,
  site_id: String,
  page page: Option(Int),
  per_page per_page: Option(Int),
) -> Effect(List(Build))
pub fn list_site_deployed_branches(
  token: String,
  site_id: String,
) -> Effect(List(DeployedBranch))
pub fn list_site_deploys(
  token: String,
  site_id: String,
  page page: Option(Int),
  per_page per_page: Option(Int),
  deploy_previews deploy_previews: Option(Bool),
  production production: Option(Bool),
  state state: Option(String),
  branch branch: Option(String),
  latest_published latest_published: Option(Bool),
) -> Effect(List(Deploy))
pub fn list_site_dev_server_hooks(
  token: String,
  site_id: String,
) -> Effect(List(DevServerHook))
pub fn list_site_dev_servers(
  token: String,
  site_id: String,
  page page: Option(Int),
  per_page per_page: Option(Int),
) -> Effect(List(DevServer))
pub fn list_site_files(
  token: String,
  site_id: String,
) -> Effect(List(File))
pub fn list_site_forms(
  token: String,
  site_id: String,
) -> Effect(List(Form))
pub fn list_site_snippets(
  token: String,
  site_id: String,
) -> Effect(List(Snippet))
pub fn list_site_submissions(
  token: String,
  site_id: String,
  page page: Option(Int),
  per_page per_page: Option(Int),
) -> Effect(List(Submission))
pub fn list_sites(
  token: String,
  name name: Option(String),
  filter filter: Option(String),
  page page: Option(Int),
  per_page per_page: Option(Int),
) -> Effect(List(Site))
pub fn list_sites_for_account(
  token: String,
  account_slug: String,
  name name: Option(String),
  page page: Option(Int),
  per_page per_page: Option(Int),
) -> Effect(List(Site))
pub fn lock_deploy(
  token: String,
  deploy_id: String,
) -> Effect(Deploy)
pub fn notify_build_start(
  token: String,
  build_id: String,
  buildbot_version buildbot_version: Option(String),
  build_version build_version: Option(String),
) -> Effect(Nil)
pub fn provision_site_tlscertificate(
  token: String,
  site_id: String,
  certificate certificate: Option(String),
  key key: Option(String),
  ca_certificates ca_certificates: Option(String),
) -> Effect(SniCertificate)
pub fn remove_account_member(
  token: String,
  account_slug: String,
  member_id: String,
) -> Effect(Nil)
pub fn restore_site_deploy(
  token: String,
  site_id: String,
  deploy_id: String,
) -> Effect(Deploy)
pub fn rollback_site_deploy(
  token: String,
  site_id: String,
) -> Effect(Nil)
pub fn search_site_functions(
  token: String,
  site_id: String,
  filter filter: Option(String),
) -> Effect(List(SiteFunction))
pub fn set_env_var_value(
  token: String,
  account_id: String,
  key: String,
  data: BitArray,
  site_id site_id: Option(String),
) -> Effect(EnvVar)
pub fn show_service(
  token: String,
  addon_name: String,
) -> Effect(Service)
pub fn show_service_instance(
  token: String,
  site_id: String,
  addon: String,
  instance_id: String,
) -> Effect(ServiceInstance)
pub fn show_service_manifest(
  token: String,
  addon_name: String,
) -> Effect(Dynamic)
pub fn show_site_tlscertificate(
  token: String,
  site_id: String,
) -> Effect(SniCertificate)
pub fn show_ticket(
  token: String,
  ticket_id: String,
) -> Effect(Ticket)
pub fn transfer_dns_zone(
  token: String,
  zone_id: String,
  account_id account_id: String,
  transfer_account_id transfer_account_id: String,
  transfer_user_id transfer_user_id: String,
) -> Effect(DnsZone)
pub fn unlock_deploy(
  token: String,
  deploy_id: String,
) -> Effect(Deploy)
pub fn update_account(
  token: String,
  account_id: String,
  account_update_setup: AccountUpdateSetup,
) -> Effect(AccountMembership)
pub fn update_account_member(
  token: String,
  account_slug: String,
  member_id: String,
  account_update_member_setup: AccountUpdateMemberSetup,
) -> Effect(Member)
pub fn update_env_var(
  token: String,
  account_id: String,
  key: String,
  data: BitArray,
  site_id site_id: Option(String),
) -> Effect(EnvVar)
pub fn update_hook(
  token: String,
  hook_id: String,
  hook: Hook,
) -> Effect(Hook)
pub fn update_service_instance(
  token: String,
  site_id: String,
  addon: String,
  instance_id: String,
  data: BitArray,
) -> Effect(Nil)
pub fn update_site(
  token: String,
  site_id: String,
  site_setup: SiteSetup,
) -> Effect(Site)
pub fn update_site_asset(
  token: String,
  site_id: String,
  asset_id: String,
  state state: String,
) -> Effect(Asset)
pub fn update_site_build_hook(
  token: String,
  site_id: String,
  id: String,
  build_hook_setup: BuildHookSetup,
) -> Effect(Nil)
pub fn update_site_build_log(
  token: String,
  build_id: String,
) -> Effect(Nil)
pub fn update_site_deploy(
  token: String,
  site_id: String,
  deploy_id: String,
  deploy_files: DeployFiles,
) -> Effect(Deploy)
pub fn update_site_dev_server_hook(
  token: String,
  site_id: String,
  id: String,
  dev_server_hook_setup: DevServerHookSetup,
) -> Effect(Nil)
pub fn update_site_metadata(
  token: String,
  site_id: String,
  metadata: Metadata,
) -> Effect(Nil)
pub fn update_site_snippet(
  token: String,
  site_id: String,
  snippet_id: String,
  snippet: Snippet,
) -> Effect(Nil)
pub fn update_split_test(
  token: String,
  site_id: String,
  split_test_id: String,
  split_test_setup: SplitTestSetup,
) -> Effect(SplitTest)
pub fn upload_deploy_file(
  token: String,
  deploy_id: String,
  path: String,
  size size: Option(Int),
) -> Effect(File)
pub fn upload_deploy_function(
  token: String,
  deploy_id: String,
  name: String,
  runtime runtime: Option(String),
  invocation_mode invocation_mode: Option(String),
  timeout timeout: Option(Int),
  size size: Option(Int),
) -> Effect(Function)
Search Document