ic-asset-router 0.1.1

File-based HTTP routing with IC response certification for Internet Computer canisters
Documentation
/* eslint-disable */

// @ts-nocheck

// This file was automatically generated by @icp-sdk/bindgen@0.2.1.
// You should NOT make any changes in this file as it will be overwritten.
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.

import { IDL } from '@icp-sdk/core/candid';

export const idlFactory = ({ IDL }) => {
  const Post = IDL.Record({
    'id' : IDL.Int64,
    'title' : IDL.Text,
    'body' : IDL.Text,
    'author' : IDL.Text,
    'summary' : IDL.Text,
  });
  const GetPostResult = IDL.Variant({ 'Ok' : Post, 'Err' : IDL.Text });
  const HeaderField = IDL.Tuple(IDL.Text, IDL.Text);
  const HttpRequest = IDL.Record({
    'url' : IDL.Text,
    'method' : IDL.Text,
    'body' : IDL.Vec(IDL.Nat8),
    'headers' : IDL.Vec(HeaderField),
    'certificate_version' : IDL.Opt(IDL.Nat16),
  });
  const HttpResponse = IDL.Record({
    'body' : IDL.Vec(IDL.Nat8),
    'headers' : IDL.Vec(HeaderField),
    'status_code' : IDL.Nat16,
  });
  
  return IDL.Service({
    'get_post' : IDL.Func([IDL.Int64], [GetPostResult], ['query']),
    'http_request' : IDL.Func([HttpRequest], [HttpResponse], ['query']),
    'http_request_update' : IDL.Func([HttpRequest], [HttpResponse], []),
    'list_posts' : IDL.Func([], [IDL.Vec(Post)], ['query']),
  });
};

export const init = ({ IDL }) => { return []; };