Skip to content

Commit

Permalink
Merge pull request #4 from zoho/beta
Browse files Browse the repository at this point in the history
3.0.0
  • Loading branch information
raja-7453 authored Nov 27, 2024
2 parents 6571e96 + 5a7130b commit 172207e
Show file tree
Hide file tree
Showing 2,951 changed files with 264,750 additions and 45,327 deletions.
73 changes: 71 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,75 @@ License

## Latest Version

- [3.0.0](/versions/3.0.0/README.md)

> **_NOTE:_** We have updated the ***[Node.js SDK API package name](/versions/3.0.0/Package.md)*** as part of this release. Please review the updated package name and make the necessary adjustments to your codebase to ensure compatibility with the latest version of the SDK.
- Added new fields (**referenceValue**, **dealCategory** **delete**, and **showValue**) in fields PickListValue class.
- DealContactRolesOperations class method name changed(deleteContactRoleRealation to deleteContactRoleRelation).
- Added new **page_token** param in GetAttachmentsParam class.
- Added **category**, **sort_by**, **sort_order**, and **filters** param in GetEmailTemplatesParam class.
- Added new **filters** param in GetInventoryTemplatesParam class.
- Added new **delete** field in layouts SectionField class.
- Added new **delete** field in layouts Sections class.
- Modules **displayField** field datatype changed(String to Object).
- Added new **status** param in GetModulesParam class.
- Added new **paramInstance** param in ModulesOperations class **getModules** method.
- Email Related Records Email class **threadId** field datatype changed(Long to String).
- Added new **type** param in SearchRecordsParam class.
- Added new **cvid** param in RecordCountParam class.
- Added new **page_token**, **page**, and **per_page** param in GetRecordLockingInformationsParam class.
- Added new **delete** field in recordlockingconfiguration LockingRules class.
- Removed **module** param in ScoringRulesOperations class **getScoringRule** method.
- Added new **color_code** param in CreateTagsParam class.
- Update **recordId, moduleAPIName** to **moduleAPIName, recordId** param location in TagsOperations class **addTags** method.
- Update **recordId, moduleAPIName** to **moduleAPIName, recordId** param location in TagsOperations class **removeTags** method.
- Added new **ids** param in GetTerritoriesParam class.
- Added new **page** and **per_page** param in GetChildTerritoryParam class.
- Added new **paramInstance** param in UserGroupsOperations class **getAssociatedUsersCount** method.
- Added new **filters**, **page**, and **per_page** param in GetAssociatedUsersCountParam class.
- CadencesExecutionOperations class method name changed(enrolCadences to enrollCadences).
- CadencesExecutionOperations class method name changed(unenrolCadences to unenrollCadences).
- Deprecated and removed API methods:
- UsersTerritories
- validateBeforeTransferForAllTerritories
- validateBeforeTransfer
- delinkAndTransferFromAllTerritories
- delinkAndTransferFromSpecificTerritory

- Cadences
- [Cadence API](https://www.zoho.com/crm/developer/docs/api/v7/cadences/get-cadences.html)
- DealContactRoles
- [Remove Contact Role from a Specific Deal](https://www.zoho.com/crm/developer/docs/api/v7/remove-contact-role-from-a-specific-deal.html)
- InventoryConvert
- [Convert Inventory Records](https://www.zoho.com/crm/developer/docs/api/v7/inventory-convert.html)
- InventoryMassConvert
- [Mass Convert Inventory Records](https://www.zoho.com/crm/developer/docs/api/v7/mass-inventory-convert.html)
- [Get Mass Inventory Conversion Status](https://www.zoho.com/crm/developer/docs/api/v7/mass-inventory-conversion-status-api.html)
- Layouts
- [Update Custom Layout](https://www.zoho.com/crm/developer/docs/api/v7/update-custom-layout.html)
- [Delete Custom Layout](https://www.zoho.com/crm/developer/docs/api/v7/delete-custom-layout.html)
- [Activate Custom Layout](https://www.zoho.com/crm/developer/docs/api/v7/activate-custom-layout.html)
- [Deactivate Custom Layout](https://www.zoho.com/crm/developer/docs/api/v7/deactivate-custom-layout.html)
- Modules
- [Create Custom Module](https://www.zoho.com/crm/developer/docs/api/v7/create-custom-module-api.html)
- Record
- [Get Rich Text Fields](https://www.zoho.com/crm/developer/docs/api/v7/get-rich-text-fields.html)
- RecordLockingConfiguration
- [Record Locking Configuration APIs](https://www.zoho.com/crm/developer/docs/api/v7/get-record-locking-config.html)
- [Add Record Locking Configuration](https://www.zoho.com/crm/developer/docs/api/v7/add-record-locking-config.html)
- [Update Record Locking Configuration](https://www.zoho.com/crm/developer/docs/api/v7/update-record-locking-config.html)
- [Delete Record Locking Configuration](https://www.zoho.com/crm/developer/docs/api/v7/delete-record-locking-config.html)
- RecycleBin
- [Get Recycle Bin Records](https://www.zoho.com/crm/developer/docs/api/v7/get-recycle-bin.html)
- [Delete Recycle Bin Records](https://www.zoho.com/crm/developer/docs/api/v7/del-recycle-bin-records.html)
- UserGroups
- [Associated Groups of a User](https://www.zoho.com/crm/developer/docs/api/v7/associated-groups-of-a-user.html)
- UsersTerritories
- [Remove Territories from User](https://www.zoho.com/crm/developer/docs/api/v7/remove-territories-from-user.html)
- ZiaEnrichment
- [Enrichment Configuration](https://www.zoho.com/crm/developer/docs/api/v7/zia-enrichment/get-config.html)

- [2.0.0](/versions/2.0.0/README.md)

- Handled Error Structure in MassDeleteTags API.
Expand Down Expand Up @@ -52,7 +121,7 @@ For older versions, please [refer](https://github.com/zoho/zohocrm-nodejs-sdk-7.
## Including the SDK in your project
You can include the SDK to your project using:

For including the latest [version](https://github.com/zoho/zohocrm-nodejs-sdk-7.0/releases/tag/2.0.0) using npm
For including the latest [version](https://github.com/zoho/zohocrm-nodejs-sdk-7.0/releases/tag/3.0.0) using npm

- Install **Node** from [nodejs.org](https://nodejs.org/en/download/) (if not installed).

Expand Down Expand Up @@ -110,4 +179,4 @@ For example, if you generate the tokens for your Sandbox environment in the CN d
> - For **Mass Convert API**, you will need to provide the **ZohoCRM.settings.fields.ALL** scope along with the **ZohoCRM.mass_convert.leads.CREATE** and **ZohoCRM.mass_convert.leads.READ** scope while generating the OAuthtoken. Otherwise, the system returns the **OAUTH-SCOPE-MISMATCH** error.

---
For more details, kindly refer [here](/versions/2.0.0/README.md).
For more details, kindly refer [here](/versions/3.0.0/README.md).
2 changes: 1 addition & 1 deletion lib/config/json_details.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ class GetAttachmentsParam{
static IDS = new Param("ids", "com.zoho.crm.api.Attachments.GetAttachmentsParam");
static PAGE = new Param("page", "com.zoho.crm.api.Attachments.GetAttachmentsParam");
static PER_PAGE = new Param("per_page", "com.zoho.crm.api.Attachments.GetAttachmentsParam");
static PAGE_TOKEN = new Param("page_token", "com.zoho.crm.api.Attachments.GetAttachmentsParam");
}

class UploadUrlAttachmentsParam{
Expand Down
46 changes: 46 additions & 0 deletions lib/core/com/zoho/crm/api/audit_log_export/api_exception.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class APIException{
message;
status;
keyModified = new Map();
xError;
info;
/**
* The method to get the code
* @returns {Choice} An instance of Choice
Expand Down Expand Up @@ -129,6 +131,50 @@ class APIException{

}

/**
* The method to get the xError
* @returns {String} A String representing the xError
*/
getXError() {
return this.xError;

}

/**
* The method to set the value to xError
* @param {String} xError A String representing the xError
*/
setXError(xError) {
if((xError != null) && (!(Object.prototype.toString.call(xError) == "[object String]"))) {
throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: xError EXPECTED TYPE: String", null, null);
}
this.xError = xError;
this.keyModified.set("x-error", 1);

}

/**
* The method to get the info
* @returns {String} A String representing the info
*/
getInfo() {
return this.info;

}

/**
* The method to set the value to info
* @param {String} info A String representing the info
*/
setInfo(info) {
if((info != null) && (!(Object.prototype.toString.call(info) == "[object String]"))) {
throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: info EXPECTED TYPE: String", null, null);
}
this.info = info;
this.keyModified.set("info", 1);

}

}
export {
APIException as MasterModel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,29 @@ class AuditLogExportOperations{

}

/**
* The method to download export audit log result
* @param {String} downloadUrl A String representing the downloadUrl
* @returns {APIResponse} An instance of APIResponse
* @throws {SDKException}
*/
async downloadExportAuditLogResult(downloadUrl) {
if((!(Object.prototype.toString.call(downloadUrl) == "[object String]"))) {
throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: downloadUrl EXPECTED TYPE: String", null, null);
}
var handlerInstance = new CommonAPIHandler();
var apiPath = '';
apiPath = apiPath.concat("/");
apiPath = apiPath.concat(downloadUrl.toString());
handlerInstance.setAPIPath(apiPath);
handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET);
handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ);
const require = createRequire(import.meta.url);
let ResponseHandler = require.resolve("./response_handler.js");
return handlerInstance.apiCall(ResponseHandler, "application/octet-stream");

}

}
export {
AuditLogExportOperations as MasterModel,
Expand Down
67 changes: 67 additions & 0 deletions lib/core/com/zoho/crm/api/audit_log_export/file_body_wrapper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import {StreamWrapper} from "../../../../../../utils/util/stream_wrapper.js";
import {SDKException} from "../exception/sdk_exception.js";
import {Constants} from "../../../../../../utils/util/constants.js";

class FileBodyWrapper{

file;
keyModified = new Map();
/**
* The method to get the file
* @returns {StreamWrapper} An instance of StreamWrapper
*/
getFile() {
return this.file;

}

/**
* The method to set the value to file
* @param {StreamWrapper} file An instance of StreamWrapper
*/
setFile(file) {
if((file != null) && (!(file instanceof StreamWrapper))) {
throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: file EXPECTED TYPE: StreamWrapper", null, null);
}
this.file = file;
this.keyModified.set("file", 1);

}

/**
* The method to check if the user has modified the given key
* @param {String} key A String representing the key
* @returns {number} A number representing the modification
*/
isKeyModified(key) {
if((key != null) && (!(Object.prototype.toString.call(key) == "[object String]"))) {
throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: key EXPECTED TYPE: String", null, null);
}
if(this.keyModified.has(key)) {
return this.keyModified.get(key);
}
return null;

}

/**
* The method to mark the given key as modified
* @param {String} key A String representing the key
* @param {number} modification A number representing the modification
*/
setKeyModified(key, modification) {
if((key != null) && (!(Object.prototype.toString.call(key) == "[object String]"))) {
throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: key EXPECTED TYPE: String", null, null);
}
if((modification != null) && (!(Object.prototype.toString.call(modification) == "[object Number]"))) {
throw new SDKException(Constants.DATA_TYPE_ERROR, "KEY: modification EXPECTED TYPE: number", null, null);
}
this.keyModified.set(key, modification);

}

}
export {
FileBodyWrapper as MasterModel,
FileBodyWrapper as FileBodyWrapper
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export { BodyWrapper } from "./body_wrapper.js";
export * as ActionHandler from "./action_handler.js";
export { FileBodyWrapper } from "./file_body_wrapper.js";
export { Criteria } from "./criteria.js";
export { APIException } from "./api_exception.js";
export { User } from "./user.js";
Expand Down
30 changes: 30 additions & 0 deletions lib/core/com/zoho/crm/api/cadences/cadences_operations.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import {APIResponse} from "../../../../../../routes/controllers/api_response.js";
import {CommonAPIHandler} from "../../../../../../routes/middlewares/common_api_handler.js";
import {SDKException} from "../exception/sdk_exception.js";
import {Constants} from "../../../../../../utils/util/constants.js";
import {createRequire} from "node:module";

class CadencesOperations{
/**
* The method to get cadences
* @returns {APIResponse} An instance of APIResponse
* @throws {SDKException}
*/
async getCadences() {
var handlerInstance = new CommonAPIHandler();
var apiPath = '';
apiPath = apiPath.concat("/crm/v7/settings/automation/cadences");
handlerInstance.setAPIPath(apiPath);
handlerInstance.setHttpMethod(Constants.REQUEST_METHOD_GET);
handlerInstance.setCategoryMethod(Constants.REQUEST_CATEGORY_READ);
const require = createRequire(import.meta.url);
let ResponseHandler = require.resolve("./response_handler.js");
return handlerInstance.apiCall(ResponseHandler, "application/json");

}

}
export {
CadencesOperations as MasterModel,
CadencesOperations as CadencesOperations
}
3 changes: 3 additions & 0 deletions lib/core/com/zoho/crm/api/cadences/import_cadences.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
export { Summary } from "./summary.js";
export { User } from "./user.js";
export { ExecutionDetail } from "./execution_detail.js";
export { CadencesOperations } from "./cadences_operations.js";
export { Module } from "./module.js";
export { ExecuteEvery } from "./execute_every.js";
export { Info } from "./info.js";
export { Cadences } from "./cadences.js";
export { APIException } from "./api_exception.js";
export { CustomView } from "./custom_view.js";
export { UnenrollProperty } from "./unenroll_property.js";
export { ResponseWrapper } from "./response_wrapper.js";
export * as ResponseHandler from "./response_handler.js";
7 changes: 7 additions & 0 deletions lib/core/com/zoho/crm/api/cadences/response_handler.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class ResponseHandler{

}
export {
ResponseHandler as MasterModel,
ResponseHandler as ResponseHandler
}
Loading

0 comments on commit 172207e

Please sign in to comment.