@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.
Files changed (54) hide show
  1. package/dist/apis/contacts/ContactsApi.cjs +70 -0
  2. package/dist/apis/contacts/ContactsApi.cjs.map +1 -1
  3. package/dist/apis/contacts/ContactsApi.d.ts +51 -1
  4. package/dist/apis/contacts/ContactsApi.d.ts.map +1 -1
  5. package/dist/apis/contacts/ContactsApi.mjs +70 -0
  6. package/dist/apis/contacts/ContactsApi.mjs.map +1 -1
  7. package/dist/apis/contacts/types.d.ts +141 -1
  8. package/dist/apis/contacts/types.d.ts.map +1 -1
  9. package/dist/apis/services/ServicesApi.cjs +8 -0
  10. package/dist/apis/services/ServicesApi.cjs.map +1 -1
  11. package/dist/apis/services/ServicesApi.d.ts +7 -1
  12. package/dist/apis/services/ServicesApi.d.ts.map +1 -1
  13. package/dist/apis/services/ServicesApi.mjs +8 -0
  14. package/dist/apis/services/ServicesApi.mjs.map +1 -1
  15. package/dist/apis/services/types.d.ts +7 -0
  16. package/dist/apis/services/types.d.ts.map +1 -1
  17. package/dist/apis/tags/TagsApi.cjs +23 -0
  18. package/dist/apis/tags/TagsApi.cjs.map +1 -1
  19. package/dist/apis/tags/TagsApi.d.ts +19 -1
  20. package/dist/apis/tags/TagsApi.d.ts.map +1 -1
  21. package/dist/apis/tags/TagsApi.mjs +23 -0
  22. package/dist/apis/tags/TagsApi.mjs.map +1 -1
  23. package/dist/apis/tags/types.d.ts +8 -0
  24. package/dist/apis/tags/types.d.ts.map +1 -1
  25. package/dist/apis/users/UsersApi.cjs +77 -0
  26. package/dist/apis/users/UsersApi.cjs.map +1 -1
  27. package/dist/apis/users/UsersApi.d.ts +59 -1
  28. package/dist/apis/users/UsersApi.d.ts.map +1 -1
  29. package/dist/apis/users/UsersApi.mjs +77 -0
  30. package/dist/apis/users/UsersApi.mjs.map +1 -1
  31. package/dist/apis/users/types.d.ts +102 -0
  32. package/dist/apis/users/types.d.ts.map +1 -1
  33. package/package.json +1 -1
  34. package/src/apis/acceptanceTerms/AcceptanceTermsApi.test.ts +1 -1
  35. package/src/apis/authHistory/AuthHistoryApi.test.ts +1 -1
  36. package/src/apis/campaigns/CampaignsApi.test.ts +1 -1
  37. package/src/apis/contacts/ContactsApi.test.ts +182 -5
  38. package/src/apis/contacts/ContactsApi.ts +128 -0
  39. package/src/apis/contacts/types.ts +154 -1
  40. package/src/apis/messages/MessagesApi.test.ts +3 -3
  41. package/src/apis/payloads.test-d.ts +26 -0
  42. package/src/apis/queryFormat.test.ts +27 -3
  43. package/src/apis/serviceAccessManagement/ServiceAccessManagementApi.test.ts +2 -2
  44. package/src/apis/services/ServicesApi.test.ts +49 -0
  45. package/src/apis/services/ServicesApi.ts +10 -1
  46. package/src/apis/services/types.ts +9 -0
  47. package/src/apis/stickerUsers/StickerUsersApi.test.ts +1 -1
  48. package/src/apis/tags/TagsApi.test.ts +79 -0
  49. package/src/apis/tags/TagsApi.ts +57 -1
  50. package/src/apis/tags/types.ts +9 -0
  51. package/src/apis/terms/TermsApi.test.ts +1 -1
  52. package/src/apis/users/UsersApi.test.ts +228 -0
  53. package/src/apis/users/UsersApi.ts +152 -1
  54. package/src/apis/users/types.ts +121 -0
@@ -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