Skip to content

Commit

Permalink
feat(mailbox): adding user api (#386)
Browse files Browse the repository at this point in the history
Changelog
========

* Major release includes public Key based inboxing!!!
* Improved API authentication, authorization, scoping methods.
* Migrates from default identity Typescript types to more robust interfaces with encrypt and decrypt methods.
* Improved API response types, docs, organization.

Users
=========

Entirely new API client that consolidates User APIs and includes newly released inboxing methods. 
Use these new APIs to send encrypted direct messages between your app users based only on ed2559 public key.

* `listThreads` and `getThreads` moved to Users API class
* `setupMailbox`, `sendMessage`, `listInboxMessages`, `listSentboxMessages`, `deleteInboxMessage`, etc.
* subscription methods for inbox and sentbox
* Read more here:

Buckets
===========

Updated API client class methods with improved response types.

* Replaces all `AsObject` response types with named response types.
* Adds `copyAuth` method for sharing authentication setup between Buckets and Users API client classes
* Updates `listPath` method to walk tree.
* Adds `listPathFlat` method to return a flat list of files & directories in a Bucket.
* Read more here:


Threads
==================

* Updated `listen` response format includes action type and id.
* Deprecates `listThreads` and `getThread` from the Threads Client class, now available in `Users` and to be removed from `Client` at a future date.
* Removes `Database` class from `@textile/hub` as per textileio/js-threads#414

Crypto Library
==============

Provides a new set of crypto functions available through `@textile/hub`. Projects can now migrate from Libp2pcrypto identities to TweetNacl with backward compatibility.

* Better `encrypt` and `decrypt` support based on PrivateKey and PublicKey identities.
* Read more here:


Docs
====

* Improved and added many more examples
* Added new Users class & crypto methods.
  • Loading branch information
andrewxhill authored Aug 6, 2020
1 parent 805e2cf commit b1f7103
Show file tree
Hide file tree
Showing 50 changed files with 5,219 additions and 3,410 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ node_modules
docs
examples
jest.config.js

**/proto.keys.ts
17 changes: 13 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Docs

on:
push:
branches:
- master
tags:
- '@textile/hub@*.*.*'

jobs:

deploy:
name: Docs
runs-on: ubuntu-latest
Expand Down Expand Up @@ -53,4 +53,13 @@ jobs:
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: pages
PUBLISH_DIR: pages

- name: Zip files
run: zip docs-${{ github.workflow }}.zip docs/*.md
- name: Upload docs archive
uses: softprops/action-gh-release@v1
with:
files: 'docs-${{ github.workflow }}.zip'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Join us on our [public Slack channel](https://slack.textile.io/) for news, discu

## Usage

`@textile/hub` provides access to Textile APIs in apps based on a Project Token. For details on getting an app token, see [textileio/textile](https://github.com/textileio/textile) or join the [Textile Slack](https://slack.textile.io).
`@textile/hub` provides access to Textile APIs in apps based on API Keys. For details on getting keys, see [textileio/textile](https://docs.textile.io/hub/app-apis/) or join the [Textile Slack](https://slack.textile.io).

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion config/api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
* This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been
* local files for library1.
*/
"bundledPackages": [ "@textile/buckets", "@textile/hub-threads-client", "@textile/threads-id", "@textile/threads-client", "@textile/security" ],
"bundledPackages": [ "@textile/buckets", "@textile/users", "@textile/crypto", "@textile/grpc-authentication", "@textile/hub-threads-client", "@textile/threads-id", "@textile/threads-client", "@textile/security" ],

/**
* Determines how the TypeScript compiler engine will be invoked by API Extractor.
Expand Down
465 changes: 406 additions & 59 deletions etc/hub.api.md

Large diffs are not rendered by default.

Loading

0 comments on commit b1f7103

Please sign in to comment.