@iblai/iblai-api 4.266.0-core → 4.267.0-core

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 (47) hide show
  1. package/dist/index.cjs.js +681 -41
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +681 -42
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +681 -41
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/types/index.d.ts +5 -0
  8. package/dist/types/models/Deal.d.ts +12 -0
  9. package/dist/types/models/Organization.d.ts +12 -0
  10. package/dist/types/models/PaginatedTagList.d.ts +7 -0
  11. package/dist/types/models/PatchedDeal.d.ts +12 -0
  12. package/dist/types/models/PatchedOrganization.d.ts +12 -0
  13. package/dist/types/models/PatchedPerson.d.ts +12 -0
  14. package/dist/types/models/PatchedTag.d.ts +30 -0
  15. package/dist/types/models/Person.d.ts +12 -0
  16. package/dist/types/models/Tag.d.ts +30 -0
  17. package/dist/types/models/_TagAttachRequest.d.ts +6 -0
  18. package/dist/types/services/ActivitiesService.d.ts +1 -1
  19. package/dist/types/services/CrmService.d.ts +185 -10
  20. package/dist/types/services/DealsService.d.ts +34 -2
  21. package/dist/types/services/LeadSourcesService.d.ts +1 -1
  22. package/dist/types/services/OrganizationsService.d.ts +28 -2
  23. package/dist/types/services/PersonsService.d.ts +28 -2
  24. package/dist/types/services/PipelinesService.d.ts +2 -2
  25. package/dist/types/services/TagsService.d.ts +96 -0
  26. package/package.json +1 -1
  27. package/sdk_schema.yml +1484 -239
  28. package/src/core/OpenAPI.ts +1 -1
  29. package/src/index.ts +5 -0
  30. package/src/models/Deal.ts +12 -0
  31. package/src/models/Organization.ts +12 -0
  32. package/src/models/PaginatedTagList.ts +12 -0
  33. package/src/models/PatchedDeal.ts +12 -0
  34. package/src/models/PatchedOrganization.ts +12 -0
  35. package/src/models/PatchedPerson.ts +12 -0
  36. package/src/models/PatchedTag.ts +35 -0
  37. package/src/models/Person.ts +12 -0
  38. package/src/models/Tag.ts +35 -0
  39. package/src/models/_TagAttachRequest.ts +11 -0
  40. package/src/services/ActivitiesService.ts +2 -2
  41. package/src/services/CrmService.ts +399 -14
  42. package/src/services/DealsService.ts +71 -2
  43. package/src/services/LeadSourcesService.ts +2 -2
  44. package/src/services/OrganizationsService.ts +65 -2
  45. package/src/services/PersonsService.ts +65 -2
  46. package/src/services/PipelinesService.ts +4 -4
  47. package/src/services/TagsService.ts +201 -0
@@ -2,6 +2,7 @@
2
2
  /* istanbul ignore file */
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
+ import type { _TagAttachRequest } from '../models/_TagAttachRequest';
5
6
  import type { Deal } from '../models/Deal';
6
7
  import type { DealLostRequest } from '../models/DealLostRequest';
7
8
  import type { DealMoveStageRequest } from '../models/DealMoveStageRequest';
@@ -35,6 +36,7 @@ export class DealsService {
35
36
  source,
36
37
  stage,
37
38
  status,
39
+ tags,
38
40
  }: {
39
41
  createdAtGte?: string,
40
42
  createdAtLte?: string,
@@ -63,6 +65,7 @@ export class DealsService {
63
65
  * * `lost` - Lost
64
66
  */
65
67
  status?: 'lost' | 'open' | 'won',
68
+ tags?: string,
66
69
  }): CancelablePromise<PaginatedDealList> {
67
70
  return __request(OpenAPI, {
68
71
  method: 'GET',
@@ -82,6 +85,7 @@ export class DealsService {
82
85
  'source': source,
83
86
  'stage': stage,
84
87
  'status': status,
88
+ 'tags': tags,
85
89
  },
86
90
  errors: {
87
91
  401: `Authentication required.`,
@@ -93,7 +97,7 @@ export class DealsService {
93
97
  * Create a deal
94
98
  * Creates a new Deal. All FK targets (`person`, `organization`, `pipeline`, `stage`, `source`) must belong to your Platform; `stage` must belong to `pipeline`. `status` and `closed_at` are service-managed — passing them returns `400`.
95
99
  *
96
- * **Required permission:** `Ibl.CRM/Deals/write`.
100
+ * **Required permission:** `Ibl.CRM/Deals/action`.
97
101
  * @returns Deal
98
102
  * @throws ApiError
99
103
  */
@@ -109,7 +113,7 @@ export class DealsService {
109
113
  mediaType: 'application/json',
110
114
  errors: {
111
115
  400: `Validation error.`,
112
- 403: `Missing required permission \`Ibl.CRM/Deals/write\`.`,
116
+ 403: `Missing required permission \`Ibl.CRM/Deals/action\`.`,
113
117
  },
114
118
  });
115
119
  }
@@ -301,6 +305,71 @@ export class DealsService {
301
305
  },
302
306
  });
303
307
  }
308
+ /**
309
+ * Attach a tag to this record
310
+ * Attaches an existing Tag to this record. Both the Tag and the record must belong to your Platform. Returns `409 Conflict` with the existing `assignment_id` if the tag is already attached.
311
+ *
312
+ * **Required permission:** `Ibl.CRM/Tags/write`.
313
+ * @returns any No response body
314
+ * @throws ApiError
315
+ */
316
+ public static dealsTagsCreate({
317
+ id,
318
+ requestBody,
319
+ }: {
320
+ /**
321
+ * A unique integer value identifying this deal.
322
+ */
323
+ id: number,
324
+ requestBody: _TagAttachRequest,
325
+ }): CancelablePromise<any> {
326
+ return __request(OpenAPI, {
327
+ method: 'POST',
328
+ url: '/deals/{id}/tags/',
329
+ path: {
330
+ 'id': id,
331
+ },
332
+ body: requestBody,
333
+ mediaType: 'application/json',
334
+ errors: {
335
+ 400: `No response body`,
336
+ 403: `No response body`,
337
+ 404: `No response body`,
338
+ 409: `No response body`,
339
+ },
340
+ });
341
+ }
342
+ /**
343
+ * Detach a tag from this record
344
+ * Removes the Tag with id `tag_id` from this record. Returns `404` if the tag was not attached.
345
+ *
346
+ * **Required permission:** `Ibl.CRM/Tags/write`.
347
+ * @returns void
348
+ * @throws ApiError
349
+ */
350
+ public static dealsTagsDestroy({
351
+ id,
352
+ tagId,
353
+ }: {
354
+ /**
355
+ * A unique integer value identifying this deal.
356
+ */
357
+ id: number,
358
+ tagId: string,
359
+ }): CancelablePromise<void> {
360
+ return __request(OpenAPI, {
361
+ method: 'DELETE',
362
+ url: '/deals/{id}/tags/{tag_id}/',
363
+ path: {
364
+ 'id': id,
365
+ 'tag_id': tagId,
366
+ },
367
+ errors: {
368
+ 403: `No response body`,
369
+ 404: `No response body`,
370
+ },
371
+ });
372
+ }
304
373
  /**
305
374
  * Mark a deal as won
306
375
  * Moves the Deal into a closed-won stage and sets `status='won'`. If `stage_code` is omitted, the first `is_won=True` stage in the Deal's pipeline (by sort order) is used.
@@ -53,7 +53,7 @@ export class LeadSourcesService {
53
53
  * Create a lead source
54
54
  * Creates a new LeadSource in your Platform. `code` must be unique.
55
55
  *
56
- * **Required permission:** `Ibl.CRM/Pipelines/write`.
56
+ * **Required permission:** `Ibl.CRM/Pipelines/action`.
57
57
  * @returns LeadSource
58
58
  * @throws ApiError
59
59
  */
@@ -69,7 +69,7 @@ export class LeadSourcesService {
69
69
  mediaType: 'application/json',
70
70
  errors: {
71
71
  400: `Validation error.`,
72
- 403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`,
72
+ 403: `Missing required permission \`Ibl.CRM/Pipelines/action\`.`,
73
73
  },
74
74
  });
75
75
  }
@@ -2,6 +2,7 @@
2
2
  /* istanbul ignore file */
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
+ import type { _TagAttachRequest } from '../models/_TagAttachRequest';
5
6
  import type { Organization } from '../models/Organization';
6
7
  import type { PaginatedOrganizationList } from '../models/PaginatedOrganizationList';
7
8
  import type { PatchedOrganization } from '../models/PatchedOrganization';
@@ -22,6 +23,7 @@ export class OrganizationsService {
22
23
  owner,
23
24
  page,
24
25
  pageSize,
26
+ tags,
25
27
  }: {
26
28
  name?: string,
27
29
  owner?: number,
@@ -33,6 +35,7 @@ export class OrganizationsService {
33
35
  * Number of results to return per page.
34
36
  */
35
37
  pageSize?: number,
38
+ tags?: string,
36
39
  }): CancelablePromise<PaginatedOrganizationList> {
37
40
  return __request(OpenAPI, {
38
41
  method: 'GET',
@@ -42,6 +45,7 @@ export class OrganizationsService {
42
45
  'owner': owner,
43
46
  'page': page,
44
47
  'page_size': pageSize,
48
+ 'tags': tags,
45
49
  },
46
50
  errors: {
47
51
  401: `Authentication required.`,
@@ -53,7 +57,7 @@ export class OrganizationsService {
53
57
  * Create an organization
54
58
  * Creates a new organization in your Platform. The Platform is inferred from your credentials. `name` must be unique within your Platform.
55
59
  *
56
- * **Required permission:** `Ibl.CRM/Organizations/write`.
60
+ * **Required permission:** `Ibl.CRM/Organizations/action`.
57
61
  * @returns Organization
58
62
  * @throws ApiError
59
63
  */
@@ -69,7 +73,7 @@ export class OrganizationsService {
69
73
  mediaType: 'application/json',
70
74
  errors: {
71
75
  400: `Validation error (for example, duplicate name).`,
72
- 403: `Missing required permission \`Ibl.CRM/Organizations/write\`.`,
76
+ 403: `Missing required permission \`Ibl.CRM/Organizations/action\`.`,
73
77
  },
74
78
  });
75
79
  }
@@ -183,4 +187,63 @@ export class OrganizationsService {
183
187
  },
184
188
  });
185
189
  }
190
+ /**
191
+ * Attach a tag to this record
192
+ * Attaches an existing Tag to this record. Both the Tag and the record must belong to your Platform. Returns `409 Conflict` with the existing `assignment_id` if the tag is already attached.
193
+ *
194
+ * **Required permission:** `Ibl.CRM/Tags/write`.
195
+ * @returns any No response body
196
+ * @throws ApiError
197
+ */
198
+ public static organizationsTagsCreate({
199
+ id,
200
+ requestBody,
201
+ }: {
202
+ id: string,
203
+ requestBody: _TagAttachRequest,
204
+ }): CancelablePromise<any> {
205
+ return __request(OpenAPI, {
206
+ method: 'POST',
207
+ url: '/organizations/{id}/tags/',
208
+ path: {
209
+ 'id': id,
210
+ },
211
+ body: requestBody,
212
+ mediaType: 'application/json',
213
+ errors: {
214
+ 400: `No response body`,
215
+ 403: `No response body`,
216
+ 404: `No response body`,
217
+ 409: `No response body`,
218
+ },
219
+ });
220
+ }
221
+ /**
222
+ * Detach a tag from this record
223
+ * Removes the Tag with id `tag_id` from this record. Returns `404` if the tag was not attached.
224
+ *
225
+ * **Required permission:** `Ibl.CRM/Tags/write`.
226
+ * @returns void
227
+ * @throws ApiError
228
+ */
229
+ public static organizationsTagsDestroy({
230
+ id,
231
+ tagId,
232
+ }: {
233
+ id: string,
234
+ tagId: string,
235
+ }): CancelablePromise<void> {
236
+ return __request(OpenAPI, {
237
+ method: 'DELETE',
238
+ url: '/organizations/{id}/tags/{tag_id}/',
239
+ path: {
240
+ 'id': id,
241
+ 'tag_id': tagId,
242
+ },
243
+ errors: {
244
+ 403: `No response body`,
245
+ 404: `No response body`,
246
+ },
247
+ });
248
+ }
186
249
  }
@@ -2,6 +2,7 @@
2
2
  /* istanbul ignore file */
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
5
+ import type { _TagAttachRequest } from '../models/_TagAttachRequest';
5
6
  import type { PaginatedPersonList } from '../models/PaginatedPersonList';
6
7
  import type { PatchedPerson } from '../models/PatchedPerson';
7
8
  import type { Person } from '../models/Person';
@@ -31,6 +32,7 @@ export class PersonsService {
31
32
  owner,
32
33
  page,
33
34
  pageSize,
35
+ tags,
34
36
  }: {
35
37
  createdAtGte?: string,
36
38
  createdAtLte?: string,
@@ -55,6 +57,7 @@ export class PersonsService {
55
57
  * Number of results to return per page.
56
58
  */
57
59
  pageSize?: number,
60
+ tags?: string,
58
61
  }): CancelablePromise<PaginatedPersonList> {
59
62
  return __request(OpenAPI, {
60
63
  method: 'GET',
@@ -68,6 +71,7 @@ export class PersonsService {
68
71
  'owner': owner,
69
72
  'page': page,
70
73
  'page_size': pageSize,
74
+ 'tags': tags,
71
75
  },
72
76
  errors: {
73
77
  401: `Authentication required.`,
@@ -79,7 +83,7 @@ export class PersonsService {
79
83
  * Create a person
80
84
  * Creates a new person in your Platform. The Platform is inferred from your credentials. If `organization` is supplied, it must reference an organization in your Platform.
81
85
  *
82
- * **Required permission:** `Ibl.CRM/Persons/write`.
86
+ * **Required permission:** `Ibl.CRM/Persons/action`.
83
87
  * @returns Person
84
88
  * @throws ApiError
85
89
  */
@@ -95,7 +99,7 @@ export class PersonsService {
95
99
  mediaType: 'application/json',
96
100
  errors: {
97
101
  400: `Validation error.`,
98
- 403: `Missing required permission \`Ibl.CRM/Persons/write\`.`,
102
+ 403: `Missing required permission \`Ibl.CRM/Persons/action\`.`,
99
103
  },
100
104
  });
101
105
  }
@@ -274,6 +278,65 @@ export class PersonsService {
274
278
  },
275
279
  });
276
280
  }
281
+ /**
282
+ * Attach a tag to this record
283
+ * Attaches an existing Tag to this record. Both the Tag and the record must belong to your Platform. Returns `409 Conflict` with the existing `assignment_id` if the tag is already attached.
284
+ *
285
+ * **Required permission:** `Ibl.CRM/Tags/write`.
286
+ * @returns any No response body
287
+ * @throws ApiError
288
+ */
289
+ public static personsTagsCreate({
290
+ id,
291
+ requestBody,
292
+ }: {
293
+ id: string,
294
+ requestBody: _TagAttachRequest,
295
+ }): CancelablePromise<any> {
296
+ return __request(OpenAPI, {
297
+ method: 'POST',
298
+ url: '/persons/{id}/tags/',
299
+ path: {
300
+ 'id': id,
301
+ },
302
+ body: requestBody,
303
+ mediaType: 'application/json',
304
+ errors: {
305
+ 400: `No response body`,
306
+ 403: `No response body`,
307
+ 404: `No response body`,
308
+ 409: `No response body`,
309
+ },
310
+ });
311
+ }
312
+ /**
313
+ * Detach a tag from this record
314
+ * Removes the Tag with id `tag_id` from this record. Returns `404` if the tag was not attached.
315
+ *
316
+ * **Required permission:** `Ibl.CRM/Tags/write`.
317
+ * @returns void
318
+ * @throws ApiError
319
+ */
320
+ public static personsTagsDestroy({
321
+ id,
322
+ tagId,
323
+ }: {
324
+ id: string,
325
+ tagId: string,
326
+ }): CancelablePromise<void> {
327
+ return __request(OpenAPI, {
328
+ method: 'DELETE',
329
+ url: '/persons/{id}/tags/{tag_id}/',
330
+ path: {
331
+ 'id': id,
332
+ 'tag_id': tagId,
333
+ },
334
+ errors: {
335
+ 403: `No response body`,
336
+ 404: `No response body`,
337
+ },
338
+ });
339
+ }
277
340
  /**
278
341
  * Merge duplicate persons into a primary
279
342
  * Marks each person in `duplicate_ids` as inactive and reports how many related records (deals, activities, tags) were re-parented onto `primary_id`.
@@ -59,7 +59,7 @@ export class PipelinesService {
59
59
  * Create a pipeline
60
60
  * Creates a new Pipeline. `code` must be unique within your Platform. Promoting another Pipeline to `is_default=true` while one already exists will fail — unset the existing default first.
61
61
  *
62
- * **Required permission:** `Ibl.CRM/Pipelines/write`.
62
+ * **Required permission:** `Ibl.CRM/Pipelines/action`.
63
63
  * @returns Pipeline
64
64
  * @throws ApiError
65
65
  */
@@ -75,7 +75,7 @@ export class PipelinesService {
75
75
  mediaType: 'application/json',
76
76
  errors: {
77
77
  400: `Validation error.`,
78
- 403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`,
78
+ 403: `Missing required permission \`Ibl.CRM/Pipelines/action\`.`,
79
79
  },
80
80
  });
81
81
  }
@@ -131,7 +131,7 @@ export class PipelinesService {
131
131
  * Create a stage
132
132
  * Creates a new PipelineStage in the URL Pipeline. `code` must be unique within that Pipeline. At most one of `is_won` / `is_lost` may be true.
133
133
  *
134
- * **Required permission:** `Ibl.CRM/Pipelines/write`.
134
+ * **Required permission:** `Ibl.CRM/Pipelines/action`.
135
135
  * @returns PipelineStage
136
136
  * @throws ApiError
137
137
  */
@@ -152,7 +152,7 @@ export class PipelinesService {
152
152
  mediaType: 'application/json',
153
153
  errors: {
154
154
  400: `Validation error.`,
155
- 403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`,
155
+ 403: `Missing required permission \`Ibl.CRM/Pipelines/action\`.`,
156
156
  404: `Pipeline not found.`,
157
157
  },
158
158
  });
@@ -0,0 +1,201 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ import type { PaginatedTagList } from '../models/PaginatedTagList';
6
+ import type { PatchedTag } from '../models/PatchedTag';
7
+ import type { Tag } from '../models/Tag';
8
+ import type { CancelablePromise } from '../core/CancelablePromise';
9
+ import { OpenAPI } from '../core/OpenAPI';
10
+ import { request as __request } from '../core/request';
11
+ export class TagsService {
12
+ /**
13
+ * List tags
14
+ * Returns a paginated list of Tags in your Platform. Supports filtering by `name` (case-insensitive substring) and `created_at__gte`/`created_at__lte` ISO timestamp ranges.
15
+ *
16
+ * **Required permission:** `Ibl.CRM/Tags/list`.
17
+ * @returns PaginatedTagList
18
+ * @throws ApiError
19
+ */
20
+ public static tagsList({
21
+ createdAtGte,
22
+ createdAtLte,
23
+ name,
24
+ page,
25
+ pageSize,
26
+ }: {
27
+ createdAtGte?: string,
28
+ createdAtLte?: string,
29
+ name?: string,
30
+ /**
31
+ * A page number within the paginated result set.
32
+ */
33
+ page?: number,
34
+ /**
35
+ * Number of results to return per page.
36
+ */
37
+ pageSize?: number,
38
+ }): CancelablePromise<PaginatedTagList> {
39
+ return __request(OpenAPI, {
40
+ method: 'GET',
41
+ url: '/tags/',
42
+ query: {
43
+ 'created_at__gte': createdAtGte,
44
+ 'created_at__lte': createdAtLte,
45
+ 'name': name,
46
+ 'page': page,
47
+ 'page_size': pageSize,
48
+ },
49
+ errors: {
50
+ 401: `Authentication required.`,
51
+ 403: `Missing required permission \`Ibl.CRM/Tags/list\`.`,
52
+ },
53
+ });
54
+ }
55
+ /**
56
+ * Create a tag
57
+ * Creates a new Tag in your Platform. `name` must be unique within your Platform; supply `color` as a `#RRGGBB` hex string (defaults to `#888888`).
58
+ *
59
+ * **Required permission:** `Ibl.CRM/Tags/action`.
60
+ * @returns Tag
61
+ * @throws ApiError
62
+ */
63
+ public static tagsCreate({
64
+ requestBody,
65
+ }: {
66
+ requestBody: Tag,
67
+ }): CancelablePromise<Tag> {
68
+ return __request(OpenAPI, {
69
+ method: 'POST',
70
+ url: '/tags/',
71
+ body: requestBody,
72
+ mediaType: 'application/json',
73
+ errors: {
74
+ 400: `Validation error (duplicate name, bad color, etc.).`,
75
+ 403: `Missing required permission \`Ibl.CRM/Tags/action\`.`,
76
+ },
77
+ });
78
+ }
79
+ /**
80
+ * Retrieve a tag
81
+ * Returns a single Tag by id.
82
+ *
83
+ * **Required permission:** `Ibl.CRM/Tags/read`.
84
+ * @returns Tag
85
+ * @throws ApiError
86
+ */
87
+ public static tagsRetrieve({
88
+ id,
89
+ }: {
90
+ /**
91
+ * A unique integer value identifying this tag.
92
+ */
93
+ id: number,
94
+ }): CancelablePromise<Tag> {
95
+ return __request(OpenAPI, {
96
+ method: 'GET',
97
+ url: '/tags/{id}/',
98
+ path: {
99
+ 'id': id,
100
+ },
101
+ errors: {
102
+ 403: `Missing required permission \`Ibl.CRM/Tags/read\`.`,
103
+ 404: `Tag not found.`,
104
+ },
105
+ });
106
+ }
107
+ /**
108
+ * Replace a tag
109
+ * Replaces all editable fields on the Tag.
110
+ *
111
+ * **Required permission:** `Ibl.CRM/Tags/write`.
112
+ * @returns Tag
113
+ * @throws ApiError
114
+ */
115
+ public static tagsUpdate({
116
+ id,
117
+ requestBody,
118
+ }: {
119
+ /**
120
+ * A unique integer value identifying this tag.
121
+ */
122
+ id: number,
123
+ requestBody: Tag,
124
+ }): CancelablePromise<Tag> {
125
+ return __request(OpenAPI, {
126
+ method: 'PUT',
127
+ url: '/tags/{id}/',
128
+ path: {
129
+ 'id': id,
130
+ },
131
+ body: requestBody,
132
+ mediaType: 'application/json',
133
+ errors: {
134
+ 400: `Validation error.`,
135
+ 403: `Missing required permission \`Ibl.CRM/Tags/write\`.`,
136
+ 404: `Tag not found.`,
137
+ },
138
+ });
139
+ }
140
+ /**
141
+ * Update a tag
142
+ * Updates only the supplied fields on the Tag (typically `name` or `color`).
143
+ *
144
+ * **Required permission:** `Ibl.CRM/Tags/write`.
145
+ * @returns Tag
146
+ * @throws ApiError
147
+ */
148
+ public static tagsPartialUpdate({
149
+ id,
150
+ requestBody,
151
+ }: {
152
+ /**
153
+ * A unique integer value identifying this tag.
154
+ */
155
+ id: number,
156
+ requestBody?: PatchedTag,
157
+ }): CancelablePromise<Tag> {
158
+ return __request(OpenAPI, {
159
+ method: 'PATCH',
160
+ url: '/tags/{id}/',
161
+ path: {
162
+ 'id': id,
163
+ },
164
+ body: requestBody,
165
+ mediaType: 'application/json',
166
+ errors: {
167
+ 400: `Validation error.`,
168
+ 403: `Missing required permission \`Ibl.CRM/Tags/write\`.`,
169
+ 404: `Tag not found.`,
170
+ },
171
+ });
172
+ }
173
+ /**
174
+ * Delete a tag
175
+ * Deletes the Tag. All attachments to Persons, Organizations, and Deals are removed atomically via cascade.
176
+ *
177
+ * **Required permission:** `Ibl.CRM/Tags/delete`.
178
+ * @returns void
179
+ * @throws ApiError
180
+ */
181
+ public static tagsDestroy({
182
+ id,
183
+ }: {
184
+ /**
185
+ * A unique integer value identifying this tag.
186
+ */
187
+ id: number,
188
+ }): CancelablePromise<void> {
189
+ return __request(OpenAPI, {
190
+ method: 'DELETE',
191
+ url: '/tags/{id}/',
192
+ path: {
193
+ 'id': id,
194
+ },
195
+ errors: {
196
+ 403: `Missing required permission \`Ibl.CRM/Tags/delete\`.`,
197
+ 404: `Tag not found.`,
198
+ },
199
+ });
200
+ }
201
+ }