@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.umd.js CHANGED
@@ -114,7 +114,7 @@
114
114
 
115
115
  const OpenAPI = {
116
116
  BASE: 'https://base.manager.iblai.app',
117
- VERSION: '4.415.0-core',
117
+ VERSION: '4.416.0-core',
118
118
  WITH_CREDENTIALS: false,
119
119
  CREDENTIALS: 'include',
120
120
  TOKEN: undefined,
@@ -273,22 +273,6 @@
273
273
  CreditTransactionHistoryStatusEnum["CANCELLED"] = "cancelled";
274
274
  })(exports.CreditTransactionHistoryStatusEnum || (exports.CreditTransactionHistoryStatusEnum = {}));
275
275
 
276
- /* generated using openapi-typescript-codegen -- do not edit */
277
- /* istanbul ignore file */
278
- /* tslint:disable */
279
- /* eslint-disable */
280
- /**
281
- * * `open` - Open
282
- * * `won` - Won
283
- * * `lost` - Lost
284
- */
285
- exports.DealStatusEnum = void 0;
286
- (function (DealStatusEnum) {
287
- DealStatusEnum["OPEN"] = "open";
288
- DealStatusEnum["WON"] = "won";
289
- DealStatusEnum["LOST"] = "lost";
290
- })(exports.DealStatusEnum || (exports.DealStatusEnum = {}));
291
-
292
276
  /* generated using openapi-typescript-codegen -- do not edit */
293
277
  /* istanbul ignore file */
294
278
  /* tslint:disable */
@@ -303,6 +287,20 @@
303
287
  DirectionEnum["IMPORT"] = "import";
304
288
  })(exports.DirectionEnum || (exports.DirectionEnum = {}));
305
289
 
290
+ /* generated using openapi-typescript-codegen -- do not edit */
291
+ /* istanbul ignore file */
292
+ /* tslint:disable */
293
+ /* eslint-disable */
294
+ /**
295
+ * * `asc` - asc
296
+ * * `desc` - desc
297
+ */
298
+ exports.DirEnum = void 0;
299
+ (function (DirEnum) {
300
+ DirEnum["ASC"] = "asc";
301
+ DirEnum["DESC"] = "desc";
302
+ })(exports.DirEnum || (exports.DirEnum = {}));
303
+
306
304
  /* generated using openapi-typescript-codegen -- do not edit */
307
305
  /* istanbul ignore file */
308
306
  /* tslint:disable */
@@ -487,6 +485,24 @@
487
485
  GrandfatheringStrategyEnum["REQUIRE_SUBSCRIPTION"] = "require_subscription";
488
486
  })(exports.GrandfatheringStrategyEnum || (exports.GrandfatheringStrategyEnum = {}));
489
487
 
488
+ /* generated using openapi-typescript-codegen -- do not edit */
489
+ /* istanbul ignore file */
490
+ /* tslint:disable */
491
+ /* eslint-disable */
492
+ /**
493
+ * * `create` - create
494
+ * * `update` - update
495
+ * * `delete` - delete
496
+ * * `access` - access
497
+ */
498
+ exports.HistoryEntryActionEnum = void 0;
499
+ (function (HistoryEntryActionEnum) {
500
+ HistoryEntryActionEnum["CREATE"] = "create";
501
+ HistoryEntryActionEnum["UPDATE"] = "update";
502
+ HistoryEntryActionEnum["DELETE"] = "delete";
503
+ HistoryEntryActionEnum["ACCESS"] = "access";
504
+ })(exports.HistoryEntryActionEnum || (exports.HistoryEntryActionEnum = {}));
505
+
490
506
  /* generated using openapi-typescript-codegen -- do not edit */
491
507
  /* istanbul ignore file */
492
508
  /* tslint:disable */
@@ -663,6 +679,24 @@
663
679
  NotificationSourceTypeEnum["USERGROUP"] = "usergroup";
664
680
  })(exports.NotificationSourceTypeEnum || (exports.NotificationSourceTypeEnum = {}));
665
681
 
682
+ /* generated using openapi-typescript-codegen -- do not edit */
683
+ /* istanbul ignore file */
684
+ /* tslint:disable */
685
+ /* eslint-disable */
686
+ /**
687
+ * * `persons` - Persons
688
+ * * `organizations` - Organizations
689
+ * * `deals` - Deals
690
+ * * `activities` - Activities
691
+ */
692
+ exports.ObjectTypeEnum = void 0;
693
+ (function (ObjectTypeEnum) {
694
+ ObjectTypeEnum["PERSONS"] = "persons";
695
+ ObjectTypeEnum["ORGANIZATIONS"] = "organizations";
696
+ ObjectTypeEnum["DEALS"] = "deals";
697
+ ObjectTypeEnum["ACTIVITIES"] = "activities";
698
+ })(exports.ObjectTypeEnum || (exports.ObjectTypeEnum = {}));
699
+
666
700
  /* generated using openapi-typescript-codegen -- do not edit */
667
701
  /* istanbul ignore file */
668
702
  /* tslint:disable */
@@ -847,6 +881,20 @@
847
881
  RoleEnum["DATASET_CURATOR"] = "dataset_curator";
848
882
  })(exports.RoleEnum || (exports.RoleEnum = {}));
849
883
 
884
+ /* generated using openapi-typescript-codegen -- do not edit */
885
+ /* istanbul ignore file */
886
+ /* tslint:disable */
887
+ /* eslint-disable */
888
+ /**
889
+ * * `table` - Table
890
+ * * `kanban` - Kanban
891
+ */
892
+ exports.SavedViewTypeEnum = void 0;
893
+ (function (SavedViewTypeEnum) {
894
+ SavedViewTypeEnum["TABLE"] = "table";
895
+ SavedViewTypeEnum["KANBAN"] = "kanban";
896
+ })(exports.SavedViewTypeEnum || (exports.SavedViewTypeEnum = {}));
897
+
850
898
  /* generated using openapi-typescript-codegen -- do not edit */
851
899
  /* istanbul ignore file */
852
900
  /* tslint:disable */
@@ -891,6 +939,22 @@
891
939
  StateEnum["EXPIRED"] = "expired";
892
940
  })(exports.StateEnum || (exports.StateEnum = {}));
893
941
 
942
+ /* generated using openapi-typescript-codegen -- do not edit */
943
+ /* istanbul ignore file */
944
+ /* tslint:disable */
945
+ /* eslint-disable */
946
+ /**
947
+ * * `open` - Open
948
+ * * `won` - Won
949
+ * * `lost` - Lost
950
+ */
951
+ exports.Status05cEnum = void 0;
952
+ (function (Status05cEnum) {
953
+ Status05cEnum["OPEN"] = "open";
954
+ Status05cEnum["WON"] = "won";
955
+ Status05cEnum["LOST"] = "lost";
956
+ })(exports.Status05cEnum || (exports.Status05cEnum = {}));
957
+
894
958
  /* generated using openapi-typescript-codegen -- do not edit */
895
959
  /* istanbul ignore file */
896
960
  /* tslint:disable */
@@ -23452,37 +23516,49 @@
23452
23516
  class CrmService {
23453
23517
  /**
23454
23518
  * List activities
23455
- * 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`.
23519
+ * 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`.
23456
23520
  *
23457
23521
  * **Required permission:** `Ibl.CRM/Activities/list`.
23458
23522
  * @returns PaginatedActivityList
23459
23523
  * @throws ApiError
23460
23524
  */
23461
23525
  static crmActivitiesList({
23526
+ dateFilter,
23462
23527
  deal,
23528
+ endDate,
23463
23529
  isDone,
23464
23530
  metadataHasKey,
23531
+ ordering,
23532
+ organization,
23465
23533
  owner,
23466
23534
  page,
23467
23535
  pageSize,
23468
23536
  person,
23469
23537
  scheduleFromGte,
23470
23538
  scheduleFromLte,
23539
+ search,
23540
+ startDate,
23471
23541
  type
23472
23542
  }) {
23473
23543
  return request(OpenAPI, {
23474
23544
  method: 'GET',
23475
23545
  url: '/api/crm/activities/',
23476
23546
  query: {
23547
+ 'date_filter': dateFilter,
23477
23548
  'deal': deal,
23549
+ 'end_date': endDate,
23478
23550
  'is_done': isDone,
23479
23551
  'metadata__has_key': metadataHasKey,
23552
+ 'ordering': ordering,
23553
+ 'organization': organization,
23480
23554
  'owner': owner,
23481
23555
  'page': page,
23482
23556
  'page_size': pageSize,
23483
23557
  'person': person,
23484
23558
  'schedule_from__gte': scheduleFromGte,
23485
23559
  'schedule_from__lte': scheduleFromLte,
23560
+ 'search': search,
23561
+ 'start_date': startDate,
23486
23562
  'type': type
23487
23563
  },
23488
23564
  errors: {
@@ -23493,7 +23569,7 @@
23493
23569
  }
23494
23570
  /**
23495
23571
  * Create an activity
23496
- * Creates an Activity. Either `deal` or `person` must be supplied; both must belong to your Platform.
23572
+ * Creates an Activity. At least one of `deal`, `person` or `organization` must be supplied; all must belong to your Platform.
23497
23573
  *
23498
23574
  * **Required permission:** `Ibl.CRM/Activities/action`.
23499
23575
  * @returns Activity
@@ -23647,17 +23723,22 @@
23647
23723
  static crmDealsList({
23648
23724
  createdAtGte,
23649
23725
  createdAtLte,
23726
+ dateFilter,
23727
+ endDate,
23650
23728
  expectedCloseDateGte,
23651
23729
  expectedCloseDateLte,
23652
23730
  metadataHasKey,
23731
+ ordering,
23653
23732
  organization,
23654
23733
  owner,
23655
23734
  page,
23656
23735
  pageSize,
23657
23736
  person,
23658
23737
  pipeline,
23738
+ search,
23659
23739
  source,
23660
23740
  stage,
23741
+ startDate,
23661
23742
  status,
23662
23743
  tags
23663
23744
  }) {
@@ -23667,17 +23748,22 @@
23667
23748
  query: {
23668
23749
  'created_at__gte': createdAtGte,
23669
23750
  'created_at__lte': createdAtLte,
23751
+ 'date_filter': dateFilter,
23752
+ 'end_date': endDate,
23670
23753
  'expected_close_date__gte': expectedCloseDateGte,
23671
23754
  'expected_close_date__lte': expectedCloseDateLte,
23672
23755
  'metadata__has_key': metadataHasKey,
23756
+ 'ordering': ordering,
23673
23757
  'organization': organization,
23674
23758
  'owner': owner,
23675
23759
  'page': page,
23676
23760
  'page_size': pageSize,
23677
23761
  'person': person,
23678
23762
  'pipeline': pipeline,
23763
+ 'search': search,
23679
23764
  'source': source,
23680
23765
  'stage': stage,
23766
+ 'start_date': startDate,
23681
23767
  'status': status,
23682
23768
  'tags': tags
23683
23769
  },
@@ -23809,6 +23895,29 @@
23809
23895
  }
23810
23896
  });
23811
23897
  }
23898
+ /**
23899
+ * Field-change history for this record
23900
+ * 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.
23901
+ *
23902
+ * **Required permission:** the record's `read` verb.
23903
+ * @returns HistoryEntry
23904
+ * @throws ApiError
23905
+ */
23906
+ static crmDealsHistoryList({
23907
+ id
23908
+ }) {
23909
+ return request(OpenAPI, {
23910
+ method: 'GET',
23911
+ url: '/api/crm/deals/{id}/history/',
23912
+ path: {
23913
+ 'id': id
23914
+ },
23915
+ errors: {
23916
+ 403: `Missing the record's \`read\` permission.`,
23917
+ 404: `Record not found.`
23918
+ }
23919
+ });
23920
+ }
23812
23921
  /**
23813
23922
  * Mark a deal as lost
23814
23923
  * 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.
@@ -23943,6 +24052,169 @@
23943
24052
  }
23944
24053
  });
23945
24054
  }
24055
+ /**
24056
+ * Deals grouped by stage (the board)
24057
+ * 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.
24058
+ *
24059
+ * **Required permission:** `Ibl.CRM/Deals/list`.
24060
+ * @returns DealBoard
24061
+ * @throws ApiError
24062
+ */
24063
+ static crmDealsBoardRetrieve({
24064
+ createdAtGte,
24065
+ createdAtLte,
24066
+ dateFilter,
24067
+ endDate,
24068
+ expectedCloseDateGte,
24069
+ expectedCloseDateLte,
24070
+ limit,
24071
+ metadataHasKey,
24072
+ organization,
24073
+ owner,
24074
+ person,
24075
+ pipeline,
24076
+ search,
24077
+ source,
24078
+ stage,
24079
+ startDate,
24080
+ status,
24081
+ tags
24082
+ }) {
24083
+ return request(OpenAPI, {
24084
+ method: 'GET',
24085
+ url: '/api/crm/deals/board/',
24086
+ query: {
24087
+ 'created_at__gte': createdAtGte,
24088
+ 'created_at__lte': createdAtLte,
24089
+ 'date_filter': dateFilter,
24090
+ 'end_date': endDate,
24091
+ 'expected_close_date__gte': expectedCloseDateGte,
24092
+ 'expected_close_date__lte': expectedCloseDateLte,
24093
+ 'limit': limit,
24094
+ 'metadata__has_key': metadataHasKey,
24095
+ 'organization': organization,
24096
+ 'owner': owner,
24097
+ 'person': person,
24098
+ 'pipeline': pipeline,
24099
+ 'search': search,
24100
+ 'source': source,
24101
+ 'stage': stage,
24102
+ 'start_date': startDate,
24103
+ 'status': status,
24104
+ 'tags': tags
24105
+ },
24106
+ errors: {
24107
+ 400: `Bad \`pipeline\` or \`limit\`.`,
24108
+ 403: `Missing required permission \`Ibl.CRM/Deals/list\`.`,
24109
+ 404: `Pipeline not found.`
24110
+ }
24111
+ });
24112
+ }
24113
+ /**
24114
+ * List my favorites
24115
+ * Your starred persons, organizations and deals in this Platform, newest first.
24116
+ *
24117
+ * **Required permission:** `Ibl.CRM/Favorites/list`.
24118
+ * @returns PaginatedFavoriteList
24119
+ * @throws ApiError
24120
+ */
24121
+ static crmFavoritesList({
24122
+ dateFilter,
24123
+ deal,
24124
+ endDate,
24125
+ ordering,
24126
+ organization,
24127
+ page,
24128
+ pageSize,
24129
+ person,
24130
+ startDate
24131
+ }) {
24132
+ return request(OpenAPI, {
24133
+ method: 'GET',
24134
+ url: '/api/crm/favorites/',
24135
+ query: {
24136
+ 'date_filter': dateFilter,
24137
+ 'deal': deal,
24138
+ 'end_date': endDate,
24139
+ 'ordering': ordering,
24140
+ 'organization': organization,
24141
+ 'page': page,
24142
+ 'page_size': pageSize,
24143
+ 'person': person,
24144
+ 'start_date': startDate
24145
+ },
24146
+ errors: {
24147
+ 401: `Authentication required.`,
24148
+ 403: `Missing required permission \`Ibl.CRM/Favorites/list\`.`
24149
+ }
24150
+ });
24151
+ }
24152
+ /**
24153
+ * Star a record
24154
+ * 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.
24155
+ *
24156
+ * **Required permission:** `Ibl.CRM/Favorites/action`.
24157
+ * @returns Favorite
24158
+ * @throws ApiError
24159
+ */
24160
+ static crmFavoritesCreate({
24161
+ requestBody
24162
+ }) {
24163
+ return request(OpenAPI, {
24164
+ method: 'POST',
24165
+ url: '/api/crm/favorites/',
24166
+ body: requestBody,
24167
+ mediaType: 'application/json',
24168
+ errors: {
24169
+ 400: `Not exactly one target.`,
24170
+ 403: `Missing \`Ibl.CRM/Favorites/action\` or the target's \`read\`.`
24171
+ }
24172
+ });
24173
+ }
24174
+ /**
24175
+ * One of your favorites
24176
+ * **Required permission:** `Ibl.CRM/Favorites/read`.
24177
+ * @returns Favorite
24178
+ * @throws ApiError
24179
+ */
24180
+ static crmFavoritesRetrieve({
24181
+ id
24182
+ }) {
24183
+ return request(OpenAPI, {
24184
+ method: 'GET',
24185
+ url: '/api/crm/favorites/{id}/',
24186
+ path: {
24187
+ 'id': id
24188
+ },
24189
+ errors: {
24190
+ 403: `Missing required permission \`Ibl.CRM/Favorites/read\`.`,
24191
+ 404: `Favorite not found.`
24192
+ }
24193
+ });
24194
+ }
24195
+ /**
24196
+ * Unstar a record
24197
+ * Removes one of your favorites.
24198
+ *
24199
+ * **Required permission:** `Ibl.CRM/Favorites/delete`.
24200
+ * @returns void
24201
+ * @throws ApiError
24202
+ */
24203
+ static crmFavoritesDestroy({
24204
+ id
24205
+ }) {
24206
+ return request(OpenAPI, {
24207
+ method: 'DELETE',
24208
+ url: '/api/crm/favorites/{id}/',
24209
+ path: {
24210
+ 'id': id
24211
+ },
24212
+ errors: {
24213
+ 403: `Missing required permission \`Ibl.CRM/Favorites/delete\`.`,
24214
+ 404: `Favorite not found.`
24215
+ }
24216
+ });
24217
+ }
23946
24218
  /**
23947
24219
  * List lead sources
23948
24220
  * Returns a paginated list of LeadSources in your Platform.
@@ -23953,18 +24225,28 @@
23953
24225
  */
23954
24226
  static crmLeadSourcesList({
23955
24227
  code,
24228
+ dateFilter,
24229
+ endDate,
23956
24230
  name,
24231
+ ordering,
23957
24232
  page,
23958
- pageSize
24233
+ pageSize,
24234
+ search,
24235
+ startDate
23959
24236
  }) {
23960
24237
  return request(OpenAPI, {
23961
24238
  method: 'GET',
23962
24239
  url: '/api/crm/lead-sources/',
23963
24240
  query: {
23964
24241
  'code': code,
24242
+ 'date_filter': dateFilter,
24243
+ 'end_date': endDate,
23965
24244
  'name': name,
24245
+ 'ordering': ordering,
23966
24246
  'page': page,
23967
- 'page_size': pageSize
24247
+ 'page_size': pageSize,
24248
+ 'search': search,
24249
+ 'start_date': startDate
23968
24250
  },
23969
24251
  errors: {
23970
24252
  401: `Authentication required.`,
@@ -24103,20 +24385,30 @@
24103
24385
  * @throws ApiError
24104
24386
  */
24105
24387
  static crmOrganizationsList({
24388
+ dateFilter,
24389
+ endDate,
24106
24390
  name,
24391
+ ordering,
24107
24392
  owner,
24108
24393
  page,
24109
24394
  pageSize,
24395
+ search,
24396
+ startDate,
24110
24397
  tags
24111
24398
  }) {
24112
24399
  return request(OpenAPI, {
24113
24400
  method: 'GET',
24114
24401
  url: '/api/crm/organizations/',
24115
24402
  query: {
24403
+ 'date_filter': dateFilter,
24404
+ 'end_date': endDate,
24116
24405
  'name': name,
24406
+ 'ordering': ordering,
24117
24407
  'owner': owner,
24118
24408
  'page': page,
24119
24409
  'page_size': pageSize,
24410
+ 'search': search,
24411
+ 'start_date': startDate,
24120
24412
  'tags': tags
24121
24413
  },
24122
24414
  errors: {
@@ -24226,7 +24518,7 @@
24226
24518
  }
24227
24519
  /**
24228
24520
  * Delete an organization
24229
- * Deletes the organization. Any persons linked to it are kept; their organization reference is cleared.
24521
+ * 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.
24230
24522
  *
24231
24523
  * **Required permission:** `Ibl.CRM/Organizations/delete`.
24232
24524
  * @returns void
@@ -24247,6 +24539,29 @@
24247
24539
  }
24248
24540
  });
24249
24541
  }
24542
+ /**
24543
+ * Field-change history for this record
24544
+ * 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.
24545
+ *
24546
+ * **Required permission:** the record's `read` verb.
24547
+ * @returns HistoryEntry
24548
+ * @throws ApiError
24549
+ */
24550
+ static crmOrganizationsHistoryList({
24551
+ id
24552
+ }) {
24553
+ return request(OpenAPI, {
24554
+ method: 'GET',
24555
+ url: '/api/crm/organizations/{id}/history/',
24556
+ path: {
24557
+ 'id': id
24558
+ },
24559
+ errors: {
24560
+ 403: `Missing the record's \`read\` permission.`,
24561
+ 404: `Record not found.`
24562
+ }
24563
+ });
24564
+ }
24250
24565
  /**
24251
24566
  * Attach a tag to this record
24252
24567
  * 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.
@@ -24300,6 +24615,38 @@
24300
24615
  }
24301
24616
  });
24302
24617
  }
24618
+ /**
24619
+ * CRM overview
24620
+ * 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.
24621
+ *
24622
+ * `date_filter` (or `start_date` + `end_date`) adds `period_*` siblings for that window.
24623
+ *
24624
+ * **Required permission:** the `list` verb of each section.
24625
+ * @returns Overview
24626
+ * @throws ApiError
24627
+ */
24628
+ static crmOverviewRetrieve({
24629
+ dateFilter,
24630
+ endDate,
24631
+ pipeline,
24632
+ startDate
24633
+ }) {
24634
+ return request(OpenAPI, {
24635
+ method: 'GET',
24636
+ url: '/api/crm/overview/',
24637
+ query: {
24638
+ 'date_filter': dateFilter,
24639
+ 'end_date': endDate,
24640
+ 'pipeline': pipeline,
24641
+ 'start_date': startDate
24642
+ },
24643
+ errors: {
24644
+ 400: `Invalid window or pipeline parameter.`,
24645
+ 403: `No CRM list permission.`,
24646
+ 404: `Pipeline not found.`
24647
+ }
24648
+ });
24649
+ }
24303
24650
  /**
24304
24651
  * List persons
24305
24652
  * 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`.
@@ -24309,28 +24656,40 @@
24309
24656
  * @throws ApiError
24310
24657
  */
24311
24658
  static crmPersonsList({
24659
+ active,
24312
24660
  createdAtGte,
24313
24661
  createdAtLte,
24662
+ dateFilter,
24663
+ endDate,
24314
24664
  lifecycleStage,
24315
24665
  metadataHasKey,
24666
+ ordering,
24316
24667
  organization,
24317
24668
  owner,
24318
24669
  page,
24319
24670
  pageSize,
24671
+ search,
24672
+ startDate,
24320
24673
  tags
24321
24674
  }) {
24322
24675
  return request(OpenAPI, {
24323
24676
  method: 'GET',
24324
24677
  url: '/api/crm/persons/',
24325
24678
  query: {
24679
+ 'active': active,
24326
24680
  'created_at__gte': createdAtGte,
24327
24681
  'created_at__lte': createdAtLte,
24682
+ 'date_filter': dateFilter,
24683
+ 'end_date': endDate,
24328
24684
  'lifecycle_stage': lifecycleStage,
24329
24685
  'metadata__has_key': metadataHasKey,
24686
+ 'ordering': ordering,
24330
24687
  'organization': organization,
24331
24688
  'owner': owner,
24332
24689
  'page': page,
24333
24690
  'page_size': pageSize,
24691
+ 'search': search,
24692
+ 'start_date': startDate,
24334
24693
  'tags': tags
24335
24694
  },
24336
24695
  errors: {
@@ -24440,7 +24799,7 @@
24440
24799
  }
24441
24800
  /**
24442
24801
  * Delete a person
24443
- * Deletes the person.
24802
+ * Deletes the person. Fails with `409 Conflict` if any Deal still references it.
24444
24803
  *
24445
24804
  * **Required permission:** `Ibl.CRM/Persons/delete`.
24446
24805
  * @returns void
@@ -24457,7 +24816,31 @@
24457
24816
  },
24458
24817
  errors: {
24459
24818
  403: `Missing required permission \`Ibl.CRM/Persons/delete\`.`,
24460
- 404: `Person not found.`
24819
+ 404: `Person not found.`,
24820
+ 409: `Person still has Deals attached.`
24821
+ }
24822
+ });
24823
+ }
24824
+ /**
24825
+ * Field-change history for this record
24826
+ * 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.
24827
+ *
24828
+ * **Required permission:** the record's `read` verb.
24829
+ * @returns HistoryEntry
24830
+ * @throws ApiError
24831
+ */
24832
+ static crmPersonsHistoryList({
24833
+ id
24834
+ }) {
24835
+ return request(OpenAPI, {
24836
+ method: 'GET',
24837
+ url: '/api/crm/persons/{id}/history/',
24838
+ path: {
24839
+ 'id': id
24840
+ },
24841
+ errors: {
24842
+ 403: `Missing the record's \`read\` permission.`,
24843
+ 404: `Record not found.`
24461
24844
  }
24462
24845
  });
24463
24846
  }
@@ -24608,20 +24991,30 @@
24608
24991
  */
24609
24992
  static crmPipelinesList({
24610
24993
  code,
24994
+ dateFilter,
24995
+ endDate,
24611
24996
  isDefault,
24612
24997
  name,
24998
+ ordering,
24613
24999
  page,
24614
- pageSize
25000
+ pageSize,
25001
+ search,
25002
+ startDate
24615
25003
  }) {
24616
25004
  return request(OpenAPI, {
24617
25005
  method: 'GET',
24618
25006
  url: '/api/crm/pipelines/',
24619
25007
  query: {
24620
25008
  'code': code,
25009
+ 'date_filter': dateFilter,
25010
+ 'end_date': endDate,
24621
25011
  'is_default': isDefault,
24622
25012
  'name': name,
25013
+ 'ordering': ordering,
24623
25014
  'page': page,
24624
- 'page_size': pageSize
25015
+ 'page_size': pageSize,
25016
+ 'search': search,
25017
+ 'start_date': startDate
24625
25018
  },
24626
25019
  errors: {
24627
25020
  401: `Authentication required.`,
@@ -24662,10 +25055,15 @@
24662
25055
  static crmPipelinesStagesList({
24663
25056
  pipelinePk,
24664
25057
  code,
25058
+ dateFilter,
25059
+ endDate,
24665
25060
  isLost,
24666
25061
  isWon,
25062
+ ordering,
24667
25063
  page,
24668
- pageSize
25064
+ pageSize,
25065
+ search,
25066
+ startDate
24669
25067
  }) {
24670
25068
  return request(OpenAPI, {
24671
25069
  method: 'GET',
@@ -24675,10 +25073,15 @@
24675
25073
  },
24676
25074
  query: {
24677
25075
  'code': code,
25076
+ 'date_filter': dateFilter,
25077
+ 'end_date': endDate,
24678
25078
  'is_lost': isLost,
24679
25079
  'is_won': isWon,
25080
+ 'ordering': ordering,
24680
25081
  'page': page,
24681
- 'page_size': pageSize
25082
+ 'page_size': pageSize,
25083
+ 'search': search,
25084
+ 'start_date': startDate
24682
25085
  },
24683
25086
  errors: {
24684
25087
  403: `Missing required permission \`Ibl.CRM/Pipelines/list\`.`,
@@ -24923,6 +25326,58 @@
24923
25326
  }
24924
25327
  });
24925
25328
  }
25329
+ /**
25330
+ * Reorder a pipeline's stages
25331
+ * 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.
25332
+ *
25333
+ * **Required permission:** `Ibl.CRM/Pipelines/write`.
25334
+ * @returns Pipeline
25335
+ * @throws ApiError
25336
+ */
25337
+ static crmPipelinesStagesReorderCreate({
25338
+ id,
25339
+ requestBody
25340
+ }) {
25341
+ return request(OpenAPI, {
25342
+ method: 'POST',
25343
+ url: '/api/crm/pipelines/{id}/stages/reorder/',
25344
+ path: {
25345
+ 'id': id
25346
+ },
25347
+ body: requestBody,
25348
+ mediaType: 'application/json',
25349
+ errors: {
25350
+ 400: `\`order\` is not a permutation of the stages.`,
25351
+ 403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`,
25352
+ 404: `Pipeline not found.`
25353
+ }
25354
+ });
25355
+ }
25356
+ /**
25357
+ * Search persons, organizations and deals
25358
+ * 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.
25359
+ *
25360
+ * **Required permission:** `Ibl.CRM/Persons/list`, `Ibl.CRM/Organizations/list` or `Ibl.CRM/Deals/list` (at least one).
25361
+ * @returns SearchResponse
25362
+ * @throws ApiError
25363
+ */
25364
+ static crmSearchRetrieve({
25365
+ q,
25366
+ limit
25367
+ }) {
25368
+ return request(OpenAPI, {
25369
+ method: 'GET',
25370
+ url: '/api/crm/search/',
25371
+ query: {
25372
+ 'limit': limit,
25373
+ 'q': q
25374
+ },
25375
+ errors: {
25376
+ 400: `\`q\` missing or \`limit\` out of range.`,
25377
+ 403: `No CRM list permission.`
25378
+ }
25379
+ });
25380
+ }
24926
25381
  /**
24927
25382
  * List tags
24928
25383
  * 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.
@@ -24934,9 +25389,14 @@
24934
25389
  static crmTagsList({
24935
25390
  createdAtGte,
24936
25391
  createdAtLte,
25392
+ dateFilter,
25393
+ endDate,
24937
25394
  name,
25395
+ ordering,
24938
25396
  page,
24939
- pageSize
25397
+ pageSize,
25398
+ search,
25399
+ startDate
24940
25400
  }) {
24941
25401
  return request(OpenAPI, {
24942
25402
  method: 'GET',
@@ -24944,9 +25404,14 @@
24944
25404
  query: {
24945
25405
  'created_at__gte': createdAtGte,
24946
25406
  'created_at__lte': createdAtLte,
25407
+ 'date_filter': dateFilter,
25408
+ 'end_date': endDate,
24947
25409
  'name': name,
25410
+ 'ordering': ordering,
24948
25411
  'page': page,
24949
- 'page_size': pageSize
25412
+ 'page_size': pageSize,
25413
+ 'search': search,
25414
+ 'start_date': startDate
24950
25415
  },
24951
25416
  errors: {
24952
25417
  401: `Authentication required.`,
@@ -25076,6 +25541,159 @@
25076
25541
  }
25077
25542
  });
25078
25543
  }
25544
+ /**
25545
+ * List my saved views
25546
+ * Your saved views in this Platform; filter with `object_type`.
25547
+ *
25548
+ * **Required permission:** `Ibl.CRM/Views/list`.
25549
+ * @returns PaginatedSavedViewList
25550
+ * @throws ApiError
25551
+ */
25552
+ static crmViewsList({
25553
+ dateFilter,
25554
+ endDate,
25555
+ objectType,
25556
+ ordering,
25557
+ page,
25558
+ pageSize,
25559
+ search,
25560
+ startDate,
25561
+ type
25562
+ }) {
25563
+ return request(OpenAPI, {
25564
+ method: 'GET',
25565
+ url: '/api/crm/views/',
25566
+ query: {
25567
+ 'date_filter': dateFilter,
25568
+ 'end_date': endDate,
25569
+ 'object_type': objectType,
25570
+ 'ordering': ordering,
25571
+ 'page': page,
25572
+ 'page_size': pageSize,
25573
+ 'search': search,
25574
+ 'start_date': startDate,
25575
+ 'type': type
25576
+ },
25577
+ errors: {
25578
+ 401: `Authentication required.`,
25579
+ 403: `Missing required permission \`Ibl.CRM/Views/list\`.`
25580
+ }
25581
+ });
25582
+ }
25583
+ /**
25584
+ * Save a view
25585
+ * Stores columns, filters, sorts and (for deals) a kanban grouping under a name unique to you and the list.
25586
+ *
25587
+ * **Required permission:** `Ibl.CRM/Views/action`.
25588
+ * @returns SavedView
25589
+ * @throws ApiError
25590
+ */
25591
+ static crmViewsCreate({
25592
+ requestBody
25593
+ }) {
25594
+ return request(OpenAPI, {
25595
+ method: 'POST',
25596
+ url: '/api/crm/views/',
25597
+ body: requestBody,
25598
+ mediaType: 'application/json',
25599
+ errors: {
25600
+ 400: `Validation error.`,
25601
+ 403: `Missing required permission \`Ibl.CRM/Views/action\`.`
25602
+ }
25603
+ });
25604
+ }
25605
+ /**
25606
+ * Retrieve a saved view
25607
+ * **Required permission:** `Ibl.CRM/Views/read`.
25608
+ * @returns SavedView
25609
+ * @throws ApiError
25610
+ */
25611
+ static crmViewsRetrieve({
25612
+ id
25613
+ }) {
25614
+ return request(OpenAPI, {
25615
+ method: 'GET',
25616
+ url: '/api/crm/views/{id}/',
25617
+ path: {
25618
+ 'id': id
25619
+ },
25620
+ errors: {
25621
+ 403: `Missing required permission \`Ibl.CRM/Views/read\`.`,
25622
+ 404: `View not found.`
25623
+ }
25624
+ });
25625
+ }
25626
+ /**
25627
+ * Replace a saved view
25628
+ * **Required permission:** `Ibl.CRM/Views/write`.
25629
+ * @returns SavedView
25630
+ * @throws ApiError
25631
+ */
25632
+ static crmViewsUpdate({
25633
+ id,
25634
+ requestBody
25635
+ }) {
25636
+ return request(OpenAPI, {
25637
+ method: 'PUT',
25638
+ url: '/api/crm/views/{id}/',
25639
+ path: {
25640
+ 'id': id
25641
+ },
25642
+ body: requestBody,
25643
+ mediaType: 'application/json',
25644
+ errors: {
25645
+ 400: `Validation error.`,
25646
+ 403: `Missing required permission \`Ibl.CRM/Views/write\`.`,
25647
+ 404: `View not found.`
25648
+ }
25649
+ });
25650
+ }
25651
+ /**
25652
+ * Update a saved view
25653
+ * **Required permission:** `Ibl.CRM/Views/write`.
25654
+ * @returns SavedView
25655
+ * @throws ApiError
25656
+ */
25657
+ static crmViewsPartialUpdate({
25658
+ id,
25659
+ requestBody
25660
+ }) {
25661
+ return request(OpenAPI, {
25662
+ method: 'PATCH',
25663
+ url: '/api/crm/views/{id}/',
25664
+ path: {
25665
+ 'id': id
25666
+ },
25667
+ body: requestBody,
25668
+ mediaType: 'application/json',
25669
+ errors: {
25670
+ 400: `Validation error.`,
25671
+ 403: `Missing required permission \`Ibl.CRM/Views/write\`.`,
25672
+ 404: `View not found.`
25673
+ }
25674
+ });
25675
+ }
25676
+ /**
25677
+ * Delete a saved view
25678
+ * **Required permission:** `Ibl.CRM/Views/delete`.
25679
+ * @returns void
25680
+ * @throws ApiError
25681
+ */
25682
+ static crmViewsDestroy({
25683
+ id
25684
+ }) {
25685
+ return request(OpenAPI, {
25686
+ method: 'DELETE',
25687
+ url: '/api/crm/views/{id}/',
25688
+ path: {
25689
+ 'id': id
25690
+ },
25691
+ errors: {
25692
+ 403: `Missing required permission \`Ibl.CRM/Views/delete\`.`,
25693
+ 404: `View not found.`
25694
+ }
25695
+ });
25696
+ }
25079
25697
  }
25080
25698
 
25081
25699
  class CustomDomainsService {