Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the Porting Embed #6

Merged
merged 9 commits into from Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 24 additions & 2 deletions README.md
@@ -1,6 +1,6 @@
# Gigs Embeds for JavaScript (Web)

Gigs Embeds for JavaScript (Web)
Embeddable prebuilt and highly customizable UI components to use in your own JavaScript apps for web.

> [!NOTE]
> This library is currently under development.
Expand All @@ -11,9 +11,31 @@ Gigs Embeds for JavaScript (Web)
npm install @gigs/gigs-embeds-js
```

## Getting started

To use Gigs Embeds, you need:

1. A Gigs project
2. A Gigs API Key
3. A server to create an [authenticated Connect Session](https://developers.gigs.com/docs/api/cdb1438ed4da9-creating-connect-sessions)

> [!TIP]
> Your not yet a Gigs customer? [Get in touch](https://gigs.com/contact) to discuss the next steps!

## How it works

Using a Gigs Embed needs 2 parts:

- Your server which authenticates the current user and creates a Connect Session. Can be an API endpoint or passed otherwise from your server to your client. Our developer documentation has a [guide on Creating Connect Sessions](https://developers.gigs.com/docs/api/cdb1438ed4da9-creating-connect-sessions).
- Your client which uses the Connect Session to initialize the Embed, which makes requests directly to the Gigs API in the scope of your user. The client-side use is explained below.

When using Connect Sessions with Gigs Embeds, you do not redirect to the session's `url`. Instead you initialize the embed with the full session object.

Additionally, you can subscribe to [Webhooks](https://developers.gigs.com/docs/api/441a2e9e7811d-events-and-webhooks) to get a verified outcome of a user's interaction, like when they completed a number porting. The Embeds are also returning the outcome of a user's interaction, but you should use Webhooks for mission-critical processes like updating a record in your database based on the outcome.

## Usage

TBD
- [Porting Embed](docs/porting-embed.md)

## Contributing

Expand Down
4 changes: 4 additions & 0 deletions docs/README.md
@@ -0,0 +1,4 @@
# Docs

- [README](README.md)
- [Porting Embed](docs/porting-embed.md)