@usepylon/sdk 0.1.0-alpha.3 → 0.1.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +1 -0
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +7 -2
- package/dist/cjs/api/resources/accounts/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/accounts/client/Client.js +11 -6
- package/dist/cjs/api/resources/accounts/resources/emailActivities/client/Client.d.ts +39 -0
- package/dist/cjs/api/resources/accounts/resources/emailActivities/client/Client.js +159 -0
- package/dist/cjs/api/resources/accounts/resources/emailActivities/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/accounts/resources/emailActivities/client/index.js +17 -0
- package/dist/cjs/api/resources/accounts/resources/emailActivities/client/requests/AccountsEmailActivitiesListRequest.d.ts +18 -0
- package/dist/cjs/api/resources/accounts/resources/emailActivities/client/requests/AccountsEmailActivitiesListRequest.js +3 -0
- package/dist/cjs/api/resources/accounts/resources/emailActivities/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/accounts/resources/emailActivities/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/accounts/resources/emailActivities/exports.d.ts +2 -0
- package/dist/cjs/api/resources/accounts/resources/emailActivities/exports.js +21 -0
- package/dist/cjs/api/resources/accounts/resources/emailActivities/index.d.ts +1 -0
- package/dist/cjs/api/resources/accounts/resources/emailActivities/index.js +17 -0
- package/dist/cjs/api/resources/accounts/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/accounts/resources/index.js +3 -1
- package/dist/cjs/api/resources/contacts/client/Client.d.ts +25 -0
- package/dist/cjs/api/resources/contacts/client/Client.js +73 -0
- package/dist/cjs/api/resources/contacts/client/requests/ContactsMergeRequest.d.ts +13 -0
- package/dist/cjs/api/resources/contacts/client/requests/ContactsMergeRequest.js +3 -0
- package/dist/cjs/api/resources/contacts/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/index.js +2 -1
- package/dist/cjs/api/resources/issues/client/requests/IssuesCreateDraftReplyRequest.d.ts +6 -0
- package/dist/cjs/api/resources/issues/client/requests/IssuesCreateRequest.d.ts +2 -0
- package/dist/cjs/api/resources/knowledgeBases/resources/articles/client/Client.d.ts +0 -1
- package/dist/cjs/api/resources/knowledgeBases/resources/articles/client/Client.js +0 -1
- package/dist/cjs/api/resources/knowledgeBases/resources/articles/client/requests/KnowledgeBasesArticlesCreateRequest.d.ts +6 -3
- package/dist/cjs/api/resources/knowledgeBases/resources/articles/client/requests/KnowledgeBasesArticlesUpdateRequest.d.ts +4 -0
- package/dist/cjs/api/resources/projects/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/projects/client/Client.js +1 -1
- package/dist/cjs/api/resources/projects/client/requests/ProjectsCreateRequest.d.ts +3 -1
- package/dist/cjs/api/resources/projects/client/requests/ProjectsUpdateRequest.d.ts +2 -0
- package/dist/cjs/api/resources/tasks/client/requests/TasksCreateRequest.d.ts +4 -0
- package/dist/cjs/api/resources/tasks/client/requests/TasksUpdateRequest.d.ts +4 -0
- package/dist/cjs/api/resources/userStatuses/client/Client.d.ts +33 -0
- package/dist/cjs/api/resources/userStatuses/client/Client.js +122 -0
- package/dist/cjs/api/resources/userStatuses/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/userStatuses/client/index.js +2 -0
- package/dist/cjs/api/resources/userStatuses/exports.d.ts +2 -0
- package/dist/cjs/api/resources/userStatuses/exports.js +21 -0
- package/dist/cjs/api/resources/userStatuses/index.d.ts +1 -0
- package/dist/cjs/api/resources/userStatuses/index.js +17 -0
- package/dist/cjs/api/resources/users/client/requests/UsersUpdateRequest.d.ts +10 -11
- package/dist/cjs/api/resources/users/client/requests/UsersUpdateRequest.js +0 -10
- package/dist/cjs/api/resources/users/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/users/client/requests/index.js +0 -3
- package/dist/cjs/api/types/Account.d.ts +2 -0
- package/dist/cjs/api/types/Article.d.ts +4 -0
- package/dist/cjs/api/types/ArticleTranslationInput.d.ts +4 -2
- package/dist/cjs/api/types/EmailActivity.d.ts +11 -0
- package/dist/cjs/api/types/EmailActivity.js +3 -0
- package/dist/cjs/api/types/EmailActivityMessage.d.ts +18 -0
- package/dist/cjs/api/types/EmailActivityMessage.js +3 -0
- package/dist/cjs/api/types/GetEmailActivitiesResponseBody.d.ts +8 -0
- package/dist/cjs/api/types/GetEmailActivitiesResponseBody.js +3 -0
- package/dist/cjs/api/types/GetUserStatusesResponseBody.d.ts +7 -0
- package/dist/cjs/api/types/GetUserStatusesResponseBody.js +3 -0
- package/dist/cjs/api/types/ImportIssueRequest.d.ts +1 -1
- package/dist/cjs/api/types/Issue.d.ts +12 -0
- package/dist/cjs/api/types/MergeContactsResponseBody.d.ts +6 -0
- package/dist/cjs/api/types/MergeContactsResponseBody.js +3 -0
- package/dist/cjs/api/types/Message.d.ts +3 -0
- package/dist/cjs/api/types/MessageReaction.d.ts +6 -0
- package/dist/cjs/api/types/MessageReaction.js +3 -0
- package/dist/cjs/api/types/Project.d.ts +2 -0
- package/dist/cjs/api/types/SlaTimes.d.ts +6 -2
- package/dist/cjs/api/types/SlackMessageInfo.d.ts +10 -0
- package/dist/cjs/api/types/SlackMessageInfo.js +3 -0
- package/dist/cjs/api/types/Task.d.ts +6 -0
- package/dist/cjs/api/types/TeamAssignmentConfiguration.d.ts +10 -1
- package/dist/cjs/api/types/TeamAssignmentConfigurationInput.d.ts +10 -1
- package/dist/cjs/api/types/TeamSla.d.ts +2 -0
- package/dist/cjs/api/types/User.d.ts +3 -5
- package/dist/cjs/api/types/UserSkill.d.ts +13 -0
- package/dist/cjs/api/types/UserSkill.js +3 -0
- package/dist/cjs/api/types/UserSkillValue.d.ts +6 -0
- package/dist/cjs/api/types/UserSkillValue.js +3 -0
- package/dist/cjs/api/types/UserStatus.d.ts +12 -0
- package/dist/cjs/api/types/UserStatus.js +3 -0
- package/dist/cjs/api/types/index.d.ts +10 -0
- package/dist/cjs/api/types/index.js +10 -0
- package/dist/esm/BaseClient.js +1 -0
- package/dist/esm/Client.d.ts +3 -0
- package/dist/esm/Client.js +5 -0
- package/dist/esm/api/resources/accounts/client/Client.d.ts +3 -0
- package/dist/esm/api/resources/accounts/client/Client.js +5 -0
- package/dist/esm/api/resources/accounts/resources/emailActivities/client/Client.d.ts +39 -0
- package/dist/esm/api/resources/accounts/resources/emailActivities/client/Client.js +122 -0
- package/dist/esm/api/resources/accounts/resources/emailActivities/client/index.d.ts +1 -0
- package/dist/esm/api/resources/accounts/resources/emailActivities/client/index.js +1 -0
- package/dist/esm/api/resources/accounts/resources/emailActivities/client/requests/AccountsEmailActivitiesListRequest.d.ts +18 -0
- package/dist/esm/api/resources/accounts/resources/emailActivities/client/requests/AccountsEmailActivitiesListRequest.js +2 -0
- package/dist/esm/api/resources/accounts/resources/emailActivities/client/requests/index.d.ts +1 -0
- package/dist/esm/api/resources/accounts/resources/emailActivities/client/requests/index.js +1 -0
- package/dist/esm/api/resources/accounts/resources/emailActivities/exports.d.ts +2 -0
- package/dist/esm/api/resources/accounts/resources/emailActivities/exports.js +3 -0
- package/dist/esm/api/resources/accounts/resources/emailActivities/index.d.ts +1 -0
- package/dist/esm/api/resources/accounts/resources/emailActivities/index.js +1 -0
- package/dist/esm/api/resources/accounts/resources/index.d.ts +2 -0
- package/dist/esm/api/resources/accounts/resources/index.js +2 -0
- package/dist/esm/api/resources/contacts/client/Client.d.ts +25 -0
- package/dist/esm/api/resources/contacts/client/Client.js +73 -0
- package/dist/esm/api/resources/contacts/client/requests/ContactsMergeRequest.d.ts +13 -0
- package/dist/esm/api/resources/contacts/client/requests/ContactsMergeRequest.js +2 -0
- package/dist/esm/api/resources/contacts/client/requests/index.d.ts +1 -0
- package/dist/esm/api/resources/index.d.ts +1 -0
- package/dist/esm/api/resources/index.js +1 -0
- package/dist/esm/api/resources/issues/client/requests/IssuesCreateDraftReplyRequest.d.ts +6 -0
- package/dist/esm/api/resources/issues/client/requests/IssuesCreateRequest.d.ts +2 -0
- package/dist/esm/api/resources/knowledgeBases/resources/articles/client/Client.d.ts +0 -1
- package/dist/esm/api/resources/knowledgeBases/resources/articles/client/Client.js +0 -1
- package/dist/esm/api/resources/knowledgeBases/resources/articles/client/requests/KnowledgeBasesArticlesCreateRequest.d.ts +6 -3
- package/dist/esm/api/resources/knowledgeBases/resources/articles/client/requests/KnowledgeBasesArticlesUpdateRequest.d.ts +4 -0
- package/dist/esm/api/resources/projects/client/Client.d.ts +1 -1
- package/dist/esm/api/resources/projects/client/Client.js +1 -1
- package/dist/esm/api/resources/projects/client/requests/ProjectsCreateRequest.d.ts +3 -1
- package/dist/esm/api/resources/projects/client/requests/ProjectsUpdateRequest.d.ts +2 -0
- package/dist/esm/api/resources/tasks/client/requests/TasksCreateRequest.d.ts +4 -0
- package/dist/esm/api/resources/tasks/client/requests/TasksUpdateRequest.d.ts +4 -0
- package/dist/esm/api/resources/userStatuses/client/Client.d.ts +33 -0
- package/dist/esm/api/resources/userStatuses/client/Client.js +85 -0
- package/dist/esm/api/resources/userStatuses/client/index.d.ts +1 -0
- package/dist/esm/api/resources/userStatuses/client/index.js +1 -0
- package/dist/esm/api/resources/userStatuses/exports.d.ts +2 -0
- package/dist/esm/api/resources/userStatuses/exports.js +3 -0
- package/dist/esm/api/resources/userStatuses/index.d.ts +1 -0
- package/dist/esm/api/resources/userStatuses/index.js +1 -0
- package/dist/esm/api/resources/users/client/requests/UsersUpdateRequest.d.ts +10 -11
- package/dist/esm/api/resources/users/client/requests/UsersUpdateRequest.js +1 -9
- package/dist/esm/api/resources/users/client/requests/index.d.ts +1 -1
- package/dist/esm/api/resources/users/client/requests/index.js +1 -1
- package/dist/esm/api/types/Account.d.ts +2 -0
- package/dist/esm/api/types/Article.d.ts +4 -0
- package/dist/esm/api/types/ArticleTranslationInput.d.ts +4 -2
- package/dist/esm/api/types/EmailActivity.d.ts +11 -0
- package/dist/esm/api/types/EmailActivity.js +2 -0
- package/dist/esm/api/types/EmailActivityMessage.d.ts +18 -0
- package/dist/esm/api/types/EmailActivityMessage.js +2 -0
- package/dist/esm/api/types/GetEmailActivitiesResponseBody.d.ts +8 -0
- package/dist/esm/api/types/GetEmailActivitiesResponseBody.js +2 -0
- package/dist/esm/api/types/GetUserStatusesResponseBody.d.ts +7 -0
- package/dist/esm/api/types/GetUserStatusesResponseBody.js +2 -0
- package/dist/esm/api/types/ImportIssueRequest.d.ts +1 -1
- package/dist/esm/api/types/Issue.d.ts +12 -0
- package/dist/esm/api/types/MergeContactsResponseBody.d.ts +6 -0
- package/dist/esm/api/types/MergeContactsResponseBody.js +2 -0
- package/dist/esm/api/types/Message.d.ts +3 -0
- package/dist/esm/api/types/MessageReaction.d.ts +6 -0
- package/dist/esm/api/types/MessageReaction.js +2 -0
- package/dist/esm/api/types/Project.d.ts +2 -0
- package/dist/esm/api/types/SlaTimes.d.ts +6 -2
- package/dist/esm/api/types/SlackMessageInfo.d.ts +10 -0
- package/dist/esm/api/types/SlackMessageInfo.js +2 -0
- package/dist/esm/api/types/Task.d.ts +6 -0
- package/dist/esm/api/types/TeamAssignmentConfiguration.d.ts +10 -1
- package/dist/esm/api/types/TeamAssignmentConfigurationInput.d.ts +10 -1
- package/dist/esm/api/types/TeamSla.d.ts +2 -0
- package/dist/esm/api/types/User.d.ts +3 -5
- package/dist/esm/api/types/UserSkill.d.ts +13 -0
- package/dist/esm/api/types/UserSkill.js +2 -0
- package/dist/esm/api/types/UserSkillValue.d.ts +6 -0
- package/dist/esm/api/types/UserSkillValue.js +2 -0
- package/dist/esm/api/types/UserStatus.d.ts +12 -0
- package/dist/esm/api/types/UserStatus.js +2 -0
- package/dist/esm/api/types/index.d.ts +10 -0
- package/dist/esm/api/types/index.js +10 -0
- package/package.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type * as Pylon from "../index.js";
|
|
2
2
|
export interface Project {
|
|
3
3
|
account?: Pylon.MiniAccount | undefined;
|
|
4
|
+
/** Instructions the AI follows when keeping this smart project up to date. */
|
|
5
|
+
ai_instructions: string;
|
|
4
6
|
/** The archived at time of the project in RFC3339 format. */
|
|
5
7
|
archived_at?: string | undefined;
|
|
6
8
|
/** The created at time of the project. */
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
export interface SlaTimes {
|
|
2
|
+
/** The ID of the user the issue was assigned to when the breach was detected, if it breached. */
|
|
3
|
+
assignee_id_at_breach?: string | undefined;
|
|
2
4
|
/** The time at which it breaches (or has breached), if any. */
|
|
3
5
|
breach_time?: string | undefined;
|
|
4
|
-
/** The
|
|
6
|
+
/** The part of `seconds` that falls within support hours, if any. */
|
|
5
7
|
business_hours_seconds?: number | undefined;
|
|
6
|
-
/** The
|
|
8
|
+
/** The ID of the user whose action resolved it, if any. Absent when it was resolved by a contact or automation. */
|
|
9
|
+
resolving_user_id?: string | undefined;
|
|
10
|
+
/** The elapsed time in seconds, counting only time the issue spent in states that count toward this SLA. May be less than the time between the SLA's start and `time`. */
|
|
7
11
|
seconds?: number | undefined;
|
|
8
12
|
/** The time it was reached, if any. */
|
|
9
13
|
time?: (string | null) | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface SlackMessageInfo {
|
|
2
|
+
/** The Slack channel ID the message was posted in. */
|
|
3
|
+
channel_id: string;
|
|
4
|
+
/** The Slack timestamp of this message, which is its Slack message ID. */
|
|
5
|
+
message_ts: string;
|
|
6
|
+
/** A link that opens this specific message in Slack. Omitted when the workspace's Slack domain is unknown. */
|
|
7
|
+
permalink?: string | undefined;
|
|
8
|
+
/** The timestamp of the thread's root message. Equal to message_ts for the root message itself. */
|
|
9
|
+
thread_ts: string;
|
|
10
|
+
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import type * as Pylon from "../index.js";
|
|
2
2
|
export interface Task {
|
|
3
3
|
account?: Pylon.MiniAccount | undefined;
|
|
4
|
+
/** Instructions the AI follows when evaluating this task in a smart project. */
|
|
5
|
+
ai_instructions: string;
|
|
4
6
|
assignee?: Pylon.Actor | undefined;
|
|
7
|
+
/** The IDs of tasks that block this task. */
|
|
8
|
+
blocked_by_task_ids?: (string[] | null) | undefined;
|
|
9
|
+
/** The IDs of tasks that this task blocks. */
|
|
10
|
+
blocks_task_ids?: (string[] | null) | undefined;
|
|
5
11
|
/** The body of the task in HTML format. */
|
|
6
12
|
body_html: string;
|
|
7
13
|
/** The completion time of the task in RFC3339 format. */
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
export interface TeamAssignmentConfiguration {
|
|
2
|
+
/**
|
|
3
|
+
* The slugs of the user statuses members must show to be assigned. See GET /user-statuses.
|
|
4
|
+
* Empty defers to only_assign_if_user_active.
|
|
5
|
+
*/
|
|
6
|
+
assignable_user_statuses?: (string[] | null) | undefined;
|
|
2
7
|
/** How issues are routed to team members. One of routing, schedule, manual, pull_queue. */
|
|
3
8
|
assignment_method: string;
|
|
4
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Whether automatic assignment is restricted by user status. When assignable_user_statuses
|
|
11
|
+
* is empty, true means only members with an Active status; when it is non-empty, this is
|
|
12
|
+
* always true and the list decides.
|
|
13
|
+
*/
|
|
5
14
|
only_assign_if_user_active: boolean;
|
|
6
15
|
/** Whether assignment replaces an existing assignee. */
|
|
7
16
|
override_existing_assignee: boolean;
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
export interface TeamAssignmentConfigurationInput {
|
|
2
|
+
/**
|
|
3
|
+
* The slugs of the user statuses members must show to be assigned. See GET /user-statuses.
|
|
4
|
+
* A non-empty list takes precedence over only_assign_if_user_active; an empty list clears
|
|
5
|
+
* the allow-list so only_assign_if_user_active decides.
|
|
6
|
+
*/
|
|
7
|
+
assignable_user_statuses?: string[] | undefined;
|
|
2
8
|
/**
|
|
3
9
|
* How issues are routed to team members. Setting schedule routes from this team's own
|
|
4
10
|
* schedule, so the team must already have one or be given one in the same request.
|
|
5
11
|
*/
|
|
6
12
|
assignment_method?: TeamAssignmentConfigurationInput.AssignmentMethod | undefined;
|
|
7
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Whether issues are only assigned to members with an Active status. Setting this without
|
|
15
|
+
* assignable_user_statuses clears any status allow-list.
|
|
16
|
+
*/
|
|
8
17
|
only_assign_if_user_active?: boolean | undefined;
|
|
9
18
|
/** Whether assignment replaces an existing assignee. */
|
|
10
19
|
override_existing_assignee?: boolean | undefined;
|
|
@@ -2,6 +2,8 @@ import type * as Pylon from "../index.js";
|
|
|
2
2
|
export interface TeamSla {
|
|
3
3
|
first_resolution?: Pylon.SlaTimes | undefined;
|
|
4
4
|
first_response?: Pylon.SlaTimes | undefined;
|
|
5
|
+
follow_up?: Pylon.SlaTimes | undefined;
|
|
6
|
+
next_reply?: Pylon.SlaTimes | undefined;
|
|
5
7
|
resolution?: Pylon.SlaTimes | undefined;
|
|
6
8
|
/** The ID of the team these are scoped to. */
|
|
7
9
|
team_id: string;
|
|
@@ -20,10 +20,8 @@ export interface User {
|
|
|
20
20
|
role_ids?: (string[] | null) | undefined;
|
|
21
21
|
/** All assigned roles, including SCIM-derived roles, sorted by ID. Empty when no roles are assigned. */
|
|
22
22
|
roles?: (Pylon.MiniRole[] | null) | undefined;
|
|
23
|
-
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
* Known values: ``, `active`, `away`, `out_of_office`. This list is not exhaustive.
|
|
27
|
-
*/
|
|
23
|
+
/** The user's routing skills. Null when the caller lacks permission to read team settings. */
|
|
24
|
+
skills?: (Pylon.UserSkill[] | null) | undefined;
|
|
25
|
+
/** The status of the user. Standard values are `active`, `away`, and `out_of_office`; custom status slugs are also supported. See GET /user-statuses for each status's category. */
|
|
28
26
|
status: string;
|
|
29
27
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as Pylon from "../index.js";
|
|
2
|
+
export interface UserSkill {
|
|
3
|
+
/** The issue custom field ID when attribute_type is `custom_field`, or the issue property, such as `language`, when attribute_type is `default_field`. */
|
|
4
|
+
attribute: string;
|
|
5
|
+
/**
|
|
6
|
+
* The kind of attribute the skill routes on.
|
|
7
|
+
*
|
|
8
|
+
* Known values: `custom_field`, `default_field`. This list is not exhaustive.
|
|
9
|
+
*/
|
|
10
|
+
attribute_type: string;
|
|
11
|
+
/** The attribute values the user is skilled in, with their levels. */
|
|
12
|
+
values?: (Pylon.UserSkillValue[] | null) | undefined;
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface UserStatus {
|
|
2
|
+
/** The category of the user status. One of active, away, out_of_office. */
|
|
3
|
+
category: string;
|
|
4
|
+
/** Indicates if the user status is archived. */
|
|
5
|
+
is_archived: boolean;
|
|
6
|
+
/** Indicates if the user status is a built-in status. */
|
|
7
|
+
is_default_status: boolean;
|
|
8
|
+
/** The label of the user status. */
|
|
9
|
+
label: string;
|
|
10
|
+
/** The slug of the user status. Use it in a team's assignment_configuration.assignable_user_statuses. */
|
|
11
|
+
slug: string;
|
|
12
|
+
}
|
|
@@ -89,6 +89,8 @@ export * from "./DeleteTaskCommentResponseBody.js";
|
|
|
89
89
|
export * from "./DeleteTaskResponseBody.js";
|
|
90
90
|
export * from "./DeleteTrainingDataDocumentsResponseBody.js";
|
|
91
91
|
export * from "./DestinationMetadata.js";
|
|
92
|
+
export * from "./EmailActivity.js";
|
|
93
|
+
export * from "./EmailActivityMessage.js";
|
|
92
94
|
export * from "./EmailEvent.js";
|
|
93
95
|
export * from "./EmailMessageInfo.js";
|
|
94
96
|
export * from "./EmailSuppression.js";
|
|
@@ -120,6 +122,7 @@ export * from "./GetCustomFieldResponseBody.js";
|
|
|
120
122
|
export * from "./GetCustomFieldsResponseBody.js";
|
|
121
123
|
export * from "./GetCustomObjectResponseBody.js";
|
|
122
124
|
export * from "./GetCustomObjectsResponseBody.js";
|
|
125
|
+
export * from "./GetEmailActivitiesResponseBody.js";
|
|
123
126
|
export * from "./GetEmailSuppressionsResponseBody.js";
|
|
124
127
|
export * from "./GetFeatureRequestResponseBody.js";
|
|
125
128
|
export * from "./GetIssueFollowersResponseBody.js";
|
|
@@ -155,6 +158,7 @@ export * from "./GetTicketFormsResponseBody.js";
|
|
|
155
158
|
export * from "./GetTrainingDataResponseBody.js";
|
|
156
159
|
export * from "./GetUserResponseBody.js";
|
|
157
160
|
export * from "./GetUserRolesResponseBody.js";
|
|
161
|
+
export * from "./GetUserStatusesResponseBody.js";
|
|
158
162
|
export * from "./GetUsersResponseBody.js";
|
|
159
163
|
export * from "./ImportContactRequestBody.js";
|
|
160
164
|
export * from "./ImportContactResponseBody.js";
|
|
@@ -191,10 +195,12 @@ export * from "./MacroGroup.js";
|
|
|
191
195
|
export * from "./MarkIssuesAsSpamResponseBody.js";
|
|
192
196
|
export * from "./Me.js";
|
|
193
197
|
export * from "./MergeAccountsResponseBody.js";
|
|
198
|
+
export * from "./MergeContactsResponseBody.js";
|
|
194
199
|
export * from "./MergeFeatureRequestsResponseBody.js";
|
|
195
200
|
export * from "./MergeIssuesResponseBody.js";
|
|
196
201
|
export * from "./Message.js";
|
|
197
202
|
export * from "./MessageAuthor.js";
|
|
203
|
+
export * from "./MessageReaction.js";
|
|
198
204
|
export * from "./MeUser.js";
|
|
199
205
|
export * from "./Milestone.js";
|
|
200
206
|
export * from "./MiniAccount.js";
|
|
@@ -231,6 +237,7 @@ export * from "./SelectMetadata.js";
|
|
|
231
237
|
export * from "./SetFeatureRequestPortalVisibilityResponseBody.js";
|
|
232
238
|
export * from "./SkippedIssue.js";
|
|
233
239
|
export * from "./SlackInfo.js";
|
|
240
|
+
export * from "./SlackMessageInfo.js";
|
|
234
241
|
export * from "./SlaTimes.js";
|
|
235
242
|
export * from "./SnoozeIssueResponseBody.js";
|
|
236
243
|
export * from "./SubmitTicketFormField.js";
|
|
@@ -288,6 +295,9 @@ export * from "./UpdateUserResponseBody.js";
|
|
|
288
295
|
export * from "./UploadAccountFileResponseBody.js";
|
|
289
296
|
export * from "./User.js";
|
|
290
297
|
export * from "./UserRole.js";
|
|
298
|
+
export * from "./UserSkill.js";
|
|
299
|
+
export * from "./UserSkillValue.js";
|
|
300
|
+
export * from "./UserStatus.js";
|
|
291
301
|
export * from "./Visibility.js";
|
|
292
302
|
export * from "./VisibilityInput.js";
|
|
293
303
|
export * from "./VoiceCall.js";
|
|
@@ -105,6 +105,8 @@ __exportStar(require("./DeleteTaskCommentResponseBody.js"), exports);
|
|
|
105
105
|
__exportStar(require("./DeleteTaskResponseBody.js"), exports);
|
|
106
106
|
__exportStar(require("./DeleteTrainingDataDocumentsResponseBody.js"), exports);
|
|
107
107
|
__exportStar(require("./DestinationMetadata.js"), exports);
|
|
108
|
+
__exportStar(require("./EmailActivity.js"), exports);
|
|
109
|
+
__exportStar(require("./EmailActivityMessage.js"), exports);
|
|
108
110
|
__exportStar(require("./EmailEvent.js"), exports);
|
|
109
111
|
__exportStar(require("./EmailMessageInfo.js"), exports);
|
|
110
112
|
__exportStar(require("./EmailSuppression.js"), exports);
|
|
@@ -136,6 +138,7 @@ __exportStar(require("./GetCustomFieldResponseBody.js"), exports);
|
|
|
136
138
|
__exportStar(require("./GetCustomFieldsResponseBody.js"), exports);
|
|
137
139
|
__exportStar(require("./GetCustomObjectResponseBody.js"), exports);
|
|
138
140
|
__exportStar(require("./GetCustomObjectsResponseBody.js"), exports);
|
|
141
|
+
__exportStar(require("./GetEmailActivitiesResponseBody.js"), exports);
|
|
139
142
|
__exportStar(require("./GetEmailSuppressionsResponseBody.js"), exports);
|
|
140
143
|
__exportStar(require("./GetFeatureRequestResponseBody.js"), exports);
|
|
141
144
|
__exportStar(require("./GetIssueFollowersResponseBody.js"), exports);
|
|
@@ -171,6 +174,7 @@ __exportStar(require("./GetTicketFormsResponseBody.js"), exports);
|
|
|
171
174
|
__exportStar(require("./GetTrainingDataResponseBody.js"), exports);
|
|
172
175
|
__exportStar(require("./GetUserResponseBody.js"), exports);
|
|
173
176
|
__exportStar(require("./GetUserRolesResponseBody.js"), exports);
|
|
177
|
+
__exportStar(require("./GetUserStatusesResponseBody.js"), exports);
|
|
174
178
|
__exportStar(require("./GetUsersResponseBody.js"), exports);
|
|
175
179
|
__exportStar(require("./ImportContactRequestBody.js"), exports);
|
|
176
180
|
__exportStar(require("./ImportContactResponseBody.js"), exports);
|
|
@@ -207,10 +211,12 @@ __exportStar(require("./MacroGroup.js"), exports);
|
|
|
207
211
|
__exportStar(require("./MarkIssuesAsSpamResponseBody.js"), exports);
|
|
208
212
|
__exportStar(require("./Me.js"), exports);
|
|
209
213
|
__exportStar(require("./MergeAccountsResponseBody.js"), exports);
|
|
214
|
+
__exportStar(require("./MergeContactsResponseBody.js"), exports);
|
|
210
215
|
__exportStar(require("./MergeFeatureRequestsResponseBody.js"), exports);
|
|
211
216
|
__exportStar(require("./MergeIssuesResponseBody.js"), exports);
|
|
212
217
|
__exportStar(require("./Message.js"), exports);
|
|
213
218
|
__exportStar(require("./MessageAuthor.js"), exports);
|
|
219
|
+
__exportStar(require("./MessageReaction.js"), exports);
|
|
214
220
|
__exportStar(require("./MeUser.js"), exports);
|
|
215
221
|
__exportStar(require("./Milestone.js"), exports);
|
|
216
222
|
__exportStar(require("./MiniAccount.js"), exports);
|
|
@@ -247,6 +253,7 @@ __exportStar(require("./SelectMetadata.js"), exports);
|
|
|
247
253
|
__exportStar(require("./SetFeatureRequestPortalVisibilityResponseBody.js"), exports);
|
|
248
254
|
__exportStar(require("./SkippedIssue.js"), exports);
|
|
249
255
|
__exportStar(require("./SlackInfo.js"), exports);
|
|
256
|
+
__exportStar(require("./SlackMessageInfo.js"), exports);
|
|
250
257
|
__exportStar(require("./SlaTimes.js"), exports);
|
|
251
258
|
__exportStar(require("./SnoozeIssueResponseBody.js"), exports);
|
|
252
259
|
__exportStar(require("./SubmitTicketFormField.js"), exports);
|
|
@@ -304,6 +311,9 @@ __exportStar(require("./UpdateUserResponseBody.js"), exports);
|
|
|
304
311
|
__exportStar(require("./UploadAccountFileResponseBody.js"), exports);
|
|
305
312
|
__exportStar(require("./User.js"), exports);
|
|
306
313
|
__exportStar(require("./UserRole.js"), exports);
|
|
314
|
+
__exportStar(require("./UserSkill.js"), exports);
|
|
315
|
+
__exportStar(require("./UserSkillValue.js"), exports);
|
|
316
|
+
__exportStar(require("./UserStatus.js"), exports);
|
|
307
317
|
__exportStar(require("./Visibility.js"), exports);
|
|
308
318
|
__exportStar(require("./VisibilityInput.js"), exports);
|
|
309
319
|
__exportStar(require("./VoiceCall.js"), exports);
|
package/dist/esm/BaseClient.js
CHANGED
|
@@ -5,6 +5,7 @@ import * as core from "./core/index.js";
|
|
|
5
5
|
export function normalizeClientOptions(options) {
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
|
+
"User-Agent": "@usepylon/sdk/0.1.0-alpha.5",
|
|
8
9
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
9
10
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
10
11
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
package/dist/esm/Client.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ import { TeamsClient } from "./api/resources/teams/client/Client.js";
|
|
|
26
26
|
import { TicketFormsClient } from "./api/resources/ticketForms/client/Client.js";
|
|
27
27
|
import { TrainingDataClient } from "./api/resources/trainingData/client/Client.js";
|
|
28
28
|
import { UserRolesClient } from "./api/resources/userRoles/client/Client.js";
|
|
29
|
+
import { UserStatusesClient } from "./api/resources/userStatuses/client/Client.js";
|
|
29
30
|
import { UsersClient } from "./api/resources/users/client/Client.js";
|
|
30
31
|
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
|
31
32
|
import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
|
|
@@ -65,6 +66,7 @@ export declare class PylonClient {
|
|
|
65
66
|
protected _ticketForms: TicketFormsClient | undefined;
|
|
66
67
|
protected _trainingData: TrainingDataClient | undefined;
|
|
67
68
|
protected _userRoles: UserRolesClient | undefined;
|
|
69
|
+
protected _userStatuses: UserStatusesClient | undefined;
|
|
68
70
|
protected _users: UsersClient | undefined;
|
|
69
71
|
constructor(options: PylonClient.Options);
|
|
70
72
|
get accounts(): AccountsClient;
|
|
@@ -95,6 +97,7 @@ export declare class PylonClient {
|
|
|
95
97
|
get ticketForms(): TicketFormsClient;
|
|
96
98
|
get trainingData(): TrainingDataClient;
|
|
97
99
|
get userRoles(): UserRolesClient;
|
|
100
|
+
get userStatuses(): UserStatusesClient;
|
|
98
101
|
get users(): UsersClient;
|
|
99
102
|
/**
|
|
100
103
|
* Make a passthrough request using the SDK's configured auth, retry, logging, etc.
|
package/dist/esm/Client.js
CHANGED
|
@@ -36,6 +36,7 @@ import { TeamsClient } from "./api/resources/teams/client/Client.js";
|
|
|
36
36
|
import { TicketFormsClient } from "./api/resources/ticketForms/client/Client.js";
|
|
37
37
|
import { TrainingDataClient } from "./api/resources/trainingData/client/Client.js";
|
|
38
38
|
import { UserRolesClient } from "./api/resources/userRoles/client/Client.js";
|
|
39
|
+
import { UserStatusesClient } from "./api/resources/userStatuses/client/Client.js";
|
|
39
40
|
import { UsersClient } from "./api/resources/users/client/Client.js";
|
|
40
41
|
import { normalizeClientOptionsWithAuth } from "./BaseClient.js";
|
|
41
42
|
import * as core from "./core/index.js";
|
|
@@ -155,6 +156,10 @@ export class PylonClient {
|
|
|
155
156
|
var _a;
|
|
156
157
|
return ((_a = this._userRoles) !== null && _a !== void 0 ? _a : (this._userRoles = new UserRolesClient(this._options)));
|
|
157
158
|
}
|
|
159
|
+
get userStatuses() {
|
|
160
|
+
var _a;
|
|
161
|
+
return ((_a = this._userStatuses) !== null && _a !== void 0 ? _a : (this._userStatuses = new UserStatusesClient(this._options)));
|
|
162
|
+
}
|
|
158
163
|
get users() {
|
|
159
164
|
var _a;
|
|
160
165
|
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new UsersClient(this._options)));
|
|
@@ -3,6 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
|
|
|
3
3
|
import * as core from "../../../../core/index.js";
|
|
4
4
|
import * as Pylon from "../../../index.js";
|
|
5
5
|
import { ActivitiesClient } from "../resources/activities/client/Client.js";
|
|
6
|
+
import { EmailActivitiesClient } from "../resources/emailActivities/client/Client.js";
|
|
6
7
|
import { HighlightsClient } from "../resources/highlights/client/Client.js";
|
|
7
8
|
import { NotebookBlocksClient } from "../resources/notebookBlocks/client/Client.js";
|
|
8
9
|
import { RelationshipsClient } from "../resources/relationships/client/Client.js";
|
|
@@ -16,11 +17,13 @@ export declare class AccountsClient {
|
|
|
16
17
|
protected _highlights: HighlightsClient | undefined;
|
|
17
18
|
protected _relationships: RelationshipsClient | undefined;
|
|
18
19
|
protected _activities: ActivitiesClient | undefined;
|
|
20
|
+
protected _emailActivities: EmailActivitiesClient | undefined;
|
|
19
21
|
protected _notebookBlocks: NotebookBlocksClient | undefined;
|
|
20
22
|
constructor(options: AccountsClient.Options);
|
|
21
23
|
get highlights(): HighlightsClient;
|
|
22
24
|
get relationships(): RelationshipsClient;
|
|
23
25
|
get activities(): ActivitiesClient;
|
|
26
|
+
get emailActivities(): EmailActivitiesClient;
|
|
24
27
|
get notebookBlocks(): NotebookBlocksClient;
|
|
25
28
|
/**
|
|
26
29
|
* Returns a paginated list of accounts for the organization.
|
|
@@ -28,6 +28,7 @@ import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCode
|
|
|
28
28
|
import * as errors from "../../../../errors/index.js";
|
|
29
29
|
import * as Pylon from "../../../index.js";
|
|
30
30
|
import { ActivitiesClient } from "../resources/activities/client/Client.js";
|
|
31
|
+
import { EmailActivitiesClient } from "../resources/emailActivities/client/Client.js";
|
|
31
32
|
import { HighlightsClient } from "../resources/highlights/client/Client.js";
|
|
32
33
|
import { NotebookBlocksClient } from "../resources/notebookBlocks/client/Client.js";
|
|
33
34
|
import { RelationshipsClient } from "../resources/relationships/client/Client.js";
|
|
@@ -47,6 +48,10 @@ export class AccountsClient {
|
|
|
47
48
|
var _a;
|
|
48
49
|
return ((_a = this._activities) !== null && _a !== void 0 ? _a : (this._activities = new ActivitiesClient(this._options)));
|
|
49
50
|
}
|
|
51
|
+
get emailActivities() {
|
|
52
|
+
var _a;
|
|
53
|
+
return ((_a = this._emailActivities) !== null && _a !== void 0 ? _a : (this._emailActivities = new EmailActivitiesClient(this._options)));
|
|
54
|
+
}
|
|
50
55
|
get notebookBlocks() {
|
|
51
56
|
var _a;
|
|
52
57
|
return ((_a = this._notebookBlocks) !== null && _a !== void 0 ? _a : (this._notebookBlocks = new NotebookBlocksClient(this._options)));
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../../../core/index.js";
|
|
4
|
+
import * as Pylon from "../../../../../index.js";
|
|
5
|
+
export declare namespace EmailActivitiesClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class EmailActivitiesClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<EmailActivitiesClient.Options>;
|
|
12
|
+
constructor(options: EmailActivitiesClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Returns email threads synced to the specified account from connected Gmail and Outlook inboxes, ordered by their latest email from newest to oldest.
|
|
15
|
+
* The {id} parameter accepts either:
|
|
16
|
+
* Internal account ID (UUID format)
|
|
17
|
+
* External ID (any string format)
|
|
18
|
+
*
|
|
19
|
+
* **Rate limit:** 120 requests per minute
|
|
20
|
+
*
|
|
21
|
+
* @param {Pylon.accounts.AccountsEmailActivitiesListRequest} request
|
|
22
|
+
* @param {EmailActivitiesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
23
|
+
*
|
|
24
|
+
* @throws {@link Pylon.BadRequestError}
|
|
25
|
+
* @throws {@link Pylon.UnauthorizedError}
|
|
26
|
+
* @throws {@link Pylon.ForbiddenError}
|
|
27
|
+
* @throws {@link Pylon.NotFoundError}
|
|
28
|
+
* @throws {@link Pylon.TooManyRequestsError}
|
|
29
|
+
* @throws {@link Pylon.InternalServerError}
|
|
30
|
+
* @throws {@link errors.PylonError}
|
|
31
|
+
* @throws {@link errors.PylonTimeoutError}
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* await client.accounts.emailActivities.list({
|
|
35
|
+
* account_id: "id"
|
|
36
|
+
* })
|
|
37
|
+
*/
|
|
38
|
+
list(request: Pylon.accounts.AccountsEmailActivitiesListRequest, requestOptions?: EmailActivitiesClient.RequestOptions): Promise<core.Page<Pylon.EmailActivity, Pylon.GetEmailActivitiesResponseBody>>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.js";
|
|
12
|
+
import { mergeHeaders } from "../../../../../../core/headers.js";
|
|
13
|
+
import * as core from "../../../../../../core/index.js";
|
|
14
|
+
import * as environments from "../../../../../../environments.js";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.js";
|
|
16
|
+
import * as errors from "../../../../../../errors/index.js";
|
|
17
|
+
import * as Pylon from "../../../../../index.js";
|
|
18
|
+
export class EmailActivitiesClient {
|
|
19
|
+
constructor(options) {
|
|
20
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Returns email threads synced to the specified account from connected Gmail and Outlook inboxes, ordered by their latest email from newest to oldest.
|
|
24
|
+
* The {id} parameter accepts either:
|
|
25
|
+
* Internal account ID (UUID format)
|
|
26
|
+
* External ID (any string format)
|
|
27
|
+
*
|
|
28
|
+
* **Rate limit:** 120 requests per minute
|
|
29
|
+
*
|
|
30
|
+
* @param {Pylon.accounts.AccountsEmailActivitiesListRequest} request
|
|
31
|
+
* @param {EmailActivitiesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
|
+
*
|
|
33
|
+
* @throws {@link Pylon.BadRequestError}
|
|
34
|
+
* @throws {@link Pylon.UnauthorizedError}
|
|
35
|
+
* @throws {@link Pylon.ForbiddenError}
|
|
36
|
+
* @throws {@link Pylon.NotFoundError}
|
|
37
|
+
* @throws {@link Pylon.TooManyRequestsError}
|
|
38
|
+
* @throws {@link Pylon.InternalServerError}
|
|
39
|
+
* @throws {@link errors.PylonError}
|
|
40
|
+
* @throws {@link errors.PylonTimeoutError}
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* await client.accounts.emailActivities.list({
|
|
44
|
+
* account_id: "id"
|
|
45
|
+
* })
|
|
46
|
+
*/
|
|
47
|
+
list(request, requestOptions) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
51
|
+
const { account_id: accountId, start_time: startTime, end_time: endTime, cursor, limit } = request;
|
|
52
|
+
const _queryParams = {
|
|
53
|
+
start_time: startTime != null ? startTime : undefined,
|
|
54
|
+
end_time: endTime != null ? endTime : undefined,
|
|
55
|
+
cursor,
|
|
56
|
+
limit,
|
|
57
|
+
};
|
|
58
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
59
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
60
|
+
const _response = yield core.fetcher({
|
|
61
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PylonEnvironment.Us, `accounts/${core.url.encodePathParam(accountId)}/email-activities`),
|
|
62
|
+
method: "GET",
|
|
63
|
+
headers: _headers,
|
|
64
|
+
queryString: core.url
|
|
65
|
+
.queryBuilder()
|
|
66
|
+
.addMany(_queryParams)
|
|
67
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
68
|
+
.build(),
|
|
69
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
70
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
71
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
72
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
73
|
+
logging: this._options.logging,
|
|
74
|
+
});
|
|
75
|
+
if (_response.ok) {
|
|
76
|
+
return {
|
|
77
|
+
data: _response.body,
|
|
78
|
+
rawResponse: _response.rawResponse,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
if (_response.error.reason === "status-code") {
|
|
82
|
+
switch (_response.error.statusCode) {
|
|
83
|
+
case 400:
|
|
84
|
+
throw new Pylon.BadRequestError(_response.error.body, _response.rawResponse);
|
|
85
|
+
case 401:
|
|
86
|
+
throw new Pylon.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
87
|
+
case 403:
|
|
88
|
+
throw new Pylon.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
89
|
+
case 404:
|
|
90
|
+
throw new Pylon.NotFoundError(_response.error.body, _response.rawResponse);
|
|
91
|
+
case 429:
|
|
92
|
+
throw new Pylon.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
93
|
+
case 500:
|
|
94
|
+
throw new Pylon.InternalServerError(_response.error.body, _response.rawResponse);
|
|
95
|
+
default:
|
|
96
|
+
throw new errors.PylonError({
|
|
97
|
+
statusCode: _response.error.statusCode,
|
|
98
|
+
body: _response.error.body,
|
|
99
|
+
rawResponse: _response.rawResponse,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/accounts/{account_id}/email-activities");
|
|
104
|
+
}));
|
|
105
|
+
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
106
|
+
return new core.Page({
|
|
107
|
+
response: dataWithRawResponse.data,
|
|
108
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
109
|
+
hasNextPage: (response) => {
|
|
110
|
+
var _a, _b, _c;
|
|
111
|
+
return ((_a = response === null || response === void 0 ? void 0 : response.pagination) === null || _a === void 0 ? void 0 : _a.cursor) != null &&
|
|
112
|
+
!(typeof ((_b = response === null || response === void 0 ? void 0 : response.pagination) === null || _b === void 0 ? void 0 : _b.cursor) === "string" && ((_c = response === null || response === void 0 ? void 0 : response.pagination) === null || _c === void 0 ? void 0 : _c.cursor) === "");
|
|
113
|
+
},
|
|
114
|
+
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.data) !== null && _a !== void 0 ? _a : []; },
|
|
115
|
+
loadPage: (response) => {
|
|
116
|
+
var _a;
|
|
117
|
+
return list(core.setObjectProperty(request, "cursor", (_a = response === null || response === void 0 ? void 0 : response.pagination) === null || _a === void 0 ? void 0 : _a.cursor));
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* account_id: "id"
|
|
5
|
+
* }
|
|
6
|
+
*/
|
|
7
|
+
export interface AccountsEmailActivitiesListRequest {
|
|
8
|
+
/** The ID or external ID of the account to fetch email activities for. */
|
|
9
|
+
account_id: string;
|
|
10
|
+
/** The start time (RFC3339) of the activity time range, compared against each thread's latest email. */
|
|
11
|
+
start_time?: string;
|
|
12
|
+
/** The end time (RFC3339) of the activity time range, compared against each thread's latest email. */
|
|
13
|
+
end_time?: string;
|
|
14
|
+
/** The cursor to use for pagination. */
|
|
15
|
+
cursor?: string;
|
|
16
|
+
/** The number of email activities to fetch. Defaults to 20. Must be greater than 0 and less than or equal to 50. */
|
|
17
|
+
limit?: number;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { AccountsEmailActivitiesListRequest } from "./AccountsEmailActivitiesListRequest.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from "./activities/client/requests/index.js";
|
|
2
2
|
export * as activities from "./activities/index.js";
|
|
3
|
+
export * from "./emailActivities/client/requests/index.js";
|
|
4
|
+
export * as emailActivities from "./emailActivities/index.js";
|
|
3
5
|
export * from "./highlights/client/requests/index.js";
|
|
4
6
|
export * as highlights from "./highlights/index.js";
|
|
5
7
|
export * as notebookBlocks from "./notebookBlocks/index.js";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from "./activities/client/requests/index.js";
|
|
2
2
|
export * as activities from "./activities/index.js";
|
|
3
|
+
export * from "./emailActivities/client/requests/index.js";
|
|
4
|
+
export * as emailActivities from "./emailActivities/index.js";
|
|
3
5
|
export * from "./highlights/client/requests/index.js";
|
|
4
6
|
export * as highlights from "./highlights/index.js";
|
|
5
7
|
export * as notebookBlocks from "./notebookBlocks/index.js";
|