Skip to content

Commit

Permalink
Update all snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
mattvagni committed Nov 18, 2023
1 parent 082d948 commit de562f3
Show file tree
Hide file tree
Showing 67 changed files with 903 additions and 3,283 deletions.
4 changes: 2 additions & 2 deletions _snippets/graphql/add-customer-to-group-by-group-id.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```json filename="Variables"
```json Variables
{
"input": {
"customerId": "c_01GTC6ZHCMAGR06FMPN9VY5J95",
Expand All @@ -11,7 +11,7 @@
}
```

```json filename="Response"
```json Response
{
"data": {
"customerGroupMemberships": [
Expand Down
4 changes: 2 additions & 2 deletions _snippets/graphql/add-customer-to-group.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```graphql filename="Mutation"
```graphql Mutation
mutation addCustomerToCustomerGroup($input: AddCustomerToCustomerGroupsInput!) {
addCustomerToCustomerGroups(input: $input) {
customerGroupMemberships {
Expand All @@ -23,7 +23,7 @@ mutation addCustomerToCustomerGroup($input: AddCustomerToCustomerGroupsInput!) {
}
```

```json filename="Variables"
```json Variables
{
"input": {
"customerId": "c_01GTC6ZHCMAGR06FMPN9VY5J95",
Expand Down
4 changes: 2 additions & 2 deletions _snippets/graphql/assign-thread.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```graphql filename="Mutation"
```graphql Mutation
mutation assignThread($input: AssignThreadInput!) {
markThreadAsDone(input: $input) {
thread {
Expand All @@ -9,7 +9,7 @@ mutation assignThread($input: AssignThreadInput!) {
}
```

```json filename="Variables"
```json Variables
{
"input": {
"threadId": "th_01H8H46YPB2S4MAJM382FG9423",
Expand Down
6 changes: 3 additions & 3 deletions _snippets/graphql/create-attachment-url.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```graphql filename="Mutation"
```graphql Mutation
mutation createAttachmentUploadUrl($input: CreateAttachmentUploadUrlInput!) {
createAttachmentUploadUrl(input: $input) {
attachmentUploadUrl {
Expand Down Expand Up @@ -27,7 +27,7 @@ mutation createAttachmentUploadUrl($input: CreateAttachmentUploadUrlInput!) {
}
```

```json filename="Variables"
```json Variables
{
"input": {
"customerId": "c_XXXXXXXXXXXXXXXXXXXXXXXXXX",
Expand All @@ -38,7 +38,7 @@ mutation createAttachmentUploadUrl($input: CreateAttachmentUploadUrlInput!) {
}
```

```json filename="Response"
```json Response
{
"data": {
"createAttachmentUploadUrl": {
Expand Down
4 changes: 2 additions & 2 deletions _snippets/graphql/create-customer-event.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```graphql filename="Mutation"
```graphql Mutation
mutation createCustomerEvent($input: CreateCustomerEventInput!) {
createCustomerEvent(input: $input) {
customerEvent {
Expand Down Expand Up @@ -26,7 +26,7 @@ mutation createCustomerEvent($input: CreateCustomerEventInput!) {
}
```

```json filename="Variables"
```json Variables
{
"input": {
"title": "API key generated",
Expand Down
4 changes: 2 additions & 2 deletions _snippets/graphql/create-thread.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```graphql filename="Mutation"
```graphql Mutation
mutation createThread($input: CreateThreadInput!) {
createThread(input: $input) {
thread {
Expand Down Expand Up @@ -33,7 +33,7 @@ mutation createThread($input: CreateThreadInput!) {
}
```

```json filename="Variables"
```json Variables
{
"input": {
"title": "Bug Report",
Expand Down
4 changes: 2 additions & 2 deletions _snippets/graphql/delete-customer.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```graphql filename="Mutation"
```graphql Mutation
mutation deleteCustomer($input: DeleteCustomerInput!) {
deleteCustomer(input: $input) {
error {
Expand All @@ -16,7 +16,7 @@ mutation deleteCustomer($input: DeleteCustomerInput!) {
}
```

```json filename="Variables"
```json Variables
{
"input": {
"customerId": "c_01H14DFQ4PDYBH398J1E99TWSS"
Expand Down
4 changes: 2 additions & 2 deletions _snippets/graphql/get-customer-by-email.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```graphql filename="Query"
```graphql Query
query getCustomerByEmail($email: String!) {
customerByEmail(email: $email) {
id
Expand All @@ -16,7 +16,7 @@ query getCustomerByEmail($email: String!) {
}
```

```json filename="Variables"
```json Variables
{
"email": "[email protected]"
}
Expand Down
4 changes: 2 additions & 2 deletions _snippets/graphql/get-customer-by-id.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```graphql filename="Query"
```graphql Query
query getCustomerById($customerId: ID!) {
customer(customerId: $customerId) {
id
Expand All @@ -16,7 +16,7 @@ query getCustomerById($customerId: ID!) {
}
```

```json filename="Variables"
```json Variables
{
"customerId": "c_01H14DFQ4PDYBH398J1E99TWSS"
}
Expand Down
4 changes: 2 additions & 2 deletions _snippets/graphql/get-customers.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```graphql filename="Query"
```graphql Query
query getCustomers($cursor: String!) {
customers(
after: $cursor
Expand Down Expand Up @@ -32,7 +32,7 @@ query getCustomers($cursor: String!) {
}
```

```json filename="Variables"
```json Variables
{
"cursor": "eyJjdXN0b21lcnMuZnVsbF9uYW1lIjoiQWlkYSBTY2hpbm5lciIsImN1c3RvbWVycy5pZCI6ImNfMDFHMThFU01TWkdUWTQwU1pITk03M0hBQkIifQ=="
}
Expand Down
4 changes: 2 additions & 2 deletions _snippets/graphql/mark-thread-as-done.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```graphql filename="Mutation"
```graphql Mutation
mutation markThreadAsDone($input: MarkThreadAsDoneInput!) {
markThreadAsDone(input: $input) {
thread {
Expand Down Expand Up @@ -33,7 +33,7 @@ mutation markThreadAsDone($input: MarkThreadAsDoneInput!) {
}
```

```json filename="Variables"
```json Variables
{
"input": {
"threadId": "th_01H8H46YPB2S4MAJM382FG9423"
Expand Down
4 changes: 2 additions & 2 deletions _snippets/graphql/mark-thread-as-todo.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```graphql filename="Mutation"
```graphql Mutation
mutation markThreadAsTodo($input: MarkThreadAsTodoInput!) {
markThreadAsTodo(input: $input) {
thread {
Expand Down Expand Up @@ -33,7 +33,7 @@ mutation markThreadAsTodo($input: MarkThreadAsTodoInput!) {
}
```

```json filename="Variables"
```json Variables
{
"input": {
"threadId": "th_01H8H46YPB2S4MAJM382FG9423"
Expand Down
8 changes: 7 additions & 1 deletion _snippets/graphql/page-info-after.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```graphql filename="Second page"
```graphql Query
query getCustomers($cursor: String!) {
customers(after: $cursor, first: 50) {
edges {
Expand All @@ -16,3 +16,9 @@ query getCustomers($cursor: String!) {
}
}
```

```js Variables
{
after: 'eyJjdXN0b21lcnIRzlIODVORzE5SFdQIn0=';
}
```
10 changes: 1 addition & 9 deletions _snippets/graphql/remove-customer-from-groups-by-group-id.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```json filename="Variables"
```json Variables
{
"input": {
"customerId": "c_01GTC6ZHCMAGR06FMPN9VY5J95",
Expand All @@ -10,11 +10,3 @@
}
}
```

```json filename="Response"
{
"data": {
"error": null
}
}
```
12 changes: 10 additions & 2 deletions _snippets/graphql/remove-customer-from-groups.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```graphql filename="Mutation"
```graphql Mutation
mutation removeCustomerFromCustomerGroup($input: RemoveCustomerFromCustomerGroupsInput!) {
removeCustomerFromCustomerGroups(input: $input) {
error {
Expand All @@ -15,7 +15,7 @@ mutation removeCustomerFromCustomerGroup($input: RemoveCustomerFromCustomerGroup
}
```

```json filename="Variables"
```json Variables
{
"input": {
"customerId": "c_01GTC6ZHCMAGR06FMPN9VY5J95",
Expand All @@ -30,3 +30,11 @@ mutation removeCustomerFromCustomerGroup($input: RemoveCustomerFromCustomerGroup
}
}
```

```json Response
{
"data": {
"error": null
}
}
```
4 changes: 2 additions & 2 deletions _snippets/graphql/remove-labels.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```graphql filename="Mutation"
```graphql Mutation
mutation removeLabels($input: RemoveLabelsInput!) {
removeLabels(input: $input) {
error {
Expand All @@ -10,7 +10,7 @@ mutation removeLabels($input: RemoveLabelsInput!) {
}
```

```json filename="Variables"
```json Variables
{
"input": {
"labelIds": ["l_01HB8BTNTZ58730MX8H5VMKFD5", "l_01HB8BTNKSCF1FK5ETFVRSDC6G"]
Expand Down
4 changes: 2 additions & 2 deletions _snippets/graphql/reply-email.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```graphql filename="Mutation"
```graphql Mutation
mutation replyToEmail($input: ReplyToEmailInput!) {
replyToEmail(input: $input) {
email {
Expand All @@ -13,7 +13,7 @@ mutation replyToEmail($input: ReplyToEmailInput!) {
}
```

```json filename="Variables"
```json Variables
{
"input": {
"customerId": "c_01GTC6ZHCMAGR06FMPN9VY5J95",
Expand Down
4 changes: 2 additions & 2 deletions _snippets/graphql/send-email.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```graphql filename="Mutation"
```graphql Mutation
mutation sendNewEmail($input: SendNewEmailInput!) {
sendNewEmail(input: $input) {
email {
Expand All @@ -13,7 +13,7 @@ mutation sendNewEmail($input: SendNewEmailInput!) {
}
```

```json filename="Variables"
```json Variables
{
"input": {
"customerId": "c_01GTC6ZHCMAGR06FMPN9VY5J95",
Expand Down
4 changes: 2 additions & 2 deletions _snippets/graphql/snooze-thread.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```graphql filename="Mutation"
```graphql Mutation
mutation snoozeThread($input: SnoozeThreadInput!) {
snoozeThread(input: $input) {
thread {
Expand Down Expand Up @@ -33,7 +33,7 @@ mutation snoozeThread($input: SnoozeThreadInput!) {
}
```

```json filename="Variables"
```json Variables
{
"input": {
"threadId": "th_01H8H46YPB2S4MAJM382FG9423",
Expand Down
2 changes: 1 addition & 1 deletion _snippets/graphql/ui-divider.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```json {7-11}
```json
[
{
"componentText": {
Expand Down
2 changes: 1 addition & 1 deletion _snippets/graphql/ui-spacer.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```json {7-11}
```json
[
{
"componentText": {
Expand Down
4 changes: 2 additions & 2 deletions _snippets/graphql/unassign-thread.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```graphql filename="Mutation"
```graphql Mutation
mutation unassignThread($input: UnassignThreadInput!) {
unassignThread(input: $input) {
thread {
Expand All @@ -9,7 +9,7 @@ mutation unassignThread($input: UnassignThreadInput!) {
}
```

```json filename="Variables"
```json Variables
{
"input": {
"threadId": "th_01H8H46YPB2S4MAJM382FG9423"
Expand Down
6 changes: 3 additions & 3 deletions _snippets/graphql/upsert-customer.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```graphql filename="Mutation"
```graphql Mutation
mutation upsertCustomer($input: UpsertCustomerInput!) {
upsertCustomer(input: $input) {
result
Expand Down Expand Up @@ -37,7 +37,7 @@ mutation upsertCustomer($input: UpsertCustomerInput!) {
}
```

```json filename="Variables"
```json Variables
{
"input": {
"identifier": {
Expand Down Expand Up @@ -75,7 +75,7 @@ mutation upsertCustomer($input: UpsertCustomerInput!) {
}
```

```json filename="Response"
```json Response
{
"data": {
"upsertCustomer": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```json filename="Response"
```json
{
"__typename": "AttachmentUploadUrl",
"attachment": {
Expand Down
2 changes: 1 addition & 1 deletion _snippets/typescript-sdk/create-attachment-url.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```ts /c_XXXXXXXXXXXXXXXXXXXXXXXXXX/
```tsx
import { AttachmentType, PlainClient } from '@team-plain/typescript-sdk';

const client = new PlainClient({ apiKey: 'XXX' });
Expand Down
Loading

0 comments on commit de562f3

Please sign in to comment.