@iblai/iblai-api 4.288.1-core → 4.289.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 (43) hide show
  1. package/dist/index.cjs.js +10618 -12607
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +10619 -12593
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +10618 -12607
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/types/index.d.ts +0 -15
  8. package/dist/types/services/BillingService.d.ts +215 -4
  9. package/package.json +1 -1
  10. package/sdk_schema.yml +10797 -14096
  11. package/src/core/OpenAPI.ts +1 -1
  12. package/src/index.ts +0 -15
  13. package/src/services/BillingService.ts +468 -6
  14. package/dist/types/services/AccessCheckService.d.ts +0 -17
  15. package/dist/types/services/AccountService.d.ts +0 -36
  16. package/dist/types/services/ActivitiesService.d.ts +0 -126
  17. package/dist/types/services/AutoRechargeService.d.ts +0 -14
  18. package/dist/types/services/CreditsService.d.ts +0 -12
  19. package/dist/types/services/DealsService.d.ts +0 -192
  20. package/dist/types/services/ItemsService.d.ts +0 -13
  21. package/dist/types/services/LeadSourcesService.d.ts +0 -95
  22. package/dist/types/services/OrganizationsService.d.ts +0 -109
  23. package/dist/types/services/PersonsService.d.ts +0 -168
  24. package/dist/types/services/PipelinesService.d.ts +0 -183
  25. package/dist/types/services/PlatformsService.d.ts +0 -332
  26. package/dist/types/services/PricesService.d.ts +0 -15
  27. package/dist/types/services/TagsService.d.ts +0 -96
  28. package/dist/types/services/TransactionsService.d.ts +0 -35
  29. package/src/services/AccessCheckService.ts +0 -39
  30. package/src/services/AccountService.ts +0 -70
  31. package/src/services/ActivitiesService.ts +0 -255
  32. package/src/services/AutoRechargeService.ts +0 -29
  33. package/src/services/CreditsService.ts +0 -23
  34. package/src/services/DealsService.ts +0 -406
  35. package/src/services/ItemsService.ts +0 -29
  36. package/src/services/LeadSourcesService.ts +0 -198
  37. package/src/services/OrganizationsService.ts +0 -249
  38. package/src/services/PersonsService.ts +0 -367
  39. package/src/services/PipelinesService.ts +0 -406
  40. package/src/services/PlatformsService.ts +0 -716
  41. package/src/services/PricesService.ts +0 -34
  42. package/src/services/TagsService.ts +0 -201
  43. package/src/services/TransactionsService.ts +0 -57
@@ -1,406 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do not edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- import type { _TagAttachRequest } from '../models/_TagAttachRequest';
6
- import type { Deal } from '../models/Deal';
7
- import type { DealLostRequest } from '../models/DealLostRequest';
8
- import type { DealMoveStageRequest } from '../models/DealMoveStageRequest';
9
- import type { DealWonRequest } from '../models/DealWonRequest';
10
- import type { PaginatedDealList } from '../models/PaginatedDealList';
11
- import type { PatchedDeal } from '../models/PatchedDeal';
12
- import type { CancelablePromise } from '../core/CancelablePromise';
13
- import { OpenAPI } from '../core/OpenAPI';
14
- import { request as __request } from '../core/request';
15
- export class DealsService {
16
- /**
17
- * List deals
18
- * 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`.
19
- *
20
- * **Required permission:** `Ibl.CRM/Deals/list`.
21
- * @returns PaginatedDealList
22
- * @throws ApiError
23
- */
24
- public static dealsList({
25
- createdAtGte,
26
- createdAtLte,
27
- expectedCloseDateGte,
28
- expectedCloseDateLte,
29
- metadataHasKey,
30
- organization,
31
- owner,
32
- page,
33
- pageSize,
34
- person,
35
- pipeline,
36
- source,
37
- stage,
38
- status,
39
- tags,
40
- }: {
41
- createdAtGte?: string,
42
- createdAtLte?: string,
43
- expectedCloseDateGte?: string,
44
- expectedCloseDateLte?: string,
45
- metadataHasKey?: string,
46
- organization?: string,
47
- owner?: number,
48
- /**
49
- * A page number within the paginated result set.
50
- */
51
- page?: number,
52
- /**
53
- * Number of results to return per page.
54
- */
55
- pageSize?: number,
56
- person?: string,
57
- pipeline?: number,
58
- source?: number,
59
- stage?: number,
60
- /**
61
- * Service-managed (read-only in serializer). Derived from the destination stage's is_won/is_lost.
62
- *
63
- * * `open` - Open
64
- * * `won` - Won
65
- * * `lost` - Lost
66
- */
67
- status?: 'lost' | 'open' | 'won',
68
- tags?: string,
69
- }): CancelablePromise<PaginatedDealList> {
70
- return __request(OpenAPI, {
71
- method: 'GET',
72
- url: '/deals/',
73
- query: {
74
- 'created_at__gte': createdAtGte,
75
- 'created_at__lte': createdAtLte,
76
- 'expected_close_date__gte': expectedCloseDateGte,
77
- 'expected_close_date__lte': expectedCloseDateLte,
78
- 'metadata__has_key': metadataHasKey,
79
- 'organization': organization,
80
- 'owner': owner,
81
- 'page': page,
82
- 'page_size': pageSize,
83
- 'person': person,
84
- 'pipeline': pipeline,
85
- 'source': source,
86
- 'stage': stage,
87
- 'status': status,
88
- 'tags': tags,
89
- },
90
- errors: {
91
- 401: `Authentication required.`,
92
- 403: `Missing required permission \`Ibl.CRM/Deals/list\`.`,
93
- },
94
- });
95
- }
96
- /**
97
- * Create a deal
98
- * Creates a new Deal. All FK targets (`person`, `organization`, `pipeline`, `stage`, `source`) must belong to your Platform; `stage` must belong to `pipeline`. `status` and `closed_at` are service-managed — passing them returns `400`.
99
- *
100
- * **Required permission:** `Ibl.CRM/Deals/action`.
101
- * @returns Deal
102
- * @throws ApiError
103
- */
104
- public static dealsCreate({
105
- requestBody,
106
- }: {
107
- requestBody: Deal,
108
- }): CancelablePromise<Deal> {
109
- return __request(OpenAPI, {
110
- method: 'POST',
111
- url: '/deals/',
112
- body: requestBody,
113
- mediaType: 'application/json',
114
- errors: {
115
- 400: `Validation error.`,
116
- 403: `Missing required permission \`Ibl.CRM/Deals/action\`.`,
117
- },
118
- });
119
- }
120
- /**
121
- * Retrieve a deal
122
- * Returns a single Deal by id.
123
- *
124
- * **Required permission:** `Ibl.CRM/Deals/read`.
125
- * @returns Deal
126
- * @throws ApiError
127
- */
128
- public static dealsRetrieve({
129
- id,
130
- }: {
131
- /**
132
- * A unique integer value identifying this deal.
133
- */
134
- id: number,
135
- }): CancelablePromise<Deal> {
136
- return __request(OpenAPI, {
137
- method: 'GET',
138
- url: '/deals/{id}/',
139
- path: {
140
- 'id': id,
141
- },
142
- errors: {
143
- 403: `Missing required permission \`Ibl.CRM/Deals/read\`.`,
144
- 404: `Deal not found.`,
145
- },
146
- });
147
- }
148
- /**
149
- * Replace a deal
150
- * Replaces all editable fields on the Deal.
151
- *
152
- * **Required permission:** `Ibl.CRM/Deals/write`.
153
- * @returns Deal
154
- * @throws ApiError
155
- */
156
- public static dealsUpdate({
157
- id,
158
- requestBody,
159
- }: {
160
- /**
161
- * A unique integer value identifying this deal.
162
- */
163
- id: number,
164
- requestBody: Deal,
165
- }): CancelablePromise<Deal> {
166
- return __request(OpenAPI, {
167
- method: 'PUT',
168
- url: '/deals/{id}/',
169
- path: {
170
- 'id': id,
171
- },
172
- body: requestBody,
173
- mediaType: 'application/json',
174
- errors: {
175
- 400: `Validation error.`,
176
- 403: `Missing required permission \`Ibl.CRM/Deals/write\`.`,
177
- 404: `Deal not found.`,
178
- },
179
- });
180
- }
181
- /**
182
- * Update a deal
183
- * 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/`.
184
- *
185
- * **Required permission:** `Ibl.CRM/Deals/write`.
186
- * @returns Deal
187
- * @throws ApiError
188
- */
189
- public static dealsPartialUpdate({
190
- id,
191
- requestBody,
192
- }: {
193
- /**
194
- * A unique integer value identifying this deal.
195
- */
196
- id: number,
197
- requestBody?: PatchedDeal,
198
- }): CancelablePromise<Deal> {
199
- return __request(OpenAPI, {
200
- method: 'PATCH',
201
- url: '/deals/{id}/',
202
- path: {
203
- 'id': id,
204
- },
205
- body: requestBody,
206
- mediaType: 'application/json',
207
- errors: {
208
- 400: `Validation error.`,
209
- 403: `Missing required permission \`Ibl.CRM/Deals/write\`.`,
210
- 404: `Deal not found.`,
211
- },
212
- });
213
- }
214
- /**
215
- * Delete a deal
216
- * Deletes the Deal.
217
- *
218
- * **Required permission:** `Ibl.CRM/Deals/delete`.
219
- * @returns void
220
- * @throws ApiError
221
- */
222
- public static dealsDestroy({
223
- id,
224
- }: {
225
- /**
226
- * A unique integer value identifying this deal.
227
- */
228
- id: number,
229
- }): CancelablePromise<void> {
230
- return __request(OpenAPI, {
231
- method: 'DELETE',
232
- url: '/deals/{id}/',
233
- path: {
234
- 'id': id,
235
- },
236
- errors: {
237
- 403: `Missing required permission \`Ibl.CRM/Deals/delete\`.`,
238
- 404: `Deal not found.`,
239
- },
240
- });
241
- }
242
- /**
243
- * Mark a deal as lost
244
- * 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.
245
- *
246
- * **Required permission:** `Ibl.CRM/Deals/write`.
247
- * @returns Deal
248
- * @throws ApiError
249
- */
250
- public static dealsLostCreate({
251
- id,
252
- requestBody,
253
- }: {
254
- /**
255
- * A unique integer value identifying this deal.
256
- */
257
- id: number,
258
- requestBody: DealLostRequest,
259
- }): CancelablePromise<Deal> {
260
- return __request(OpenAPI, {
261
- method: 'POST',
262
- url: '/deals/{id}/lost/',
263
- path: {
264
- 'id': id,
265
- },
266
- body: requestBody,
267
- mediaType: 'application/json',
268
- errors: {
269
- 400: `Missing \`lost_reason\`, no \`is_lost\` stage configured, or the supplied stage_code is not flagged is_lost=True.`,
270
- 403: `Missing required permission \`Ibl.CRM/Deals/write\`.`,
271
- 404: `Deal not found.`,
272
- },
273
- });
274
- }
275
- /**
276
- * Move a deal to a different stage
277
- * 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.
278
- *
279
- * **Required permission:** `Ibl.CRM/Deals/write`.
280
- * @returns Deal
281
- * @throws ApiError
282
- */
283
- public static dealsMoveStageCreate({
284
- id,
285
- requestBody,
286
- }: {
287
- /**
288
- * A unique integer value identifying this deal.
289
- */
290
- id: number,
291
- requestBody?: DealMoveStageRequest,
292
- }): CancelablePromise<Deal> {
293
- return __request(OpenAPI, {
294
- method: 'POST',
295
- url: '/deals/{id}/move-stage/',
296
- path: {
297
- 'id': id,
298
- },
299
- body: requestBody,
300
- mediaType: 'application/json',
301
- errors: {
302
- 400: `Validation error (e.g. stage not in pipeline).`,
303
- 403: `Missing required permission \`Ibl.CRM/Deals/write\`.`,
304
- 404: `Deal or stage not found.`,
305
- },
306
- });
307
- }
308
- /**
309
- * Attach a tag to this record
310
- * Attaches an existing Tag to this record. Both the Tag and the record must belong to your Platform. Returns `409 Conflict` with the existing `assignment_id` if the tag is already attached.
311
- *
312
- * **Required permission:** `Ibl.CRM/Tags/write`.
313
- * @returns any No response body
314
- * @throws ApiError
315
- */
316
- public static dealsTagsCreate({
317
- id,
318
- requestBody,
319
- }: {
320
- /**
321
- * A unique integer value identifying this deal.
322
- */
323
- id: number,
324
- requestBody: _TagAttachRequest,
325
- }): CancelablePromise<any> {
326
- return __request(OpenAPI, {
327
- method: 'POST',
328
- url: '/deals/{id}/tags/',
329
- path: {
330
- 'id': id,
331
- },
332
- body: requestBody,
333
- mediaType: 'application/json',
334
- errors: {
335
- 400: `No response body`,
336
- 403: `No response body`,
337
- 404: `No response body`,
338
- 409: `No response body`,
339
- },
340
- });
341
- }
342
- /**
343
- * Detach a tag from this record
344
- * Removes the Tag with id `tag_id` from this record. Returns `404` if the tag was not attached.
345
- *
346
- * **Required permission:** `Ibl.CRM/Tags/write`.
347
- * @returns void
348
- * @throws ApiError
349
- */
350
- public static dealsTagsDestroy({
351
- id,
352
- tagId,
353
- }: {
354
- /**
355
- * A unique integer value identifying this deal.
356
- */
357
- id: number,
358
- tagId: string,
359
- }): CancelablePromise<void> {
360
- return __request(OpenAPI, {
361
- method: 'DELETE',
362
- url: '/deals/{id}/tags/{tag_id}/',
363
- path: {
364
- 'id': id,
365
- 'tag_id': tagId,
366
- },
367
- errors: {
368
- 403: `No response body`,
369
- 404: `No response body`,
370
- },
371
- });
372
- }
373
- /**
374
- * Mark a deal as won
375
- * Moves the Deal into a closed-won stage and sets `status='won'`. If `stage_code` is omitted, the first `is_won=True` stage in the Deal's pipeline (by sort order) is used.
376
- *
377
- * **Required permission:** `Ibl.CRM/Deals/write`.
378
- * @returns Deal
379
- * @throws ApiError
380
- */
381
- public static dealsWonCreate({
382
- id,
383
- requestBody,
384
- }: {
385
- /**
386
- * A unique integer value identifying this deal.
387
- */
388
- id: number,
389
- requestBody?: DealWonRequest,
390
- }): CancelablePromise<Deal> {
391
- return __request(OpenAPI, {
392
- method: 'POST',
393
- url: '/deals/{id}/won/',
394
- path: {
395
- 'id': id,
396
- },
397
- body: requestBody,
398
- mediaType: 'application/json',
399
- errors: {
400
- 400: `No \`is_won\` stage configured, or the supplied stage_code is not flagged is_won=True.`,
401
- 403: `Missing required permission \`Ibl.CRM/Deals/write\`.`,
402
- 404: `Deal not found.`,
403
- },
404
- });
405
- }
406
- }
@@ -1,29 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do not edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- import type { PublicItemPricing } from '../models/PublicItemPricing';
6
- import type { CancelablePromise } from '../core/CancelablePromise';
7
- import { OpenAPI } from '../core/OpenAPI';
8
- import { request as __request } from '../core/request';
9
- export class ItemsService {
10
- /**
11
- * Get public pricing by paywall config unique_id
12
- * Looks up the paywall config by its unique_id and delegates to the standard public pricing endpoint.
13
- * @returns PublicItemPricing
14
- * @throws ApiError
15
- */
16
- public static itemsPublicPricingRetrieve({
17
- configUniqueId,
18
- }: {
19
- configUniqueId: string,
20
- }): CancelablePromise<PublicItemPricing> {
21
- return __request(OpenAPI, {
22
- method: 'GET',
23
- url: '/items/{config_unique_id}/public-pricing/',
24
- path: {
25
- 'config_unique_id': configUniqueId,
26
- },
27
- });
28
- }
29
- }
@@ -1,198 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do not edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- import type { LeadSource } from '../models/LeadSource';
6
- import type { PaginatedLeadSourceList } from '../models/PaginatedLeadSourceList';
7
- import type { PatchedLeadSource } from '../models/PatchedLeadSource';
8
- import type { CancelablePromise } from '../core/CancelablePromise';
9
- import { OpenAPI } from '../core/OpenAPI';
10
- import { request as __request } from '../core/request';
11
- export class LeadSourcesService {
12
- /**
13
- * List lead sources
14
- * Returns a paginated list of LeadSources in your Platform.
15
- *
16
- * **Required permission:** `Ibl.CRM/Pipelines/list`.
17
- * @returns PaginatedLeadSourceList
18
- * @throws ApiError
19
- */
20
- public static leadSourcesList({
21
- code,
22
- name,
23
- page,
24
- pageSize,
25
- }: {
26
- code?: string,
27
- name?: string,
28
- /**
29
- * A page number within the paginated result set.
30
- */
31
- page?: number,
32
- /**
33
- * Number of results to return per page.
34
- */
35
- pageSize?: number,
36
- }): CancelablePromise<PaginatedLeadSourceList> {
37
- return __request(OpenAPI, {
38
- method: 'GET',
39
- url: '/lead-sources/',
40
- query: {
41
- 'code': code,
42
- 'name': name,
43
- 'page': page,
44
- 'page_size': pageSize,
45
- },
46
- errors: {
47
- 401: `Authentication required.`,
48
- 403: `Missing required permission \`Ibl.CRM/Pipelines/list\`.`,
49
- },
50
- });
51
- }
52
- /**
53
- * Create a lead source
54
- * Creates a new LeadSource in your Platform. `code` must be unique.
55
- *
56
- * **Required permission:** `Ibl.CRM/Pipelines/action`.
57
- * @returns LeadSource
58
- * @throws ApiError
59
- */
60
- public static leadSourcesCreate({
61
- requestBody,
62
- }: {
63
- requestBody: LeadSource,
64
- }): CancelablePromise<LeadSource> {
65
- return __request(OpenAPI, {
66
- method: 'POST',
67
- url: '/lead-sources/',
68
- body: requestBody,
69
- mediaType: 'application/json',
70
- errors: {
71
- 400: `Validation error.`,
72
- 403: `Missing required permission \`Ibl.CRM/Pipelines/action\`.`,
73
- },
74
- });
75
- }
76
- /**
77
- * Retrieve a lead source
78
- * Returns a single LeadSource by id.
79
- *
80
- * **Required permission:** `Ibl.CRM/Pipelines/read`.
81
- * @returns LeadSource
82
- * @throws ApiError
83
- */
84
- public static leadSourcesRetrieve({
85
- id,
86
- }: {
87
- /**
88
- * A unique integer value identifying this lead source.
89
- */
90
- id: number,
91
- }): CancelablePromise<LeadSource> {
92
- return __request(OpenAPI, {
93
- method: 'GET',
94
- url: '/lead-sources/{id}/',
95
- path: {
96
- 'id': id,
97
- },
98
- errors: {
99
- 403: `Missing required permission \`Ibl.CRM/Pipelines/read\`.`,
100
- 404: `LeadSource not found.`,
101
- },
102
- });
103
- }
104
- /**
105
- * Replace a lead source
106
- * Replaces all editable fields on the LeadSource.
107
- *
108
- * **Required permission:** `Ibl.CRM/Pipelines/write`.
109
- * @returns LeadSource
110
- * @throws ApiError
111
- */
112
- public static leadSourcesUpdate({
113
- id,
114
- requestBody,
115
- }: {
116
- /**
117
- * A unique integer value identifying this lead source.
118
- */
119
- id: number,
120
- requestBody: LeadSource,
121
- }): CancelablePromise<LeadSource> {
122
- return __request(OpenAPI, {
123
- method: 'PUT',
124
- url: '/lead-sources/{id}/',
125
- path: {
126
- 'id': id,
127
- },
128
- body: requestBody,
129
- mediaType: 'application/json',
130
- errors: {
131
- 400: `Validation error.`,
132
- 403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`,
133
- 404: `LeadSource not found.`,
134
- },
135
- });
136
- }
137
- /**
138
- * Update a lead source
139
- * Updates only the supplied fields on the LeadSource.
140
- *
141
- * **Required permission:** `Ibl.CRM/Pipelines/write`.
142
- * @returns LeadSource
143
- * @throws ApiError
144
- */
145
- public static leadSourcesPartialUpdate({
146
- id,
147
- requestBody,
148
- }: {
149
- /**
150
- * A unique integer value identifying this lead source.
151
- */
152
- id: number,
153
- requestBody?: PatchedLeadSource,
154
- }): CancelablePromise<LeadSource> {
155
- return __request(OpenAPI, {
156
- method: 'PATCH',
157
- url: '/lead-sources/{id}/',
158
- path: {
159
- 'id': id,
160
- },
161
- body: requestBody,
162
- mediaType: 'application/json',
163
- errors: {
164
- 400: `Validation error.`,
165
- 403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`,
166
- 404: `LeadSource not found.`,
167
- },
168
- });
169
- }
170
- /**
171
- * Delete a lead source
172
- * Deletes the LeadSource. Any Deals referencing it have their `source` cleared.
173
- *
174
- * **Required permission:** `Ibl.CRM/Pipelines/delete`.
175
- * @returns void
176
- * @throws ApiError
177
- */
178
- public static leadSourcesDestroy({
179
- id,
180
- }: {
181
- /**
182
- * A unique integer value identifying this lead source.
183
- */
184
- id: number,
185
- }): CancelablePromise<void> {
186
- return __request(OpenAPI, {
187
- method: 'DELETE',
188
- url: '/lead-sources/{id}/',
189
- path: {
190
- 'id': id,
191
- },
192
- errors: {
193
- 403: `Missing required permission \`Ibl.CRM/Pipelines/delete\`.`,
194
- 404: `LeadSource not found.`,
195
- },
196
- });
197
- }
198
- }