@iblai/iblai-api 4.265.1-core → 4.265.2-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 (77) hide show
  1. package/dist/index.cjs.js +2168 -258
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +2165 -259
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +2168 -258
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/types/index.d.ts +26 -1
  8. package/dist/types/models/Activity.d.ts +83 -0
  9. package/dist/types/models/ActivityTypeEnum.d.ts +18 -0
  10. package/dist/types/models/Deal.d.ts +83 -0
  11. package/dist/types/models/DealLostRequest.d.ts +10 -0
  12. package/dist/types/models/DealMoveStageRequest.d.ts +10 -0
  13. package/dist/types/models/DealStatusEnum.d.ts +10 -0
  14. package/dist/types/models/DealWonRequest.d.ts +6 -0
  15. package/dist/types/models/LeadSource.d.ts +30 -0
  16. package/dist/types/models/NotificationTemplateDetail.d.ts +24 -2
  17. package/dist/types/models/NotificationTemplateList.d.ts +5 -2
  18. package/dist/types/models/Organization.d.ts +1 -1
  19. package/dist/types/models/PaginatedActivityList.d.ts +7 -0
  20. package/dist/types/models/PaginatedDealList.d.ts +7 -0
  21. package/dist/types/models/PaginatedLeadSourceList.d.ts +7 -0
  22. package/dist/types/models/PaginatedPipelineList.d.ts +7 -0
  23. package/dist/types/models/PaginatedPipelineStageList.d.ts +7 -0
  24. package/dist/types/models/PatchedActivity.d.ts +83 -0
  25. package/dist/types/models/PatchedDeal.d.ts +83 -0
  26. package/dist/types/models/PatchedLeadSource.d.ts +30 -0
  27. package/dist/types/models/PatchedNotificationTemplateDetail.d.ts +24 -2
  28. package/dist/types/models/PatchedOrganization.d.ts +1 -1
  29. package/dist/types/models/PatchedPipeline.d.ts +34 -0
  30. package/dist/types/models/PatchedPipelineStage.d.ts +40 -0
  31. package/dist/types/models/Pipeline.d.ts +34 -0
  32. package/dist/types/models/PipelineStage.d.ts +40 -0
  33. package/dist/types/models/RecipientsRecipientModeEnum.d.ts +14 -0
  34. package/dist/types/models/{TypeD36Enum.d.ts → Type4b7Enum.d.ts} +7 -1
  35. package/dist/types/services/ActivitiesService.d.ts +126 -0
  36. package/dist/types/services/CrmService.d.ts +553 -1
  37. package/dist/types/services/DealsService.d.ts +160 -0
  38. package/dist/types/services/LeadSourcesService.d.ts +95 -0
  39. package/dist/types/services/PersonsService.d.ts +1 -1
  40. package/dist/types/services/PipelinesService.d.ts +183 -0
  41. package/package.json +1 -1
  42. package/sdk_schema.yml +4093 -141
  43. package/src/core/OpenAPI.ts +1 -1
  44. package/src/index.ts +26 -1
  45. package/src/models/Activity.ts +88 -0
  46. package/src/models/ActivityTypeEnum.ts +22 -0
  47. package/src/models/Deal.ts +88 -0
  48. package/src/models/DealLostRequest.ts +15 -0
  49. package/src/models/DealMoveStageRequest.ts +15 -0
  50. package/src/models/DealStatusEnum.ts +14 -0
  51. package/src/models/DealWonRequest.ts +11 -0
  52. package/src/models/LeadSource.ts +35 -0
  53. package/src/models/NotificationTemplateDetail.ts +24 -2
  54. package/src/models/NotificationTemplateList.ts +5 -2
  55. package/src/models/Organization.ts +1 -1
  56. package/src/models/PaginatedActivityList.ts +12 -0
  57. package/src/models/PaginatedDealList.ts +12 -0
  58. package/src/models/PaginatedLeadSourceList.ts +12 -0
  59. package/src/models/PaginatedPipelineList.ts +12 -0
  60. package/src/models/PaginatedPipelineStageList.ts +12 -0
  61. package/src/models/PatchedActivity.ts +88 -0
  62. package/src/models/PatchedDeal.ts +88 -0
  63. package/src/models/PatchedLeadSource.ts +35 -0
  64. package/src/models/PatchedNotificationTemplateDetail.ts +24 -2
  65. package/src/models/PatchedOrganization.ts +1 -1
  66. package/src/models/PatchedPipeline.ts +39 -0
  67. package/src/models/PatchedPipelineStage.ts +45 -0
  68. package/src/models/Pipeline.ts +39 -0
  69. package/src/models/PipelineStage.ts +45 -0
  70. package/src/models/RecipientsRecipientModeEnum.ts +18 -0
  71. package/src/models/{TypeD36Enum.ts → Type4b7Enum.ts} +7 -1
  72. package/src/services/ActivitiesService.ts +255 -0
  73. package/src/services/CrmService.ts +1161 -1
  74. package/src/services/DealsService.ts +337 -0
  75. package/src/services/LeadSourcesService.ts +198 -0
  76. package/src/services/PersonsService.ts +1 -1
  77. package/src/services/PipelinesService.ts +406 -0
@@ -0,0 +1,160 @@
1
+ import type { Deal } from '../models/Deal';
2
+ import type { DealLostRequest } from '../models/DealLostRequest';
3
+ import type { DealMoveStageRequest } from '../models/DealMoveStageRequest';
4
+ import type { DealWonRequest } from '../models/DealWonRequest';
5
+ import type { PaginatedDealList } from '../models/PaginatedDealList';
6
+ import type { PatchedDeal } from '../models/PatchedDeal';
7
+ import type { CancelablePromise } from '../core/CancelablePromise';
8
+ export declare class DealsService {
9
+ /**
10
+ * List deals
11
+ * Returns a paginated list of Deals in your Platform. Supports filtering by `status`, `pipeline`, `stage`, `owner`, `source`, `person`, `organization`, expected-close-date and created-at ranges, and `metadata__has_key`.
12
+ *
13
+ * **Required permission:** `Ibl.CRM/Deals/list`.
14
+ * @returns PaginatedDealList
15
+ * @throws ApiError
16
+ */
17
+ static dealsList({ createdAtGte, createdAtLte, expectedCloseDateGte, expectedCloseDateLte, metadataHasKey, organization, owner, page, pageSize, person, pipeline, source, stage, status, }: {
18
+ createdAtGte?: string;
19
+ createdAtLte?: string;
20
+ expectedCloseDateGte?: string;
21
+ expectedCloseDateLte?: string;
22
+ metadataHasKey?: string;
23
+ organization?: string;
24
+ owner?: number;
25
+ /**
26
+ * A page number within the paginated result set.
27
+ */
28
+ page?: number;
29
+ /**
30
+ * Number of results to return per page.
31
+ */
32
+ pageSize?: number;
33
+ person?: string;
34
+ pipeline?: number;
35
+ source?: number;
36
+ stage?: number;
37
+ /**
38
+ * Service-managed (read-only in serializer). Derived from the destination stage's is_won/is_lost.
39
+ *
40
+ * * `open` - Open
41
+ * * `won` - Won
42
+ * * `lost` - Lost
43
+ */
44
+ status?: 'lost' | 'open' | 'won';
45
+ }): CancelablePromise<PaginatedDealList>;
46
+ /**
47
+ * Create a deal
48
+ * 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`.
49
+ *
50
+ * **Required permission:** `Ibl.CRM/Deals/write`.
51
+ * @returns Deal
52
+ * @throws ApiError
53
+ */
54
+ static dealsCreate({ requestBody, }: {
55
+ requestBody: Deal;
56
+ }): CancelablePromise<Deal>;
57
+ /**
58
+ * Retrieve a deal
59
+ * Returns a single Deal by id.
60
+ *
61
+ * **Required permission:** `Ibl.CRM/Deals/read`.
62
+ * @returns Deal
63
+ * @throws ApiError
64
+ */
65
+ static dealsRetrieve({ id, }: {
66
+ /**
67
+ * A unique integer value identifying this deal.
68
+ */
69
+ id: number;
70
+ }): CancelablePromise<Deal>;
71
+ /**
72
+ * Replace a deal
73
+ * Replaces all editable fields on the Deal.
74
+ *
75
+ * **Required permission:** `Ibl.CRM/Deals/write`.
76
+ * @returns Deal
77
+ * @throws ApiError
78
+ */
79
+ static dealsUpdate({ id, requestBody, }: {
80
+ /**
81
+ * A unique integer value identifying this deal.
82
+ */
83
+ id: number;
84
+ requestBody: Deal;
85
+ }): CancelablePromise<Deal>;
86
+ /**
87
+ * Update a deal
88
+ * Updates only the supplied fields on the Deal. Direct writes to `status` or `closed_at` are rejected with `400` — use `POST /deals/{id}/move-stage/`, `won/`, or `lost/`.
89
+ *
90
+ * **Required permission:** `Ibl.CRM/Deals/write`.
91
+ * @returns Deal
92
+ * @throws ApiError
93
+ */
94
+ static dealsPartialUpdate({ id, requestBody, }: {
95
+ /**
96
+ * A unique integer value identifying this deal.
97
+ */
98
+ id: number;
99
+ requestBody?: PatchedDeal;
100
+ }): CancelablePromise<Deal>;
101
+ /**
102
+ * Delete a deal
103
+ * Deletes the Deal.
104
+ *
105
+ * **Required permission:** `Ibl.CRM/Deals/delete`.
106
+ * @returns void
107
+ * @throws ApiError
108
+ */
109
+ static dealsDestroy({ id, }: {
110
+ /**
111
+ * A unique integer value identifying this deal.
112
+ */
113
+ id: number;
114
+ }): CancelablePromise<void>;
115
+ /**
116
+ * Mark a deal as lost
117
+ * 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.
118
+ *
119
+ * **Required permission:** `Ibl.CRM/Deals/write`.
120
+ * @returns Deal
121
+ * @throws ApiError
122
+ */
123
+ static dealsLostCreate({ id, requestBody, }: {
124
+ /**
125
+ * A unique integer value identifying this deal.
126
+ */
127
+ id: number;
128
+ requestBody: DealLostRequest;
129
+ }): CancelablePromise<Deal>;
130
+ /**
131
+ * Move a deal to a different stage
132
+ * Moves the Deal to the stage identified by `stage_id` or `stage_code`. The target stage must belong to this Deal's pipeline. Records an audit Activity and emits `deal_stage_changed`. `Deal.status` is recomputed from the new stage's `is_won` / `is_lost` flags.
133
+ *
134
+ * **Required permission:** `Ibl.CRM/Deals/write`.
135
+ * @returns Deal
136
+ * @throws ApiError
137
+ */
138
+ static dealsMoveStageCreate({ id, requestBody, }: {
139
+ /**
140
+ * A unique integer value identifying this deal.
141
+ */
142
+ id: number;
143
+ requestBody?: DealMoveStageRequest;
144
+ }): CancelablePromise<Deal>;
145
+ /**
146
+ * Mark a deal as won
147
+ * 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.
148
+ *
149
+ * **Required permission:** `Ibl.CRM/Deals/write`.
150
+ * @returns Deal
151
+ * @throws ApiError
152
+ */
153
+ static dealsWonCreate({ id, requestBody, }: {
154
+ /**
155
+ * A unique integer value identifying this deal.
156
+ */
157
+ id: number;
158
+ requestBody?: DealWonRequest;
159
+ }): CancelablePromise<Deal>;
160
+ }
@@ -0,0 +1,95 @@
1
+ import type { LeadSource } from '../models/LeadSource';
2
+ import type { PaginatedLeadSourceList } from '../models/PaginatedLeadSourceList';
3
+ import type { PatchedLeadSource } from '../models/PatchedLeadSource';
4
+ import type { CancelablePromise } from '../core/CancelablePromise';
5
+ export declare class LeadSourcesService {
6
+ /**
7
+ * List lead sources
8
+ * Returns a paginated list of LeadSources in your Platform.
9
+ *
10
+ * **Required permission:** `Ibl.CRM/Pipelines/list`.
11
+ * @returns PaginatedLeadSourceList
12
+ * @throws ApiError
13
+ */
14
+ static leadSourcesList({ code, name, page, pageSize, }: {
15
+ code?: string;
16
+ name?: string;
17
+ /**
18
+ * A page number within the paginated result set.
19
+ */
20
+ page?: number;
21
+ /**
22
+ * Number of results to return per page.
23
+ */
24
+ pageSize?: number;
25
+ }): CancelablePromise<PaginatedLeadSourceList>;
26
+ /**
27
+ * Create a lead source
28
+ * Creates a new LeadSource in your Platform. `code` must be unique.
29
+ *
30
+ * **Required permission:** `Ibl.CRM/Pipelines/write`.
31
+ * @returns LeadSource
32
+ * @throws ApiError
33
+ */
34
+ static leadSourcesCreate({ requestBody, }: {
35
+ requestBody: LeadSource;
36
+ }): CancelablePromise<LeadSource>;
37
+ /**
38
+ * Retrieve a lead source
39
+ * Returns a single LeadSource by id.
40
+ *
41
+ * **Required permission:** `Ibl.CRM/Pipelines/read`.
42
+ * @returns LeadSource
43
+ * @throws ApiError
44
+ */
45
+ static leadSourcesRetrieve({ id, }: {
46
+ /**
47
+ * A unique integer value identifying this lead source.
48
+ */
49
+ id: number;
50
+ }): CancelablePromise<LeadSource>;
51
+ /**
52
+ * Replace a lead source
53
+ * Replaces all editable fields on the LeadSource.
54
+ *
55
+ * **Required permission:** `Ibl.CRM/Pipelines/write`.
56
+ * @returns LeadSource
57
+ * @throws ApiError
58
+ */
59
+ static leadSourcesUpdate({ id, requestBody, }: {
60
+ /**
61
+ * A unique integer value identifying this lead source.
62
+ */
63
+ id: number;
64
+ requestBody: LeadSource;
65
+ }): CancelablePromise<LeadSource>;
66
+ /**
67
+ * Update a lead source
68
+ * Updates only the supplied fields on the LeadSource.
69
+ *
70
+ * **Required permission:** `Ibl.CRM/Pipelines/write`.
71
+ * @returns LeadSource
72
+ * @throws ApiError
73
+ */
74
+ static leadSourcesPartialUpdate({ id, requestBody, }: {
75
+ /**
76
+ * A unique integer value identifying this lead source.
77
+ */
78
+ id: number;
79
+ requestBody?: PatchedLeadSource;
80
+ }): CancelablePromise<LeadSource>;
81
+ /**
82
+ * Delete a lead source
83
+ * Deletes the LeadSource. Any Deals referencing it have their `source` cleared.
84
+ *
85
+ * **Required permission:** `Ibl.CRM/Pipelines/delete`.
86
+ * @returns void
87
+ * @throws ApiError
88
+ */
89
+ static leadSourcesDestroy({ id, }: {
90
+ /**
91
+ * A unique integer value identifying this lead source.
92
+ */
93
+ id: number;
94
+ }): CancelablePromise<void>;
95
+ }
@@ -20,7 +20,7 @@ export declare class PersonsService {
20
20
  createdAtGte?: string;
21
21
  createdAtLte?: string;
22
22
  /**
23
- * Funnel position. Free-form transitions in v0.
23
+ * Funnel position. Transitions are unrestricted — any stage may move to any other.
24
24
  *
25
25
  * * `lead` - Lead
26
26
  * * `qualified` - Qualified
@@ -0,0 +1,183 @@
1
+ import type { PaginatedPipelineList } from '../models/PaginatedPipelineList';
2
+ import type { PaginatedPipelineStageList } from '../models/PaginatedPipelineStageList';
3
+ import type { PatchedPipeline } from '../models/PatchedPipeline';
4
+ import type { PatchedPipelineStage } from '../models/PatchedPipelineStage';
5
+ import type { Pipeline } from '../models/Pipeline';
6
+ import type { PipelineStage } from '../models/PipelineStage';
7
+ import type { CancelablePromise } from '../core/CancelablePromise';
8
+ export declare class PipelinesService {
9
+ /**
10
+ * List pipelines
11
+ * Returns a paginated list of Pipelines in your Platform. Each Pipeline includes its ordered `stages` inline.
12
+ *
13
+ * **Required permission:** `Ibl.CRM/Pipelines/list`.
14
+ * @returns PaginatedPipelineList
15
+ * @throws ApiError
16
+ */
17
+ static pipelinesList({ code, isDefault, name, page, pageSize, }: {
18
+ code?: string;
19
+ isDefault?: boolean;
20
+ name?: string;
21
+ /**
22
+ * A page number within the paginated result set.
23
+ */
24
+ page?: number;
25
+ /**
26
+ * Number of results to return per page.
27
+ */
28
+ pageSize?: number;
29
+ }): CancelablePromise<PaginatedPipelineList>;
30
+ /**
31
+ * Create a pipeline
32
+ * 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.
33
+ *
34
+ * **Required permission:** `Ibl.CRM/Pipelines/write`.
35
+ * @returns Pipeline
36
+ * @throws ApiError
37
+ */
38
+ static pipelinesCreate({ requestBody, }: {
39
+ requestBody: Pipeline;
40
+ }): CancelablePromise<Pipeline>;
41
+ /**
42
+ * List stages for a pipeline
43
+ * Returns the ordered list of PipelineStages for the given Pipeline.
44
+ *
45
+ * **Required permission:** `Ibl.CRM/Pipelines/list`.
46
+ * @returns PaginatedPipelineStageList
47
+ * @throws ApiError
48
+ */
49
+ static pipelinesStagesList({ pipelinePk, code, isLost, isWon, page, pageSize, }: {
50
+ pipelinePk: number;
51
+ code?: string;
52
+ isLost?: boolean;
53
+ isWon?: boolean;
54
+ /**
55
+ * A page number within the paginated result set.
56
+ */
57
+ page?: number;
58
+ /**
59
+ * Number of results to return per page.
60
+ */
61
+ pageSize?: number;
62
+ }): CancelablePromise<PaginatedPipelineStageList>;
63
+ /**
64
+ * Create a stage
65
+ * 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.
66
+ *
67
+ * **Required permission:** `Ibl.CRM/Pipelines/write`.
68
+ * @returns PipelineStage
69
+ * @throws ApiError
70
+ */
71
+ static pipelinesStagesCreate({ pipelinePk, requestBody, }: {
72
+ pipelinePk: number;
73
+ requestBody: PipelineStage;
74
+ }): CancelablePromise<PipelineStage>;
75
+ /**
76
+ * Retrieve a stage
77
+ * Returns a single PipelineStage by id (must belong to the URL Pipeline).
78
+ *
79
+ * **Required permission:** `Ibl.CRM/Pipelines/read`.
80
+ * @returns PipelineStage
81
+ * @throws ApiError
82
+ */
83
+ static pipelinesStagesRetrieve({ id, pipelinePk, }: {
84
+ id: number;
85
+ pipelinePk: number;
86
+ }): CancelablePromise<PipelineStage>;
87
+ /**
88
+ * Replace a stage
89
+ * Replaces all editable fields on the PipelineStage.
90
+ *
91
+ * **Required permission:** `Ibl.CRM/Pipelines/write`.
92
+ * @returns PipelineStage
93
+ * @throws ApiError
94
+ */
95
+ static pipelinesStagesUpdate({ id, pipelinePk, requestBody, }: {
96
+ id: number;
97
+ pipelinePk: number;
98
+ requestBody: PipelineStage;
99
+ }): CancelablePromise<PipelineStage>;
100
+ /**
101
+ * Update a stage
102
+ * Updates only the supplied fields on the PipelineStage.
103
+ *
104
+ * **Required permission:** `Ibl.CRM/Pipelines/write`.
105
+ * @returns PipelineStage
106
+ * @throws ApiError
107
+ */
108
+ static pipelinesStagesPartialUpdate({ id, pipelinePk, requestBody, }: {
109
+ id: number;
110
+ pipelinePk: number;
111
+ requestBody?: PatchedPipelineStage;
112
+ }): CancelablePromise<PipelineStage>;
113
+ /**
114
+ * Delete a stage
115
+ * Deletes the PipelineStage. Fails with `409 Conflict` if any Deal still references it (FK is PROTECTed).
116
+ *
117
+ * **Required permission:** `Ibl.CRM/Pipelines/delete`.
118
+ * @returns void
119
+ * @throws ApiError
120
+ */
121
+ static pipelinesStagesDestroy({ id, pipelinePk, }: {
122
+ id: number;
123
+ pipelinePk: number;
124
+ }): CancelablePromise<void>;
125
+ /**
126
+ * Retrieve a pipeline
127
+ * Returns a single Pipeline by id, including its ordered `stages`.
128
+ *
129
+ * **Required permission:** `Ibl.CRM/Pipelines/read`.
130
+ * @returns Pipeline
131
+ * @throws ApiError
132
+ */
133
+ static pipelinesRetrieve({ id, }: {
134
+ /**
135
+ * A unique integer value identifying this pipeline.
136
+ */
137
+ id: number;
138
+ }): CancelablePromise<Pipeline>;
139
+ /**
140
+ * Replace a pipeline
141
+ * Replaces all editable fields on the Pipeline.
142
+ *
143
+ * **Required permission:** `Ibl.CRM/Pipelines/write`.
144
+ * @returns Pipeline
145
+ * @throws ApiError
146
+ */
147
+ static pipelinesUpdate({ id, requestBody, }: {
148
+ /**
149
+ * A unique integer value identifying this pipeline.
150
+ */
151
+ id: number;
152
+ requestBody: Pipeline;
153
+ }): CancelablePromise<Pipeline>;
154
+ /**
155
+ * Update a pipeline
156
+ * Updates only the supplied fields on the Pipeline.
157
+ *
158
+ * **Required permission:** `Ibl.CRM/Pipelines/write`.
159
+ * @returns Pipeline
160
+ * @throws ApiError
161
+ */
162
+ static pipelinesPartialUpdate({ id, requestBody, }: {
163
+ /**
164
+ * A unique integer value identifying this pipeline.
165
+ */
166
+ id: number;
167
+ requestBody?: PatchedPipeline;
168
+ }): CancelablePromise<Pipeline>;
169
+ /**
170
+ * Delete a pipeline
171
+ * Deletes the Pipeline. Fails with `409 Conflict` if any Deal still references it (FK is PROTECTed).
172
+ *
173
+ * **Required permission:** `Ibl.CRM/Pipelines/delete`.
174
+ * @returns void
175
+ * @throws ApiError
176
+ */
177
+ static pipelinesDestroy({ id, }: {
178
+ /**
179
+ * A unique integer value identifying this pipeline.
180
+ */
181
+ id: number;
182
+ }): CancelablePromise<void>;
183
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iblai/iblai-api",
3
- "version": "4.265.1-core",
3
+ "version": "4.265.2-core",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "type": "module",