-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from zoho/beta
3.0.0
- Loading branch information
Showing
2,951 changed files
with
264,750 additions
and
45,327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
lib/core/com/zoho/crm/api/audit_log_export/file_body_wrapper.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
1 change: 1 addition & 0 deletions
1
lib/core/com/zoho/crm/api/audit_log_export/import_audit_log_export.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class ResponseHandler{ | ||
|
||
} | ||
export { | ||
ResponseHandler as MasterModel, | ||
ResponseHandler as ResponseHandler | ||
} |
Oops, something went wrong.