@iblai/iblai-api 4.415.0-core → 4.416.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 (83) hide show
  1. package/dist/index.cjs.js +648 -30
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +649 -31
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +648 -30
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/types/index.d.ts +27 -1
  8. package/dist/types/models/Activity.d.ts +6 -2
  9. package/dist/types/models/Deal.d.ts +14 -2
  10. package/dist/types/models/DealBoard.d.ts +7 -0
  11. package/dist/types/models/DealBoardStage.d.ts +19 -0
  12. package/dist/types/models/DirEnum.d.ts +8 -0
  13. package/dist/types/models/Favorite.d.ts +28 -0
  14. package/dist/types/models/HistoryEntry.d.ts +15 -0
  15. package/dist/types/models/HistoryEntryActionEnum.d.ts +12 -0
  16. package/dist/types/models/ObjectTypeEnum.d.ts +12 -0
  17. package/dist/types/models/Overview.d.ts +24 -0
  18. package/dist/types/models/OverviewActivities.d.ts +5 -0
  19. package/dist/types/models/OverviewCount.d.ts +3 -0
  20. package/dist/types/models/OverviewDeals.d.ts +22 -0
  21. package/dist/types/models/OverviewMonth.d.ts +10 -0
  22. package/dist/types/models/OverviewStage.d.ts +13 -0
  23. package/dist/types/models/PaginatedFavoriteList.d.ts +7 -0
  24. package/dist/types/models/PaginatedSavedViewList.d.ts +7 -0
  25. package/dist/types/models/PatchedActivity.d.ts +6 -2
  26. package/dist/types/models/PatchedDeal.d.ts +14 -2
  27. package/dist/types/models/PatchedPerson.d.ts +4 -0
  28. package/dist/types/models/PatchedPipeline.d.ts +1 -1
  29. package/dist/types/models/PatchedSavedView.d.ts +41 -0
  30. package/dist/types/models/Person.d.ts +4 -0
  31. package/dist/types/models/Pipeline.d.ts +1 -1
  32. package/dist/types/models/PipelineStageReorderRequest.d.ts +6 -0
  33. package/dist/types/models/SavedView.d.ts +41 -0
  34. package/dist/types/models/SavedViewTypeEnum.d.ts +8 -0
  35. package/dist/types/models/SearchDeal.d.ts +40 -0
  36. package/dist/types/models/SearchOrganization.d.ts +10 -0
  37. package/dist/types/models/SearchPerson.d.ts +33 -0
  38. package/dist/types/models/SearchResponse.d.ts +12 -0
  39. package/dist/types/models/{DealStatusEnum.d.ts → Status05cEnum.d.ts} +1 -1
  40. package/dist/types/models/_Column.d.ts +7 -0
  41. package/dist/types/models/_Filter.d.ts +8 -0
  42. package/dist/types/models/_Sort.d.ts +5 -0
  43. package/dist/types/services/CrmService.d.ts +523 -12
  44. package/package.json +1 -1
  45. package/sdk_schema.yml +1905 -27
  46. package/src/core/OpenAPI.ts +1 -1
  47. package/src/index.ts +27 -1
  48. package/src/models/Activity.ts +6 -2
  49. package/src/models/Deal.ts +14 -2
  50. package/src/models/DealBoard.ts +12 -0
  51. package/src/models/DealBoardStage.ts +24 -0
  52. package/src/models/DirEnum.ts +12 -0
  53. package/src/models/Favorite.ts +33 -0
  54. package/src/models/HistoryEntry.ts +20 -0
  55. package/src/models/HistoryEntryActionEnum.ts +16 -0
  56. package/src/models/ObjectTypeEnum.ts +16 -0
  57. package/src/models/Overview.ts +29 -0
  58. package/src/models/OverviewActivities.ts +10 -0
  59. package/src/models/OverviewCount.ts +8 -0
  60. package/src/models/OverviewDeals.ts +27 -0
  61. package/src/models/OverviewMonth.ts +15 -0
  62. package/src/models/OverviewStage.ts +18 -0
  63. package/src/models/PaginatedFavoriteList.ts +12 -0
  64. package/src/models/PaginatedSavedViewList.ts +12 -0
  65. package/src/models/PatchedActivity.ts +6 -2
  66. package/src/models/PatchedDeal.ts +14 -2
  67. package/src/models/PatchedPerson.ts +4 -0
  68. package/src/models/PatchedPipeline.ts +1 -1
  69. package/src/models/PatchedSavedView.ts +46 -0
  70. package/src/models/Person.ts +4 -0
  71. package/src/models/Pipeline.ts +1 -1
  72. package/src/models/PipelineStageReorderRequest.ts +11 -0
  73. package/src/models/SavedView.ts +46 -0
  74. package/src/models/SavedViewTypeEnum.ts +12 -0
  75. package/src/models/SearchDeal.ts +45 -0
  76. package/src/models/SearchOrganization.ts +15 -0
  77. package/src/models/SearchPerson.ts +38 -0
  78. package/src/models/SearchResponse.ts +17 -0
  79. package/src/models/{DealStatusEnum.ts → Status05cEnum.ts} +1 -1
  80. package/src/models/_Column.ts +12 -0
  81. package/src/models/_Filter.ts +13 -0
  82. package/src/models/_Sort.ts +10 -0
  83. package/src/services/CrmService.ts +924 -4
package/dist/index.cjs.js CHANGED
@@ -110,7 +110,7 @@ class CancelablePromise {
110
110
 
111
111
  const OpenAPI = {
112
112
  BASE: 'https://base.manager.iblai.app',
113
- VERSION: '4.415.0-core',
113
+ VERSION: '4.416.0-core',
114
114
  WITH_CREDENTIALS: false,
115
115
  CREDENTIALS: 'include',
116
116
  TOKEN: undefined,
@@ -269,22 +269,6 @@ exports.CreditTransactionHistoryStatusEnum = void 0;
269
269
  CreditTransactionHistoryStatusEnum["CANCELLED"] = "cancelled";
270
270
  })(exports.CreditTransactionHistoryStatusEnum || (exports.CreditTransactionHistoryStatusEnum = {}));
271
271
 
272
- /* generated using openapi-typescript-codegen -- do not edit */
273
- /* istanbul ignore file */
274
- /* tslint:disable */
275
- /* eslint-disable */
276
- /**
277
- * * `open` - Open
278
- * * `won` - Won
279
- * * `lost` - Lost
280
- */
281
- exports.DealStatusEnum = void 0;
282
- (function (DealStatusEnum) {
283
- DealStatusEnum["OPEN"] = "open";
284
- DealStatusEnum["WON"] = "won";
285
- DealStatusEnum["LOST"] = "lost";
286
- })(exports.DealStatusEnum || (exports.DealStatusEnum = {}));
287
-
288
272
  /* generated using openapi-typescript-codegen -- do not edit */
289
273
  /* istanbul ignore file */
290
274
  /* tslint:disable */
@@ -299,6 +283,20 @@ exports.DirectionEnum = void 0;
299
283
  DirectionEnum["IMPORT"] = "import";
300
284
  })(exports.DirectionEnum || (exports.DirectionEnum = {}));
301
285
 
286
+ /* generated using openapi-typescript-codegen -- do not edit */
287
+ /* istanbul ignore file */
288
+ /* tslint:disable */
289
+ /* eslint-disable */
290
+ /**
291
+ * * `asc` - asc
292
+ * * `desc` - desc
293
+ */
294
+ exports.DirEnum = void 0;
295
+ (function (DirEnum) {
296
+ DirEnum["ASC"] = "asc";
297
+ DirEnum["DESC"] = "desc";
298
+ })(exports.DirEnum || (exports.DirEnum = {}));
299
+
302
300
  /* generated using openapi-typescript-codegen -- do not edit */
303
301
  /* istanbul ignore file */
304
302
  /* tslint:disable */
@@ -483,6 +481,24 @@ exports.GrandfatheringStrategyEnum = void 0;
483
481
  GrandfatheringStrategyEnum["REQUIRE_SUBSCRIPTION"] = "require_subscription";
484
482
  })(exports.GrandfatheringStrategyEnum || (exports.GrandfatheringStrategyEnum = {}));
485
483
 
484
+ /* generated using openapi-typescript-codegen -- do not edit */
485
+ /* istanbul ignore file */
486
+ /* tslint:disable */
487
+ /* eslint-disable */
488
+ /**
489
+ * * `create` - create
490
+ * * `update` - update
491
+ * * `delete` - delete
492
+ * * `access` - access
493
+ */
494
+ exports.HistoryEntryActionEnum = void 0;
495
+ (function (HistoryEntryActionEnum) {
496
+ HistoryEntryActionEnum["CREATE"] = "create";
497
+ HistoryEntryActionEnum["UPDATE"] = "update";
498
+ HistoryEntryActionEnum["DELETE"] = "delete";
499
+ HistoryEntryActionEnum["ACCESS"] = "access";
500
+ })(exports.HistoryEntryActionEnum || (exports.HistoryEntryActionEnum = {}));
501
+
486
502
  /* generated using openapi-typescript-codegen -- do not edit */
487
503
  /* istanbul ignore file */
488
504
  /* tslint:disable */
@@ -659,6 +675,24 @@ exports.NotificationSourceTypeEnum = void 0;
659
675
  NotificationSourceTypeEnum["USERGROUP"] = "usergroup";
660
676
  })(exports.NotificationSourceTypeEnum || (exports.NotificationSourceTypeEnum = {}));
661
677
 
678
+ /* generated using openapi-typescript-codegen -- do not edit */
679
+ /* istanbul ignore file */
680
+ /* tslint:disable */
681
+ /* eslint-disable */
682
+ /**
683
+ * * `persons` - Persons
684
+ * * `organizations` - Organizations
685
+ * * `deals` - Deals
686
+ * * `activities` - Activities
687
+ */
688
+ exports.ObjectTypeEnum = void 0;
689
+ (function (ObjectTypeEnum) {
690
+ ObjectTypeEnum["PERSONS"] = "persons";
691
+ ObjectTypeEnum["ORGANIZATIONS"] = "organizations";
692
+ ObjectTypeEnum["DEALS"] = "deals";
693
+ ObjectTypeEnum["ACTIVITIES"] = "activities";
694
+ })(exports.ObjectTypeEnum || (exports.ObjectTypeEnum = {}));
695
+
662
696
  /* generated using openapi-typescript-codegen -- do not edit */
663
697
  /* istanbul ignore file */
664
698
  /* tslint:disable */
@@ -843,6 +877,20 @@ exports.RoleEnum = void 0;
843
877
  RoleEnum["DATASET_CURATOR"] = "dataset_curator";
844
878
  })(exports.RoleEnum || (exports.RoleEnum = {}));
845
879
 
880
+ /* generated using openapi-typescript-codegen -- do not edit */
881
+ /* istanbul ignore file */
882
+ /* tslint:disable */
883
+ /* eslint-disable */
884
+ /**
885
+ * * `table` - Table
886
+ * * `kanban` - Kanban
887
+ */
888
+ exports.SavedViewTypeEnum = void 0;
889
+ (function (SavedViewTypeEnum) {
890
+ SavedViewTypeEnum["TABLE"] = "table";
891
+ SavedViewTypeEnum["KANBAN"] = "kanban";
892
+ })(exports.SavedViewTypeEnum || (exports.SavedViewTypeEnum = {}));
893
+
846
894
  /* generated using openapi-typescript-codegen -- do not edit */
847
895
  /* istanbul ignore file */
848
896
  /* tslint:disable */
@@ -887,6 +935,22 @@ exports.StateEnum = void 0;
887
935
  StateEnum["EXPIRED"] = "expired";
888
936
  })(exports.StateEnum || (exports.StateEnum = {}));
889
937
 
938
+ /* generated using openapi-typescript-codegen -- do not edit */
939
+ /* istanbul ignore file */
940
+ /* tslint:disable */
941
+ /* eslint-disable */
942
+ /**
943
+ * * `open` - Open
944
+ * * `won` - Won
945
+ * * `lost` - Lost
946
+ */
947
+ exports.Status05cEnum = void 0;
948
+ (function (Status05cEnum) {
949
+ Status05cEnum["OPEN"] = "open";
950
+ Status05cEnum["WON"] = "won";
951
+ Status05cEnum["LOST"] = "lost";
952
+ })(exports.Status05cEnum || (exports.Status05cEnum = {}));
953
+
890
954
  /* generated using openapi-typescript-codegen -- do not edit */
891
955
  /* istanbul ignore file */
892
956
  /* tslint:disable */
@@ -23448,37 +23512,49 @@ class CredentialsService {
23448
23512
  class CrmService {
23449
23513
  /**
23450
23514
  * List activities
23451
- * Returns a paginated list of Activities in your Platform. Supports filtering by `type`, `is_done`, `owner`, `deal`, `person`, schedule-from ranges, and `metadata__has_key`.
23515
+ * Returns a paginated list of Activities in your Platform. Supports filtering by `type`, `is_done`, `owner`, `deal`, `person`, `organization`, schedule-from ranges, and `metadata__has_key`.
23452
23516
  *
23453
23517
  * **Required permission:** `Ibl.CRM/Activities/list`.
23454
23518
  * @returns PaginatedActivityList
23455
23519
  * @throws ApiError
23456
23520
  */
23457
23521
  static crmActivitiesList({
23522
+ dateFilter,
23458
23523
  deal,
23524
+ endDate,
23459
23525
  isDone,
23460
23526
  metadataHasKey,
23527
+ ordering,
23528
+ organization,
23461
23529
  owner,
23462
23530
  page,
23463
23531
  pageSize,
23464
23532
  person,
23465
23533
  scheduleFromGte,
23466
23534
  scheduleFromLte,
23535
+ search,
23536
+ startDate,
23467
23537
  type
23468
23538
  }) {
23469
23539
  return request(OpenAPI, {
23470
23540
  method: 'GET',
23471
23541
  url: '/api/crm/activities/',
23472
23542
  query: {
23543
+ 'date_filter': dateFilter,
23473
23544
  'deal': deal,
23545
+ 'end_date': endDate,
23474
23546
  'is_done': isDone,
23475
23547
  'metadata__has_key': metadataHasKey,
23548
+ 'ordering': ordering,
23549
+ 'organization': organization,
23476
23550
  'owner': owner,
23477
23551
  'page': page,
23478
23552
  'page_size': pageSize,
23479
23553
  'person': person,
23480
23554
  'schedule_from__gte': scheduleFromGte,
23481
23555
  'schedule_from__lte': scheduleFromLte,
23556
+ 'search': search,
23557
+ 'start_date': startDate,
23482
23558
  'type': type
23483
23559
  },
23484
23560
  errors: {
@@ -23489,7 +23565,7 @@ class CrmService {
23489
23565
  }
23490
23566
  /**
23491
23567
  * Create an activity
23492
- * Creates an Activity. Either `deal` or `person` must be supplied; both must belong to your Platform.
23568
+ * Creates an Activity. At least one of `deal`, `person` or `organization` must be supplied; all must belong to your Platform.
23493
23569
  *
23494
23570
  * **Required permission:** `Ibl.CRM/Activities/action`.
23495
23571
  * @returns Activity
@@ -23643,17 +23719,22 @@ class CrmService {
23643
23719
  static crmDealsList({
23644
23720
  createdAtGte,
23645
23721
  createdAtLte,
23722
+ dateFilter,
23723
+ endDate,
23646
23724
  expectedCloseDateGte,
23647
23725
  expectedCloseDateLte,
23648
23726
  metadataHasKey,
23727
+ ordering,
23649
23728
  organization,
23650
23729
  owner,
23651
23730
  page,
23652
23731
  pageSize,
23653
23732
  person,
23654
23733
  pipeline,
23734
+ search,
23655
23735
  source,
23656
23736
  stage,
23737
+ startDate,
23657
23738
  status,
23658
23739
  tags
23659
23740
  }) {
@@ -23663,17 +23744,22 @@ class CrmService {
23663
23744
  query: {
23664
23745
  'created_at__gte': createdAtGte,
23665
23746
  'created_at__lte': createdAtLte,
23747
+ 'date_filter': dateFilter,
23748
+ 'end_date': endDate,
23666
23749
  'expected_close_date__gte': expectedCloseDateGte,
23667
23750
  'expected_close_date__lte': expectedCloseDateLte,
23668
23751
  'metadata__has_key': metadataHasKey,
23752
+ 'ordering': ordering,
23669
23753
  'organization': organization,
23670
23754
  'owner': owner,
23671
23755
  'page': page,
23672
23756
  'page_size': pageSize,
23673
23757
  'person': person,
23674
23758
  'pipeline': pipeline,
23759
+ 'search': search,
23675
23760
  'source': source,
23676
23761
  'stage': stage,
23762
+ 'start_date': startDate,
23677
23763
  'status': status,
23678
23764
  'tags': tags
23679
23765
  },
@@ -23805,6 +23891,29 @@ class CrmService {
23805
23891
  }
23806
23892
  });
23807
23893
  }
23894
+ /**
23895
+ * Field-change history for this record
23896
+ * The record's audit entries (create and field updates), newest first, up to 200, each with `changes: {field: [old, new]}` as strings (a null reads `"None"`). The actor is the platform user who made the change. Bulk writes (a person merge, links a delete clears) leave no entry.
23897
+ *
23898
+ * **Required permission:** the record's `read` verb.
23899
+ * @returns HistoryEntry
23900
+ * @throws ApiError
23901
+ */
23902
+ static crmDealsHistoryList({
23903
+ id
23904
+ }) {
23905
+ return request(OpenAPI, {
23906
+ method: 'GET',
23907
+ url: '/api/crm/deals/{id}/history/',
23908
+ path: {
23909
+ 'id': id
23910
+ },
23911
+ errors: {
23912
+ 403: `Missing the record's \`read\` permission.`,
23913
+ 404: `Record not found.`
23914
+ }
23915
+ });
23916
+ }
23808
23917
  /**
23809
23918
  * Mark a deal as lost
23810
23919
  * Moves the Deal into a closed-lost stage and persists `lost_reason`. If `stage_code` is omitted, the first `is_lost=True` stage in the Deal's pipeline (by sort order) is used.
@@ -23939,6 +24048,169 @@ class CrmService {
23939
24048
  }
23940
24049
  });
23941
24050
  }
24051
+ /**
24052
+ * Deals grouped by stage (the board)
24053
+ * Every deal of one pipeline grouped by stage, in `sort_order`, with per-stage count, value and probability-weighted value. Each stage carries its newest `limit` deals; `has_more` says the stage holds more. The list filters (`owner`, `source`, `tags`, `search`, `status`, …) apply; `stage` is the grouping and `ordering` is ignored.
24054
+ *
24055
+ * **Required permission:** `Ibl.CRM/Deals/list`.
24056
+ * @returns DealBoard
24057
+ * @throws ApiError
24058
+ */
24059
+ static crmDealsBoardRetrieve({
24060
+ createdAtGte,
24061
+ createdAtLte,
24062
+ dateFilter,
24063
+ endDate,
24064
+ expectedCloseDateGte,
24065
+ expectedCloseDateLte,
24066
+ limit,
24067
+ metadataHasKey,
24068
+ organization,
24069
+ owner,
24070
+ person,
24071
+ pipeline,
24072
+ search,
24073
+ source,
24074
+ stage,
24075
+ startDate,
24076
+ status,
24077
+ tags
24078
+ }) {
24079
+ return request(OpenAPI, {
24080
+ method: 'GET',
24081
+ url: '/api/crm/deals/board/',
24082
+ query: {
24083
+ 'created_at__gte': createdAtGte,
24084
+ 'created_at__lte': createdAtLte,
24085
+ 'date_filter': dateFilter,
24086
+ 'end_date': endDate,
24087
+ 'expected_close_date__gte': expectedCloseDateGte,
24088
+ 'expected_close_date__lte': expectedCloseDateLte,
24089
+ 'limit': limit,
24090
+ 'metadata__has_key': metadataHasKey,
24091
+ 'organization': organization,
24092
+ 'owner': owner,
24093
+ 'person': person,
24094
+ 'pipeline': pipeline,
24095
+ 'search': search,
24096
+ 'source': source,
24097
+ 'stage': stage,
24098
+ 'start_date': startDate,
24099
+ 'status': status,
24100
+ 'tags': tags
24101
+ },
24102
+ errors: {
24103
+ 400: `Bad \`pipeline\` or \`limit\`.`,
24104
+ 403: `Missing required permission \`Ibl.CRM/Deals/list\`.`,
24105
+ 404: `Pipeline not found.`
24106
+ }
24107
+ });
24108
+ }
24109
+ /**
24110
+ * List my favorites
24111
+ * Your starred persons, organizations and deals in this Platform, newest first.
24112
+ *
24113
+ * **Required permission:** `Ibl.CRM/Favorites/list`.
24114
+ * @returns PaginatedFavoriteList
24115
+ * @throws ApiError
24116
+ */
24117
+ static crmFavoritesList({
24118
+ dateFilter,
24119
+ deal,
24120
+ endDate,
24121
+ ordering,
24122
+ organization,
24123
+ page,
24124
+ pageSize,
24125
+ person,
24126
+ startDate
24127
+ }) {
24128
+ return request(OpenAPI, {
24129
+ method: 'GET',
24130
+ url: '/api/crm/favorites/',
24131
+ query: {
24132
+ 'date_filter': dateFilter,
24133
+ 'deal': deal,
24134
+ 'end_date': endDate,
24135
+ 'ordering': ordering,
24136
+ 'organization': organization,
24137
+ 'page': page,
24138
+ 'page_size': pageSize,
24139
+ 'person': person,
24140
+ 'start_date': startDate
24141
+ },
24142
+ errors: {
24143
+ 401: `Authentication required.`,
24144
+ 403: `Missing required permission \`Ibl.CRM/Favorites/list\`.`
24145
+ }
24146
+ });
24147
+ }
24148
+ /**
24149
+ * Star a record
24150
+ * Stars exactly one of `person`, `organization`, `deal`. Starring a record you already starred returns the existing favorite with `200`. You also need the target's `read` permission.
24151
+ *
24152
+ * **Required permission:** `Ibl.CRM/Favorites/action`.
24153
+ * @returns Favorite
24154
+ * @throws ApiError
24155
+ */
24156
+ static crmFavoritesCreate({
24157
+ requestBody
24158
+ }) {
24159
+ return request(OpenAPI, {
24160
+ method: 'POST',
24161
+ url: '/api/crm/favorites/',
24162
+ body: requestBody,
24163
+ mediaType: 'application/json',
24164
+ errors: {
24165
+ 400: `Not exactly one target.`,
24166
+ 403: `Missing \`Ibl.CRM/Favorites/action\` or the target's \`read\`.`
24167
+ }
24168
+ });
24169
+ }
24170
+ /**
24171
+ * One of your favorites
24172
+ * **Required permission:** `Ibl.CRM/Favorites/read`.
24173
+ * @returns Favorite
24174
+ * @throws ApiError
24175
+ */
24176
+ static crmFavoritesRetrieve({
24177
+ id
24178
+ }) {
24179
+ return request(OpenAPI, {
24180
+ method: 'GET',
24181
+ url: '/api/crm/favorites/{id}/',
24182
+ path: {
24183
+ 'id': id
24184
+ },
24185
+ errors: {
24186
+ 403: `Missing required permission \`Ibl.CRM/Favorites/read\`.`,
24187
+ 404: `Favorite not found.`
24188
+ }
24189
+ });
24190
+ }
24191
+ /**
24192
+ * Unstar a record
24193
+ * Removes one of your favorites.
24194
+ *
24195
+ * **Required permission:** `Ibl.CRM/Favorites/delete`.
24196
+ * @returns void
24197
+ * @throws ApiError
24198
+ */
24199
+ static crmFavoritesDestroy({
24200
+ id
24201
+ }) {
24202
+ return request(OpenAPI, {
24203
+ method: 'DELETE',
24204
+ url: '/api/crm/favorites/{id}/',
24205
+ path: {
24206
+ 'id': id
24207
+ },
24208
+ errors: {
24209
+ 403: `Missing required permission \`Ibl.CRM/Favorites/delete\`.`,
24210
+ 404: `Favorite not found.`
24211
+ }
24212
+ });
24213
+ }
23942
24214
  /**
23943
24215
  * List lead sources
23944
24216
  * Returns a paginated list of LeadSources in your Platform.
@@ -23949,18 +24221,28 @@ class CrmService {
23949
24221
  */
23950
24222
  static crmLeadSourcesList({
23951
24223
  code,
24224
+ dateFilter,
24225
+ endDate,
23952
24226
  name,
24227
+ ordering,
23953
24228
  page,
23954
- pageSize
24229
+ pageSize,
24230
+ search,
24231
+ startDate
23955
24232
  }) {
23956
24233
  return request(OpenAPI, {
23957
24234
  method: 'GET',
23958
24235
  url: '/api/crm/lead-sources/',
23959
24236
  query: {
23960
24237
  'code': code,
24238
+ 'date_filter': dateFilter,
24239
+ 'end_date': endDate,
23961
24240
  'name': name,
24241
+ 'ordering': ordering,
23962
24242
  'page': page,
23963
- 'page_size': pageSize
24243
+ 'page_size': pageSize,
24244
+ 'search': search,
24245
+ 'start_date': startDate
23964
24246
  },
23965
24247
  errors: {
23966
24248
  401: `Authentication required.`,
@@ -24099,20 +24381,30 @@ class CrmService {
24099
24381
  * @throws ApiError
24100
24382
  */
24101
24383
  static crmOrganizationsList({
24384
+ dateFilter,
24385
+ endDate,
24102
24386
  name,
24387
+ ordering,
24103
24388
  owner,
24104
24389
  page,
24105
24390
  pageSize,
24391
+ search,
24392
+ startDate,
24106
24393
  tags
24107
24394
  }) {
24108
24395
  return request(OpenAPI, {
24109
24396
  method: 'GET',
24110
24397
  url: '/api/crm/organizations/',
24111
24398
  query: {
24399
+ 'date_filter': dateFilter,
24400
+ 'end_date': endDate,
24112
24401
  'name': name,
24402
+ 'ordering': ordering,
24113
24403
  'owner': owner,
24114
24404
  'page': page,
24115
24405
  'page_size': pageSize,
24406
+ 'search': search,
24407
+ 'start_date': startDate,
24116
24408
  'tags': tags
24117
24409
  },
24118
24410
  errors: {
@@ -24222,7 +24514,7 @@ class CrmService {
24222
24514
  }
24223
24515
  /**
24224
24516
  * Delete an organization
24225
- * Deletes the organization. Any persons linked to it are kept; their organization reference is cleared.
24517
+ * Deletes the organization. Persons and deals linked to it are kept with the reference cleared; activities attached only to it are deleted, the rest just lose the link.
24226
24518
  *
24227
24519
  * **Required permission:** `Ibl.CRM/Organizations/delete`.
24228
24520
  * @returns void
@@ -24243,6 +24535,29 @@ class CrmService {
24243
24535
  }
24244
24536
  });
24245
24537
  }
24538
+ /**
24539
+ * Field-change history for this record
24540
+ * The record's audit entries (create and field updates), newest first, up to 200, each with `changes: {field: [old, new]}` as strings (a null reads `"None"`). The actor is the platform user who made the change. Bulk writes (a person merge, links a delete clears) leave no entry.
24541
+ *
24542
+ * **Required permission:** the record's `read` verb.
24543
+ * @returns HistoryEntry
24544
+ * @throws ApiError
24545
+ */
24546
+ static crmOrganizationsHistoryList({
24547
+ id
24548
+ }) {
24549
+ return request(OpenAPI, {
24550
+ method: 'GET',
24551
+ url: '/api/crm/organizations/{id}/history/',
24552
+ path: {
24553
+ 'id': id
24554
+ },
24555
+ errors: {
24556
+ 403: `Missing the record's \`read\` permission.`,
24557
+ 404: `Record not found.`
24558
+ }
24559
+ });
24560
+ }
24246
24561
  /**
24247
24562
  * Attach a tag to this record
24248
24563
  * 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.
@@ -24296,6 +24611,38 @@ class CrmService {
24296
24611
  }
24297
24612
  });
24298
24613
  }
24614
+ /**
24615
+ * CRM overview
24616
+ * Dashboard figures: person and organization counts, open-deal count and value (plain and probability-weighted), this month's won / lost deals, open deals per stage of one pipeline, six months of won / lost history, and activities due today or overdue. Sections you may not `list` are omitted.
24617
+ *
24618
+ * `date_filter` (or `start_date` + `end_date`) adds `period_*` siblings for that window.
24619
+ *
24620
+ * **Required permission:** the `list` verb of each section.
24621
+ * @returns Overview
24622
+ * @throws ApiError
24623
+ */
24624
+ static crmOverviewRetrieve({
24625
+ dateFilter,
24626
+ endDate,
24627
+ pipeline,
24628
+ startDate
24629
+ }) {
24630
+ return request(OpenAPI, {
24631
+ method: 'GET',
24632
+ url: '/api/crm/overview/',
24633
+ query: {
24634
+ 'date_filter': dateFilter,
24635
+ 'end_date': endDate,
24636
+ 'pipeline': pipeline,
24637
+ 'start_date': startDate
24638
+ },
24639
+ errors: {
24640
+ 400: `Invalid window or pipeline parameter.`,
24641
+ 403: `No CRM list permission.`,
24642
+ 404: `Pipeline not found.`
24643
+ }
24644
+ });
24645
+ }
24299
24646
  /**
24300
24647
  * List persons
24301
24648
  * 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`.
@@ -24305,28 +24652,40 @@ class CrmService {
24305
24652
  * @throws ApiError
24306
24653
  */
24307
24654
  static crmPersonsList({
24655
+ active,
24308
24656
  createdAtGte,
24309
24657
  createdAtLte,
24658
+ dateFilter,
24659
+ endDate,
24310
24660
  lifecycleStage,
24311
24661
  metadataHasKey,
24662
+ ordering,
24312
24663
  organization,
24313
24664
  owner,
24314
24665
  page,
24315
24666
  pageSize,
24667
+ search,
24668
+ startDate,
24316
24669
  tags
24317
24670
  }) {
24318
24671
  return request(OpenAPI, {
24319
24672
  method: 'GET',
24320
24673
  url: '/api/crm/persons/',
24321
24674
  query: {
24675
+ 'active': active,
24322
24676
  'created_at__gte': createdAtGte,
24323
24677
  'created_at__lte': createdAtLte,
24678
+ 'date_filter': dateFilter,
24679
+ 'end_date': endDate,
24324
24680
  'lifecycle_stage': lifecycleStage,
24325
24681
  'metadata__has_key': metadataHasKey,
24682
+ 'ordering': ordering,
24326
24683
  'organization': organization,
24327
24684
  'owner': owner,
24328
24685
  'page': page,
24329
24686
  'page_size': pageSize,
24687
+ 'search': search,
24688
+ 'start_date': startDate,
24330
24689
  'tags': tags
24331
24690
  },
24332
24691
  errors: {
@@ -24436,7 +24795,7 @@ class CrmService {
24436
24795
  }
24437
24796
  /**
24438
24797
  * Delete a person
24439
- * Deletes the person.
24798
+ * Deletes the person. Fails with `409 Conflict` if any Deal still references it.
24440
24799
  *
24441
24800
  * **Required permission:** `Ibl.CRM/Persons/delete`.
24442
24801
  * @returns void
@@ -24453,7 +24812,31 @@ class CrmService {
24453
24812
  },
24454
24813
  errors: {
24455
24814
  403: `Missing required permission \`Ibl.CRM/Persons/delete\`.`,
24456
- 404: `Person not found.`
24815
+ 404: `Person not found.`,
24816
+ 409: `Person still has Deals attached.`
24817
+ }
24818
+ });
24819
+ }
24820
+ /**
24821
+ * Field-change history for this record
24822
+ * The record's audit entries (create and field updates), newest first, up to 200, each with `changes: {field: [old, new]}` as strings (a null reads `"None"`). The actor is the platform user who made the change. Bulk writes (a person merge, links a delete clears) leave no entry.
24823
+ *
24824
+ * **Required permission:** the record's `read` verb.
24825
+ * @returns HistoryEntry
24826
+ * @throws ApiError
24827
+ */
24828
+ static crmPersonsHistoryList({
24829
+ id
24830
+ }) {
24831
+ return request(OpenAPI, {
24832
+ method: 'GET',
24833
+ url: '/api/crm/persons/{id}/history/',
24834
+ path: {
24835
+ 'id': id
24836
+ },
24837
+ errors: {
24838
+ 403: `Missing the record's \`read\` permission.`,
24839
+ 404: `Record not found.`
24457
24840
  }
24458
24841
  });
24459
24842
  }
@@ -24604,20 +24987,30 @@ class CrmService {
24604
24987
  */
24605
24988
  static crmPipelinesList({
24606
24989
  code,
24990
+ dateFilter,
24991
+ endDate,
24607
24992
  isDefault,
24608
24993
  name,
24994
+ ordering,
24609
24995
  page,
24610
- pageSize
24996
+ pageSize,
24997
+ search,
24998
+ startDate
24611
24999
  }) {
24612
25000
  return request(OpenAPI, {
24613
25001
  method: 'GET',
24614
25002
  url: '/api/crm/pipelines/',
24615
25003
  query: {
24616
25004
  'code': code,
25005
+ 'date_filter': dateFilter,
25006
+ 'end_date': endDate,
24617
25007
  'is_default': isDefault,
24618
25008
  'name': name,
25009
+ 'ordering': ordering,
24619
25010
  'page': page,
24620
- 'page_size': pageSize
25011
+ 'page_size': pageSize,
25012
+ 'search': search,
25013
+ 'start_date': startDate
24621
25014
  },
24622
25015
  errors: {
24623
25016
  401: `Authentication required.`,
@@ -24658,10 +25051,15 @@ class CrmService {
24658
25051
  static crmPipelinesStagesList({
24659
25052
  pipelinePk,
24660
25053
  code,
25054
+ dateFilter,
25055
+ endDate,
24661
25056
  isLost,
24662
25057
  isWon,
25058
+ ordering,
24663
25059
  page,
24664
- pageSize
25060
+ pageSize,
25061
+ search,
25062
+ startDate
24665
25063
  }) {
24666
25064
  return request(OpenAPI, {
24667
25065
  method: 'GET',
@@ -24671,10 +25069,15 @@ class CrmService {
24671
25069
  },
24672
25070
  query: {
24673
25071
  'code': code,
25072
+ 'date_filter': dateFilter,
25073
+ 'end_date': endDate,
24674
25074
  'is_lost': isLost,
24675
25075
  'is_won': isWon,
25076
+ 'ordering': ordering,
24676
25077
  'page': page,
24677
- 'page_size': pageSize
25078
+ 'page_size': pageSize,
25079
+ 'search': search,
25080
+ 'start_date': startDate
24678
25081
  },
24679
25082
  errors: {
24680
25083
  403: `Missing required permission \`Ibl.CRM/Pipelines/list\`.`,
@@ -24919,6 +25322,58 @@ class CrmService {
24919
25322
  }
24920
25323
  });
24921
25324
  }
25325
+ /**
25326
+ * Reorder a pipeline's stages
25327
+ * Sets `sort_order` on every stage of the Pipeline from the position of its id in `order`, in one transaction. `order` must list each stage of this Pipeline exactly once.
25328
+ *
25329
+ * **Required permission:** `Ibl.CRM/Pipelines/write`.
25330
+ * @returns Pipeline
25331
+ * @throws ApiError
25332
+ */
25333
+ static crmPipelinesStagesReorderCreate({
25334
+ id,
25335
+ requestBody
25336
+ }) {
25337
+ return request(OpenAPI, {
25338
+ method: 'POST',
25339
+ url: '/api/crm/pipelines/{id}/stages/reorder/',
25340
+ path: {
25341
+ 'id': id
25342
+ },
25343
+ body: requestBody,
25344
+ mediaType: 'application/json',
25345
+ errors: {
25346
+ 400: `\`order\` is not a permutation of the stages.`,
25347
+ 403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`,
25348
+ 404: `Pipeline not found.`
25349
+ }
25350
+ });
25351
+ }
25352
+ /**
25353
+ * Search persons, organizations and deals
25354
+ * Case-insensitive substring match on person name / email / job title, organization name and deal title, up to `limit` rows per bucket. A bucket is present only when you hold that resource's `list` permission.
25355
+ *
25356
+ * **Required permission:** `Ibl.CRM/Persons/list`, `Ibl.CRM/Organizations/list` or `Ibl.CRM/Deals/list` (at least one).
25357
+ * @returns SearchResponse
25358
+ * @throws ApiError
25359
+ */
25360
+ static crmSearchRetrieve({
25361
+ q,
25362
+ limit
25363
+ }) {
25364
+ return request(OpenAPI, {
25365
+ method: 'GET',
25366
+ url: '/api/crm/search/',
25367
+ query: {
25368
+ 'limit': limit,
25369
+ 'q': q
25370
+ },
25371
+ errors: {
25372
+ 400: `\`q\` missing or \`limit\` out of range.`,
25373
+ 403: `No CRM list permission.`
25374
+ }
25375
+ });
25376
+ }
24922
25377
  /**
24923
25378
  * List tags
24924
25379
  * 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.
@@ -24930,9 +25385,14 @@ class CrmService {
24930
25385
  static crmTagsList({
24931
25386
  createdAtGte,
24932
25387
  createdAtLte,
25388
+ dateFilter,
25389
+ endDate,
24933
25390
  name,
25391
+ ordering,
24934
25392
  page,
24935
- pageSize
25393
+ pageSize,
25394
+ search,
25395
+ startDate
24936
25396
  }) {
24937
25397
  return request(OpenAPI, {
24938
25398
  method: 'GET',
@@ -24940,9 +25400,14 @@ class CrmService {
24940
25400
  query: {
24941
25401
  'created_at__gte': createdAtGte,
24942
25402
  'created_at__lte': createdAtLte,
25403
+ 'date_filter': dateFilter,
25404
+ 'end_date': endDate,
24943
25405
  'name': name,
25406
+ 'ordering': ordering,
24944
25407
  'page': page,
24945
- 'page_size': pageSize
25408
+ 'page_size': pageSize,
25409
+ 'search': search,
25410
+ 'start_date': startDate
24946
25411
  },
24947
25412
  errors: {
24948
25413
  401: `Authentication required.`,
@@ -25072,6 +25537,159 @@ class CrmService {
25072
25537
  }
25073
25538
  });
25074
25539
  }
25540
+ /**
25541
+ * List my saved views
25542
+ * Your saved views in this Platform; filter with `object_type`.
25543
+ *
25544
+ * **Required permission:** `Ibl.CRM/Views/list`.
25545
+ * @returns PaginatedSavedViewList
25546
+ * @throws ApiError
25547
+ */
25548
+ static crmViewsList({
25549
+ dateFilter,
25550
+ endDate,
25551
+ objectType,
25552
+ ordering,
25553
+ page,
25554
+ pageSize,
25555
+ search,
25556
+ startDate,
25557
+ type
25558
+ }) {
25559
+ return request(OpenAPI, {
25560
+ method: 'GET',
25561
+ url: '/api/crm/views/',
25562
+ query: {
25563
+ 'date_filter': dateFilter,
25564
+ 'end_date': endDate,
25565
+ 'object_type': objectType,
25566
+ 'ordering': ordering,
25567
+ 'page': page,
25568
+ 'page_size': pageSize,
25569
+ 'search': search,
25570
+ 'start_date': startDate,
25571
+ 'type': type
25572
+ },
25573
+ errors: {
25574
+ 401: `Authentication required.`,
25575
+ 403: `Missing required permission \`Ibl.CRM/Views/list\`.`
25576
+ }
25577
+ });
25578
+ }
25579
+ /**
25580
+ * Save a view
25581
+ * Stores columns, filters, sorts and (for deals) a kanban grouping under a name unique to you and the list.
25582
+ *
25583
+ * **Required permission:** `Ibl.CRM/Views/action`.
25584
+ * @returns SavedView
25585
+ * @throws ApiError
25586
+ */
25587
+ static crmViewsCreate({
25588
+ requestBody
25589
+ }) {
25590
+ return request(OpenAPI, {
25591
+ method: 'POST',
25592
+ url: '/api/crm/views/',
25593
+ body: requestBody,
25594
+ mediaType: 'application/json',
25595
+ errors: {
25596
+ 400: `Validation error.`,
25597
+ 403: `Missing required permission \`Ibl.CRM/Views/action\`.`
25598
+ }
25599
+ });
25600
+ }
25601
+ /**
25602
+ * Retrieve a saved view
25603
+ * **Required permission:** `Ibl.CRM/Views/read`.
25604
+ * @returns SavedView
25605
+ * @throws ApiError
25606
+ */
25607
+ static crmViewsRetrieve({
25608
+ id
25609
+ }) {
25610
+ return request(OpenAPI, {
25611
+ method: 'GET',
25612
+ url: '/api/crm/views/{id}/',
25613
+ path: {
25614
+ 'id': id
25615
+ },
25616
+ errors: {
25617
+ 403: `Missing required permission \`Ibl.CRM/Views/read\`.`,
25618
+ 404: `View not found.`
25619
+ }
25620
+ });
25621
+ }
25622
+ /**
25623
+ * Replace a saved view
25624
+ * **Required permission:** `Ibl.CRM/Views/write`.
25625
+ * @returns SavedView
25626
+ * @throws ApiError
25627
+ */
25628
+ static crmViewsUpdate({
25629
+ id,
25630
+ requestBody
25631
+ }) {
25632
+ return request(OpenAPI, {
25633
+ method: 'PUT',
25634
+ url: '/api/crm/views/{id}/',
25635
+ path: {
25636
+ 'id': id
25637
+ },
25638
+ body: requestBody,
25639
+ mediaType: 'application/json',
25640
+ errors: {
25641
+ 400: `Validation error.`,
25642
+ 403: `Missing required permission \`Ibl.CRM/Views/write\`.`,
25643
+ 404: `View not found.`
25644
+ }
25645
+ });
25646
+ }
25647
+ /**
25648
+ * Update a saved view
25649
+ * **Required permission:** `Ibl.CRM/Views/write`.
25650
+ * @returns SavedView
25651
+ * @throws ApiError
25652
+ */
25653
+ static crmViewsPartialUpdate({
25654
+ id,
25655
+ requestBody
25656
+ }) {
25657
+ return request(OpenAPI, {
25658
+ method: 'PATCH',
25659
+ url: '/api/crm/views/{id}/',
25660
+ path: {
25661
+ 'id': id
25662
+ },
25663
+ body: requestBody,
25664
+ mediaType: 'application/json',
25665
+ errors: {
25666
+ 400: `Validation error.`,
25667
+ 403: `Missing required permission \`Ibl.CRM/Views/write\`.`,
25668
+ 404: `View not found.`
25669
+ }
25670
+ });
25671
+ }
25672
+ /**
25673
+ * Delete a saved view
25674
+ * **Required permission:** `Ibl.CRM/Views/delete`.
25675
+ * @returns void
25676
+ * @throws ApiError
25677
+ */
25678
+ static crmViewsDestroy({
25679
+ id
25680
+ }) {
25681
+ return request(OpenAPI, {
25682
+ method: 'DELETE',
25683
+ url: '/api/crm/views/{id}/',
25684
+ path: {
25685
+ 'id': id
25686
+ },
25687
+ errors: {
25688
+ 403: `Missing required permission \`Ibl.CRM/Views/delete\`.`,
25689
+ 404: `View not found.`
25690
+ }
25691
+ });
25692
+ }
25075
25693
  }
25076
25694
 
25077
25695
  class CustomDomainsService {