@opens/gateways 1.14.3 → 1.14.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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":[]}
@@ -77,4 +77,50 @@ interface CaseFeedByActionItem {
77
77
  protocol: string | null;
78
78
  }
79
79
 
80
- export type { CaseFeedByActionItem, CasePermissions, CasePermissionsValue, CommentHistoryChangeType, CommentHistoryCursor, CommentHistoryEntry, CommentHistoryPage, GetCaseFeedByActionsRequest, GetCommentHistoryRequest, UpdateCasePermissionsRequest };
80
+ /** A single time entry (apontamento) recorded against a case. */
81
+ interface CaseTimeEntry {
82
+ id: string;
83
+ caseId: number;
84
+ companyId: string;
85
+ durationMinutes: number;
86
+ comment: string | null;
87
+ recordedByUserId: string;
88
+ createdAt: string;
89
+ updatedAt: string;
90
+ deletedAt: string | null;
91
+ }
92
+ /** Request payload for creating a time entry on a case. */
93
+ interface CreateTimeEntryRequest {
94
+ caseId: number;
95
+ duration: string;
96
+ comment?: string;
97
+ }
98
+ /** Cursor returned by the time entries list endpoint: [createdAt, id]. */
99
+ type TimeEntryCursor = [string, string];
100
+ /** Request parameters for listing the time entries of a case. */
101
+ interface ListTimeEntriesRequest {
102
+ caseId: number;
103
+ limit?: number;
104
+ cursor?: TimeEntryCursor;
105
+ }
106
+ /** Paginated response for the time entries of a case. */
107
+ interface ListTimeEntriesPage {
108
+ data: CaseTimeEntry[];
109
+ totalLoggedTimeMinutes: number;
110
+ hasMore: boolean;
111
+ nextCursor: TimeEntryCursor | null;
112
+ }
113
+ /** Request payload for updating a time entry. */
114
+ interface UpdateTimeEntryRequest {
115
+ caseId: number;
116
+ timeEntryId: string;
117
+ duration?: string;
118
+ comment?: string | null;
119
+ }
120
+ /** Request parameters for deleting (soft-delete) a time entry. */
121
+ interface DeleteTimeEntryRequest {
122
+ caseId: number;
123
+ timeEntryId: string;
124
+ }
125
+
126
+ export type { CaseFeedByActionItem, CasePermissions, CasePermissionsValue, CaseTimeEntry, CommentHistoryChangeType, CommentHistoryCursor, CommentHistoryEntry, CommentHistoryPage, CreateTimeEntryRequest, DeleteTimeEntryRequest, GetCaseFeedByActionsRequest, GetCommentHistoryRequest, ListTimeEntriesPage, ListTimeEntriesRequest, TimeEntryCursor, UpdateCasePermissionsRequest, UpdateTimeEntryRequest };
@@ -77,4 +77,50 @@ interface CaseFeedByActionItem {
77
77
  protocol: string | null;
78
78
  }
79
79
 
80
- export type { CaseFeedByActionItem, CasePermissions, CasePermissionsValue, CommentHistoryChangeType, CommentHistoryCursor, CommentHistoryEntry, CommentHistoryPage, GetCaseFeedByActionsRequest, GetCommentHistoryRequest, UpdateCasePermissionsRequest };
80
+ /** A single time entry (apontamento) recorded against a case. */
81
+ interface CaseTimeEntry {
82
+ id: string;
83
+ caseId: number;
84
+ companyId: string;
85
+ durationMinutes: number;
86
+ comment: string | null;
87
+ recordedByUserId: string;
88
+ createdAt: string;
89
+ updatedAt: string;
90
+ deletedAt: string | null;
91
+ }
92
+ /** Request payload for creating a time entry on a case. */
93
+ interface CreateTimeEntryRequest {
94
+ caseId: number;
95
+ duration: string;
96
+ comment?: string;
97
+ }
98
+ /** Cursor returned by the time entries list endpoint: [createdAt, id]. */
99
+ type TimeEntryCursor = [string, string];
100
+ /** Request parameters for listing the time entries of a case. */
101
+ interface ListTimeEntriesRequest {
102
+ caseId: number;
103
+ limit?: number;
104
+ cursor?: TimeEntryCursor;
105
+ }
106
+ /** Paginated response for the time entries of a case. */
107
+ interface ListTimeEntriesPage {
108
+ data: CaseTimeEntry[];
109
+ totalLoggedTimeMinutes: number;
110
+ hasMore: boolean;
111
+ nextCursor: TimeEntryCursor | null;
112
+ }
113
+ /** Request payload for updating a time entry. */
114
+ interface UpdateTimeEntryRequest {
115
+ caseId: number;
116
+ timeEntryId: string;
117
+ duration?: string;
118
+ comment?: string | null;
119
+ }
120
+ /** Request parameters for deleting (soft-delete) a time entry. */
121
+ interface DeleteTimeEntryRequest {
122
+ caseId: number;
123
+ timeEntryId: string;
124
+ }
125
+
126
+ export type { CaseFeedByActionItem, CasePermissions, CasePermissionsValue, CaseTimeEntry, CommentHistoryChangeType, CommentHistoryCursor, CommentHistoryEntry, CommentHistoryPage, CreateTimeEntryRequest, DeleteTimeEntryRequest, GetCaseFeedByActionsRequest, GetCommentHistoryRequest, ListTimeEntriesPage, ListTimeEntriesRequest, TimeEntryCursor, UpdateCasePermissionsRequest, UpdateTimeEntryRequest };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/cases/contracts/index.ts"],"sourcesContent":["export * from './comment-history';\nexport * from './case-permissions';\nexport * from './case-feed-by-actions';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../../src/cases/contracts/index.ts"],"sourcesContent":["export * from './comment-history';\nexport * from './case-permissions';\nexport * from './case-feed-by-actions';\nexport * from './time-entry';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
package/dist/index.d.mts CHANGED
@@ -17,8 +17,10 @@ import { ListInvitationsRequest, InvitationResponse, ReplyInvitationRequest, Can
17
17
  export { MessageAttachment, MessageMetadata, MessageReactionResponse, MessageReplyContext, MessageStatusResponse, RoomActiveDates, RoomTagResponse } from './chat-webservice/contracts/index.mjs';
18
18
  import { ListContactHistoryRequest, ContactHistoryResponse } from './call-report/contracts/index.mjs';
19
19
  export { ContactHistoryIndex, ContactHistorySortOrder, ContactInteractionResponse, InteractionCallStepResponse, InteractionChatStepResponse, InteractionMemberResponse, InteractionOrganizationResponse } from './call-report/contracts/index.mjs';
20
- import { GetCommentHistoryRequest, CommentHistoryPage, CasePermissions, UpdateCasePermissionsRequest, GetCaseFeedByActionsRequest, CaseFeedByActionItem } from './cases/contracts/index.mjs';
21
- export { CasePermissionsValue, CommentHistoryChangeType, CommentHistoryCursor, CommentHistoryEntry } from './cases/contracts/index.mjs';
20
+ import { GetCommentHistoryRequest, CommentHistoryPage, CasePermissions, UpdateCasePermissionsRequest, GetCaseFeedByActionsRequest, CaseFeedByActionItem, CreateTimeEntryRequest, CaseTimeEntry, ListTimeEntriesRequest, ListTimeEntriesPage, UpdateTimeEntryRequest, DeleteTimeEntryRequest } from './cases/contracts/index.mjs';
21
+ export { CasePermissionsValue, CommentHistoryChangeType, CommentHistoryCursor, CommentHistoryEntry, TimeEntryCursor } 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
  /**
@@ -521,6 +523,14 @@ declare class CasesGateway {
521
523
  * @returns Array of case feed items linking each action to a case.
522
524
  */
523
525
  getCaseFeedByActions(payload: GetCaseFeedByActionsRequest): Promise<CaseFeedByActionItem[]>;
526
+ /** Creates a time entry (apontamento) on a case. */
527
+ createTimeEntry(payload: CreateTimeEntryRequest): Promise<CaseTimeEntry>;
528
+ /** Retrieves one page of time entries (apontamentos) for a case. */
529
+ listTimeEntries(params: ListTimeEntriesRequest): Promise<ListTimeEntriesPage>;
530
+ /** Updates a time entry (apontamento) on a case. */
531
+ updateTimeEntry(payload: UpdateTimeEntryRequest): Promise<CaseTimeEntry>;
532
+ /** Deletes (soft-delete) a time entry (apontamento) on a case. */
533
+ deleteTimeEntry(params: DeleteTimeEntryRequest): Promise<CaseTimeEntry>;
524
534
  }
525
535
 
526
536
  /**
@@ -532,6 +542,46 @@ declare class RhGateway {
532
542
  constructor(httpClient: AxiosInstance, baseUrl: string);
533
543
  }
534
544
 
545
+ /**
546
+ * Gateway for interacting with the Access Hub API.
547
+ */
548
+ declare class AccessHubGateway {
549
+ private readonly httpClient;
550
+ private readonly baseUrl;
551
+ constructor(httpClient: AxiosInstance, baseUrl: string);
552
+ /**
553
+ * Retrieves a paginated list of access packages.
554
+ * @param params - Optional filters and pagination options.
555
+ * @returns A paginated result of access packages.
556
+ */
557
+ getAccessPackages(params?: GetAccessPackagesParams): Promise<PaginatedResult<AccessPackage>>;
558
+ /**
559
+ * Retrieves a paginated list of company access packages.
560
+ * @param params - Optional filters and pagination options.
561
+ * @returns A paginated result of company access package items.
562
+ */
563
+ getCompanyAccessPackages(params?: GetCompanyAccessPackagesParams): Promise<PaginatedResult<CompanyAccessPackageItem>>;
564
+ /**
565
+ * Creates a new company access package.
566
+ * @param payload - The company access package creation payload.
567
+ * @returns The created company access package item.
568
+ */
569
+ createCompanyAccessPackage(payload: CreateCompanyAccessPackagePayload): Promise<CompanyAccessPackageItem>;
570
+ /**
571
+ * Updates an existing company access package.
572
+ * @param id - The ID of the company access package to update.
573
+ * @param payload - The update payload.
574
+ * @returns The updated company access package item.
575
+ */
576
+ updateCompanyAccessPackage(id: string, payload: UpdateCompanyAccessPackagePayload): Promise<CompanyAccessPackageItem>;
577
+ /**
578
+ * Retrieves company resources.
579
+ * @param params - Filters for company resources.
580
+ * @returns A list of company resources.
581
+ */
582
+ getCompanyResources(params: GetCompanyResourcesParams): Promise<CompanyResource[]>;
583
+ }
584
+
535
585
  /**
536
586
  * Maps service identifiers to their corresponding gateway types.
537
587
  * Used by the `gateway()` function to infer the correct return type
@@ -552,6 +602,7 @@ type GatewayMap = {
552
602
  'call-report': CallReportGateway;
553
603
  cases: CasesGateway;
554
604
  rh: RhGateway;
605
+ 'access-hub': AccessHubGateway;
555
606
  };
556
607
  /**
557
608
  * Parameters required to configure the SDK client.
@@ -597,6 +648,9 @@ interface GatewayClientParams {
597
648
  rh?: {
598
649
  baseUrl: string;
599
650
  };
651
+ accessHub?: {
652
+ baseUrl: string;
653
+ };
600
654
  };
601
655
  }
602
656
 
@@ -612,6 +666,7 @@ declare const SERVICE_GATEWAYS: {
612
666
  readonly CALL_REPORT: "call-report";
613
667
  readonly CASES: "cases";
614
668
  readonly RH: "rh";
669
+ readonly ACCESS_HUB: "access-hub";
615
670
  };
616
671
  type SERVICE_GATEWAYS = (typeof SERVICE_GATEWAYS)[keyof typeof SERVICE_GATEWAYS];
617
672
 
@@ -638,4 +693,4 @@ declare const configure: (params: GatewayClientParams) => void;
638
693
  */
639
694
  declare function gateway<T extends keyof GatewayMap>(service: T): GatewayMap[T];
640
695
 
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 };
696
+ export { AccessPackage, AttachmentByIdResponse, AudioConvertResponse, Campaign, CampaignAccessResponse, CampaignCompanyPaginatedResponse, CampaignCompanyQueryParams, CampaignCompanyResponse, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CancelInvitationRequest, CaseFeedByActionItem, CasePermissions, CaseTimeEntry, CommentHistoryPage, CompanyAccessPackageItem, CompanyResource, CompanyResponse, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, CreateCompanyAccessPackagePayload, CreateIntegrationActionRequest, CreateIntegrationFieldRequest, CreateIntegrationPartnerRequest, CreateTimeEntryRequest, CreateWebhookRequest$1 as CreateWebhookRequest, DeleteIntegrationActionParams, DeleteIntegrationFieldParams, DeleteIntegrationPartnerParams, DeleteTimeEntryRequest, 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, ListTimeEntriesPage, ListTimeEntriesRequest, 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, UpdateTimeEntryRequest, UploadPresignedUrlResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };
package/dist/index.d.ts CHANGED
@@ -17,8 +17,10 @@ import { ListInvitationsRequest, InvitationResponse, ReplyInvitationRequest, Can
17
17
  export { MessageAttachment, MessageMetadata, MessageReactionResponse, MessageReplyContext, MessageStatusResponse, RoomActiveDates, RoomTagResponse } from './chat-webservice/contracts/index.js';
18
18
  import { ListContactHistoryRequest, ContactHistoryResponse } from './call-report/contracts/index.js';
19
19
  export { ContactHistoryIndex, ContactHistorySortOrder, ContactInteractionResponse, InteractionCallStepResponse, InteractionChatStepResponse, InteractionMemberResponse, InteractionOrganizationResponse } from './call-report/contracts/index.js';
20
- import { GetCommentHistoryRequest, CommentHistoryPage, CasePermissions, UpdateCasePermissionsRequest, GetCaseFeedByActionsRequest, CaseFeedByActionItem } from './cases/contracts/index.js';
21
- export { CasePermissionsValue, CommentHistoryChangeType, CommentHistoryCursor, CommentHistoryEntry } from './cases/contracts/index.js';
20
+ import { GetCommentHistoryRequest, CommentHistoryPage, CasePermissions, UpdateCasePermissionsRequest, GetCaseFeedByActionsRequest, CaseFeedByActionItem, CreateTimeEntryRequest, CaseTimeEntry, ListTimeEntriesRequest, ListTimeEntriesPage, UpdateTimeEntryRequest, DeleteTimeEntryRequest } from './cases/contracts/index.js';
21
+ export { CasePermissionsValue, CommentHistoryChangeType, CommentHistoryCursor, CommentHistoryEntry, TimeEntryCursor } 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
  /**
@@ -521,6 +523,14 @@ declare class CasesGateway {
521
523
  * @returns Array of case feed items linking each action to a case.
522
524
  */
523
525
  getCaseFeedByActions(payload: GetCaseFeedByActionsRequest): Promise<CaseFeedByActionItem[]>;
526
+ /** Creates a time entry (apontamento) on a case. */
527
+ createTimeEntry(payload: CreateTimeEntryRequest): Promise<CaseTimeEntry>;
528
+ /** Retrieves one page of time entries (apontamentos) for a case. */
529
+ listTimeEntries(params: ListTimeEntriesRequest): Promise<ListTimeEntriesPage>;
530
+ /** Updates a time entry (apontamento) on a case. */
531
+ updateTimeEntry(payload: UpdateTimeEntryRequest): Promise<CaseTimeEntry>;
532
+ /** Deletes (soft-delete) a time entry (apontamento) on a case. */
533
+ deleteTimeEntry(params: DeleteTimeEntryRequest): Promise<CaseTimeEntry>;
524
534
  }
525
535
 
526
536
  /**
@@ -532,6 +542,46 @@ declare class RhGateway {
532
542
  constructor(httpClient: AxiosInstance, baseUrl: string);
533
543
  }
534
544
 
545
+ /**
546
+ * Gateway for interacting with the Access Hub API.
547
+ */
548
+ declare class AccessHubGateway {
549
+ private readonly httpClient;
550
+ private readonly baseUrl;
551
+ constructor(httpClient: AxiosInstance, baseUrl: string);
552
+ /**
553
+ * Retrieves a paginated list of access packages.
554
+ * @param params - Optional filters and pagination options.
555
+ * @returns A paginated result of access packages.
556
+ */
557
+ getAccessPackages(params?: GetAccessPackagesParams): Promise<PaginatedResult<AccessPackage>>;
558
+ /**
559
+ * Retrieves a paginated list of company access packages.
560
+ * @param params - Optional filters and pagination options.
561
+ * @returns A paginated result of company access package items.
562
+ */
563
+ getCompanyAccessPackages(params?: GetCompanyAccessPackagesParams): Promise<PaginatedResult<CompanyAccessPackageItem>>;
564
+ /**
565
+ * Creates a new company access package.
566
+ * @param payload - The company access package creation payload.
567
+ * @returns The created company access package item.
568
+ */
569
+ createCompanyAccessPackage(payload: CreateCompanyAccessPackagePayload): Promise<CompanyAccessPackageItem>;
570
+ /**
571
+ * Updates an existing company access package.
572
+ * @param id - The ID of the company access package to update.
573
+ * @param payload - The update payload.
574
+ * @returns The updated company access package item.
575
+ */
576
+ updateCompanyAccessPackage(id: string, payload: UpdateCompanyAccessPackagePayload): Promise<CompanyAccessPackageItem>;
577
+ /**
578
+ * Retrieves company resources.
579
+ * @param params - Filters for company resources.
580
+ * @returns A list of company resources.
581
+ */
582
+ getCompanyResources(params: GetCompanyResourcesParams): Promise<CompanyResource[]>;
583
+ }
584
+
535
585
  /**
536
586
  * Maps service identifiers to their corresponding gateway types.
537
587
  * Used by the `gateway()` function to infer the correct return type
@@ -552,6 +602,7 @@ type GatewayMap = {
552
602
  'call-report': CallReportGateway;
553
603
  cases: CasesGateway;
554
604
  rh: RhGateway;
605
+ 'access-hub': AccessHubGateway;
555
606
  };
556
607
  /**
557
608
  * Parameters required to configure the SDK client.
@@ -597,6 +648,9 @@ interface GatewayClientParams {
597
648
  rh?: {
598
649
  baseUrl: string;
599
650
  };
651
+ accessHub?: {
652
+ baseUrl: string;
653
+ };
600
654
  };
601
655
  }
602
656
 
@@ -612,6 +666,7 @@ declare const SERVICE_GATEWAYS: {
612
666
  readonly CALL_REPORT: "call-report";
613
667
  readonly CASES: "cases";
614
668
  readonly RH: "rh";
669
+ readonly ACCESS_HUB: "access-hub";
615
670
  };
616
671
  type SERVICE_GATEWAYS = (typeof SERVICE_GATEWAYS)[keyof typeof SERVICE_GATEWAYS];
617
672
 
@@ -638,4 +693,4 @@ declare const configure: (params: GatewayClientParams) => void;
638
693
  */
639
694
  declare function gateway<T extends keyof GatewayMap>(service: T): GatewayMap[T];
640
695
 
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 };
696
+ export { AccessPackage, AttachmentByIdResponse, AudioConvertResponse, Campaign, CampaignAccessResponse, CampaignCompanyPaginatedResponse, CampaignCompanyQueryParams, CampaignCompanyResponse, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CancelInvitationRequest, CaseFeedByActionItem, CasePermissions, CaseTimeEntry, CommentHistoryPage, CompanyAccessPackageItem, CompanyResource, CompanyResponse, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, CreateCompanyAccessPackagePayload, CreateIntegrationActionRequest, CreateIntegrationFieldRequest, CreateIntegrationPartnerRequest, CreateTimeEntryRequest, CreateWebhookRequest$1 as CreateWebhookRequest, DeleteIntegrationActionParams, DeleteIntegrationFieldParams, DeleteIntegrationPartnerParams, DeleteTimeEntryRequest, 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, ListTimeEntriesPage, ListTimeEntriesRequest, 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, UpdateTimeEntryRequest, UploadPresignedUrlResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };