@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
package/dist/index.umd.js CHANGED
@@ -114,7 +114,7 @@
114
114
 
115
115
  const OpenAPI = {
116
116
  BASE: 'https://base.manager.iblai.app',
117
- VERSION: '4.266.0-core',
117
+ VERSION: '4.267.0-core',
118
118
  WITH_CREDENTIALS: false,
119
119
  CREDENTIALS: 'include',
120
120
  TOKEN: undefined,
@@ -1292,7 +1292,7 @@
1292
1292
  * Create an activity
1293
1293
  * Creates an Activity. Either `deal` or `person` must be supplied; both must belong to your Platform.
1294
1294
  *
1295
- * **Required permission:** `Ibl.CRM/Activities/write`.
1295
+ * **Required permission:** `Ibl.CRM/Activities/action`.
1296
1296
  * @returns Activity
1297
1297
  * @throws ApiError
1298
1298
  */
@@ -1306,7 +1306,7 @@
1306
1306
  mediaType: 'application/json',
1307
1307
  errors: {
1308
1308
  400: `Validation error.`,
1309
- 403: `Missing required permission \`Ibl.CRM/Activities/write\`.`
1309
+ 403: `Missing required permission \`Ibl.CRM/Activities/action\`.`
1310
1310
  }
1311
1311
  });
1312
1312
  }
@@ -20090,7 +20090,7 @@
20090
20090
  * Create an activity
20091
20091
  * Creates an Activity. Either `deal` or `person` must be supplied; both must belong to your Platform.
20092
20092
  *
20093
- * **Required permission:** `Ibl.CRM/Activities/write`.
20093
+ * **Required permission:** `Ibl.CRM/Activities/action`.
20094
20094
  * @returns Activity
20095
20095
  * @throws ApiError
20096
20096
  */
@@ -20104,7 +20104,7 @@
20104
20104
  mediaType: 'application/json',
20105
20105
  errors: {
20106
20106
  400: `Validation error.`,
20107
- 403: `Missing required permission \`Ibl.CRM/Activities/write\`.`
20107
+ 403: `Missing required permission \`Ibl.CRM/Activities/action\`.`
20108
20108
  }
20109
20109
  });
20110
20110
  }
@@ -20253,7 +20253,8 @@
20253
20253
  pipeline,
20254
20254
  source,
20255
20255
  stage,
20256
- status
20256
+ status,
20257
+ tags
20257
20258
  }) {
20258
20259
  return request(OpenAPI, {
20259
20260
  method: 'GET',
@@ -20272,7 +20273,8 @@
20272
20273
  'pipeline': pipeline,
20273
20274
  'source': source,
20274
20275
  'stage': stage,
20275
- 'status': status
20276
+ 'status': status,
20277
+ 'tags': tags
20276
20278
  },
20277
20279
  errors: {
20278
20280
  401: `Authentication required.`,
@@ -20284,7 +20286,7 @@
20284
20286
  * Create a deal
20285
20287
  * 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`.
20286
20288
  *
20287
- * **Required permission:** `Ibl.CRM/Deals/write`.
20289
+ * **Required permission:** `Ibl.CRM/Deals/action`.
20288
20290
  * @returns Deal
20289
20291
  * @throws ApiError
20290
20292
  */
@@ -20298,7 +20300,7 @@
20298
20300
  mediaType: 'application/json',
20299
20301
  errors: {
20300
20302
  400: `Validation error.`,
20301
- 403: `Missing required permission \`Ibl.CRM/Deals/write\`.`
20303
+ 403: `Missing required permission \`Ibl.CRM/Deals/action\`.`
20302
20304
  }
20303
20305
  });
20304
20306
  }
@@ -20456,6 +20458,59 @@
20456
20458
  }
20457
20459
  });
20458
20460
  }
20461
+ /**
20462
+ * Attach a tag to this record
20463
+ * 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.
20464
+ *
20465
+ * **Required permission:** `Ibl.CRM/Tags/write`.
20466
+ * @returns any No response body
20467
+ * @throws ApiError
20468
+ */
20469
+ static crmDealsTagsCreate({
20470
+ id,
20471
+ requestBody
20472
+ }) {
20473
+ return request(OpenAPI, {
20474
+ method: 'POST',
20475
+ url: '/api/crm/deals/{id}/tags/',
20476
+ path: {
20477
+ 'id': id
20478
+ },
20479
+ body: requestBody,
20480
+ mediaType: 'application/json',
20481
+ errors: {
20482
+ 400: `No response body`,
20483
+ 403: `No response body`,
20484
+ 404: `No response body`,
20485
+ 409: `No response body`
20486
+ }
20487
+ });
20488
+ }
20489
+ /**
20490
+ * Detach a tag from this record
20491
+ * Removes the Tag with id `tag_id` from this record. Returns `404` if the tag was not attached.
20492
+ *
20493
+ * **Required permission:** `Ibl.CRM/Tags/write`.
20494
+ * @returns void
20495
+ * @throws ApiError
20496
+ */
20497
+ static crmDealsTagsDestroy({
20498
+ id,
20499
+ tagId
20500
+ }) {
20501
+ return request(OpenAPI, {
20502
+ method: 'DELETE',
20503
+ url: '/api/crm/deals/{id}/tags/{tag_id}/',
20504
+ path: {
20505
+ 'id': id,
20506
+ 'tag_id': tagId
20507
+ },
20508
+ errors: {
20509
+ 403: `No response body`,
20510
+ 404: `No response body`
20511
+ }
20512
+ });
20513
+ }
20459
20514
  /**
20460
20515
  * Mark a deal as won
20461
20516
  * 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.
@@ -20516,7 +20571,7 @@
20516
20571
  * Create a lead source
20517
20572
  * Creates a new LeadSource in your Platform. `code` must be unique.
20518
20573
  *
20519
- * **Required permission:** `Ibl.CRM/Pipelines/write`.
20574
+ * **Required permission:** `Ibl.CRM/Pipelines/action`.
20520
20575
  * @returns LeadSource
20521
20576
  * @throws ApiError
20522
20577
  */
@@ -20530,7 +20585,7 @@
20530
20585
  mediaType: 'application/json',
20531
20586
  errors: {
20532
20587
  400: `Validation error.`,
20533
- 403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`
20588
+ 403: `Missing required permission \`Ibl.CRM/Pipelines/action\`.`
20534
20589
  }
20535
20590
  });
20536
20591
  }
@@ -20646,7 +20701,8 @@
20646
20701
  name,
20647
20702
  owner,
20648
20703
  page,
20649
- pageSize
20704
+ pageSize,
20705
+ tags
20650
20706
  }) {
20651
20707
  return request(OpenAPI, {
20652
20708
  method: 'GET',
@@ -20655,7 +20711,8 @@
20655
20711
  'name': name,
20656
20712
  'owner': owner,
20657
20713
  'page': page,
20658
- 'page_size': pageSize
20714
+ 'page_size': pageSize,
20715
+ 'tags': tags
20659
20716
  },
20660
20717
  errors: {
20661
20718
  401: `Authentication required.`,
@@ -20667,7 +20724,7 @@
20667
20724
  * Create an organization
20668
20725
  * Creates a new organization in your Platform. The Platform is inferred from your credentials. `name` must be unique within your Platform.
20669
20726
  *
20670
- * **Required permission:** `Ibl.CRM/Organizations/write`.
20727
+ * **Required permission:** `Ibl.CRM/Organizations/action`.
20671
20728
  * @returns Organization
20672
20729
  * @throws ApiError
20673
20730
  */
@@ -20681,7 +20738,7 @@
20681
20738
  mediaType: 'application/json',
20682
20739
  errors: {
20683
20740
  400: `Validation error (for example, duplicate name).`,
20684
- 403: `Missing required permission \`Ibl.CRM/Organizations/write\`.`
20741
+ 403: `Missing required permission \`Ibl.CRM/Organizations/action\`.`
20685
20742
  }
20686
20743
  });
20687
20744
  }
@@ -20785,6 +20842,59 @@
20785
20842
  }
20786
20843
  });
20787
20844
  }
20845
+ /**
20846
+ * Attach a tag to this record
20847
+ * 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.
20848
+ *
20849
+ * **Required permission:** `Ibl.CRM/Tags/write`.
20850
+ * @returns any No response body
20851
+ * @throws ApiError
20852
+ */
20853
+ static crmOrganizationsTagsCreate({
20854
+ id,
20855
+ requestBody
20856
+ }) {
20857
+ return request(OpenAPI, {
20858
+ method: 'POST',
20859
+ url: '/api/crm/organizations/{id}/tags/',
20860
+ path: {
20861
+ 'id': id
20862
+ },
20863
+ body: requestBody,
20864
+ mediaType: 'application/json',
20865
+ errors: {
20866
+ 400: `No response body`,
20867
+ 403: `No response body`,
20868
+ 404: `No response body`,
20869
+ 409: `No response body`
20870
+ }
20871
+ });
20872
+ }
20873
+ /**
20874
+ * Detach a tag from this record
20875
+ * Removes the Tag with id `tag_id` from this record. Returns `404` if the tag was not attached.
20876
+ *
20877
+ * **Required permission:** `Ibl.CRM/Tags/write`.
20878
+ * @returns void
20879
+ * @throws ApiError
20880
+ */
20881
+ static crmOrganizationsTagsDestroy({
20882
+ id,
20883
+ tagId
20884
+ }) {
20885
+ return request(OpenAPI, {
20886
+ method: 'DELETE',
20887
+ url: '/api/crm/organizations/{id}/tags/{tag_id}/',
20888
+ path: {
20889
+ 'id': id,
20890
+ 'tag_id': tagId
20891
+ },
20892
+ errors: {
20893
+ 403: `No response body`,
20894
+ 404: `No response body`
20895
+ }
20896
+ });
20897
+ }
20788
20898
  /**
20789
20899
  * List persons
20790
20900
  * Returns a paginated list of persons in your Platform. Supports filtering by `lifecycle_stage`, `owner`, `organization`, `created_at__gte`/`created_at__lte`, and `metadata__has_key`.
@@ -20801,7 +20911,8 @@
20801
20911
  organization,
20802
20912
  owner,
20803
20913
  page,
20804
- pageSize
20914
+ pageSize,
20915
+ tags
20805
20916
  }) {
20806
20917
  return request(OpenAPI, {
20807
20918
  method: 'GET',
@@ -20814,7 +20925,8 @@
20814
20925
  'organization': organization,
20815
20926
  'owner': owner,
20816
20927
  'page': page,
20817
- 'page_size': pageSize
20928
+ 'page_size': pageSize,
20929
+ 'tags': tags
20818
20930
  },
20819
20931
  errors: {
20820
20932
  401: `Authentication required.`,
@@ -20826,7 +20938,7 @@
20826
20938
  * Create a person
20827
20939
  * 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.
20828
20940
  *
20829
- * **Required permission:** `Ibl.CRM/Persons/write`.
20941
+ * **Required permission:** `Ibl.CRM/Persons/action`.
20830
20942
  * @returns Person
20831
20943
  * @throws ApiError
20832
20944
  */
@@ -20840,7 +20952,7 @@
20840
20952
  mediaType: 'application/json',
20841
20953
  errors: {
20842
20954
  400: `Validation error.`,
20843
- 403: `Missing required permission \`Ibl.CRM/Persons/write\`.`
20955
+ 403: `Missing required permission \`Ibl.CRM/Persons/action\`.`
20844
20956
  }
20845
20957
  });
20846
20958
  }
@@ -21003,6 +21115,59 @@
21003
21115
  }
21004
21116
  });
21005
21117
  }
21118
+ /**
21119
+ * Attach a tag to this record
21120
+ * 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.
21121
+ *
21122
+ * **Required permission:** `Ibl.CRM/Tags/write`.
21123
+ * @returns any No response body
21124
+ * @throws ApiError
21125
+ */
21126
+ static crmPersonsTagsCreate({
21127
+ id,
21128
+ requestBody
21129
+ }) {
21130
+ return request(OpenAPI, {
21131
+ method: 'POST',
21132
+ url: '/api/crm/persons/{id}/tags/',
21133
+ path: {
21134
+ 'id': id
21135
+ },
21136
+ body: requestBody,
21137
+ mediaType: 'application/json',
21138
+ errors: {
21139
+ 400: `No response body`,
21140
+ 403: `No response body`,
21141
+ 404: `No response body`,
21142
+ 409: `No response body`
21143
+ }
21144
+ });
21145
+ }
21146
+ /**
21147
+ * Detach a tag from this record
21148
+ * Removes the Tag with id `tag_id` from this record. Returns `404` if the tag was not attached.
21149
+ *
21150
+ * **Required permission:** `Ibl.CRM/Tags/write`.
21151
+ * @returns void
21152
+ * @throws ApiError
21153
+ */
21154
+ static crmPersonsTagsDestroy({
21155
+ id,
21156
+ tagId
21157
+ }) {
21158
+ return request(OpenAPI, {
21159
+ method: 'DELETE',
21160
+ url: '/api/crm/persons/{id}/tags/{tag_id}/',
21161
+ path: {
21162
+ 'id': id,
21163
+ 'tag_id': tagId
21164
+ },
21165
+ errors: {
21166
+ 403: `No response body`,
21167
+ 404: `No response body`
21168
+ }
21169
+ });
21170
+ }
21006
21171
  /**
21007
21172
  * Merge duplicate persons into a primary
21008
21173
  * Marks each person in `duplicate_ids` as inactive and reports how many related records (deals, activities, tags) were re-parented onto `primary_id`.
@@ -21063,7 +21228,7 @@
21063
21228
  * Create a pipeline
21064
21229
  * 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.
21065
21230
  *
21066
- * **Required permission:** `Ibl.CRM/Pipelines/write`.
21231
+ * **Required permission:** `Ibl.CRM/Pipelines/action`.
21067
21232
  * @returns Pipeline
21068
21233
  * @throws ApiError
21069
21234
  */
@@ -21077,7 +21242,7 @@
21077
21242
  mediaType: 'application/json',
21078
21243
  errors: {
21079
21244
  400: `Validation error.`,
21080
- 403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`
21245
+ 403: `Missing required permission \`Ibl.CRM/Pipelines/action\`.`
21081
21246
  }
21082
21247
  });
21083
21248
  }
@@ -21120,7 +21285,7 @@
21120
21285
  * Create a stage
21121
21286
  * 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.
21122
21287
  *
21123
- * **Required permission:** `Ibl.CRM/Pipelines/write`.
21288
+ * **Required permission:** `Ibl.CRM/Pipelines/action`.
21124
21289
  * @returns PipelineStage
21125
21290
  * @throws ApiError
21126
21291
  */
@@ -21138,7 +21303,7 @@
21138
21303
  mediaType: 'application/json',
21139
21304
  errors: {
21140
21305
  400: `Validation error.`,
21141
- 403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`,
21306
+ 403: `Missing required permission \`Ibl.CRM/Pipelines/action\`.`,
21142
21307
  404: `Pipeline not found.`
21143
21308
  }
21144
21309
  });
@@ -21353,6 +21518,159 @@
21353
21518
  }
21354
21519
  });
21355
21520
  }
21521
+ /**
21522
+ * List tags
21523
+ * 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.
21524
+ *
21525
+ * **Required permission:** `Ibl.CRM/Tags/list`.
21526
+ * @returns PaginatedTagList
21527
+ * @throws ApiError
21528
+ */
21529
+ static crmTagsList({
21530
+ createdAtGte,
21531
+ createdAtLte,
21532
+ name,
21533
+ page,
21534
+ pageSize
21535
+ }) {
21536
+ return request(OpenAPI, {
21537
+ method: 'GET',
21538
+ url: '/api/crm/tags/',
21539
+ query: {
21540
+ 'created_at__gte': createdAtGte,
21541
+ 'created_at__lte': createdAtLte,
21542
+ 'name': name,
21543
+ 'page': page,
21544
+ 'page_size': pageSize
21545
+ },
21546
+ errors: {
21547
+ 401: `Authentication required.`,
21548
+ 403: `Missing required permission \`Ibl.CRM/Tags/list\`.`
21549
+ }
21550
+ });
21551
+ }
21552
+ /**
21553
+ * Create a tag
21554
+ * Creates a new Tag in your Platform. `name` must be unique within your Platform; supply `color` as a `#RRGGBB` hex string (defaults to `#888888`).
21555
+ *
21556
+ * **Required permission:** `Ibl.CRM/Tags/action`.
21557
+ * @returns Tag
21558
+ * @throws ApiError
21559
+ */
21560
+ static crmTagsCreate({
21561
+ requestBody
21562
+ }) {
21563
+ return request(OpenAPI, {
21564
+ method: 'POST',
21565
+ url: '/api/crm/tags/',
21566
+ body: requestBody,
21567
+ mediaType: 'application/json',
21568
+ errors: {
21569
+ 400: `Validation error (duplicate name, bad color, etc.).`,
21570
+ 403: `Missing required permission \`Ibl.CRM/Tags/action\`.`
21571
+ }
21572
+ });
21573
+ }
21574
+ /**
21575
+ * Retrieve a tag
21576
+ * Returns a single Tag by id.
21577
+ *
21578
+ * **Required permission:** `Ibl.CRM/Tags/read`.
21579
+ * @returns Tag
21580
+ * @throws ApiError
21581
+ */
21582
+ static crmTagsRetrieve({
21583
+ id
21584
+ }) {
21585
+ return request(OpenAPI, {
21586
+ method: 'GET',
21587
+ url: '/api/crm/tags/{id}/',
21588
+ path: {
21589
+ 'id': id
21590
+ },
21591
+ errors: {
21592
+ 403: `Missing required permission \`Ibl.CRM/Tags/read\`.`,
21593
+ 404: `Tag not found.`
21594
+ }
21595
+ });
21596
+ }
21597
+ /**
21598
+ * Replace a tag
21599
+ * Replaces all editable fields on the Tag.
21600
+ *
21601
+ * **Required permission:** `Ibl.CRM/Tags/write`.
21602
+ * @returns Tag
21603
+ * @throws ApiError
21604
+ */
21605
+ static crmTagsUpdate({
21606
+ id,
21607
+ requestBody
21608
+ }) {
21609
+ return request(OpenAPI, {
21610
+ method: 'PUT',
21611
+ url: '/api/crm/tags/{id}/',
21612
+ path: {
21613
+ 'id': id
21614
+ },
21615
+ body: requestBody,
21616
+ mediaType: 'application/json',
21617
+ errors: {
21618
+ 400: `Validation error.`,
21619
+ 403: `Missing required permission \`Ibl.CRM/Tags/write\`.`,
21620
+ 404: `Tag not found.`
21621
+ }
21622
+ });
21623
+ }
21624
+ /**
21625
+ * Update a tag
21626
+ * Updates only the supplied fields on the Tag (typically `name` or `color`).
21627
+ *
21628
+ * **Required permission:** `Ibl.CRM/Tags/write`.
21629
+ * @returns Tag
21630
+ * @throws ApiError
21631
+ */
21632
+ static crmTagsPartialUpdate({
21633
+ id,
21634
+ requestBody
21635
+ }) {
21636
+ return request(OpenAPI, {
21637
+ method: 'PATCH',
21638
+ url: '/api/crm/tags/{id}/',
21639
+ path: {
21640
+ 'id': id
21641
+ },
21642
+ body: requestBody,
21643
+ mediaType: 'application/json',
21644
+ errors: {
21645
+ 400: `Validation error.`,
21646
+ 403: `Missing required permission \`Ibl.CRM/Tags/write\`.`,
21647
+ 404: `Tag not found.`
21648
+ }
21649
+ });
21650
+ }
21651
+ /**
21652
+ * Delete a tag
21653
+ * Deletes the Tag. All attachments to Persons, Organizations, and Deals are removed atomically via cascade.
21654
+ *
21655
+ * **Required permission:** `Ibl.CRM/Tags/delete`.
21656
+ * @returns void
21657
+ * @throws ApiError
21658
+ */
21659
+ static crmTagsDestroy({
21660
+ id
21661
+ }) {
21662
+ return request(OpenAPI, {
21663
+ method: 'DELETE',
21664
+ url: '/api/crm/tags/{id}/',
21665
+ path: {
21666
+ 'id': id
21667
+ },
21668
+ errors: {
21669
+ 403: `Missing required permission \`Ibl.CRM/Tags/delete\`.`,
21670
+ 404: `Tag not found.`
21671
+ }
21672
+ });
21673
+ }
21356
21674
  }
21357
21675
 
21358
21676
  class CustomDomainsService {
@@ -21467,7 +21785,8 @@
21467
21785
  pipeline,
21468
21786
  source,
21469
21787
  stage,
21470
- status
21788
+ status,
21789
+ tags
21471
21790
  }) {
21472
21791
  return request(OpenAPI, {
21473
21792
  method: 'GET',
@@ -21486,7 +21805,8 @@
21486
21805
  'pipeline': pipeline,
21487
21806
  'source': source,
21488
21807
  'stage': stage,
21489
- 'status': status
21808
+ 'status': status,
21809
+ 'tags': tags
21490
21810
  },
21491
21811
  errors: {
21492
21812
  401: `Authentication required.`,
@@ -21498,7 +21818,7 @@
21498
21818
  * Create a deal
21499
21819
  * 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`.
21500
21820
  *
21501
- * **Required permission:** `Ibl.CRM/Deals/write`.
21821
+ * **Required permission:** `Ibl.CRM/Deals/action`.
21502
21822
  * @returns Deal
21503
21823
  * @throws ApiError
21504
21824
  */
@@ -21512,7 +21832,7 @@
21512
21832
  mediaType: 'application/json',
21513
21833
  errors: {
21514
21834
  400: `Validation error.`,
21515
- 403: `Missing required permission \`Ibl.CRM/Deals/write\`.`
21835
+ 403: `Missing required permission \`Ibl.CRM/Deals/action\`.`
21516
21836
  }
21517
21837
  });
21518
21838
  }
@@ -21670,6 +21990,59 @@
21670
21990
  }
21671
21991
  });
21672
21992
  }
21993
+ /**
21994
+ * Attach a tag to this record
21995
+ * 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.
21996
+ *
21997
+ * **Required permission:** `Ibl.CRM/Tags/write`.
21998
+ * @returns any No response body
21999
+ * @throws ApiError
22000
+ */
22001
+ static dealsTagsCreate({
22002
+ id,
22003
+ requestBody
22004
+ }) {
22005
+ return request(OpenAPI, {
22006
+ method: 'POST',
22007
+ url: '/deals/{id}/tags/',
22008
+ path: {
22009
+ 'id': id
22010
+ },
22011
+ body: requestBody,
22012
+ mediaType: 'application/json',
22013
+ errors: {
22014
+ 400: `No response body`,
22015
+ 403: `No response body`,
22016
+ 404: `No response body`,
22017
+ 409: `No response body`
22018
+ }
22019
+ });
22020
+ }
22021
+ /**
22022
+ * Detach a tag from this record
22023
+ * Removes the Tag with id `tag_id` from this record. Returns `404` if the tag was not attached.
22024
+ *
22025
+ * **Required permission:** `Ibl.CRM/Tags/write`.
22026
+ * @returns void
22027
+ * @throws ApiError
22028
+ */
22029
+ static dealsTagsDestroy({
22030
+ id,
22031
+ tagId
22032
+ }) {
22033
+ return request(OpenAPI, {
22034
+ method: 'DELETE',
22035
+ url: '/deals/{id}/tags/{tag_id}/',
22036
+ path: {
22037
+ 'id': id,
22038
+ 'tag_id': tagId
22039
+ },
22040
+ errors: {
22041
+ 403: `No response body`,
22042
+ 404: `No response body`
22043
+ }
22044
+ });
22045
+ }
21673
22046
  /**
21674
22047
  * Mark a deal as won
21675
22048
  * 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.
@@ -21866,7 +22239,7 @@
21866
22239
  * Create a lead source
21867
22240
  * Creates a new LeadSource in your Platform. `code` must be unique.
21868
22241
  *
21869
- * **Required permission:** `Ibl.CRM/Pipelines/write`.
22242
+ * **Required permission:** `Ibl.CRM/Pipelines/action`.
21870
22243
  * @returns LeadSource
21871
22244
  * @throws ApiError
21872
22245
  */
@@ -21880,7 +22253,7 @@
21880
22253
  mediaType: 'application/json',
21881
22254
  errors: {
21882
22255
  400: `Validation error.`,
21883
- 403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`
22256
+ 403: `Missing required permission \`Ibl.CRM/Pipelines/action\`.`
21884
22257
  }
21885
22258
  });
21886
22259
  }
@@ -22883,7 +23256,8 @@
22883
23256
  name,
22884
23257
  owner,
22885
23258
  page,
22886
- pageSize
23259
+ pageSize,
23260
+ tags
22887
23261
  }) {
22888
23262
  return request(OpenAPI, {
22889
23263
  method: 'GET',
@@ -22892,7 +23266,8 @@
22892
23266
  'name': name,
22893
23267
  'owner': owner,
22894
23268
  'page': page,
22895
- 'page_size': pageSize
23269
+ 'page_size': pageSize,
23270
+ 'tags': tags
22896
23271
  },
22897
23272
  errors: {
22898
23273
  401: `Authentication required.`,
@@ -22904,7 +23279,7 @@
22904
23279
  * Create an organization
22905
23280
  * Creates a new organization in your Platform. The Platform is inferred from your credentials. `name` must be unique within your Platform.
22906
23281
  *
22907
- * **Required permission:** `Ibl.CRM/Organizations/write`.
23282
+ * **Required permission:** `Ibl.CRM/Organizations/action`.
22908
23283
  * @returns Organization
22909
23284
  * @throws ApiError
22910
23285
  */
@@ -22918,7 +23293,7 @@
22918
23293
  mediaType: 'application/json',
22919
23294
  errors: {
22920
23295
  400: `Validation error (for example, duplicate name).`,
22921
- 403: `Missing required permission \`Ibl.CRM/Organizations/write\`.`
23296
+ 403: `Missing required permission \`Ibl.CRM/Organizations/action\`.`
22922
23297
  }
22923
23298
  });
22924
23299
  }
@@ -23022,6 +23397,59 @@
23022
23397
  }
23023
23398
  });
23024
23399
  }
23400
+ /**
23401
+ * Attach a tag to this record
23402
+ * 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.
23403
+ *
23404
+ * **Required permission:** `Ibl.CRM/Tags/write`.
23405
+ * @returns any No response body
23406
+ * @throws ApiError
23407
+ */
23408
+ static organizationsTagsCreate({
23409
+ id,
23410
+ requestBody
23411
+ }) {
23412
+ return request(OpenAPI, {
23413
+ method: 'POST',
23414
+ url: '/organizations/{id}/tags/',
23415
+ path: {
23416
+ 'id': id
23417
+ },
23418
+ body: requestBody,
23419
+ mediaType: 'application/json',
23420
+ errors: {
23421
+ 400: `No response body`,
23422
+ 403: `No response body`,
23423
+ 404: `No response body`,
23424
+ 409: `No response body`
23425
+ }
23426
+ });
23427
+ }
23428
+ /**
23429
+ * Detach a tag from this record
23430
+ * Removes the Tag with id `tag_id` from this record. Returns `404` if the tag was not attached.
23431
+ *
23432
+ * **Required permission:** `Ibl.CRM/Tags/write`.
23433
+ * @returns void
23434
+ * @throws ApiError
23435
+ */
23436
+ static organizationsTagsDestroy({
23437
+ id,
23438
+ tagId
23439
+ }) {
23440
+ return request(OpenAPI, {
23441
+ method: 'DELETE',
23442
+ url: '/organizations/{id}/tags/{tag_id}/',
23443
+ path: {
23444
+ 'id': id,
23445
+ 'tag_id': tagId
23446
+ },
23447
+ errors: {
23448
+ 403: `No response body`,
23449
+ 404: `No response body`
23450
+ }
23451
+ });
23452
+ }
23025
23453
  }
23026
23454
 
23027
23455
  class PersonsService {
@@ -23041,7 +23469,8 @@
23041
23469
  organization,
23042
23470
  owner,
23043
23471
  page,
23044
- pageSize
23472
+ pageSize,
23473
+ tags
23045
23474
  }) {
23046
23475
  return request(OpenAPI, {
23047
23476
  method: 'GET',
@@ -23054,7 +23483,8 @@
23054
23483
  'organization': organization,
23055
23484
  'owner': owner,
23056
23485
  'page': page,
23057
- 'page_size': pageSize
23486
+ 'page_size': pageSize,
23487
+ 'tags': tags
23058
23488
  },
23059
23489
  errors: {
23060
23490
  401: `Authentication required.`,
@@ -23066,7 +23496,7 @@
23066
23496
  * Create a person
23067
23497
  * 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.
23068
23498
  *
23069
- * **Required permission:** `Ibl.CRM/Persons/write`.
23499
+ * **Required permission:** `Ibl.CRM/Persons/action`.
23070
23500
  * @returns Person
23071
23501
  * @throws ApiError
23072
23502
  */
@@ -23080,7 +23510,7 @@
23080
23510
  mediaType: 'application/json',
23081
23511
  errors: {
23082
23512
  400: `Validation error.`,
23083
- 403: `Missing required permission \`Ibl.CRM/Persons/write\`.`
23513
+ 403: `Missing required permission \`Ibl.CRM/Persons/action\`.`
23084
23514
  }
23085
23515
  });
23086
23516
  }
@@ -23243,6 +23673,59 @@
23243
23673
  }
23244
23674
  });
23245
23675
  }
23676
+ /**
23677
+ * Attach a tag to this record
23678
+ * 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.
23679
+ *
23680
+ * **Required permission:** `Ibl.CRM/Tags/write`.
23681
+ * @returns any No response body
23682
+ * @throws ApiError
23683
+ */
23684
+ static personsTagsCreate({
23685
+ id,
23686
+ requestBody
23687
+ }) {
23688
+ return request(OpenAPI, {
23689
+ method: 'POST',
23690
+ url: '/persons/{id}/tags/',
23691
+ path: {
23692
+ 'id': id
23693
+ },
23694
+ body: requestBody,
23695
+ mediaType: 'application/json',
23696
+ errors: {
23697
+ 400: `No response body`,
23698
+ 403: `No response body`,
23699
+ 404: `No response body`,
23700
+ 409: `No response body`
23701
+ }
23702
+ });
23703
+ }
23704
+ /**
23705
+ * Detach a tag from this record
23706
+ * Removes the Tag with id `tag_id` from this record. Returns `404` if the tag was not attached.
23707
+ *
23708
+ * **Required permission:** `Ibl.CRM/Tags/write`.
23709
+ * @returns void
23710
+ * @throws ApiError
23711
+ */
23712
+ static personsTagsDestroy({
23713
+ id,
23714
+ tagId
23715
+ }) {
23716
+ return request(OpenAPI, {
23717
+ method: 'DELETE',
23718
+ url: '/persons/{id}/tags/{tag_id}/',
23719
+ path: {
23720
+ 'id': id,
23721
+ 'tag_id': tagId
23722
+ },
23723
+ errors: {
23724
+ 403: `No response body`,
23725
+ 404: `No response body`
23726
+ }
23727
+ });
23728
+ }
23246
23729
  /**
23247
23730
  * Merge duplicate persons into a primary
23248
23731
  * Marks each person in `duplicate_ids` as inactive and reports how many related records (deals, activities, tags) were re-parented onto `primary_id`.
@@ -23306,7 +23789,7 @@
23306
23789
  * Create a pipeline
23307
23790
  * 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.
23308
23791
  *
23309
- * **Required permission:** `Ibl.CRM/Pipelines/write`.
23792
+ * **Required permission:** `Ibl.CRM/Pipelines/action`.
23310
23793
  * @returns Pipeline
23311
23794
  * @throws ApiError
23312
23795
  */
@@ -23320,7 +23803,7 @@
23320
23803
  mediaType: 'application/json',
23321
23804
  errors: {
23322
23805
  400: `Validation error.`,
23323
- 403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`
23806
+ 403: `Missing required permission \`Ibl.CRM/Pipelines/action\`.`
23324
23807
  }
23325
23808
  });
23326
23809
  }
@@ -23363,7 +23846,7 @@
23363
23846
  * Create a stage
23364
23847
  * 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.
23365
23848
  *
23366
- * **Required permission:** `Ibl.CRM/Pipelines/write`.
23849
+ * **Required permission:** `Ibl.CRM/Pipelines/action`.
23367
23850
  * @returns PipelineStage
23368
23851
  * @throws ApiError
23369
23852
  */
@@ -23381,7 +23864,7 @@
23381
23864
  mediaType: 'application/json',
23382
23865
  errors: {
23383
23866
  400: `Validation error.`,
23384
- 403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`,
23867
+ 403: `Missing required permission \`Ibl.CRM/Pipelines/action\`.`,
23385
23868
  404: `Pipeline not found.`
23386
23869
  }
23387
23870
  });
@@ -25798,6 +26281,162 @@
25798
26281
  }
25799
26282
  }
25800
26283
 
26284
+ class TagsService {
26285
+ /**
26286
+ * List tags
26287
+ * 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.
26288
+ *
26289
+ * **Required permission:** `Ibl.CRM/Tags/list`.
26290
+ * @returns PaginatedTagList
26291
+ * @throws ApiError
26292
+ */
26293
+ static tagsList({
26294
+ createdAtGte,
26295
+ createdAtLte,
26296
+ name,
26297
+ page,
26298
+ pageSize
26299
+ }) {
26300
+ return request(OpenAPI, {
26301
+ method: 'GET',
26302
+ url: '/tags/',
26303
+ query: {
26304
+ 'created_at__gte': createdAtGte,
26305
+ 'created_at__lte': createdAtLte,
26306
+ 'name': name,
26307
+ 'page': page,
26308
+ 'page_size': pageSize
26309
+ },
26310
+ errors: {
26311
+ 401: `Authentication required.`,
26312
+ 403: `Missing required permission \`Ibl.CRM/Tags/list\`.`
26313
+ }
26314
+ });
26315
+ }
26316
+ /**
26317
+ * Create a tag
26318
+ * Creates a new Tag in your Platform. `name` must be unique within your Platform; supply `color` as a `#RRGGBB` hex string (defaults to `#888888`).
26319
+ *
26320
+ * **Required permission:** `Ibl.CRM/Tags/action`.
26321
+ * @returns Tag
26322
+ * @throws ApiError
26323
+ */
26324
+ static tagsCreate({
26325
+ requestBody
26326
+ }) {
26327
+ return request(OpenAPI, {
26328
+ method: 'POST',
26329
+ url: '/tags/',
26330
+ body: requestBody,
26331
+ mediaType: 'application/json',
26332
+ errors: {
26333
+ 400: `Validation error (duplicate name, bad color, etc.).`,
26334
+ 403: `Missing required permission \`Ibl.CRM/Tags/action\`.`
26335
+ }
26336
+ });
26337
+ }
26338
+ /**
26339
+ * Retrieve a tag
26340
+ * Returns a single Tag by id.
26341
+ *
26342
+ * **Required permission:** `Ibl.CRM/Tags/read`.
26343
+ * @returns Tag
26344
+ * @throws ApiError
26345
+ */
26346
+ static tagsRetrieve({
26347
+ id
26348
+ }) {
26349
+ return request(OpenAPI, {
26350
+ method: 'GET',
26351
+ url: '/tags/{id}/',
26352
+ path: {
26353
+ 'id': id
26354
+ },
26355
+ errors: {
26356
+ 403: `Missing required permission \`Ibl.CRM/Tags/read\`.`,
26357
+ 404: `Tag not found.`
26358
+ }
26359
+ });
26360
+ }
26361
+ /**
26362
+ * Replace a tag
26363
+ * Replaces all editable fields on the Tag.
26364
+ *
26365
+ * **Required permission:** `Ibl.CRM/Tags/write`.
26366
+ * @returns Tag
26367
+ * @throws ApiError
26368
+ */
26369
+ static tagsUpdate({
26370
+ id,
26371
+ requestBody
26372
+ }) {
26373
+ return request(OpenAPI, {
26374
+ method: 'PUT',
26375
+ url: '/tags/{id}/',
26376
+ path: {
26377
+ 'id': id
26378
+ },
26379
+ body: requestBody,
26380
+ mediaType: 'application/json',
26381
+ errors: {
26382
+ 400: `Validation error.`,
26383
+ 403: `Missing required permission \`Ibl.CRM/Tags/write\`.`,
26384
+ 404: `Tag not found.`
26385
+ }
26386
+ });
26387
+ }
26388
+ /**
26389
+ * Update a tag
26390
+ * Updates only the supplied fields on the Tag (typically `name` or `color`).
26391
+ *
26392
+ * **Required permission:** `Ibl.CRM/Tags/write`.
26393
+ * @returns Tag
26394
+ * @throws ApiError
26395
+ */
26396
+ static tagsPartialUpdate({
26397
+ id,
26398
+ requestBody
26399
+ }) {
26400
+ return request(OpenAPI, {
26401
+ method: 'PATCH',
26402
+ url: '/tags/{id}/',
26403
+ path: {
26404
+ 'id': id
26405
+ },
26406
+ body: requestBody,
26407
+ mediaType: 'application/json',
26408
+ errors: {
26409
+ 400: `Validation error.`,
26410
+ 403: `Missing required permission \`Ibl.CRM/Tags/write\`.`,
26411
+ 404: `Tag not found.`
26412
+ }
26413
+ });
26414
+ }
26415
+ /**
26416
+ * Delete a tag
26417
+ * Deletes the Tag. All attachments to Persons, Organizations, and Deals are removed atomically via cascade.
26418
+ *
26419
+ * **Required permission:** `Ibl.CRM/Tags/delete`.
26420
+ * @returns void
26421
+ * @throws ApiError
26422
+ */
26423
+ static tagsDestroy({
26424
+ id
26425
+ }) {
26426
+ return request(OpenAPI, {
26427
+ method: 'DELETE',
26428
+ url: '/tags/{id}/',
26429
+ path: {
26430
+ 'id': id
26431
+ },
26432
+ errors: {
26433
+ 403: `Missing required permission \`Ibl.CRM/Tags/delete\`.`,
26434
+ 404: `Tag not found.`
26435
+ }
26436
+ });
26437
+ }
26438
+ }
26439
+
25801
26440
  class TransactionsService {
25802
26441
  /**
25803
26442
  * List transaction history
@@ -25859,6 +26498,7 @@
25859
26498
  exports.ScimService = ScimService;
25860
26499
  exports.SearchService = SearchService;
25861
26500
  exports.SkillsService = SkillsService;
26501
+ exports.TagsService = TagsService;
25862
26502
  exports.TransactionsService = TransactionsService;
25863
26503
 
25864
26504
  }));