@ikatec/digisac-api-sdk 4.2.0 → 4.4.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.
- package/dist/apis/contacts/ContactsApi.cjs +70 -0
- package/dist/apis/contacts/ContactsApi.cjs.map +1 -1
- package/dist/apis/contacts/ContactsApi.d.ts +51 -1
- package/dist/apis/contacts/ContactsApi.d.ts.map +1 -1
- package/dist/apis/contacts/ContactsApi.mjs +70 -0
- package/dist/apis/contacts/ContactsApi.mjs.map +1 -1
- package/dist/apis/contacts/types.d.ts +141 -1
- package/dist/apis/contacts/types.d.ts.map +1 -1
- package/dist/apis/dashboard/DashboardApi.cjs +36 -1
- package/dist/apis/dashboard/DashboardApi.cjs.map +1 -1
- package/dist/apis/dashboard/DashboardApi.d.ts +55 -2
- package/dist/apis/dashboard/DashboardApi.d.ts.map +1 -1
- package/dist/apis/dashboard/DashboardApi.mjs +36 -1
- package/dist/apis/dashboard/DashboardApi.mjs.map +1 -1
- package/dist/apis/dashboard/types.d.ts +71 -0
- package/dist/apis/dashboard/types.d.ts.map +1 -1
- package/dist/apis/services/ServicesApi.cjs +8 -0
- package/dist/apis/services/ServicesApi.cjs.map +1 -1
- package/dist/apis/services/ServicesApi.d.ts +7 -1
- package/dist/apis/services/ServicesApi.d.ts.map +1 -1
- package/dist/apis/services/ServicesApi.mjs +8 -0
- package/dist/apis/services/ServicesApi.mjs.map +1 -1
- package/dist/apis/services/types.d.ts +7 -0
- package/dist/apis/services/types.d.ts.map +1 -1
- package/dist/apis/tags/TagsApi.cjs +23 -0
- package/dist/apis/tags/TagsApi.cjs.map +1 -1
- package/dist/apis/tags/TagsApi.d.ts +19 -1
- package/dist/apis/tags/TagsApi.d.ts.map +1 -1
- package/dist/apis/tags/TagsApi.mjs +23 -0
- package/dist/apis/tags/TagsApi.mjs.map +1 -1
- package/dist/apis/tags/types.d.ts +8 -0
- package/dist/apis/tags/types.d.ts.map +1 -1
- package/dist/apis/users/UsersApi.cjs +77 -0
- package/dist/apis/users/UsersApi.cjs.map +1 -1
- package/dist/apis/users/UsersApi.d.ts +59 -1
- package/dist/apis/users/UsersApi.d.ts.map +1 -1
- package/dist/apis/users/UsersApi.mjs +77 -0
- package/dist/apis/users/UsersApi.mjs.map +1 -1
- package/dist/apis/users/types.d.ts +102 -0
- package/dist/apis/users/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/apis/acceptanceTerms/AcceptanceTermsApi.test.ts +1 -1
- package/src/apis/authHistory/AuthHistoryApi.test.ts +1 -1
- package/src/apis/campaigns/CampaignsApi.test.ts +1 -1
- package/src/apis/contacts/ContactsApi.test.ts +182 -5
- package/src/apis/contacts/ContactsApi.ts +128 -0
- package/src/apis/contacts/types.ts +154 -1
- package/src/apis/dashboard/DashboardApi.test-d.ts +49 -0
- package/src/apis/dashboard/DashboardApi.test.ts +197 -9
- package/src/apis/dashboard/DashboardApi.ts +130 -2
- package/src/apis/dashboard/types.ts +78 -0
- package/src/apis/messages/MessagesApi.test.ts +3 -3
- package/src/apis/payloads.test-d.ts +26 -0
- package/src/apis/queryFormat.test.ts +91 -3
- package/src/apis/serviceAccessManagement/ServiceAccessManagementApi.test.ts +2 -2
- package/src/apis/services/ServicesApi.test.ts +49 -0
- package/src/apis/services/ServicesApi.ts +10 -1
- package/src/apis/services/types.ts +9 -0
- package/src/apis/stickerUsers/StickerUsersApi.test.ts +1 -1
- package/src/apis/tags/TagsApi.test.ts +79 -0
- package/src/apis/tags/TagsApi.ts +57 -1
- package/src/apis/tags/types.ts +9 -0
- package/src/apis/terms/TermsApi.test.ts +1 -1
- package/src/apis/users/UsersApi.test.ts +228 -0
- package/src/apis/users/UsersApi.ts +152 -1
- package/src/apis/users/types.ts +121 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardApi.d.ts","sourceRoot":"","sources":["../../../src/apis/dashboard/DashboardApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAA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AC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAOhC;;;OAGG;IACH,YAAY,CACV,KAAK,CAAC,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAOlC;;;OAGG;IACH,OAAO,CAAC,UAAU;CAWnB"}
|
|
@@ -3,7 +3,8 @@ import { BaseApi } from "../../core/BaseApi.mjs";
|
|
|
3
3
|
//#region src/apis/dashboard/DashboardApi.ts
|
|
4
4
|
/**
|
|
5
5
|
* Service statistics ("Estatísticas de atendimento"). The `/dashboard` routes only require an
|
|
6
|
-
* authenticated user (no permission check).
|
|
6
|
+
* authenticated user (no permission check). Every route takes the same {@link DashboardQuery}
|
|
7
|
+
* filters; the grouped routes answer one item per day, user, department, topic or connection.
|
|
7
8
|
*/
|
|
8
9
|
var DashboardApi = class extends BaseApi {
|
|
9
10
|
basePath = "/dashboard";
|
|
@@ -11,6 +12,40 @@ var DashboardApi = class extends BaseApi {
|
|
|
11
12
|
getGeneral(query, headers) {
|
|
12
13
|
return this.client.get(`${this.basePath}/general${this.toQueryString(query)}`, headers);
|
|
13
14
|
}
|
|
15
|
+
getByPeriod(query, headers) {
|
|
16
|
+
return this.getGrouped("by-period", query, headers);
|
|
17
|
+
}
|
|
18
|
+
getByUser(query, headers) {
|
|
19
|
+
return this.getGrouped("by-user", query, headers);
|
|
20
|
+
}
|
|
21
|
+
getByDepartment(query, headers) {
|
|
22
|
+
return this.getGrouped("by-department", query, headers);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The counts of each ticket topic of the period (`GET /dashboard/by-topic`). Does not take
|
|
26
|
+
* `withTotals` (the backend ignores it).
|
|
27
|
+
*/
|
|
28
|
+
getByTopic(query, headers) {
|
|
29
|
+
return this.client.get(`${this.basePath}/by-topic${this.toQueryString(query)}`, headers);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The counts of each connection of the period (`GET /dashboard/by-service`). Does not take
|
|
33
|
+
* `withTotals` (the backend ignores it).
|
|
34
|
+
*/
|
|
35
|
+
getByService(query, headers) {
|
|
36
|
+
return this.client.get(`${this.basePath}/by-service${this.toQueryString(query)}`, headers);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* `withTotals` is only sent when `true`: the backend reads it with a truthiness check, so in the
|
|
40
|
+
* `qs` format a serialized `withTotals=false` (the string `'false'`) would wrap the answer anyway.
|
|
41
|
+
*/
|
|
42
|
+
getGrouped(route, query, headers) {
|
|
43
|
+
const { withTotals, ...filters } = query ?? {};
|
|
44
|
+
return this.client.get(`${this.basePath}/${route}${this.toQueryString(withTotals ? {
|
|
45
|
+
...filters,
|
|
46
|
+
withTotals: true
|
|
47
|
+
} : filters)}`, headers);
|
|
48
|
+
}
|
|
14
49
|
};
|
|
15
50
|
|
|
16
51
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardApi.mjs","names":[],"sources":["../../../src/apis/dashboard/DashboardApi.ts"],"sourcesContent":["import { BaseApi } from '../../core/BaseApi'\nimport type {
|
|
1
|
+
{"version":3,"file":"DashboardApi.mjs","names":[],"sources":["../../../src/apis/dashboard/DashboardApi.ts"],"sourcesContent":["import { BaseApi } from '../../core/BaseApi'\nimport type {\n DashboardDepartmentItem,\n DashboardGeneral,\n DashboardGrouped,\n DashboardPeriodItem,\n DashboardQuery,\n DashboardServiceItem,\n DashboardTopicItem,\n DashboardUserItem,\n DashboardWithTotals,\n} from './types'\n\n/**\n * Service statistics (\"Estatísticas de atendimento\"). The `/dashboard` routes only require an\n * authenticated user (no permission check). Every route takes the same {@link DashboardQuery}\n * filters; the grouped routes answer one item per day, user, department, topic or connection.\n */\nexport class DashboardApi extends BaseApi {\n public readonly basePath = '/dashboard'\n\n /** Message, ticket, contact and time counts of the period (`GET /dashboard/general`). */\n getGeneral(query?: DashboardQuery, headers?: Record<string, string>): Promise<DashboardGeneral> {\n return this.client.get<DashboardGeneral>(\n `${this.basePath}/general${this.toQueryString(query)}`,\n headers,\n )\n }\n\n /**\n * The counts of each bucket of the period (`GET /dashboard/by-period`): one item per day by default,\n * or per `grouping` (hour, week, month, year). With `withTotals: true` the answer is\n * `{ totals, items }`.\n */\n getByPeriod(\n query: DashboardQuery & { withTotals: true },\n headers?: Record<string, string>,\n ): Promise<DashboardGrouped<DashboardPeriodItem>>\n getByPeriod(\n query?: DashboardQuery & { withTotals?: false },\n headers?: Record<string, string>,\n ): Promise<DashboardPeriodItem[]>\n /** When `withTotals` is only known at runtime (e.g. a `boolean` variable). */\n getByPeriod(\n query?: DashboardQuery & DashboardWithTotals,\n headers?: Record<string, string>,\n ): Promise<DashboardPeriodItem[] | DashboardGrouped<DashboardPeriodItem>>\n getByPeriod(\n query?: DashboardQuery & DashboardWithTotals,\n headers?: Record<string, string>,\n ): Promise<DashboardPeriodItem[] | DashboardGrouped<DashboardPeriodItem>> {\n return this.getGrouped<DashboardPeriodItem>('by-period', query, headers)\n }\n\n /**\n * The counts of each user of the period (`GET /dashboard/by-user`). With `withTotals: true` the\n * answer is `{ totals, items }`.\n */\n getByUser(\n query: DashboardQuery & { withTotals: true },\n headers?: Record<string, string>,\n ): Promise<DashboardGrouped<DashboardUserItem>>\n getByUser(\n query?: DashboardQuery & { withTotals?: false },\n headers?: Record<string, string>,\n ): Promise<DashboardUserItem[]>\n /** When `withTotals` is only known at runtime (e.g. a `boolean` variable). */\n getByUser(\n query?: DashboardQuery & DashboardWithTotals,\n headers?: Record<string, string>,\n ): Promise<DashboardUserItem[] | DashboardGrouped<DashboardUserItem>>\n getByUser(\n query?: DashboardQuery & DashboardWithTotals,\n headers?: Record<string, string>,\n ): Promise<DashboardUserItem[] | DashboardGrouped<DashboardUserItem>> {\n return this.getGrouped<DashboardUserItem>('by-user', query, headers)\n }\n\n /**\n * The counts of each department of the period (`GET /dashboard/by-department`). With\n * `withTotals: true` the answer is `{ totals, items }`.\n */\n getByDepartment(\n query: DashboardQuery & { withTotals: true },\n headers?: Record<string, string>,\n ): Promise<DashboardGrouped<DashboardDepartmentItem>>\n getByDepartment(\n query?: DashboardQuery & { withTotals?: false },\n headers?: Record<string, string>,\n ): Promise<DashboardDepartmentItem[]>\n /** When `withTotals` is only known at runtime (e.g. a `boolean` variable). */\n getByDepartment(\n query?: DashboardQuery & DashboardWithTotals,\n headers?: Record<string, string>,\n ): Promise<DashboardDepartmentItem[] | DashboardGrouped<DashboardDepartmentItem>>\n getByDepartment(\n query?: DashboardQuery & DashboardWithTotals,\n headers?: Record<string, string>,\n ): Promise<DashboardDepartmentItem[] | DashboardGrouped<DashboardDepartmentItem>> {\n return this.getGrouped<DashboardDepartmentItem>('by-department', query, headers)\n }\n\n /**\n * The counts of each ticket topic of the period (`GET /dashboard/by-topic`). Does not take\n * `withTotals` (the backend ignores it).\n */\n getByTopic(\n query?: DashboardQuery,\n headers?: Record<string, string>,\n ): Promise<DashboardTopicItem[]> {\n return this.client.get<DashboardTopicItem[]>(\n `${this.basePath}/by-topic${this.toQueryString(query)}`,\n headers,\n )\n }\n\n /**\n * The counts of each connection of the period (`GET /dashboard/by-service`). Does not take\n * `withTotals` (the backend ignores it).\n */\n getByService(\n query?: DashboardQuery,\n headers?: Record<string, string>,\n ): Promise<DashboardServiceItem[]> {\n return this.client.get<DashboardServiceItem[]>(\n `${this.basePath}/by-service${this.toQueryString(query)}`,\n headers,\n )\n }\n\n /**\n * `withTotals` is only sent when `true`: the backend reads it with a truthiness check, so in the\n * `qs` format a serialized `withTotals=false` (the string `'false'`) would wrap the answer anyway.\n */\n private getGrouped<TItem>(\n route: string,\n query?: DashboardQuery & DashboardWithTotals,\n headers?: Record<string, string>,\n ): Promise<TItem[] | DashboardGrouped<TItem>> {\n const { withTotals, ...filters } = query ?? {}\n return this.client.get<TItem[] | DashboardGrouped<TItem>>(\n `${this.basePath}/${route}${this.toQueryString(withTotals ? { ...filters, withTotals: true } : filters)}`,\n headers,\n )\n }\n}\n"],"mappings":";;;;;;;;AAkBA,IAAa,eAAb,cAAkC,QAAQ;CACxC,AAAgB,WAAW;;CAG3B,WAAW,OAAwB,SAA6D;AAC9F,SAAO,KAAK,OAAO,IACjB,GAAG,KAAK,SAAS,UAAU,KAAK,cAAc,MAAM,IACpD,QACD;;CAqBH,YACE,OACA,SACwE;AACxE,SAAO,KAAK,WAAgC,aAAa,OAAO,QAAQ;;CAoB1E,UACE,OACA,SACoE;AACpE,SAAO,KAAK,WAA8B,WAAW,OAAO,QAAQ;;CAoBtE,gBACE,OACA,SACgF;AAChF,SAAO,KAAK,WAAoC,iBAAiB,OAAO,QAAQ;;;;;;CAOlF,WACE,OACA,SAC+B;AAC/B,SAAO,KAAK,OAAO,IACjB,GAAG,KAAK,SAAS,WAAW,KAAK,cAAc,MAAM,IACrD,QACD;;;;;;CAOH,aACE,OACA,SACiC;AACjC,SAAO,KAAK,OAAO,IACjB,GAAG,KAAK,SAAS,aAAa,KAAK,cAAc,MAAM,IACvD,QACD;;;;;;CAOH,AAAQ,WACN,OACA,OACA,SAC4C;EAC5C,MAAM,EAAE,YAAY,GAAG,YAAY,SAAS,EAAE;AAC9C,SAAO,KAAK,OAAO,IACjB,GAAG,KAAK,SAAS,GAAG,QAAQ,KAAK,cAAc,aAAa;GAAE,GAAG;GAAS,YAAY;GAAM,GAAG,QAAQ,IACvG,QACD"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Granularity of the by-period items (`grouping`). Default: `daily`. Whatever the granularity, the
|
|
3
|
+
* `name` of each item is its day (`dd/MM/yyyy`), so with `hourly` the items of one day share the same
|
|
4
|
+
* `name` (they come in chronological order).
|
|
5
|
+
*/
|
|
6
|
+
export type DashboardGrouping = 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly';
|
|
1
7
|
/**
|
|
2
8
|
* Filters of the service statistics (`/dashboard`). Every field is optional; the period defaults to
|
|
3
9
|
* the last 7 days.
|
|
@@ -35,6 +41,20 @@ export type DashboardQuery = {
|
|
|
35
41
|
serviceId?: string | string[];
|
|
36
42
|
tagId?: string | string[];
|
|
37
43
|
ticketTopicId?: string | string[];
|
|
44
|
+
/**
|
|
45
|
+
* Granularity of the `getByPeriod` items (the other routes ignore it). Default: `daily`. See
|
|
46
|
+
* {@link DashboardGrouping} for the `name` of the items.
|
|
47
|
+
*/
|
|
48
|
+
grouping?: DashboardGrouping;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* `withTotals: true` makes `getByPeriod`, `getByUser` and `getByDepartment` answer `{ totals, items }`,
|
|
52
|
+
* where `totals` are the `getGeneral` counts of the same filters (`getByTopic` and `getByService` do
|
|
53
|
+
* not take it). Kept out of `DashboardQuery` so a query without it keeps the plain array overload.
|
|
54
|
+
* Only sent to the backend when `true`.
|
|
55
|
+
*/
|
|
56
|
+
export type DashboardWithTotals = {
|
|
57
|
+
withTotals?: boolean;
|
|
38
58
|
};
|
|
39
59
|
/** `GET /dashboard/general` — counts of the period. Times are in seconds. */
|
|
40
60
|
export type DashboardGeneral = {
|
|
@@ -50,4 +70,55 @@ export type DashboardGeneral = {
|
|
|
50
70
|
ticketTime: number;
|
|
51
71
|
contactsCount: number;
|
|
52
72
|
};
|
|
73
|
+
/**
|
|
74
|
+
* Counts shared by the grouped routes (`by-period`, `by-user`, `by-department`, `by-topic`,
|
|
75
|
+
* `by-service`). The backend builds each item from the rows it found, so a count is ABSENT (not 0)
|
|
76
|
+
* when the group has no row for it: read them with a default. Times are in seconds.
|
|
77
|
+
*/
|
|
78
|
+
export type DashboardGroupCounts = {
|
|
79
|
+
sentMessagesCount?: number;
|
|
80
|
+
receivedMessagesCount?: number;
|
|
81
|
+
openedTicketsCount?: number;
|
|
82
|
+
closedTicketsCount?: number;
|
|
83
|
+
waitingTime?: number;
|
|
84
|
+
ticketTime?: number;
|
|
85
|
+
contactsCount?: number;
|
|
86
|
+
};
|
|
87
|
+
/** `GET /dashboard/by-period` — the counts of one day of the period (`name` as `dd/MM/yyyy`). */
|
|
88
|
+
export type DashboardPeriodItem = DashboardGroupCounts & {
|
|
89
|
+
name: string;
|
|
90
|
+
totalMessagesCount?: number;
|
|
91
|
+
totalTicketsCount?: number;
|
|
92
|
+
waitingTimeAfterBot?: number;
|
|
93
|
+
waitingTimeAvg?: number;
|
|
94
|
+
};
|
|
95
|
+
/** `GET /dashboard/by-user` — the counts of one user (`name` is the user's name). */
|
|
96
|
+
export type DashboardUserItem = DashboardGroupCounts & {
|
|
97
|
+
name: string;
|
|
98
|
+
ticketTopicsCount?: number;
|
|
99
|
+
};
|
|
100
|
+
/** `GET /dashboard/by-department` — the counts of one department (`name` is its name). */
|
|
101
|
+
export type DashboardDepartmentItem = DashboardGroupCounts & {
|
|
102
|
+
name: string;
|
|
103
|
+
ticketTopicsCount?: number;
|
|
104
|
+
};
|
|
105
|
+
/** `GET /dashboard/by-topic` — the counts of one ticket topic (`name` is the topic's name). */
|
|
106
|
+
export type DashboardTopicItem = DashboardGroupCounts & {
|
|
107
|
+
name: string;
|
|
108
|
+
waitingTimeAfterBot?: number;
|
|
109
|
+
waitingTimeAvg?: number;
|
|
110
|
+
};
|
|
111
|
+
/** `GET /dashboard/by-service` — the counts of one connection (`name` is the connection's name). */
|
|
112
|
+
export type DashboardServiceItem = DashboardGroupCounts & {
|
|
113
|
+
name: string;
|
|
114
|
+
waitingTimeAfterBot?: number;
|
|
115
|
+
waitingTimeAvg?: number;
|
|
116
|
+
ticketTopicsCount?: number;
|
|
117
|
+
};
|
|
118
|
+
/** Answer of `getByPeriod`, `getByUser` and `getByDepartment` with `withTotals: true`. */
|
|
119
|
+
export type DashboardGrouped<TItem> = {
|
|
120
|
+
/** The `getGeneral` counts of the same filters. */
|
|
121
|
+
totals: DashboardGeneral;
|
|
122
|
+
items: TItem[];
|
|
123
|
+
};
|
|
53
124
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/apis/dashboard/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,UAAU,GAAG,WAAW,CAAA;IACrC,6CAA6C;IAC7C,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAA;IAClC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAChC;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;IAC3C;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;IACrC,UAAU,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,KAAK,CAAA;IAC1C,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC7B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACzB,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/apis/dashboard/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAA;AAEpF;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8EAA8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,0EAA0E;IAC1E,UAA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;AAC1F,MAAM,MAAM,gBAAgB,CAAC,KAAK,IAAI;IACpC,mDAAmD;IACnD,MAAM,EAAE,gBAAgB,CAAA;IACxB,KAAK,EAAE,KAAK,EAAE,CAAA;CACf,CAAA"}
|
|
@@ -6,6 +6,14 @@ var ServicesApi = class extends require_core_ArchivableCrudApi.ArchivableCrudApi
|
|
|
6
6
|
constructor(client) {
|
|
7
7
|
super(client, "/services");
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Returns, for each connection type of the account plan, how many connections are used,
|
|
11
|
+
* allowed and still available.
|
|
12
|
+
* @permissions services.view
|
|
13
|
+
*/
|
|
14
|
+
getLimits(headers) {
|
|
15
|
+
return this.client.get(`${this.basePath}/limits`, headers);
|
|
16
|
+
}
|
|
9
17
|
};
|
|
10
18
|
|
|
11
19
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServicesApi.cjs","names":["ArchivableCrudApi"],"sources":["../../../src/apis/services/ServicesApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { ArchivableCrudApi } from '../../core/ArchivableCrudApi'\nimport type { Service, CreateServicePayload, UpdateServicePayload } from './types'\n\nexport class ServicesApi extends ArchivableCrudApi<\n Service,\n CreateServicePayload,\n UpdateServicePayload\n> {\n constructor(client: ApiClient) {\n super(client, '/services')\n }\n}\n"],"mappings":";;;;AAIA,IAAa,cAAb,cAAiCA,iDAI/B;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,YAAY"}
|
|
1
|
+
{"version":3,"file":"ServicesApi.cjs","names":["ArchivableCrudApi"],"sources":["../../../src/apis/services/ServicesApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { ArchivableCrudApi } from '../../core/ArchivableCrudApi'\nimport type { Service, CreateServicePayload, ServiceLimits, UpdateServicePayload } from './types'\n\nexport class ServicesApi extends ArchivableCrudApi<\n Service,\n CreateServicePayload,\n UpdateServicePayload\n> {\n constructor(client: ApiClient) {\n super(client, '/services')\n }\n\n /**\n * Returns, for each connection type of the account plan, how many connections are used,\n * allowed and still available.\n * @permissions services.view\n */\n getLimits(headers?: Record<string, string>): Promise<ServiceLimits> {\n return this.client.get<ServiceLimits>(`${this.basePath}/limits`, headers)\n }\n}\n"],"mappings":";;;;AAIA,IAAa,cAAb,cAAiCA,iDAI/B;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,YAAY;;;;;;;CAQ5B,UAAU,SAA0D;AAClE,SAAO,KAAK,OAAO,IAAmB,GAAG,KAAK,SAAS,UAAU,QAAQ"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import type { ApiClient } from '../../core/ApiClient';
|
|
2
2
|
import { ArchivableCrudApi } from '../../core/ArchivableCrudApi';
|
|
3
|
-
import type { Service, CreateServicePayload, UpdateServicePayload } from './types';
|
|
3
|
+
import type { Service, CreateServicePayload, ServiceLimits, UpdateServicePayload } from './types';
|
|
4
4
|
export declare class ServicesApi extends ArchivableCrudApi<Service, CreateServicePayload, UpdateServicePayload> {
|
|
5
5
|
constructor(client: ApiClient);
|
|
6
|
+
/**
|
|
7
|
+
* Returns, for each connection type of the account plan, how many connections are used,
|
|
8
|
+
* allowed and still available.
|
|
9
|
+
* @permissions services.view
|
|
10
|
+
*/
|
|
11
|
+
getLimits(headers?: Record<string, string>): Promise<ServiceLimits>;
|
|
6
12
|
}
|
|
7
13
|
//# sourceMappingURL=ServicesApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServicesApi.d.ts","sourceRoot":"","sources":["../../../src/apis/services/ServicesApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"ServicesApi.d.ts","sourceRoot":"","sources":["../../../src/apis/services/ServicesApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAEjG,qBAAa,WAAY,SAAQ,iBAAiB,CAChD,OAAO,EACP,oBAAoB,EACpB,oBAAoB,CACrB;gBACa,MAAM,EAAE,SAAS;IAI7B;;;;OAIG;IACH,SAAS,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC;CAGpE"}
|
|
@@ -5,6 +5,14 @@ var ServicesApi = class extends ArchivableCrudApi {
|
|
|
5
5
|
constructor(client) {
|
|
6
6
|
super(client, "/services");
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Returns, for each connection type of the account plan, how many connections are used,
|
|
10
|
+
* allowed and still available.
|
|
11
|
+
* @permissions services.view
|
|
12
|
+
*/
|
|
13
|
+
getLimits(headers) {
|
|
14
|
+
return this.client.get(`${this.basePath}/limits`, headers);
|
|
15
|
+
}
|
|
8
16
|
};
|
|
9
17
|
|
|
10
18
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServicesApi.mjs","names":[],"sources":["../../../src/apis/services/ServicesApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { ArchivableCrudApi } from '../../core/ArchivableCrudApi'\nimport type { Service, CreateServicePayload, UpdateServicePayload } from './types'\n\nexport class ServicesApi extends ArchivableCrudApi<\n Service,\n CreateServicePayload,\n UpdateServicePayload\n> {\n constructor(client: ApiClient) {\n super(client, '/services')\n }\n}\n"],"mappings":";;;AAIA,IAAa,cAAb,cAAiC,kBAI/B;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,YAAY"}
|
|
1
|
+
{"version":3,"file":"ServicesApi.mjs","names":[],"sources":["../../../src/apis/services/ServicesApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { ArchivableCrudApi } from '../../core/ArchivableCrudApi'\nimport type { Service, CreateServicePayload, ServiceLimits, UpdateServicePayload } from './types'\n\nexport class ServicesApi extends ArchivableCrudApi<\n Service,\n CreateServicePayload,\n UpdateServicePayload\n> {\n constructor(client: ApiClient) {\n super(client, '/services')\n }\n\n /**\n * Returns, for each connection type of the account plan, how many connections are used,\n * allowed and still available.\n * @permissions services.view\n */\n getLimits(headers?: Record<string, string>): Promise<ServiceLimits> {\n return this.client.get<ServiceLimits>(`${this.basePath}/limits`, headers)\n }\n}\n"],"mappings":";;;AAIA,IAAa,cAAb,cAAiC,kBAI/B;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,YAAY;;;;;;;CAQ5B,UAAU,SAA0D;AAClE,SAAO,KAAK,OAAO,IAAmB,GAAG,KAAK,SAAS,UAAU,QAAQ"}
|
|
@@ -201,4 +201,11 @@ export type UpdateServicePayload = {
|
|
|
201
201
|
botId?: string | null;
|
|
202
202
|
archivedAt?: string | null;
|
|
203
203
|
};
|
|
204
|
+
export type ServiceLimit = {
|
|
205
|
+
used: number;
|
|
206
|
+
total: number;
|
|
207
|
+
available: number;
|
|
208
|
+
};
|
|
209
|
+
/** Connections used and allowed by the account plan, by connection type. */
|
|
210
|
+
export type ServiceLimits = Partial<Record<ServiceType, ServiceLimit>>;
|
|
204
211
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/apis/services/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEtD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,eAAe,CAAA;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,QAAQ,CAAC,EAAE,eAAe,CAAA;IAC1B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,4EAA4E;AAC5E,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC,CAAA"}
|
|
@@ -6,6 +6,29 @@ var TagsApi = class extends require_core_BaseCrudApi.BaseCrudApi {
|
|
|
6
6
|
constructor(client) {
|
|
7
7
|
super(client, "/tags");
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Adds the tag to every contact of the account that matches the selection. Resolves to `'OK'`.
|
|
11
|
+
* @permissions tags.view
|
|
12
|
+
*/
|
|
13
|
+
attachContacts(id, body, headers) {
|
|
14
|
+
return this.client.post(`${this.basePath}/${id}/contacts`, body, headers);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Removes the tag from every contact of the account that matches the selection. Resolves to
|
|
18
|
+
* `'OK'`.
|
|
19
|
+
* @permissions tags.view OR tags.destroy
|
|
20
|
+
*/
|
|
21
|
+
detachContacts(id, body, headers) {
|
|
22
|
+
return this.client.request("DELETE", `${this.basePath}/${id}/contacts`, body, headers);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Links several tags to the given departments. Resolves to `'OK'`. A tag without departments
|
|
26
|
+
* is already available to all of them and is left unchanged.
|
|
27
|
+
* @permissions tags.view
|
|
28
|
+
*/
|
|
29
|
+
attachManyToDepartments(body, headers) {
|
|
30
|
+
return this.client.post(`${this.basePath}/attach-many-departments`, body, headers);
|
|
31
|
+
}
|
|
9
32
|
};
|
|
10
33
|
|
|
11
34
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagsApi.cjs","names":["BaseCrudApi"],"sources":["../../../src/apis/tags/TagsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type {
|
|
1
|
+
{"version":3,"file":"TagsApi.cjs","names":["BaseCrudApi"],"sources":["../../../src/apis/tags/TagsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { ContactsSelection } from '../contacts/types'\nimport type {\n AttachTagsToDepartmentsPayload,\n CreateTagPayload,\n Tag,\n UpdateTagPayload,\n} from './types'\n\nexport class TagsApi extends BaseCrudApi<Tag, CreateTagPayload, UpdateTagPayload> {\n constructor(client: ApiClient) {\n super(client, '/tags')\n }\n\n /**\n * Adds the tag to every contact of the account that matches the selection. Resolves to `'OK'`.\n * @permissions tags.view\n */\n attachContacts(\n id: string,\n body: ContactsSelection,\n headers?: Record<string, string>,\n ): Promise<string> {\n return this.client.post<string, ContactsSelection>(\n `${this.basePath}/${id}/contacts`,\n body,\n headers,\n )\n }\n\n /**\n * Removes the tag from every contact of the account that matches the selection. Resolves to\n * `'OK'`.\n * @permissions tags.view OR tags.destroy\n */\n detachContacts(\n id: string,\n body: ContactsSelection,\n headers?: Record<string, string>,\n ): Promise<string> {\n return this.client.request<string, ContactsSelection>(\n 'DELETE',\n `${this.basePath}/${id}/contacts`,\n body,\n headers,\n )\n }\n\n /**\n * Links several tags to the given departments. Resolves to `'OK'`. A tag without departments\n * is already available to all of them and is left unchanged.\n * @permissions tags.view\n */\n attachManyToDepartments(\n body: AttachTagsToDepartmentsPayload,\n headers?: Record<string, string>,\n ): Promise<string> {\n return this.client.post<string, AttachTagsToDepartmentsPayload>(\n `${this.basePath}/attach-many-departments`,\n body,\n headers,\n )\n }\n}\n"],"mappings":";;;;AAUA,IAAa,UAAb,cAA6BA,qCAAqD;CAChF,YAAY,QAAmB;AAC7B,QAAM,QAAQ,QAAQ;;;;;;CAOxB,eACE,IACA,MACA,SACiB;AACjB,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,GAAG,GAAG,YACvB,MACA,QACD;;;;;;;CAQH,eACE,IACA,MACA,SACiB;AACjB,SAAO,KAAK,OAAO,QACjB,UACA,GAAG,KAAK,SAAS,GAAG,GAAG,YACvB,MACA,QACD;;;;;;;CAQH,wBACE,MACA,SACiB;AACjB,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,2BACjB,MACA,QACD"}
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
import type { ApiClient } from '../../core/ApiClient';
|
|
2
2
|
import { BaseCrudApi } from '../../core/BaseCrudApi';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ContactsSelection } from '../contacts/types';
|
|
4
|
+
import type { AttachTagsToDepartmentsPayload, CreateTagPayload, Tag, UpdateTagPayload } from './types';
|
|
4
5
|
export declare class TagsApi extends BaseCrudApi<Tag, CreateTagPayload, UpdateTagPayload> {
|
|
5
6
|
constructor(client: ApiClient);
|
|
7
|
+
/**
|
|
8
|
+
* Adds the tag to every contact of the account that matches the selection. Resolves to `'OK'`.
|
|
9
|
+
* @permissions tags.view
|
|
10
|
+
*/
|
|
11
|
+
attachContacts(id: string, body: ContactsSelection, headers?: Record<string, string>): Promise<string>;
|
|
12
|
+
/**
|
|
13
|
+
* Removes the tag from every contact of the account that matches the selection. Resolves to
|
|
14
|
+
* `'OK'`.
|
|
15
|
+
* @permissions tags.view OR tags.destroy
|
|
16
|
+
*/
|
|
17
|
+
detachContacts(id: string, body: ContactsSelection, headers?: Record<string, string>): Promise<string>;
|
|
18
|
+
/**
|
|
19
|
+
* Links several tags to the given departments. Resolves to `'OK'`. A tag without departments
|
|
20
|
+
* is already available to all of them and is left unchanged.
|
|
21
|
+
* @permissions tags.view
|
|
22
|
+
*/
|
|
23
|
+
attachManyToDepartments(body: AttachTagsToDepartmentsPayload, headers?: Record<string, string>): Promise<string>;
|
|
6
24
|
}
|
|
7
25
|
//# sourceMappingURL=TagsApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagsApi.d.ts","sourceRoot":"","sources":["../../../src/apis/tags/TagsApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"TagsApi.d.ts","sourceRoot":"","sources":["../../../src/apis/tags/TagsApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,KAAK,EACV,8BAA8B,EAC9B,gBAAgB,EAChB,GAAG,EACH,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAEhB,qBAAa,OAAQ,SAAQ,WAAW,CAAC,GAAG,EAAE,gBAAgB,EAAE,gBAAgB,CAAC;gBACnE,MAAM,EAAE,SAAS;IAI7B;;;OAGG;IACH,cAAc,CACZ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,iBAAiB,EACvB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,MAAM,CAAC;IAQlB;;;;OAIG;IACH,cAAc,CACZ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,iBAAiB,EACvB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,MAAM,CAAC;IASlB;;;;OAIG;IACH,uBAAuB,CACrB,IAAI,EAAE,8BAA8B,EACpC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,MAAM,CAAC;CAOnB"}
|
|
@@ -5,6 +5,29 @@ var TagsApi = class extends BaseCrudApi {
|
|
|
5
5
|
constructor(client) {
|
|
6
6
|
super(client, "/tags");
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Adds the tag to every contact of the account that matches the selection. Resolves to `'OK'`.
|
|
10
|
+
* @permissions tags.view
|
|
11
|
+
*/
|
|
12
|
+
attachContacts(id, body, headers) {
|
|
13
|
+
return this.client.post(`${this.basePath}/${id}/contacts`, body, headers);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Removes the tag from every contact of the account that matches the selection. Resolves to
|
|
17
|
+
* `'OK'`.
|
|
18
|
+
* @permissions tags.view OR tags.destroy
|
|
19
|
+
*/
|
|
20
|
+
detachContacts(id, body, headers) {
|
|
21
|
+
return this.client.request("DELETE", `${this.basePath}/${id}/contacts`, body, headers);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Links several tags to the given departments. Resolves to `'OK'`. A tag without departments
|
|
25
|
+
* is already available to all of them and is left unchanged.
|
|
26
|
+
* @permissions tags.view
|
|
27
|
+
*/
|
|
28
|
+
attachManyToDepartments(body, headers) {
|
|
29
|
+
return this.client.post(`${this.basePath}/attach-many-departments`, body, headers);
|
|
30
|
+
}
|
|
8
31
|
};
|
|
9
32
|
|
|
10
33
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagsApi.mjs","names":[],"sources":["../../../src/apis/tags/TagsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type {
|
|
1
|
+
{"version":3,"file":"TagsApi.mjs","names":[],"sources":["../../../src/apis/tags/TagsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { ContactsSelection } from '../contacts/types'\nimport type {\n AttachTagsToDepartmentsPayload,\n CreateTagPayload,\n Tag,\n UpdateTagPayload,\n} from './types'\n\nexport class TagsApi extends BaseCrudApi<Tag, CreateTagPayload, UpdateTagPayload> {\n constructor(client: ApiClient) {\n super(client, '/tags')\n }\n\n /**\n * Adds the tag to every contact of the account that matches the selection. Resolves to `'OK'`.\n * @permissions tags.view\n */\n attachContacts(\n id: string,\n body: ContactsSelection,\n headers?: Record<string, string>,\n ): Promise<string> {\n return this.client.post<string, ContactsSelection>(\n `${this.basePath}/${id}/contacts`,\n body,\n headers,\n )\n }\n\n /**\n * Removes the tag from every contact of the account that matches the selection. Resolves to\n * `'OK'`.\n * @permissions tags.view OR tags.destroy\n */\n detachContacts(\n id: string,\n body: ContactsSelection,\n headers?: Record<string, string>,\n ): Promise<string> {\n return this.client.request<string, ContactsSelection>(\n 'DELETE',\n `${this.basePath}/${id}/contacts`,\n body,\n headers,\n )\n }\n\n /**\n * Links several tags to the given departments. Resolves to `'OK'`. A tag without departments\n * is already available to all of them and is left unchanged.\n * @permissions tags.view\n */\n attachManyToDepartments(\n body: AttachTagsToDepartmentsPayload,\n headers?: Record<string, string>,\n ): Promise<string> {\n return this.client.post<string, AttachTagsToDepartmentsPayload>(\n `${this.basePath}/attach-many-departments`,\n body,\n headers,\n )\n }\n}\n"],"mappings":";;;AAUA,IAAa,UAAb,cAA6B,YAAqD;CAChF,YAAY,QAAmB;AAC7B,QAAM,QAAQ,QAAQ;;;;;;CAOxB,eACE,IACA,MACA,SACiB;AACjB,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,GAAG,GAAG,YACvB,MACA,QACD;;;;;;;CAQH,eACE,IACA,MACA,SACiB;AACjB,SAAO,KAAK,OAAO,QACjB,UACA,GAAG,KAAK,SAAS,GAAG,GAAG,YACvB,MACA,QACD;;;;;;;CAQH,wBACE,MACA,SACiB;AACjB,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,2BACjB,MACA,QACD"}
|
|
@@ -22,4 +22,12 @@ export type UpdateTagPayload = {
|
|
|
22
22
|
label?: string;
|
|
23
23
|
backgroundColor?: string | null;
|
|
24
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* Body for `POST /tags/attach-many-departments`. An empty `departmentIds` makes the tags
|
|
27
|
+
* available to every department.
|
|
28
|
+
*/
|
|
29
|
+
export type AttachTagsToDepartmentsPayload = {
|
|
30
|
+
ids: string[];
|
|
31
|
+
departmentIds: string[];
|
|
32
|
+
};
|
|
25
33
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/apis/tags/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEtD,MAAM,MAAM,GAAG,GAAG;IAChB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IAExB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;IACpB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,aAAa,CAAA;AAEzD,MAAM,MAAM,gBAAg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C,GAAG,EAAE,MAAM,EAAE,CAAA;IACb,aAAa,EAAE,MAAM,EAAE,CAAA;CACxB,CAAA"}
|
|
@@ -6,6 +6,83 @@ var UsersApi = class extends require_core_ArchivableCrudApi.ArchivableCrudApi {
|
|
|
6
6
|
constructor(client) {
|
|
7
7
|
super(client, "/users");
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Archives or restores a user through the dedicated route used by the UI, which also
|
|
11
|
+
* sets the user offline and ends its sessions. The route enforces the business rules that
|
|
12
|
+
* {@link archive}/{@link unarchive} (a plain `PUT { archivedAt }`) skip:
|
|
13
|
+
* - archiving refuses (403) a user referenced by a bot or with open tickets;
|
|
14
|
+
* - restoring refuses (402) when the plan has no free user slot.
|
|
15
|
+
* @permissions users.view OR users.archive
|
|
16
|
+
*/
|
|
17
|
+
archiveWithValidation(id, body, headers) {
|
|
18
|
+
return this.client.post(`${this.basePath}/${id}/archive`, body, headers);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Previews a bulk archive/unarchive without changing anything.
|
|
22
|
+
* @permissions users.archive
|
|
23
|
+
*/
|
|
24
|
+
previewBulkStatus(body, headers) {
|
|
25
|
+
return this.client.post(`${this.basePath}/bulk-status/preview`, body, headers);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Archives or unarchives up to 100 users at once.
|
|
29
|
+
* @permissions users.archive
|
|
30
|
+
*/
|
|
31
|
+
bulkStatus(body, headers) {
|
|
32
|
+
return this.client.post(`${this.basePath}/bulk-status`, body, headers);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Exports the users of the account as CSV. Resolves to the CSV text.
|
|
36
|
+
* @permissions users.export
|
|
37
|
+
*/
|
|
38
|
+
exportCsv(body, headers) {
|
|
39
|
+
return this.client.post(`${this.basePath}/export`, body, headers);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Validates a CSV file previously uploaded through `FilesApi` before importing it.
|
|
43
|
+
* @permissions users.create
|
|
44
|
+
*/
|
|
45
|
+
validateImport(body, headers) {
|
|
46
|
+
return this.client.post(`${this.basePath}/import/validate`, body, headers);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Starts the import of a CSV file previously uploaded through `FilesApi`. The import runs
|
|
50
|
+
* in the background (the route answers `202 Accepted`).
|
|
51
|
+
* @permissions users.create
|
|
52
|
+
*/
|
|
53
|
+
startImport(body, headers) {
|
|
54
|
+
return this.client.post(`${this.basePath}/import`, body, headers);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Turns off the two-factor authentication (OTP) of a user.
|
|
58
|
+
* @permissions users.update AND myAccount.update
|
|
59
|
+
*/
|
|
60
|
+
disableOtpAuth(id, headers) {
|
|
61
|
+
return this.client.post(`${this.basePath}/${id}/disable-otp-auth`, void 0, headers);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Clears the login throttling of a user blocked by too many failed attempts.
|
|
65
|
+
* @permissions users.update
|
|
66
|
+
*/
|
|
67
|
+
enableAccess(id, headers) {
|
|
68
|
+
return this.client.post(`${this.basePath}/${id}/enable-access`, void 0, headers);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Returns the contacts pinned by the logged user.
|
|
72
|
+
* @permissions contacts.pin
|
|
73
|
+
*/
|
|
74
|
+
getPinnedContacts(headers) {
|
|
75
|
+
return this.client.get(`${this.basePath}/pin`, headers);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Pins the contact for the logged user, or unpins it when already pinned. A user can pin
|
|
79
|
+
* up to 3 contacts. Resolves to the created link rows when pinning, or to the number of
|
|
80
|
+
* removed links when unpinning.
|
|
81
|
+
* @permissions contacts.pin
|
|
82
|
+
*/
|
|
83
|
+
togglePinContact(body, headers) {
|
|
84
|
+
return this.client.patch(`${this.basePath}/pin`, body, headers);
|
|
85
|
+
}
|
|
9
86
|
};
|
|
10
87
|
|
|
11
88
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UsersApi.cjs","names":["ArchivableCrudApi"],"sources":["../../../src/apis/users/UsersApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { ArchivableCrudApi } from '../../core/ArchivableCrudApi'\nimport type {
|
|
1
|
+
{"version":3,"file":"UsersApi.cjs","names":["ArchivableCrudApi"],"sources":["../../../src/apis/users/UsersApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { ArchivableCrudApi } from '../../core/ArchivableCrudApi'\nimport type { Contact } from '../contacts/types'\nimport type {\n ArchiveUserPayload,\n BulkUsersStatusPayload,\n BulkUsersStatusPreview,\n BulkUsersStatusResult,\n CreateUserPayload,\n EnableUserAccessResult,\n ExportUsersPayload,\n ImportUsersPayload,\n ImportUsersResult,\n TogglePinContactPayload,\n TogglePinContactResult,\n UpdateUserPayload,\n User,\n ValidateUserImportPayload,\n ValidateUserImportResult,\n} from './types'\n\nexport class UsersApi extends ArchivableCrudApi<User, CreateUserPayload, UpdateUserPayload> {\n constructor(client: ApiClient) {\n super(client, '/users')\n }\n\n /**\n * Archives or restores a user through the dedicated route used by the UI, which also\n * sets the user offline and ends its sessions. The route enforces the business rules that\n * {@link archive}/{@link unarchive} (a plain `PUT { archivedAt }`) skip:\n * - archiving refuses (403) a user referenced by a bot or with open tickets;\n * - restoring refuses (402) when the plan has no free user slot.\n * @permissions users.view OR users.archive\n */\n archiveWithValidation(\n id: string,\n body: ArchiveUserPayload,\n headers?: Record<string, string>,\n ): Promise<User> {\n return this.client.post<User, ArchiveUserPayload>(\n `${this.basePath}/${id}/archive`,\n body,\n headers,\n )\n }\n\n /**\n * Previews a bulk archive/unarchive without changing anything.\n * @permissions users.archive\n */\n previewBulkStatus(\n body: BulkUsersStatusPayload,\n headers?: Record<string, string>,\n ): Promise<BulkUsersStatusPreview> {\n return this.client.post<BulkUsersStatusPreview, BulkUsersStatusPayload>(\n `${this.basePath}/bulk-status/preview`,\n body,\n headers,\n )\n }\n\n /**\n * Archives or unarchives up to 100 users at once.\n * @permissions users.archive\n */\n bulkStatus(\n body: BulkUsersStatusPayload,\n headers?: Record<string, string>,\n ): Promise<BulkUsersStatusResult> {\n return this.client.post<BulkUsersStatusResult, BulkUsersStatusPayload>(\n `${this.basePath}/bulk-status`,\n body,\n headers,\n )\n }\n\n /**\n * Exports the users of the account as CSV. Resolves to the CSV text.\n * @permissions users.export\n */\n exportCsv(body: ExportUsersPayload, headers?: Record<string, string>): Promise<string> {\n return this.client.post<string, ExportUsersPayload>(`${this.basePath}/export`, body, headers)\n }\n\n /**\n * Validates a CSV file previously uploaded through `FilesApi` before importing it.\n * @permissions users.create\n */\n validateImport(\n body: ValidateUserImportPayload,\n headers?: Record<string, string>,\n ): Promise<ValidateUserImportResult> {\n return this.client.post<ValidateUserImportResult, ValidateUserImportPayload>(\n `${this.basePath}/import/validate`,\n body,\n headers,\n )\n }\n\n /**\n * Starts the import of a CSV file previously uploaded through `FilesApi`. The import runs\n * in the background (the route answers `202 Accepted`).\n * @permissions users.create\n */\n startImport(\n body: ImportUsersPayload,\n headers?: Record<string, string>,\n ): Promise<ImportUsersResult> {\n return this.client.post<ImportUsersResult, ImportUsersPayload>(\n `${this.basePath}/import`,\n body,\n headers,\n )\n }\n\n /**\n * Turns off the two-factor authentication (OTP) of a user.\n * @permissions users.update AND myAccount.update\n */\n disableOtpAuth(id: string, headers?: Record<string, string>): Promise<User> {\n return this.client.post<User>(`${this.basePath}/${id}/disable-otp-auth`, undefined, headers)\n }\n\n /**\n * Clears the login throttling of a user blocked by too many failed attempts.\n * @permissions users.update\n */\n enableAccess(id: string, headers?: Record<string, string>): Promise<EnableUserAccessResult> {\n return this.client.post<EnableUserAccessResult>(\n `${this.basePath}/${id}/enable-access`,\n undefined,\n headers,\n )\n }\n\n /**\n * Returns the contacts pinned by the logged user.\n * @permissions contacts.pin\n */\n getPinnedContacts(headers?: Record<string, string>): Promise<Contact[]> {\n return this.client.get<Contact[]>(`${this.basePath}/pin`, headers)\n }\n\n /**\n * Pins the contact for the logged user, or unpins it when already pinned. A user can pin\n * up to 3 contacts. Resolves to the created link rows when pinning, or to the number of\n * removed links when unpinning.\n * @permissions contacts.pin\n */\n togglePinContact(\n body: TogglePinContactPayload,\n headers?: Record<string, string>,\n ): Promise<TogglePinContactResult> {\n return this.client.patch<TogglePinContactResult, TogglePinContactPayload>(\n `${this.basePath}/pin`,\n body,\n headers,\n )\n }\n}\n"],"mappings":";;;;AAqBA,IAAa,WAAb,cAA8BA,iDAA8D;CAC1F,YAAY,QAAmB;AAC7B,QAAM,QAAQ,SAAS;;;;;;;;;;CAWzB,sBACE,IACA,MACA,SACe;AACf,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,GAAG,GAAG,WACvB,MACA,QACD;;;;;;CAOH,kBACE,MACA,SACiC;AACjC,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,uBACjB,MACA,QACD;;;;;;CAOH,WACE,MACA,SACgC;AAChC,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,eACjB,MACA,QACD;;;;;;CAOH,UAAU,MAA0B,SAAmD;AACrF,SAAO,KAAK,OAAO,KAAiC,GAAG,KAAK,SAAS,UAAU,MAAM,QAAQ;;;;;;CAO/F,eACE,MACA,SACmC;AACnC,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,mBACjB,MACA,QACD;;;;;;;CAQH,YACE,MACA,SAC4B;AAC5B,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,UACjB,MACA,QACD;;;;;;CAOH,eAAe,IAAY,SAAiD;AAC1E,SAAO,KAAK,OAAO,KAAW,GAAG,KAAK,SAAS,GAAG,GAAG,oBAAoB,QAAW,QAAQ;;;;;;CAO9F,aAAa,IAAY,SAAmE;AAC1F,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,GAAG,GAAG,iBACvB,QACA,QACD;;;;;;CAOH,kBAAkB,SAAsD;AACtE,SAAO,KAAK,OAAO,IAAe,GAAG,KAAK,SAAS,OAAO,QAAQ;;;;;;;;CASpE,iBACE,MACA,SACiC;AACjC,SAAO,KAAK,OAAO,MACjB,GAAG,KAAK,SAAS,OACjB,MACA,QACD"}
|
|
@@ -1,7 +1,65 @@
|
|
|
1
1
|
import type { ApiClient } from '../../core/ApiClient';
|
|
2
2
|
import { ArchivableCrudApi } from '../../core/ArchivableCrudApi';
|
|
3
|
-
import type {
|
|
3
|
+
import type { Contact } from '../contacts/types';
|
|
4
|
+
import type { ArchiveUserPayload, BulkUsersStatusPayload, BulkUsersStatusPreview, BulkUsersStatusResult, CreateUserPayload, EnableUserAccessResult, ExportUsersPayload, ImportUsersPayload, ImportUsersResult, TogglePinContactPayload, TogglePinContactResult, UpdateUserPayload, User, ValidateUserImportPayload, ValidateUserImportResult } from './types';
|
|
4
5
|
export declare class UsersApi extends ArchivableCrudApi<User, CreateUserPayload, UpdateUserPayload> {
|
|
5
6
|
constructor(client: ApiClient);
|
|
7
|
+
/**
|
|
8
|
+
* Archives or restores a user through the dedicated route used by the UI, which also
|
|
9
|
+
* sets the user offline and ends its sessions. The route enforces the business rules that
|
|
10
|
+
* {@link archive}/{@link unarchive} (a plain `PUT { archivedAt }`) skip:
|
|
11
|
+
* - archiving refuses (403) a user referenced by a bot or with open tickets;
|
|
12
|
+
* - restoring refuses (402) when the plan has no free user slot.
|
|
13
|
+
* @permissions users.view OR users.archive
|
|
14
|
+
*/
|
|
15
|
+
archiveWithValidation(id: string, body: ArchiveUserPayload, headers?: Record<string, string>): Promise<User>;
|
|
16
|
+
/**
|
|
17
|
+
* Previews a bulk archive/unarchive without changing anything.
|
|
18
|
+
* @permissions users.archive
|
|
19
|
+
*/
|
|
20
|
+
previewBulkStatus(body: BulkUsersStatusPayload, headers?: Record<string, string>): Promise<BulkUsersStatusPreview>;
|
|
21
|
+
/**
|
|
22
|
+
* Archives or unarchives up to 100 users at once.
|
|
23
|
+
* @permissions users.archive
|
|
24
|
+
*/
|
|
25
|
+
bulkStatus(body: BulkUsersStatusPayload, headers?: Record<string, string>): Promise<BulkUsersStatusResult>;
|
|
26
|
+
/**
|
|
27
|
+
* Exports the users of the account as CSV. Resolves to the CSV text.
|
|
28
|
+
* @permissions users.export
|
|
29
|
+
*/
|
|
30
|
+
exportCsv(body: ExportUsersPayload, headers?: Record<string, string>): Promise<string>;
|
|
31
|
+
/**
|
|
32
|
+
* Validates a CSV file previously uploaded through `FilesApi` before importing it.
|
|
33
|
+
* @permissions users.create
|
|
34
|
+
*/
|
|
35
|
+
validateImport(body: ValidateUserImportPayload, headers?: Record<string, string>): Promise<ValidateUserImportResult>;
|
|
36
|
+
/**
|
|
37
|
+
* Starts the import of a CSV file previously uploaded through `FilesApi`. The import runs
|
|
38
|
+
* in the background (the route answers `202 Accepted`).
|
|
39
|
+
* @permissions users.create
|
|
40
|
+
*/
|
|
41
|
+
startImport(body: ImportUsersPayload, headers?: Record<string, string>): Promise<ImportUsersResult>;
|
|
42
|
+
/**
|
|
43
|
+
* Turns off the two-factor authentication (OTP) of a user.
|
|
44
|
+
* @permissions users.update AND myAccount.update
|
|
45
|
+
*/
|
|
46
|
+
disableOtpAuth(id: string, headers?: Record<string, string>): Promise<User>;
|
|
47
|
+
/**
|
|
48
|
+
* Clears the login throttling of a user blocked by too many failed attempts.
|
|
49
|
+
* @permissions users.update
|
|
50
|
+
*/
|
|
51
|
+
enableAccess(id: string, headers?: Record<string, string>): Promise<EnableUserAccessResult>;
|
|
52
|
+
/**
|
|
53
|
+
* Returns the contacts pinned by the logged user.
|
|
54
|
+
* @permissions contacts.pin
|
|
55
|
+
*/
|
|
56
|
+
getPinnedContacts(headers?: Record<string, string>): Promise<Contact[]>;
|
|
57
|
+
/**
|
|
58
|
+
* Pins the contact for the logged user, or unpins it when already pinned. A user can pin
|
|
59
|
+
* up to 3 contacts. Resolves to the created link rows when pinning, or to the number of
|
|
60
|
+
* removed links when unpinning.
|
|
61
|
+
* @permissions contacts.pin
|
|
62
|
+
*/
|
|
63
|
+
togglePinContact(body: TogglePinContactPayload, headers?: Record<string, string>): Promise<TogglePinContactResult>;
|
|
6
64
|
}
|
|
7
65
|
//# sourceMappingURL=UsersApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UsersApi.d.ts","sourceRoot":"","sources":["../../../src/apis/users/UsersApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"UsersApi.d.ts","sourceRoot":"","sources":["../../../src/apis/users/UsersApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EACjB,IAAI,EACJ,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,SAAS,CAAA;AAEhB,qBAAa,QAAS,SAAQ,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,EAAE,iBAAiB,CAAC;gBAC7E,MAAM,EAAE,SAAS;IAI7B;;;;;;;OAOG;IACH,qBAAqB,CACnB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,kBAAkB,EACxB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,IAAI,CAAC;IAQhB;;;OAGG;IACH,iBAAiB,CACf,IAAI,EAAE,sBAAsB,EAC5B,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