Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/getting-started/graphql.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ In this query, we apply both a filter and a sorting option to the products query

By combining filters and sorting options in your GraphQL queries, you can retrieve data that is both relevant to your application and organized in a way that meets your specific needs. This flexibility allows you to tailor your queries to your requirements and optimize data retrieval and processing.

You can also use AND, OR, NOT and nested queries. Find more about operators and nested filtering condition in [Tailor DB](/guides/tailordb/overview).
You can also use AND, OR, NOT and nested queries. Find more about operators and nested filtering condition in [TailorDB](/guides/tailordb/overview).

## Pagination

Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ Here is a quick look at the console.

![Tailor Console](./assets/console-application-overview.png)

## Tailor SDK
## Tailor Platform SDK

The `tailor-sdk` is the command-line interface for building, deploying, and managing applications on the Tailor Platform. It provides a comprehensive set of tools for working with TailorDB, Functions, Workflows and Auth.

### Installation

The Tailor SDK requires Node.js 22 or later. You can use it in three ways:
The Tailor Platform SDK requires Node.js 22 or later. You can use it in three ways:

**1. With npx (recommended for quick start):**

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/auth/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ const auth = defineAuth("my-auth", {
## Machine user

A Machine user can manage users and application data, including creating, modifying, and deleting them.
To add a Machine user to the application, you must first define the user roles in the Tailor DB, and then assign a specific role in the Auth service.
To add a Machine user to the application, you must first define the user roles in the TailorDB, and then assign a specific role in the Auth service.

Here is an example of a Machine user configuration with the SDK:

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/auth/scim.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ attributeMapping: [

## Complete Example

Here is a complete example showing SCIM configuration with the Tailor SDK:
Here is a complete example showing SCIM configuration with the Tailor Platform SDK:

```typescript
import { defineAuth } from "@tailor-platform/sdk";
Expand Down
8 changes: 4 additions & 4 deletions docs/guides/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The Tailor Platform offers a wide range of events that allow you to trigger spec

Below is a list of supported events and their payloads.

## Tailor DB
## TailorDB

### Record Created

Expand Down Expand Up @@ -40,7 +40,7 @@ Below is a list of supported events and their payloads.

<tr>
<td>`newRecord`</td>
<td>`Object`: The new record added to Tailor DB.</td>
<td>`Object`: The new record added to TailorDB.</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -75,12 +75,12 @@ Below is a list of supported events and their payloads.

<tr>
<td>`oldRecord`</td>
<td>`Object`: The old record in Tailor DB.</td>
<td>`Object`: The old record in TailorDB.</td>
</tr>

<tr>
<td>`newRecord`</td>
<td>`Object`: The updated record in Tailor DB.</td>
<td>`Object`: The updated record in TailorDB.</td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/executor/event-based-trigger.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ doc_type: guide

# Event-based Trigger

In this trigger, you can specify the type of event that initiates it (e.g., Tailor DB data update and StateFlow creation) and outline the specific conditions or criteria for its execution.
In this trigger, you can specify the type of event that initiates it (e.g., TailorDB data update and StateFlow creation) and outline the specific conditions or criteria for its execution.

Refer [Supported Events](/guides/events) to learn about the different types of events supported in the Tailor Platform. Follow the [tutorial](/tutorials/setup-executor/event-based-trigger) for setup instructions.

Expand Down
4 changes: 2 additions & 2 deletions docs/guides/executor/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ You can configure the following three types of triggers to execute the user defi

## Operation

The `operation` property defines the action to be executed when the Trigger condition is met. You can describe the specific task or operation to be performed, such as querying Tailor DB, sending notifications, or triggering workflows.
The `operation` property defines the action to be executed when the Trigger condition is met. You can describe the specific task or operation to be performed, such as querying TailorDB, sending notifications, or triggering workflows.
There are five types of targets:

1. [TailorGraphql](tailor-graphql-operation)

This involves interaction with the Tailor DB and performs operations such as querying data or making changes (mutations).
This involves interaction with the TailorDB and performs operations such as querying data or making changes (mutations).

2. [Webhook](webhook-operation)

Expand Down
14 changes: 7 additions & 7 deletions docs/guides/function/accessing-tailordb.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
doc_type: guide
---

# Accessing Tailor DB
# Accessing TailorDB

In order to access Tailor DB from Function service, you need to instantiate the `Client` object from the `tailordb` package.
In order to access TailorDB from Function service, you need to instantiate the `Client` object from the `tailordb` package.
`tailordb` exists in the Function service environment by default, so you can use it without any additional installation.
Please specify the `namespace` of the Tailor DB you want to connect to when creating the `Client` object.
Please specify the `namespace` of the TailorDB you want to connect to when creating the `Client` object.

Here is the `Client` interface:

Expand All @@ -29,9 +29,9 @@ type Transaction = {

Please refer to the [Supported SQL queries](#supported-sql-queries) for more information on the SQL syntax supported in `Client.queryObject`.

## Sample codes to access Tailor DB in JavaScript
## Sample codes to access TailorDB in JavaScript

### Getting data from Tailor DB
### Getting data from TailorDB

```js {{ title: 'get_data_function.js' }}
globalThis.main = async function () {
Expand All @@ -49,7 +49,7 @@ globalThis.main = async function () {
};
```

### Inserting data to Tailor DB
### Inserting data to TailorDB

```js {{ title: 'insert_data_function.js' }}
globalThis.main = async function (args) {
Expand Down Expand Up @@ -194,7 +194,7 @@ npx tailor deploy

## Supported SQL queries

Strictly speaking, the SQL statements here are executed via a proxy to Tailor DB.
Strictly speaking, the SQL statements here are executed via a proxy to TailorDB.
The SQL that can be issued is a subset of PostgreSQL, so the fundamental syntax follows PostgreSQL conventions.

### SELECT
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/function/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This provides a flexible way to extend your application's functionality with cus
With Function service, you can:

- Send HTTP requests to 3rd party applications
- Access and execute SQL queries to Tailor DB
- Access and execute SQL queries to TailorDB
- Manage IdP users, secrets, files, and workflows via [built-in interfaces](/guides/function/builtin-interfaces)
- Process data transformations
- Implement custom business logic with npm packages
Expand All @@ -23,7 +23,7 @@ For more advanced use cases, you can refer to these sections:

- [Built-in interfaces](/guides/function/builtin-interfaces) — all platform APIs available as global variables
- [Sending HTTP request](/guides/function/sending-request)
- [Accessing Tailor DB](/guides/function/accessing-tailordb)
- [Accessing TailorDB](/guides/function/accessing-tailordb)

## How to write and deploy your code in Function service

Expand Down Expand Up @@ -196,6 +196,6 @@ For more advanced use cases, you can refer to these sections:

- [Built-in interfaces](/guides/function/builtin-interfaces) — all platform APIs available as global variables (IdP, secrets, files, workflows, etc.)
- [Sending HTTP request](/guides/function/sending-request)
- [Accessing Tailor DB](/guides/function/accessing-tailordb)
- [Accessing TailorDB](/guides/function/accessing-tailordb)

For list of supported packages, please refer to [Appendix](/guides/function/appendix).
8 changes: 4 additions & 4 deletions docs/guides/integration/shopify.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ You can integrate Shopify with Tailor Platform using triggers. Refer to [executo

## Automatically push new products to your Shopify store

When you create a new product in the Tailor DB, you may want to seamlessly sync that data with your Shopify store.
This integration guide will walk you through the steps to set up a connection between Tailor PF and Shopify, ensuring that every time a new product is added to the Tailor DB, it's automatically pushed to your Shopify storefront.
When you create a new product in the TailorDB, you may want to seamlessly sync that data with your Shopify store.
This integration guide will walk you through the steps to set up a connection between Tailor PF and Shopify, ensuring that every time a new product is added to the TailorDB, it's automatically pushed to your Shopify storefront.

### 1. Get the API key

Expand Down Expand Up @@ -84,7 +84,7 @@ tailor-sdk secret create --vault-name shopify-vault --name shopify-key --value {

3. Add the trigger

Below is an example of the trigger that will push new product to Shopify store when a product is added to the Tailor DB.
Below is an example of the trigger that will push new product to Shopify store when a product is added to the TailorDB.

```typescript {{ title: 'executors/shopify-sync.ts' }}
import { createExecutor, recordCreatedTrigger } from "@tailor-platform/sdk";
Expand Down Expand Up @@ -229,7 +229,7 @@ You have now successfully created the webhook to receive notifications in the Ta

### 3. Verify the trigger

You can open the GraphQL playground to verify the product created in Shopify is added to Tailor DB.
You can open the GraphQL playground to verify the product created in Shopify is added to TailorDB.

```bash
# Open the GraphQL playground in the browser
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/tailordb/advanced-settings/aggregation.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const payroll = db
});
```

Tailor DB auto-generates `aggregatePayrolls`, allowing you to quickly retrieve summarized results for Payroll.\
TailorDB auto-generates `aggregatePayrolls`, allowing you to quickly retrieve summarized results for Payroll.\
Based on the `payroll` type, here's the sample query to aggregate the payroll data:

```graphql {{ title: 'query' }}
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/tailordb/advanced-settings/bulk-upsert.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const document = db
});
```

Tailor DB auto-generates `bulkUpsertDocuments`, allowing you to quickly bulk upsert data for Document.
TailorDB auto-generates `bulkUpsertDocuments`, allowing you to quickly bulk upsert data for Document.
Use the following query to upsert existing document resources:

```graphql {{ title: 'query' }}
Expand All @@ -35,7 +35,7 @@ mutation {

If the input contains existing IDs, the data properties will be updated for those inputs. New data records will be created if the ID does not exist, is null, or is not passed as an input property.

Here are examples of queries for creating new records in Tailor DB when using bulk upsert.
Here are examples of queries for creating new records in TailorDB when using bulk upsert.

```graphql {{ title: 'query' }}
mutation {
Expand All @@ -60,7 +60,7 @@ The maximum number of items that can be included in a single bulk upsert operati

## BulkUpsert with PluralForm settings

When `PluralForm` is configured in the settings, as mentioned in the example below, Tailor DB auto-generates `bulkUpsertUserDataList` instead of `bulkUpsertUserData` for bulk upserting data of the `UserData` type. Refer [PluralForm](/guides/tailordb/advanced-settings/uncountable-nouns) to learn about its setting.
When `PluralForm` is configured in the settings, as mentioned in the example below, TailorDB auto-generates `bulkUpsertUserDataList` instead of `bulkUpsertUserData` for bulk upserting data of the `UserData` type. Refer [PluralForm](/guides/tailordb/advanced-settings/uncountable-nouns) to learn about its setting.

```typescript
import { db } from "@tailor-platform/sdk";
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/tailordb/advanced-settings/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ These features include:
- [Aggregating values](aggregation)
- [Bulk upsert](bulk-upsert)
- [Plural form for uncountable nouns](uncountable-nouns)
- [Tailor DB Change Data Capture(CDC)](tailordb-cdc) - Publish record events for database triggers
- [TailorDB Change Data Capture(CDC)](tailordb-cdc) - Publish record events for database triggers

Below is a table listing all the available `settings`, with each field and its corresponding type.

Expand Down Expand Up @@ -106,7 +106,7 @@ See [GraphQL Directives](https://graphql.org/learn/queries/#directives) for more
## Extends

The `Extends` option enables the extension of the types defined in other sub-graphs, like StateFlow.
With this option enabled, CRUD GraphQL queries become available in Tailor DB.
With this option enabled, CRUD GraphQL queries become available in TailorDB.
To make this work, the directive of `@key(fields: "id")` must be defined.

For example, if we want to extend State resource in StateFlow, we can define the `extend` and directives in the schema as follows:
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/tailordb/advanced-settings/tailordb-cdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
doc_type: guide
---

# Tailor DB CDC
# TailorDB CDC

## Publish record events for database triggers

Change data capture (CDC) enables you to track and capture all changes in your data within Tailor DB, including new record insertions, updates to existing records, and deletions. To use this feature, enable `PublishRecordEvents` in the settings for your desired data type in Tailor DB. Once enabled, any changes to records of this type will trigger the publication of record events. These events are then processed by the corresponding `Executor` service, which initiates the jobs defined based on these changes.
Change data capture (CDC) enables you to track and capture all changes in your data within TailorDB, including new record insertions, updates to existing records, and deletions. To use this feature, enable `PublishRecordEvents` in the settings for your desired data type in TailorDB. Once enabled, any changes to records of this type will trigger the publication of record events. These events are then processed by the corresponding `Executor` service, which initiates the jobs defined based on these changes.

For example, to call a trigger for every PurchaseOrder type record created, you'll need to enable `PublishRecordEvents` in the settings. Refer [Event based trigger](/tutorials/setup-executor/event-based-trigger#4enablepublishrecordeventssettings) to learn more.

Expand Down
4 changes: 2 additions & 2 deletions docs/guides/tailordb/advanced-settings/uncountable-nouns.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ doc_type: guide

# Plural form for uncountable nouns

The `PluralForm` field accepts the plural form for an uncountable noun type in your Tailor DB.
The `PluralForm` field accepts the plural form for an uncountable noun type in your TailorDB.
This setting is necessary to access individual records when the type name is an uncountable noun.

For example, to create type `userData` in the Tailor DB, configure the `PluralForm` in the settings as the following:
For example, to create type `userData` in the TailorDB, configure the `PluralForm` in the settings as the following:

```typescript
import { db } from "@tailor-platform/sdk";
Expand Down
10 changes: 5 additions & 5 deletions docs/guides/tailordb/fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ The SDK provides the following field type methods:

Visit [tailordb types](https://registry.terraform.io/providers/tailor-platform/tailor/latest/docs/resources/tailordb_type) to learn more about the types.

Here are the available list of data types in Tailor DB.
For details about the filter, refer to [Tailor DB Filter](/guides/tailordb/filters) specification.
Here are the available list of data types in TailorDB.
For details about the filter, refer to [TailorDB Filter](/guides/tailordb/filters) specification.

| Predefined Data Type | Type Description | Available Filters |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
Expand All @@ -115,8 +115,8 @@ As for the `Type` field, set one of the following data types as `tailordb.#<fiel

For example, to set the `TypeString` data type to the `name` field, use the following setting:

Here are the available list of data types in Tailor DB.
For details about the filter, refer to [Tailor DB Filter](/guides/tailordb/filters) specification.
Here are the available list of data types in TailorDB.
For details about the filter, refer to [TailorDB Filter](/guides/tailordb/filters) specification.

| Predefined Data Type | Type Description | Available Filters |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
Expand All @@ -135,7 +135,7 @@ Additionally, you can configure a field to automatically generate sequential num

## Auto-generated GraphQL data fields

Besides the fields specified within the fields parameter, Tailor DB automatically generates the following system fields for each Type in the GraphQL Schema:
Besides the fields specified within the fields parameter, TailorDB automatically generates the following system fields for each Type in the GraphQL Schema:

Please be aware that these names are reserved for system use and cannot be employed as user-defined field names.

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/tailordb/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ doc_type: guide
# Versioning with History Tables

Some applications require preserving previous versions of data when updates or changes occur.
Using [Tailor DB CDC](/guides/tailordb/advanced-settings/tailordb-cdc), you can capture and log data modifications in real-time, storing prior record versions in a dedicated history table.
Using [TailorDB CDC](/guides/tailordb/advanced-settings/tailordb-cdc), you can capture and log data modifications in real-time, storing prior record versions in a dedicated history table.
This approach preserves historical data and enables change monitoring and analysis over time.

## How to enable Data Versioning
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ hero:
text: Tutorials
link: /tutorials/
- theme: alt
text: Tailor SDK
text: Tailor Platform SDK
link: /sdk/
- theme: alt
text: Start
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/api/js-scripting.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ tabs:

# JavaScript

Using JavaScript, implement robust validation logic, manipulate data structures, and perform efficient data transformations in Pipeline resolvers, Triggers and the Tailor DB.
Using JavaScript, implement robust validation logic, manipulate data structures, and perform efficient data transformations in Pipeline resolvers, Triggers and TailorDB.

Here are some examples of where you can utilize JavaScript:

Expand Down Expand Up @@ -276,7 +276,7 @@ You can write custom logic using JavaScript in the `URL` and `Body` fields in th
:::tabs webhook-body
:::

## Tailor DB
## TailorDB

The example below demonstrates how to use JavaScript in `Hooks` to set a default value for the field. You can add custom logic to validate the input data and set default values.

Expand Down
4 changes: 2 additions & 2 deletions docs/reference/concepts/terminology_concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Testing if we can maintain this page.

| Terms/Concepts | Description |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| services | Tailor Platform is a set of various services, such as Tailor DB, Pipeline resolver, StateFlow. See Core Concepts for more information |
| services | Tailor Platform is a set of various services, such as TailorDB, Pipeline resolver, StateFlow. See Core Concepts for more information |
| workspace | The root node of the Tailor Platform for your organization. |
| organization | Represents a real life entity, such as a company, and is always associated with a single workspace. |
| type | Corresponding to "table" in SQL term. |
| data type | Data type such as string, number. Here is supported data types in the Tailor DB. |
| data type | Data type such as string, number. Here is supported data types in TailorDB. |
Loading