Releases: Akord-com/akord-js
Releases · Akord-com/akord-js
Release v4.0.2
ci: version bump to v4.0.2
Release v4.0.1
includes breaking changes
- auth module
- separate authentication into independent module
- handle token refresh in the background for browser scenarios
- API key for server-side scenarios
- token storage configuration (memoryStorage, localStorage, sessionStorage, etc.)
// to authenticate in this version
import { Akord, Auth } from "@akord/akord-js";
const { wallet } = await Auth.signIn(email, password);
const akord = await Akord.init(wallet);
- fully move to the new API
- vault & membership pagination
// to get all user vaults in this version
const vaults = await akord.vault.listAll();
// or iterate through all user vaults
let token = undefined;
let vaults = [];
do {
const { items, nextToken } = await akord.vault.list({ nextToken: token });
vaults = vaults.concat(items);
token = nextToken;
} while (token);
- options cleanup & defaults setup
// to create a private vault
const { vaultId } = await akord.vault.create("my private vault");
// to create a public vault with terms of access
const { vaultId } = await akord.vault.create(
"my public vault",
{ public: true, termsOfAccess: "terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault" }
);
// to list all stacks within the given folder
const stacks = await akord.stack.listAll(vaultId, { parentId: folderId });
// to create a stack in an existing folder
import { NodeJs } from "@akord/akord-js/lib/types/file";
const file = await NodeJs.File.fromPath("path to your file");
const { stackId } = await akord.stack.create(vaultId, file, "your stack name", { parentId: folderId });
// to create a JSON note
const { noteId } = await akord.note.create(
vaultId,
JSON.stringify({ name: "My first JSON note" }),
"My first JSON note",
{ parentId: parentId, mimeType: "application/json" }
);
- general code cleanup & bug fixes
- improved error handling
- return object on create/update
// create new folder
const { folderId, object } = await akord.folder.create(vaultId, "new folder");
// display newly created folder
console.log(object);
- deep option in vault.get()
// to get the vault with all its content (memos, folders, etc.)
const vault = await akord.vault.get(vaultId, { deep: true });
Release v4.0.0
includes breaking changes
- auth module
- separate authentication into independent module
- handle token refresh in the background for browser scenarios
- API key for server-side scenarios
- token storage configuration (memoryStorage, localStorage, sessionStorage, etc.)
// to authenticate in this version
import { Akord, Auth } from "@akord/akord-js";
const { wallet } = await Auth.signIn(email, password);
const akord = await Akord.init(wallet);
- fully move to the new API
- vault & membership pagination
// to get all user vaults in this version
const vaults = await akord.vault.listAll();
// or iterate through all user vaults
let token = undefined;
let vaults = [];
do {
const { items, nextToken } = await akord.vault.list({ nextToken: token });
vaults = vaults.concat(items);
token = nextToken;
} while (token);
- options cleanup & defaults setup
// to create a private vault
const { vaultId } = await akord.vault.create("my private vault");
// to create a public vault with terms of access
const { vaultId } = await akord.vault.create(
"my public vault",
{ public: true, termsOfAccess: "terms of access here - if the vault is intended for professional or legal use, you can add terms of access and they must be digitally signed before accessing the vault" }
);
// to list all stacks within the given folder
const stacks = await akord.stack.listAll(vaultId, { parentId: folderId });
// to create a stack in an existing folder
import { NodeJs } from "@akord/akord-js/lib/types/file";
const file = await NodeJs.File.fromPath("path to your file");
const { stackId } = await akord.stack.create(vaultId, file, "your stack name", { parentId: folderId });
// to create a JSON note
const { noteId } = await akord.note.create(
vaultId,
JSON.stringify({ name: "My first JSON note" }),
"My first JSON note",
{ parentId: parentId, mimeType: "application/json" }
);
- general code cleanup & bug fixes
- improved error handling
- return object on create/update
// create new folder
const { folderId, object } = await akord.folder.create(vaultId, "new folder");
// display newly created folder
console.log(object);
- deep option in vault.get()
// to get the vault with all its content (memos, folders, etc.)
const vault = await akord.vault.get(vaultId, { deep: true });
Release v3.11.4
ci: version bump to v3.11.4
Release v3.11.3
ci: version bump to v3.11.3
Release v3.11.2
ci: version bump to v3.11.2
Release v3.11.1
ci: version bump to v3.11.1
Release v3.11.0
ci: version bump to v3.11.0
Release v3.10.1
ci: version bump to v3.10.1
Release v3.10.0
ci: version bump to v3.10.0