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