@ikatec/digisac-api-sdk 4.3.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/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/messages/MessagesApi.test.ts +3 -3
- package/src/apis/payloads.test-d.ts +26 -0
- package/src/apis/queryFormat.test.ts +27 -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
package/src/apis/users/types.ts
CHANGED
|
@@ -69,3 +69,124 @@ export type UpdateUserPayload = {
|
|
|
69
69
|
language?: string
|
|
70
70
|
archivedAt?: string | null
|
|
71
71
|
}
|
|
72
|
+
|
|
73
|
+
/** Body for `POST /users/:id/archive`. */
|
|
74
|
+
export type ArchiveUserPayload = {
|
|
75
|
+
/** `true` archives the user; `false` restores it. */
|
|
76
|
+
archive: boolean
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** Body for `POST /users/bulk-status` and `POST /users/bulk-status/preview` (1 to 100 IDs). */
|
|
80
|
+
export type BulkUsersStatusPayload = {
|
|
81
|
+
ids: string[]
|
|
82
|
+
archive: boolean
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export type BulkUsersStatusScenario =
|
|
86
|
+
| 'emptySelection'
|
|
87
|
+
| 'noneEligible'
|
|
88
|
+
| 'allEligible'
|
|
89
|
+
| 'partiallyBlocked'
|
|
90
|
+
| 'onlySelfBlocked'
|
|
91
|
+
| 'planLimitExceeded'
|
|
92
|
+
|
|
93
|
+
/** Read-only preview of a bulk status change: nothing is written. */
|
|
94
|
+
export type BulkUsersStatusPreview = {
|
|
95
|
+
scenario: BulkUsersStatusScenario
|
|
96
|
+
totalSelected: number
|
|
97
|
+
/** Users already in the target status. */
|
|
98
|
+
noop: number
|
|
99
|
+
eligible: number
|
|
100
|
+
/** Users that cannot change (e.g. referenced by a bot, or the acting user). */
|
|
101
|
+
blocked: number
|
|
102
|
+
blockedSelf: boolean
|
|
103
|
+
/** Free plan slots when unarchiving; `null` when archiving. */
|
|
104
|
+
planSlotsAvailable: number | null
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export type BulkUsersStatusResult = {
|
|
108
|
+
changed: number
|
|
109
|
+
noop: number
|
|
110
|
+
blocked: number
|
|
111
|
+
failed: number
|
|
112
|
+
changedIds: string[]
|
|
113
|
+
/** IDs of the batch that no longer exist in the account. */
|
|
114
|
+
missingIds: string[]
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** Body for `POST /users/export`. */
|
|
118
|
+
export type ExportUsersPayload = {
|
|
119
|
+
filter: 'all' | 'active' | 'archived'
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** A file previously uploaded through `FilesApi`. */
|
|
123
|
+
export type UserImportFile = {
|
|
124
|
+
id: string
|
|
125
|
+
name: string
|
|
126
|
+
mimetype: string
|
|
127
|
+
url?: string
|
|
128
|
+
urlToUpload?: string
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** Body for `POST /users/import/validate`. */
|
|
132
|
+
export type ValidateUserImportPayload = {
|
|
133
|
+
file: UserImportFile
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export type UserImportRowsSummary = {
|
|
137
|
+
total: number
|
|
138
|
+
valid: number
|
|
139
|
+
invalid: number
|
|
140
|
+
hasInvalid: boolean
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export type ValidateUserImportResult = {
|
|
144
|
+
licenses: {
|
|
145
|
+
requestedRows: number
|
|
146
|
+
available: number
|
|
147
|
+
exceeded: boolean
|
|
148
|
+
}
|
|
149
|
+
columns: {
|
|
150
|
+
required: { name: string; found: boolean }[]
|
|
151
|
+
missingRequired: string[]
|
|
152
|
+
optionalFound: string[]
|
|
153
|
+
}
|
|
154
|
+
rows: UserImportRowsSummary
|
|
155
|
+
/** Same rows validated with the optional columns applied. */
|
|
156
|
+
rowsWithOptionalColumns: UserImportRowsSummary
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/** Body for `POST /users/import`. */
|
|
160
|
+
export type ImportUsersPayload = {
|
|
161
|
+
file: UserImportFile
|
|
162
|
+
useOptionalColumns?: boolean
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/** The import runs in the background (the route answers `202 Accepted`). */
|
|
166
|
+
export type ImportUsersResult = {
|
|
167
|
+
importId: string
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export type EnableUserAccessResult = {
|
|
171
|
+
success: boolean
|
|
172
|
+
message: string
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/** Body for `PATCH /users/pin`: toggles the pin of a contact for the logged user (max. 3). */
|
|
176
|
+
export type TogglePinContactPayload = {
|
|
177
|
+
contactId: string
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** Link row returned by `PATCH /users/pin` when the contact gets pinned. */
|
|
181
|
+
export type UserPinnedContactLink = {
|
|
182
|
+
userId: string
|
|
183
|
+
contactId: string
|
|
184
|
+
createdAt: string
|
|
185
|
+
updatedAt: string
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Result of `PATCH /users/pin`: the created link rows when the contact gets pinned, or the
|
|
190
|
+
* number of removed links when it gets unpinned.
|
|
191
|
+
*/
|
|
192
|
+
export type TogglePinContactResult = UserPinnedContactLink[] | number
|