@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
|
@@ -55,6 +55,31 @@ export declare class ContactsClient {
|
|
|
55
55
|
*/
|
|
56
56
|
create(request: Pylon.ContactsCreateRequest, requestOptions?: ContactsClient.RequestOptions): core.HttpResponsePromise<Pylon.CreateContactResponseBody>;
|
|
57
57
|
private __create;
|
|
58
|
+
/**
|
|
59
|
+
* Merges a contact into a surviving contact. If the merged contact belongs to a different account, it is first moved to the surviving contact's account. Issues, emails, phone numbers, survey responses, and other associated data are then transferred to the surviving contact, and the merged contact is permanently deleted. This cannot be undone.
|
|
60
|
+
*
|
|
61
|
+
* **Rate limit:** 30 requests per minute
|
|
62
|
+
*
|
|
63
|
+
* @param {Pylon.ContactsMergeRequest} request
|
|
64
|
+
* @param {ContactsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link Pylon.BadRequestError}
|
|
67
|
+
* @throws {@link Pylon.UnauthorizedError}
|
|
68
|
+
* @throws {@link Pylon.ForbiddenError}
|
|
69
|
+
* @throws {@link Pylon.NotFoundError}
|
|
70
|
+
* @throws {@link Pylon.TooManyRequestsError}
|
|
71
|
+
* @throws {@link Pylon.InternalServerError}
|
|
72
|
+
* @throws {@link errors.PylonError}
|
|
73
|
+
* @throws {@link errors.PylonTimeoutError}
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* await client.contacts.merge({
|
|
77
|
+
* merge_contact_id: "merge_contact_id",
|
|
78
|
+
* merge_into_contact_id: "merge_into_contact_id"
|
|
79
|
+
* })
|
|
80
|
+
*/
|
|
81
|
+
merge(request: Pylon.ContactsMergeRequest, requestOptions?: ContactsClient.RequestOptions): core.HttpResponsePromise<Pylon.MergeContactsResponseBody>;
|
|
82
|
+
private __merge;
|
|
58
83
|
/**
|
|
59
84
|
* Filterable fields and their allowed operators:
|
|
60
85
|
*
|
|
@@ -196,6 +196,79 @@ export class ContactsClient {
|
|
|
196
196
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/contacts");
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
|
+
/**
|
|
200
|
+
* Merges a contact into a surviving contact. If the merged contact belongs to a different account, it is first moved to the surviving contact's account. Issues, emails, phone numbers, survey responses, and other associated data are then transferred to the surviving contact, and the merged contact is permanently deleted. This cannot be undone.
|
|
201
|
+
*
|
|
202
|
+
* **Rate limit:** 30 requests per minute
|
|
203
|
+
*
|
|
204
|
+
* @param {Pylon.ContactsMergeRequest} request
|
|
205
|
+
* @param {ContactsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
206
|
+
*
|
|
207
|
+
* @throws {@link Pylon.BadRequestError}
|
|
208
|
+
* @throws {@link Pylon.UnauthorizedError}
|
|
209
|
+
* @throws {@link Pylon.ForbiddenError}
|
|
210
|
+
* @throws {@link Pylon.NotFoundError}
|
|
211
|
+
* @throws {@link Pylon.TooManyRequestsError}
|
|
212
|
+
* @throws {@link Pylon.InternalServerError}
|
|
213
|
+
* @throws {@link errors.PylonError}
|
|
214
|
+
* @throws {@link errors.PylonTimeoutError}
|
|
215
|
+
*
|
|
216
|
+
* @example
|
|
217
|
+
* await client.contacts.merge({
|
|
218
|
+
* merge_contact_id: "merge_contact_id",
|
|
219
|
+
* merge_into_contact_id: "merge_into_contact_id"
|
|
220
|
+
* })
|
|
221
|
+
*/
|
|
222
|
+
merge(request, requestOptions) {
|
|
223
|
+
return core.HttpResponsePromise.fromPromise(this.__merge(request, requestOptions));
|
|
224
|
+
}
|
|
225
|
+
__merge(request, requestOptions) {
|
|
226
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
227
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
228
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
229
|
+
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);
|
|
230
|
+
const _response = yield core.fetcher({
|
|
231
|
+
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, "contacts/merge"),
|
|
232
|
+
method: "POST",
|
|
233
|
+
headers: _headers,
|
|
234
|
+
contentType: "application/json",
|
|
235
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
236
|
+
requestType: "json",
|
|
237
|
+
body: mergeAdditionalBodyParameters(request, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
238
|
+
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,
|
|
239
|
+
maxRetries: 0,
|
|
240
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
241
|
+
fetchFn: (_g = this._options) === null || _g === void 0 ? void 0 : _g.fetch,
|
|
242
|
+
logging: this._options.logging,
|
|
243
|
+
});
|
|
244
|
+
if (_response.ok) {
|
|
245
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
246
|
+
}
|
|
247
|
+
if (_response.error.reason === "status-code") {
|
|
248
|
+
switch (_response.error.statusCode) {
|
|
249
|
+
case 400:
|
|
250
|
+
throw new Pylon.BadRequestError(_response.error.body, _response.rawResponse);
|
|
251
|
+
case 401:
|
|
252
|
+
throw new Pylon.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
253
|
+
case 403:
|
|
254
|
+
throw new Pylon.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
255
|
+
case 404:
|
|
256
|
+
throw new Pylon.NotFoundError(_response.error.body, _response.rawResponse);
|
|
257
|
+
case 429:
|
|
258
|
+
throw new Pylon.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
259
|
+
case 500:
|
|
260
|
+
throw new Pylon.InternalServerError(_response.error.body, _response.rawResponse);
|
|
261
|
+
default:
|
|
262
|
+
throw new errors.PylonError({
|
|
263
|
+
statusCode: _response.error.statusCode,
|
|
264
|
+
body: _response.error.body,
|
|
265
|
+
rawResponse: _response.rawResponse,
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/contacts/merge");
|
|
270
|
+
});
|
|
271
|
+
}
|
|
199
272
|
/**
|
|
200
273
|
* Filterable fields and their allowed operators:
|
|
201
274
|
*
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* merge_contact_id: "merge_contact_id",
|
|
5
|
+
* merge_into_contact_id: "merge_into_contact_id"
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface ContactsMergeRequest {
|
|
9
|
+
/** The ID of the contact to merge into the surviving contact. This contact is permanently deleted after its data is transferred. */
|
|
10
|
+
merge_contact_id: string;
|
|
11
|
+
/** The ID of the contact that will survive the merge and receive the merged data. The contact must belong to an account. */
|
|
12
|
+
merge_into_contact_id: string;
|
|
13
|
+
}
|
|
@@ -2,5 +2,6 @@ export type { ContactsCreateRequest } from "./ContactsCreateRequest.js";
|
|
|
2
2
|
export type { ContactsDeleteRequest } from "./ContactsDeleteRequest.js";
|
|
3
3
|
export type { ContactsGetRequest } from "./ContactsGetRequest.js";
|
|
4
4
|
export type { ContactsListRequest } from "./ContactsListRequest.js";
|
|
5
|
+
export type { ContactsMergeRequest } from "./ContactsMergeRequest.js";
|
|
5
6
|
export type { ContactsSearchRequest } from "./ContactsSearchRequest.js";
|
|
6
7
|
export type { ContactsUpdateRequest } from "./ContactsUpdateRequest.js";
|
|
@@ -49,5 +49,6 @@ export * as ticketForms from "./ticketForms/index.js";
|
|
|
49
49
|
export * from "./trainingData/client/requests/index.js";
|
|
50
50
|
export * as trainingData from "./trainingData/index.js";
|
|
51
51
|
export * as userRoles from "./userRoles/index.js";
|
|
52
|
+
export * as userStatuses from "./userStatuses/index.js";
|
|
52
53
|
export * from "./users/client/requests/index.js";
|
|
53
54
|
export * as users from "./users/index.js";
|
|
@@ -49,5 +49,6 @@ export * as ticketForms from "./ticketForms/index.js";
|
|
|
49
49
|
export * from "./trainingData/client/requests/index.js";
|
|
50
50
|
export * as trainingData from "./trainingData/index.js";
|
|
51
51
|
export * as userRoles from "./userRoles/index.js";
|
|
52
|
+
export * as userStatuses from "./userStatuses/index.js";
|
|
52
53
|
export * from "./users/client/requests/index.js";
|
|
53
54
|
export * as users from "./users/index.js";
|
|
@@ -8,8 +8,14 @@
|
|
|
8
8
|
export interface IssuesCreateDraftReplyRequest {
|
|
9
9
|
/** The ID of the issue. */
|
|
10
10
|
issue_id: string;
|
|
11
|
+
/** The draft's BCC recipients. See to_emails. */
|
|
12
|
+
bcc_emails?: string[];
|
|
11
13
|
/** The draft body in HTML. */
|
|
12
14
|
body_html: string;
|
|
15
|
+
/** The draft's CC recipients. See to_emails. */
|
|
16
|
+
cc_emails?: string[];
|
|
17
|
+
/** The draft's To recipients. If any of to_emails, cc_emails, or bcc_emails is provided, the draft uses exactly those lists and an omitted list is saved empty; omit all three to use the composer's default recipients. */
|
|
18
|
+
to_emails?: string[];
|
|
13
19
|
/** The active Pylon user who should own and see the draft. Defaults to the API-token user when it is a human Pylon user; required for unlinked or service API tokens. */
|
|
14
20
|
user_id?: string;
|
|
15
21
|
}
|
|
@@ -59,6 +59,8 @@ export interface IssuesCreateRequest {
|
|
|
59
59
|
created_at?: string;
|
|
60
60
|
/** An array of custom fields to be used on this issue. */
|
|
61
61
|
custom_fields?: Pylon.CustomFieldValue[];
|
|
62
|
+
/** The ID of a custom issue source (created in the App Directory under Chat > Add Custom Chat App). Sets the issue source to the custom source's slug. Use this for channels Pylon doesn't natively support (e.g. WeChat). Cannot be combined with destination_metadata. */
|
|
63
|
+
custom_issue_source_id?: string;
|
|
62
64
|
/** Whether the issue should be visible in the customer portal. When destination is "customer_portal", this is set to true and cannot be false. */
|
|
63
65
|
customer_portal_visible?: boolean;
|
|
64
66
|
destination_metadata?: Pylon.DestinationMetadata;
|
|
@@ -4,7 +4,6 @@ import type * as Pylon from "../../../../../../index.js";
|
|
|
4
4
|
* {
|
|
5
5
|
* knowledge_base_id: "id",
|
|
6
6
|
* author_user_id: "author_user_id",
|
|
7
|
-
* body_html: "body_html",
|
|
8
7
|
* title: "title"
|
|
9
8
|
* }
|
|
10
9
|
*/
|
|
@@ -13,14 +12,18 @@ export interface KnowledgeBasesArticlesCreateRequest {
|
|
|
13
12
|
knowledge_base_id: string;
|
|
14
13
|
/** The ID of the user attributed as the author of the article. */
|
|
15
14
|
author_user_id: string;
|
|
16
|
-
/** The HTML body of the article. */
|
|
17
|
-
body_html
|
|
15
|
+
/** The HTML body of the article. Required unless body_markdown is set. */
|
|
16
|
+
body_html?: string;
|
|
17
|
+
/** The body of the article in markdown, instead of body_html. */
|
|
18
|
+
body_markdown?: string;
|
|
18
19
|
/** The ID of the collection containing the article. */
|
|
19
20
|
collection_id?: string;
|
|
20
21
|
/** Whether the article should be published. Defaults to false. */
|
|
21
22
|
is_published?: boolean;
|
|
22
23
|
/** Whether the article is accessible only via a direct link. Defaults to false. */
|
|
23
24
|
is_unlisted?: boolean;
|
|
25
|
+
/** The zero-based position among the parent's articles and subcollections. Defaults to the end. Positions beyond the end append the article. */
|
|
26
|
+
position?: number;
|
|
24
27
|
/** The slug of the article. Defaults to a slug based on the title. */
|
|
25
28
|
slug?: string;
|
|
26
29
|
/** The title of the article. */
|
|
@@ -15,6 +15,8 @@ export interface KnowledgeBasesArticlesUpdateRequest {
|
|
|
15
15
|
author_user_id?: string;
|
|
16
16
|
/** The HTML body of the article. Saved as a new draft; the published article changes only if publish_updated_body_html or is_published is true. */
|
|
17
17
|
body_html?: string;
|
|
18
|
+
/** The body of the article in markdown, instead of body_html. Saved and published the same way. */
|
|
19
|
+
body_markdown?: string;
|
|
18
20
|
/** The ID of the collection containing the article. */
|
|
19
21
|
collection_id?: string;
|
|
20
22
|
/** Whether the article should be published or unpublished. */
|
|
@@ -23,6 +25,8 @@ export interface KnowledgeBasesArticlesUpdateRequest {
|
|
|
23
25
|
is_unlisted?: boolean;
|
|
24
26
|
/** The language code of the translation to update. If not provided, the default language (original article) will be updated. */
|
|
25
27
|
language?: string;
|
|
28
|
+
/** The zero-based position among the parent's articles and subcollections. Omit to keep the current position, or append when moving to another collection. Positions beyond the end append the article. When collection_id is provided, applies within the destination collection. */
|
|
29
|
+
position?: number;
|
|
26
30
|
/** Whether to publish the updated body_html. Defaults to false, which leaves the change as a draft. */
|
|
27
31
|
publish_updated_body_html?: boolean;
|
|
28
32
|
/** IDs of article tags to assign. If provided, replaces all tags currently assigned to the article. */
|
|
@@ -11,7 +11,7 @@ export declare class ProjectsClient {
|
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<ProjectsClient.Options>;
|
|
12
12
|
constructor(options: ProjectsClient.Options);
|
|
13
13
|
/**
|
|
14
|
-
* Creates a new project for an account. Provide a name or project_template_id. A template supplies defaults; non-empty name and description_html values and supplied customer_portal_visible and owner_id values override them. Supplying either start_date or end_date replaces both template dates.
|
|
14
|
+
* Creates a new project for an account. Provide a name or project_template_id. A template supplies defaults; non-empty name and description_html values and supplied ai_instructions, customer_portal_visible, and owner_id values override them. Supplying either start_date or end_date replaces both template dates.
|
|
15
15
|
*
|
|
16
16
|
* **Rate limit:** 300 requests per minute
|
|
17
17
|
*
|
|
@@ -32,7 +32,7 @@ export class ProjectsClient {
|
|
|
32
32
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
* Creates a new project for an account. Provide a name or project_template_id. A template supplies defaults; non-empty name and description_html values and supplied customer_portal_visible and owner_id values override them. Supplying either start_date or end_date replaces both template dates.
|
|
35
|
+
* Creates a new project for an account. Provide a name or project_template_id. A template supplies defaults; non-empty name and description_html values and supplied ai_instructions, customer_portal_visible, and owner_id values override them. Supplying either start_date or end_date replaces both template dates.
|
|
36
36
|
*
|
|
37
37
|
* **Rate limit:** 300 requests per minute
|
|
38
38
|
*
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
export interface ProjectsCreateRequest {
|
|
8
8
|
/** Account ID for this project */
|
|
9
9
|
account_id: string;
|
|
10
|
+
/** Instructions the AI follows when keeping this smart project up to date. Overrides the template's instructions when provided. */
|
|
11
|
+
ai_instructions?: string;
|
|
10
12
|
/** Customer portal visible for this project */
|
|
11
13
|
customer_portal_visible?: boolean;
|
|
12
14
|
/** Description HTML for this project */
|
|
@@ -17,7 +19,7 @@ export interface ProjectsCreateRequest {
|
|
|
17
19
|
name?: string;
|
|
18
20
|
/** Owner ID for this project */
|
|
19
21
|
owner_id?: string;
|
|
20
|
-
/** Project template ID for this project. When provided, it supplies defaults; non-empty name and description_html values and supplied customer_portal_visible and owner_id values override them. Supplying either start_date or end_date replaces both template dates. */
|
|
22
|
+
/** Project template ID for this project. When provided, it supplies defaults; non-empty name and description_html values and supplied ai_instructions, customer_portal_visible, and owner_id values override them. Supplying either start_date or end_date replaces both template dates. */
|
|
21
23
|
project_template_id?: string;
|
|
22
24
|
/** Start date for this project, in RFC 3339 format */
|
|
23
25
|
start_date?: string;
|
|
@@ -8,6 +8,8 @@ import type * as Pylon from "../../../../index.js";
|
|
|
8
8
|
export interface ProjectsUpdateRequest {
|
|
9
9
|
/** The ID of the project to update. */
|
|
10
10
|
id: string;
|
|
11
|
+
/** Instructions the AI follows when keeping this smart project up to date. Set to an empty string to clear them. */
|
|
12
|
+
ai_instructions?: string;
|
|
11
13
|
/** An array of custom fields to be used on this project. Only passed in fields will be modified. */
|
|
12
14
|
custom_fields?: Pylon.CustomFieldValue[];
|
|
13
15
|
/** Customer portal visible for this project */
|
|
@@ -8,8 +8,12 @@ import type * as Pylon from "../../../../index.js";
|
|
|
8
8
|
export interface TasksCreateRequest {
|
|
9
9
|
/** Account ID for this task */
|
|
10
10
|
account_id?: string;
|
|
11
|
+
/** Instructions the AI follows when evaluating this task in a smart project */
|
|
12
|
+
ai_instructions?: string;
|
|
11
13
|
/** Assignee ID for this task */
|
|
12
14
|
assignee_id?: string;
|
|
15
|
+
/** IDs of existing tasks that block this task */
|
|
16
|
+
blocked_by_task_ids?: string[];
|
|
13
17
|
/** Body HTML for this task */
|
|
14
18
|
body_html?: string;
|
|
15
19
|
/** An array of custom fields to be used on this task. */
|
|
@@ -8,8 +8,12 @@ import type * as Pylon from "../../../../index.js";
|
|
|
8
8
|
export interface TasksUpdateRequest {
|
|
9
9
|
/** The ID of the task to update. */
|
|
10
10
|
id: string;
|
|
11
|
+
/** Instructions the AI follows when evaluating this task in a smart project. Set to an empty string to clear them. */
|
|
12
|
+
ai_instructions?: string;
|
|
11
13
|
/** Assignee ID for this task */
|
|
12
14
|
assignee_id?: string;
|
|
15
|
+
/** IDs of the tasks that block this task. If provided, replaces the task's current blocking tasks; pass an empty array to remove them all. */
|
|
16
|
+
blocked_by_task_ids?: string[];
|
|
13
17
|
/** Body HTML for this task */
|
|
14
18
|
body_html?: string;
|
|
15
19
|
/** Completed at time for this task, in RFC 3339 format. The task must already have a completed status and completion date. */
|
|
@@ -0,0 +1,33 @@
|
|
|
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 UserStatusesClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class UserStatusesClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<UserStatusesClient.Options>;
|
|
12
|
+
constructor(options: UserStatusesClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Returns the built-in and custom user statuses for the organization. Use `slug` in a team's `assignment_configuration.assignable_user_statuses`.
|
|
15
|
+
*
|
|
16
|
+
* **Rate limit:** 30 requests per minute
|
|
17
|
+
*
|
|
18
|
+
* @param {UserStatusesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
19
|
+
*
|
|
20
|
+
* @throws {@link Pylon.BadRequestError}
|
|
21
|
+
* @throws {@link Pylon.UnauthorizedError}
|
|
22
|
+
* @throws {@link Pylon.ForbiddenError}
|
|
23
|
+
* @throws {@link Pylon.TooManyRequestsError}
|
|
24
|
+
* @throws {@link Pylon.InternalServerError}
|
|
25
|
+
* @throws {@link errors.PylonError}
|
|
26
|
+
* @throws {@link errors.PylonTimeoutError}
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* await client.userStatuses.list()
|
|
30
|
+
*/
|
|
31
|
+
list(requestOptions?: UserStatusesClient.RequestOptions): core.HttpResponsePromise<Pylon.GetUserStatusesResponseBody>;
|
|
32
|
+
private __list;
|
|
33
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
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 UserStatusesClient {
|
|
19
|
+
constructor(options) {
|
|
20
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Returns the built-in and custom user statuses for the organization. Use `slug` in a team's `assignment_configuration.assignable_user_statuses`.
|
|
24
|
+
*
|
|
25
|
+
* **Rate limit:** 30 requests per minute
|
|
26
|
+
*
|
|
27
|
+
* @param {UserStatusesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
|
+
*
|
|
29
|
+
* @throws {@link Pylon.BadRequestError}
|
|
30
|
+
* @throws {@link Pylon.UnauthorizedError}
|
|
31
|
+
* @throws {@link Pylon.ForbiddenError}
|
|
32
|
+
* @throws {@link Pylon.TooManyRequestsError}
|
|
33
|
+
* @throws {@link Pylon.InternalServerError}
|
|
34
|
+
* @throws {@link errors.PylonError}
|
|
35
|
+
* @throws {@link errors.PylonTimeoutError}
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* await client.userStatuses.list()
|
|
39
|
+
*/
|
|
40
|
+
list(requestOptions) {
|
|
41
|
+
return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
|
|
42
|
+
}
|
|
43
|
+
__list(requestOptions) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
46
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
47
|
+
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);
|
|
48
|
+
const _response = yield core.fetcher({
|
|
49
|
+
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, "user-statuses"),
|
|
50
|
+
method: "GET",
|
|
51
|
+
headers: _headers,
|
|
52
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
53
|
+
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,
|
|
54
|
+
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,
|
|
55
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
56
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
57
|
+
logging: this._options.logging,
|
|
58
|
+
});
|
|
59
|
+
if (_response.ok) {
|
|
60
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
61
|
+
}
|
|
62
|
+
if (_response.error.reason === "status-code") {
|
|
63
|
+
switch (_response.error.statusCode) {
|
|
64
|
+
case 400:
|
|
65
|
+
throw new Pylon.BadRequestError(_response.error.body, _response.rawResponse);
|
|
66
|
+
case 401:
|
|
67
|
+
throw new Pylon.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
68
|
+
case 403:
|
|
69
|
+
throw new Pylon.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
70
|
+
case 429:
|
|
71
|
+
throw new Pylon.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
72
|
+
case 500:
|
|
73
|
+
throw new Pylon.InternalServerError(_response.error.body, _response.rawResponse);
|
|
74
|
+
default:
|
|
75
|
+
throw new errors.PylonError({
|
|
76
|
+
statusCode: _response.error.statusCode,
|
|
77
|
+
body: _response.error.body,
|
|
78
|
+
rawResponse: _response.rawResponse,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/user-statuses");
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -9,19 +9,18 @@ export interface UsersUpdateRequest {
|
|
|
9
9
|
id: string;
|
|
10
10
|
/** The avatar URL of the user. Must be a square .png, .jpg or .jpeg. */
|
|
11
11
|
avatar_url?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the user is deactivated. Changing it requires admin permissions. Deactivating revokes the user's API tokens, removes their team
|
|
14
|
+
* schedules and skills, disconnects their calendars, and reassigns their open issues in the background. Reactivating does not
|
|
15
|
+
* restore any of these. Users provisioned through SCIM must be deactivated and reactivated in the identity provider.
|
|
16
|
+
*/
|
|
17
|
+
is_deactivated?: boolean;
|
|
12
18
|
/** The name of the user. */
|
|
13
19
|
name?: string;
|
|
20
|
+
/** The ID of the user to reassign the deactivated user's open issues to. Only valid with `is_deactivated: true`. If omitted, the issues are unassigned. */
|
|
21
|
+
reassign_open_issues_to_user_id?: string;
|
|
14
22
|
/** The role_id of the user. */
|
|
15
23
|
role_id?: string;
|
|
16
|
-
/** The new
|
|
17
|
-
status?:
|
|
18
|
-
}
|
|
19
|
-
export declare namespace UsersUpdateRequest {
|
|
20
|
-
/** The new user status for the user. Can be one of `active`, `away`, or `out_of_office`. */
|
|
21
|
-
const Status: {
|
|
22
|
-
readonly Active: "active";
|
|
23
|
-
readonly Away: "away";
|
|
24
|
-
readonly OutOfOffice: "out_of_office";
|
|
25
|
-
};
|
|
26
|
-
type Status = (typeof Status)[keyof typeof Status];
|
|
24
|
+
/** The new status for the user: `active`, `away`, `out_of_office`, or a custom status slug from GET /user-statuses. */
|
|
25
|
+
status?: string;
|
|
27
26
|
}
|
|
@@ -1,10 +1,2 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
export
|
|
3
|
-
(function (UsersUpdateRequest) {
|
|
4
|
-
/** The new user status for the user. Can be one of `active`, `away`, or `out_of_office`. */
|
|
5
|
-
UsersUpdateRequest.Status = {
|
|
6
|
-
Active: "active",
|
|
7
|
-
Away: "away",
|
|
8
|
-
OutOfOffice: "out_of_office",
|
|
9
|
-
};
|
|
10
|
-
})(UsersUpdateRequest || (UsersUpdateRequest = {}));
|
|
2
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type { UsersGetRequest } from "./UsersGetRequest.js";
|
|
2
2
|
export type { UsersListRequest } from "./UsersListRequest.js";
|
|
3
3
|
export type { UsersSearchRequest } from "./UsersSearchRequest.js";
|
|
4
|
-
export { UsersUpdateRequest } from "./UsersUpdateRequest.js";
|
|
4
|
+
export type { UsersUpdateRequest } from "./UsersUpdateRequest.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {};
|
|
@@ -21,6 +21,8 @@ export interface Account {
|
|
|
21
21
|
is_disabled: boolean;
|
|
22
22
|
/** The time of the latest customer activity. */
|
|
23
23
|
latest_customer_activity_time: string;
|
|
24
|
+
/** The time of the latest vendor activity. */
|
|
25
|
+
latest_vendor_activity_time: string;
|
|
24
26
|
/** The logo URL of the account. */
|
|
25
27
|
logo_url: string;
|
|
26
28
|
/** The name of the account. */
|
|
@@ -9,8 +9,12 @@ export interface Article {
|
|
|
9
9
|
created_at: string;
|
|
10
10
|
/** The current draft content of the article in HTML. This is the latest version, which may differ from the published version. */
|
|
11
11
|
current_draft_content_html?: string | undefined;
|
|
12
|
+
/** The current draft content of the article in markdown. This is the latest version, which may differ from the published version. */
|
|
13
|
+
current_draft_content_markdown?: string | undefined;
|
|
12
14
|
/** The current published content of the article in HTML. */
|
|
13
15
|
current_published_content_html?: string | undefined;
|
|
16
|
+
/** The current published content of the article in markdown. */
|
|
17
|
+
current_published_content_markdown?: string | undefined;
|
|
14
18
|
/** The ID of the article. */
|
|
15
19
|
id: string;
|
|
16
20
|
/** The identifier of the article */
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export interface ArticleTranslationInput {
|
|
2
|
-
/** The translated HTML body of the article. */
|
|
3
|
-
body_html
|
|
2
|
+
/** The translated HTML body of the article. Required unless body_markdown is set. */
|
|
3
|
+
body_html?: string | undefined;
|
|
4
|
+
/** The translated body of the article in markdown, instead of body_html. */
|
|
5
|
+
body_markdown?: string | undefined;
|
|
4
6
|
/** The language code of the translation, for example `fr`, `pt-br`, or `zh-cn`. See https://docs.usepylon.com/pylon-docs/knowledge-base/translations. */
|
|
5
7
|
language: string;
|
|
6
8
|
/** The translated title of the article. */
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as Pylon from "../index.js";
|
|
2
|
+
export interface EmailActivity {
|
|
3
|
+
/** The ID of the account that the activity belongs to. */
|
|
4
|
+
account_id: string;
|
|
5
|
+
/** The timestamp (RFC3339) when the thread's latest email was sent. A thread moves forward as it gets replies. */
|
|
6
|
+
happened_at: string;
|
|
7
|
+
/** The ID of the activity. */
|
|
8
|
+
id: string;
|
|
9
|
+
/** The thread's emails sent from or to an account you can read, oldest first. Emails only between teammates are omitted. */
|
|
10
|
+
messages: Pylon.EmailActivityMessage[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type * as Pylon from "../index.js";
|
|
2
|
+
export interface EmailActivityMessage {
|
|
3
|
+
/** The ID of the contact who sent the email, if the sender is a contact. */
|
|
4
|
+
contact_id?: string | undefined;
|
|
5
|
+
email_info: Pylon.EmailMessageInfo;
|
|
6
|
+
/** The ID of the email message. */
|
|
7
|
+
id: string;
|
|
8
|
+
/** The ID of the issue this email is on, if any. The issue messages endpoint also returns issue emails; match them by email_info.message_id. */
|
|
9
|
+
issue_id?: string | undefined;
|
|
10
|
+
/** The HTML body of the email. */
|
|
11
|
+
message_html: string;
|
|
12
|
+
/** The subject of the email. */
|
|
13
|
+
subject: string;
|
|
14
|
+
/** The time the email was sent. */
|
|
15
|
+
timestamp: string;
|
|
16
|
+
/** The ID of the user who sent the email, if the sender is a Pylon user. */
|
|
17
|
+
user_id?: string | undefined;
|
|
18
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as Pylon from "../index.js";
|
|
2
|
+
export interface GetEmailActivitiesResponseBody {
|
|
3
|
+
/** The data payload of the response. */
|
|
4
|
+
data: Pylon.EmailActivity[];
|
|
5
|
+
pagination?: Pylon.Pagination | undefined;
|
|
6
|
+
/** The request ID for tracking. */
|
|
7
|
+
request_id: string;
|
|
8
|
+
}
|