@usepylon/sdk 0.1.0-alpha.5 → 0.1.0-beta.2

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.
Files changed (201) hide show
  1. package/dist/cjs/BaseClient.js +1 -1
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +51 -46
  4. package/dist/cjs/api/resources/accounts/client/requests/AccountsSearchRequest.d.ts +2 -0
  5. package/dist/cjs/api/resources/contacts/client/Client.d.ts +25 -1
  6. package/dist/cjs/api/resources/contacts/client/Client.js +74 -1
  7. package/dist/cjs/api/resources/contacts/client/requests/ContactsMergeRequest.d.ts +1 -1
  8. package/dist/cjs/api/resources/contacts/client/requests/ContactsPortalInvitationRequest.d.ts +10 -0
  9. package/dist/cjs/api/resources/contacts/client/requests/ContactsPortalInvitationRequest.js +3 -0
  10. package/dist/cjs/api/resources/contacts/client/requests/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/customerPortal/client/Client.d.ts +53 -0
  12. package/dist/cjs/api/resources/customerPortal/client/Client.js +193 -0
  13. package/dist/cjs/api/resources/customerPortal/client/index.d.ts +1 -0
  14. package/dist/cjs/api/resources/customerPortal/client/index.js +17 -0
  15. package/dist/cjs/api/resources/customerPortal/client/requests/CustomerPortalUpdateSettingsRequest.d.ts +15 -0
  16. package/dist/cjs/api/resources/customerPortal/client/requests/CustomerPortalUpdateSettingsRequest.js +3 -0
  17. package/dist/cjs/api/resources/customerPortal/client/requests/index.d.ts +1 -0
  18. package/dist/cjs/api/resources/customerPortal/client/requests/index.js +2 -0
  19. package/dist/cjs/api/resources/customerPortal/exports.d.ts +2 -0
  20. package/dist/cjs/api/resources/customerPortal/exports.js +21 -0
  21. package/dist/cjs/api/resources/customerPortal/index.d.ts +1 -0
  22. package/dist/cjs/api/resources/customerPortal/index.js +17 -0
  23. package/dist/cjs/api/resources/index.d.ts +2 -0
  24. package/dist/cjs/api/resources/index.js +3 -1
  25. package/dist/cjs/api/resources/issues/client/Client.d.ts +11 -0
  26. package/dist/cjs/api/resources/issues/client/Client.js +11 -0
  27. package/dist/cjs/api/resources/issues/client/requests/IssuesCreateRequest.d.ts +11 -0
  28. package/dist/cjs/api/resources/issues/client/requests/IssuesSearchRequest.d.ts +2 -0
  29. package/dist/cjs/api/resources/issues/resources/voiceCalls/client/Client.d.ts +1 -1
  30. package/dist/cjs/api/resources/issues/resources/voiceCalls/client/Client.js +1 -1
  31. package/dist/cjs/api/resources/teams/client/Client.d.ts +26 -0
  32. package/dist/cjs/api/resources/teams/client/Client.js +72 -0
  33. package/dist/cjs/api/resources/teams/client/requests/TeamsDeleteRequest.d.ts +10 -0
  34. package/dist/cjs/api/resources/teams/client/requests/TeamsDeleteRequest.js +3 -0
  35. package/dist/cjs/api/resources/teams/client/requests/index.d.ts +1 -0
  36. package/dist/cjs/api/resources/users/client/Client.d.ts +25 -0
  37. package/dist/cjs/api/resources/users/client/Client.js +71 -0
  38. package/dist/cjs/api/resources/users/client/requests/UsersInviteRequest.d.ts +15 -0
  39. package/dist/cjs/api/resources/users/client/requests/UsersInviteRequest.js +3 -0
  40. package/dist/cjs/api/resources/users/client/requests/index.d.ts +1 -0
  41. package/dist/cjs/api/types/ArticleVisibilityConfig.d.ts +5 -0
  42. package/dist/cjs/api/types/CustomerPortalAccessSettings.d.ts +16 -0
  43. package/dist/cjs/api/types/CustomerPortalAccessSettings.js +3 -0
  44. package/dist/cjs/api/types/CustomerPortalBranding.d.ts +14 -0
  45. package/dist/cjs/api/types/CustomerPortalBranding.js +3 -0
  46. package/dist/cjs/api/types/CustomerPortalDisplaySettings.d.ts +8 -0
  47. package/dist/cjs/api/types/CustomerPortalDisplaySettings.js +3 -0
  48. package/dist/cjs/api/types/CustomerPortalFooterCategory.d.ts +7 -0
  49. package/dist/cjs/api/types/CustomerPortalFooterCategory.js +3 -0
  50. package/dist/cjs/api/types/CustomerPortalInvitationResult.d.ts +4 -0
  51. package/dist/cjs/api/types/CustomerPortalInvitationResult.js +3 -0
  52. package/dist/cjs/api/types/CustomerPortalLink.d.ts +6 -0
  53. package/dist/cjs/api/types/CustomerPortalLink.js +3 -0
  54. package/dist/cjs/api/types/CustomerPortalNavigation.d.ts +7 -0
  55. package/dist/cjs/api/types/CustomerPortalNavigation.js +3 -0
  56. package/dist/cjs/api/types/CustomerPortalSettings.d.ts +11 -0
  57. package/dist/cjs/api/types/CustomerPortalSettings.js +3 -0
  58. package/dist/cjs/api/types/CustomerPortalTabs.d.ts +8 -0
  59. package/dist/cjs/api/types/CustomerPortalTabs.js +3 -0
  60. package/dist/cjs/api/types/CustomerPortalUserPermissions.d.ts +8 -0
  61. package/dist/cjs/api/types/CustomerPortalUserPermissions.js +3 -0
  62. package/dist/cjs/api/types/DeleteTeamResponseBody.d.ts +4 -0
  63. package/dist/cjs/api/types/DeleteTeamResponseBody.js +3 -0
  64. package/dist/cjs/api/types/DestinationMetadata.d.ts +2 -0
  65. package/dist/cjs/api/types/ErrorApiResponseBody.d.ts +7 -1
  66. package/dist/cjs/api/types/ExternalIssue.d.ts +8 -0
  67. package/dist/cjs/api/types/Filter.d.ts +17 -7
  68. package/dist/cjs/api/types/Filter.js +6 -1
  69. package/dist/cjs/api/types/FilterError.d.ts +26 -0
  70. package/dist/cjs/api/types/FilterError.js +3 -0
  71. package/dist/cjs/api/types/FilterRelatedObject.d.ts +14 -0
  72. package/dist/cjs/api/types/FilterRelatedObject.js +3 -0
  73. package/dist/cjs/api/types/GetCustomerPortalSettingsResponseBody.d.ts +6 -0
  74. package/dist/cjs/api/types/GetCustomerPortalSettingsResponseBody.js +3 -0
  75. package/dist/cjs/api/types/IssueThread.d.ts +6 -0
  76. package/dist/cjs/api/types/SearchAccountsSort.d.ts +23 -0
  77. package/dist/cjs/api/types/SearchAccountsSort.js +20 -0
  78. package/dist/cjs/api/types/SearchIssuesSort.d.ts +23 -0
  79. package/dist/cjs/api/types/SearchIssuesSort.js +20 -0
  80. package/dist/cjs/api/types/SendCustomerPortalInvitationResponseBody.d.ts +6 -0
  81. package/dist/cjs/api/types/SendCustomerPortalInvitationResponseBody.js +3 -0
  82. package/dist/cjs/api/types/Task.d.ts +2 -0
  83. package/dist/cjs/api/types/TicketFormLayoutField.d.ts +11 -1
  84. package/dist/cjs/api/types/UpdateCustomerPortalAccessSettings.d.ts +16 -0
  85. package/dist/cjs/api/types/UpdateCustomerPortalAccessSettings.js +3 -0
  86. package/dist/cjs/api/types/UpdateCustomerPortalBranding.d.ts +14 -0
  87. package/dist/cjs/api/types/UpdateCustomerPortalBranding.js +3 -0
  88. package/dist/cjs/api/types/UpdateCustomerPortalDisplaySettings.d.ts +8 -0
  89. package/dist/cjs/api/types/UpdateCustomerPortalDisplaySettings.js +3 -0
  90. package/dist/cjs/api/types/UpdateCustomerPortalNavigation.d.ts +7 -0
  91. package/dist/cjs/api/types/UpdateCustomerPortalNavigation.js +3 -0
  92. package/dist/cjs/api/types/UpdateCustomerPortalTabs.d.ts +8 -0
  93. package/dist/cjs/api/types/UpdateCustomerPortalTabs.js +3 -0
  94. package/dist/cjs/api/types/UpdateCustomerPortalUserPermissions.d.ts +8 -0
  95. package/dist/cjs/api/types/UpdateCustomerPortalUserPermissions.js +3 -0
  96. package/dist/cjs/api/types/VoiceCall.d.ts +2 -0
  97. package/dist/cjs/api/types/VoiceCallParticipant.d.ts +20 -0
  98. package/dist/cjs/api/types/VoiceCallParticipant.js +3 -0
  99. package/dist/cjs/api/types/index.d.ts +24 -0
  100. package/dist/cjs/api/types/index.js +24 -0
  101. package/dist/esm/BaseClient.js +1 -1
  102. package/dist/esm/Client.d.ts +3 -0
  103. package/dist/esm/Client.js +5 -0
  104. package/dist/esm/api/resources/accounts/client/requests/AccountsSearchRequest.d.ts +2 -0
  105. package/dist/esm/api/resources/contacts/client/Client.d.ts +25 -1
  106. package/dist/esm/api/resources/contacts/client/Client.js +74 -1
  107. package/dist/esm/api/resources/contacts/client/requests/ContactsMergeRequest.d.ts +1 -1
  108. package/dist/esm/api/resources/contacts/client/requests/ContactsPortalInvitationRequest.d.ts +10 -0
  109. package/dist/esm/api/resources/contacts/client/requests/ContactsPortalInvitationRequest.js +2 -0
  110. package/dist/esm/api/resources/contacts/client/requests/index.d.ts +1 -0
  111. package/dist/esm/api/resources/customerPortal/client/Client.d.ts +53 -0
  112. package/dist/esm/api/resources/customerPortal/client/Client.js +156 -0
  113. package/dist/esm/api/resources/customerPortal/client/index.d.ts +1 -0
  114. package/dist/esm/api/resources/customerPortal/client/index.js +1 -0
  115. package/dist/esm/api/resources/customerPortal/client/requests/CustomerPortalUpdateSettingsRequest.d.ts +15 -0
  116. package/dist/esm/api/resources/customerPortal/client/requests/CustomerPortalUpdateSettingsRequest.js +2 -0
  117. package/dist/esm/api/resources/customerPortal/client/requests/index.d.ts +1 -0
  118. package/dist/esm/api/resources/customerPortal/client/requests/index.js +1 -0
  119. package/dist/esm/api/resources/customerPortal/exports.d.ts +2 -0
  120. package/dist/esm/api/resources/customerPortal/exports.js +3 -0
  121. package/dist/esm/api/resources/customerPortal/index.d.ts +1 -0
  122. package/dist/esm/api/resources/customerPortal/index.js +1 -0
  123. package/dist/esm/api/resources/index.d.ts +2 -0
  124. package/dist/esm/api/resources/index.js +2 -0
  125. package/dist/esm/api/resources/issues/client/Client.d.ts +11 -0
  126. package/dist/esm/api/resources/issues/client/Client.js +11 -0
  127. package/dist/esm/api/resources/issues/client/requests/IssuesCreateRequest.d.ts +11 -0
  128. package/dist/esm/api/resources/issues/client/requests/IssuesSearchRequest.d.ts +2 -0
  129. package/dist/esm/api/resources/issues/resources/voiceCalls/client/Client.d.ts +1 -1
  130. package/dist/esm/api/resources/issues/resources/voiceCalls/client/Client.js +1 -1
  131. package/dist/esm/api/resources/teams/client/Client.d.ts +26 -0
  132. package/dist/esm/api/resources/teams/client/Client.js +72 -0
  133. package/dist/esm/api/resources/teams/client/requests/TeamsDeleteRequest.d.ts +10 -0
  134. package/dist/esm/api/resources/teams/client/requests/TeamsDeleteRequest.js +2 -0
  135. package/dist/esm/api/resources/teams/client/requests/index.d.ts +1 -0
  136. package/dist/esm/api/resources/users/client/Client.d.ts +25 -0
  137. package/dist/esm/api/resources/users/client/Client.js +71 -0
  138. package/dist/esm/api/resources/users/client/requests/UsersInviteRequest.d.ts +15 -0
  139. package/dist/esm/api/resources/users/client/requests/UsersInviteRequest.js +2 -0
  140. package/dist/esm/api/resources/users/client/requests/index.d.ts +1 -0
  141. package/dist/esm/api/types/ArticleVisibilityConfig.d.ts +5 -0
  142. package/dist/esm/api/types/CustomerPortalAccessSettings.d.ts +16 -0
  143. package/dist/esm/api/types/CustomerPortalAccessSettings.js +2 -0
  144. package/dist/esm/api/types/CustomerPortalBranding.d.ts +14 -0
  145. package/dist/esm/api/types/CustomerPortalBranding.js +2 -0
  146. package/dist/esm/api/types/CustomerPortalDisplaySettings.d.ts +8 -0
  147. package/dist/esm/api/types/CustomerPortalDisplaySettings.js +2 -0
  148. package/dist/esm/api/types/CustomerPortalFooterCategory.d.ts +7 -0
  149. package/dist/esm/api/types/CustomerPortalFooterCategory.js +2 -0
  150. package/dist/esm/api/types/CustomerPortalInvitationResult.d.ts +4 -0
  151. package/dist/esm/api/types/CustomerPortalInvitationResult.js +2 -0
  152. package/dist/esm/api/types/CustomerPortalLink.d.ts +6 -0
  153. package/dist/esm/api/types/CustomerPortalLink.js +2 -0
  154. package/dist/esm/api/types/CustomerPortalNavigation.d.ts +7 -0
  155. package/dist/esm/api/types/CustomerPortalNavigation.js +2 -0
  156. package/dist/esm/api/types/CustomerPortalSettings.d.ts +11 -0
  157. package/dist/esm/api/types/CustomerPortalSettings.js +2 -0
  158. package/dist/esm/api/types/CustomerPortalTabs.d.ts +8 -0
  159. package/dist/esm/api/types/CustomerPortalTabs.js +2 -0
  160. package/dist/esm/api/types/CustomerPortalUserPermissions.d.ts +8 -0
  161. package/dist/esm/api/types/CustomerPortalUserPermissions.js +2 -0
  162. package/dist/esm/api/types/DeleteTeamResponseBody.d.ts +4 -0
  163. package/dist/esm/api/types/DeleteTeamResponseBody.js +2 -0
  164. package/dist/esm/api/types/DestinationMetadata.d.ts +2 -0
  165. package/dist/esm/api/types/ErrorApiResponseBody.d.ts +7 -1
  166. package/dist/esm/api/types/ExternalIssue.d.ts +8 -0
  167. package/dist/esm/api/types/Filter.d.ts +17 -7
  168. package/dist/esm/api/types/Filter.js +6 -1
  169. package/dist/esm/api/types/FilterError.d.ts +26 -0
  170. package/dist/esm/api/types/FilterError.js +2 -0
  171. package/dist/esm/api/types/FilterRelatedObject.d.ts +14 -0
  172. package/dist/esm/api/types/FilterRelatedObject.js +2 -0
  173. package/dist/esm/api/types/GetCustomerPortalSettingsResponseBody.d.ts +6 -0
  174. package/dist/esm/api/types/GetCustomerPortalSettingsResponseBody.js +2 -0
  175. package/dist/esm/api/types/IssueThread.d.ts +6 -0
  176. package/dist/esm/api/types/SearchAccountsSort.d.ts +23 -0
  177. package/dist/esm/api/types/SearchAccountsSort.js +17 -0
  178. package/dist/esm/api/types/SearchIssuesSort.d.ts +23 -0
  179. package/dist/esm/api/types/SearchIssuesSort.js +17 -0
  180. package/dist/esm/api/types/SendCustomerPortalInvitationResponseBody.d.ts +6 -0
  181. package/dist/esm/api/types/SendCustomerPortalInvitationResponseBody.js +2 -0
  182. package/dist/esm/api/types/Task.d.ts +2 -0
  183. package/dist/esm/api/types/TicketFormLayoutField.d.ts +11 -1
  184. package/dist/esm/api/types/UpdateCustomerPortalAccessSettings.d.ts +16 -0
  185. package/dist/esm/api/types/UpdateCustomerPortalAccessSettings.js +2 -0
  186. package/dist/esm/api/types/UpdateCustomerPortalBranding.d.ts +14 -0
  187. package/dist/esm/api/types/UpdateCustomerPortalBranding.js +2 -0
  188. package/dist/esm/api/types/UpdateCustomerPortalDisplaySettings.d.ts +8 -0
  189. package/dist/esm/api/types/UpdateCustomerPortalDisplaySettings.js +2 -0
  190. package/dist/esm/api/types/UpdateCustomerPortalNavigation.d.ts +7 -0
  191. package/dist/esm/api/types/UpdateCustomerPortalNavigation.js +2 -0
  192. package/dist/esm/api/types/UpdateCustomerPortalTabs.d.ts +8 -0
  193. package/dist/esm/api/types/UpdateCustomerPortalTabs.js +2 -0
  194. package/dist/esm/api/types/UpdateCustomerPortalUserPermissions.d.ts +8 -0
  195. package/dist/esm/api/types/UpdateCustomerPortalUserPermissions.js +2 -0
  196. package/dist/esm/api/types/VoiceCall.d.ts +2 -0
  197. package/dist/esm/api/types/VoiceCallParticipant.d.ts +20 -0
  198. package/dist/esm/api/types/VoiceCallParticipant.js +2 -0
  199. package/dist/esm/api/types/index.d.ts +24 -0
  200. package/dist/esm/api/types/index.js +24 -0
  201. package/package.json +1 -1
@@ -31,6 +31,17 @@ import type * as Pylon from "../../../../index.js";
31
31
  *
32
32
  * @example
33
33
  * {
34
+ * account_id: "acc_123",
35
+ * body_html: "<p>We are scheduling maintenance for this weekend.</p>",
36
+ * destination_metadata: {
37
+ * destination: "slack",
38
+ * slack_channel_id: "C0123456789"
39
+ * },
40
+ * title: "Maintenance window"
41
+ * }
42
+ *
43
+ * @example
44
+ * {
34
45
  * body_html: "<p>Your order is ready.</p>",
35
46
  * destination_metadata: {
36
47
  * destination: "whatsapp",
@@ -17,4 +17,6 @@ export interface IssuesSearchRequest {
17
17
  limit?: number;
18
18
  /** Fuzzy text search. Results are intersected with any provided filter. */
19
19
  search_text?: string;
20
+ /** The order of results, as a list of sort keys. Only one sort key is supported right now. Omit for the default order. Send the same sort with every page of a cursor. */
21
+ sort?: Pylon.SearchIssuesSort[];
20
22
  }
@@ -11,7 +11,7 @@ export declare class VoiceCallsClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<VoiceCallsClient.Options>;
12
12
  constructor(options: VoiceCallsClient.Options);
13
13
  /**
14
- * Returns voice call records for the specified phone issue. Each call includes its recordings, with parsed transcript segments and a presigned download URL for the audio file. Recordings whose transcript has not yet completed are omitted; refetch later to see them.
14
+ * Returns voice call records for the specified phone issue. Each call includes its participants and its recordings, with parsed transcript segments and a presigned download URL for the audio file. Recordings whose transcript has not yet completed are omitted; refetch later to see them.
15
15
  *
16
16
  * **Rate limit:** 120 requests per minute
17
17
  *
@@ -20,7 +20,7 @@ export class VoiceCallsClient {
20
20
  this._options = normalizeClientOptionsWithAuth(options);
21
21
  }
22
22
  /**
23
- * Returns voice call records for the specified phone issue. Each call includes its recordings, with parsed transcript segments and a presigned download URL for the audio file. Recordings whose transcript has not yet completed are omitted; refetch later to see them.
23
+ * Returns voice call records for the specified phone issue. Each call includes its participants and its recordings, with parsed transcript segments and a presigned download URL for the audio file. Recordings whose transcript has not yet completed are omitted; refetch later to see them.
24
24
  *
25
25
  * **Rate limit:** 120 requests per minute
26
26
  *
@@ -82,6 +82,32 @@ export declare class TeamsClient {
82
82
  */
83
83
  get(request: Pylon.TeamsGetRequest, requestOptions?: TeamsClient.RequestOptions): core.HttpResponsePromise<Pylon.GetTeamResponseBody>;
84
84
  private __get;
85
+ /**
86
+ * Delete an existing team
87
+ * Deletes a team and its memberships and schedules. Subteams are detached and remain available.
88
+ * Teams referenced by other configuration or owning internal accounts cannot be deleted until those references are removed.
89
+ *
90
+ * **Rate limit:** 30 requests per minute
91
+ *
92
+ * @param {Pylon.TeamsDeleteRequest} request
93
+ * @param {TeamsClient.RequestOptions} requestOptions - Request-specific configuration.
94
+ *
95
+ * @throws {@link Pylon.BadRequestError}
96
+ * @throws {@link Pylon.UnauthorizedError}
97
+ * @throws {@link Pylon.ForbiddenError}
98
+ * @throws {@link Pylon.NotFoundError}
99
+ * @throws {@link Pylon.TooManyRequestsError}
100
+ * @throws {@link Pylon.InternalServerError}
101
+ * @throws {@link errors.PylonError}
102
+ * @throws {@link errors.PylonTimeoutError}
103
+ *
104
+ * @example
105
+ * await client.teams.delete({
106
+ * id: "id"
107
+ * })
108
+ */
109
+ delete(request: Pylon.TeamsDeleteRequest, requestOptions?: TeamsClient.RequestOptions): core.HttpResponsePromise<Pylon.DeleteTeamResponseBody>;
110
+ private __delete;
85
111
  /**
86
112
  * Updates an existing team, including how it assigns issues and its recurring assignment
87
113
  * schedule. Only provided fields are modified; supplying schedule.blocks replaces the whole
@@ -242,6 +242,78 @@ export class TeamsClient {
242
242
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/teams/{id}");
243
243
  });
244
244
  }
245
+ /**
246
+ * Delete an existing team
247
+ * Deletes a team and its memberships and schedules. Subteams are detached and remain available.
248
+ * Teams referenced by other configuration or owning internal accounts cannot be deleted until those references are removed.
249
+ *
250
+ * **Rate limit:** 30 requests per minute
251
+ *
252
+ * @param {Pylon.TeamsDeleteRequest} request
253
+ * @param {TeamsClient.RequestOptions} requestOptions - Request-specific configuration.
254
+ *
255
+ * @throws {@link Pylon.BadRequestError}
256
+ * @throws {@link Pylon.UnauthorizedError}
257
+ * @throws {@link Pylon.ForbiddenError}
258
+ * @throws {@link Pylon.NotFoundError}
259
+ * @throws {@link Pylon.TooManyRequestsError}
260
+ * @throws {@link Pylon.InternalServerError}
261
+ * @throws {@link errors.PylonError}
262
+ * @throws {@link errors.PylonTimeoutError}
263
+ *
264
+ * @example
265
+ * await client.teams.delete({
266
+ * id: "id"
267
+ * })
268
+ */
269
+ delete(request, requestOptions) {
270
+ return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));
271
+ }
272
+ __delete(request, requestOptions) {
273
+ return __awaiter(this, void 0, void 0, function* () {
274
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
275
+ const { id } = request;
276
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
277
+ 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);
278
+ const _response = yield core.fetcher({
279
+ 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, `teams/${core.url.encodePathParam(id)}`),
280
+ method: "DELETE",
281
+ headers: _headers,
282
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
283
+ 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,
284
+ 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,
285
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
286
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
287
+ logging: this._options.logging,
288
+ });
289
+ if (_response.ok) {
290
+ return { data: _response.body, rawResponse: _response.rawResponse };
291
+ }
292
+ if (_response.error.reason === "status-code") {
293
+ switch (_response.error.statusCode) {
294
+ case 400:
295
+ throw new Pylon.BadRequestError(_response.error.body, _response.rawResponse);
296
+ case 401:
297
+ throw new Pylon.UnauthorizedError(_response.error.body, _response.rawResponse);
298
+ case 403:
299
+ throw new Pylon.ForbiddenError(_response.error.body, _response.rawResponse);
300
+ case 404:
301
+ throw new Pylon.NotFoundError(_response.error.body, _response.rawResponse);
302
+ case 429:
303
+ throw new Pylon.TooManyRequestsError(_response.error.body, _response.rawResponse);
304
+ case 500:
305
+ throw new Pylon.InternalServerError(_response.error.body, _response.rawResponse);
306
+ default:
307
+ throw new errors.PylonError({
308
+ statusCode: _response.error.statusCode,
309
+ body: _response.error.body,
310
+ rawResponse: _response.rawResponse,
311
+ });
312
+ }
313
+ }
314
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/teams/{id}");
315
+ });
316
+ }
245
317
  /**
246
318
  * Updates an existing team, including how it assigns issues and its recurring assignment
247
319
  * schedule. Only provided fields are modified; supplying schedule.blocks replaces the whole
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * id: "id"
5
+ * }
6
+ */
7
+ export interface TeamsDeleteRequest {
8
+ /** The ID of the team to delete. */
9
+ id: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,3 +1,4 @@
1
1
  export type { TeamsCreateRequest } from "./TeamsCreateRequest.js";
2
+ export type { TeamsDeleteRequest } from "./TeamsDeleteRequest.js";
2
3
  export type { TeamsGetRequest } from "./TeamsGetRequest.js";
3
4
  export type { TeamsUpdateRequest } from "./TeamsUpdateRequest.js";
@@ -32,6 +32,31 @@ export declare class UsersClient {
32
32
  */
33
33
  list(request?: Pylon.UsersListRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<Pylon.GetUsersResponseBody>;
34
34
  private __list;
35
+ /**
36
+ * Creates a user and emails them an invitation to join the organization. If a user with this email already exists,
37
+ * they are reactivated if needed and sent a new invitation, and any pending invitation is canceled. Requires admin permissions.
38
+ *
39
+ * **Rate limit:** 30 requests per minute
40
+ *
41
+ * @param {Pylon.UsersInviteRequest} request
42
+ * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
43
+ *
44
+ * @throws {@link Pylon.BadRequestError}
45
+ * @throws {@link Pylon.UnauthorizedError}
46
+ * @throws {@link Pylon.ForbiddenError}
47
+ * @throws {@link Pylon.TooManyRequestsError}
48
+ * @throws {@link Pylon.InternalServerError}
49
+ * @throws {@link errors.PylonError}
50
+ * @throws {@link errors.PylonTimeoutError}
51
+ *
52
+ * @example
53
+ * await client.users.invite({
54
+ * email: "jane@example.com",
55
+ * name: "name"
56
+ * })
57
+ */
58
+ invite(request: Pylon.UsersInviteRequest, requestOptions?: UsersClient.RequestOptions): core.HttpResponsePromise<Pylon.GetUserResponseBody>;
59
+ private __invite;
35
60
  /**
36
61
  * Filterable fields and their allowed operators:
37
62
  *
@@ -106,6 +106,77 @@ export class UsersClient {
106
106
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/users");
107
107
  });
108
108
  }
109
+ /**
110
+ * Creates a user and emails them an invitation to join the organization. If a user with this email already exists,
111
+ * they are reactivated if needed and sent a new invitation, and any pending invitation is canceled. Requires admin permissions.
112
+ *
113
+ * **Rate limit:** 30 requests per minute
114
+ *
115
+ * @param {Pylon.UsersInviteRequest} request
116
+ * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
117
+ *
118
+ * @throws {@link Pylon.BadRequestError}
119
+ * @throws {@link Pylon.UnauthorizedError}
120
+ * @throws {@link Pylon.ForbiddenError}
121
+ * @throws {@link Pylon.TooManyRequestsError}
122
+ * @throws {@link Pylon.InternalServerError}
123
+ * @throws {@link errors.PylonError}
124
+ * @throws {@link errors.PylonTimeoutError}
125
+ *
126
+ * @example
127
+ * await client.users.invite({
128
+ * email: "jane@example.com",
129
+ * name: "name"
130
+ * })
131
+ */
132
+ invite(request, requestOptions) {
133
+ return core.HttpResponsePromise.fromPromise(this.__invite(request, requestOptions));
134
+ }
135
+ __invite(request, requestOptions) {
136
+ return __awaiter(this, void 0, void 0, function* () {
137
+ var _a, _b, _c, _d, _e, _f, _g;
138
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
139
+ 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);
140
+ const _response = yield core.fetcher({
141
+ 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, "users/invite"),
142
+ method: "POST",
143
+ headers: _headers,
144
+ contentType: "application/json",
145
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
146
+ requestType: "json",
147
+ body: mergeAdditionalBodyParameters(request, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
148
+ 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,
149
+ maxRetries: 0,
150
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
151
+ fetchFn: (_g = this._options) === null || _g === void 0 ? void 0 : _g.fetch,
152
+ logging: this._options.logging,
153
+ });
154
+ if (_response.ok) {
155
+ return { data: _response.body, rawResponse: _response.rawResponse };
156
+ }
157
+ if (_response.error.reason === "status-code") {
158
+ switch (_response.error.statusCode) {
159
+ case 400:
160
+ throw new Pylon.BadRequestError(_response.error.body, _response.rawResponse);
161
+ case 401:
162
+ throw new Pylon.UnauthorizedError(_response.error.body, _response.rawResponse);
163
+ case 403:
164
+ throw new Pylon.ForbiddenError(_response.error.body, _response.rawResponse);
165
+ case 429:
166
+ throw new Pylon.TooManyRequestsError(_response.error.body, _response.rawResponse);
167
+ case 500:
168
+ throw new Pylon.InternalServerError(_response.error.body, _response.rawResponse);
169
+ default:
170
+ throw new errors.PylonError({
171
+ statusCode: _response.error.statusCode,
172
+ body: _response.error.body,
173
+ rawResponse: _response.rawResponse,
174
+ });
175
+ }
176
+ }
177
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/users/invite");
178
+ });
179
+ }
109
180
  /**
110
181
  * Filterable fields and their allowed operators:
111
182
  *
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * email: "jane@example.com",
5
+ * name: "name"
6
+ * }
7
+ */
8
+ export interface UsersInviteRequest {
9
+ /** The email address to send the invitation to. */
10
+ email: string;
11
+ /** The name of the user to invite. */
12
+ name: string;
13
+ /** The ID of the role to give the user. See GET /user-roles. Defaults to the organization's default role. */
14
+ role_id?: string;
15
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,4 +1,5 @@
1
1
  export type { UsersGetRequest } from "./UsersGetRequest.js";
2
+ export type { UsersInviteRequest } from "./UsersInviteRequest.js";
2
3
  export type { UsersListRequest } from "./UsersListRequest.js";
3
4
  export type { UsersSearchRequest } from "./UsersSearchRequest.js";
4
5
  export type { UsersUpdateRequest } from "./UsersUpdateRequest.js";
@@ -5,6 +5,11 @@ export interface ArticleVisibilityConfig {
5
5
  /** List of AI agent IDs that may access this resource when ai_agent_access is set to "specific_agents". */
6
6
  allowed_agent_ids?: string[] | undefined;
7
7
  customer_visibility_condition?: Pylon.Filter | undefined;
8
+ /**
9
+ * Read-only. True when the article's customer visibility condition cannot be expressed in the
10
+ * API filter format. The condition still applies, but customer_visibility_condition is omitted.
11
+ */
12
+ customer_visibility_condition_unsupported?: boolean | undefined;
8
13
  /** The visibility setting. */
9
14
  visibility?: ArticleVisibilityConfig.Visibility | undefined;
10
15
  }
@@ -0,0 +1,16 @@
1
+ export interface CustomerPortalAccessSettings {
2
+ /**
3
+ * Whether new contacts get portal access with the default role when they are created. Applies only to contacts whose email
4
+ * domain matches their account; other new contacts get no access unless invited.
5
+ */
6
+ auto_grant_new_contacts: boolean;
7
+ /** Whether someone without a contact who logs in to the portal gets one created, if their email domain matches an existing account. */
8
+ create_contacts_on_login: boolean;
9
+ /**
10
+ * The portal role contacts get when they are granted access without an explicit role: `no_access`, `member`, `admin`, a custom
11
+ * role's slug, or a custom role's ID if it has no slug.
12
+ */
13
+ default_role: string;
14
+ /** Whether contacts granted access automatically are emailed a portal invitation. */
15
+ invite_auto_granted_contacts: boolean;
16
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,14 @@
1
+ export interface CustomerPortalBranding {
2
+ /** The brand color as a 6-digit hex code, such as `#1A2B3C`. Empty when unset. */
3
+ brand_color: string;
4
+ /** The footer logo URL used in dark mode. Empty when unset. */
5
+ dark_mode_footer_logo_url: string;
6
+ /** The header logo URL used in dark mode. Empty when unset. */
7
+ dark_mode_logo_url: string;
8
+ /** The footer logo URL. Empty when unset. */
9
+ footer_logo_url: string;
10
+ /** Where the header logo links to. Empty when the logo is not a link. */
11
+ logo_link_url: string;
12
+ /** The header logo URL. Empty when unset. */
13
+ logo_url: string;
14
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,8 @@
1
+ export interface CustomerPortalDisplaySettings {
2
+ /** Whether the portal shows feature request descriptions. */
3
+ feature_request_descriptions: boolean;
4
+ /** Whether portal tasks show their linked issues. */
5
+ task_linked_issues: boolean;
6
+ /** Whether portal tasks show their linked tasks. */
7
+ task_linked_tasks: boolean;
8
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,7 @@
1
+ import type * as Pylon from "../index.js";
2
+ export interface CustomerPortalFooterCategory {
3
+ /** The links in the group, in order. */
4
+ links: Pylon.CustomerPortalLink[];
5
+ /** The heading of the link group. */
6
+ title: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ export interface CustomerPortalInvitationResult {
2
+ /** Whether the invitation was accepted for sending. This does not guarantee email delivery. */
3
+ accepted: boolean;
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,6 @@
1
+ export interface CustomerPortalLink {
2
+ /** The link text. */
3
+ text: string;
4
+ /** The link URL. Must be an http or https URL. */
5
+ url: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,7 @@
1
+ import type * as Pylon from "../index.js";
2
+ export interface CustomerPortalNavigation {
3
+ /** The link groups in the portal footer, in order. */
4
+ footer_categories: Pylon.CustomerPortalFooterCategory[];
5
+ /** The links in the portal header, in order. */
6
+ header_links: Pylon.CustomerPortalLink[];
7
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,11 @@
1
+ import type * as Pylon from "../index.js";
2
+ export interface CustomerPortalSettings {
3
+ access: Pylon.CustomerPortalAccessSettings;
4
+ branding: Pylon.CustomerPortalBranding;
5
+ display: Pylon.CustomerPortalDisplaySettings;
6
+ /** Whether the customer portal is enabled. */
7
+ enabled: boolean;
8
+ navigation: Pylon.CustomerPortalNavigation;
9
+ portal_user_permissions: Pylon.CustomerPortalUserPermissions;
10
+ tabs: Pylon.CustomerPortalTabs;
11
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,8 @@
1
+ export interface CustomerPortalTabs {
2
+ /** Whether the portal shows the feature requests tab. */
3
+ feature_requests: boolean;
4
+ /** Whether the portal shows the issues tab. */
5
+ issues: boolean;
6
+ /** Whether the portal shows the projects and tasks tab. */
7
+ projects_and_tasks: boolean;
8
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,8 @@
1
+ export interface CustomerPortalUserPermissions {
2
+ /** Whether portal users can edit their own profile. */
3
+ edit_profile: boolean;
4
+ /** Whether portal users can edit the CC list on their replies. */
5
+ edit_reply_ccs: boolean;
6
+ /** Whether portal users can export their issues as CSV. */
7
+ export_issues_csv: boolean;
8
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ export interface DeleteTeamResponseBody {
2
+ /** The request ID for tracking. */
3
+ request_id: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -22,6 +22,8 @@ export interface DestinationMetadata {
22
22
  from_sms_phone_number_id?: string | undefined;
23
23
  /** The configured WhatsApp phone number to send messages from. Required if destination is "whatsapp" unless whatsapp_app_id is provided. The number is normalized and used to resolve the WhatsApp app within the organization. */
24
24
  from_whatsapp_phone_number?: string | undefined;
25
+ /** The ID of the Slack channel to start the conversation in, as returned in the account's `channels[].channel_id`. Only valid when destination is "slack". Must be a non-internal Slack channel connected to the issue's account. Defaults to the account's primary Slack channel. */
26
+ slack_channel_id?: string | undefined;
25
27
  /** The ID of the WhatsApp app to send messages from. Required if destination is "whatsapp" unless from_whatsapp_phone_number is provided. Deprecated: Use from_whatsapp_phone_number instead. */
26
28
  whatsapp_app_id?: string | undefined;
27
29
  /** The language of the WhatsApp message template to use. Required if destination is "whatsapp". */
@@ -1,15 +1,21 @@
1
+ import type * as Pylon from "../index.js";
1
2
  export interface ErrorApiResponseBody {
2
3
  /**
3
4
  * A stable machine-readable identifier for this failure, safe to branch on
4
5
  * instead of the message text. Omitted when the failure has no assigned code.
5
6
  *
6
- * Known values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`. This list is not exhaustive.
7
+ * Known values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`, `invalid_filter`. This list is not exhaustive.
7
8
  */
8
9
  code?: string | undefined;
9
10
  /** The list of errors. */
10
11
  errors?: string[] | undefined;
11
12
  /** The ID of the object that already exists if this is a duplicate object error. */
12
13
  exists_id?: string | undefined;
14
+ /**
15
+ * One entry per problem found in the request's filter. Present only when code is
16
+ * "invalid_filter"; errors carries the same messages as plain text.
17
+ */
18
+ filter_errors?: Pylon.FilterError[] | undefined;
13
19
  /** The request ID for tracking. */
14
20
  request_id: string;
15
21
  }
@@ -7,8 +7,16 @@ export interface ExternalIssue {
7
7
  * Asana: ID of the task (Long number).
8
8
  */
9
9
  external_id: string;
10
+ /** The human-readable key of the external issue, such as ENG-123 for Linear or Jira. */
11
+ key?: string | undefined;
10
12
  /** Link to the product issue. */
11
13
  link: string;
12
14
  /** The source of the external issue. */
13
15
  source: string;
16
+ /**
17
+ * Whether the external issue is open, closed (done), or canceled, as last synced from the source.
18
+ *
19
+ * Known values: `open`, `closed`, `canceled`. This list is not exhaustive.
20
+ */
21
+ state?: string | undefined;
14
22
  }
@@ -3,22 +3,27 @@ export interface Filter {
3
3
  /**
4
4
  * The field for this filter. For allowed fields, see the documentation for
5
5
  * the specific endpoint you are using.
6
- * For non-compound filters (any operators other than "and" or "or"),
6
+ * For non-compound filters (any operators other than "and", "or", or "not"),
7
7
  * field must be set, along with either value or values, depending on the operator.
8
8
  */
9
9
  field?: string | undefined;
10
- /** The operator for this filter. */
11
- operator: Filter.Operator;
10
+ /** The operator for this filter. Required unless related_object is set. */
11
+ operator?: Filter.Operator | undefined;
12
+ related_object?: Pylon.FilterRelatedObject | undefined;
12
13
  /**
13
- * Sub-filters for this filter. Valid only when operator is "and" or "or".
14
- * The maximum allowed depth for a tree of filters is 3, counting the top-level filter.
14
+ * Sub-filters for this filter. Valid only when operator is "and", "or", or "not"; "not"
15
+ * takes exactly one subfilter.
16
+ * The maximum allowed depth for a tree of filters is 5, counting the top-level filter.
15
17
  */
16
18
  subfilters?: Pylon.Filter[] | undefined;
17
19
  /**
18
20
  * The value for this filter. Used by single-valued operators: "equals", "not_equals",
19
21
  * "contains", "does_not_contain", "string_contains", "string_does_not_contain",
20
- * "starts_with", "ends_with", "time_is_after", "time_is_before", "greater_than",
22
+ * "starts_with", "ends_with", "time_is_after", "time_is_before", "time_is_in_last",
23
+ * "time_is_not_in_last", "time_is_in_next", "time_is_not_in_next", "greater_than",
21
24
  * "less_than", "greater_than_or_equals", and "less_than_or_equals".
25
+ * On fields that hold user IDs, "current_user" means the API token's user; on fields that
26
+ * hold team IDs, "my_teams" means that user's teams. The same applies to values.
22
27
  */
23
28
  value?: string | undefined;
24
29
  /**
@@ -28,7 +33,7 @@ export interface Filter {
28
33
  values?: string[] | undefined;
29
34
  }
30
35
  export declare namespace Filter {
31
- /** The operator for this filter. */
36
+ /** The operator for this filter. Required unless related_object is set. */
32
37
  const Operator: {
33
38
  readonly Equals: "equals";
34
39
  readonly NotEquals: "not_equals";
@@ -38,6 +43,7 @@ export declare namespace Filter {
38
43
  readonly NotIn: "not_in";
39
44
  readonly And: "and";
40
45
  readonly Or: "or";
46
+ readonly Not: "not";
41
47
  readonly TimeIsAfter: "time_is_after";
42
48
  readonly TimeIsBefore: "time_is_before";
43
49
  readonly TimeRange: "time_range";
@@ -52,6 +58,10 @@ export declare namespace Filter {
52
58
  readonly IncludesAllOf: "includes_all_of";
53
59
  readonly StartsWith: "starts_with";
54
60
  readonly EndsWith: "ends_with";
61
+ readonly TimeIsInLast: "time_is_in_last";
62
+ readonly TimeIsNotInLast: "time_is_not_in_last";
63
+ readonly TimeIsInNext: "time_is_in_next";
64
+ readonly TimeIsNotInNext: "time_is_not_in_next";
55
65
  };
56
66
  type Operator = (typeof Operator)[keyof typeof Operator];
57
67
  }