@deepraxis/sdk 0.1.1-dev.de0a917 → 0.1.1-dev.e5614a0
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/METHODS.md +113 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +217 -1
- package/dist/generated/sdk.gen.js +590 -0
- package/dist/generated/types.gen.d.ts +31762 -28101
- package/dist/operations.generated.d.ts +1346 -0
- package/dist/operations.generated.js +1711 -0
- package/dist/resources.generated.d.ts +61 -0
- package/dist/resources.generated.js +63 -0
- package/package.json +1 -1
|
@@ -5642,6 +5642,596 @@ export const canvasRestoreCanvas = (options) => (options.client ?? client).post(
|
|
|
5642
5642
|
...options.headers
|
|
5643
5643
|
}
|
|
5644
5644
|
});
|
|
5645
|
+
/**
|
|
5646
|
+
* List records
|
|
5647
|
+
*
|
|
5648
|
+
* Browse records of one object type and obtain ids for retrieval or edits. Discover objectType with schemas.list; select properties by internal names from properties.list. Omit after for the first page, then copy paging.next.after until no next page is returned. archived defaults to false; use objects.search for property filters.
|
|
5649
|
+
*/
|
|
5650
|
+
export const crmObjectsList = (options) => (options.client ?? client).get({
|
|
5651
|
+
querySerializer: { parameters: {
|
|
5652
|
+
associations: { array: { explode: false } },
|
|
5653
|
+
properties: { array: { explode: false } },
|
|
5654
|
+
propertiesWithHistory: { array: { explode: false } }
|
|
5655
|
+
} },
|
|
5656
|
+
security: [{
|
|
5657
|
+
key: 'crm-bearerAuth',
|
|
5658
|
+
scheme: 'bearer',
|
|
5659
|
+
type: 'http'
|
|
5660
|
+
}],
|
|
5661
|
+
url: '/crm/v1/objects/{objectType}',
|
|
5662
|
+
...options
|
|
5663
|
+
});
|
|
5664
|
+
/**
|
|
5665
|
+
* Create record
|
|
5666
|
+
*
|
|
5667
|
+
* Create a customer record with property values and optional initial associations. Discover objectType with schemas.list and allowed property names with properties.list; save the returned id for subsequent calls. Each call creates a record. Example for contacts: {"properties":{"email":"person@example.com"}}. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
5668
|
+
*/
|
|
5669
|
+
export const crmObjectsCreate = (options) => (options.client ?? client).post({
|
|
5670
|
+
security: [{
|
|
5671
|
+
key: 'crm-bearerAuth',
|
|
5672
|
+
scheme: 'bearer',
|
|
5673
|
+
type: 'http'
|
|
5674
|
+
}],
|
|
5675
|
+
url: '/crm/v1/objects/{objectType}',
|
|
5676
|
+
...options,
|
|
5677
|
+
headers: {
|
|
5678
|
+
'Content-Type': 'application/json',
|
|
5679
|
+
...options.headers
|
|
5680
|
+
}
|
|
5681
|
+
});
|
|
5682
|
+
/**
|
|
5683
|
+
* Archive record
|
|
5684
|
+
*
|
|
5685
|
+
* Archive a record selected from objects.list or objects.search when it should leave active results. This removes it from normal lists without deleting its history; archived=true can be used to read archived records. Confirm objectType and objectId before calling. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204.
|
|
5686
|
+
*/
|
|
5687
|
+
export const crmObjectsArchive = (options) => (options.client ?? client).delete({
|
|
5688
|
+
security: [{
|
|
5689
|
+
key: 'crm-bearerAuth',
|
|
5690
|
+
scheme: 'bearer',
|
|
5691
|
+
type: 'http'
|
|
5692
|
+
}],
|
|
5693
|
+
url: '/crm/v1/objects/{objectType}/{objectId}',
|
|
5694
|
+
...options
|
|
5695
|
+
});
|
|
5696
|
+
/**
|
|
5697
|
+
* Retrieve record
|
|
5698
|
+
*
|
|
5699
|
+
* Read one record by id from objects.list, objects.search or objects.create. Select property names with properties and associated object types with associations; use idProperty only when objectId is a value of that unique property. Use archived=true to inspect an archived record.
|
|
5700
|
+
*/
|
|
5701
|
+
export const crmObjectsRetrieve = (options) => (options.client ?? client).get({
|
|
5702
|
+
querySerializer: { parameters: {
|
|
5703
|
+
associations: { array: { explode: false } },
|
|
5704
|
+
properties: { array: { explode: false } },
|
|
5705
|
+
propertiesWithHistory: { array: { explode: false } }
|
|
5706
|
+
} },
|
|
5707
|
+
security: [{
|
|
5708
|
+
key: 'crm-bearerAuth',
|
|
5709
|
+
scheme: 'bearer',
|
|
5710
|
+
type: 'http'
|
|
5711
|
+
}],
|
|
5712
|
+
url: '/crm/v1/objects/{objectType}/{objectId}',
|
|
5713
|
+
...options
|
|
5714
|
+
});
|
|
5715
|
+
/**
|
|
5716
|
+
* Update record
|
|
5717
|
+
*
|
|
5718
|
+
* Change only the supplied properties of a record selected from objects.list or objects.search. Omitted properties retain their values. Use property names from properties.list and valid stage ids from pipelines.retrieve. Stage-entry requirements must be satisfied by the resulting record; inspect 400 errors before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
5719
|
+
*/
|
|
5720
|
+
export const crmObjectsUpdate = (options) => (options.client ?? client).patch({
|
|
5721
|
+
security: [{
|
|
5722
|
+
key: 'crm-bearerAuth',
|
|
5723
|
+
scheme: 'bearer',
|
|
5724
|
+
type: 'http'
|
|
5725
|
+
}],
|
|
5726
|
+
url: '/crm/v1/objects/{objectType}/{objectId}',
|
|
5727
|
+
...options,
|
|
5728
|
+
headers: {
|
|
5729
|
+
'Content-Type': 'application/json',
|
|
5730
|
+
...options.headers
|
|
5731
|
+
}
|
|
5732
|
+
});
|
|
5733
|
+
/**
|
|
5734
|
+
* Search records
|
|
5735
|
+
*
|
|
5736
|
+
* Find records using text query, property filters and sort order rather than scanning a list. Obtain objectType from schemas.list and filter propertyName values from properties.list. Supply filterGroups, sorts, properties, limit and after; use empty arrays for no filters, sorts or property selection, and an empty after for the first page. Copy paging.next.after with the same query to continue. This operation reads records without changing them.
|
|
5737
|
+
*/
|
|
5738
|
+
export const crmObjectsSearch = (options) => (options.client ?? client).post({
|
|
5739
|
+
security: [{
|
|
5740
|
+
key: 'crm-bearerAuth',
|
|
5741
|
+
scheme: 'bearer',
|
|
5742
|
+
type: 'http'
|
|
5743
|
+
}],
|
|
5744
|
+
url: '/crm/v1/objects/{objectType}/search',
|
|
5745
|
+
...options,
|
|
5746
|
+
headers: {
|
|
5747
|
+
'Content-Type': 'application/json',
|
|
5748
|
+
...options.headers
|
|
5749
|
+
}
|
|
5750
|
+
});
|
|
5751
|
+
/**
|
|
5752
|
+
* Batch read records
|
|
5753
|
+
*
|
|
5754
|
+
* Read a set of known record ids in one call; use objects.search to discover ids first. Supply inputs with ids plus requested properties; set idProperty only when the inputs use unique-property values rather than record ids.
|
|
5755
|
+
*/
|
|
5756
|
+
export const crmObjectsBatchRead = (options) => (options.client ?? client).post({
|
|
5757
|
+
security: [{
|
|
5758
|
+
key: 'crm-bearerAuth',
|
|
5759
|
+
scheme: 'bearer',
|
|
5760
|
+
type: 'http'
|
|
5761
|
+
}],
|
|
5762
|
+
url: '/crm/v1/objects/{objectType}/batch/read',
|
|
5763
|
+
...options,
|
|
5764
|
+
headers: {
|
|
5765
|
+
'Content-Type': 'application/json',
|
|
5766
|
+
...options.headers
|
|
5767
|
+
}
|
|
5768
|
+
});
|
|
5769
|
+
/**
|
|
5770
|
+
* Batch create records
|
|
5771
|
+
*
|
|
5772
|
+
* Create several records of one object type using inputs with properties and optional associations. Obtain property names from properties.list; each successful input creates a record, so inspect per-item errors before resubmitting failed inputs. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
5773
|
+
*/
|
|
5774
|
+
export const crmObjectsBatchCreate = (options) => (options.client ?? client).post({
|
|
5775
|
+
security: [{
|
|
5776
|
+
key: 'crm-bearerAuth',
|
|
5777
|
+
scheme: 'bearer',
|
|
5778
|
+
type: 'http'
|
|
5779
|
+
}],
|
|
5780
|
+
url: '/crm/v1/objects/{objectType}/batch/create',
|
|
5781
|
+
...options,
|
|
5782
|
+
headers: {
|
|
5783
|
+
'Content-Type': 'application/json',
|
|
5784
|
+
...options.headers
|
|
5785
|
+
}
|
|
5786
|
+
});
|
|
5787
|
+
/**
|
|
5788
|
+
* Batch update records
|
|
5789
|
+
*
|
|
5790
|
+
* Apply distinct property patches to existing records identified by inputs[].id. Obtain ids from objects.list or objects.search and property names from properties.list. Omitted properties retain their values; inspect results and errors for each input. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
5791
|
+
*/
|
|
5792
|
+
export const crmObjectsBatchUpdate = (options) => (options.client ?? client).post({
|
|
5793
|
+
security: [{
|
|
5794
|
+
key: 'crm-bearerAuth',
|
|
5795
|
+
scheme: 'bearer',
|
|
5796
|
+
type: 'http'
|
|
5797
|
+
}],
|
|
5798
|
+
url: '/crm/v1/objects/{objectType}/batch/update',
|
|
5799
|
+
...options,
|
|
5800
|
+
headers: {
|
|
5801
|
+
'Content-Type': 'application/json',
|
|
5802
|
+
...options.headers
|
|
5803
|
+
}
|
|
5804
|
+
});
|
|
5805
|
+
/**
|
|
5806
|
+
* Batch upsert records
|
|
5807
|
+
*
|
|
5808
|
+
* Create records that do not yet exist or update matches using a unique property. Provide idProperty and its value in each input, plus properties; choose a property with hasUniqueValue from properties.list. Inspect each result to determine whether it was newly created. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
5809
|
+
*/
|
|
5810
|
+
export const crmObjectsBatchUpsert = (options) => (options.client ?? client).post({
|
|
5811
|
+
security: [{
|
|
5812
|
+
key: 'crm-bearerAuth',
|
|
5813
|
+
scheme: 'bearer',
|
|
5814
|
+
type: 'http'
|
|
5815
|
+
}],
|
|
5816
|
+
url: '/crm/v1/objects/{objectType}/batch/upsert',
|
|
5817
|
+
...options,
|
|
5818
|
+
headers: {
|
|
5819
|
+
'Content-Type': 'application/json',
|
|
5820
|
+
...options.headers
|
|
5821
|
+
}
|
|
5822
|
+
});
|
|
5823
|
+
/**
|
|
5824
|
+
* Batch archive records
|
|
5825
|
+
*
|
|
5826
|
+
* Archive known records of one object type using inputs[].id from objects.list or objects.search. Archived records leave active lists but retain their history; confirm all ids before calling. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204.
|
|
5827
|
+
*/
|
|
5828
|
+
export const crmObjectsBatchArchive = (options) => (options.client ?? client).post({
|
|
5829
|
+
security: [{
|
|
5830
|
+
key: 'crm-bearerAuth',
|
|
5831
|
+
scheme: 'bearer',
|
|
5832
|
+
type: 'http'
|
|
5833
|
+
}],
|
|
5834
|
+
url: '/crm/v1/objects/{objectType}/batch/archive',
|
|
5835
|
+
...options,
|
|
5836
|
+
headers: {
|
|
5837
|
+
'Content-Type': 'application/json',
|
|
5838
|
+
...options.headers
|
|
5839
|
+
}
|
|
5840
|
+
});
|
|
5841
|
+
/**
|
|
5842
|
+
* List properties
|
|
5843
|
+
*
|
|
5844
|
+
* Inspect the property definitions available for an object type before writing or filtering records. Obtain objectType from schemas.list; reuse each immutable name in record properties and filters. archived defaults to false.
|
|
5845
|
+
*/
|
|
5846
|
+
export const crmPropertiesList = (options) => (options.client ?? client).get({
|
|
5847
|
+
security: [{
|
|
5848
|
+
key: 'crm-bearerAuth',
|
|
5849
|
+
scheme: 'bearer',
|
|
5850
|
+
type: 'http'
|
|
5851
|
+
}],
|
|
5852
|
+
url: '/crm/v1/properties/{objectType}',
|
|
5853
|
+
...options
|
|
5854
|
+
});
|
|
5855
|
+
/**
|
|
5856
|
+
* Create property
|
|
5857
|
+
*
|
|
5858
|
+
* Define a property before setting its values on records. Choose objectType from schemas.list and groupName from properties.groups.list; provide an immutable internal name, display label, type and fieldType. Enumeration properties require their valid options. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
5859
|
+
*/
|
|
5860
|
+
export const crmPropertiesCreate = (options) => (options.client ?? client).post({
|
|
5861
|
+
security: [{
|
|
5862
|
+
key: 'crm-bearerAuth',
|
|
5863
|
+
scheme: 'bearer',
|
|
5864
|
+
type: 'http'
|
|
5865
|
+
}],
|
|
5866
|
+
url: '/crm/v1/properties/{objectType}',
|
|
5867
|
+
...options,
|
|
5868
|
+
headers: {
|
|
5869
|
+
'Content-Type': 'application/json',
|
|
5870
|
+
...options.headers
|
|
5871
|
+
}
|
|
5872
|
+
});
|
|
5873
|
+
/**
|
|
5874
|
+
* Archive property
|
|
5875
|
+
*
|
|
5876
|
+
* Archive a property definition selected by internal name from properties.list. Confirm that record entry and search flows no longer depend on it; archived definitions are excluded from normal property lists. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204.
|
|
5877
|
+
*/
|
|
5878
|
+
export const crmPropertiesArchive = (options) => (options.client ?? client).delete({
|
|
5879
|
+
security: [{
|
|
5880
|
+
key: 'crm-bearerAuth',
|
|
5881
|
+
scheme: 'bearer',
|
|
5882
|
+
type: 'http'
|
|
5883
|
+
}],
|
|
5884
|
+
url: '/crm/v1/properties/{objectType}/{propertyName}',
|
|
5885
|
+
...options
|
|
5886
|
+
});
|
|
5887
|
+
/**
|
|
5888
|
+
* Retrieve property
|
|
5889
|
+
*
|
|
5890
|
+
* Inspect the type, options and modification restrictions of a property before changing its definition or record values. Obtain propertyName from properties.list; it is the immutable internal name rather than the label.
|
|
5891
|
+
*/
|
|
5892
|
+
export const crmPropertiesRetrieve = (options) => (options.client ?? client).get({
|
|
5893
|
+
security: [{
|
|
5894
|
+
key: 'crm-bearerAuth',
|
|
5895
|
+
scheme: 'bearer',
|
|
5896
|
+
type: 'http'
|
|
5897
|
+
}],
|
|
5898
|
+
url: '/crm/v1/properties/{objectType}/{propertyName}',
|
|
5899
|
+
...options
|
|
5900
|
+
});
|
|
5901
|
+
/**
|
|
5902
|
+
* Update property
|
|
5903
|
+
*
|
|
5904
|
+
* Change editable settings of a property selected from properties.list, such as its label, group or options. Preserve the immutable internal name; inspect modificationMetadata before editing system-managed definitions. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
5905
|
+
*/
|
|
5906
|
+
export const crmPropertiesUpdate = (options) => (options.client ?? client).patch({
|
|
5907
|
+
security: [{
|
|
5908
|
+
key: 'crm-bearerAuth',
|
|
5909
|
+
scheme: 'bearer',
|
|
5910
|
+
type: 'http'
|
|
5911
|
+
}],
|
|
5912
|
+
url: '/crm/v1/properties/{objectType}/{propertyName}',
|
|
5913
|
+
...options,
|
|
5914
|
+
headers: {
|
|
5915
|
+
'Content-Type': 'application/json',
|
|
5916
|
+
...options.headers
|
|
5917
|
+
}
|
|
5918
|
+
});
|
|
5919
|
+
/**
|
|
5920
|
+
* List property groups
|
|
5921
|
+
*
|
|
5922
|
+
* Discover property groups for an object type before creating or organizing property definitions. Obtain objectType from schemas.list and reuse a group name as groupName in properties.create or properties.update.
|
|
5923
|
+
*/
|
|
5924
|
+
export const crmPropertiesGroupsList = (options) => (options.client ?? client).get({
|
|
5925
|
+
security: [{
|
|
5926
|
+
key: 'crm-bearerAuth',
|
|
5927
|
+
scheme: 'bearer',
|
|
5928
|
+
type: 'http'
|
|
5929
|
+
}],
|
|
5930
|
+
url: '/crm/v1/properties/{objectType}/groups',
|
|
5931
|
+
...options
|
|
5932
|
+
});
|
|
5933
|
+
/**
|
|
5934
|
+
* Create property group
|
|
5935
|
+
*
|
|
5936
|
+
* Create a named group for related property definitions of one object type. Obtain objectType from schemas.list; choose a unique internal name and display label, then reuse the returned name as groupName when creating properties. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
5937
|
+
*/
|
|
5938
|
+
export const crmPropertiesGroupsCreate = (options) => (options.client ?? client).post({
|
|
5939
|
+
security: [{
|
|
5940
|
+
key: 'crm-bearerAuth',
|
|
5941
|
+
scheme: 'bearer',
|
|
5942
|
+
type: 'http'
|
|
5943
|
+
}],
|
|
5944
|
+
url: '/crm/v1/properties/{objectType}/groups',
|
|
5945
|
+
...options,
|
|
5946
|
+
headers: {
|
|
5947
|
+
'Content-Type': 'application/json',
|
|
5948
|
+
...options.headers
|
|
5949
|
+
}
|
|
5950
|
+
});
|
|
5951
|
+
/**
|
|
5952
|
+
* List pipelines
|
|
5953
|
+
*
|
|
5954
|
+
* Discover pipelines and stage ids for records of one object type from schemas.list. Reuse pipeline and stage ids in record property updates or lead qualification. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
|
|
5955
|
+
*/
|
|
5956
|
+
export const crmPipelinesList = (options) => (options.client ?? client).get({
|
|
5957
|
+
security: [{
|
|
5958
|
+
key: 'crm-bearerAuth',
|
|
5959
|
+
scheme: 'bearer',
|
|
5960
|
+
type: 'http'
|
|
5961
|
+
}],
|
|
5962
|
+
url: '/crm/v1/pipelines/{objectType}',
|
|
5963
|
+
...options
|
|
5964
|
+
});
|
|
5965
|
+
/**
|
|
5966
|
+
* Create pipeline
|
|
5967
|
+
*
|
|
5968
|
+
* Create a pipeline with its ordered stages for an object type from schemas.list. Provide a display label, displayOrder and initial stages, then use the returned ids when assigning records. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
|
|
5969
|
+
*/
|
|
5970
|
+
export const crmPipelinesCreate = (options) => (options.client ?? client).post({
|
|
5971
|
+
security: [{
|
|
5972
|
+
key: 'crm-bearerAuth',
|
|
5973
|
+
scheme: 'bearer',
|
|
5974
|
+
type: 'http'
|
|
5975
|
+
}],
|
|
5976
|
+
url: '/crm/v1/pipelines/{objectType}',
|
|
5977
|
+
...options,
|
|
5978
|
+
headers: {
|
|
5979
|
+
'Content-Type': 'application/json',
|
|
5980
|
+
...options.headers
|
|
5981
|
+
}
|
|
5982
|
+
});
|
|
5983
|
+
/**
|
|
5984
|
+
* Archive pipeline
|
|
5985
|
+
*
|
|
5986
|
+
* Archive a pipeline selected from pipelines.list when records no longer depend on it. Check current records and stage usage first; resolve references reported by validation before retrying. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
|
|
5987
|
+
*/
|
|
5988
|
+
export const crmPipelinesArchive = (options) => (options.client ?? client).delete({
|
|
5989
|
+
security: [{
|
|
5990
|
+
key: 'crm-bearerAuth',
|
|
5991
|
+
scheme: 'bearer',
|
|
5992
|
+
type: 'http'
|
|
5993
|
+
}],
|
|
5994
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
|
|
5995
|
+
...options
|
|
5996
|
+
});
|
|
5997
|
+
/**
|
|
5998
|
+
* Retrieve pipeline
|
|
5999
|
+
*
|
|
6000
|
+
* Inspect the stage ids and metadata of a pipeline before moving a record or editing its workflow. Obtain pipelineId from pipelines.list and use the returned stages array to select a destination. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
|
|
6001
|
+
*/
|
|
6002
|
+
export const crmPipelinesRetrieve = (options) => (options.client ?? client).get({
|
|
6003
|
+
security: [{
|
|
6004
|
+
key: 'crm-bearerAuth',
|
|
6005
|
+
scheme: 'bearer',
|
|
6006
|
+
type: 'http'
|
|
6007
|
+
}],
|
|
6008
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
|
|
6009
|
+
...options
|
|
6010
|
+
});
|
|
6011
|
+
/**
|
|
6012
|
+
* Update pipeline
|
|
6013
|
+
*
|
|
6014
|
+
* Change editable pipeline settings selected by pipelineId from pipelines.list. Omit settings that should remain unchanged and inspect current stages with pipelines.retrieve before modifying the workflow. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
|
|
6015
|
+
*/
|
|
6016
|
+
export const crmPipelinesUpdate = (options) => (options.client ?? client).patch({
|
|
6017
|
+
security: [{
|
|
6018
|
+
key: 'crm-bearerAuth',
|
|
6019
|
+
scheme: 'bearer',
|
|
6020
|
+
type: 'http'
|
|
6021
|
+
}],
|
|
6022
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
|
|
6023
|
+
...options,
|
|
6024
|
+
headers: {
|
|
6025
|
+
'Content-Type': 'application/json',
|
|
6026
|
+
...options.headers
|
|
6027
|
+
}
|
|
6028
|
+
});
|
|
6029
|
+
/**
|
|
6030
|
+
* Create pipeline stage
|
|
6031
|
+
*
|
|
6032
|
+
* Add an ordered stage to a pipeline from pipelines.list. Provide its display label, displayOrder and metadata; save the returned stage id for record updates. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
|
|
6033
|
+
*/
|
|
6034
|
+
export const crmPipelinesStagesCreate = (options) => (options.client ?? client).post({
|
|
6035
|
+
security: [{
|
|
6036
|
+
key: 'crm-bearerAuth',
|
|
6037
|
+
scheme: 'bearer',
|
|
6038
|
+
type: 'http'
|
|
6039
|
+
}],
|
|
6040
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages',
|
|
6041
|
+
...options,
|
|
6042
|
+
headers: {
|
|
6043
|
+
'Content-Type': 'application/json',
|
|
6044
|
+
...options.headers
|
|
6045
|
+
}
|
|
6046
|
+
});
|
|
6047
|
+
/**
|
|
6048
|
+
* Archive pipeline stage
|
|
6049
|
+
*
|
|
6050
|
+
* Archive a stage selected from pipelines.retrieve after checking record usage. A stage that still has records cannot be archived without resolving their assignment; move those records to an allowed stage first. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
|
|
6051
|
+
*/
|
|
6052
|
+
export const crmPipelinesStagesArchive = (options) => (options.client ?? client).delete({
|
|
6053
|
+
security: [{
|
|
6054
|
+
key: 'crm-bearerAuth',
|
|
6055
|
+
scheme: 'bearer',
|
|
6056
|
+
type: 'http'
|
|
6057
|
+
}],
|
|
6058
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages/{stageId}',
|
|
6059
|
+
...options
|
|
6060
|
+
});
|
|
6061
|
+
/**
|
|
6062
|
+
* Update pipeline stage
|
|
6063
|
+
*
|
|
6064
|
+
* Change the label, order or metadata of a stage selected from pipelines.retrieve. Existing records must satisfy entry rules when subsequently moved; omitted settings retain their values. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
|
|
6065
|
+
*/
|
|
6066
|
+
export const crmPipelinesStagesUpdate = (options) => (options.client ?? client).patch({
|
|
6067
|
+
security: [{
|
|
6068
|
+
key: 'crm-bearerAuth',
|
|
6069
|
+
scheme: 'bearer',
|
|
6070
|
+
type: 'http'
|
|
6071
|
+
}],
|
|
6072
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages/{stageId}',
|
|
6073
|
+
...options,
|
|
6074
|
+
headers: {
|
|
6075
|
+
'Content-Type': 'application/json',
|
|
6076
|
+
...options.headers
|
|
6077
|
+
}
|
|
6078
|
+
});
|
|
6079
|
+
/**
|
|
6080
|
+
* List record associations
|
|
6081
|
+
*
|
|
6082
|
+
* Read records linked to a source record, including association labels and type ids. Obtain source and destination object types from schemas.list and objectId from objects.list or objects.search. Follow paging.next.after to continue reading associated records.
|
|
6083
|
+
*/
|
|
6084
|
+
export const crmAssociationsList = (options) => (options.client ?? client).get({
|
|
6085
|
+
security: [{
|
|
6086
|
+
key: 'crm-bearerAuth',
|
|
6087
|
+
scheme: 'bearer',
|
|
6088
|
+
type: 'http'
|
|
6089
|
+
}],
|
|
6090
|
+
url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}',
|
|
6091
|
+
...options
|
|
6092
|
+
});
|
|
6093
|
+
/**
|
|
6094
|
+
* Remove association
|
|
6095
|
+
*
|
|
6096
|
+
* Remove the association between two existing records without archiving either record. Obtain the linked destination id from associations.list and confirm the source and destination object types before calling. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204.
|
|
6097
|
+
*/
|
|
6098
|
+
export const crmAssociationsRemove = (options) => (options.client ?? client).delete({
|
|
6099
|
+
security: [{
|
|
6100
|
+
key: 'crm-bearerAuth',
|
|
6101
|
+
scheme: 'bearer',
|
|
6102
|
+
type: 'http'
|
|
6103
|
+
}],
|
|
6104
|
+
url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}',
|
|
6105
|
+
...options
|
|
6106
|
+
});
|
|
6107
|
+
/**
|
|
6108
|
+
* Create labelled association
|
|
6109
|
+
*
|
|
6110
|
+
* Associate two existing records using the requested association category and type id. Obtain record ids from objects.list or objects.search; reuse known association type ids from associations.list. Send the association-spec array as the body; use associations.createDefault when no label is needed. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
6111
|
+
*/
|
|
6112
|
+
export const crmAssociationsCreate = (options) => (options.client ?? client).put({
|
|
6113
|
+
security: [{
|
|
6114
|
+
key: 'crm-bearerAuth',
|
|
6115
|
+
scheme: 'bearer',
|
|
6116
|
+
type: 'http'
|
|
6117
|
+
}],
|
|
6118
|
+
url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}',
|
|
6119
|
+
...options,
|
|
6120
|
+
headers: {
|
|
6121
|
+
'Content-Type': 'application/json',
|
|
6122
|
+
...options.headers
|
|
6123
|
+
}
|
|
6124
|
+
});
|
|
6125
|
+
/**
|
|
6126
|
+
* Create default association
|
|
6127
|
+
*
|
|
6128
|
+
* Link two existing records with the default unlabelled association. Obtain each record id from objects.list or objects.search for its type. No request body is required; use associations.create to choose explicit association labels. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
6129
|
+
*/
|
|
6130
|
+
export const crmAssociationsCreateDefault = (options) => (options.client ?? client).put({
|
|
6131
|
+
security: [{
|
|
6132
|
+
key: 'crm-bearerAuth',
|
|
6133
|
+
scheme: 'bearer',
|
|
6134
|
+
type: 'http'
|
|
6135
|
+
}],
|
|
6136
|
+
url: '/crm/v1/objects/{objectType}/{objectId}/associations/default/{toObjectType}/{toObjectId}',
|
|
6137
|
+
...options
|
|
6138
|
+
});
|
|
6139
|
+
/**
|
|
6140
|
+
* List object schemas
|
|
6141
|
+
*
|
|
6142
|
+
* Discover available object schemas, display labels, property definitions and association definitions. Reuse the object type identifier or name in record, property and pipeline operations. archived defaults to false; the include parameters control the definition and audit details returned.
|
|
6143
|
+
*/
|
|
6144
|
+
export const crmSchemasList = (options) => (options?.client ?? client).get({
|
|
6145
|
+
security: [{
|
|
6146
|
+
key: 'crm-bearerAuth',
|
|
6147
|
+
scheme: 'bearer',
|
|
6148
|
+
type: 'http'
|
|
6149
|
+
}],
|
|
6150
|
+
url: '/crm/v1/schemas',
|
|
6151
|
+
...options
|
|
6152
|
+
});
|
|
6153
|
+
/**
|
|
6154
|
+
* Create object schema
|
|
6155
|
+
*
|
|
6156
|
+
* Define a custom CRM object type before creating its records. Provide its immutable name, singular and plural labels, primaryDisplayProperty, properties and associated object types. Save the returned object type identifier for subsequent record and property operations. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
6157
|
+
*/
|
|
6158
|
+
export const crmSchemasCreate = (options) => (options.client ?? client).post({
|
|
6159
|
+
security: [{
|
|
6160
|
+
key: 'crm-bearerAuth',
|
|
6161
|
+
scheme: 'bearer',
|
|
6162
|
+
type: 'http'
|
|
6163
|
+
}],
|
|
6164
|
+
url: '/crm/v1/schemas',
|
|
6165
|
+
...options,
|
|
6166
|
+
headers: {
|
|
6167
|
+
'Content-Type': 'application/json',
|
|
6168
|
+
...options.headers
|
|
6169
|
+
}
|
|
6170
|
+
});
|
|
6171
|
+
/**
|
|
6172
|
+
* Qualify lead
|
|
6173
|
+
*
|
|
6174
|
+
* Qualify a lead with explicit contact, company and optional deal choices in one operation. Unlike HubSpot, CRM exposes these decisions as a single action because qualification coordinates several related record edits rather than editing only the lead stage. Obtain leadId from objects.list for leads and qualifiedStageId from its pipeline; choose a won stage and satisfy its required properties. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
6175
|
+
*/
|
|
6176
|
+
export const crmLeadsQualify = (options) => (options.client ?? client).post({
|
|
6177
|
+
security: [{
|
|
6178
|
+
key: 'crm-bearerAuth',
|
|
6179
|
+
scheme: 'bearer',
|
|
6180
|
+
type: 'http'
|
|
6181
|
+
}],
|
|
6182
|
+
url: '/crm/v1/leads/{leadId}:qualify',
|
|
6183
|
+
...options,
|
|
6184
|
+
headers: {
|
|
6185
|
+
'Content-Type': 'application/json',
|
|
6186
|
+
...options.headers
|
|
6187
|
+
}
|
|
6188
|
+
});
|
|
6189
|
+
/**
|
|
6190
|
+
* Revert change set
|
|
6191
|
+
*
|
|
6192
|
+
* Reverse property changes made by one earlier request. Unlike HubSpot, CRM exposes change-set reversal because agents need to undo a whole recorded action rather than manually reconstructing individual values. Supply the changeSetId recorded in property history. A later conflicting value prevents reversal with HTTP 409 CONFLICT; inspect current records before resolving the conflict. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
6193
|
+
*/
|
|
6194
|
+
export const crmChangesRevert = (options) => (options.client ?? client).post({
|
|
6195
|
+
security: [{
|
|
6196
|
+
key: 'crm-bearerAuth',
|
|
6197
|
+
scheme: 'bearer',
|
|
6198
|
+
type: 'http'
|
|
6199
|
+
}],
|
|
6200
|
+
url: '/crm/v1/changes/{changeSetId}:revert',
|
|
6201
|
+
...options
|
|
6202
|
+
});
|
|
6203
|
+
/**
|
|
6204
|
+
* Retrieve record layout
|
|
6205
|
+
*
|
|
6206
|
+
* Read the shared record-page layout for an object type from schemas.list. Unlike HubSpot, CRM exposes this presentation as an API resource so people and agents can share the same record layout instead of relying on interface-only settings. The response orders summary tiles, sidebar properties and main-column sections.
|
|
6207
|
+
*/
|
|
6208
|
+
export const crmLayoutsRetrieve = (options) => (options.client ?? client).get({
|
|
6209
|
+
security: [{
|
|
6210
|
+
key: 'crm-bearerAuth',
|
|
6211
|
+
scheme: 'bearer',
|
|
6212
|
+
type: 'http'
|
|
6213
|
+
}],
|
|
6214
|
+
url: '/crm/v1/layouts/{objectType}',
|
|
6215
|
+
...options
|
|
6216
|
+
});
|
|
6217
|
+
/**
|
|
6218
|
+
* Update record layout
|
|
6219
|
+
*
|
|
6220
|
+
* Replace the shared record-page layout for an object type from schemas.list. Unlike HubSpot, CRM exposes this presentation as an API resource so agents can configure the same record view used by people. Send the complete layout with at most three summary tiles and property names from properties.list; omitted prior sections are removed. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
6221
|
+
*/
|
|
6222
|
+
export const crmLayoutsUpdate = (options) => (options.client ?? client).put({
|
|
6223
|
+
security: [{
|
|
6224
|
+
key: 'crm-bearerAuth',
|
|
6225
|
+
scheme: 'bearer',
|
|
6226
|
+
type: 'http'
|
|
6227
|
+
}],
|
|
6228
|
+
url: '/crm/v1/layouts/{objectType}',
|
|
6229
|
+
...options,
|
|
6230
|
+
headers: {
|
|
6231
|
+
'Content-Type': 'application/json',
|
|
6232
|
+
...options.headers
|
|
6233
|
+
}
|
|
6234
|
+
});
|
|
5645
6235
|
/**
|
|
5646
6236
|
* List projects
|
|
5647
6237
|
*
|