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
33 changes: 0 additions & 33 deletions .changeset/five-berries-clean.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/gorgeous-ads-attend.md

This file was deleted.

38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# @team-plain/typescript-sdk

## 2.0.0

### Major Changes

- 39bc31b: Changed return type of upserting customer to include the upsert 'result' (e.g. if it the customer was created, updated or not modified). This means you will have to slight adjust your code to account for this.

For example in the below code this would be the change you now have to make:

```diff
const client = new PlainClient({ apiKey: '' });

const res = await client.upsertCustomer({
identifier: {
email: 'foo@bar.com',
},
onCreate: {
fullName: 'Foo Bar',
email: {
email: 'foo@bar.com',
isVerified: true,
},
},
onUpdate: {},
});

if (res.error) {
console.error(res.error);
throw new Error(res.error.message);
}

- console.log(`Created customer with id=${res.data.id}`);
+ console.log(`Created customer with id=${res.data.customer.id}`);
```

### Minor Changes

- 39bc31b: Added a query to get the customer by their email (`getCustomerByEmail`) and the ability to send and reply to emails via `sendNewEmail` and `replyToEmail` respectively.

## 1.2.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@team-plain/typescript-sdk",
"version": "1.2.1",
"version": "2.0.0",
"description": "Typescript SDK for Plain's Core GraphQL API",
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand Down