@botonic/plugin-hubtype-sdk 2.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/CHANGELOG.md +201 -0
  2. package/README.md +11 -0
  3. package/package.json +21 -0
  4. package/src/http-client.d.ts +11 -0
  5. package/src/http-client.js +63 -0
  6. package/src/http-client.js.map +1 -0
  7. package/src/hubtype-sdk.d.ts +43 -0
  8. package/src/hubtype-sdk.js +128 -0
  9. package/src/hubtype-sdk.js.map +1 -0
  10. package/src/index.d.ts +56 -0
  11. package/src/index.js +117 -0
  12. package/src/index.js.map +1 -0
  13. package/src/shared.d.ts +1 -0
  14. package/src/shared.js +2 -0
  15. package/src/shared.js.map +1 -0
  16. package/src/types/agents.d.ts +8 -0
  17. package/src/types/agents.js +2 -0
  18. package/src/types/agents.js.map +1 -0
  19. package/src/types/ai.d.ts +17 -0
  20. package/src/types/ai.js +2 -0
  21. package/src/types/ai.js.map +1 -0
  22. package/src/types/cases.d.ts +103 -0
  23. package/src/types/cases.js +8 -0
  24. package/src/types/cases.js.map +1 -0
  25. package/src/types/chats.d.ts +35 -0
  26. package/src/types/chats.js +2 -0
  27. package/src/types/chats.js.map +1 -0
  28. package/src/types/config.d.ts +11 -0
  29. package/src/types/config.js +2 -0
  30. package/src/types/config.js.map +1 -0
  31. package/src/types/contact-info.d.ts +3 -0
  32. package/src/types/contact-info.js +2 -0
  33. package/src/types/contact-info.js.map +1 -0
  34. package/src/types/http-client.d.ts +8 -0
  35. package/src/types/http-client.js +8 -0
  36. package/src/types/http-client.js.map +1 -0
  37. package/src/types/messages.d.ts +53 -0
  38. package/src/types/messages.js +2 -0
  39. package/src/types/messages.js.map +1 -0
  40. package/src/types/queues.d.ts +95 -0
  41. package/src/types/queues.js +6 -0
  42. package/src/types/queues.js.map +1 -0
  43. package/src/types/shared.d.ts +46 -0
  44. package/src/types/shared.js +2 -0
  45. package/src/types/shared.js.map +1 -0
  46. package/src/types/users.d.ts +27 -0
  47. package/src/types/users.js +14 -0
  48. package/src/types/users.js.map +1 -0
  49. package/src/types/whatsapp.d.ts +78 -0
  50. package/src/types/whatsapp.js +2 -0
  51. package/src/types/whatsapp.js.map +1 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,201 @@
1
+ ## 2.23.0 (2026-03-23)
2
+
3
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
4
+
5
+ ## 2.22.1 (2026-03-19)
6
+
7
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
8
+
9
+ ## 2.22.0 (2026-03-16)
10
+
11
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
12
+
13
+ ## 2.21.0 (2026-03-16)
14
+
15
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
16
+
17
+ ## 2.20.0 (2026-03-13)
18
+
19
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
20
+
21
+ ## 2.19.0 (2026-03-12)
22
+
23
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
24
+
25
+ ## 2.18.0 (2026-03-04)
26
+
27
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
28
+
29
+ ## 2.17.0 (2026-03-02)
30
+
31
+ ### 🚀 Features
32
+
33
+ - botonic working with v2 input format ([#660](https://github.com/metis-ai/hubtype-product/pull/660))
34
+
35
+ ### ❤️ Thank You
36
+
37
+ - Marc Rabat @vanbasten17
38
+
39
+ ## 2.16.0 (2026-02-23)
40
+
41
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
42
+
43
+ ## 2.15.0 (2026-02-13)
44
+
45
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
46
+
47
+ ## 2.14.0 (2026-02-05)
48
+
49
+ ### 🩹 Fixes
50
+
51
+ - reference as carousel instead of carrousel ([#542](https://github.com/metis-ai/hubtype-product/pull/542))
52
+
53
+ ### ❤️ Thank You
54
+
55
+ - Marc Rabat @vanbasten17
56
+
57
+ ## 2.13.4 (2026-02-02)
58
+
59
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
60
+
61
+ ## 2.13.3 (2026-01-30)
62
+
63
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
64
+
65
+ ## 2.13.2 (2026-01-30)
66
+
67
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
68
+
69
+ ## 2.13.1 (2026-01-30)
70
+
71
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
72
+
73
+ ## 2.13.0 (2026-01-29)
74
+
75
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
76
+
77
+ ## 2.12.0 (2026-01-28)
78
+
79
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
80
+
81
+ ## 2.11.5 (2026-01-28)
82
+
83
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
84
+
85
+ ## 2.11.4 (2026-01-28)
86
+
87
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
88
+
89
+ ## 2.11.3 (2026-01-28)
90
+
91
+ ### 🩹 Fixes
92
+
93
+ - update entrypoints to use .js and .d.ts extensions for module and types ([#552](https://github.com/metis-ai/hubtype-product/pull/552))
94
+
95
+ ### ❤️ Thank You
96
+
97
+ - David Hidalgo @Davidhidalgo
98
+
99
+ ## 2.11.2 (2026-01-21)
100
+
101
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
102
+
103
+ ## 2.11.1 (2026-01-21)
104
+
105
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
106
+
107
+ ## 2.11.0 (2026-01-21)
108
+
109
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
110
+
111
+ ## 2.10.1 (2026-01-19)
112
+
113
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
114
+
115
+ ## 2.10.0 (2026-01-18)
116
+
117
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
118
+
119
+ ## 2.9.1 (2026-01-17)
120
+
121
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
122
+
123
+ ## 2.9.0 (2026-01-17)
124
+
125
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
126
+
127
+ ## 2.8.1 (2026-01-16)
128
+
129
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
130
+
131
+ ## 2.8.0 (2026-01-16)
132
+
133
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
134
+
135
+ ## 2.7.1 (2026-01-16)
136
+
137
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
138
+
139
+ ## 2.7.0 (2026-01-15)
140
+
141
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
142
+
143
+ ## 2.6.0 (2025-12-09)
144
+
145
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
146
+
147
+ ## 2.5.0 (2025-12-09)
148
+
149
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
150
+
151
+ ## 2.4.1 (2025-12-08)
152
+
153
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
154
+
155
+ ## 2.4.0 (2025-12-05)
156
+
157
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
158
+
159
+ ## 2.3.3 (2025-12-04)
160
+
161
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
162
+
163
+ ## 2.3.2 (2025-12-04)
164
+
165
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
166
+
167
+ ## 2.3.1 (2025-12-04)
168
+
169
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
170
+
171
+ ## 2.3.0 (2025-12-04)
172
+
173
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
174
+
175
+ ## 2.2.1 (2025-12-04)
176
+
177
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
178
+
179
+ ## 2.2.0 (2025-12-04)
180
+
181
+ ### 🚀 Features
182
+
183
+ - fine tuning botonic release #BLT-2010 ([#428](https://github.com/metis-ai/hubtype-product/pull/428))
184
+
185
+ ### ❤️ Thank You
186
+
187
+ - David Hidalgo @Davidhidalgo
188
+
189
+ ## 2.1.0 (2025-12-02)
190
+
191
+ ### 🚀 Features
192
+
193
+ - fine tuning botonic release #BLT-2010 ([#428](https://github.com/metis-ai/hubtype-product/pull/428))
194
+
195
+ ### ❤️ Thank You
196
+
197
+ - David Hidalgo @Davidhidalgo
198
+
199
+ ## 2.0.1-alpha.0 (2025-11-27)
200
+
201
+ This was a version bump only for @botonic/plugin-hubtype-sdk to align it with other projects, there were no code changes.
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # plugin-hubtype-sdk
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Building
6
+
7
+ Run `nx build plugin-hubtype-sdk` to build the library.
8
+
9
+ ## Running unit tests
10
+
11
+ Run `nx test plugin-hubtype-sdk` to execute the unit tests via [Vitest](https://vitest.dev/).
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@botonic/plugin-hubtype-sdk",
3
+ "version": "2.23.0",
4
+ "type": "module",
5
+ "module": "./src/index.js",
6
+ "types": "./src/index.d.ts",
7
+ "dependencies": {
8
+ "tslib": "^2.3.0",
9
+ "axios": "^1.9.0",
10
+ "@botonic/shared": "2.23.0"
11
+ },
12
+ "references": [
13
+ {
14
+ "path": "../core/tsconfig.lib.json"
15
+ }
16
+ ],
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "main": "./src/index.js"
21
+ }
@@ -0,0 +1,11 @@
1
+ import { HttpClientConfig, RequestConfig } from './types/config';
2
+ import { HttpMethod } from './types/http-client';
3
+ export declare const DEFAULT_TIMEOUT_MS = 10000;
4
+ export declare const DEFAULT_RETRIES = 3;
5
+ export declare class HttpClient {
6
+ private client;
7
+ private config;
8
+ constructor(config?: HttpClientConfig);
9
+ setAccessToken(accessToken: string): void;
10
+ request<T>(method: HttpMethod, url: string, data?: Record<string, any>, config?: RequestConfig): Promise<T>;
11
+ }
@@ -0,0 +1,63 @@
1
+ import { __awaiter, __rest } from "tslib";
2
+ import axios from 'axios';
3
+ import { HTTP_METHODS } from './types/http-client';
4
+ export const DEFAULT_TIMEOUT_MS = 10000;
5
+ export const DEFAULT_RETRIES = 3;
6
+ export class HttpClient {
7
+ constructor(config) {
8
+ let headers = {
9
+ 'Content-Type': 'application/json',
10
+ };
11
+ if (config === null || config === void 0 ? void 0 : config.accessToken) {
12
+ headers.Authorization = `Bearer ${config.accessToken}`;
13
+ }
14
+ if (config === null || config === void 0 ? void 0 : config.headers) {
15
+ headers = Object.assign(Object.assign({}, headers), config.headers);
16
+ }
17
+ this.config = config;
18
+ this.client = axios.create({
19
+ baseURL: config === null || config === void 0 ? void 0 : config.baseUrl,
20
+ headers,
21
+ paramsSerializer: {
22
+ indexes: null,
23
+ },
24
+ });
25
+ }
26
+ setAccessToken(accessToken) {
27
+ this.client.defaults.headers['Authorization'] = `Bearer ${accessToken}`;
28
+ }
29
+ request(method, url, data, config) {
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ var _a, _b;
32
+ let axiosConfig = {
33
+ method,
34
+ url,
35
+ timeout: ((_a = this.config) === null || _a === void 0 ? void 0 : _a.timeout) || DEFAULT_TIMEOUT_MS,
36
+ };
37
+ if (method === HTTP_METHODS.get) {
38
+ axiosConfig.params = data;
39
+ }
40
+ else {
41
+ axiosConfig.data = data;
42
+ }
43
+ const _c = config || {}, { retries } = _c, restConfig = __rest(_c, ["retries"]);
44
+ axiosConfig = Object.assign(Object.assign({}, axiosConfig), restConfig);
45
+ const maxRetries = retries || ((_b = this.config) === null || _b === void 0 ? void 0 : _b.retries) || DEFAULT_RETRIES;
46
+ let lastError = null;
47
+ for (let attempt = 0; attempt < maxRetries; attempt++) {
48
+ try {
49
+ const response = yield this.client.request(axiosConfig);
50
+ return response.data;
51
+ }
52
+ catch (error) {
53
+ lastError = error;
54
+ if (attempt === maxRetries - 1)
55
+ break;
56
+ yield new Promise(resolve => setTimeout(resolve, Math.pow(2, attempt) * 1000));
57
+ }
58
+ }
59
+ throw lastError;
60
+ });
61
+ }
62
+ }
63
+ //# sourceMappingURL=http-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-client.js","sourceRoot":"","sources":["../../../../../libs/botonic/plugin-hubtype-sdk/src/http-client.ts"],"names":[],"mappings":";AAAA,OAAO,KAIN,MAAM,OAAO,CAAA;AAGd,OAAO,EAAE,YAAY,EAAc,MAAM,qBAAqB,CAAA;AAE9D,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAA;AACvC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAA;AAEhC,MAAM,OAAO,UAAU;IAIrB,YAAY,MAAyB;QACnC,IAAI,OAAO,GAA2B;YACpC,cAAc,EAAE,kBAAkB;SACnC,CAAA;QACD,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,EAAE,CAAC;YACxB,OAAO,CAAC,aAAa,GAAG,UAAU,MAAM,CAAC,WAAW,EAAE,CAAA;QACxD,CAAC;QAED,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,EAAE,CAAC;YACpB,OAAO,mCACF,OAAO,GACP,MAAM,CAAC,OAAO,CAClB,CAAA;QACH,CA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AAC,CAAA;oBACvD,OAAO,QAAQ,CAAC,IAAI,CAAA;gBACtB,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,SAAS,GAAG,KAAc,CAAA;oBAC1B,IAAI,OAAO,KAAK,UAAU,GAAG,CAAC;wBAAE,MAAK;oBACrC,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAC1B,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,CACjD,CAAA;gBACH,CAAC;YACH,CAAC;YAED,MAAM,SAAS,CAAA;QACjB,CAAC;KAAA;CACF"}
@@ -0,0 +1,43 @@
1
+ import { HttpClient } from './http-client';
2
+ import { InferenceRequest, InferenceResponse } from './types/ai';
3
+ import { Case, CaseListParams, CaseSearchParams, CaseSearchResult } from './types/cases';
4
+ import { Chat, ChatListParams, ChatTranscriptParams, ContactInfoField } from './types/chats';
5
+ import { HttpClientConfig, RequestConfig } from './types/config';
6
+ import { Message, MessageListParams } from './types/messages';
7
+ import { AvailabilityFlags, ProjectAvailabilityInfo, QueueAvailabilityInfo, QueueAvailableAgent, QueueListParams, QueueSummary } from './types/queues';
8
+ import { BotonicPluginHubtypeSdkInterface, PaginatedResponse } from './types/shared';
9
+ import { User, UserListParams } from './types/users';
10
+ import { SendWhatsappTemplateRequest, SendWhatsappTemplateResponse } from './types/whatsapp';
11
+ export declare class HubtypeSdk extends HttpClient implements BotonicPluginHubtypeSdkInterface {
12
+ constructor(config: HttpClientConfig);
13
+ setAccessToken: (accessToken: string) => void;
14
+ knowledgeBaseInference: (request: InferenceRequest, config?: RequestConfig) => Promise<InferenceResponse>;
15
+ searchCases: (params: CaseSearchParams, config?: RequestConfig) => Promise<PaginatedResponse<CaseSearchResult>>;
16
+ searchAllCases: (params: CaseSearchParams, config?: RequestConfig) => Promise<CaseSearchResult[]>;
17
+ getCases: (params?: CaseListParams, config?: RequestConfig) => Promise<PaginatedResponse<Case>>;
18
+ getAllCases: (params?: CaseListParams, config?: RequestConfig) => Promise<Case[]>;
19
+ getCaseById: (id: string, config?: RequestConfig) => Promise<Case>;
20
+ getChats: (params?: ChatListParams, config?: RequestConfig) => Promise<PaginatedResponse<Chat>>;
21
+ getAllChats: (params?: ChatListParams, config?: RequestConfig) => Promise<Chat[]>;
22
+ getChatById: (id: string, config?: RequestConfig) => Promise<Chat>;
23
+ getChatTranscript: (chatId: string, config?: RequestConfig) => Promise<ArrayBuffer>;
24
+ getChatTranscriptByProvider: (params: ChatTranscriptParams, config?: RequestConfig) => Promise<ArrayBuffer>;
25
+ getMessages: (params?: MessageListParams, config?: RequestConfig) => Promise<PaginatedResponse<Message>>;
26
+ getAllMessages: (params?: MessageListParams, config?: RequestConfig) => Promise<Message[]>;
27
+ getMessageById: (id: string, config?: RequestConfig) => Promise<Message>;
28
+ getQueues: (params?: QueueListParams, config?: RequestConfig) => Promise<PaginatedResponse<QueueSummary>>;
29
+ getAllQueues: (params?: QueueListParams, config?: RequestConfig) => Promise<QueueSummary[]>;
30
+ getQueueById: (id: string, config?: RequestConfig) => Promise<QueueSummary>;
31
+ getQueueAvailableAgents: (queueId: string, config?: RequestConfig) => Promise<QueueAvailableAgent[]>;
32
+ getQueueAvailabilityById: (queueId: string, flags?: AvailabilityFlags, config?: RequestConfig) => Promise<QueueAvailabilityInfo>;
33
+ getProjectAvailabilityById: (projectId: string, flags?: AvailabilityFlags, config?: RequestConfig) => Promise<ProjectAvailabilityInfo>;
34
+ getUsers: (params?: UserListParams, config?: RequestConfig) => Promise<PaginatedResponse<User>>;
35
+ getAllUsers: (params?: UserListParams, config?: RequestConfig) => Promise<User[]>;
36
+ getUserById: (id: string, config?: RequestConfig) => Promise<User>;
37
+ sendWhatsappTemplate: (providerAccountId: string, request: SendWhatsappTemplateRequest, config?: RequestConfig) => Promise<SendWhatsappTemplateResponse>;
38
+ addOrUpdateContactInfoField: (chatId: string, fieldName: string, value: any, config?: RequestConfig) => Promise<void>;
39
+ getContactInfoFields: (chatId: string, config?: RequestConfig) => Promise<ContactInfoField[]>;
40
+ banChat: (chatId: string, config?: RequestConfig) => Promise<void>;
41
+ private getUrlFlags;
42
+ private getAllPaginatedResults;
43
+ }
@@ -0,0 +1,128 @@
1
+ import { __awaiter } from "tslib";
2
+ import { HttpClient } from './http-client';
3
+ import { DEFAULT_BASE_URL } from './shared';
4
+ import { HTTP_METHODS } from './types/http-client';
5
+ export class HubtypeSdk extends HttpClient {
6
+ constructor(config) {
7
+ if (!config.baseUrl) {
8
+ config.baseUrl = DEFAULT_BASE_URL;
9
+ }
10
+ super(config);
11
+ this.setAccessToken = (accessToken) => {
12
+ super.setAccessToken(accessToken);
13
+ };
14
+ this.knowledgeBaseInference = (request, config) => __awaiter(this, void 0, void 0, function* () {
15
+ return this.request(HTTP_METHODS.post, '/external/v1/ai/knowledge_base/inference/', request, config);
16
+ });
17
+ this.searchCases = (params, config) => __awaiter(this, void 0, void 0, function* () {
18
+ return this.request(HTTP_METHODS.get, '/external/v1/cases/search/', params, config);
19
+ });
20
+ this.searchAllCases = (params, config) => __awaiter(this, void 0, void 0, function* () {
21
+ return this.getAllPaginatedResults(this.searchCases, params, config);
22
+ });
23
+ this.getCases = (params, config) => __awaiter(this, void 0, void 0, function* () {
24
+ return this.request(HTTP_METHODS.get, '/external/v1/cases/', params, config);
25
+ });
26
+ this.getAllCases = (params, config) => __awaiter(this, void 0, void 0, function* () {
27
+ return this.getAllPaginatedResults(this.getCases, params, config);
28
+ });
29
+ this.getCaseById = (id, config) => __awaiter(this, void 0, void 0, function* () {
30
+ return this.request(HTTP_METHODS.get, `/external/v1/cases/${id}/`, undefined, config);
31
+ });
32
+ this.getChats = (params, config) => __awaiter(this, void 0, void 0, function* () {
33
+ return this.request(HTTP_METHODS.get, '/external/v1/chats/', params, config);
34
+ });
35
+ this.getAllChats = (params, config) => __awaiter(this, void 0, void 0, function* () {
36
+ return this.getAllPaginatedResults(this.getChats, params, config);
37
+ });
38
+ this.getChatById = (id, config) => __awaiter(this, void 0, void 0, function* () {
39
+ return this.request(HTTP_METHODS.get, `/external/v1/chats/${id}/`, undefined, config);
40
+ });
41
+ this.getChatTranscript = (chatId, config) => __awaiter(this, void 0, void 0, function* () {
42
+ return this.request(HTTP_METHODS.get, `/external/v1/chats/${chatId}/transcript/`, undefined, Object.assign(Object.assign({}, config), { responseType: 'arraybuffer' }));
43
+ });
44
+ this.getChatTranscriptByProvider = (params, config) => __awaiter(this, void 0, void 0, function* () {
45
+ return this.request(HTTP_METHODS.get, '/external/v1/chats/transcript/', params, Object.assign(Object.assign({}, config), { responseType: 'arraybuffer' }));
46
+ });
47
+ this.getMessages = (params, config) => __awaiter(this, void 0, void 0, function* () {
48
+ return this.request(HTTP_METHODS.get, '/external/v1/messages/', params, config);
49
+ });
50
+ this.getAllMessages = (params, config) => __awaiter(this, void 0, void 0, function* () {
51
+ return this.getAllPaginatedResults(this.getMessages, params, config);
52
+ });
53
+ this.getMessageById = (id, config) => __awaiter(this, void 0, void 0, function* () {
54
+ return this.request(HTTP_METHODS.get, `/external/v1/messages/${id}/`, undefined, config);
55
+ });
56
+ this.getQueues = (params, config) => __awaiter(this, void 0, void 0, function* () {
57
+ return this.request(HTTP_METHODS.get, '/external/v1/queues/', params, config);
58
+ });
59
+ this.getAllQueues = (params, config) => __awaiter(this, void 0, void 0, function* () {
60
+ return this.getAllPaginatedResults(this.getQueues, params, config);
61
+ });
62
+ this.getQueueById = (id, config) => __awaiter(this, void 0, void 0, function* () {
63
+ return this.request(HTTP_METHODS.get, `/external/v1/queues/${id}/`, undefined, config);
64
+ });
65
+ this.getQueueAvailableAgents = (queueId, config) => __awaiter(this, void 0, void 0, function* () {
66
+ return this.request(HTTP_METHODS.get, `/external/v1/queues/${queueId}/available_agents/`, undefined, config);
67
+ });
68
+ this.getQueueAvailabilityById = (queueId, flags, config) => __awaiter(this, void 0, void 0, function* () {
69
+ const urlFlags = this.getUrlFlags(flags);
70
+ const url = `/external/v1/queues/${queueId}/availability/${urlFlags}`;
71
+ return this.request('GET', url, undefined, config);
72
+ });
73
+ this.getProjectAvailabilityById = (projectId, flags, config) => __awaiter(this, void 0, void 0, function* () {
74
+ const urlFlags = this.getUrlFlags(flags);
75
+ const url = `/external/v1/projects/${projectId}/availability/${urlFlags}`;
76
+ return this.request('GET', url, undefined, config);
77
+ });
78
+ this.getUsers = (params, config) => __awaiter(this, void 0, void 0, function* () {
79
+ return this.request(HTTP_METHODS.get, '/external/v1/users/', params, config);
80
+ });
81
+ this.getAllUsers = (params, config) => __awaiter(this, void 0, void 0, function* () {
82
+ return this.getAllPaginatedResults(this.getUsers, params, config);
83
+ });
84
+ this.getUserById = (id, config) => __awaiter(this, void 0, void 0, function* () {
85
+ return this.request(HTTP_METHODS.get, `/external/v1/users/${id}/`, undefined, config);
86
+ });
87
+ this.sendWhatsappTemplate = (providerAccountId, request, config) => __awaiter(this, void 0, void 0, function* () {
88
+ return this.request(HTTP_METHODS.post, `/external/v1/provider_accounts/${providerAccountId}/send_whatsapp_template/`, request, config);
89
+ });
90
+ this.addOrUpdateContactInfoField = (chatId, fieldName, value, config) => __awaiter(this, void 0, void 0, function* () {
91
+ yield this.request(HTTP_METHODS.put, `/external/v1/chats/${chatId}/contact_info_fields/${fieldName}/`, { value }, config);
92
+ });
93
+ this.getContactInfoFields = (chatId, config) => __awaiter(this, void 0, void 0, function* () {
94
+ return this.request(HTTP_METHODS.get, `/external/v1/chats/${chatId}/contact_info_fields/`, undefined, config);
95
+ });
96
+ this.banChat = (chatId, config) => __awaiter(this, void 0, void 0, function* () {
97
+ yield this.request(HTTP_METHODS.put, `/external/v1/chats/${chatId}/ban/`, undefined, config);
98
+ });
99
+ }
100
+ getUrlFlags(flags) {
101
+ if (!flags || Object.keys(flags).length === 0) {
102
+ return '';
103
+ }
104
+ const flagsArray = Object.keys(flags).map(flag => flags[flag] ? `${flag}=true` : `${flag}=false`);
105
+ return `?${flagsArray.join('&')}`;
106
+ }
107
+ getAllPaginatedResults(method, params, config) {
108
+ return __awaiter(this, void 0, void 0, function* () {
109
+ const results = [];
110
+ let nextUrl = null;
111
+ try {
112
+ do {
113
+ const response = nextUrl
114
+ ? yield this.request(HTTP_METHODS.get, nextUrl, undefined, config)
115
+ : (yield method(Object.assign(Object.assign({}, params), { page_size: 1000 }), config));
116
+ results.push(...response.results);
117
+ nextUrl = response.next;
118
+ } while (nextUrl);
119
+ return results;
120
+ }
121
+ catch (error) {
122
+ console.error('Error fetching all paginated results:', error);
123
+ throw error;
124
+ }
125
+ });
126
+ }
127
+ }
128
+ //# sourceMappingURL=hubtype-sdk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hubtype-sdk.js","sourceRoot":"","sources":["../../../../../libs/botonic/plugin-hubtype-sdk/src/hubtype-sdk.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAe3C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAoBlD,MAAM,OAAO,UACX,SAAQ,UAAU;IAGlB,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,CAAC,OAAO,GAAG,gBAAgB,CAAA;QACnC,CAAC;QACD,KAAK,CAAC,MAAM,CAAC,CAAA;QAGN,mBAAc,GAAG,CAAC,WAAmB,EAAE,EAAE;YAChD,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;QACnC,CAAC,CAAA;QAED,2BAAsB,GAAG,CACvB,OAAyB,EACzB,MAAsB,EACM,EAAE;YAC9B,OAAO,IAAI,CAAC,OAAO,CACjB,YAAY,CAAC,IAAI,EACjB,2CAA2C,EAC3C,OAAO,EACP,MAAM,CACP,CAAA;QACH,CAAC,CAAA,CAAA;QAED,gBAAW,GAAG,CACZ,MAAwB,EACxB,MAAsB,EACwB,EAAE;YAChD,OAAO,IAAI,CAAC,OAAO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AC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAAA;gBAC7D,MAAM,KAAK,CAAA;YACb,CAAC;QACH,CAAC;KAAA;CACF"}
package/src/index.d.ts ADDED
@@ -0,0 +1,56 @@
1
+ import { BotContext, Plugin } from '@botonic/shared';
2
+ import { InferenceRequest, InferenceResponse } from './types/ai';
3
+ import { Case, CaseListParams, CaseSearchParams, CaseSearchResult } from './types/cases';
4
+ import { Chat, ChatListParams, ChatTranscriptParams, ContactInfoField } from './types/chats';
5
+ import { RequestConfig } from './types/config';
6
+ import { Message, MessageListParams } from './types/messages';
7
+ import { AvailabilityFlags, ProjectAvailabilityInfo, QueueAvailabilityInfo, QueueAvailableAgent, QueueListParams, QueueSummary } from './types/queues';
8
+ import { BotonicPluginHubtypeSdkInterface, PaginatedResponse } from './types/shared';
9
+ import { User, UserListParams } from './types/users';
10
+ import { SendWhatsappTemplateRequest, SendWhatsappTemplateResponse } from './types/whatsapp';
11
+ export declare class BotonicPluginHubtypeSdk implements Plugin, BotonicPluginHubtypeSdkInterface {
12
+ private hubtypeSdk;
13
+ pre: (botContext: BotContext) => void;
14
+ setAccessToken: (accessToken: string) => void;
15
+ knowledgeBaseInference: (request: InferenceRequest, config?: RequestConfig) => Promise<InferenceResponse>;
16
+ searchCases: (params: CaseSearchParams, config?: RequestConfig) => Promise<PaginatedResponse<CaseSearchResult>>;
17
+ searchAllCases: (params: CaseSearchParams, config?: RequestConfig) => Promise<CaseSearchResult[]>;
18
+ getCases: (params?: CaseListParams, config?: RequestConfig) => Promise<PaginatedResponse<Case>>;
19
+ getAllCases: (params?: CaseListParams, config?: RequestConfig) => Promise<Case[]>;
20
+ getCaseById: (id: string, config?: RequestConfig) => Promise<Case>;
21
+ getChats: (params?: ChatListParams, config?: RequestConfig) => Promise<PaginatedResponse<Chat>>;
22
+ getAllChats: (params?: ChatListParams, config?: RequestConfig) => Promise<Chat[]>;
23
+ getChatById: (id: string, config?: RequestConfig) => Promise<Chat>;
24
+ getChatTranscript: (chatId: string, config?: RequestConfig) => Promise<ArrayBuffer>;
25
+ getChatTranscriptByProvider: (params: ChatTranscriptParams, config?: RequestConfig) => Promise<ArrayBuffer>;
26
+ getMessages: (params?: MessageListParams, config?: RequestConfig) => Promise<PaginatedResponse<Message>>;
27
+ getAllMessages: (params?: MessageListParams, config?: RequestConfig) => Promise<Message[]>;
28
+ getMessageById: (id: string, config?: RequestConfig) => Promise<Message>;
29
+ getQueues: (params?: QueueListParams, config?: RequestConfig) => Promise<PaginatedResponse<QueueSummary>>;
30
+ getAllQueues: (params?: QueueListParams, config?: RequestConfig) => Promise<QueueSummary[]>;
31
+ getQueueById: (id: string, config?: RequestConfig) => Promise<QueueSummary>;
32
+ getQueueAvailableAgents: (queueId: string, config?: RequestConfig) => Promise<QueueAvailableAgent[]>;
33
+ getQueueAvailabilityById: (queueId: string, flags?: AvailabilityFlags, config?: RequestConfig) => Promise<QueueAvailabilityInfo>;
34
+ getProjectAvailabilityById: (projectId: string, flags?: AvailabilityFlags, config?: RequestConfig) => Promise<ProjectAvailabilityInfo>;
35
+ getUsers: (params?: UserListParams, config?: RequestConfig) => Promise<PaginatedResponse<User>>;
36
+ getAllUsers: (params?: UserListParams, config?: RequestConfig) => Promise<User[]>;
37
+ getUserById: (id: string, config?: RequestConfig) => Promise<User>;
38
+ sendWhatsappTemplate: (providerAccountId: string, request: SendWhatsappTemplateRequest, config?: RequestConfig) => Promise<SendWhatsappTemplateResponse>;
39
+ addOrUpdateContactInfoField: (chatId: string, fieldName: string, value: any, config?: RequestConfig) => Promise<void>;
40
+ getContactInfoFields: (chatId: string, config?: RequestConfig) => Promise<ContactInfoField[]>;
41
+ banChat: (chatId: string, config?: RequestConfig) => Promise<void>;
42
+ }
43
+ export * from './http-client';
44
+ export * from './hubtype-sdk';
45
+ export * from './types/agents';
46
+ export * from './types/ai';
47
+ export * from './types/cases';
48
+ export * from './types/chats';
49
+ export * from './types/config';
50
+ export * from './types/contact-info';
51
+ export * from './types/http-client';
52
+ export * from './types/messages';
53
+ export * from './types/queues';
54
+ export * from './types/shared';
55
+ export * from './types/users';
56
+ export * from './types/whatsapp';