@usepylon/sdk 0.1.0-beta.1 → 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 (131) 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/customerPortal/client/Client.d.ts +53 -0
  5. package/dist/cjs/api/resources/customerPortal/client/Client.js +193 -0
  6. package/dist/cjs/api/resources/customerPortal/client/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/customerPortal/client/index.js +17 -0
  8. package/dist/cjs/api/resources/customerPortal/client/requests/CustomerPortalUpdateSettingsRequest.d.ts +15 -0
  9. package/dist/cjs/api/resources/customerPortal/client/requests/CustomerPortalUpdateSettingsRequest.js +3 -0
  10. package/dist/cjs/api/resources/customerPortal/client/requests/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/customerPortal/client/requests/index.js +2 -0
  12. package/dist/cjs/api/resources/customerPortal/exports.d.ts +2 -0
  13. package/dist/cjs/api/resources/customerPortal/exports.js +21 -0
  14. package/dist/cjs/api/resources/customerPortal/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/customerPortal/index.js +17 -0
  16. package/dist/cjs/api/resources/index.d.ts +2 -0
  17. package/dist/cjs/api/resources/index.js +3 -1
  18. package/dist/cjs/api/resources/users/client/Client.d.ts +25 -0
  19. package/dist/cjs/api/resources/users/client/Client.js +71 -0
  20. package/dist/cjs/api/resources/users/client/requests/UsersInviteRequest.d.ts +15 -0
  21. package/dist/cjs/api/resources/users/client/requests/UsersInviteRequest.js +3 -0
  22. package/dist/cjs/api/resources/users/client/requests/index.d.ts +1 -0
  23. package/dist/cjs/api/types/CustomerPortalAccessSettings.d.ts +16 -0
  24. package/dist/cjs/api/types/CustomerPortalAccessSettings.js +3 -0
  25. package/dist/cjs/api/types/CustomerPortalBranding.d.ts +14 -0
  26. package/dist/cjs/api/types/CustomerPortalBranding.js +3 -0
  27. package/dist/cjs/api/types/CustomerPortalDisplaySettings.d.ts +8 -0
  28. package/dist/cjs/api/types/CustomerPortalDisplaySettings.js +3 -0
  29. package/dist/cjs/api/types/CustomerPortalFooterCategory.d.ts +7 -0
  30. package/dist/cjs/api/types/CustomerPortalFooterCategory.js +3 -0
  31. package/dist/cjs/api/types/CustomerPortalLink.d.ts +6 -0
  32. package/dist/cjs/api/types/CustomerPortalLink.js +3 -0
  33. package/dist/cjs/api/types/CustomerPortalNavigation.d.ts +7 -0
  34. package/dist/cjs/api/types/CustomerPortalNavigation.js +3 -0
  35. package/dist/cjs/api/types/CustomerPortalSettings.d.ts +11 -0
  36. package/dist/cjs/api/types/CustomerPortalSettings.js +3 -0
  37. package/dist/cjs/api/types/CustomerPortalTabs.d.ts +8 -0
  38. package/dist/cjs/api/types/CustomerPortalTabs.js +3 -0
  39. package/dist/cjs/api/types/CustomerPortalUserPermissions.d.ts +8 -0
  40. package/dist/cjs/api/types/CustomerPortalUserPermissions.js +3 -0
  41. package/dist/cjs/api/types/ErrorApiResponseBody.d.ts +7 -1
  42. package/dist/cjs/api/types/Filter.d.ts +6 -3
  43. package/dist/cjs/api/types/Filter.js +1 -1
  44. package/dist/cjs/api/types/FilterError.d.ts +26 -0
  45. package/dist/cjs/api/types/FilterError.js +3 -0
  46. package/dist/cjs/api/types/FilterRelatedObject.d.ts +14 -0
  47. package/dist/cjs/api/types/FilterRelatedObject.js +3 -0
  48. package/dist/cjs/api/types/GetCustomerPortalSettingsResponseBody.d.ts +6 -0
  49. package/dist/cjs/api/types/GetCustomerPortalSettingsResponseBody.js +3 -0
  50. package/dist/cjs/api/types/IssueThread.d.ts +6 -0
  51. package/dist/cjs/api/types/TicketFormLayoutField.d.ts +9 -1
  52. package/dist/cjs/api/types/UpdateCustomerPortalAccessSettings.d.ts +16 -0
  53. package/dist/cjs/api/types/UpdateCustomerPortalAccessSettings.js +3 -0
  54. package/dist/cjs/api/types/UpdateCustomerPortalBranding.d.ts +14 -0
  55. package/dist/cjs/api/types/UpdateCustomerPortalBranding.js +3 -0
  56. package/dist/cjs/api/types/UpdateCustomerPortalDisplaySettings.d.ts +8 -0
  57. package/dist/cjs/api/types/UpdateCustomerPortalDisplaySettings.js +3 -0
  58. package/dist/cjs/api/types/UpdateCustomerPortalNavigation.d.ts +7 -0
  59. package/dist/cjs/api/types/UpdateCustomerPortalNavigation.js +3 -0
  60. package/dist/cjs/api/types/UpdateCustomerPortalTabs.d.ts +8 -0
  61. package/dist/cjs/api/types/UpdateCustomerPortalTabs.js +3 -0
  62. package/dist/cjs/api/types/UpdateCustomerPortalUserPermissions.d.ts +8 -0
  63. package/dist/cjs/api/types/UpdateCustomerPortalUserPermissions.js +3 -0
  64. package/dist/cjs/api/types/index.d.ts +18 -0
  65. package/dist/cjs/api/types/index.js +18 -0
  66. package/dist/esm/BaseClient.js +1 -1
  67. package/dist/esm/Client.d.ts +3 -0
  68. package/dist/esm/Client.js +5 -0
  69. package/dist/esm/api/resources/customerPortal/client/Client.d.ts +53 -0
  70. package/dist/esm/api/resources/customerPortal/client/Client.js +156 -0
  71. package/dist/esm/api/resources/customerPortal/client/index.d.ts +1 -0
  72. package/dist/esm/api/resources/customerPortal/client/index.js +1 -0
  73. package/dist/esm/api/resources/customerPortal/client/requests/CustomerPortalUpdateSettingsRequest.d.ts +15 -0
  74. package/dist/esm/api/resources/customerPortal/client/requests/CustomerPortalUpdateSettingsRequest.js +2 -0
  75. package/dist/esm/api/resources/customerPortal/client/requests/index.d.ts +1 -0
  76. package/dist/esm/api/resources/customerPortal/client/requests/index.js +1 -0
  77. package/dist/esm/api/resources/customerPortal/exports.d.ts +2 -0
  78. package/dist/esm/api/resources/customerPortal/exports.js +3 -0
  79. package/dist/esm/api/resources/customerPortal/index.d.ts +1 -0
  80. package/dist/esm/api/resources/customerPortal/index.js +1 -0
  81. package/dist/esm/api/resources/index.d.ts +2 -0
  82. package/dist/esm/api/resources/index.js +2 -0
  83. package/dist/esm/api/resources/users/client/Client.d.ts +25 -0
  84. package/dist/esm/api/resources/users/client/Client.js +71 -0
  85. package/dist/esm/api/resources/users/client/requests/UsersInviteRequest.d.ts +15 -0
  86. package/dist/esm/api/resources/users/client/requests/UsersInviteRequest.js +2 -0
  87. package/dist/esm/api/resources/users/client/requests/index.d.ts +1 -0
  88. package/dist/esm/api/types/CustomerPortalAccessSettings.d.ts +16 -0
  89. package/dist/esm/api/types/CustomerPortalAccessSettings.js +2 -0
  90. package/dist/esm/api/types/CustomerPortalBranding.d.ts +14 -0
  91. package/dist/esm/api/types/CustomerPortalBranding.js +2 -0
  92. package/dist/esm/api/types/CustomerPortalDisplaySettings.d.ts +8 -0
  93. package/dist/esm/api/types/CustomerPortalDisplaySettings.js +2 -0
  94. package/dist/esm/api/types/CustomerPortalFooterCategory.d.ts +7 -0
  95. package/dist/esm/api/types/CustomerPortalFooterCategory.js +2 -0
  96. package/dist/esm/api/types/CustomerPortalLink.d.ts +6 -0
  97. package/dist/esm/api/types/CustomerPortalLink.js +2 -0
  98. package/dist/esm/api/types/CustomerPortalNavigation.d.ts +7 -0
  99. package/dist/esm/api/types/CustomerPortalNavigation.js +2 -0
  100. package/dist/esm/api/types/CustomerPortalSettings.d.ts +11 -0
  101. package/dist/esm/api/types/CustomerPortalSettings.js +2 -0
  102. package/dist/esm/api/types/CustomerPortalTabs.d.ts +8 -0
  103. package/dist/esm/api/types/CustomerPortalTabs.js +2 -0
  104. package/dist/esm/api/types/CustomerPortalUserPermissions.d.ts +8 -0
  105. package/dist/esm/api/types/CustomerPortalUserPermissions.js +2 -0
  106. package/dist/esm/api/types/ErrorApiResponseBody.d.ts +7 -1
  107. package/dist/esm/api/types/Filter.d.ts +6 -3
  108. package/dist/esm/api/types/Filter.js +1 -1
  109. package/dist/esm/api/types/FilterError.d.ts +26 -0
  110. package/dist/esm/api/types/FilterError.js +2 -0
  111. package/dist/esm/api/types/FilterRelatedObject.d.ts +14 -0
  112. package/dist/esm/api/types/FilterRelatedObject.js +2 -0
  113. package/dist/esm/api/types/GetCustomerPortalSettingsResponseBody.d.ts +6 -0
  114. package/dist/esm/api/types/GetCustomerPortalSettingsResponseBody.js +2 -0
  115. package/dist/esm/api/types/IssueThread.d.ts +6 -0
  116. package/dist/esm/api/types/TicketFormLayoutField.d.ts +9 -1
  117. package/dist/esm/api/types/UpdateCustomerPortalAccessSettings.d.ts +16 -0
  118. package/dist/esm/api/types/UpdateCustomerPortalAccessSettings.js +2 -0
  119. package/dist/esm/api/types/UpdateCustomerPortalBranding.d.ts +14 -0
  120. package/dist/esm/api/types/UpdateCustomerPortalBranding.js +2 -0
  121. package/dist/esm/api/types/UpdateCustomerPortalDisplaySettings.d.ts +8 -0
  122. package/dist/esm/api/types/UpdateCustomerPortalDisplaySettings.js +2 -0
  123. package/dist/esm/api/types/UpdateCustomerPortalNavigation.d.ts +7 -0
  124. package/dist/esm/api/types/UpdateCustomerPortalNavigation.js +2 -0
  125. package/dist/esm/api/types/UpdateCustomerPortalTabs.d.ts +8 -0
  126. package/dist/esm/api/types/UpdateCustomerPortalTabs.js +2 -0
  127. package/dist/esm/api/types/UpdateCustomerPortalUserPermissions.d.ts +8 -0
  128. package/dist/esm/api/types/UpdateCustomerPortalUserPermissions.js +2 -0
  129. package/dist/esm/api/types/index.d.ts +18 -0
  130. package/dist/esm/api/types/index.js +18 -0
  131. package/package.json +1 -1
@@ -142,6 +142,77 @@ class UsersClient {
142
142
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/users");
143
143
  });
144
144
  }
145
+ /**
146
+ * Creates a user and emails them an invitation to join the organization. If a user with this email already exists,
147
+ * they are reactivated if needed and sent a new invitation, and any pending invitation is canceled. Requires admin permissions.
148
+ *
149
+ * **Rate limit:** 30 requests per minute
150
+ *
151
+ * @param {Pylon.UsersInviteRequest} request
152
+ * @param {UsersClient.RequestOptions} requestOptions - Request-specific configuration.
153
+ *
154
+ * @throws {@link Pylon.BadRequestError}
155
+ * @throws {@link Pylon.UnauthorizedError}
156
+ * @throws {@link Pylon.ForbiddenError}
157
+ * @throws {@link Pylon.TooManyRequestsError}
158
+ * @throws {@link Pylon.InternalServerError}
159
+ * @throws {@link errors.PylonError}
160
+ * @throws {@link errors.PylonTimeoutError}
161
+ *
162
+ * @example
163
+ * await client.users.invite({
164
+ * email: "jane@example.com",
165
+ * name: "name"
166
+ * })
167
+ */
168
+ invite(request, requestOptions) {
169
+ return core.HttpResponsePromise.fromPromise(this.__invite(request, requestOptions));
170
+ }
171
+ __invite(request, requestOptions) {
172
+ return __awaiter(this, void 0, void 0, function* () {
173
+ var _a, _b, _c, _d, _e, _f, _g;
174
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
175
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
176
+ const _response = yield core.fetcher({
177
+ 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"),
178
+ method: "POST",
179
+ headers: _headers,
180
+ contentType: "application/json",
181
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
182
+ requestType: "json",
183
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(request, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
184
+ 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,
185
+ maxRetries: 0,
186
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
187
+ fetchFn: (_g = this._options) === null || _g === void 0 ? void 0 : _g.fetch,
188
+ logging: this._options.logging,
189
+ });
190
+ if (_response.ok) {
191
+ return { data: _response.body, rawResponse: _response.rawResponse };
192
+ }
193
+ if (_response.error.reason === "status-code") {
194
+ switch (_response.error.statusCode) {
195
+ case 400:
196
+ throw new Pylon.BadRequestError(_response.error.body, _response.rawResponse);
197
+ case 401:
198
+ throw new Pylon.UnauthorizedError(_response.error.body, _response.rawResponse);
199
+ case 403:
200
+ throw new Pylon.ForbiddenError(_response.error.body, _response.rawResponse);
201
+ case 429:
202
+ throw new Pylon.TooManyRequestsError(_response.error.body, _response.rawResponse);
203
+ case 500:
204
+ throw new Pylon.InternalServerError(_response.error.body, _response.rawResponse);
205
+ default:
206
+ throw new errors.PylonError({
207
+ statusCode: _response.error.statusCode,
208
+ body: _response.error.body,
209
+ rawResponse: _response.rawResponse,
210
+ });
211
+ }
212
+ }
213
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/users/invite");
214
+ });
215
+ }
145
216
  /**
146
217
  * Filterable fields and their allowed operators:
147
218
  *
@@ -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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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";
@@ -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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,9 @@ export interface Filter {
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
14
  * Sub-filters for this filter. Valid only when operator is "and", "or", or "not"; "not"
14
15
  * takes exactly one subfilter.
@@ -21,6 +22,8 @@ export interface Filter {
21
22
  * "starts_with", "ends_with", "time_is_after", "time_is_before", "time_is_in_last",
22
23
  * "time_is_not_in_last", "time_is_in_next", "time_is_not_in_next", "greater_than",
23
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.
24
27
  */
25
28
  value?: string | undefined;
26
29
  /**
@@ -30,7 +33,7 @@ export interface Filter {
30
33
  values?: string[] | undefined;
31
34
  }
32
35
  export declare namespace Filter {
33
- /** The operator for this filter. */
36
+ /** The operator for this filter. Required unless related_object is set. */
34
37
  const Operator: {
35
38
  readonly Equals: "equals";
36
39
  readonly NotEquals: "not_equals";
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Filter = void 0;
5
5
  var Filter;
6
6
  (function (Filter) {
7
- /** The operator for this filter. */
7
+ /** The operator for this filter. Required unless related_object is set. */
8
8
  Filter.Operator = {
9
9
  Equals: "equals",
10
10
  NotEquals: "not_equals",
@@ -0,0 +1,26 @@
1
+ export interface FilterError {
2
+ /**
3
+ * What is accepted in place of the rejected field, operator, value, or relationship.
4
+ * Long lists are cut off after 100 entries.
5
+ */
6
+ allowed?: string[] | undefined;
7
+ /**
8
+ * A stable machine-readable identifier for this problem.
9
+ *
10
+ * Known values: `invalid_shape`, `too_deep`, `unknown_operator`, `unknown_field`, `operator_not_allowed`, `missing_value`, `unexpected_value`, `invalid_value`, `unknown_relationship`, `unsupported`. This list is not exhaustive.
11
+ */
12
+ code: string;
13
+ /** The field of the filter at path, when it has one. */
14
+ field?: string | undefined;
15
+ /** What is wrong and how to fix it. */
16
+ message: string;
17
+ /** The operator of the filter at path, when it has one. */
18
+ operator?: string | undefined;
19
+ /**
20
+ * Where the problem is, as a JSONPath from the root of the filter, such as
21
+ * "$.subfilters[1].related_object.filter".
22
+ */
23
+ path: string;
24
+ /** The accepted entry closest to the rejected one, when one is close enough. */
25
+ suggestion?: string | undefined;
26
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ import type * as Pylon from "../index.js";
2
+ export interface FilterRelatedObject {
3
+ /**
4
+ * The slug of a relationship custom field to follow. Returned when reading stored filters,
5
+ * such as ticket form conditions; search filters don't accept it yet.
6
+ */
7
+ custom_field?: string | undefined;
8
+ filter: Pylon.Filter;
9
+ /**
10
+ * The built-in relationship to follow, such as "account". Each search endpoint lists the
11
+ * relationships its filter accepts. Exactly one of relationship and custom_field is set.
12
+ */
13
+ relationship?: string | undefined;
14
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import type * as Pylon from "../index.js";
2
+ export interface GetCustomerPortalSettingsResponseBody {
3
+ data: Pylon.CustomerPortalSettings;
4
+ /** The request ID for tracking. */
5
+ request_id: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -6,6 +6,12 @@
6
6
  export interface IssueThread {
7
7
  /** The ID of the channel that the thread belongs to, if the thread is being synced with a chat platform. */
8
8
  channel_id?: string | undefined;
9
+ /**
10
+ * The destination for messages in this thread, such as slack, email, or linear. None for Pylon-only threads.
11
+ *
12
+ * Known values: `email`, `slack`, `chat_widget`, `customer_portal`, `none`, `microsoft_teams`, `microsoft_teams_chat`, `discord`, `google_chat`, `whatsapp`, `telegram`, `sms`, `linear`, `jira`, `github`, `asana`, `shortcut`, `zendesk`, `salesforce_service`, `intercom`, `freshdesk`, `jira_service_management`, `hubspot_service`. This list is not exhaustive.
13
+ */
14
+ delivery_mode: string;
9
15
  /** The ID of the thread. */
10
16
  id: string;
11
17
  /** The issue ID that the thread belongs to. */
@@ -11,9 +11,17 @@ export interface TicketFormLayoutField {
11
11
  hidden: boolean;
12
12
  /** The name of the ticket form layout field. */
13
13
  name: string;
14
+ /**
15
+ * The URL query parameter used to prefill this field on the public form.
16
+ * Derived from the form's display label and changes when that label is renamed.
17
+ */
18
+ prefill_key: string;
14
19
  /** Indicates whether the field is required when submitting the ticket form. */
15
20
  required: boolean;
16
- /** The slug of the ticket form layout field. */
21
+ /**
22
+ * The field identifier used for API submissions and visibility conditions.
23
+ * For custom fields, this is the underlying custom-field slug.
24
+ */
17
25
  slug: string;
18
26
  /** The type of the ticket form layout field. */
19
27
  type: string;
@@ -0,0 +1,16 @@
1
+ export interface UpdateCustomerPortalAccessSettings {
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.
5
+ */
6
+ auto_grant_new_contacts?: boolean | undefined;
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 | undefined;
9
+ /**
10
+ * The portal role contacts get when they are granted access without an explicit role: `no_access`, `member`, `admin`, or a
11
+ * custom role's slug or ID. Hidden roles cannot be the default.
12
+ */
13
+ default_role?: string | undefined;
14
+ /** Whether contacts granted access automatically are emailed a portal invitation. */
15
+ invite_auto_granted_contacts?: boolean | undefined;
16
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ export interface UpdateCustomerPortalBranding {
2
+ /** The brand color as a 6-digit hex code, such as `#1A2B3C`. An empty string clears it. */
3
+ brand_color?: string | undefined;
4
+ /** The footer logo used in dark mode. Pylon copies the image at this https URL into its own storage. An empty string clears it. */
5
+ dark_mode_footer_logo_url?: string | undefined;
6
+ /** The header logo used in dark mode. Pylon copies the image at this https URL into its own storage. An empty string clears it. */
7
+ dark_mode_logo_url?: string | undefined;
8
+ /** The footer logo. Pylon copies the image at this https URL into its own storage. An empty string clears it. */
9
+ footer_logo_url?: string | undefined;
10
+ /** Where the header logo links to. Must be an http or https URL; an empty string makes the logo not a link. */
11
+ logo_link_url?: string | undefined;
12
+ /** The header logo. Pylon copies the image at this https URL into its own storage. An empty string clears it. */
13
+ logo_url?: string | undefined;
14
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export interface UpdateCustomerPortalDisplaySettings {
2
+ /** Whether the portal shows feature request descriptions. */
3
+ feature_request_descriptions?: boolean | undefined;
4
+ /** Whether portal tasks show their linked issues. */
5
+ task_linked_issues?: boolean | undefined;
6
+ /** Whether portal tasks show their linked tasks. */
7
+ task_linked_tasks?: boolean | undefined;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import type * as Pylon from "../index.js";
2
+ export interface UpdateCustomerPortalNavigation {
3
+ /** The link groups in the portal footer, in order. Replaces the existing groups; an empty array removes them. */
4
+ footer_categories?: Pylon.CustomerPortalFooterCategory[] | undefined;
5
+ /** The links in the portal header, in order. Replaces the existing links; an empty array removes them. */
6
+ header_links?: Pylon.CustomerPortalLink[] | undefined;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export interface UpdateCustomerPortalTabs {
2
+ /** Whether the portal shows the feature requests tab. */
3
+ feature_requests?: boolean | undefined;
4
+ /** Whether the portal shows the issues tab. */
5
+ issues?: boolean | undefined;
6
+ /** Whether the portal shows the projects and tasks tab. */
7
+ projects_and_tasks?: boolean | undefined;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export interface UpdateCustomerPortalUserPermissions {
2
+ /** Whether portal users can edit their own profile. */
3
+ edit_profile?: boolean | undefined;
4
+ /** Whether portal users can edit the CC list on their replies. */
5
+ edit_reply_ccs?: boolean | undefined;
6
+ /** Whether portal users can export their issues as CSV. */
7
+ export_issues_csv?: boolean | undefined;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -62,7 +62,16 @@ export * from "./CrmDetails.js";
62
62
  export * from "./CrmSettings.js";
63
63
  export * from "./CsatResponse.js";
64
64
  export * from "./CustomActivity.js";
65
+ export * from "./CustomerPortalAccessSettings.js";
66
+ export * from "./CustomerPortalBranding.js";
67
+ export * from "./CustomerPortalDisplaySettings.js";
68
+ export * from "./CustomerPortalFooterCategory.js";
65
69
  export * from "./CustomerPortalInvitationResult.js";
70
+ export * from "./CustomerPortalLink.js";
71
+ export * from "./CustomerPortalNavigation.js";
72
+ export * from "./CustomerPortalSettings.js";
73
+ export * from "./CustomerPortalTabs.js";
74
+ export * from "./CustomerPortalUserPermissions.js";
66
75
  export * from "./CustomFieldDefinition.js";
67
76
  export * from "./CustomFieldDefinitionSelectOption.js";
68
77
  export * from "./CustomFieldValue.js";
@@ -104,6 +113,8 @@ export * from "./FeatureRequest.js";
104
113
  export * from "./FeatureRequestEvidence.js";
105
114
  export * from "./FeatureRequestSearchResult.js";
106
115
  export * from "./Filter.js";
116
+ export * from "./FilterError.js";
117
+ export * from "./FilterRelatedObject.js";
107
118
  export * from "./Follower.js";
108
119
  export * from "./GetAccountNotebookNotesResponseBody.js";
109
120
  export * from "./GetAccountRelationshipsResponseBody.js";
@@ -120,6 +131,7 @@ export * from "./GetCollectionResponseBody.js";
120
131
  export * from "./GetCollectionsResponseBody.js";
121
132
  export * from "./GetContactResponseBody.js";
122
133
  export * from "./GetContactsResponseBody.js";
134
+ export * from "./GetCustomerPortalSettingsResponseBody.js";
123
135
  export * from "./GetCustomFieldResponseBody.js";
124
136
  export * from "./GetCustomFieldsResponseBody.js";
125
137
  export * from "./GetCustomObjectResponseBody.js";
@@ -279,6 +291,12 @@ export * from "./UpdateCallRecordingResponseBody.js";
279
291
  export * from "./UpdateCollectionResponseBody.js";
280
292
  export * from "./UpdateContactEmail.js";
281
293
  export * from "./UpdateContactResponseBody.js";
294
+ export * from "./UpdateCustomerPortalAccessSettings.js";
295
+ export * from "./UpdateCustomerPortalBranding.js";
296
+ export * from "./UpdateCustomerPortalDisplaySettings.js";
297
+ export * from "./UpdateCustomerPortalNavigation.js";
298
+ export * from "./UpdateCustomerPortalTabs.js";
299
+ export * from "./UpdateCustomerPortalUserPermissions.js";
282
300
  export * from "./UpdateCustomFieldResponseBody.js";
283
301
  export * from "./UpdateCustomFieldSelectOptionResponseBody.js";
284
302
  export * from "./UpdateCustomObjectResponseBody.js";
@@ -78,7 +78,16 @@ __exportStar(require("./CrmDetails.js"), exports);
78
78
  __exportStar(require("./CrmSettings.js"), exports);
79
79
  __exportStar(require("./CsatResponse.js"), exports);
80
80
  __exportStar(require("./CustomActivity.js"), exports);
81
+ __exportStar(require("./CustomerPortalAccessSettings.js"), exports);
82
+ __exportStar(require("./CustomerPortalBranding.js"), exports);
83
+ __exportStar(require("./CustomerPortalDisplaySettings.js"), exports);
84
+ __exportStar(require("./CustomerPortalFooterCategory.js"), exports);
81
85
  __exportStar(require("./CustomerPortalInvitationResult.js"), exports);
86
+ __exportStar(require("./CustomerPortalLink.js"), exports);
87
+ __exportStar(require("./CustomerPortalNavigation.js"), exports);
88
+ __exportStar(require("./CustomerPortalSettings.js"), exports);
89
+ __exportStar(require("./CustomerPortalTabs.js"), exports);
90
+ __exportStar(require("./CustomerPortalUserPermissions.js"), exports);
82
91
  __exportStar(require("./CustomFieldDefinition.js"), exports);
83
92
  __exportStar(require("./CustomFieldDefinitionSelectOption.js"), exports);
84
93
  __exportStar(require("./CustomFieldValue.js"), exports);
@@ -120,6 +129,8 @@ __exportStar(require("./FeatureRequest.js"), exports);
120
129
  __exportStar(require("./FeatureRequestEvidence.js"), exports);
121
130
  __exportStar(require("./FeatureRequestSearchResult.js"), exports);
122
131
  __exportStar(require("./Filter.js"), exports);
132
+ __exportStar(require("./FilterError.js"), exports);
133
+ __exportStar(require("./FilterRelatedObject.js"), exports);
123
134
  __exportStar(require("./Follower.js"), exports);
124
135
  __exportStar(require("./GetAccountNotebookNotesResponseBody.js"), exports);
125
136
  __exportStar(require("./GetAccountRelationshipsResponseBody.js"), exports);
@@ -136,6 +147,7 @@ __exportStar(require("./GetCollectionResponseBody.js"), exports);
136
147
  __exportStar(require("./GetCollectionsResponseBody.js"), exports);
137
148
  __exportStar(require("./GetContactResponseBody.js"), exports);
138
149
  __exportStar(require("./GetContactsResponseBody.js"), exports);
150
+ __exportStar(require("./GetCustomerPortalSettingsResponseBody.js"), exports);
139
151
  __exportStar(require("./GetCustomFieldResponseBody.js"), exports);
140
152
  __exportStar(require("./GetCustomFieldsResponseBody.js"), exports);
141
153
  __exportStar(require("./GetCustomObjectResponseBody.js"), exports);
@@ -295,6 +307,12 @@ __exportStar(require("./UpdateCallRecordingResponseBody.js"), exports);
295
307
  __exportStar(require("./UpdateCollectionResponseBody.js"), exports);
296
308
  __exportStar(require("./UpdateContactEmail.js"), exports);
297
309
  __exportStar(require("./UpdateContactResponseBody.js"), exports);
310
+ __exportStar(require("./UpdateCustomerPortalAccessSettings.js"), exports);
311
+ __exportStar(require("./UpdateCustomerPortalBranding.js"), exports);
312
+ __exportStar(require("./UpdateCustomerPortalDisplaySettings.js"), exports);
313
+ __exportStar(require("./UpdateCustomerPortalNavigation.js"), exports);
314
+ __exportStar(require("./UpdateCustomerPortalTabs.js"), exports);
315
+ __exportStar(require("./UpdateCustomerPortalUserPermissions.js"), exports);
298
316
  __exportStar(require("./UpdateCustomFieldResponseBody.js"), exports);
299
317
  __exportStar(require("./UpdateCustomFieldSelectOptionResponseBody.js"), exports);
300
318
  __exportStar(require("./UpdateCustomObjectResponseBody.js"), exports);