@iblai/iblai-api 4.261.1-core → 4.262.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.
- package/dist/index.cjs.js +943 -123
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +941 -124
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +943 -123
- package/dist/index.umd.js.map +1 -1
- package/dist/types/index.d.ts +16 -0
- package/dist/types/models/LifecycleStageEnum.d.ts +14 -0
- package/dist/types/models/Organization.d.ts +34 -0
- package/dist/types/models/PaginatedOrganizationList.d.ts +7 -0
- package/dist/types/models/PaginatedPersonList.d.ts +7 -0
- package/dist/types/models/PatchedOrganization.d.ts +34 -0
- package/dist/types/models/PatchedPerson.d.ts +73 -0
- package/dist/types/models/Person.d.ts +73 -0
- package/dist/types/models/PersonInviteConflict.d.ts +12 -0
- package/dist/types/models/PersonInviteRequest.d.ts +18 -0
- package/dist/types/models/PersonInviteResponse.d.ts +37 -0
- package/dist/types/models/PersonLinkUserRequest.d.ts +6 -0
- package/dist/types/models/PersonMergeRequest.d.ts +10 -0
- package/dist/types/models/PersonMergeResponse.d.ts +17 -0
- package/dist/types/services/CrmService.d.ts +222 -0
- package/dist/types/services/OrganizationsService.d.ts +83 -0
- package/dist/types/services/PersonsService.d.ts +142 -0
- package/package.json +1 -1
- package/sdk_schema.yml +1803 -1
- package/src/core/OpenAPI.ts +1 -1
- package/src/index.ts +16 -0
- package/src/models/LifecycleStageEnum.ts +18 -0
- package/src/models/Organization.ts +39 -0
- package/src/models/PaginatedOrganizationList.ts +12 -0
- package/src/models/PaginatedPersonList.ts +12 -0
- package/src/models/PatchedOrganization.ts +39 -0
- package/src/models/PatchedPerson.ts +78 -0
- package/src/models/Person.ts +78 -0
- package/src/models/PersonInviteConflict.ts +17 -0
- package/src/models/PersonInviteRequest.ts +23 -0
- package/src/models/PersonInviteResponse.ts +42 -0
- package/src/models/PersonLinkUserRequest.ts +11 -0
- package/src/models/PersonMergeRequest.ts +15 -0
- package/src/models/PersonMergeResponse.ts +22 -0
- package/src/services/CrmService.ts +481 -0
- package/src/services/OrganizationsService.ts +186 -0
- package/src/services/PersonsService.ts +304 -0
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.
|
|
113
|
+
VERSION: '4.262.0-core',
|
|
114
114
|
WITH_CREDENTIALS: false,
|
|
115
115
|
CREDENTIALS: 'include',
|
|
116
116
|
TOKEN: undefined,
|
|
@@ -493,6 +493,26 @@ exports.ItemTypeEnum = void 0;
|
|
|
493
493
|
ItemTypeEnum["ALL"] = "all";
|
|
494
494
|
})(exports.ItemTypeEnum || (exports.ItemTypeEnum = {}));
|
|
495
495
|
|
|
496
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
497
|
+
/* istanbul ignore file */
|
|
498
|
+
/* tslint:disable */
|
|
499
|
+
/* eslint-disable */
|
|
500
|
+
/**
|
|
501
|
+
* * `lead` - Lead
|
|
502
|
+
* * `qualified` - Qualified
|
|
503
|
+
* * `opportunity` - Opportunity
|
|
504
|
+
* * `customer` - Customer
|
|
505
|
+
* * `churned` - Churned
|
|
506
|
+
*/
|
|
507
|
+
exports.LifecycleStageEnum = void 0;
|
|
508
|
+
(function (LifecycleStageEnum) {
|
|
509
|
+
LifecycleStageEnum["LEAD"] = "lead";
|
|
510
|
+
LifecycleStageEnum["QUALIFIED"] = "qualified";
|
|
511
|
+
LifecycleStageEnum["OPPORTUNITY"] = "opportunity";
|
|
512
|
+
LifecycleStageEnum["CUSTOMER"] = "customer";
|
|
513
|
+
LifecycleStageEnum["CHURNED"] = "churned";
|
|
514
|
+
})(exports.LifecycleStageEnum || (exports.LifecycleStageEnum = {}));
|
|
515
|
+
|
|
496
516
|
/* generated using openapi-typescript-codegen -- do not edit */
|
|
497
517
|
/* istanbul ignore file */
|
|
498
518
|
/* tslint:disable */
|
|
@@ -19725,249 +19745,646 @@ class CreditsService {
|
|
|
19725
19745
|
}
|
|
19726
19746
|
}
|
|
19727
19747
|
|
|
19728
|
-
class
|
|
19748
|
+
class CrmService {
|
|
19729
19749
|
/**
|
|
19730
|
-
*
|
|
19731
|
-
*
|
|
19750
|
+
* List organizations
|
|
19751
|
+
* Returns a paginated list of organizations in your Platform. Supports filtering by `owner` and by `name` (case-insensitive substring match).
|
|
19752
|
+
*
|
|
19753
|
+
* **Required permission:** `Ibl.CRM/Organizations/list`.
|
|
19754
|
+
* @returns PaginatedOrganizationList
|
|
19732
19755
|
* @throws ApiError
|
|
19733
19756
|
*/
|
|
19734
|
-
static
|
|
19757
|
+
static crmOrganizationsList({
|
|
19758
|
+
name,
|
|
19759
|
+
owner,
|
|
19760
|
+
page,
|
|
19761
|
+
pageSize
|
|
19762
|
+
}) {
|
|
19735
19763
|
return request(OpenAPI, {
|
|
19736
19764
|
method: 'GET',
|
|
19737
|
-
url: '/api/
|
|
19765
|
+
url: '/api/crm/organizations/',
|
|
19766
|
+
query: {
|
|
19767
|
+
'name': name,
|
|
19768
|
+
'owner': owner,
|
|
19769
|
+
'page': page,
|
|
19770
|
+
'page_size': pageSize
|
|
19771
|
+
},
|
|
19772
|
+
errors: {
|
|
19773
|
+
401: `Authentication required.`,
|
|
19774
|
+
403: `Missing required permission \`Ibl.CRM/Organizations/list\`.`
|
|
19775
|
+
}
|
|
19738
19776
|
});
|
|
19739
19777
|
}
|
|
19740
19778
|
/**
|
|
19741
|
-
*
|
|
19742
|
-
*
|
|
19779
|
+
* Create an organization
|
|
19780
|
+
* Creates a new organization in your Platform. The Platform is inferred from your credentials. `name` must be unique within your Platform.
|
|
19781
|
+
*
|
|
19782
|
+
* **Required permission:** `Ibl.CRM/Organizations/write`.
|
|
19783
|
+
* @returns Organization
|
|
19743
19784
|
* @throws ApiError
|
|
19744
19785
|
*/
|
|
19745
|
-
static
|
|
19746
|
-
|
|
19786
|
+
static crmOrganizationsCreate({
|
|
19787
|
+
requestBody
|
|
19747
19788
|
}) {
|
|
19748
19789
|
return request(OpenAPI, {
|
|
19749
|
-
method: '
|
|
19750
|
-
url: '/api/
|
|
19751
|
-
|
|
19752
|
-
|
|
19790
|
+
method: 'POST',
|
|
19791
|
+
url: '/api/crm/organizations/',
|
|
19792
|
+
body: requestBody,
|
|
19793
|
+
mediaType: 'application/json',
|
|
19794
|
+
errors: {
|
|
19795
|
+
400: `Validation error (for example, duplicate name).`,
|
|
19796
|
+
403: `Missing required permission \`Ibl.CRM/Organizations/write\`.`
|
|
19753
19797
|
}
|
|
19754
19798
|
});
|
|
19755
19799
|
}
|
|
19756
19800
|
/**
|
|
19757
|
-
*
|
|
19758
|
-
*
|
|
19801
|
+
* Retrieve an organization
|
|
19802
|
+
* Returns a single organization by id.
|
|
19803
|
+
*
|
|
19804
|
+
* **Required permission:** `Ibl.CRM/Organizations/read`.
|
|
19805
|
+
* @returns Organization
|
|
19759
19806
|
* @throws ApiError
|
|
19760
19807
|
*/
|
|
19761
|
-
static
|
|
19762
|
-
|
|
19808
|
+
static crmOrganizationsRetrieve({
|
|
19809
|
+
id
|
|
19763
19810
|
}) {
|
|
19764
19811
|
return request(OpenAPI, {
|
|
19765
|
-
method: '
|
|
19766
|
-
url: '/api/
|
|
19812
|
+
method: 'GET',
|
|
19813
|
+
url: '/api/crm/organizations/{id}/',
|
|
19767
19814
|
path: {
|
|
19768
|
-
'
|
|
19815
|
+
'id': id
|
|
19816
|
+
},
|
|
19817
|
+
errors: {
|
|
19818
|
+
403: `Missing required permission \`Ibl.CRM/Organizations/read\`.`,
|
|
19819
|
+
404: `Organization not found.`
|
|
19769
19820
|
}
|
|
19770
19821
|
});
|
|
19771
19822
|
}
|
|
19772
19823
|
/**
|
|
19773
|
-
*
|
|
19774
|
-
*
|
|
19824
|
+
* Replace an organization
|
|
19825
|
+
* Replaces all editable fields on the organization.
|
|
19826
|
+
*
|
|
19827
|
+
* **Required permission:** `Ibl.CRM/Organizations/write`.
|
|
19828
|
+
* @returns Organization
|
|
19775
19829
|
* @throws ApiError
|
|
19776
19830
|
*/
|
|
19777
|
-
static
|
|
19778
|
-
|
|
19831
|
+
static crmOrganizationsUpdate({
|
|
19832
|
+
id,
|
|
19833
|
+
requestBody
|
|
19779
19834
|
}) {
|
|
19780
19835
|
return request(OpenAPI, {
|
|
19781
19836
|
method: 'PUT',
|
|
19782
|
-
url: '/api/
|
|
19837
|
+
url: '/api/crm/organizations/{id}/',
|
|
19783
19838
|
path: {
|
|
19784
|
-
'
|
|
19839
|
+
'id': id
|
|
19840
|
+
},
|
|
19841
|
+
body: requestBody,
|
|
19842
|
+
mediaType: 'application/json',
|
|
19843
|
+
errors: {
|
|
19844
|
+
400: `Validation error.`,
|
|
19845
|
+
403: `Missing required permission \`Ibl.CRM/Organizations/write\`.`,
|
|
19846
|
+
404: `Organization not found.`
|
|
19785
19847
|
}
|
|
19786
19848
|
});
|
|
19787
19849
|
}
|
|
19788
19850
|
/**
|
|
19789
|
-
*
|
|
19790
|
-
*
|
|
19851
|
+
* Update an organization
|
|
19852
|
+
* Updates only the supplied fields on the organization.
|
|
19853
|
+
*
|
|
19854
|
+
* **Required permission:** `Ibl.CRM/Organizations/write`.
|
|
19855
|
+
* @returns Organization
|
|
19791
19856
|
* @throws ApiError
|
|
19792
19857
|
*/
|
|
19793
|
-
static
|
|
19794
|
-
|
|
19858
|
+
static crmOrganizationsPartialUpdate({
|
|
19859
|
+
id,
|
|
19860
|
+
requestBody
|
|
19795
19861
|
}) {
|
|
19796
19862
|
return request(OpenAPI, {
|
|
19797
|
-
method: '
|
|
19798
|
-
url: '/api/
|
|
19863
|
+
method: 'PATCH',
|
|
19864
|
+
url: '/api/crm/organizations/{id}/',
|
|
19799
19865
|
path: {
|
|
19800
|
-
'
|
|
19866
|
+
'id': id
|
|
19867
|
+
},
|
|
19868
|
+
body: requestBody,
|
|
19869
|
+
mediaType: 'application/json',
|
|
19870
|
+
errors: {
|
|
19871
|
+
400: `Validation error.`,
|
|
19872
|
+
403: `Missing required permission \`Ibl.CRM/Organizations/write\`.`,
|
|
19873
|
+
404: `Organization not found.`
|
|
19801
19874
|
}
|
|
19802
19875
|
});
|
|
19803
19876
|
}
|
|
19804
19877
|
/**
|
|
19805
|
-
*
|
|
19806
|
-
*
|
|
19878
|
+
* Delete an organization
|
|
19879
|
+
* Deletes the organization. Any persons linked to it are kept; their organization reference is cleared.
|
|
19880
|
+
*
|
|
19881
|
+
* **Required permission:** `Ibl.CRM/Organizations/delete`.
|
|
19882
|
+
* @returns void
|
|
19807
19883
|
* @throws ApiError
|
|
19808
19884
|
*/
|
|
19809
|
-
static
|
|
19885
|
+
static crmOrganizationsDestroy({
|
|
19886
|
+
id
|
|
19887
|
+
}) {
|
|
19810
19888
|
return request(OpenAPI, {
|
|
19811
|
-
method: '
|
|
19812
|
-
url: '/api/
|
|
19889
|
+
method: 'DELETE',
|
|
19890
|
+
url: '/api/crm/organizations/{id}/',
|
|
19891
|
+
path: {
|
|
19892
|
+
'id': id
|
|
19893
|
+
},
|
|
19894
|
+
errors: {
|
|
19895
|
+
403: `Missing required permission \`Ibl.CRM/Organizations/delete\`.`,
|
|
19896
|
+
404: `Organization not found.`
|
|
19897
|
+
}
|
|
19813
19898
|
});
|
|
19814
19899
|
}
|
|
19815
|
-
}
|
|
19816
|
-
|
|
19817
|
-
class FeaturesService {
|
|
19818
19900
|
/**
|
|
19819
|
-
*
|
|
19820
|
-
*
|
|
19901
|
+
* List persons
|
|
19902
|
+
* 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`.
|
|
19903
|
+
*
|
|
19904
|
+
* **Required permission:** `Ibl.CRM/Persons/list`.
|
|
19905
|
+
* @returns PaginatedPersonList
|
|
19821
19906
|
* @throws ApiError
|
|
19822
19907
|
*/
|
|
19823
|
-
static
|
|
19908
|
+
static crmPersonsList({
|
|
19909
|
+
createdAtGte,
|
|
19910
|
+
createdAtLte,
|
|
19911
|
+
lifecycleStage,
|
|
19912
|
+
metadataHasKey,
|
|
19913
|
+
organization,
|
|
19914
|
+
owner,
|
|
19824
19915
|
page,
|
|
19825
19916
|
pageSize
|
|
19826
19917
|
}) {
|
|
19827
19918
|
return request(OpenAPI, {
|
|
19828
19919
|
method: 'GET',
|
|
19829
|
-
url: '/api/
|
|
19920
|
+
url: '/api/crm/persons/',
|
|
19830
19921
|
query: {
|
|
19922
|
+
'created_at__gte': createdAtGte,
|
|
19923
|
+
'created_at__lte': createdAtLte,
|
|
19924
|
+
'lifecycle_stage': lifecycleStage,
|
|
19925
|
+
'metadata__has_key': metadataHasKey,
|
|
19926
|
+
'organization': organization,
|
|
19927
|
+
'owner': owner,
|
|
19831
19928
|
'page': page,
|
|
19832
19929
|
'page_size': pageSize
|
|
19930
|
+
},
|
|
19931
|
+
errors: {
|
|
19932
|
+
401: `Authentication required.`,
|
|
19933
|
+
403: `Missing required permission \`Ibl.CRM/Persons/list\`.`
|
|
19833
19934
|
}
|
|
19834
19935
|
});
|
|
19835
19936
|
}
|
|
19836
19937
|
/**
|
|
19837
|
-
*
|
|
19838
|
-
*
|
|
19938
|
+
* Create a person
|
|
19939
|
+
* Creates a new person in your Platform. The Platform is inferred from your credentials. If `organization` is supplied, it must reference an organization in your Platform.
|
|
19940
|
+
*
|
|
19941
|
+
* **Required permission:** `Ibl.CRM/Persons/write`.
|
|
19942
|
+
* @returns Person
|
|
19839
19943
|
* @throws ApiError
|
|
19840
19944
|
*/
|
|
19841
|
-
static
|
|
19945
|
+
static crmPersonsCreate({
|
|
19842
19946
|
requestBody
|
|
19843
19947
|
}) {
|
|
19844
19948
|
return request(OpenAPI, {
|
|
19845
19949
|
method: 'POST',
|
|
19846
|
-
url: '/api/
|
|
19950
|
+
url: '/api/crm/persons/',
|
|
19847
19951
|
body: requestBody,
|
|
19848
|
-
mediaType: 'application/json'
|
|
19952
|
+
mediaType: 'application/json',
|
|
19953
|
+
errors: {
|
|
19954
|
+
400: `Validation error.`,
|
|
19955
|
+
403: `Missing required permission \`Ibl.CRM/Persons/write\`.`
|
|
19956
|
+
}
|
|
19849
19957
|
});
|
|
19850
19958
|
}
|
|
19851
19959
|
/**
|
|
19852
|
-
*
|
|
19960
|
+
* Retrieve a person
|
|
19961
|
+
* Returns a single person by id.
|
|
19853
19962
|
*
|
|
19854
|
-
*
|
|
19963
|
+
* **Required permission:** `Ibl.CRM/Persons/read`.
|
|
19964
|
+
* @returns Person
|
|
19965
|
+
* @throws ApiError
|
|
19966
|
+
*/
|
|
19967
|
+
static crmPersonsRetrieve({
|
|
19968
|
+
id
|
|
19969
|
+
}) {
|
|
19970
|
+
return request(OpenAPI, {
|
|
19971
|
+
method: 'GET',
|
|
19972
|
+
url: '/api/crm/persons/{id}/',
|
|
19973
|
+
path: {
|
|
19974
|
+
'id': id
|
|
19975
|
+
},
|
|
19976
|
+
errors: {
|
|
19977
|
+
403: `Missing required permission \`Ibl.CRM/Persons/read\`.`,
|
|
19978
|
+
404: `Person not found.`
|
|
19979
|
+
}
|
|
19980
|
+
});
|
|
19981
|
+
}
|
|
19982
|
+
/**
|
|
19983
|
+
* Replace a person
|
|
19984
|
+
* Replaces all editable fields on the person.
|
|
19855
19985
|
*
|
|
19856
|
-
*
|
|
19857
|
-
* @returns
|
|
19986
|
+
* **Required permission:** `Ibl.CRM/Persons/write`.
|
|
19987
|
+
* @returns Person
|
|
19858
19988
|
* @throws ApiError
|
|
19859
19989
|
*/
|
|
19860
|
-
static
|
|
19990
|
+
static crmPersonsUpdate({
|
|
19991
|
+
id,
|
|
19861
19992
|
requestBody
|
|
19862
19993
|
}) {
|
|
19863
19994
|
return request(OpenAPI, {
|
|
19864
|
-
method: '
|
|
19865
|
-
url: '/api/
|
|
19995
|
+
method: 'PUT',
|
|
19996
|
+
url: '/api/crm/persons/{id}/',
|
|
19997
|
+
path: {
|
|
19998
|
+
'id': id
|
|
19999
|
+
},
|
|
19866
20000
|
body: requestBody,
|
|
19867
|
-
mediaType: 'application/json'
|
|
20001
|
+
mediaType: 'application/json',
|
|
20002
|
+
errors: {
|
|
20003
|
+
400: `Validation error.`,
|
|
20004
|
+
403: `Missing required permission \`Ibl.CRM/Persons/write\`.`,
|
|
20005
|
+
404: `Person not found.`
|
|
20006
|
+
}
|
|
19868
20007
|
});
|
|
19869
20008
|
}
|
|
19870
20009
|
/**
|
|
19871
|
-
*
|
|
19872
|
-
*
|
|
19873
|
-
*
|
|
19874
|
-
* NOTE: Will not create user feature configs
|
|
19875
|
-
*
|
|
19876
|
-
* Params:
|
|
19877
|
-
* platform_key
|
|
20010
|
+
* Update a person
|
|
20011
|
+
* Updates only the supplied fields on the person.
|
|
19878
20012
|
*
|
|
19879
|
-
*
|
|
19880
|
-
*
|
|
19881
|
-
* feature
|
|
19882
|
-
* values
|
|
19883
|
-
* @returns any No response body
|
|
20013
|
+
* **Required permission:** `Ibl.CRM/Persons/write`.
|
|
20014
|
+
* @returns Person
|
|
19884
20015
|
* @throws ApiError
|
|
19885
20016
|
*/
|
|
19886
|
-
static
|
|
20017
|
+
static crmPersonsPartialUpdate({
|
|
20018
|
+
id,
|
|
20019
|
+
requestBody
|
|
20020
|
+
}) {
|
|
19887
20021
|
return request(OpenAPI, {
|
|
19888
|
-
method: '
|
|
19889
|
-
url: '/api/
|
|
20022
|
+
method: 'PATCH',
|
|
20023
|
+
url: '/api/crm/persons/{id}/',
|
|
20024
|
+
path: {
|
|
20025
|
+
'id': id
|
|
20026
|
+
},
|
|
20027
|
+
body: requestBody,
|
|
20028
|
+
mediaType: 'application/json',
|
|
20029
|
+
errors: {
|
|
20030
|
+
400: `Validation error.`,
|
|
20031
|
+
403: `Missing required permission \`Ibl.CRM/Persons/write\`.`,
|
|
20032
|
+
404: `Person not found.`
|
|
20033
|
+
}
|
|
19890
20034
|
});
|
|
19891
20035
|
}
|
|
19892
20036
|
/**
|
|
19893
|
-
*
|
|
20037
|
+
* Delete a person
|
|
20038
|
+
* Deletes the person.
|
|
19894
20039
|
*
|
|
19895
|
-
*
|
|
19896
|
-
*
|
|
19897
|
-
* platform_key
|
|
19898
|
-
* @returns any No response body
|
|
20040
|
+
* **Required permission:** `Ibl.CRM/Persons/delete`.
|
|
20041
|
+
* @returns void
|
|
19899
20042
|
* @throws ApiError
|
|
19900
20043
|
*/
|
|
19901
|
-
static
|
|
20044
|
+
static crmPersonsDestroy({
|
|
20045
|
+
id
|
|
20046
|
+
}) {
|
|
19902
20047
|
return request(OpenAPI, {
|
|
19903
|
-
method: '
|
|
19904
|
-
url: '/api/
|
|
20048
|
+
method: 'DELETE',
|
|
20049
|
+
url: '/api/crm/persons/{id}/',
|
|
20050
|
+
path: {
|
|
20051
|
+
'id': id
|
|
20052
|
+
},
|
|
20053
|
+
errors: {
|
|
20054
|
+
403: `Missing required permission \`Ibl.CRM/Persons/delete\`.`,
|
|
20055
|
+
404: `Person not found.`
|
|
20056
|
+
}
|
|
19905
20057
|
});
|
|
19906
20058
|
}
|
|
19907
20059
|
/**
|
|
19908
|
-
*
|
|
19909
|
-
*
|
|
20060
|
+
* Invite a person to the platform
|
|
20061
|
+
* Sends a platform invitation to the person's `primary_email`. On acceptance, the invitee joins your Platform with the privileges configured in the request body.
|
|
19910
20062
|
*
|
|
19911
|
-
*
|
|
19912
|
-
* user_id/username/email
|
|
19913
|
-
* platform_key
|
|
20063
|
+
* Returns `409 Conflict` if an active invitation already exists for this email in your Platform, and `422 Unprocessable Entity` if the person is already linked to a platform user.
|
|
19914
20064
|
*
|
|
19915
|
-
*
|
|
19916
|
-
*
|
|
19917
|
-
* feature
|
|
19918
|
-
* values
|
|
19919
|
-
* @returns any No response body
|
|
20065
|
+
* **Required permission:** `Ibl.CRM/Invite/action`.
|
|
20066
|
+
* @returns PersonInviteResponse
|
|
19920
20067
|
* @throws ApiError
|
|
19921
20068
|
*/
|
|
19922
|
-
static
|
|
20069
|
+
static crmPersonsInviteCreate({
|
|
20070
|
+
id,
|
|
20071
|
+
requestBody
|
|
20072
|
+
}) {
|
|
19923
20073
|
return request(OpenAPI, {
|
|
19924
20074
|
method: 'POST',
|
|
19925
|
-
url: '/api/
|
|
20075
|
+
url: '/api/crm/persons/{id}/invite/',
|
|
20076
|
+
path: {
|
|
20077
|
+
'id': id
|
|
20078
|
+
},
|
|
20079
|
+
body: requestBody,
|
|
20080
|
+
mediaType: 'application/json',
|
|
20081
|
+
errors: {
|
|
20082
|
+
400: `Person has no \`primary_email\`; cannot invite.`,
|
|
20083
|
+
403: `Missing required permission \`Ibl.CRM/Invite/action\`.`,
|
|
20084
|
+
404: `Person not found.`,
|
|
20085
|
+
422: `Person is already linked to a platform user.`
|
|
20086
|
+
}
|
|
19926
20087
|
});
|
|
19927
20088
|
}
|
|
19928
|
-
}
|
|
19929
|
-
|
|
19930
|
-
class ItemsService {
|
|
19931
20089
|
/**
|
|
19932
|
-
*
|
|
19933
|
-
*
|
|
19934
|
-
*
|
|
20090
|
+
* Bind a person to an existing platform user
|
|
20091
|
+
* Links this person to an existing platform user. The target user must already be a member of your Platform — if they are not, send them an invitation via `POST /persons/{id}/invite/` instead.
|
|
20092
|
+
*
|
|
20093
|
+
* This call is idempotent: linking a person that is already bound to the same user is a no-op. Re-linking a person that is already bound to a *different* user is refused; the existing binding is preserved and the unchanged person is returned.
|
|
20094
|
+
*
|
|
20095
|
+
* **Required permission:** `Ibl.CRM/Persons/write`.
|
|
20096
|
+
* @returns Person
|
|
19935
20097
|
* @throws ApiError
|
|
19936
20098
|
*/
|
|
19937
|
-
static
|
|
19938
|
-
|
|
20099
|
+
static crmPersonsLinkUserCreate({
|
|
20100
|
+
id,
|
|
20101
|
+
requestBody
|
|
19939
20102
|
}) {
|
|
19940
20103
|
return request(OpenAPI, {
|
|
19941
|
-
method: '
|
|
19942
|
-
url: '/
|
|
20104
|
+
method: 'POST',
|
|
20105
|
+
url: '/api/crm/persons/{id}/link-user/',
|
|
19943
20106
|
path: {
|
|
19944
|
-
'
|
|
20107
|
+
'id': id
|
|
20108
|
+
},
|
|
20109
|
+
body: requestBody,
|
|
20110
|
+
mediaType: 'application/json',
|
|
20111
|
+
errors: {
|
|
20112
|
+
400: `Validation error.`,
|
|
20113
|
+
403: `Missing required permission \`Ibl.CRM/Persons/write\`, or the target user is not a member of your Platform.`,
|
|
20114
|
+
404: `Person or user not found.`
|
|
19945
20115
|
}
|
|
19946
20116
|
});
|
|
19947
20117
|
}
|
|
19948
|
-
}
|
|
19949
|
-
|
|
19950
|
-
class MediaService {
|
|
19951
20118
|
/**
|
|
19952
|
-
*
|
|
19953
|
-
*
|
|
20119
|
+
* Merge duplicate persons into a primary
|
|
20120
|
+
* Marks each person in `duplicate_ids` as inactive and reports how many related records (deals, activities, tags) were re-parented onto `primary_id`.
|
|
20121
|
+
*
|
|
20122
|
+
* All ids — both the primary and every duplicate — must belong to your Platform. `primary_id` may not appear in `duplicate_ids`.
|
|
20123
|
+
*
|
|
20124
|
+
* **Required permission:** `Ibl.CRM/Persons/write`.
|
|
20125
|
+
* @returns PersonMergeResponse
|
|
19954
20126
|
* @throws ApiError
|
|
19955
20127
|
*/
|
|
19956
|
-
static
|
|
19957
|
-
|
|
19958
|
-
userId,
|
|
19959
|
-
courseId,
|
|
19960
|
-
itemId,
|
|
19961
|
-
page,
|
|
19962
|
-
pageSize,
|
|
19963
|
-
search,
|
|
19964
|
-
unitId
|
|
20128
|
+
static crmPersonsMergeCreate({
|
|
20129
|
+
requestBody
|
|
19965
20130
|
}) {
|
|
19966
20131
|
return request(OpenAPI, {
|
|
19967
|
-
method: '
|
|
19968
|
-
url: '/api/
|
|
19969
|
-
|
|
19970
|
-
|
|
20132
|
+
method: 'POST',
|
|
20133
|
+
url: '/api/crm/persons/merge/',
|
|
20134
|
+
body: requestBody,
|
|
20135
|
+
mediaType: 'application/json',
|
|
20136
|
+
errors: {
|
|
20137
|
+
400: `Validation error: the primary appears in duplicates, or one or more ids belong to another Platform.`,
|
|
20138
|
+
403: `Missing required permission \`Ibl.CRM/Persons/write\`.`,
|
|
20139
|
+
404: `Primary person not found.`
|
|
20140
|
+
}
|
|
20141
|
+
});
|
|
20142
|
+
}
|
|
20143
|
+
}
|
|
20144
|
+
|
|
20145
|
+
class CustomDomainsService {
|
|
20146
|
+
/**
|
|
20147
|
+
* API endpoint to get custom domains (public, no authentication or permission checks)
|
|
20148
|
+
* @returns any No response body
|
|
20149
|
+
* @throws ApiError
|
|
20150
|
+
*/
|
|
20151
|
+
static customDomainsRetrieve() {
|
|
20152
|
+
return request(OpenAPI, {
|
|
20153
|
+
method: 'GET',
|
|
20154
|
+
url: '/api/custom-domains/'
|
|
20155
|
+
});
|
|
20156
|
+
}
|
|
20157
|
+
/**
|
|
20158
|
+
* API endpoint to hard delete a custom domain
|
|
20159
|
+
* @returns void
|
|
20160
|
+
* @throws ApiError
|
|
20161
|
+
*/
|
|
20162
|
+
static customDomainsDeleteDestroy({
|
|
20163
|
+
domainId
|
|
20164
|
+
}) {
|
|
20165
|
+
return request(OpenAPI, {
|
|
20166
|
+
method: 'DELETE',
|
|
20167
|
+
url: '/api/custom-domains/{domain_id}/delete/',
|
|
20168
|
+
path: {
|
|
20169
|
+
'domain_id': domainId
|
|
20170
|
+
}
|
|
20171
|
+
});
|
|
20172
|
+
}
|
|
20173
|
+
/**
|
|
20174
|
+
* API endpoint to update the is_deleted status of a custom domain
|
|
20175
|
+
* @returns any No response body
|
|
20176
|
+
* @throws ApiError
|
|
20177
|
+
*/
|
|
20178
|
+
static customDomainsDeletedStatusCreate({
|
|
20179
|
+
domainId
|
|
20180
|
+
}) {
|
|
20181
|
+
return request(OpenAPI, {
|
|
20182
|
+
method: 'POST',
|
|
20183
|
+
url: '/api/custom-domains/{domain_id}/deleted-status/',
|
|
20184
|
+
path: {
|
|
20185
|
+
'domain_id': domainId
|
|
20186
|
+
}
|
|
20187
|
+
});
|
|
20188
|
+
}
|
|
20189
|
+
/**
|
|
20190
|
+
* API endpoint to update custom domain SPA type
|
|
20191
|
+
* @returns any No response body
|
|
20192
|
+
* @throws ApiError
|
|
20193
|
+
*/
|
|
20194
|
+
static customDomainsStatusUpdate({
|
|
20195
|
+
domainId
|
|
20196
|
+
}) {
|
|
20197
|
+
return request(OpenAPI, {
|
|
20198
|
+
method: 'PUT',
|
|
20199
|
+
url: '/api/custom-domains/{domain_id}/status/',
|
|
20200
|
+
path: {
|
|
20201
|
+
'domain_id': domainId
|
|
20202
|
+
}
|
|
20203
|
+
});
|
|
20204
|
+
}
|
|
20205
|
+
/**
|
|
20206
|
+
* API endpoint to update custom domain SPA type by domain name
|
|
20207
|
+
* @returns any No response body
|
|
20208
|
+
* @throws ApiError
|
|
20209
|
+
*/
|
|
20210
|
+
static customDomainsByNameStatusUpdate({
|
|
20211
|
+
domainName
|
|
20212
|
+
}) {
|
|
20213
|
+
return request(OpenAPI, {
|
|
20214
|
+
method: 'PUT',
|
|
20215
|
+
url: '/api/custom-domains/by-name/{domain_name}/status/',
|
|
20216
|
+
path: {
|
|
20217
|
+
'domain_name': domainName
|
|
20218
|
+
}
|
|
20219
|
+
});
|
|
20220
|
+
}
|
|
20221
|
+
/**
|
|
20222
|
+
* API endpoint to create a custom domain
|
|
20223
|
+
* @returns any No response body
|
|
20224
|
+
* @throws ApiError
|
|
20225
|
+
*/
|
|
20226
|
+
static customDomainsCreateCreate() {
|
|
20227
|
+
return request(OpenAPI, {
|
|
20228
|
+
method: 'POST',
|
|
20229
|
+
url: '/api/custom-domains/create/'
|
|
20230
|
+
});
|
|
20231
|
+
}
|
|
20232
|
+
}
|
|
20233
|
+
|
|
20234
|
+
class FeaturesService {
|
|
20235
|
+
/**
|
|
20236
|
+
* Returns a list of the apps that the user has access to.
|
|
20237
|
+
* @returns PaginatedUserAppList
|
|
20238
|
+
* @throws ApiError
|
|
20239
|
+
*/
|
|
20240
|
+
static featuresAppsList({
|
|
20241
|
+
page,
|
|
20242
|
+
pageSize
|
|
20243
|
+
}) {
|
|
20244
|
+
return request(OpenAPI, {
|
|
20245
|
+
method: 'GET',
|
|
20246
|
+
url: '/api/features/apps/',
|
|
20247
|
+
query: {
|
|
20248
|
+
'page': page,
|
|
20249
|
+
'page_size': pageSize
|
|
20250
|
+
}
|
|
20251
|
+
});
|
|
20252
|
+
}
|
|
20253
|
+
/**
|
|
20254
|
+
* Updates the user onboarding completed status
|
|
20255
|
+
* @returns OnboardingStatusUpdate
|
|
20256
|
+
* @throws ApiError
|
|
20257
|
+
*/
|
|
20258
|
+
static featuresAppsUpdateCreate({
|
|
20259
|
+
requestBody
|
|
20260
|
+
}) {
|
|
20261
|
+
return request(OpenAPI, {
|
|
20262
|
+
method: 'POST',
|
|
20263
|
+
url: '/api/features/apps/update/',
|
|
20264
|
+
body: requestBody,
|
|
20265
|
+
mediaType: 'application/json'
|
|
20266
|
+
});
|
|
20267
|
+
}
|
|
20268
|
+
/**
|
|
20269
|
+
* Activates free trial for the user
|
|
20270
|
+
*
|
|
20271
|
+
* Set free_trial_started to True| false for the user app
|
|
20272
|
+
*
|
|
20273
|
+
* App URL or ID is required as well as the platform key
|
|
20274
|
+
* @returns ActivateUserFreeTrial
|
|
20275
|
+
* @throws ApiError
|
|
20276
|
+
*/
|
|
20277
|
+
static featuresAppsUpdateTrialStatusCreate({
|
|
20278
|
+
requestBody
|
|
20279
|
+
}) {
|
|
20280
|
+
return request(OpenAPI, {
|
|
20281
|
+
method: 'POST',
|
|
20282
|
+
url: '/api/features/apps/update-trial-status/',
|
|
20283
|
+
body: requestBody,
|
|
20284
|
+
mediaType: 'application/json'
|
|
20285
|
+
});
|
|
20286
|
+
}
|
|
20287
|
+
/**
|
|
20288
|
+
* POST
|
|
20289
|
+
* Bulk update user feature config
|
|
20290
|
+
*
|
|
20291
|
+
* NOTE: Will not create user feature configs
|
|
20292
|
+
*
|
|
20293
|
+
* Params:
|
|
20294
|
+
* platform_key
|
|
20295
|
+
*
|
|
20296
|
+
* config
|
|
20297
|
+
* (OR)
|
|
20298
|
+
* feature
|
|
20299
|
+
* values
|
|
20300
|
+
* @returns any No response body
|
|
20301
|
+
* @throws ApiError
|
|
20302
|
+
*/
|
|
20303
|
+
static featuresBulkConfigCreate() {
|
|
20304
|
+
return request(OpenAPI, {
|
|
20305
|
+
method: 'POST',
|
|
20306
|
+
url: '/api/features/bulk-config/'
|
|
20307
|
+
});
|
|
20308
|
+
}
|
|
20309
|
+
/**
|
|
20310
|
+
* Query user feature config
|
|
20311
|
+
*
|
|
20312
|
+
* Params:
|
|
20313
|
+
* user_id/username/email
|
|
20314
|
+
* platform_key
|
|
20315
|
+
* @returns any No response body
|
|
20316
|
+
* @throws ApiError
|
|
20317
|
+
*/
|
|
20318
|
+
static featuresConfigRetrieve() {
|
|
20319
|
+
return request(OpenAPI, {
|
|
20320
|
+
method: 'GET',
|
|
20321
|
+
url: '/api/features/config/'
|
|
20322
|
+
});
|
|
20323
|
+
}
|
|
20324
|
+
/**
|
|
20325
|
+
* POST
|
|
20326
|
+
* Update user feature config
|
|
20327
|
+
*
|
|
20328
|
+
* Params:
|
|
20329
|
+
* user_id/username/email
|
|
20330
|
+
* platform_key
|
|
20331
|
+
*
|
|
20332
|
+
* config
|
|
20333
|
+
* (OR)
|
|
20334
|
+
* feature
|
|
20335
|
+
* values
|
|
20336
|
+
* @returns any No response body
|
|
20337
|
+
* @throws ApiError
|
|
20338
|
+
*/
|
|
20339
|
+
static featuresConfigCreate() {
|
|
20340
|
+
return request(OpenAPI, {
|
|
20341
|
+
method: 'POST',
|
|
20342
|
+
url: '/api/features/config/'
|
|
20343
|
+
});
|
|
20344
|
+
}
|
|
20345
|
+
}
|
|
20346
|
+
|
|
20347
|
+
class ItemsService {
|
|
20348
|
+
/**
|
|
20349
|
+
* Get public pricing by paywall config unique_id
|
|
20350
|
+
* Looks up the paywall config by its unique_id and delegates to the standard public pricing endpoint.
|
|
20351
|
+
* @returns PublicItemPricing
|
|
20352
|
+
* @throws ApiError
|
|
20353
|
+
*/
|
|
20354
|
+
static itemsPublicPricingRetrieve({
|
|
20355
|
+
configUniqueId
|
|
20356
|
+
}) {
|
|
20357
|
+
return request(OpenAPI, {
|
|
20358
|
+
method: 'GET',
|
|
20359
|
+
url: '/items/{config_unique_id}/public-pricing/',
|
|
20360
|
+
path: {
|
|
20361
|
+
'config_unique_id': configUniqueId
|
|
20362
|
+
}
|
|
20363
|
+
});
|
|
20364
|
+
}
|
|
20365
|
+
}
|
|
20366
|
+
|
|
20367
|
+
class MediaService {
|
|
20368
|
+
/**
|
|
20369
|
+
* List and filter media resources. Supports filtering by course_id, unit_id, item_id and searching across multiple fields.
|
|
20370
|
+
* @returns any Successfully retrieved media resources
|
|
20371
|
+
* @throws ApiError
|
|
20372
|
+
*/
|
|
20373
|
+
static mediaOrgsUsersMediaMediaResourcesList({
|
|
20374
|
+
org,
|
|
20375
|
+
userId,
|
|
20376
|
+
courseId,
|
|
20377
|
+
itemId,
|
|
20378
|
+
page,
|
|
20379
|
+
pageSize,
|
|
20380
|
+
search,
|
|
20381
|
+
unitId
|
|
20382
|
+
}) {
|
|
20383
|
+
return request(OpenAPI, {
|
|
20384
|
+
method: 'GET',
|
|
20385
|
+
url: '/api/media/orgs/{org}/users/{user_id}/media/media-resources/',
|
|
20386
|
+
path: {
|
|
20387
|
+
'org': org,
|
|
19971
20388
|
'user_id': userId
|
|
19972
20389
|
},
|
|
19973
20390
|
query: {
|
|
@@ -20831,6 +21248,406 @@ class NotificationsService {
|
|
|
20831
21248
|
}
|
|
20832
21249
|
}
|
|
20833
21250
|
|
|
21251
|
+
class OrganizationsService {
|
|
21252
|
+
/**
|
|
21253
|
+
* List organizations
|
|
21254
|
+
* Returns a paginated list of organizations in your Platform. Supports filtering by `owner` and by `name` (case-insensitive substring match).
|
|
21255
|
+
*
|
|
21256
|
+
* **Required permission:** `Ibl.CRM/Organizations/list`.
|
|
21257
|
+
* @returns PaginatedOrganizationList
|
|
21258
|
+
* @throws ApiError
|
|
21259
|
+
*/
|
|
21260
|
+
static organizationsList({
|
|
21261
|
+
name,
|
|
21262
|
+
owner,
|
|
21263
|
+
page,
|
|
21264
|
+
pageSize
|
|
21265
|
+
}) {
|
|
21266
|
+
return request(OpenAPI, {
|
|
21267
|
+
method: 'GET',
|
|
21268
|
+
url: '/organizations/',
|
|
21269
|
+
query: {
|
|
21270
|
+
'name': name,
|
|
21271
|
+
'owner': owner,
|
|
21272
|
+
'page': page,
|
|
21273
|
+
'page_size': pageSize
|
|
21274
|
+
},
|
|
21275
|
+
errors: {
|
|
21276
|
+
401: `Authentication required.`,
|
|
21277
|
+
403: `Missing required permission \`Ibl.CRM/Organizations/list\`.`
|
|
21278
|
+
}
|
|
21279
|
+
});
|
|
21280
|
+
}
|
|
21281
|
+
/**
|
|
21282
|
+
* Create an organization
|
|
21283
|
+
* Creates a new organization in your Platform. The Platform is inferred from your credentials. `name` must be unique within your Platform.
|
|
21284
|
+
*
|
|
21285
|
+
* **Required permission:** `Ibl.CRM/Organizations/write`.
|
|
21286
|
+
* @returns Organization
|
|
21287
|
+
* @throws ApiError
|
|
21288
|
+
*/
|
|
21289
|
+
static organizationsCreate({
|
|
21290
|
+
requestBody
|
|
21291
|
+
}) {
|
|
21292
|
+
return request(OpenAPI, {
|
|
21293
|
+
method: 'POST',
|
|
21294
|
+
url: '/organizations/',
|
|
21295
|
+
body: requestBody,
|
|
21296
|
+
mediaType: 'application/json',
|
|
21297
|
+
errors: {
|
|
21298
|
+
400: `Validation error (for example, duplicate name).`,
|
|
21299
|
+
403: `Missing required permission \`Ibl.CRM/Organizations/write\`.`
|
|
21300
|
+
}
|
|
21301
|
+
});
|
|
21302
|
+
}
|
|
21303
|
+
/**
|
|
21304
|
+
* Retrieve an organization
|
|
21305
|
+
* Returns a single organization by id.
|
|
21306
|
+
*
|
|
21307
|
+
* **Required permission:** `Ibl.CRM/Organizations/read`.
|
|
21308
|
+
* @returns Organization
|
|
21309
|
+
* @throws ApiError
|
|
21310
|
+
*/
|
|
21311
|
+
static organizationsRetrieve({
|
|
21312
|
+
id
|
|
21313
|
+
}) {
|
|
21314
|
+
return request(OpenAPI, {
|
|
21315
|
+
method: 'GET',
|
|
21316
|
+
url: '/organizations/{id}/',
|
|
21317
|
+
path: {
|
|
21318
|
+
'id': id
|
|
21319
|
+
},
|
|
21320
|
+
errors: {
|
|
21321
|
+
403: `Missing required permission \`Ibl.CRM/Organizations/read\`.`,
|
|
21322
|
+
404: `Organization not found.`
|
|
21323
|
+
}
|
|
21324
|
+
});
|
|
21325
|
+
}
|
|
21326
|
+
/**
|
|
21327
|
+
* Replace an organization
|
|
21328
|
+
* Replaces all editable fields on the organization.
|
|
21329
|
+
*
|
|
21330
|
+
* **Required permission:** `Ibl.CRM/Organizations/write`.
|
|
21331
|
+
* @returns Organization
|
|
21332
|
+
* @throws ApiError
|
|
21333
|
+
*/
|
|
21334
|
+
static organizationsUpdate({
|
|
21335
|
+
id,
|
|
21336
|
+
requestBody
|
|
21337
|
+
}) {
|
|
21338
|
+
return request(OpenAPI, {
|
|
21339
|
+
method: 'PUT',
|
|
21340
|
+
url: '/organizations/{id}/',
|
|
21341
|
+
path: {
|
|
21342
|
+
'id': id
|
|
21343
|
+
},
|
|
21344
|
+
body: requestBody,
|
|
21345
|
+
mediaType: 'application/json',
|
|
21346
|
+
errors: {
|
|
21347
|
+
400: `Validation error.`,
|
|
21348
|
+
403: `Missing required permission \`Ibl.CRM/Organizations/write\`.`,
|
|
21349
|
+
404: `Organization not found.`
|
|
21350
|
+
}
|
|
21351
|
+
});
|
|
21352
|
+
}
|
|
21353
|
+
/**
|
|
21354
|
+
* Update an organization
|
|
21355
|
+
* Updates only the supplied fields on the organization.
|
|
21356
|
+
*
|
|
21357
|
+
* **Required permission:** `Ibl.CRM/Organizations/write`.
|
|
21358
|
+
* @returns Organization
|
|
21359
|
+
* @throws ApiError
|
|
21360
|
+
*/
|
|
21361
|
+
static organizationsPartialUpdate({
|
|
21362
|
+
id,
|
|
21363
|
+
requestBody
|
|
21364
|
+
}) {
|
|
21365
|
+
return request(OpenAPI, {
|
|
21366
|
+
method: 'PATCH',
|
|
21367
|
+
url: '/organizations/{id}/',
|
|
21368
|
+
path: {
|
|
21369
|
+
'id': id
|
|
21370
|
+
},
|
|
21371
|
+
body: requestBody,
|
|
21372
|
+
mediaType: 'application/json',
|
|
21373
|
+
errors: {
|
|
21374
|
+
400: `Validation error.`,
|
|
21375
|
+
403: `Missing required permission \`Ibl.CRM/Organizations/write\`.`,
|
|
21376
|
+
404: `Organization not found.`
|
|
21377
|
+
}
|
|
21378
|
+
});
|
|
21379
|
+
}
|
|
21380
|
+
/**
|
|
21381
|
+
* Delete an organization
|
|
21382
|
+
* Deletes the organization. Any persons linked to it are kept; their organization reference is cleared.
|
|
21383
|
+
*
|
|
21384
|
+
* **Required permission:** `Ibl.CRM/Organizations/delete`.
|
|
21385
|
+
* @returns void
|
|
21386
|
+
* @throws ApiError
|
|
21387
|
+
*/
|
|
21388
|
+
static organizationsDestroy({
|
|
21389
|
+
id
|
|
21390
|
+
}) {
|
|
21391
|
+
return request(OpenAPI, {
|
|
21392
|
+
method: 'DELETE',
|
|
21393
|
+
url: '/organizations/{id}/',
|
|
21394
|
+
path: {
|
|
21395
|
+
'id': id
|
|
21396
|
+
},
|
|
21397
|
+
errors: {
|
|
21398
|
+
403: `Missing required permission \`Ibl.CRM/Organizations/delete\`.`,
|
|
21399
|
+
404: `Organization not found.`
|
|
21400
|
+
}
|
|
21401
|
+
});
|
|
21402
|
+
}
|
|
21403
|
+
}
|
|
21404
|
+
|
|
21405
|
+
class PersonsService {
|
|
21406
|
+
/**
|
|
21407
|
+
* List persons
|
|
21408
|
+
* 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`.
|
|
21409
|
+
*
|
|
21410
|
+
* **Required permission:** `Ibl.CRM/Persons/list`.
|
|
21411
|
+
* @returns PaginatedPersonList
|
|
21412
|
+
* @throws ApiError
|
|
21413
|
+
*/
|
|
21414
|
+
static personsList({
|
|
21415
|
+
createdAtGte,
|
|
21416
|
+
createdAtLte,
|
|
21417
|
+
lifecycleStage,
|
|
21418
|
+
metadataHasKey,
|
|
21419
|
+
organization,
|
|
21420
|
+
owner,
|
|
21421
|
+
page,
|
|
21422
|
+
pageSize
|
|
21423
|
+
}) {
|
|
21424
|
+
return request(OpenAPI, {
|
|
21425
|
+
method: 'GET',
|
|
21426
|
+
url: '/persons/',
|
|
21427
|
+
query: {
|
|
21428
|
+
'created_at__gte': createdAtGte,
|
|
21429
|
+
'created_at__lte': createdAtLte,
|
|
21430
|
+
'lifecycle_stage': lifecycleStage,
|
|
21431
|
+
'metadata__has_key': metadataHasKey,
|
|
21432
|
+
'organization': organization,
|
|
21433
|
+
'owner': owner,
|
|
21434
|
+
'page': page,
|
|
21435
|
+
'page_size': pageSize
|
|
21436
|
+
},
|
|
21437
|
+
errors: {
|
|
21438
|
+
401: `Authentication required.`,
|
|
21439
|
+
403: `Missing required permission \`Ibl.CRM/Persons/list\`.`
|
|
21440
|
+
}
|
|
21441
|
+
});
|
|
21442
|
+
}
|
|
21443
|
+
/**
|
|
21444
|
+
* Create a person
|
|
21445
|
+
* Creates a new person in your Platform. The Platform is inferred from your credentials. If `organization` is supplied, it must reference an organization in your Platform.
|
|
21446
|
+
*
|
|
21447
|
+
* **Required permission:** `Ibl.CRM/Persons/write`.
|
|
21448
|
+
* @returns Person
|
|
21449
|
+
* @throws ApiError
|
|
21450
|
+
*/
|
|
21451
|
+
static personsCreate({
|
|
21452
|
+
requestBody
|
|
21453
|
+
}) {
|
|
21454
|
+
return request(OpenAPI, {
|
|
21455
|
+
method: 'POST',
|
|
21456
|
+
url: '/persons/',
|
|
21457
|
+
body: requestBody,
|
|
21458
|
+
mediaType: 'application/json',
|
|
21459
|
+
errors: {
|
|
21460
|
+
400: `Validation error.`,
|
|
21461
|
+
403: `Missing required permission \`Ibl.CRM/Persons/write\`.`
|
|
21462
|
+
}
|
|
21463
|
+
});
|
|
21464
|
+
}
|
|
21465
|
+
/**
|
|
21466
|
+
* Retrieve a person
|
|
21467
|
+
* Returns a single person by id.
|
|
21468
|
+
*
|
|
21469
|
+
* **Required permission:** `Ibl.CRM/Persons/read`.
|
|
21470
|
+
* @returns Person
|
|
21471
|
+
* @throws ApiError
|
|
21472
|
+
*/
|
|
21473
|
+
static personsRetrieve({
|
|
21474
|
+
id
|
|
21475
|
+
}) {
|
|
21476
|
+
return request(OpenAPI, {
|
|
21477
|
+
method: 'GET',
|
|
21478
|
+
url: '/persons/{id}/',
|
|
21479
|
+
path: {
|
|
21480
|
+
'id': id
|
|
21481
|
+
},
|
|
21482
|
+
errors: {
|
|
21483
|
+
403: `Missing required permission \`Ibl.CRM/Persons/read\`.`,
|
|
21484
|
+
404: `Person not found.`
|
|
21485
|
+
}
|
|
21486
|
+
});
|
|
21487
|
+
}
|
|
21488
|
+
/**
|
|
21489
|
+
* Replace a person
|
|
21490
|
+
* Replaces all editable fields on the person.
|
|
21491
|
+
*
|
|
21492
|
+
* **Required permission:** `Ibl.CRM/Persons/write`.
|
|
21493
|
+
* @returns Person
|
|
21494
|
+
* @throws ApiError
|
|
21495
|
+
*/
|
|
21496
|
+
static personsUpdate({
|
|
21497
|
+
id,
|
|
21498
|
+
requestBody
|
|
21499
|
+
}) {
|
|
21500
|
+
return request(OpenAPI, {
|
|
21501
|
+
method: 'PUT',
|
|
21502
|
+
url: '/persons/{id}/',
|
|
21503
|
+
path: {
|
|
21504
|
+
'id': id
|
|
21505
|
+
},
|
|
21506
|
+
body: requestBody,
|
|
21507
|
+
mediaType: 'application/json',
|
|
21508
|
+
errors: {
|
|
21509
|
+
400: `Validation error.`,
|
|
21510
|
+
403: `Missing required permission \`Ibl.CRM/Persons/write\`.`,
|
|
21511
|
+
404: `Person not found.`
|
|
21512
|
+
}
|
|
21513
|
+
});
|
|
21514
|
+
}
|
|
21515
|
+
/**
|
|
21516
|
+
* Update a person
|
|
21517
|
+
* Updates only the supplied fields on the person.
|
|
21518
|
+
*
|
|
21519
|
+
* **Required permission:** `Ibl.CRM/Persons/write`.
|
|
21520
|
+
* @returns Person
|
|
21521
|
+
* @throws ApiError
|
|
21522
|
+
*/
|
|
21523
|
+
static personsPartialUpdate({
|
|
21524
|
+
id,
|
|
21525
|
+
requestBody
|
|
21526
|
+
}) {
|
|
21527
|
+
return request(OpenAPI, {
|
|
21528
|
+
method: 'PATCH',
|
|
21529
|
+
url: '/persons/{id}/',
|
|
21530
|
+
path: {
|
|
21531
|
+
'id': id
|
|
21532
|
+
},
|
|
21533
|
+
body: requestBody,
|
|
21534
|
+
mediaType: 'application/json',
|
|
21535
|
+
errors: {
|
|
21536
|
+
400: `Validation error.`,
|
|
21537
|
+
403: `Missing required permission \`Ibl.CRM/Persons/write\`.`,
|
|
21538
|
+
404: `Person not found.`
|
|
21539
|
+
}
|
|
21540
|
+
});
|
|
21541
|
+
}
|
|
21542
|
+
/**
|
|
21543
|
+
* Delete a person
|
|
21544
|
+
* Deletes the person.
|
|
21545
|
+
*
|
|
21546
|
+
* **Required permission:** `Ibl.CRM/Persons/delete`.
|
|
21547
|
+
* @returns void
|
|
21548
|
+
* @throws ApiError
|
|
21549
|
+
*/
|
|
21550
|
+
static personsDestroy({
|
|
21551
|
+
id
|
|
21552
|
+
}) {
|
|
21553
|
+
return request(OpenAPI, {
|
|
21554
|
+
method: 'DELETE',
|
|
21555
|
+
url: '/persons/{id}/',
|
|
21556
|
+
path: {
|
|
21557
|
+
'id': id
|
|
21558
|
+
},
|
|
21559
|
+
errors: {
|
|
21560
|
+
403: `Missing required permission \`Ibl.CRM/Persons/delete\`.`,
|
|
21561
|
+
404: `Person not found.`
|
|
21562
|
+
}
|
|
21563
|
+
});
|
|
21564
|
+
}
|
|
21565
|
+
/**
|
|
21566
|
+
* Invite a person to the platform
|
|
21567
|
+
* Sends a platform invitation to the person's `primary_email`. On acceptance, the invitee joins your Platform with the privileges configured in the request body.
|
|
21568
|
+
*
|
|
21569
|
+
* Returns `409 Conflict` if an active invitation already exists for this email in your Platform, and `422 Unprocessable Entity` if the person is already linked to a platform user.
|
|
21570
|
+
*
|
|
21571
|
+
* **Required permission:** `Ibl.CRM/Invite/action`.
|
|
21572
|
+
* @returns PersonInviteResponse
|
|
21573
|
+
* @throws ApiError
|
|
21574
|
+
*/
|
|
21575
|
+
static personsInviteCreate({
|
|
21576
|
+
id,
|
|
21577
|
+
requestBody
|
|
21578
|
+
}) {
|
|
21579
|
+
return request(OpenAPI, {
|
|
21580
|
+
method: 'POST',
|
|
21581
|
+
url: '/persons/{id}/invite/',
|
|
21582
|
+
path: {
|
|
21583
|
+
'id': id
|
|
21584
|
+
},
|
|
21585
|
+
body: requestBody,
|
|
21586
|
+
mediaType: 'application/json',
|
|
21587
|
+
errors: {
|
|
21588
|
+
400: `Person has no \`primary_email\`; cannot invite.`,
|
|
21589
|
+
403: `Missing required permission \`Ibl.CRM/Invite/action\`.`,
|
|
21590
|
+
404: `Person not found.`,
|
|
21591
|
+
422: `Person is already linked to a platform user.`
|
|
21592
|
+
}
|
|
21593
|
+
});
|
|
21594
|
+
}
|
|
21595
|
+
/**
|
|
21596
|
+
* Bind a person to an existing platform user
|
|
21597
|
+
* Links this person to an existing platform user. The target user must already be a member of your Platform — if they are not, send them an invitation via `POST /persons/{id}/invite/` instead.
|
|
21598
|
+
*
|
|
21599
|
+
* This call is idempotent: linking a person that is already bound to the same user is a no-op. Re-linking a person that is already bound to a *different* user is refused; the existing binding is preserved and the unchanged person is returned.
|
|
21600
|
+
*
|
|
21601
|
+
* **Required permission:** `Ibl.CRM/Persons/write`.
|
|
21602
|
+
* @returns Person
|
|
21603
|
+
* @throws ApiError
|
|
21604
|
+
*/
|
|
21605
|
+
static personsLinkUserCreate({
|
|
21606
|
+
id,
|
|
21607
|
+
requestBody
|
|
21608
|
+
}) {
|
|
21609
|
+
return request(OpenAPI, {
|
|
21610
|
+
method: 'POST',
|
|
21611
|
+
url: '/persons/{id}/link-user/',
|
|
21612
|
+
path: {
|
|
21613
|
+
'id': id
|
|
21614
|
+
},
|
|
21615
|
+
body: requestBody,
|
|
21616
|
+
mediaType: 'application/json',
|
|
21617
|
+
errors: {
|
|
21618
|
+
400: `Validation error.`,
|
|
21619
|
+
403: `Missing required permission \`Ibl.CRM/Persons/write\`, or the target user is not a member of your Platform.`,
|
|
21620
|
+
404: `Person or user not found.`
|
|
21621
|
+
}
|
|
21622
|
+
});
|
|
21623
|
+
}
|
|
21624
|
+
/**
|
|
21625
|
+
* Merge duplicate persons into a primary
|
|
21626
|
+
* Marks each person in `duplicate_ids` as inactive and reports how many related records (deals, activities, tags) were re-parented onto `primary_id`.
|
|
21627
|
+
*
|
|
21628
|
+
* All ids — both the primary and every duplicate — must belong to your Platform. `primary_id` may not appear in `duplicate_ids`.
|
|
21629
|
+
*
|
|
21630
|
+
* **Required permission:** `Ibl.CRM/Persons/write`.
|
|
21631
|
+
* @returns PersonMergeResponse
|
|
21632
|
+
* @throws ApiError
|
|
21633
|
+
*/
|
|
21634
|
+
static personsMergeCreate({
|
|
21635
|
+
requestBody
|
|
21636
|
+
}) {
|
|
21637
|
+
return request(OpenAPI, {
|
|
21638
|
+
method: 'POST',
|
|
21639
|
+
url: '/persons/merge/',
|
|
21640
|
+
body: requestBody,
|
|
21641
|
+
mediaType: 'application/json',
|
|
21642
|
+
errors: {
|
|
21643
|
+
400: `Validation error: the primary appears in duplicates, or one or more ids belong to another Platform.`,
|
|
21644
|
+
403: `Missing required permission \`Ibl.CRM/Persons/write\`.`,
|
|
21645
|
+
404: `Primary person not found.`
|
|
21646
|
+
}
|
|
21647
|
+
});
|
|
21648
|
+
}
|
|
21649
|
+
}
|
|
21650
|
+
|
|
20834
21651
|
class PlatformsService {
|
|
20835
21652
|
/**
|
|
20836
21653
|
* Check whether the authenticated user has payment access to an item on a scoped platform.
|
|
@@ -23072,12 +23889,15 @@ exports.CommerceService = CommerceService;
|
|
|
23072
23889
|
exports.CoreService = CoreService;
|
|
23073
23890
|
exports.CredentialsService = CredentialsService;
|
|
23074
23891
|
exports.CreditsService = CreditsService;
|
|
23892
|
+
exports.CrmService = CrmService;
|
|
23075
23893
|
exports.CustomDomainsService = CustomDomainsService;
|
|
23076
23894
|
exports.FeaturesService = FeaturesService;
|
|
23077
23895
|
exports.ItemsService = ItemsService;
|
|
23078
23896
|
exports.MediaService = MediaService;
|
|
23079
23897
|
exports.NotificationsService = NotificationsService;
|
|
23080
23898
|
exports.OpenAPI = OpenAPI;
|
|
23899
|
+
exports.OrganizationsService = OrganizationsService;
|
|
23900
|
+
exports.PersonsService = PersonsService;
|
|
23081
23901
|
exports.PlatformsService = PlatformsService;
|
|
23082
23902
|
exports.PricesService = PricesService;
|
|
23083
23903
|
exports.RecommendationsService = RecommendationsService;
|