@opens/gateways 1.14.3 → 1.14.4
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/access-hub/contracts/index.d.mts +96 -0
- package/dist/access-hub/contracts/index.d.ts +96 -0
- package/dist/access-hub/contracts/index.js +19 -0
- package/dist/access-hub/contracts/index.js.map +1 -0
- package/dist/access-hub/contracts/index.mjs +1 -0
- package/dist/access-hub/contracts/index.mjs.map +1 -0
- package/dist/index.d.mts +48 -1
- package/dist/index.d.ts +48 -1
- package/dist/index.js +81 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +81 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/** Generic paginated result wrapper. */
|
|
2
|
+
interface PaginatedResult<T> {
|
|
3
|
+
data: T[];
|
|
4
|
+
meta: {
|
|
5
|
+
limit?: number;
|
|
6
|
+
nextCursor?: string | null;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
/** Represents an access group. */
|
|
10
|
+
interface AccessGroup {
|
|
11
|
+
id: string;
|
|
12
|
+
sequenceId: number;
|
|
13
|
+
name: string;
|
|
14
|
+
description: string | null;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
updatedAt: string;
|
|
17
|
+
}
|
|
18
|
+
/** Represents an access package group relation. */
|
|
19
|
+
interface AccessPackageGroup {
|
|
20
|
+
id: string;
|
|
21
|
+
sequenceId: number;
|
|
22
|
+
accessPackageId: string;
|
|
23
|
+
groupId: string;
|
|
24
|
+
createdAt: string;
|
|
25
|
+
updatedAt: string;
|
|
26
|
+
group: AccessGroup;
|
|
27
|
+
}
|
|
28
|
+
/** Represents an access package. */
|
|
29
|
+
interface AccessPackage {
|
|
30
|
+
id: string;
|
|
31
|
+
sequenceId: number;
|
|
32
|
+
name: string;
|
|
33
|
+
description: string;
|
|
34
|
+
createdAt: string;
|
|
35
|
+
updatedAt: string;
|
|
36
|
+
accessPackageGroups?: AccessPackageGroup[];
|
|
37
|
+
}
|
|
38
|
+
/** Represents a company access package item. */
|
|
39
|
+
interface CompanyAccessPackageItem {
|
|
40
|
+
id: string;
|
|
41
|
+
sequenceId: number;
|
|
42
|
+
companyId: string;
|
|
43
|
+
accessPackageId: string;
|
|
44
|
+
createdAt: string;
|
|
45
|
+
updatedAt: string;
|
|
46
|
+
accessPackage?: AccessPackage;
|
|
47
|
+
accessPackageGroups?: AccessPackageGroup[];
|
|
48
|
+
}
|
|
49
|
+
/** Represents a company resource. */
|
|
50
|
+
interface CompanyResource {
|
|
51
|
+
id: string;
|
|
52
|
+
sequenceId: number;
|
|
53
|
+
name: string;
|
|
54
|
+
description: string | null;
|
|
55
|
+
createdAt: string;
|
|
56
|
+
updatedAt: string;
|
|
57
|
+
}
|
|
58
|
+
/** Parameters for fetching access packages. */
|
|
59
|
+
interface GetAccessPackagesParams {
|
|
60
|
+
id?: string;
|
|
61
|
+
name?: string;
|
|
62
|
+
include?: Array<'resources' | 'groups'>;
|
|
63
|
+
limit?: number;
|
|
64
|
+
sortBy?: 'createdAt' | 'name' | 'sequenceId';
|
|
65
|
+
sortOrder?: 'ASC' | 'DESC';
|
|
66
|
+
cursor?: string;
|
|
67
|
+
}
|
|
68
|
+
/** Parameters for fetching company access packages. */
|
|
69
|
+
interface GetCompanyAccessPackagesParams {
|
|
70
|
+
id?: string;
|
|
71
|
+
companyId?: string;
|
|
72
|
+
accessPackageId?: string;
|
|
73
|
+
include?: Array<'accessPackages' | 'groups' | 'resources'>;
|
|
74
|
+
limit?: number;
|
|
75
|
+
sortBy?: 'createdAt' | 'name';
|
|
76
|
+
sortOrder?: 'ASC' | 'DESC';
|
|
77
|
+
cursor?: string;
|
|
78
|
+
}
|
|
79
|
+
/** Payload for creating a company access package. */
|
|
80
|
+
interface CreateCompanyAccessPackagePayload {
|
|
81
|
+
companyId: string;
|
|
82
|
+
accessPackageId: string;
|
|
83
|
+
}
|
|
84
|
+
/** Payload for updating a company access package. */
|
|
85
|
+
interface UpdateCompanyAccessPackagePayload {
|
|
86
|
+
accessPackageId: string;
|
|
87
|
+
}
|
|
88
|
+
/** Parameters for fetching company resources. */
|
|
89
|
+
interface GetCompanyResourcesParams {
|
|
90
|
+
companyId: string;
|
|
91
|
+
resourceId?: string;
|
|
92
|
+
resourceName?: string;
|
|
93
|
+
attributes?: Array<'id' | 'name' | 'sequenceId' | 'description' | 'createdAt' | 'updatedAt'>;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type { AccessGroup, AccessPackage, AccessPackageGroup, CompanyAccessPackageItem, CompanyResource, CreateCompanyAccessPackagePayload, GetAccessPackagesParams, GetCompanyAccessPackagesParams, GetCompanyResourcesParams, PaginatedResult, UpdateCompanyAccessPackagePayload };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/** Generic paginated result wrapper. */
|
|
2
|
+
interface PaginatedResult<T> {
|
|
3
|
+
data: T[];
|
|
4
|
+
meta: {
|
|
5
|
+
limit?: number;
|
|
6
|
+
nextCursor?: string | null;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
/** Represents an access group. */
|
|
10
|
+
interface AccessGroup {
|
|
11
|
+
id: string;
|
|
12
|
+
sequenceId: number;
|
|
13
|
+
name: string;
|
|
14
|
+
description: string | null;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
updatedAt: string;
|
|
17
|
+
}
|
|
18
|
+
/** Represents an access package group relation. */
|
|
19
|
+
interface AccessPackageGroup {
|
|
20
|
+
id: string;
|
|
21
|
+
sequenceId: number;
|
|
22
|
+
accessPackageId: string;
|
|
23
|
+
groupId: string;
|
|
24
|
+
createdAt: string;
|
|
25
|
+
updatedAt: string;
|
|
26
|
+
group: AccessGroup;
|
|
27
|
+
}
|
|
28
|
+
/** Represents an access package. */
|
|
29
|
+
interface AccessPackage {
|
|
30
|
+
id: string;
|
|
31
|
+
sequenceId: number;
|
|
32
|
+
name: string;
|
|
33
|
+
description: string;
|
|
34
|
+
createdAt: string;
|
|
35
|
+
updatedAt: string;
|
|
36
|
+
accessPackageGroups?: AccessPackageGroup[];
|
|
37
|
+
}
|
|
38
|
+
/** Represents a company access package item. */
|
|
39
|
+
interface CompanyAccessPackageItem {
|
|
40
|
+
id: string;
|
|
41
|
+
sequenceId: number;
|
|
42
|
+
companyId: string;
|
|
43
|
+
accessPackageId: string;
|
|
44
|
+
createdAt: string;
|
|
45
|
+
updatedAt: string;
|
|
46
|
+
accessPackage?: AccessPackage;
|
|
47
|
+
accessPackageGroups?: AccessPackageGroup[];
|
|
48
|
+
}
|
|
49
|
+
/** Represents a company resource. */
|
|
50
|
+
interface CompanyResource {
|
|
51
|
+
id: string;
|
|
52
|
+
sequenceId: number;
|
|
53
|
+
name: string;
|
|
54
|
+
description: string | null;
|
|
55
|
+
createdAt: string;
|
|
56
|
+
updatedAt: string;
|
|
57
|
+
}
|
|
58
|
+
/** Parameters for fetching access packages. */
|
|
59
|
+
interface GetAccessPackagesParams {
|
|
60
|
+
id?: string;
|
|
61
|
+
name?: string;
|
|
62
|
+
include?: Array<'resources' | 'groups'>;
|
|
63
|
+
limit?: number;
|
|
64
|
+
sortBy?: 'createdAt' | 'name' | 'sequenceId';
|
|
65
|
+
sortOrder?: 'ASC' | 'DESC';
|
|
66
|
+
cursor?: string;
|
|
67
|
+
}
|
|
68
|
+
/** Parameters for fetching company access packages. */
|
|
69
|
+
interface GetCompanyAccessPackagesParams {
|
|
70
|
+
id?: string;
|
|
71
|
+
companyId?: string;
|
|
72
|
+
accessPackageId?: string;
|
|
73
|
+
include?: Array<'accessPackages' | 'groups' | 'resources'>;
|
|
74
|
+
limit?: number;
|
|
75
|
+
sortBy?: 'createdAt' | 'name';
|
|
76
|
+
sortOrder?: 'ASC' | 'DESC';
|
|
77
|
+
cursor?: string;
|
|
78
|
+
}
|
|
79
|
+
/** Payload for creating a company access package. */
|
|
80
|
+
interface CreateCompanyAccessPackagePayload {
|
|
81
|
+
companyId: string;
|
|
82
|
+
accessPackageId: string;
|
|
83
|
+
}
|
|
84
|
+
/** Payload for updating a company access package. */
|
|
85
|
+
interface UpdateCompanyAccessPackagePayload {
|
|
86
|
+
accessPackageId: string;
|
|
87
|
+
}
|
|
88
|
+
/** Parameters for fetching company resources. */
|
|
89
|
+
interface GetCompanyResourcesParams {
|
|
90
|
+
companyId: string;
|
|
91
|
+
resourceId?: string;
|
|
92
|
+
resourceName?: string;
|
|
93
|
+
attributes?: Array<'id' | 'name' | 'sequenceId' | 'description' | 'createdAt' | 'updatedAt'>;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type { AccessGroup, AccessPackage, AccessPackageGroup, CompanyAccessPackageItem, CompanyResource, CreateCompanyAccessPackagePayload, GetAccessPackagesParams, GetCompanyAccessPackagesParams, GetCompanyResourcesParams, PaginatedResult, UpdateCompanyAccessPackagePayload };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/access-hub/contracts/index.ts
|
|
17
|
+
var contracts_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(contracts_exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/access-hub/contracts/index.ts"],"sourcesContent":["export type {\n PaginatedResult,\n AccessGroup,\n AccessPackageGroup,\n AccessPackage,\n CompanyAccessPackageItem,\n CompanyResource,\n GetAccessPackagesParams,\n GetCompanyAccessPackagesParams,\n CreateCompanyAccessPackagePayload,\n UpdateCompanyAccessPackagePayload,\n GetCompanyResourcesParams,\n} from './access-hub';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/index.d.mts
CHANGED
|
@@ -19,6 +19,8 @@ import { ListContactHistoryRequest, ContactHistoryResponse } from './call-report
|
|
|
19
19
|
export { ContactHistoryIndex, ContactHistorySortOrder, ContactInteractionResponse, InteractionCallStepResponse, InteractionChatStepResponse, InteractionMemberResponse, InteractionOrganizationResponse } from './call-report/contracts/index.mjs';
|
|
20
20
|
import { GetCommentHistoryRequest, CommentHistoryPage, CasePermissions, UpdateCasePermissionsRequest, GetCaseFeedByActionsRequest, CaseFeedByActionItem } from './cases/contracts/index.mjs';
|
|
21
21
|
export { CasePermissionsValue, CommentHistoryChangeType, CommentHistoryCursor, CommentHistoryEntry } from './cases/contracts/index.mjs';
|
|
22
|
+
import { GetAccessPackagesParams, PaginatedResult, AccessPackage, GetCompanyAccessPackagesParams, CompanyAccessPackageItem, CreateCompanyAccessPackagePayload, UpdateCompanyAccessPackagePayload, GetCompanyResourcesParams, CompanyResource } from './access-hub/contracts/index.mjs';
|
|
23
|
+
export { AccessGroup, AccessPackageGroup } from './access-hub/contracts/index.mjs';
|
|
22
24
|
export { Event } from './rh/contracts/index.mjs';
|
|
23
25
|
|
|
24
26
|
/**
|
|
@@ -532,6 +534,46 @@ declare class RhGateway {
|
|
|
532
534
|
constructor(httpClient: AxiosInstance, baseUrl: string);
|
|
533
535
|
}
|
|
534
536
|
|
|
537
|
+
/**
|
|
538
|
+
* Gateway for interacting with the Access Hub API.
|
|
539
|
+
*/
|
|
540
|
+
declare class AccessHubGateway {
|
|
541
|
+
private readonly httpClient;
|
|
542
|
+
private readonly baseUrl;
|
|
543
|
+
constructor(httpClient: AxiosInstance, baseUrl: string);
|
|
544
|
+
/**
|
|
545
|
+
* Retrieves a paginated list of access packages.
|
|
546
|
+
* @param params - Optional filters and pagination options.
|
|
547
|
+
* @returns A paginated result of access packages.
|
|
548
|
+
*/
|
|
549
|
+
getAccessPackages(params?: GetAccessPackagesParams): Promise<PaginatedResult<AccessPackage>>;
|
|
550
|
+
/**
|
|
551
|
+
* Retrieves a paginated list of company access packages.
|
|
552
|
+
* @param params - Optional filters and pagination options.
|
|
553
|
+
* @returns A paginated result of company access package items.
|
|
554
|
+
*/
|
|
555
|
+
getCompanyAccessPackages(params?: GetCompanyAccessPackagesParams): Promise<PaginatedResult<CompanyAccessPackageItem>>;
|
|
556
|
+
/**
|
|
557
|
+
* Creates a new company access package.
|
|
558
|
+
* @param payload - The company access package creation payload.
|
|
559
|
+
* @returns The created company access package item.
|
|
560
|
+
*/
|
|
561
|
+
createCompanyAccessPackage(payload: CreateCompanyAccessPackagePayload): Promise<CompanyAccessPackageItem>;
|
|
562
|
+
/**
|
|
563
|
+
* Updates an existing company access package.
|
|
564
|
+
* @param id - The ID of the company access package to update.
|
|
565
|
+
* @param payload - The update payload.
|
|
566
|
+
* @returns The updated company access package item.
|
|
567
|
+
*/
|
|
568
|
+
updateCompanyAccessPackage(id: string, payload: UpdateCompanyAccessPackagePayload): Promise<CompanyAccessPackageItem>;
|
|
569
|
+
/**
|
|
570
|
+
* Retrieves company resources.
|
|
571
|
+
* @param params - Filters for company resources.
|
|
572
|
+
* @returns A list of company resources.
|
|
573
|
+
*/
|
|
574
|
+
getCompanyResources(params: GetCompanyResourcesParams): Promise<CompanyResource[]>;
|
|
575
|
+
}
|
|
576
|
+
|
|
535
577
|
/**
|
|
536
578
|
* Maps service identifiers to their corresponding gateway types.
|
|
537
579
|
* Used by the `gateway()` function to infer the correct return type
|
|
@@ -552,6 +594,7 @@ type GatewayMap = {
|
|
|
552
594
|
'call-report': CallReportGateway;
|
|
553
595
|
cases: CasesGateway;
|
|
554
596
|
rh: RhGateway;
|
|
597
|
+
'access-hub': AccessHubGateway;
|
|
555
598
|
};
|
|
556
599
|
/**
|
|
557
600
|
* Parameters required to configure the SDK client.
|
|
@@ -597,6 +640,9 @@ interface GatewayClientParams {
|
|
|
597
640
|
rh?: {
|
|
598
641
|
baseUrl: string;
|
|
599
642
|
};
|
|
643
|
+
accessHub?: {
|
|
644
|
+
baseUrl: string;
|
|
645
|
+
};
|
|
600
646
|
};
|
|
601
647
|
}
|
|
602
648
|
|
|
@@ -612,6 +658,7 @@ declare const SERVICE_GATEWAYS: {
|
|
|
612
658
|
readonly CALL_REPORT: "call-report";
|
|
613
659
|
readonly CASES: "cases";
|
|
614
660
|
readonly RH: "rh";
|
|
661
|
+
readonly ACCESS_HUB: "access-hub";
|
|
615
662
|
};
|
|
616
663
|
type SERVICE_GATEWAYS = (typeof SERVICE_GATEWAYS)[keyof typeof SERVICE_GATEWAYS];
|
|
617
664
|
|
|
@@ -638,4 +685,4 @@ declare const configure: (params: GatewayClientParams) => void;
|
|
|
638
685
|
*/
|
|
639
686
|
declare function gateway<T extends keyof GatewayMap>(service: T): GatewayMap[T];
|
|
640
687
|
|
|
641
|
-
export { AttachmentByIdResponse, AudioConvertResponse, Campaign, CampaignAccessResponse, CampaignCompanyPaginatedResponse, CampaignCompanyQueryParams, CampaignCompanyResponse, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CancelInvitationRequest, CaseFeedByActionItem, CasePermissions, CommentHistoryPage, CompanyResponse, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, CreateIntegrationActionRequest, CreateIntegrationFieldRequest, CreateIntegrationPartnerRequest, CreateWebhookRequest$1 as CreateWebhookRequest, DeleteIntegrationActionParams, DeleteIntegrationFieldParams, DeleteIntegrationPartnerParams, EnableCampaignCompanyRequest, FindOrCreateQueueRuleRequest, GetAllUsersParams, GetAllUsersResponse, GetAttachmentByIdRequest, GetCaseFeedByActionsRequest, GetCommentHistoryRequest, GetConfigTemplatesParams, GetConfigTemplatesResponse, GetConfigsByProviderParams, GetContactPhonesParams, GetInitialContextRequest, GetInitialContextResponse, GetIntegrationHooksCatalogRequest, GetIntegrationPartnersByCompanyRequest, GetManagedUsersResponse, GetMemberQueuesRequest, GetMessagesByCursorRequest, GetMessagesByCursorResponse, GetPresignedUrlRequest, GetProviderConfigurationsParams, GetProviderDisplayInfoParams, GetRoomByIdRequest, GetRootRulesRequest, GetServiceGroupsParams, GetWebhooksByCompanyRequest$1 as GetWebhooksByCompanyRequest, HookCatalogItem, IntegrationAction, IntegrationField, IntegrationPartner, InvitationResponse, ListContactHistoryRequest, ListInvitationsRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, MarkMessagesAsReadRequest, MarkMessagesAsReadResponse, MessageResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, PatchCampaignContactRequest, PatchCampaignRequest, ProviderConfigurationsResponse, ProviderDisplayInfoResponse, ProviderListResponse, Queue, QueueMember, QueueRule, ReplyInvitationRequest, RoomMemberResponse, RoomResponse, RootRulesResponse, SERVICE_GATEWAYS, SERVICE_GATEWAYS as SERVICE_GATEWAYS_TYPE, SendAttachmentMessageResponse, SendMessageRequest, ServiceGroupsResponse, UpdateCasePermissionsRequest, UpdateIntegrationActionParams, UpdateIntegrationFieldParams, UpdateMemberInRoomRequest, UploadPresignedUrlResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };
|
|
688
|
+
export { AccessPackage, AttachmentByIdResponse, AudioConvertResponse, Campaign, CampaignAccessResponse, CampaignCompanyPaginatedResponse, CampaignCompanyQueryParams, CampaignCompanyResponse, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CancelInvitationRequest, CaseFeedByActionItem, CasePermissions, CommentHistoryPage, CompanyAccessPackageItem, CompanyResource, CompanyResponse, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, CreateCompanyAccessPackagePayload, CreateIntegrationActionRequest, CreateIntegrationFieldRequest, CreateIntegrationPartnerRequest, CreateWebhookRequest$1 as CreateWebhookRequest, DeleteIntegrationActionParams, DeleteIntegrationFieldParams, DeleteIntegrationPartnerParams, EnableCampaignCompanyRequest, FindOrCreateQueueRuleRequest, GetAccessPackagesParams, GetAllUsersParams, GetAllUsersResponse, GetAttachmentByIdRequest, GetCaseFeedByActionsRequest, GetCommentHistoryRequest, GetCompanyAccessPackagesParams, GetCompanyResourcesParams, GetConfigTemplatesParams, GetConfigTemplatesResponse, GetConfigsByProviderParams, GetContactPhonesParams, GetInitialContextRequest, GetInitialContextResponse, GetIntegrationHooksCatalogRequest, GetIntegrationPartnersByCompanyRequest, GetManagedUsersResponse, GetMemberQueuesRequest, GetMessagesByCursorRequest, GetMessagesByCursorResponse, GetPresignedUrlRequest, GetProviderConfigurationsParams, GetProviderDisplayInfoParams, GetRoomByIdRequest, GetRootRulesRequest, GetServiceGroupsParams, GetWebhooksByCompanyRequest$1 as GetWebhooksByCompanyRequest, HookCatalogItem, IntegrationAction, IntegrationField, IntegrationPartner, InvitationResponse, ListContactHistoryRequest, ListInvitationsRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, MarkMessagesAsReadRequest, MarkMessagesAsReadResponse, MessageResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, PaginatedResult, PatchCampaignContactRequest, PatchCampaignRequest, ProviderConfigurationsResponse, ProviderDisplayInfoResponse, ProviderListResponse, Queue, QueueMember, QueueRule, ReplyInvitationRequest, RoomMemberResponse, RoomResponse, RootRulesResponse, SERVICE_GATEWAYS, SERVICE_GATEWAYS as SERVICE_GATEWAYS_TYPE, SendAttachmentMessageResponse, SendMessageRequest, ServiceGroupsResponse, UpdateCasePermissionsRequest, UpdateCompanyAccessPackagePayload, UpdateIntegrationActionParams, UpdateIntegrationFieldParams, UpdateMemberInRoomRequest, UploadPresignedUrlResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };
|
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ import { ListContactHistoryRequest, ContactHistoryResponse } from './call-report
|
|
|
19
19
|
export { ContactHistoryIndex, ContactHistorySortOrder, ContactInteractionResponse, InteractionCallStepResponse, InteractionChatStepResponse, InteractionMemberResponse, InteractionOrganizationResponse } from './call-report/contracts/index.js';
|
|
20
20
|
import { GetCommentHistoryRequest, CommentHistoryPage, CasePermissions, UpdateCasePermissionsRequest, GetCaseFeedByActionsRequest, CaseFeedByActionItem } from './cases/contracts/index.js';
|
|
21
21
|
export { CasePermissionsValue, CommentHistoryChangeType, CommentHistoryCursor, CommentHistoryEntry } from './cases/contracts/index.js';
|
|
22
|
+
import { GetAccessPackagesParams, PaginatedResult, AccessPackage, GetCompanyAccessPackagesParams, CompanyAccessPackageItem, CreateCompanyAccessPackagePayload, UpdateCompanyAccessPackagePayload, GetCompanyResourcesParams, CompanyResource } from './access-hub/contracts/index.js';
|
|
23
|
+
export { AccessGroup, AccessPackageGroup } from './access-hub/contracts/index.js';
|
|
22
24
|
export { Event } from './rh/contracts/index.js';
|
|
23
25
|
|
|
24
26
|
/**
|
|
@@ -532,6 +534,46 @@ declare class RhGateway {
|
|
|
532
534
|
constructor(httpClient: AxiosInstance, baseUrl: string);
|
|
533
535
|
}
|
|
534
536
|
|
|
537
|
+
/**
|
|
538
|
+
* Gateway for interacting with the Access Hub API.
|
|
539
|
+
*/
|
|
540
|
+
declare class AccessHubGateway {
|
|
541
|
+
private readonly httpClient;
|
|
542
|
+
private readonly baseUrl;
|
|
543
|
+
constructor(httpClient: AxiosInstance, baseUrl: string);
|
|
544
|
+
/**
|
|
545
|
+
* Retrieves a paginated list of access packages.
|
|
546
|
+
* @param params - Optional filters and pagination options.
|
|
547
|
+
* @returns A paginated result of access packages.
|
|
548
|
+
*/
|
|
549
|
+
getAccessPackages(params?: GetAccessPackagesParams): Promise<PaginatedResult<AccessPackage>>;
|
|
550
|
+
/**
|
|
551
|
+
* Retrieves a paginated list of company access packages.
|
|
552
|
+
* @param params - Optional filters and pagination options.
|
|
553
|
+
* @returns A paginated result of company access package items.
|
|
554
|
+
*/
|
|
555
|
+
getCompanyAccessPackages(params?: GetCompanyAccessPackagesParams): Promise<PaginatedResult<CompanyAccessPackageItem>>;
|
|
556
|
+
/**
|
|
557
|
+
* Creates a new company access package.
|
|
558
|
+
* @param payload - The company access package creation payload.
|
|
559
|
+
* @returns The created company access package item.
|
|
560
|
+
*/
|
|
561
|
+
createCompanyAccessPackage(payload: CreateCompanyAccessPackagePayload): Promise<CompanyAccessPackageItem>;
|
|
562
|
+
/**
|
|
563
|
+
* Updates an existing company access package.
|
|
564
|
+
* @param id - The ID of the company access package to update.
|
|
565
|
+
* @param payload - The update payload.
|
|
566
|
+
* @returns The updated company access package item.
|
|
567
|
+
*/
|
|
568
|
+
updateCompanyAccessPackage(id: string, payload: UpdateCompanyAccessPackagePayload): Promise<CompanyAccessPackageItem>;
|
|
569
|
+
/**
|
|
570
|
+
* Retrieves company resources.
|
|
571
|
+
* @param params - Filters for company resources.
|
|
572
|
+
* @returns A list of company resources.
|
|
573
|
+
*/
|
|
574
|
+
getCompanyResources(params: GetCompanyResourcesParams): Promise<CompanyResource[]>;
|
|
575
|
+
}
|
|
576
|
+
|
|
535
577
|
/**
|
|
536
578
|
* Maps service identifiers to their corresponding gateway types.
|
|
537
579
|
* Used by the `gateway()` function to infer the correct return type
|
|
@@ -552,6 +594,7 @@ type GatewayMap = {
|
|
|
552
594
|
'call-report': CallReportGateway;
|
|
553
595
|
cases: CasesGateway;
|
|
554
596
|
rh: RhGateway;
|
|
597
|
+
'access-hub': AccessHubGateway;
|
|
555
598
|
};
|
|
556
599
|
/**
|
|
557
600
|
* Parameters required to configure the SDK client.
|
|
@@ -597,6 +640,9 @@ interface GatewayClientParams {
|
|
|
597
640
|
rh?: {
|
|
598
641
|
baseUrl: string;
|
|
599
642
|
};
|
|
643
|
+
accessHub?: {
|
|
644
|
+
baseUrl: string;
|
|
645
|
+
};
|
|
600
646
|
};
|
|
601
647
|
}
|
|
602
648
|
|
|
@@ -612,6 +658,7 @@ declare const SERVICE_GATEWAYS: {
|
|
|
612
658
|
readonly CALL_REPORT: "call-report";
|
|
613
659
|
readonly CASES: "cases";
|
|
614
660
|
readonly RH: "rh";
|
|
661
|
+
readonly ACCESS_HUB: "access-hub";
|
|
615
662
|
};
|
|
616
663
|
type SERVICE_GATEWAYS = (typeof SERVICE_GATEWAYS)[keyof typeof SERVICE_GATEWAYS];
|
|
617
664
|
|
|
@@ -638,4 +685,4 @@ declare const configure: (params: GatewayClientParams) => void;
|
|
|
638
685
|
*/
|
|
639
686
|
declare function gateway<T extends keyof GatewayMap>(service: T): GatewayMap[T];
|
|
640
687
|
|
|
641
|
-
export { AttachmentByIdResponse, AudioConvertResponse, Campaign, CampaignAccessResponse, CampaignCompanyPaginatedResponse, CampaignCompanyQueryParams, CampaignCompanyResponse, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CancelInvitationRequest, CaseFeedByActionItem, CasePermissions, CommentHistoryPage, CompanyResponse, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, CreateIntegrationActionRequest, CreateIntegrationFieldRequest, CreateIntegrationPartnerRequest, CreateWebhookRequest$1 as CreateWebhookRequest, DeleteIntegrationActionParams, DeleteIntegrationFieldParams, DeleteIntegrationPartnerParams, EnableCampaignCompanyRequest, FindOrCreateQueueRuleRequest, GetAllUsersParams, GetAllUsersResponse, GetAttachmentByIdRequest, GetCaseFeedByActionsRequest, GetCommentHistoryRequest, GetConfigTemplatesParams, GetConfigTemplatesResponse, GetConfigsByProviderParams, GetContactPhonesParams, GetInitialContextRequest, GetInitialContextResponse, GetIntegrationHooksCatalogRequest, GetIntegrationPartnersByCompanyRequest, GetManagedUsersResponse, GetMemberQueuesRequest, GetMessagesByCursorRequest, GetMessagesByCursorResponse, GetPresignedUrlRequest, GetProviderConfigurationsParams, GetProviderDisplayInfoParams, GetRoomByIdRequest, GetRootRulesRequest, GetServiceGroupsParams, GetWebhooksByCompanyRequest$1 as GetWebhooksByCompanyRequest, HookCatalogItem, IntegrationAction, IntegrationField, IntegrationPartner, InvitationResponse, ListContactHistoryRequest, ListInvitationsRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, MarkMessagesAsReadRequest, MarkMessagesAsReadResponse, MessageResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, PatchCampaignContactRequest, PatchCampaignRequest, ProviderConfigurationsResponse, ProviderDisplayInfoResponse, ProviderListResponse, Queue, QueueMember, QueueRule, ReplyInvitationRequest, RoomMemberResponse, RoomResponse, RootRulesResponse, SERVICE_GATEWAYS, SERVICE_GATEWAYS as SERVICE_GATEWAYS_TYPE, SendAttachmentMessageResponse, SendMessageRequest, ServiceGroupsResponse, UpdateCasePermissionsRequest, UpdateIntegrationActionParams, UpdateIntegrationFieldParams, UpdateMemberInRoomRequest, UploadPresignedUrlResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };
|
|
688
|
+
export { AccessPackage, AttachmentByIdResponse, AudioConvertResponse, Campaign, CampaignAccessResponse, CampaignCompanyPaginatedResponse, CampaignCompanyQueryParams, CampaignCompanyResponse, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CancelInvitationRequest, CaseFeedByActionItem, CasePermissions, CommentHistoryPage, CompanyAccessPackageItem, CompanyResource, CompanyResponse, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, CreateCompanyAccessPackagePayload, CreateIntegrationActionRequest, CreateIntegrationFieldRequest, CreateIntegrationPartnerRequest, CreateWebhookRequest$1 as CreateWebhookRequest, DeleteIntegrationActionParams, DeleteIntegrationFieldParams, DeleteIntegrationPartnerParams, EnableCampaignCompanyRequest, FindOrCreateQueueRuleRequest, GetAccessPackagesParams, GetAllUsersParams, GetAllUsersResponse, GetAttachmentByIdRequest, GetCaseFeedByActionsRequest, GetCommentHistoryRequest, GetCompanyAccessPackagesParams, GetCompanyResourcesParams, GetConfigTemplatesParams, GetConfigTemplatesResponse, GetConfigsByProviderParams, GetContactPhonesParams, GetInitialContextRequest, GetInitialContextResponse, GetIntegrationHooksCatalogRequest, GetIntegrationPartnersByCompanyRequest, GetManagedUsersResponse, GetMemberQueuesRequest, GetMessagesByCursorRequest, GetMessagesByCursorResponse, GetPresignedUrlRequest, GetProviderConfigurationsParams, GetProviderDisplayInfoParams, GetRoomByIdRequest, GetRootRulesRequest, GetServiceGroupsParams, GetWebhooksByCompanyRequest$1 as GetWebhooksByCompanyRequest, HookCatalogItem, IntegrationAction, IntegrationField, IntegrationPartner, InvitationResponse, ListContactHistoryRequest, ListInvitationsRequest, ListLiveUserRoomsRequest, LiveUserRoomResponse, MarkMessagesAsReadRequest, MarkMessagesAsReadResponse, MessageResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, PaginatedResult, PatchCampaignContactRequest, PatchCampaignRequest, ProviderConfigurationsResponse, ProviderDisplayInfoResponse, ProviderListResponse, Queue, QueueMember, QueueRule, ReplyInvitationRequest, RoomMemberResponse, RoomResponse, RootRulesResponse, SERVICE_GATEWAYS, SERVICE_GATEWAYS as SERVICE_GATEWAYS_TYPE, SendAttachmentMessageResponse, SendMessageRequest, ServiceGroupsResponse, UpdateCasePermissionsRequest, UpdateCompanyAccessPackagePayload, UpdateIntegrationActionParams, UpdateIntegrationFieldParams, UpdateMemberInRoomRequest, UploadPresignedUrlResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };
|
package/dist/index.js
CHANGED
|
@@ -911,6 +911,73 @@ var RhGateway = class {
|
|
|
911
911
|
baseUrl;
|
|
912
912
|
};
|
|
913
913
|
|
|
914
|
+
// src/access-hub/index.ts
|
|
915
|
+
var AccessHubGateway = class {
|
|
916
|
+
constructor(httpClient, baseUrl) {
|
|
917
|
+
this.httpClient = httpClient;
|
|
918
|
+
this.baseUrl = baseUrl;
|
|
919
|
+
}
|
|
920
|
+
httpClient;
|
|
921
|
+
baseUrl;
|
|
922
|
+
/**
|
|
923
|
+
* Retrieves a paginated list of access packages.
|
|
924
|
+
* @param params - Optional filters and pagination options.
|
|
925
|
+
* @returns A paginated result of access packages.
|
|
926
|
+
*/
|
|
927
|
+
async getAccessPackages(params) {
|
|
928
|
+
const { data } = await this.httpClient.get(`${this.baseUrl}/access-package`, {
|
|
929
|
+
params
|
|
930
|
+
});
|
|
931
|
+
return data;
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* Retrieves a paginated list of company access packages.
|
|
935
|
+
* @param params - Optional filters and pagination options.
|
|
936
|
+
* @returns A paginated result of company access package items.
|
|
937
|
+
*/
|
|
938
|
+
async getCompanyAccessPackages(params) {
|
|
939
|
+
const { data } = await this.httpClient.get(
|
|
940
|
+
`${this.baseUrl}/company-access-packages`,
|
|
941
|
+
{ params }
|
|
942
|
+
);
|
|
943
|
+
return data;
|
|
944
|
+
}
|
|
945
|
+
/**
|
|
946
|
+
* Creates a new company access package.
|
|
947
|
+
* @param payload - The company access package creation payload.
|
|
948
|
+
* @returns The created company access package item.
|
|
949
|
+
*/
|
|
950
|
+
async createCompanyAccessPackage(payload) {
|
|
951
|
+
const { data } = await this.httpClient.post(
|
|
952
|
+
`${this.baseUrl}/company-access-packages`,
|
|
953
|
+
payload
|
|
954
|
+
);
|
|
955
|
+
return data;
|
|
956
|
+
}
|
|
957
|
+
/**
|
|
958
|
+
* Updates an existing company access package.
|
|
959
|
+
* @param id - The ID of the company access package to update.
|
|
960
|
+
* @param payload - The update payload.
|
|
961
|
+
* @returns The updated company access package item.
|
|
962
|
+
*/
|
|
963
|
+
async updateCompanyAccessPackage(id, payload) {
|
|
964
|
+
const { data } = await this.httpClient.patch(
|
|
965
|
+
`${this.baseUrl}/company-access-packages/${id}`,
|
|
966
|
+
payload
|
|
967
|
+
);
|
|
968
|
+
return data;
|
|
969
|
+
}
|
|
970
|
+
/**
|
|
971
|
+
* Retrieves company resources.
|
|
972
|
+
* @param params - Filters for company resources.
|
|
973
|
+
* @returns A list of company resources.
|
|
974
|
+
*/
|
|
975
|
+
async getCompanyResources(params) {
|
|
976
|
+
const { data } = await this.httpClient.get(`${this.baseUrl}/company-resources`, { params });
|
|
977
|
+
return data;
|
|
978
|
+
}
|
|
979
|
+
};
|
|
980
|
+
|
|
914
981
|
// src/@common/client.ts
|
|
915
982
|
var import_axios = __toESM(require("axios"));
|
|
916
983
|
var SDKGateways = class {
|
|
@@ -925,7 +992,8 @@ var SDKGateways = class {
|
|
|
925
992
|
callReport;
|
|
926
993
|
cases;
|
|
927
994
|
rh;
|
|
928
|
-
|
|
995
|
+
accessHub;
|
|
996
|
+
constructor(customerService, chatConfig, campaigns, chatAdapter, assets, contactList, integrations, chatWebservice, callReport, cases, rh, accessHub) {
|
|
929
997
|
this.customerService = customerService;
|
|
930
998
|
this.chatConfig = chatConfig;
|
|
931
999
|
this.campaigns = campaigns;
|
|
@@ -937,6 +1005,7 @@ var SDKGateways = class {
|
|
|
937
1005
|
this.callReport = callReport;
|
|
938
1006
|
this.cases = cases;
|
|
939
1007
|
this.rh = rh;
|
|
1008
|
+
this.accessHub = accessHub;
|
|
940
1009
|
}
|
|
941
1010
|
};
|
|
942
1011
|
function createClient(params) {
|
|
@@ -956,6 +1025,7 @@ function createClient(params) {
|
|
|
956
1025
|
const callReport = params.services.callReport ? new CallReportGateway(httpClient, params.services.callReport.baseUrl) : null;
|
|
957
1026
|
const cases = params.services.cases ? new CasesGateway(httpClient, params.services.cases.baseUrl) : null;
|
|
958
1027
|
const rh = params.services.rh ? new RhGateway(httpClient, params.services.rh.baseUrl) : null;
|
|
1028
|
+
const accessHub = params.services.accessHub ? new AccessHubGateway(httpClient, params.services.accessHub.baseUrl) : null;
|
|
959
1029
|
return new SDKGateways(
|
|
960
1030
|
customerService,
|
|
961
1031
|
chatConfig,
|
|
@@ -967,7 +1037,8 @@ function createClient(params) {
|
|
|
967
1037
|
chatWebservice,
|
|
968
1038
|
callReport,
|
|
969
1039
|
cases,
|
|
970
|
-
rh
|
|
1040
|
+
rh,
|
|
1041
|
+
accessHub
|
|
971
1042
|
);
|
|
972
1043
|
}
|
|
973
1044
|
|
|
@@ -983,7 +1054,8 @@ var SERVICE_GATEWAYS = {
|
|
|
983
1054
|
CHAT_WEBSERVICE: "chat-webservice",
|
|
984
1055
|
CALL_REPORT: "call-report",
|
|
985
1056
|
CASES: "cases",
|
|
986
|
-
RH: "rh"
|
|
1057
|
+
RH: "rh",
|
|
1058
|
+
ACCESS_HUB: "access-hub"
|
|
987
1059
|
};
|
|
988
1060
|
|
|
989
1061
|
// src/index.ts
|
|
@@ -1040,13 +1112,15 @@ function gateway(service) {
|
|
|
1040
1112
|
throw new Error(`Service 'call-report' is not configured. Provide its baseUrl in configure().`);
|
|
1041
1113
|
return sdk.client.callReport;
|
|
1042
1114
|
case SERVICE_GATEWAYS.CASES:
|
|
1043
|
-
if (!sdk.client.cases)
|
|
1044
|
-
throw new Error(`Service 'cases' is not configured. Provide its baseUrl in configure().`);
|
|
1115
|
+
if (!sdk.client.cases) throw new Error(`Service 'cases' is not configured. Provide its baseUrl in configure().`);
|
|
1045
1116
|
return sdk.client.cases;
|
|
1046
1117
|
case SERVICE_GATEWAYS.RH:
|
|
1047
|
-
if (!sdk.client.rh)
|
|
1048
|
-
throw new Error(`Service 'rh' is not configured. Provide its baseUrl in configure().`);
|
|
1118
|
+
if (!sdk.client.rh) throw new Error(`Service 'rh' is not configured. Provide its baseUrl in configure().`);
|
|
1049
1119
|
return sdk.client.rh;
|
|
1120
|
+
case SERVICE_GATEWAYS.ACCESS_HUB:
|
|
1121
|
+
if (!sdk.client.accessHub)
|
|
1122
|
+
throw new Error(`Service 'access-hub' is not configured. Provide its baseUrl in configure().`);
|
|
1123
|
+
return sdk.client.accessHub;
|
|
1050
1124
|
default:
|
|
1051
1125
|
throw new Error(`Unknown service gateway: ${service}`);
|
|
1052
1126
|
}
|