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