@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.
- package/dist/cjs/BaseClient.js +1 -1
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +51 -46
- package/dist/cjs/api/resources/accounts/client/requests/AccountsSearchRequest.d.ts +2 -0
- package/dist/cjs/api/resources/contacts/client/Client.d.ts +25 -1
- package/dist/cjs/api/resources/contacts/client/Client.js +74 -1
- package/dist/cjs/api/resources/contacts/client/requests/ContactsMergeRequest.d.ts +1 -1
- package/dist/cjs/api/resources/contacts/client/requests/ContactsPortalInvitationRequest.d.ts +10 -0
- package/dist/cjs/api/resources/contacts/client/requests/ContactsPortalInvitationRequest.js +3 -0
- package/dist/cjs/api/resources/contacts/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/customerPortal/client/Client.d.ts +53 -0
- package/dist/cjs/api/resources/customerPortal/client/Client.js +193 -0
- package/dist/cjs/api/resources/customerPortal/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/customerPortal/client/index.js +17 -0
- package/dist/cjs/api/resources/customerPortal/client/requests/CustomerPortalUpdateSettingsRequest.d.ts +15 -0
- package/dist/cjs/api/resources/customerPortal/client/requests/CustomerPortalUpdateSettingsRequest.js +3 -0
- package/dist/cjs/api/resources/customerPortal/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/customerPortal/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/customerPortal/exports.d.ts +2 -0
- package/dist/cjs/api/resources/customerPortal/exports.js +21 -0
- package/dist/cjs/api/resources/customerPortal/index.d.ts +1 -0
- package/dist/cjs/api/resources/customerPortal/index.js +17 -0
- package/dist/cjs/api/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/index.js +3 -1
- package/dist/cjs/api/resources/issues/client/Client.d.ts +11 -0
- package/dist/cjs/api/resources/issues/client/Client.js +11 -0
- package/dist/cjs/api/resources/issues/client/requests/IssuesCreateRequest.d.ts +11 -0
- package/dist/cjs/api/resources/issues/client/requests/IssuesSearchRequest.d.ts +2 -0
- package/dist/cjs/api/resources/issues/resources/voiceCalls/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/issues/resources/voiceCalls/client/Client.js +1 -1
- package/dist/cjs/api/resources/teams/client/Client.d.ts +26 -0
- package/dist/cjs/api/resources/teams/client/Client.js +72 -0
- package/dist/cjs/api/resources/teams/client/requests/TeamsDeleteRequest.d.ts +10 -0
- package/dist/cjs/api/resources/teams/client/requests/TeamsDeleteRequest.js +3 -0
- package/dist/cjs/api/resources/teams/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/users/client/Client.d.ts +25 -0
- package/dist/cjs/api/resources/users/client/Client.js +71 -0
- package/dist/cjs/api/resources/users/client/requests/UsersInviteRequest.d.ts +15 -0
- package/dist/cjs/api/resources/users/client/requests/UsersInviteRequest.js +3 -0
- package/dist/cjs/api/resources/users/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/types/ArticleVisibilityConfig.d.ts +5 -0
- package/dist/cjs/api/types/CustomerPortalAccessSettings.d.ts +16 -0
- package/dist/cjs/api/types/CustomerPortalAccessSettings.js +3 -0
- package/dist/cjs/api/types/CustomerPortalBranding.d.ts +14 -0
- package/dist/cjs/api/types/CustomerPortalBranding.js +3 -0
- package/dist/cjs/api/types/CustomerPortalDisplaySettings.d.ts +8 -0
- package/dist/cjs/api/types/CustomerPortalDisplaySettings.js +3 -0
- package/dist/cjs/api/types/CustomerPortalFooterCategory.d.ts +7 -0
- package/dist/cjs/api/types/CustomerPortalFooterCategory.js +3 -0
- package/dist/cjs/api/types/CustomerPortalInvitationResult.d.ts +4 -0
- package/dist/cjs/api/types/CustomerPortalInvitationResult.js +3 -0
- package/dist/cjs/api/types/CustomerPortalLink.d.ts +6 -0
- package/dist/cjs/api/types/CustomerPortalLink.js +3 -0
- package/dist/cjs/api/types/CustomerPortalNavigation.d.ts +7 -0
- package/dist/cjs/api/types/CustomerPortalNavigation.js +3 -0
- package/dist/cjs/api/types/CustomerPortalSettings.d.ts +11 -0
- package/dist/cjs/api/types/CustomerPortalSettings.js +3 -0
- package/dist/cjs/api/types/CustomerPortalTabs.d.ts +8 -0
- package/dist/cjs/api/types/CustomerPortalTabs.js +3 -0
- package/dist/cjs/api/types/CustomerPortalUserPermissions.d.ts +8 -0
- package/dist/cjs/api/types/CustomerPortalUserPermissions.js +3 -0
- package/dist/cjs/api/types/DeleteTeamResponseBody.d.ts +4 -0
- package/dist/cjs/api/types/DeleteTeamResponseBody.js +3 -0
- package/dist/cjs/api/types/DestinationMetadata.d.ts +2 -0
- package/dist/cjs/api/types/ErrorApiResponseBody.d.ts +7 -1
- package/dist/cjs/api/types/ExternalIssue.d.ts +8 -0
- package/dist/cjs/api/types/Filter.d.ts +17 -7
- package/dist/cjs/api/types/Filter.js +6 -1
- package/dist/cjs/api/types/FilterError.d.ts +26 -0
- package/dist/cjs/api/types/FilterError.js +3 -0
- package/dist/cjs/api/types/FilterRelatedObject.d.ts +14 -0
- package/dist/cjs/api/types/FilterRelatedObject.js +3 -0
- package/dist/cjs/api/types/GetCustomerPortalSettingsResponseBody.d.ts +6 -0
- package/dist/cjs/api/types/GetCustomerPortalSettingsResponseBody.js +3 -0
- package/dist/cjs/api/types/IssueThread.d.ts +6 -0
- package/dist/cjs/api/types/SearchAccountsSort.d.ts +23 -0
- package/dist/cjs/api/types/SearchAccountsSort.js +20 -0
- package/dist/cjs/api/types/SearchIssuesSort.d.ts +23 -0
- package/dist/cjs/api/types/SearchIssuesSort.js +20 -0
- package/dist/cjs/api/types/SendCustomerPortalInvitationResponseBody.d.ts +6 -0
- package/dist/cjs/api/types/SendCustomerPortalInvitationResponseBody.js +3 -0
- package/dist/cjs/api/types/Task.d.ts +2 -0
- package/dist/cjs/api/types/TicketFormLayoutField.d.ts +11 -1
- package/dist/cjs/api/types/UpdateCustomerPortalAccessSettings.d.ts +16 -0
- package/dist/cjs/api/types/UpdateCustomerPortalAccessSettings.js +3 -0
- package/dist/cjs/api/types/UpdateCustomerPortalBranding.d.ts +14 -0
- package/dist/cjs/api/types/UpdateCustomerPortalBranding.js +3 -0
- package/dist/cjs/api/types/UpdateCustomerPortalDisplaySettings.d.ts +8 -0
- package/dist/cjs/api/types/UpdateCustomerPortalDisplaySettings.js +3 -0
- package/dist/cjs/api/types/UpdateCustomerPortalNavigation.d.ts +7 -0
- package/dist/cjs/api/types/UpdateCustomerPortalNavigation.js +3 -0
- package/dist/cjs/api/types/UpdateCustomerPortalTabs.d.ts +8 -0
- package/dist/cjs/api/types/UpdateCustomerPortalTabs.js +3 -0
- package/dist/cjs/api/types/UpdateCustomerPortalUserPermissions.d.ts +8 -0
- package/dist/cjs/api/types/UpdateCustomerPortalUserPermissions.js +3 -0
- package/dist/cjs/api/types/VoiceCall.d.ts +2 -0
- package/dist/cjs/api/types/VoiceCallParticipant.d.ts +20 -0
- package/dist/cjs/api/types/VoiceCallParticipant.js +3 -0
- package/dist/cjs/api/types/index.d.ts +24 -0
- package/dist/cjs/api/types/index.js +24 -0
- package/dist/esm/BaseClient.js +1 -1
- package/dist/esm/Client.d.ts +3 -0
- package/dist/esm/Client.js +5 -0
- package/dist/esm/api/resources/accounts/client/requests/AccountsSearchRequest.d.ts +2 -0
- package/dist/esm/api/resources/contacts/client/Client.d.ts +25 -1
- package/dist/esm/api/resources/contacts/client/Client.js +74 -1
- package/dist/esm/api/resources/contacts/client/requests/ContactsMergeRequest.d.ts +1 -1
- package/dist/esm/api/resources/contacts/client/requests/ContactsPortalInvitationRequest.d.ts +10 -0
- package/dist/esm/api/resources/contacts/client/requests/ContactsPortalInvitationRequest.js +2 -0
- package/dist/esm/api/resources/contacts/client/requests/index.d.ts +1 -0
- package/dist/esm/api/resources/customerPortal/client/Client.d.ts +53 -0
- package/dist/esm/api/resources/customerPortal/client/Client.js +156 -0
- package/dist/esm/api/resources/customerPortal/client/index.d.ts +1 -0
- package/dist/esm/api/resources/customerPortal/client/index.js +1 -0
- package/dist/esm/api/resources/customerPortal/client/requests/CustomerPortalUpdateSettingsRequest.d.ts +15 -0
- package/dist/esm/api/resources/customerPortal/client/requests/CustomerPortalUpdateSettingsRequest.js +2 -0
- package/dist/esm/api/resources/customerPortal/client/requests/index.d.ts +1 -0
- package/dist/esm/api/resources/customerPortal/client/requests/index.js +1 -0
- package/dist/esm/api/resources/customerPortal/exports.d.ts +2 -0
- package/dist/esm/api/resources/customerPortal/exports.js +3 -0
- package/dist/esm/api/resources/customerPortal/index.d.ts +1 -0
- package/dist/esm/api/resources/customerPortal/index.js +1 -0
- package/dist/esm/api/resources/index.d.ts +2 -0
- package/dist/esm/api/resources/index.js +2 -0
- package/dist/esm/api/resources/issues/client/Client.d.ts +11 -0
- package/dist/esm/api/resources/issues/client/Client.js +11 -0
- package/dist/esm/api/resources/issues/client/requests/IssuesCreateRequest.d.ts +11 -0
- package/dist/esm/api/resources/issues/client/requests/IssuesSearchRequest.d.ts +2 -0
- package/dist/esm/api/resources/issues/resources/voiceCalls/client/Client.d.ts +1 -1
- package/dist/esm/api/resources/issues/resources/voiceCalls/client/Client.js +1 -1
- package/dist/esm/api/resources/teams/client/Client.d.ts +26 -0
- package/dist/esm/api/resources/teams/client/Client.js +72 -0
- package/dist/esm/api/resources/teams/client/requests/TeamsDeleteRequest.d.ts +10 -0
- package/dist/esm/api/resources/teams/client/requests/TeamsDeleteRequest.js +2 -0
- package/dist/esm/api/resources/teams/client/requests/index.d.ts +1 -0
- package/dist/esm/api/resources/users/client/Client.d.ts +25 -0
- package/dist/esm/api/resources/users/client/Client.js +71 -0
- package/dist/esm/api/resources/users/client/requests/UsersInviteRequest.d.ts +15 -0
- package/dist/esm/api/resources/users/client/requests/UsersInviteRequest.js +2 -0
- package/dist/esm/api/resources/users/client/requests/index.d.ts +1 -0
- package/dist/esm/api/types/ArticleVisibilityConfig.d.ts +5 -0
- package/dist/esm/api/types/CustomerPortalAccessSettings.d.ts +16 -0
- package/dist/esm/api/types/CustomerPortalAccessSettings.js +2 -0
- package/dist/esm/api/types/CustomerPortalBranding.d.ts +14 -0
- package/dist/esm/api/types/CustomerPortalBranding.js +2 -0
- package/dist/esm/api/types/CustomerPortalDisplaySettings.d.ts +8 -0
- package/dist/esm/api/types/CustomerPortalDisplaySettings.js +2 -0
- package/dist/esm/api/types/CustomerPortalFooterCategory.d.ts +7 -0
- package/dist/esm/api/types/CustomerPortalFooterCategory.js +2 -0
- package/dist/esm/api/types/CustomerPortalInvitationResult.d.ts +4 -0
- package/dist/esm/api/types/CustomerPortalInvitationResult.js +2 -0
- package/dist/esm/api/types/CustomerPortalLink.d.ts +6 -0
- package/dist/esm/api/types/CustomerPortalLink.js +2 -0
- package/dist/esm/api/types/CustomerPortalNavigation.d.ts +7 -0
- package/dist/esm/api/types/CustomerPortalNavigation.js +2 -0
- package/dist/esm/api/types/CustomerPortalSettings.d.ts +11 -0
- package/dist/esm/api/types/CustomerPortalSettings.js +2 -0
- package/dist/esm/api/types/CustomerPortalTabs.d.ts +8 -0
- package/dist/esm/api/types/CustomerPortalTabs.js +2 -0
- package/dist/esm/api/types/CustomerPortalUserPermissions.d.ts +8 -0
- package/dist/esm/api/types/CustomerPortalUserPermissions.js +2 -0
- package/dist/esm/api/types/DeleteTeamResponseBody.d.ts +4 -0
- package/dist/esm/api/types/DeleteTeamResponseBody.js +2 -0
- package/dist/esm/api/types/DestinationMetadata.d.ts +2 -0
- package/dist/esm/api/types/ErrorApiResponseBody.d.ts +7 -1
- package/dist/esm/api/types/ExternalIssue.d.ts +8 -0
- package/dist/esm/api/types/Filter.d.ts +17 -7
- package/dist/esm/api/types/Filter.js +6 -1
- package/dist/esm/api/types/FilterError.d.ts +26 -0
- package/dist/esm/api/types/FilterError.js +2 -0
- package/dist/esm/api/types/FilterRelatedObject.d.ts +14 -0
- package/dist/esm/api/types/FilterRelatedObject.js +2 -0
- package/dist/esm/api/types/GetCustomerPortalSettingsResponseBody.d.ts +6 -0
- package/dist/esm/api/types/GetCustomerPortalSettingsResponseBody.js +2 -0
- package/dist/esm/api/types/IssueThread.d.ts +6 -0
- package/dist/esm/api/types/SearchAccountsSort.d.ts +23 -0
- package/dist/esm/api/types/SearchAccountsSort.js +17 -0
- package/dist/esm/api/types/SearchIssuesSort.d.ts +23 -0
- package/dist/esm/api/types/SearchIssuesSort.js +17 -0
- package/dist/esm/api/types/SendCustomerPortalInvitationResponseBody.d.ts +6 -0
- package/dist/esm/api/types/SendCustomerPortalInvitationResponseBody.js +2 -0
- package/dist/esm/api/types/Task.d.ts +2 -0
- package/dist/esm/api/types/TicketFormLayoutField.d.ts +11 -1
- package/dist/esm/api/types/UpdateCustomerPortalAccessSettings.d.ts +16 -0
- package/dist/esm/api/types/UpdateCustomerPortalAccessSettings.js +2 -0
- package/dist/esm/api/types/UpdateCustomerPortalBranding.d.ts +14 -0
- package/dist/esm/api/types/UpdateCustomerPortalBranding.js +2 -0
- package/dist/esm/api/types/UpdateCustomerPortalDisplaySettings.d.ts +8 -0
- package/dist/esm/api/types/UpdateCustomerPortalDisplaySettings.js +2 -0
- package/dist/esm/api/types/UpdateCustomerPortalNavigation.d.ts +7 -0
- package/dist/esm/api/types/UpdateCustomerPortalNavigation.js +2 -0
- package/dist/esm/api/types/UpdateCustomerPortalTabs.d.ts +8 -0
- package/dist/esm/api/types/UpdateCustomerPortalTabs.js +2 -0
- package/dist/esm/api/types/UpdateCustomerPortalUserPermissions.d.ts +8 -0
- package/dist/esm/api/types/UpdateCustomerPortalUserPermissions.js +2 -0
- package/dist/esm/api/types/VoiceCall.d.ts +2 -0
- package/dist/esm/api/types/VoiceCallParticipant.d.ts +20 -0
- package/dist/esm/api/types/VoiceCallParticipant.js +2 -0
- package/dist/esm/api/types/index.d.ts +24 -0
- package/dist/esm/api/types/index.js +24 -0
- package/package.json +1 -1
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -42,7 +42,7 @@ const core = __importStar(require("./core/index.js"));
|
|
|
42
42
|
function normalizeClientOptions(options) {
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
|
-
"User-Agent": "@usepylon/sdk/0.1.0-
|
|
45
|
+
"User-Agent": "@usepylon/sdk/0.1.0-beta.2",
|
|
46
46
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
47
47
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
48
48
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { AttachmentsClient } from "./api/resources/attachments/client/Client.js"
|
|
|
5
5
|
import { AuditLogsClient } from "./api/resources/auditLogs/client/Client.js";
|
|
6
6
|
import { CallRecordingsClient } from "./api/resources/callRecordings/client/Client.js";
|
|
7
7
|
import { ContactsClient } from "./api/resources/contacts/client/Client.js";
|
|
8
|
+
import { CustomerPortalClient } from "./api/resources/customerPortal/client/Client.js";
|
|
8
9
|
import { CustomFieldsClient } from "./api/resources/customFields/client/Client.js";
|
|
9
10
|
import { CustomObjectsClient } from "./api/resources/customObjects/client/Client.js";
|
|
10
11
|
import { EmailSuppressionsClient } from "./api/resources/emailSuppressions/client/Client.js";
|
|
@@ -47,6 +48,7 @@ export declare class PylonClient {
|
|
|
47
48
|
protected _contacts: ContactsClient | undefined;
|
|
48
49
|
protected _customFields: CustomFieldsClient | undefined;
|
|
49
50
|
protected _customObjects: CustomObjectsClient | undefined;
|
|
51
|
+
protected _customerPortal: CustomerPortalClient | undefined;
|
|
50
52
|
protected _emailSuppressions: EmailSuppressionsClient | undefined;
|
|
51
53
|
protected _featureRequests: FeatureRequestsClient | undefined;
|
|
52
54
|
protected _issueGroups: IssueGroupsClient | undefined;
|
|
@@ -78,6 +80,7 @@ export declare class PylonClient {
|
|
|
78
80
|
get contacts(): ContactsClient;
|
|
79
81
|
get customFields(): CustomFieldsClient;
|
|
80
82
|
get customObjects(): CustomObjectsClient;
|
|
83
|
+
get customerPortal(): CustomerPortalClient;
|
|
81
84
|
get emailSuppressions(): EmailSuppressionsClient;
|
|
82
85
|
get featureRequests(): FeatureRequestsClient;
|
|
83
86
|
get issueGroups(): IssueGroupsClient;
|
package/dist/cjs/Client.js
CHANGED
|
@@ -51,29 +51,30 @@ const Client_js_4 = require("./api/resources/attachments/client/Client.js");
|
|
|
51
51
|
const Client_js_5 = require("./api/resources/auditLogs/client/Client.js");
|
|
52
52
|
const Client_js_6 = require("./api/resources/callRecordings/client/Client.js");
|
|
53
53
|
const Client_js_7 = require("./api/resources/contacts/client/Client.js");
|
|
54
|
-
const Client_js_8 = require("./api/resources/
|
|
55
|
-
const Client_js_9 = require("./api/resources/
|
|
56
|
-
const Client_js_10 = require("./api/resources/
|
|
57
|
-
const Client_js_11 = require("./api/resources/
|
|
58
|
-
const Client_js_12 = require("./api/resources/
|
|
59
|
-
const Client_js_13 = require("./api/resources/
|
|
60
|
-
const Client_js_14 = require("./api/resources/
|
|
61
|
-
const Client_js_15 = require("./api/resources/
|
|
62
|
-
const Client_js_16 = require("./api/resources/
|
|
63
|
-
const Client_js_17 = require("./api/resources/
|
|
64
|
-
const Client_js_18 = require("./api/resources/
|
|
65
|
-
const Client_js_19 = require("./api/resources/
|
|
66
|
-
const Client_js_20 = require("./api/resources/
|
|
67
|
-
const Client_js_21 = require("./api/resources/
|
|
68
|
-
const Client_js_22 = require("./api/resources/
|
|
69
|
-
const Client_js_23 = require("./api/resources/
|
|
70
|
-
const Client_js_24 = require("./api/resources/
|
|
71
|
-
const Client_js_25 = require("./api/resources/
|
|
72
|
-
const Client_js_26 = require("./api/resources/
|
|
73
|
-
const Client_js_27 = require("./api/resources/
|
|
74
|
-
const Client_js_28 = require("./api/resources/
|
|
75
|
-
const Client_js_29 = require("./api/resources/
|
|
76
|
-
const Client_js_30 = require("./api/resources/
|
|
54
|
+
const Client_js_8 = require("./api/resources/customerPortal/client/Client.js");
|
|
55
|
+
const Client_js_9 = require("./api/resources/customFields/client/Client.js");
|
|
56
|
+
const Client_js_10 = require("./api/resources/customObjects/client/Client.js");
|
|
57
|
+
const Client_js_11 = require("./api/resources/emailSuppressions/client/Client.js");
|
|
58
|
+
const Client_js_12 = require("./api/resources/featureRequests/client/Client.js");
|
|
59
|
+
const Client_js_13 = require("./api/resources/issueGroups/client/Client.js");
|
|
60
|
+
const Client_js_14 = require("./api/resources/issueStatuses/client/Client.js");
|
|
61
|
+
const Client_js_15 = require("./api/resources/issues/client/Client.js");
|
|
62
|
+
const Client_js_16 = require("./api/resources/knowledgeBases/client/Client.js");
|
|
63
|
+
const Client_js_17 = require("./api/resources/macroGroups/client/Client.js");
|
|
64
|
+
const Client_js_18 = require("./api/resources/macros/client/Client.js");
|
|
65
|
+
const Client_js_19 = require("./api/resources/me/client/Client.js");
|
|
66
|
+
const Client_js_20 = require("./api/resources/milestones/client/Client.js");
|
|
67
|
+
const Client_js_21 = require("./api/resources/projects/client/Client.js");
|
|
68
|
+
const Client_js_22 = require("./api/resources/surveys/client/Client.js");
|
|
69
|
+
const Client_js_23 = require("./api/resources/tags/client/Client.js");
|
|
70
|
+
const Client_js_24 = require("./api/resources/taskStatuses/client/Client.js");
|
|
71
|
+
const Client_js_25 = require("./api/resources/tasks/client/Client.js");
|
|
72
|
+
const Client_js_26 = require("./api/resources/teams/client/Client.js");
|
|
73
|
+
const Client_js_27 = require("./api/resources/ticketForms/client/Client.js");
|
|
74
|
+
const Client_js_28 = require("./api/resources/trainingData/client/Client.js");
|
|
75
|
+
const Client_js_29 = require("./api/resources/userRoles/client/Client.js");
|
|
76
|
+
const Client_js_30 = require("./api/resources/userStatuses/client/Client.js");
|
|
77
|
+
const Client_js_31 = require("./api/resources/users/client/Client.js");
|
|
77
78
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
78
79
|
const core = __importStar(require("./core/index.js"));
|
|
79
80
|
class PylonClient {
|
|
@@ -110,95 +111,99 @@ class PylonClient {
|
|
|
110
111
|
}
|
|
111
112
|
get customFields() {
|
|
112
113
|
var _a;
|
|
113
|
-
return ((_a = this._customFields) !== null && _a !== void 0 ? _a : (this._customFields = new
|
|
114
|
+
return ((_a = this._customFields) !== null && _a !== void 0 ? _a : (this._customFields = new Client_js_9.CustomFieldsClient(this._options)));
|
|
114
115
|
}
|
|
115
116
|
get customObjects() {
|
|
116
117
|
var _a;
|
|
117
|
-
return ((_a = this._customObjects) !== null && _a !== void 0 ? _a : (this._customObjects = new
|
|
118
|
+
return ((_a = this._customObjects) !== null && _a !== void 0 ? _a : (this._customObjects = new Client_js_10.CustomObjectsClient(this._options)));
|
|
119
|
+
}
|
|
120
|
+
get customerPortal() {
|
|
121
|
+
var _a;
|
|
122
|
+
return ((_a = this._customerPortal) !== null && _a !== void 0 ? _a : (this._customerPortal = new Client_js_8.CustomerPortalClient(this._options)));
|
|
118
123
|
}
|
|
119
124
|
get emailSuppressions() {
|
|
120
125
|
var _a;
|
|
121
|
-
return ((_a = this._emailSuppressions) !== null && _a !== void 0 ? _a : (this._emailSuppressions = new
|
|
126
|
+
return ((_a = this._emailSuppressions) !== null && _a !== void 0 ? _a : (this._emailSuppressions = new Client_js_11.EmailSuppressionsClient(this._options)));
|
|
122
127
|
}
|
|
123
128
|
get featureRequests() {
|
|
124
129
|
var _a;
|
|
125
|
-
return ((_a = this._featureRequests) !== null && _a !== void 0 ? _a : (this._featureRequests = new
|
|
130
|
+
return ((_a = this._featureRequests) !== null && _a !== void 0 ? _a : (this._featureRequests = new Client_js_12.FeatureRequestsClient(this._options)));
|
|
126
131
|
}
|
|
127
132
|
get issueGroups() {
|
|
128
133
|
var _a;
|
|
129
|
-
return ((_a = this._issueGroups) !== null && _a !== void 0 ? _a : (this._issueGroups = new
|
|
134
|
+
return ((_a = this._issueGroups) !== null && _a !== void 0 ? _a : (this._issueGroups = new Client_js_13.IssueGroupsClient(this._options)));
|
|
130
135
|
}
|
|
131
136
|
get issueStatuses() {
|
|
132
137
|
var _a;
|
|
133
|
-
return ((_a = this._issueStatuses) !== null && _a !== void 0 ? _a : (this._issueStatuses = new
|
|
138
|
+
return ((_a = this._issueStatuses) !== null && _a !== void 0 ? _a : (this._issueStatuses = new Client_js_14.IssueStatusesClient(this._options)));
|
|
134
139
|
}
|
|
135
140
|
get issues() {
|
|
136
141
|
var _a;
|
|
137
|
-
return ((_a = this._issues) !== null && _a !== void 0 ? _a : (this._issues = new
|
|
142
|
+
return ((_a = this._issues) !== null && _a !== void 0 ? _a : (this._issues = new Client_js_15.IssuesClient(this._options)));
|
|
138
143
|
}
|
|
139
144
|
get knowledgeBases() {
|
|
140
145
|
var _a;
|
|
141
|
-
return ((_a = this._knowledgeBases) !== null && _a !== void 0 ? _a : (this._knowledgeBases = new
|
|
146
|
+
return ((_a = this._knowledgeBases) !== null && _a !== void 0 ? _a : (this._knowledgeBases = new Client_js_16.KnowledgeBasesClient(this._options)));
|
|
142
147
|
}
|
|
143
148
|
get macroGroups() {
|
|
144
149
|
var _a;
|
|
145
|
-
return ((_a = this._macroGroups) !== null && _a !== void 0 ? _a : (this._macroGroups = new
|
|
150
|
+
return ((_a = this._macroGroups) !== null && _a !== void 0 ? _a : (this._macroGroups = new Client_js_17.MacroGroupsClient(this._options)));
|
|
146
151
|
}
|
|
147
152
|
get macros() {
|
|
148
153
|
var _a;
|
|
149
|
-
return ((_a = this._macros) !== null && _a !== void 0 ? _a : (this._macros = new
|
|
154
|
+
return ((_a = this._macros) !== null && _a !== void 0 ? _a : (this._macros = new Client_js_18.MacrosClient(this._options)));
|
|
150
155
|
}
|
|
151
156
|
get me() {
|
|
152
157
|
var _a;
|
|
153
|
-
return ((_a = this._me) !== null && _a !== void 0 ? _a : (this._me = new
|
|
158
|
+
return ((_a = this._me) !== null && _a !== void 0 ? _a : (this._me = new Client_js_19.MeClient(this._options)));
|
|
154
159
|
}
|
|
155
160
|
get milestones() {
|
|
156
161
|
var _a;
|
|
157
|
-
return ((_a = this._milestones) !== null && _a !== void 0 ? _a : (this._milestones = new
|
|
162
|
+
return ((_a = this._milestones) !== null && _a !== void 0 ? _a : (this._milestones = new Client_js_20.MilestonesClient(this._options)));
|
|
158
163
|
}
|
|
159
164
|
get projects() {
|
|
160
165
|
var _a;
|
|
161
|
-
return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new
|
|
166
|
+
return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new Client_js_21.ProjectsClient(this._options)));
|
|
162
167
|
}
|
|
163
168
|
get surveys() {
|
|
164
169
|
var _a;
|
|
165
|
-
return ((_a = this._surveys) !== null && _a !== void 0 ? _a : (this._surveys = new
|
|
170
|
+
return ((_a = this._surveys) !== null && _a !== void 0 ? _a : (this._surveys = new Client_js_22.SurveysClient(this._options)));
|
|
166
171
|
}
|
|
167
172
|
get tags() {
|
|
168
173
|
var _a;
|
|
169
|
-
return ((_a = this._tags) !== null && _a !== void 0 ? _a : (this._tags = new
|
|
174
|
+
return ((_a = this._tags) !== null && _a !== void 0 ? _a : (this._tags = new Client_js_23.TagsClient(this._options)));
|
|
170
175
|
}
|
|
171
176
|
get taskStatuses() {
|
|
172
177
|
var _a;
|
|
173
|
-
return ((_a = this._taskStatuses) !== null && _a !== void 0 ? _a : (this._taskStatuses = new
|
|
178
|
+
return ((_a = this._taskStatuses) !== null && _a !== void 0 ? _a : (this._taskStatuses = new Client_js_24.TaskStatusesClient(this._options)));
|
|
174
179
|
}
|
|
175
180
|
get tasks() {
|
|
176
181
|
var _a;
|
|
177
|
-
return ((_a = this._tasks) !== null && _a !== void 0 ? _a : (this._tasks = new
|
|
182
|
+
return ((_a = this._tasks) !== null && _a !== void 0 ? _a : (this._tasks = new Client_js_25.TasksClient(this._options)));
|
|
178
183
|
}
|
|
179
184
|
get teams() {
|
|
180
185
|
var _a;
|
|
181
|
-
return ((_a = this._teams) !== null && _a !== void 0 ? _a : (this._teams = new
|
|
186
|
+
return ((_a = this._teams) !== null && _a !== void 0 ? _a : (this._teams = new Client_js_26.TeamsClient(this._options)));
|
|
182
187
|
}
|
|
183
188
|
get ticketForms() {
|
|
184
189
|
var _a;
|
|
185
|
-
return ((_a = this._ticketForms) !== null && _a !== void 0 ? _a : (this._ticketForms = new
|
|
190
|
+
return ((_a = this._ticketForms) !== null && _a !== void 0 ? _a : (this._ticketForms = new Client_js_27.TicketFormsClient(this._options)));
|
|
186
191
|
}
|
|
187
192
|
get trainingData() {
|
|
188
193
|
var _a;
|
|
189
|
-
return ((_a = this._trainingData) !== null && _a !== void 0 ? _a : (this._trainingData = new
|
|
194
|
+
return ((_a = this._trainingData) !== null && _a !== void 0 ? _a : (this._trainingData = new Client_js_28.TrainingDataClient(this._options)));
|
|
190
195
|
}
|
|
191
196
|
get userRoles() {
|
|
192
197
|
var _a;
|
|
193
|
-
return ((_a = this._userRoles) !== null && _a !== void 0 ? _a : (this._userRoles = new
|
|
198
|
+
return ((_a = this._userRoles) !== null && _a !== void 0 ? _a : (this._userRoles = new Client_js_29.UserRolesClient(this._options)));
|
|
194
199
|
}
|
|
195
200
|
get userStatuses() {
|
|
196
201
|
var _a;
|
|
197
|
-
return ((_a = this._userStatuses) !== null && _a !== void 0 ? _a : (this._userStatuses = new
|
|
202
|
+
return ((_a = this._userStatuses) !== null && _a !== void 0 ? _a : (this._userStatuses = new Client_js_30.UserStatusesClient(this._options)));
|
|
198
203
|
}
|
|
199
204
|
get users() {
|
|
200
205
|
var _a;
|
|
201
|
-
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new
|
|
206
|
+
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_31.UsersClient(this._options)));
|
|
202
207
|
}
|
|
203
208
|
/**
|
|
204
209
|
* Make a passthrough request using the SDK's configured auth, retry, logging, etc.
|
|
@@ -11,4 +11,6 @@ export interface AccountsSearchRequest {
|
|
|
11
11
|
limit?: number;
|
|
12
12
|
/** Fuzzy text search. Results are intersected with any provided filter. */
|
|
13
13
|
search_text?: string;
|
|
14
|
+
/** 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. */
|
|
15
|
+
sort?: Pylon.SearchAccountsSort[];
|
|
14
16
|
}
|
|
@@ -56,7 +56,7 @@ export declare class ContactsClient {
|
|
|
56
56
|
create(request: Pylon.ContactsCreateRequest, requestOptions?: ContactsClient.RequestOptions): core.HttpResponsePromise<Pylon.CreateContactResponseBody>;
|
|
57
57
|
private __create;
|
|
58
58
|
/**
|
|
59
|
-
* Merges a contact into a surviving contact.
|
|
59
|
+
* Merges a contact into a surviving contact. Both contacts must belong to the same account, unless the merged contact has no account, in which case 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
60
|
*
|
|
61
61
|
* **Rate limit:** 30 requests per minute
|
|
62
62
|
*
|
|
@@ -180,4 +180,28 @@ export declare class ContactsClient {
|
|
|
180
180
|
*/
|
|
181
181
|
update(request: Pylon.ContactsUpdateRequest, requestOptions?: ContactsClient.RequestOptions): core.HttpResponsePromise<Pylon.UpdateContactResponseBody>;
|
|
182
182
|
private __update;
|
|
183
|
+
/**
|
|
184
|
+
* Sends or resends a portal invitation to the contact's primary email. The portal must be enabled and the contact must already have portal access. Does not change the contact's role. Requires customer portal settings write permission and write access to the contact's primary account, if any. Each successful call requests another invitation; success does not guarantee email delivery.
|
|
185
|
+
*
|
|
186
|
+
* **Rate limit:** 30 requests per minute
|
|
187
|
+
*
|
|
188
|
+
* @param {Pylon.ContactsPortalInvitationRequest} request
|
|
189
|
+
* @param {ContactsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
190
|
+
*
|
|
191
|
+
* @throws {@link Pylon.BadRequestError}
|
|
192
|
+
* @throws {@link Pylon.UnauthorizedError}
|
|
193
|
+
* @throws {@link Pylon.ForbiddenError}
|
|
194
|
+
* @throws {@link Pylon.NotFoundError}
|
|
195
|
+
* @throws {@link Pylon.TooManyRequestsError}
|
|
196
|
+
* @throws {@link Pylon.InternalServerError}
|
|
197
|
+
* @throws {@link errors.PylonError}
|
|
198
|
+
* @throws {@link errors.PylonTimeoutError}
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* await client.contacts.portalInvitation({
|
|
202
|
+
* contact_id: "id"
|
|
203
|
+
* })
|
|
204
|
+
*/
|
|
205
|
+
portalInvitation(request: Pylon.ContactsPortalInvitationRequest, requestOptions?: ContactsClient.RequestOptions): core.HttpResponsePromise<Pylon.SendCustomerPortalInvitationResponseBody>;
|
|
206
|
+
private __portalInvitation;
|
|
183
207
|
}
|
|
@@ -233,7 +233,7 @@ class ContactsClient {
|
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
235
|
/**
|
|
236
|
-
* Merges a contact into a surviving contact.
|
|
236
|
+
* Merges a contact into a surviving contact. Both contacts must belong to the same account, unless the merged contact has no account, in which case 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.
|
|
237
237
|
*
|
|
238
238
|
* **Rate limit:** 30 requests per minute
|
|
239
239
|
*
|
|
@@ -608,5 +608,78 @@ class ContactsClient {
|
|
|
608
608
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/contacts/{id}");
|
|
609
609
|
});
|
|
610
610
|
}
|
|
611
|
+
/**
|
|
612
|
+
* Sends or resends a portal invitation to the contact's primary email. The portal must be enabled and the contact must already have portal access. Does not change the contact's role. Requires customer portal settings write permission and write access to the contact's primary account, if any. Each successful call requests another invitation; success does not guarantee email delivery.
|
|
613
|
+
*
|
|
614
|
+
* **Rate limit:** 30 requests per minute
|
|
615
|
+
*
|
|
616
|
+
* @param {Pylon.ContactsPortalInvitationRequest} request
|
|
617
|
+
* @param {ContactsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
618
|
+
*
|
|
619
|
+
* @throws {@link Pylon.BadRequestError}
|
|
620
|
+
* @throws {@link Pylon.UnauthorizedError}
|
|
621
|
+
* @throws {@link Pylon.ForbiddenError}
|
|
622
|
+
* @throws {@link Pylon.NotFoundError}
|
|
623
|
+
* @throws {@link Pylon.TooManyRequestsError}
|
|
624
|
+
* @throws {@link Pylon.InternalServerError}
|
|
625
|
+
* @throws {@link errors.PylonError}
|
|
626
|
+
* @throws {@link errors.PylonTimeoutError}
|
|
627
|
+
*
|
|
628
|
+
* @example
|
|
629
|
+
* await client.contacts.portalInvitation({
|
|
630
|
+
* contact_id: "id"
|
|
631
|
+
* })
|
|
632
|
+
*/
|
|
633
|
+
portalInvitation(request, requestOptions) {
|
|
634
|
+
return core.HttpResponsePromise.fromPromise(this.__portalInvitation(request, requestOptions));
|
|
635
|
+
}
|
|
636
|
+
__portalInvitation(request, requestOptions) {
|
|
637
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
638
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
639
|
+
const { contact_id: contactId } = request;
|
|
640
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
641
|
+
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);
|
|
642
|
+
const _response = yield core.fetcher({
|
|
643
|
+
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/${core.url.encodePathParam(contactId)}/portal-invitation`),
|
|
644
|
+
method: "POST",
|
|
645
|
+
headers: _headers,
|
|
646
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
647
|
+
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,
|
|
648
|
+
maxRetries: 0,
|
|
649
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
650
|
+
fetchFn: (_g = this._options) === null || _g === void 0 ? void 0 : _g.fetch,
|
|
651
|
+
logging: this._options.logging,
|
|
652
|
+
});
|
|
653
|
+
if (_response.ok) {
|
|
654
|
+
return {
|
|
655
|
+
data: _response.body,
|
|
656
|
+
rawResponse: _response.rawResponse,
|
|
657
|
+
};
|
|
658
|
+
}
|
|
659
|
+
if (_response.error.reason === "status-code") {
|
|
660
|
+
switch (_response.error.statusCode) {
|
|
661
|
+
case 400:
|
|
662
|
+
throw new Pylon.BadRequestError(_response.error.body, _response.rawResponse);
|
|
663
|
+
case 401:
|
|
664
|
+
throw new Pylon.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
665
|
+
case 403:
|
|
666
|
+
throw new Pylon.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
667
|
+
case 404:
|
|
668
|
+
throw new Pylon.NotFoundError(_response.error.body, _response.rawResponse);
|
|
669
|
+
case 429:
|
|
670
|
+
throw new Pylon.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
671
|
+
case 500:
|
|
672
|
+
throw new Pylon.InternalServerError(_response.error.body, _response.rawResponse);
|
|
673
|
+
default:
|
|
674
|
+
throw new errors.PylonError({
|
|
675
|
+
statusCode: _response.error.statusCode,
|
|
676
|
+
body: _response.error.body,
|
|
677
|
+
rawResponse: _response.rawResponse,
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/contacts/{contact_id}/portal-invitation");
|
|
682
|
+
});
|
|
683
|
+
}
|
|
611
684
|
}
|
|
612
685
|
exports.ContactsClient = ContactsClient;
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
export interface ContactsMergeRequest {
|
|
9
9
|
/** The ID of the contact to merge into the surviving contact. This contact is permanently deleted after its data is transferred. */
|
|
10
10
|
merge_contact_id: string;
|
|
11
|
-
/** The ID of the contact that will survive the merge and receive the merged data.
|
|
11
|
+
/** The ID of the contact that will survive the merge and receive the merged data. If the merged contact belongs to an account, this contact must belong to the same account. */
|
|
12
12
|
merge_into_contact_id: string;
|
|
13
13
|
}
|
|
@@ -3,5 +3,6 @@ export type { ContactsDeleteRequest } from "./ContactsDeleteRequest.js";
|
|
|
3
3
|
export type { ContactsGetRequest } from "./ContactsGetRequest.js";
|
|
4
4
|
export type { ContactsListRequest } from "./ContactsListRequest.js";
|
|
5
5
|
export type { ContactsMergeRequest } from "./ContactsMergeRequest.js";
|
|
6
|
+
export type { ContactsPortalInvitationRequest } from "./ContactsPortalInvitationRequest.js";
|
|
6
7
|
export type { ContactsSearchRequest } from "./ContactsSearchRequest.js";
|
|
7
8
|
export type { ContactsUpdateRequest } from "./ContactsUpdateRequest.js";
|
|
@@ -0,0 +1,53 @@
|
|
|
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 CustomerPortalClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class CustomerPortalClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<CustomerPortalClient.Options>;
|
|
12
|
+
constructor(options: CustomerPortalClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Returns the organization's customer portal settings.
|
|
15
|
+
*
|
|
16
|
+
* **Rate limit:** 120 requests per minute
|
|
17
|
+
*
|
|
18
|
+
* @param {CustomerPortalClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
19
|
+
*
|
|
20
|
+
* @throws {@link Pylon.UnauthorizedError}
|
|
21
|
+
* @throws {@link Pylon.ForbiddenError}
|
|
22
|
+
* @throws {@link Pylon.TooManyRequestsError}
|
|
23
|
+
* @throws {@link Pylon.InternalServerError}
|
|
24
|
+
* @throws {@link errors.PylonError}
|
|
25
|
+
* @throws {@link errors.PylonTimeoutError}
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* await client.customerPortal.getSettings()
|
|
29
|
+
*/
|
|
30
|
+
getSettings(requestOptions?: CustomerPortalClient.RequestOptions): core.HttpResponsePromise<Pylon.GetCustomerPortalSettingsResponseBody>;
|
|
31
|
+
private __getSettings;
|
|
32
|
+
/**
|
|
33
|
+
* Updates the organization's customer portal settings. Only provided fields are modified.
|
|
34
|
+
*
|
|
35
|
+
* **Rate limit:** 30 requests per minute
|
|
36
|
+
*
|
|
37
|
+
* @param {Pylon.CustomerPortalUpdateSettingsRequest} request
|
|
38
|
+
* @param {CustomerPortalClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
|
+
*
|
|
40
|
+
* @throws {@link Pylon.BadRequestError}
|
|
41
|
+
* @throws {@link Pylon.UnauthorizedError}
|
|
42
|
+
* @throws {@link Pylon.ForbiddenError}
|
|
43
|
+
* @throws {@link Pylon.TooManyRequestsError}
|
|
44
|
+
* @throws {@link Pylon.InternalServerError}
|
|
45
|
+
* @throws {@link errors.PylonError}
|
|
46
|
+
* @throws {@link errors.PylonTimeoutError}
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* await client.customerPortal.updateSettings()
|
|
50
|
+
*/
|
|
51
|
+
updateSettings(request?: Pylon.CustomerPortalUpdateSettingsRequest, requestOptions?: CustomerPortalClient.RequestOptions): core.HttpResponsePromise<Pylon.GetCustomerPortalSettingsResponseBody>;
|
|
52
|
+
private __updateSettings;
|
|
53
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.CustomerPortalClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
48
|
+
const headers_js_1 = require("../../../../core/headers.js");
|
|
49
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
50
|
+
const requestBody_js_1 = require("../../../../core/requestBody.js");
|
|
51
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
52
|
+
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
53
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
54
|
+
const Pylon = __importStar(require("../../../index.js"));
|
|
55
|
+
class CustomerPortalClient {
|
|
56
|
+
constructor(options) {
|
|
57
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Returns the organization's customer portal settings.
|
|
61
|
+
*
|
|
62
|
+
* **Rate limit:** 120 requests per minute
|
|
63
|
+
*
|
|
64
|
+
* @param {CustomerPortalClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link Pylon.UnauthorizedError}
|
|
67
|
+
* @throws {@link Pylon.ForbiddenError}
|
|
68
|
+
* @throws {@link Pylon.TooManyRequestsError}
|
|
69
|
+
* @throws {@link Pylon.InternalServerError}
|
|
70
|
+
* @throws {@link errors.PylonError}
|
|
71
|
+
* @throws {@link errors.PylonTimeoutError}
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* await client.customerPortal.getSettings()
|
|
75
|
+
*/
|
|
76
|
+
getSettings(requestOptions) {
|
|
77
|
+
return core.HttpResponsePromise.fromPromise(this.__getSettings(requestOptions));
|
|
78
|
+
}
|
|
79
|
+
__getSettings(requestOptions) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
82
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
83
|
+
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);
|
|
84
|
+
const _response = yield core.fetcher({
|
|
85
|
+
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, "customer-portal/settings"),
|
|
86
|
+
method: "GET",
|
|
87
|
+
headers: _headers,
|
|
88
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
89
|
+
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,
|
|
90
|
+
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,
|
|
91
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
92
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
93
|
+
logging: this._options.logging,
|
|
94
|
+
});
|
|
95
|
+
if (_response.ok) {
|
|
96
|
+
return {
|
|
97
|
+
data: _response.body,
|
|
98
|
+
rawResponse: _response.rawResponse,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
if (_response.error.reason === "status-code") {
|
|
102
|
+
switch (_response.error.statusCode) {
|
|
103
|
+
case 401:
|
|
104
|
+
throw new Pylon.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
105
|
+
case 403:
|
|
106
|
+
throw new Pylon.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
107
|
+
case 429:
|
|
108
|
+
throw new Pylon.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
109
|
+
case 500:
|
|
110
|
+
throw new Pylon.InternalServerError(_response.error.body, _response.rawResponse);
|
|
111
|
+
default:
|
|
112
|
+
throw new errors.PylonError({
|
|
113
|
+
statusCode: _response.error.statusCode,
|
|
114
|
+
body: _response.error.body,
|
|
115
|
+
rawResponse: _response.rawResponse,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer-portal/settings");
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Updates the organization's customer portal settings. Only provided fields are modified.
|
|
124
|
+
*
|
|
125
|
+
* **Rate limit:** 30 requests per minute
|
|
126
|
+
*
|
|
127
|
+
* @param {Pylon.CustomerPortalUpdateSettingsRequest} request
|
|
128
|
+
* @param {CustomerPortalClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
129
|
+
*
|
|
130
|
+
* @throws {@link Pylon.BadRequestError}
|
|
131
|
+
* @throws {@link Pylon.UnauthorizedError}
|
|
132
|
+
* @throws {@link Pylon.ForbiddenError}
|
|
133
|
+
* @throws {@link Pylon.TooManyRequestsError}
|
|
134
|
+
* @throws {@link Pylon.InternalServerError}
|
|
135
|
+
* @throws {@link errors.PylonError}
|
|
136
|
+
* @throws {@link errors.PylonTimeoutError}
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* await client.customerPortal.updateSettings()
|
|
140
|
+
*/
|
|
141
|
+
updateSettings(request = {}, requestOptions) {
|
|
142
|
+
return core.HttpResponsePromise.fromPromise(this.__updateSettings(request, requestOptions));
|
|
143
|
+
}
|
|
144
|
+
__updateSettings() {
|
|
145
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
146
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
147
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
148
|
+
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);
|
|
149
|
+
const _response = yield core.fetcher({
|
|
150
|
+
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, "customer-portal/settings"),
|
|
151
|
+
method: "PATCH",
|
|
152
|
+
headers: _headers,
|
|
153
|
+
contentType: "application/json",
|
|
154
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
155
|
+
requestType: "json",
|
|
156
|
+
body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(request, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
157
|
+
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,
|
|
158
|
+
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,
|
|
159
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
160
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
161
|
+
logging: this._options.logging,
|
|
162
|
+
});
|
|
163
|
+
if (_response.ok) {
|
|
164
|
+
return {
|
|
165
|
+
data: _response.body,
|
|
166
|
+
rawResponse: _response.rawResponse,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
if (_response.error.reason === "status-code") {
|
|
170
|
+
switch (_response.error.statusCode) {
|
|
171
|
+
case 400:
|
|
172
|
+
throw new Pylon.BadRequestError(_response.error.body, _response.rawResponse);
|
|
173
|
+
case 401:
|
|
174
|
+
throw new Pylon.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
175
|
+
case 403:
|
|
176
|
+
throw new Pylon.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
177
|
+
case 429:
|
|
178
|
+
throw new Pylon.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
179
|
+
case 500:
|
|
180
|
+
throw new Pylon.InternalServerError(_response.error.body, _response.rawResponse);
|
|
181
|
+
default:
|
|
182
|
+
throw new errors.PylonError({
|
|
183
|
+
statusCode: _response.error.statusCode,
|
|
184
|
+
body: _response.error.body,
|
|
185
|
+
rawResponse: _response.rawResponse,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/customer-portal/settings");
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
exports.CustomerPortalClient = CustomerPortalClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|