-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gorgias): [ext-251] gorgias ticket (#162)
## Describe your changes Clean up PR to add gorgias ticket #157 ## Issue ticket number and link ## Checklist before requesting a review (skip if just adding/editing APIs & templates) - [ ] I added tests, otherwise the reason is: - [ ] External API requests have `retries` - [ ] Pagination is used where appropriate - [ ] The built in `nango.paginate` call is used instead of a `while (true)` loop - [ ] Third party requests are NOT parallelized (this can cause issues with rate limits) - [ ] If a sync requires metadata the `nango.yaml` has `auto_start: false` - [ ] If the sync is a `full` sync then `track_deletes: true` is set - [ ] I followed the best practices and guidelines from the [Writing Integration Scripts](/NangoHQ/integration-templates/blob/main/WRITING_INTEGRATION_SCRIPTS.md) doc
- Loading branch information
1 parent
cfeeae6
commit 7008080
Showing
16 changed files
with
776 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
// Generated by ts-to-zod | ||
import { z } from 'zod'; | ||
|
||
export const repositorySchema = z.object({ | ||
allow_forking: z.boolean(), | ||
archive_url: z.string(), | ||
archived: z.boolean(), | ||
assignees_url: z.string(), | ||
blobs_url: z.string(), | ||
branches_url: z.string(), | ||
clone_url: z.string(), | ||
collaborators_url: z.string(), | ||
comments_url: z.string(), | ||
commits_url: z.string(), | ||
compare_url: z.string(), | ||
contents_url: z.string(), | ||
contributors_url: z.string(), | ||
created_at: z.string(), | ||
default_branch: z.string(), | ||
deployments_url: z.string(), | ||
description: z.string(), | ||
disabled: z.boolean(), | ||
downloads_url: z.string(), | ||
events_url: z.string(), | ||
fork: z.boolean(), | ||
forks: z.number(), | ||
forks_count: z.number(), | ||
forks_url: z.string(), | ||
full_name: z.string(), | ||
git_commits_url: z.string(), | ||
git_refs_url: z.string(), | ||
git_tags_url: z.string(), | ||
git_url: z.string(), | ||
has_discussions: z.boolean(), | ||
has_downloads: z.boolean(), | ||
has_issues: z.boolean(), | ||
has_pages: z.boolean(), | ||
has_projects: z.boolean(), | ||
has_wiki: z.boolean(), | ||
homepage: z.string().nullable(), | ||
hooks_url: z.string(), | ||
html_url: z.string(), | ||
id: z.number(), | ||
is_template: z.boolean(), | ||
issue_comment_url: z.string(), | ||
issue_events_url: z.string(), | ||
issues_url: z.string(), | ||
keys_url: z.string(), | ||
labels_url: z.string(), | ||
language: z.string(), | ||
languages_url: z.string(), | ||
license: z.string().nullable(), | ||
merges_url: z.string(), | ||
milestones_url: z.string(), | ||
mirror_url: z.string().nullable(), | ||
name: z.string(), | ||
node_id: z.string(), | ||
notifications_url: z.string(), | ||
open_issues: z.number(), | ||
open_issues_count: z.number(), | ||
owner: z.object({ | ||
avatar_url: z.string(), | ||
events_url: z.string(), | ||
followers_url: z.string(), | ||
following_url: z.string(), | ||
gists_url: z.string(), | ||
gravatar_id: z.string(), | ||
html_url: z.string(), | ||
id: z.number(), | ||
login: z.string(), | ||
node_id: z.string(), | ||
organizations_url: z.string(), | ||
received_events_url: z.string(), | ||
repos_url: z.string(), | ||
site_admin: z.boolean(), | ||
starred_url: z.string(), | ||
subscriptions_url: z.string(), | ||
type: z.string(), | ||
url: z.string() | ||
}), | ||
permissions: z.object({ | ||
admin: z.boolean(), | ||
maintain: z.boolean(), | ||
pull: z.boolean(), | ||
push: z.boolean(), | ||
triage: z.boolean() | ||
}), | ||
private: z.boolean(), | ||
pulls_url: z.string(), | ||
pushed_at: z.string(), | ||
releases_url: z.string(), | ||
size: z.number(), | ||
ssh_url: z.string(), | ||
stargazers_count: z.number(), | ||
stargazers_url: z.string(), | ||
statuses_url: z.string(), | ||
subscribers_url: z.string(), | ||
subscription_url: z.string(), | ||
svn_url: z.string(), | ||
tags_url: z.string(), | ||
teams_url: z.string(), | ||
topics: z.array(z.string()), | ||
trees_url: z.string(), | ||
updated_at: z.string(), | ||
url: z.string(), | ||
visibility: z.string(), | ||
watchers: z.number(), | ||
watchers_count: z.number(), | ||
web_commit_signoff_required: z.boolean() | ||
}); | ||
|
||
export const repoResponseSchema = z.object({ | ||
repositories: z.array(repositorySchema) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
<!-- BEGIN GENERATED CONTENT --> | ||
# Create Ticket | ||
|
||
## General Information | ||
|
||
- **Description:** Creates a new ticket | ||
|
||
- **Version:** 0.0.1 | ||
- **Group:** Others | ||
- **Scopes:** `tickets:write, account:read, customers:write, customers:read` | ||
- **Endpoint Type:** Action | ||
- **Code:** [github.com](https://github.com/NangoHQ/integration-templates/tree/main/integrations/gorgias/actions/create-ticket.ts) | ||
|
||
|
||
## Endpoint Reference | ||
|
||
### Request Endpoint | ||
|
||
`POST /ticket` | ||
|
||
### Request Query Parameters | ||
|
||
_No request parameters_ | ||
|
||
### Request Body | ||
|
||
```json | ||
{ | ||
"customer": { | ||
"phone_number": "<string>", | ||
"email?": "<string | undefined>" | ||
}, | ||
"ticket": { | ||
"messages": [ | ||
{ | ||
"attachments": { | ||
"0": { | ||
"url": "<string>", | ||
"name": "<string>", | ||
"size": "<number>", | ||
"content_type": "<string>" | ||
} | ||
}, | ||
"body_html": "<string>", | ||
"body_text": "<string>", | ||
"id": "<string>" | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
||
### Request Response | ||
|
||
```json | ||
{ | ||
"id": "<number>", | ||
"assignee_user": "<AssigneeUser | null>", | ||
"channel": "<aircall | api | chat | contact_form | email | facebook | facebook-mention | facebook-messenger | facebook-recommendations | help-center | instagram-ad-comment | instagram-comment | instagram-direct-message | instagram-mention | internal-note | phone | sms | twitter | twitter-direct-message | whatsapp | yotpo-review>", | ||
"closed_datetime": "<string | null>", | ||
"created_datetime": "<string | null>", | ||
"excerpt?": "<string | undefined>", | ||
"external_id": "<string | null>", | ||
"from_agent": "<boolean>", | ||
"integrations?": "<array | null | undefined>", | ||
"is_unread": "<boolean>", | ||
"language": "<string | null>", | ||
"last_message_datetime": "<string | null>", | ||
"last_received_message_datetime": "<string | null>", | ||
"messages_count?": "<number | undefined>", | ||
"messages": [ | ||
{ | ||
"id": "<number>", | ||
"uri": "<string>", | ||
"message_id": "<string | null>", | ||
"integration_id": "<number | null>", | ||
"rule_id": "<number | null>", | ||
"external_id": "<string | null>", | ||
"ticket_id": "<number>", | ||
"channel": "<aircall | api | chat | contact_form | email | facebook | facebook-mention | facebook-messenger | facebook-recommendations | help-center | instagram-ad-comment | instagram-comment | instagram-direct-message | instagram-mention | internal-note | phone | sms | twitter | twitter-direct-message | whatsapp | yotpo-review>", | ||
"via": "<aircall | api | chat | contact_form | email | facebook | facebook-mention | facebook-messenger | facebook-recommendations | form | gorgias_chat | help-center | helpdesk | instagram | instagram-ad-comment | instagram-comment | instagram-direct-message | instagram-mention | internal-note | offline_capture | phone | rule | self_service | shopify | sms | twilio | twitter | twitter-direct-message | whatsapp | yotpo | yotpo-review | zendesk>", | ||
"subject": "<string | null>", | ||
"body_text": "<string | null>", | ||
"body_html": "<string | null>", | ||
"stripped_text": "<string | null>", | ||
"stripped_html": "<string | null>", | ||
"stripped_signature": "<string | null>", | ||
"public": "<boolean>", | ||
"from_agent": "<boolean>", | ||
"sender": { | ||
"id": "<number>", | ||
"firstname": "<string>", | ||
"lastname": "<string>", | ||
"meta": "<object | null>", | ||
"email": "<string | null>", | ||
"name": "<string | null>" | ||
}, | ||
"receiver": "<RecieverSender | null>", | ||
"attachments": "<Attachment[] | null>", | ||
"meta": "<object | null>", | ||
"headers": "<object | null>", | ||
"actions": "<array | null>", | ||
"macros": "<array | null>", | ||
"created_datetime": "<string | null>", | ||
"opened_datetime": "<string | null>", | ||
"failed_datetime": "<string | null>", | ||
"last_sending_error": "<object | null>", | ||
"deleted_datetime": "<string | null>", | ||
"replied_by?": "<string | null | undefined>", | ||
"replied_to?": "<string | null | undefined>" | ||
} | ||
], | ||
"meta": "<object | null>", | ||
"opened_datetime": "<string | null>", | ||
"snooze_datetime": "<string | null>", | ||
"status": "<open | closed>", | ||
"subject": "<string | null>", | ||
"tags": { | ||
"0": { | ||
"id": "<number>", | ||
"name": "<string>", | ||
"uri": "<string | null>", | ||
"decoration": "<object | null>", | ||
"created_datetime": "<string | null>", | ||
"deleted_datetime?": "<string | null | undefined>" | ||
} | ||
}, | ||
"spam": "<boolean | null>", | ||
"trashed_datetime": "<string | null>", | ||
"updated_datetime": "<string | null>", | ||
"via": "<aircall | api | chat | contact_form | email | facebook | facebook-mention | facebook-messenger | facebook-recommendations | form | gorgias_chat | help-center | helpdesk | instagram | instagram-ad-comment | instagram-comment | instagram-direct-message | instagram-mention | internal-note | offline_capture | phone | rule | self_service | shopify | sms | twilio | twitter | twitter-direct-message | whatsapp | yotpo | yotpo-review | zendesk>", | ||
"uri": "<string>" | ||
} | ||
``` | ||
|
||
## Changelog | ||
|
||
- [Script History](https://github.com/NangoHQ/integration-templates/commits/main/integrations/gorgias/actions/create-ticket.ts) | ||
- [Documentation History](https://github.com/NangoHQ/integration-templates/commits/main/integrations/gorgias/actions/create-ticket.md) | ||
|
||
<!-- END GENERATED CONTENT --> | ||
|
Oops, something went wrong.